Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcvs2svn2004-09-21 15:23:33 +0000
committercvs2svn2004-09-21 15:23:33 +0000
commit957e82c995f3a1c667f807f6e0e8e95f0afce0f2 (patch)
treed1d5bc25a1e2916708cca68eba43089687ed72fa
parent6659b206fba2b7730d90f8d39f17b64a55b3ecfd (diff)
downloadeclipse.platform.swt-957e82c995f3a1c667f807f6e0e8e95f0afce0f2.tar.gz
eclipse.platform.swt-957e82c995f3a1c667f807f6e0e8e95f0afce0f2.tar.xz
eclipse.platform.swt-957e82c995f3a1c667f807f6e0e8e95f0afce0f2.zip
This commit was manufactured by cvs2svn to create branch 'eclipse_3_1_M2'.
Sprout from master 2004-09-20 22:11:37 UTC Christophe Cornu <ccornu> 'v3106' Cherrypick from master 2004-09-21 15:23:31 UTC Grant Gayed <ggayed> ' fix for 71975 fix': bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Shell.java Delete: bundles/org.eclipse.swt.opengl/.classpath_gtk bundles/org.eclipse.swt.opengl/.classpath_motif bundles/org.eclipse.swt.opengl/.classpath_win32 bundles/org.eclipse.swt.opengl/.cvsignore bundles/org.eclipse.swt.opengl/.project bundles/org.eclipse.swt.opengl/META-INF/MANIFEST.MF bundles/org.eclipse.swt.opengl/about.html bundles/org.eclipse.swt.opengl/common/library/gl.c bundles/org.eclipse.swt.opengl/common/library/glu.c bundles/org.eclipse.swt.opengl/common/library/swt.h bundles/org.eclipse.swt.opengl/common/org/eclipse/swt/opengl/GL.java bundles/org.eclipse.swt.opengl/common/org/eclipse/swt/opengl/GLU.java bundles/org.eclipse.swt.opengl/common/org/eclipse/swt/opengl/GLYPHMETRICSFLOAT.java bundles/org.eclipse.swt.opengl/common/org/eclipse/swt/opengl/ImageDataUtil.java bundles/org.eclipse.swt.opengl/common/org/eclipse/swt/opengl/Library.java bundles/org.eclipse.swt.opengl/gtk/library/build.sh bundles/org.eclipse.swt.opengl/gtk/library/glx.c bundles/org.eclipse.swt.opengl/gtk/library/make_gtk.mak bundles/org.eclipse.swt.opengl/gtk/library/structs.c bundles/org.eclipse.swt.opengl/gtk/library/structs.h bundles/org.eclipse.swt.opengl/gtk/library/xgtk.c bundles/org.eclipse.swt.opengl/gtk/org/eclipse/swt/opengl/GLContext.java bundles/org.eclipse.swt.opengl/gtk/org/eclipse/swt/opengl/internal/gtk/XGL.java bundles/org.eclipse.swt.opengl/gtk/org/eclipse/swt/opengl/internal/gtk/XGTK.java bundles/org.eclipse.swt.opengl/gtk/org/eclipse/swt/opengl/internal/gtk/XVisualInfo.java bundles/org.eclipse.swt.opengl/motif/library/build.sh bundles/org.eclipse.swt.opengl/motif/library/glx.c bundles/org.eclipse.swt.opengl/motif/library/make_aix.mak bundles/org.eclipse.swt.opengl/motif/library/make_hpux.mak bundles/org.eclipse.swt.opengl/motif/library/make_linux.mak bundles/org.eclipse.swt.opengl/motif/library/make_solaris.mak bundles/org.eclipse.swt.opengl/motif/library/structs.c bundles/org.eclipse.swt.opengl/motif/library/structs.h bundles/org.eclipse.swt.opengl/motif/org/eclipse/swt/opengl/GLContext.java bundles/org.eclipse.swt.opengl/motif/org/eclipse/swt/opengl/internal/motif/XGL.java bundles/org.eclipse.swt.opengl/motif/org/eclipse/swt/opengl/internal/motif/XVisualInfo.java bundles/org.eclipse.swt.opengl/plugin.properties bundles/org.eclipse.swt.opengl/plugin.xml bundles/org.eclipse.swt.opengl/win32/library/build.bat bundles/org.eclipse.swt.opengl/win32/library/glw.c bundles/org.eclipse.swt.opengl/win32/library/make_win32.mak bundles/org.eclipse.swt.opengl/win32/library/structs.c bundles/org.eclipse.swt.opengl/win32/library/structs.h bundles/org.eclipse.swt.opengl/win32/library/swt.rc bundles/org.eclipse.swt.opengl/win32/org/eclipse/swt/opengl/GLContext.java bundles/org.eclipse.swt.opengl/win32/org/eclipse/swt/opengl/internal/win32/LAYERPLANEDESCRIPTOR.java bundles/org.eclipse.swt.opengl/win32/org/eclipse/swt/opengl/internal/win32/PIXELFORMATDESCRIPTOR.java bundles/org.eclipse.swt.opengl/win32/org/eclipse/swt/opengl/internal/win32/POINTFLOAT.java bundles/org.eclipse.swt.opengl/win32/org/eclipse/swt/opengl/internal/win32/WGL.java bundles/org.eclipse.swt.tools/.classpath bundles/org.eclipse.swt.tools/.cvsignore bundles/org.eclipse.swt.tools/.project bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ClassData.java bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/CleanupClass.java bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/CleanupConstants.java bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/CleanupNatives.java bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ConstantsGenerator.java bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/FieldData.java bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ItemData.java bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/JNIGenerator.java bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/JNIGeneratorApp.java bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/JNIGeneratorAppUI.java bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/MetaData.java bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/MetaDataGenerator.java bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/MethodData.java bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/NativesGenerator.java bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ParameterData.java bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ProgressMonitor.java bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/SizeofGenerator.java bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/StatsGenerator.java bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/StructsGenerator.java bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.accessibility.gtk.ATK.properties bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.accessibility.gtk.properties bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.carbon.OS.properties bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.cde.CDE.properties bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.gnome.GNOME.properties bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.gnome.properties bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.gtk.GTK.properties bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.gtk.OS.properties bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.gtk.properties bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.kde.KDE.properties bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.motif.OS.properties bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.mozilla.XPCOM.properties bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.mozilla.properties bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.ole.win32.COM.properties bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.photon.OS.properties bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.properties bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.win32.OS.properties bundles/org.eclipse.swt.tools/NativeStats/org/eclipse/swt/tools/internal/NativeStats.java bundles/org.eclipse.swt.tools/Sleak/org/eclipse/swt/tools/internal/Sleak.java bundles/org.eclipse.swt.tools/about.html bundles/org.eclipse.swt.tools/build.properties bundles/org.eclipse.swt.tools/plugin.properties bundles/org.eclipse.swt.tools/plugin.xml examples/org.eclipse.swt.examples.browser.demos/.classpath examples/org.eclipse.swt.examples.browser.demos/.project examples/org.eclipse.swt.examples.browser.demos/about.html examples/org.eclipse.swt.examples.browser.demos/build.properties examples/org.eclipse.swt.examples.browser.demos/css1/back1.jpg examples/org.eclipse.swt.examples.browser.demos/css1/back2.jpg examples/org.eclipse.swt.examples.browser.demos/css1/black.gif examples/org.eclipse.swt.examples.browser.demos/css1/board1.jpg examples/org.eclipse.swt.examples.browser.demos/css1/empty.gif examples/org.eclipse.swt.examples.browser.demos/css1/line1.gif examples/org.eclipse.swt.examples.browser.demos/css1/style.css examples/org.eclipse.swt.examples.browser.demos/css1/wall.gif examples/org.eclipse.swt.examples.browser.demos/css1/welcome.html examples/org.eclipse.swt.examples.browser.demos/css1/white.gif examples/org.eclipse.swt.examples.browser.demos/css2/back2.png examples/org.eclipse.swt.examples.browser.demos/css2/black.png examples/org.eclipse.swt.examples.browser.demos/css2/empty.png examples/org.eclipse.swt.examples.browser.demos/css2/line1.gif examples/org.eclipse.swt.examples.browser.demos/css2/style.css examples/org.eclipse.swt.examples.browser.demos/css2/wall.png examples/org.eclipse.swt.examples.browser.demos/css2/welcome.html examples/org.eclipse.swt.examples.browser.demos/css2/white.png examples/org.eclipse.swt.examples.browser.demos/doc-html/hglegal.htm examples/org.eclipse.swt.examples.browser.demos/doc-html/ngibmcpy.gif examples/org.eclipse.swt.examples.browser.demos/doc-html/swt_browser_ex.html examples/org.eclipse.swt.examples.browser.demos/icons/sample.gif examples/org.eclipse.swt.examples.browser.demos/plugin.properties examples/org.eclipse.swt.examples.browser.demos/plugin.xml examples/org.eclipse.swt.examples.browser.demos/src/org/eclipse/swt/examples/browser/demos/BrowserDemoPlugin.java examples/org.eclipse.swt.examples.browser.demos/src/org/eclipse/swt/examples/browser/demos/Pawns.java examples/org.eclipse.swt.examples.browser.demos/src/org/eclipse/swt/examples/browser/demos/views/BrowserDemoView.java examples/org.eclipse.swt.examples.browser/.classpath examples/org.eclipse.swt.examples.browser/.cvsignore examples/org.eclipse.swt.examples.browser/.project examples/org.eclipse.swt.examples.browser/about.html examples/org.eclipse.swt.examples.browser/build.properties examples/org.eclipse.swt.examples.browser/doc-html/hglegal.htm examples/org.eclipse.swt.examples.browser/doc-html/ngibmcpy.gif examples/org.eclipse.swt.examples.browser/doc-html/swt_browser_ex.html examples/org.eclipse.swt.examples.browser/icons/browser_example.gif examples/org.eclipse.swt.examples.browser/plugin.properties examples/org.eclipse.swt.examples.browser/plugin.xml examples/org.eclipse.swt.examples.browser/src/import.properties examples/org.eclipse.swt.examples.browser/src/org/eclipse/swt/examples/browserexample/BrowserPlugin.java examples/org.eclipse.swt.examples.browser/src/org/eclipse/swt/examples/browserexample/BrowserView.java examples/org.eclipse.swt.examples.controls/.classpath examples/org.eclipse.swt.examples.controls/.cvsignore examples/org.eclipse.swt.examples.controls/.project examples/org.eclipse.swt.examples.controls/about.html examples/org.eclipse.swt.examples.controls/build.properties examples/org.eclipse.swt.examples.controls/doc-html/hglegal.htm examples/org.eclipse.swt.examples.controls/doc-html/ngibmcpy.gif examples/org.eclipse.swt.examples.controls/doc-html/swt_controls_ex.html examples/org.eclipse.swt.examples.controls/doc-html/swt_customcontrols_ex.html examples/org.eclipse.swt.examples.controls/icons/controls_example.gif examples/org.eclipse.swt.examples.controls/plugin.properties examples/org.eclipse.swt.examples.controls/plugin.xml examples/org.eclipse.swt.examples.controls/src/import.properties examples/org.eclipse.swt.examples.controls/src/org/eclipse/swt/examples/controls/ControlPlugin.java examples/org.eclipse.swt.examples.controls/src/org/eclipse/swt/examples/controls/ControlView.java examples/org.eclipse.swt.examples.controls/src/org/eclipse/swt/examples/controls/CustomControlView.java examples/org.eclipse.swt.examples.launcher/.classpath examples/org.eclipse.swt.examples.launcher/.cvsignore examples/org.eclipse.swt.examples.launcher/.project examples/org.eclipse.swt.examples.launcher/about.html examples/org.eclipse.swt.examples.launcher/build.properties examples/org.eclipse.swt.examples.launcher/doc-html/hglegal.htm examples/org.eclipse.swt.examples.launcher/doc-html/ngibmcpy.gif examples/org.eclipse.swt.examples.launcher/doc-html/swt_launcher_ex.html examples/org.eclipse.swt.examples.launcher/doc/org.eclipse.swt.examples.launcher.launchItems.html examples/org.eclipse.swt.examples.launcher/icons/closedFolder.gif examples/org.eclipse.swt.examples.launcher/icons/generic_example.gif examples/org.eclipse.swt.examples.launcher/icons/launcher_example.gif examples/org.eclipse.swt.examples.launcher/icons/openFolder.gif examples/org.eclipse.swt.examples.launcher/plugin.properties examples/org.eclipse.swt.examples.launcher/plugin.xml examples/org.eclipse.swt.examples.launcher/schema/org.eclipse.swt.examples.launcher.launchItems.exsd examples/org.eclipse.swt.examples.launcher/src/import.properties examples/org.eclipse.swt.examples.launcher/src/org/eclipse/swt/examples/launcher/ItemDescriptor.java examples/org.eclipse.swt.examples.launcher/src/org/eclipse/swt/examples/launcher/ItemTreeNode.java examples/org.eclipse.swt.examples.launcher/src/org/eclipse/swt/examples/launcher/LauncherPlugin.java examples/org.eclipse.swt.examples.launcher/src/org/eclipse/swt/examples/launcher/LauncherView.java examples/org.eclipse.swt.examples.launcher/src/org/eclipse/swt/examples/launcher/SplitLayout.java examples/org.eclipse.swt.examples.layouts/.classpath examples/org.eclipse.swt.examples.layouts/.cvsignore examples/org.eclipse.swt.examples.layouts/.project examples/org.eclipse.swt.examples.layouts/about.html examples/org.eclipse.swt.examples.layouts/build.properties examples/org.eclipse.swt.examples.layouts/doc-html/hglegal.htm examples/org.eclipse.swt.examples.layouts/doc-html/ngibmcpy.gif examples/org.eclipse.swt.examples.layouts/doc-html/swt_layout_ex.html examples/org.eclipse.swt.examples.layouts/icons/layouts_example.gif examples/org.eclipse.swt.examples.layouts/plugin.properties examples/org.eclipse.swt.examples.layouts/plugin.xml examples/org.eclipse.swt.examples.layouts/src/import.properties examples/org.eclipse.swt.examples.layouts/src/org/eclipse/swt/examples/layouts/LayoutPlugin.java examples/org.eclipse.swt.examples.layouts/src/org/eclipse/swt/examples/layouts/LayoutView.java examples/org.eclipse.swt.examples.ole.win32/.classpath examples/org.eclipse.swt.examples.ole.win32/.cvsignore examples/org.eclipse.swt.examples.ole.win32/.project examples/org.eclipse.swt.examples.ole.win32/about.html examples/org.eclipse.swt.examples.ole.win32/build.properties examples/org.eclipse.swt.examples.ole.win32/doc-html/hglegal.htm examples/org.eclipse.swt.examples.ole.win32/doc-html/ngibmcpy.gif examples/org.eclipse.swt.examples.ole.win32/doc-html/swt_ole_ex.html examples/org.eclipse.swt.examples.ole.win32/icons/backward_nav.gif examples/org.eclipse.swt.examples.ole.win32/icons/forward_nav.gif examples/org.eclipse.swt.examples.ole.win32/icons/home_nav.gif examples/org.eclipse.swt.examples.ole.win32/icons/refresh_nav.gif examples/org.eclipse.swt.examples.ole.win32/icons/search_nav.gif examples/org.eclipse.swt.examples.ole.win32/icons/stop_nav.gif examples/org.eclipse.swt.examples.ole.win32/icons/webbrowser_example.gif examples/org.eclipse.swt.examples.ole.win32/plugin.properties examples/org.eclipse.swt.examples.ole.win32/plugin.xml examples/org.eclipse.swt.examples.ole.win32/src/import.properties examples/org.eclipse.swt.examples.ole.win32/src/org/eclipse/swt/examples/ole/win32/OleBrowserView.java examples/org.eclipse.swt.examples.ole.win32/src/org/eclipse/swt/examples/ole/win32/OlePlugin.java examples/org.eclipse.swt.examples.ole.win32/src/org/eclipse/swt/examples/ole/win32/OleWebBrowser.java examples/org.eclipse.swt.examples.paint/.classpath examples/org.eclipse.swt.examples.paint/.cvsignore examples/org.eclipse.swt.examples.paint/.project examples/org.eclipse.swt.examples.paint/about.html examples/org.eclipse.swt.examples.paint/build.properties examples/org.eclipse.swt.examples.paint/doc-html/hglegal.htm examples/org.eclipse.swt.examples.paint/doc-html/ngibmcpy.gif examples/org.eclipse.swt.examples.paint/doc-html/swt_paint_ex.html examples/org.eclipse.swt.examples.paint/icons/fill_none.gif examples/org.eclipse.swt.examples.paint/icons/fill_outline.gif examples/org.eclipse.swt.examples.paint/icons/fill_solid.gif examples/org.eclipse.swt.examples.paint/icons/linestyle_dash.gif examples/org.eclipse.swt.examples.paint/icons/linestyle_dashdot.gif examples/org.eclipse.swt.examples.paint/icons/linestyle_dot.gif examples/org.eclipse.swt.examples.paint/icons/linestyle_solid.gif examples/org.eclipse.swt.examples.paint/icons/options_font.gif examples/org.eclipse.swt.examples.paint/icons/paint_example.gif examples/org.eclipse.swt.examples.paint/icons/tool_airbrush.gif examples/org.eclipse.swt.examples.paint/icons/tool_ellipse.gif examples/org.eclipse.swt.examples.paint/icons/tool_line.gif examples/org.eclipse.swt.examples.paint/icons/tool_pencil.gif examples/org.eclipse.swt.examples.paint/icons/tool_polyline.gif examples/org.eclipse.swt.examples.paint/icons/tool_rectangle.gif examples/org.eclipse.swt.examples.paint/icons/tool_roundedrectangle.gif examples/org.eclipse.swt.examples.paint/icons/tool_text.gif examples/org.eclipse.swt.examples.paint/plugin.properties examples/org.eclipse.swt.examples.paint/plugin.xml examples/org.eclipse.swt.examples.paint/src/import.properties examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/AirbrushTool.java examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/BasicPaintSession.java examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/ContainerFigure.java examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/ContinuousPaintSession.java examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/DragPaintSession.java examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/EllipseFigure.java examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/EllipseTool.java examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/Figure.java examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/FigureDrawContext.java examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/LineFigure.java examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/LineTool.java examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/PaintPlugin.java examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/PaintSession.java examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/PaintSurface.java examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/PaintTool.java examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/PaintView.java examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/PencilTool.java examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/PointFigure.java examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/PolyLineTool.java examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/RectangleFigure.java examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/RectangleTool.java examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/RoundedRectangleFigure.java examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/RoundedRectangleTool.java examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/SegmentedPaintSession.java examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/SolidEllipseFigure.java examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/SolidPolygonFigure.java examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/SolidRectangleFigure.java examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/SolidRoundedRectangleFigure.java examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/TextFigure.java examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/TextTool.java examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/ToolSettings.java examples/org.eclipse.swt.examples/.classpath examples/org.eclipse.swt.examples/.cvsignore examples/org.eclipse.swt.examples/.project examples/org.eclipse.swt.examples/about.html examples/org.eclipse.swt.examples/build.properties examples/org.eclipse.swt.examples/doc-html/hglegal.htm examples/org.eclipse.swt.examples/doc-html/ngibmcpy.gif examples/org.eclipse.swt.examples/doc-html/swt_addressbook_ex.html examples/org.eclipse.swt.examples/doc-html/swt_clipboard_ex.html examples/org.eclipse.swt.examples/doc-html/swt_fileviewer_ex.html examples/org.eclipse.swt.examples/doc-html/swt_helloworld_ex.html examples/org.eclipse.swt.examples/doc-html/swt_hoverhelp_ex.html examples/org.eclipse.swt.examples/doc-html/swt_imageanalyzer_ex.html examples/org.eclipse.swt.examples/doc-html/swt_javaviewer_ex.html examples/org.eclipse.swt.examples/doc-html/swt_manual_setup.html examples/org.eclipse.swt.examples/doc-html/swt_texteditor_ex.html examples/org.eclipse.swt.examples/plugin.properties examples/org.eclipse.swt.examples/plugin.xml examples/org.eclipse.swt.examples/src/examples_addressbook.properties examples/org.eclipse.swt.examples/src/examples_browser.properties examples/org.eclipse.swt.examples/src/examples_control.properties examples/org.eclipse.swt.examples/src/examples_fileviewer.properties examples/org.eclipse.swt.examples/src/examples_helloworld.properties examples/org.eclipse.swt.examples/src/examples_hoverhelp.properties examples/org.eclipse.swt.examples/src/examples_images.properties examples/org.eclipse.swt.examples/src/examples_javaviewer.properties examples/org.eclipse.swt.examples/src/examples_layout.properties examples/org.eclipse.swt.examples/src/examples_texteditor.properties examples/org.eclipse.swt.examples/src/import.properties examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/addressbook/AddressBook.java examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/addressbook/DataEntryDialog.java examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/addressbook/FindListener.java examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/addressbook/SearchDialog.java examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/browserexample/BrowserExample.java examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/browserexample/document.gif examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/browserexample/eclipse01.bmp examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/browserexample/eclipse02.bmp examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/browserexample/eclipse03.bmp examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/browserexample/eclipse04.bmp examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/browserexample/eclipse05.bmp examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/browserexample/eclipse06.bmp examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/browserexample/eclipse07.bmp examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/browserexample/eclipse08.bmp examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/browserexample/eclipse09.bmp examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/browserexample/eclipse10.bmp examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/browserexample/eclipse11.bmp examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/browserexample/eclipse12.bmp examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/clipboard/ClipboardExample.java examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/clipboard/MyType.java examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/clipboard/MyTypeTransfer.java examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/AlignableTab.java examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/ButtonTab.java examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/CComboTab.java examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/CLabelTab.java examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/CTabFolderTab.java examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/CanvasTab.java examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/ComboTab.java examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/ControlExample.java examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/CoolBarTab.java examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/CustomControlExample.java examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/DialogTab.java examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/GroupTab.java examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/LabelTab.java examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/ListTab.java examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/ProgressBarTab.java examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/RangeTab.java examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/SashFormTab.java examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/SashTab.java examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/ScrollableTab.java examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/ShellTab.java examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/SliderTab.java examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/StyledTextTab.java examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/Tab.java examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/TabFolderTab.java examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/TableTab.java examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/TableTreeTab.java examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/TextTab.java examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/ToolBarTab.java examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/TreeTab.java examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/bold.bmp examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/bold_mask.bmp examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/closedFolder.gif examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/italic.bmp examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/italic_mask.bmp examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/openFolder.gif examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/red.bmp examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/red_mask.bmp examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/target.gif examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/yellow.bmp examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/yellow_mask.bmp examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/dnd/DNDExample.java examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/dnd/ImageTransfer.java examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/FileViewer.java examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/IconCache.java examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/cmd_Copy.gif examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/cmd_Cut.gif examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/cmd_Delete.gif examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/cmd_Parent.gif examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/cmd_Paste.gif examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/cmd_Print.gif examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/cmd_Refresh.gif examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/cmd_Rename.gif examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/cmd_Search.gif examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/generic_example.gif examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/icon_ClosedDrive.gif examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/icon_ClosedFolder.gif examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/icon_File.gif examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/icon_OpenDrive.gif examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/icon_OpenFolder.gif examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/helloworld/HelloWorld1.java examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/helloworld/HelloWorld2.java examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/helloworld/HelloWorld3.java examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/helloworld/HelloWorld4.java examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/helloworld/HelloWorld5.java examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/hoverhelp/HoverHelp.java examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/hoverhelp/information.gif examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/hoverhelp/warning.gif examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/imageanalyzer/ImageAnalyzer.java examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/javaviewer/JavaLineStyler.java examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/javaviewer/JavaViewer.java examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/layoutexample/FillLayoutTab.java examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/layoutexample/FormLayoutTab.java examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/layoutexample/GridLayoutTab.java examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/layoutexample/LayoutExample.java examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/layoutexample/RowLayoutTab.java examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/layoutexample/Tab.java examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/Images.java examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/TextEditor.java examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/blue.bmp examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/blue_mask.bmp examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/bold.bmp examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/bold_mask.bmp examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/erase.bmp examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/erase_mask.bmp examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/green.bmp examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/green_mask.bmp examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/red.bmp examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/red_mask.bmp examples/org.eclipse.swt.opengl.examples/.classpath examples/org.eclipse.swt.opengl.examples/.project examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/AntialiasingTab.java examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/AreaTab.java examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/BezierTab.java examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/BitmapTextTab.java examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/ColorSelectionGroup.java examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/FogTab.java examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/GradientTab.java examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/IColorSelectionListener.java examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/LightTab.java examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/NurbTab.java examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/ObjectsTab.java examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/OpenGLExample.java examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/OpenGLTab.java examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/OutlineTextTab.java examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/ReflectionTab.java examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/SelectionTab.java examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/StencilTab.java examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/TextureTab.java examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/TransparencyTab.java examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/images/Ball.jpg examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/images/Box.bmp examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/images/Floor.jpg examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/images/splash.bmp examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/images/untitled.jpg examples/org.eclipse.swt.snippets/.classpath examples/org.eclipse.swt.snippets/.cvsignore examples/org.eclipse.swt.snippets/.project examples/org.eclipse.swt.snippets/about.html examples/org.eclipse.swt.snippets/build.properties examples/org.eclipse.swt.snippets/plugin.properties examples/org.eclipse.swt.snippets/plugin.xml examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet1.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet10.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet100.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet101.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet102.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet103.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet104.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet105.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet106.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet107.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet108.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet109.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet11.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet110.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet111.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet112.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet113.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet114.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet115.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet116.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet117.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet118.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet119.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet12.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet120.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet121.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet122.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet123.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet124.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet125.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet126.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet127.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet128.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet129.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet13.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet130.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet131.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet132.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet133.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet134.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet135.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet136.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet137.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet138.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet139.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet14.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet140.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet141.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet142.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet143.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet144.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet145.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet146.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet147.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet148.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet149.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet15.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet150.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet151.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet152.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet153.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet154.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet155.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet156.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet16.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet17.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet18.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet19.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet2.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet20.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet21.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet22.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet23.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet24.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet25.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet26.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet27.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet28.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet29.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet3.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet30.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet31.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet32.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet33.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet34.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet35.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet36.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet37.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet38.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet39.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet4.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet40.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet41.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet42.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet43.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet44.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet45.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet46.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet47.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet48.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet49.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet5.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet50.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet51.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet52.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet53.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet54.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet55.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet56.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet57.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet58.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet59.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet6.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet60.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet61.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet62.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet63.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet64.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet65.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet66.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet67.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet68.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet69.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet7.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet70.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet71.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet72.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet73.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet74.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet75.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet76.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet77.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet78.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet79.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet8.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet80.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet81.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet82.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet83.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet84.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet85.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet86.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet87.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet88.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet89.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet9.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet90.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet91.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet92.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet93.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet94.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet95.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet96.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet97.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet98.java examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet99.java tests/org.eclipse.swt.tests/.classpath tests/org.eclipse.swt.tests/.cvsignore tests/org.eclipse.swt.tests/.project tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/AllBrowserTests.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/AllGraphicsTests.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/AllTests.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/AllWidgetTests.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/EmulatedWidgetsTests.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/StyledTextContentSpec.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/SwtJunit.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/SwtTestCase.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_SWT.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_SWTError.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_SWTException.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_accessibility_ACC.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_accessibility_Accessible.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_accessibility_AccessibleAdapter.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_accessibility_AccessibleControlAdapter.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_accessibility_AccessibleControlEvent.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_accessibility_AccessibleControlListener.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_accessibility_AccessibleEvent.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_accessibility_AccessibleListener.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_accessibility_AccessibleTextAdapter.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_accessibility_AccessibleTextEvent.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_accessibility_AccessibleTextListener.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_awt_SWT_AWT.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_browser_Browser.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_browser_CloseWindowListener.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_browser_LocationAdapter.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_browser_LocationListener.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_browser_OpenWindowListener.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_browser_ProgressAdapter.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_browser_ProgressListener.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_browser_StatusTextListener.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_browser_TitleListener.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_browser_VisibilityWindowAdapter.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_browser_VisibilityWindowListener.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_AnimatedProgress.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_BidiSegmentEvent.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_BidiSegmentListener.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_BusyIndicator.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_CCombo.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_CLabel.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_CTabFolder.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_CTabFolderAdapter.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_CTabFolderEvent.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_CTabFolderListener.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_CTabItem.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_ControlEditor.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_ExtendedModifyEvent.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_ExtendedModifyListener.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_LineBackgroundEvent.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_LineBackgroundListener.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_LineStyleEvent.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_LineStyleListener.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_PopupList.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_ST.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_SashForm.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_ScrolledComposite.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_StackLayout.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_StyleRange.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_StyledText.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_StyledTextContent.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_TableCursor.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_TableEditor.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_TableTree.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_TableTreeEditor.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_TableTreeItem.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_TextChangeListener.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_TextChangedEvent.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_TextChangingEvent.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_TreeEditor.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_VerifyKeyListener.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_ViewForm.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_dnd_ByteArrayTransfer.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_dnd_Clipboard.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_dnd_DND.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_dnd_DragSource.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_dnd_DragSourceAdapter.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_dnd_DragSourceEvent.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_dnd_DragSourceListener.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_dnd_DropTarget.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_dnd_DropTargetAdapter.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_dnd_DropTargetEvent.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_dnd_DropTargetListener.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_dnd_FileTransfer.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_dnd_RTFTransfer.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_dnd_TextTransfer.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_dnd_Transfer.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_dnd_TransferData.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_ArmEvent.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_ArmListener.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_ControlAdapter.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_ControlEvent.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_ControlListener.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_DisposeEvent.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_DisposeListener.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_FocusAdapter.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_FocusEvent.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_FocusListener.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_HelpEvent.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_HelpListener.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_KeyAdapter.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_KeyEvent.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_KeyListener.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_MenuAdapter.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_MenuEvent.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_MenuListener.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_ModifyEvent.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_ModifyListener.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_MouseAdapter.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_MouseEvent.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_MouseListener.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_MouseMoveListener.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_MouseTrackAdapter.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_MouseTrackListener.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_PaintEvent.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_PaintListener.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_SelectionAdapter.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_SelectionEvent.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_SelectionListener.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_ShellAdapter.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_ShellEvent.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_ShellListener.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_TraverseEvent.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_TraverseListener.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_TreeAdapter.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_TreeEvent.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_TreeListener.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_TypedEvent.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_VerifyEvent.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_VerifyListener.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_Color.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_Cursor.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_Device.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_DeviceData.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_Drawable.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_Font.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_FontData.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_FontMetrics.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_GC.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_GCData.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_Image.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_ImageData.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_ImageLoader.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_ImageLoaderEvent.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_ImageLoaderListener.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_PaletteData.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_Point.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_RGB.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_Rectangle.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_Region.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_layout_FillLayout.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_layout_FormAttachment.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_layout_FormData.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_layout_FormLayout.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_layout_GridData.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_layout_GridLayout.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_layout_RowData.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_layout_RowLayout.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_ole_win32_OLE.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_ole_win32_OleAutomation.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_ole_win32_OleClientSite.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_ole_win32_OleControlSite.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_ole_win32_OleEvent.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_ole_win32_OleFrame.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_ole_win32_OleFunctionDescription.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_ole_win32_OleListener.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_ole_win32_OleParameterDescription.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_ole_win32_OlePropertyDescription.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_ole_win32_Variant.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_printing_PrintDialog.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_printing_Printer.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_printing_PrinterData.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_program_Program.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Button.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Canvas.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Caret.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_ColorDialog.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Combo.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Composite.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Control.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_CoolBar.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_CoolItem.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Decorations.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Dialog.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_DirectoryDialog.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Display.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Event.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_FileDialog.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_FontDialog.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Group.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Item.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Label.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Layout.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_List.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Listener.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Menu.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_MenuItem.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_MessageBox.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Monitor.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_ProgressBar.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Sash.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Scale.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_ScrollBar.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Scrollable.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Shell.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Slider.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Synchronizer.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_TabFolder.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_TabItem.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Table.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_TableColumn.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_TableItem.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Text.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_ToolBar.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_ToolItem.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Tracker.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Tree.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_TreeItem.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_TypedListener.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Widget.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/browser/Browser1.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/browser/Browser2.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/browser/Browser3.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/browser/Browser4.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/browser/Browser5.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/browser/Browser6.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/browser/Browser7.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/browser/Test_BrowserSuite.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/corrupt.bmp tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/corrupt.gif tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/corrupt.jpg tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/corrupt.png tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/corruptBadBitDepth.png tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/empty.txt tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/folder.bmp tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/folder.gif tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/folder.jpg tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/folder.png tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/folderOpen.bmp tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/folderOpen.gif tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/folderOpen.jpg tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/folderOpen.png tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/interlaced_target.png tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/junitGen.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/PerformanceTests.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/SwtPerformanceTestCase.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/Test_org_eclipse_swt_graphics_Color.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/Test_org_eclipse_swt_graphics_Cursor.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/Test_org_eclipse_swt_graphics_DeviceData.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/Test_org_eclipse_swt_graphics_Font.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/Test_org_eclipse_swt_graphics_FontData.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/Test_org_eclipse_swt_graphics_FontMetrics.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/Test_org_eclipse_swt_graphics_GC.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/Test_org_eclipse_swt_graphics_Image.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/Test_org_eclipse_swt_graphics_ImageData.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/Test_org_eclipse_swt_graphics_ImageLoader.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/Test_org_eclipse_swt_graphics_ImageLoaderEvent.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/Test_org_eclipse_swt_graphics_PaletteData.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/Test_org_eclipse_swt_graphics_Point.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/Test_org_eclipse_swt_graphics_RGB.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/Test_org_eclipse_swt_graphics_Rectangle.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/Test_org_eclipse_swt_graphics_Region.java tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/target.bmp tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/target.gif tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/target.jpg tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/target.png tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/transparent.png tests/org.eclipse.swt.tests/about.html tests/org.eclipse.swt.tests/build.properties tests/org.eclipse.swt.tests/data/browser3.html tests/org.eclipse.swt.tests/data/browser4.html tests/org.eclipse.swt.tests/data/browser4a.html tests/org.eclipse.swt.tests/data/browser5.html tests/org.eclipse.swt.tests/data/browser6.html tests/org.eclipse.swt.tests/data/browser7.html tests/org.eclipse.swt.tests/data/corrupt.bmp tests/org.eclipse.swt.tests/data/corrupt.gif tests/org.eclipse.swt.tests/data/corrupt.jpg tests/org.eclipse.swt.tests/data/corrupt.png tests/org.eclipse.swt.tests/data/corruptBadBitDepth.png tests/org.eclipse.swt.tests/data/empty.txt tests/org.eclipse.swt.tests/data/folder.bmp tests/org.eclipse.swt.tests/data/folder.gif tests/org.eclipse.swt.tests/data/folder.jpg tests/org.eclipse.swt.tests/data/folder.png tests/org.eclipse.swt.tests/data/folderOpen.bmp tests/org.eclipse.swt.tests/data/folderOpen.gif tests/org.eclipse.swt.tests/data/folderOpen.jpg tests/org.eclipse.swt.tests/data/folderOpen.png tests/org.eclipse.swt.tests/data/target.bmp tests/org.eclipse.swt.tests/data/target.gif tests/org.eclipse.swt.tests/data/target.jpg tests/org.eclipse.swt.tests/data/target.png tests/org.eclipse.swt.tests/data/transparent.png tests/org.eclipse.swt.tests/plugin.properties tests/org.eclipse.swt.tests/plugin.xml tests/org.eclipse.swt.tests/test.xml
-rw-r--r--bundles/org.eclipse.swt.opengl/.classpath_gtk9
-rw-r--r--bundles/org.eclipse.swt.opengl/.classpath_motif9
-rw-r--r--bundles/org.eclipse.swt.opengl/.classpath_win329
-rw-r--r--bundles/org.eclipse.swt.opengl/.cvsignore3
-rw-r--r--bundles/org.eclipse.swt.opengl/.project30
-rw-r--r--bundles/org.eclipse.swt.opengl/META-INF/MANIFEST.MF9
-rw-r--r--bundles/org.eclipse.swt.opengl/about.html30
-rw-r--r--bundles/org.eclipse.swt.opengl/common/library/gl.c3356
-rw-r--r--bundles/org.eclipse.swt.opengl/common/library/glu.c546
-rw-r--r--bundles/org.eclipse.swt.opengl/common/library/swt.h50
-rw-r--r--bundles/org.eclipse.swt.opengl/common/org/eclipse/swt/opengl/GL.java1449
-rw-r--r--bundles/org.eclipse.swt.opengl/common/org/eclipse/swt/opengl/GLU.java245
-rw-r--r--bundles/org.eclipse.swt.opengl/common/org/eclipse/swt/opengl/GLYPHMETRICSFLOAT.java22
-rw-r--r--bundles/org.eclipse.swt.opengl/common/org/eclipse/swt/opengl/ImageDataUtil.java524
-rw-r--r--bundles/org.eclipse.swt.opengl/common/org/eclipse/swt/opengl/Library.java60
-rw-r--r--bundles/org.eclipse.swt.opengl/gtk/library/build.sh14
-rw-r--r--bundles/org.eclipse.swt.opengl/gtk/library/glx.c247
-rw-r--r--bundles/org.eclipse.swt.opengl/gtk/library/make_gtk.mak52
-rw-r--r--bundles/org.eclipse.swt.opengl/gtk/library/structs.c73
-rw-r--r--bundles/org.eclipse.swt.opengl/gtk/library/structs.h16
-rw-r--r--bundles/org.eclipse.swt.opengl/gtk/library/xgtk.c109
-rw-r--r--bundles/org.eclipse.swt.opengl/gtk/org/eclipse/swt/opengl/GLContext.java307
-rw-r--r--bundles/org.eclipse.swt.opengl/gtk/org/eclipse/swt/opengl/internal/gtk/XGL.java226
-rw-r--r--bundles/org.eclipse.swt.opengl/gtk/org/eclipse/swt/opengl/internal/gtk/XGTK.java29
-rw-r--r--bundles/org.eclipse.swt.opengl/gtk/org/eclipse/swt/opengl/internal/gtk/XVisualInfo.java24
-rw-r--r--bundles/org.eclipse.swt.opengl/motif/library/build.sh68
-rw-r--r--bundles/org.eclipse.swt.opengl/motif/library/glx.c232
-rw-r--r--bundles/org.eclipse.swt.opengl/motif/library/make_aix.mak40
-rw-r--r--bundles/org.eclipse.swt.opengl/motif/library/make_hpux.mak44
-rw-r--r--bundles/org.eclipse.swt.opengl/motif/library/make_linux.mak38
-rw-r--r--bundles/org.eclipse.swt.opengl/motif/library/make_solaris.mak45
-rw-r--r--bundles/org.eclipse.swt.opengl/motif/library/structs.c73
-rw-r--r--bundles/org.eclipse.swt.opengl/motif/library/structs.h16
-rw-r--r--bundles/org.eclipse.swt.opengl/motif/org/eclipse/swt/opengl/GLContext.java303
-rw-r--r--bundles/org.eclipse.swt.opengl/motif/org/eclipse/swt/opengl/internal/motif/XGL.java227
-rw-r--r--bundles/org.eclipse.swt.opengl/motif/org/eclipse/swt/opengl/internal/motif/XVisualInfo.java24
-rw-r--r--bundles/org.eclipse.swt.opengl/plugin.properties12
-rw-r--r--bundles/org.eclipse.swt.opengl/plugin.xml19
-rw-r--r--bundles/org.eclipse.swt.opengl/win32/library/build.bat34
-rw-r--r--bundles/org.eclipse.swt.opengl/win32/library/glw.c283
-rw-r--r--bundles/org.eclipse.swt.opengl/win32/library/make_win32.mak56
-rw-r--r--bundles/org.eclipse.swt.opengl/win32/library/structs.c304
-rw-r--r--bundles/org.eclipse.swt.opengl/win32/library/structs.h24
-rw-r--r--bundles/org.eclipse.swt.opengl/win32/library/swt.rc67
-rw-r--r--bundles/org.eclipse.swt.opengl/win32/org/eclipse/swt/opengl/GLContext.java313
-rw-r--r--bundles/org.eclipse.swt.opengl/win32/org/eclipse/swt/opengl/internal/win32/LAYERPLANEDESCRIPTOR.java40
-rw-r--r--bundles/org.eclipse.swt.opengl/win32/org/eclipse/swt/opengl/internal/win32/PIXELFORMATDESCRIPTOR.java42
-rw-r--r--bundles/org.eclipse.swt.opengl/win32/org/eclipse/swt/opengl/internal/win32/POINTFLOAT.java18
-rw-r--r--bundles/org.eclipse.swt.opengl/win32/org/eclipse/swt/opengl/internal/win32/WGL.java142
-rw-r--r--bundles/org.eclipse.swt.tools/.classpath9
-rw-r--r--bundles/org.eclipse.swt.tools/.cvsignore1
-rw-r--r--bundles/org.eclipse.swt.tools/.project19
-rw-r--r--bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ClassData.java38
-rw-r--r--bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/CleanupClass.java95
-rw-r--r--bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/CleanupConstants.java95
-rw-r--r--bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/CleanupNatives.java124
-rw-r--r--bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ConstantsGenerator.java65
-rw-r--r--bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/FieldData.java61
-rw-r--r--bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ItemData.java134
-rw-r--r--bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/JNIGenerator.java381
-rw-r--r--bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/JNIGeneratorApp.java416
-rw-r--r--bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/JNIGeneratorAppUI.java1178
-rw-r--r--bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/MetaData.java165
-rw-r--r--bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/MetaDataGenerator.java105
-rw-r--r--bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/MethodData.java48
-rw-r--r--bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/NativesGenerator.java761
-rw-r--r--bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ParameterData.java51
-rw-r--r--bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ProgressMonitor.java9
-rw-r--r--bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/SizeofGenerator.java70
-rw-r--r--bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/StatsGenerator.java190
-rw-r--r--bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/StructsGenerator.java550
-rw-r--r--bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.accessibility.gtk.ATK.properties253
-rw-r--r--bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.accessibility.gtk.properties25
-rw-r--r--bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.carbon.OS.properties3836
-rw-r--r--bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.cde.CDE.properties59
-rw-r--r--bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.gnome.GNOME.properties75
-rw-r--r--bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.gnome.properties25
-rw-r--r--bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.gtk.GTK.properties49
-rw-r--r--bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.gtk.OS.properties4062
-rw-r--r--bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.gtk.properties25
-rw-r--r--bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.kde.KDE.properties146
-rw-r--r--bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.motif.OS.properties2585
-rw-r--r--bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.mozilla.XPCOM.properties1213
-rw-r--r--bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.mozilla.properties37
-rw-r--r--bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.ole.win32.COM.properties802
-rw-r--r--bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.photon.OS.properties1533
-rw-r--r--bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.properties43
-rw-r--r--bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.win32.OS.properties3841
-rw-r--r--bundles/org.eclipse.swt.tools/NativeStats/org/eclipse/swt/tools/internal/NativeStats.java202
-rw-r--r--bundles/org.eclipse.swt.tools/Sleak/org/eclipse/swt/tools/internal/Sleak.java294
-rw-r--r--bundles/org.eclipse.swt.tools/about.html30
-rw-r--r--bundles/org.eclipse.swt.tools/build.properties11
-rw-r--r--bundles/org.eclipse.swt.tools/plugin.properties12
-rw-r--r--bundles/org.eclipse.swt.tools/plugin.xml12
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Shell.java6
-rw-r--r--examples/org.eclipse.swt.examples.browser.demos/.classpath7
-rw-r--r--examples/org.eclipse.swt.examples.browser.demos/.project28
-rw-r--r--examples/org.eclipse.swt.examples.browser.demos/about.html30
-rw-r--r--examples/org.eclipse.swt.examples.browser.demos/build.properties10
-rw-r--r--examples/org.eclipse.swt.examples.browser.demos/css1/back1.jpgbin28021 -> 0 bytes
-rw-r--r--examples/org.eclipse.swt.examples.browser.demos/css1/back2.jpgbin28352 -> 0 bytes
-rw-r--r--examples/org.eclipse.swt.examples.browser.demos/css1/black.gifbin1066 -> 0 bytes
-rw-r--r--examples/org.eclipse.swt.examples.browser.demos/css1/board1.jpgbin17747 -> 0 bytes
-rw-r--r--examples/org.eclipse.swt.examples.browser.demos/css1/empty.gifbin848 -> 0 bytes
-rw-r--r--examples/org.eclipse.swt.examples.browser.demos/css1/line1.gifbin233 -> 0 bytes
-rw-r--r--examples/org.eclipse.swt.examples.browser.demos/css1/style.css30
-rw-r--r--examples/org.eclipse.swt.examples.browser.demos/css1/wall.gifbin1066 -> 0 bytes
-rw-r--r--examples/org.eclipse.swt.examples.browser.demos/css1/welcome.html32
-rw-r--r--examples/org.eclipse.swt.examples.browser.demos/css1/white.gifbin910 -> 0 bytes
-rw-r--r--examples/org.eclipse.swt.examples.browser.demos/css2/back2.pngbin184490 -> 0 bytes
-rw-r--r--examples/org.eclipse.swt.examples.browser.demos/css2/black.pngbin492 -> 0 bytes
-rw-r--r--examples/org.eclipse.swt.examples.browser.demos/css2/empty.pngbin959 -> 0 bytes
-rw-r--r--examples/org.eclipse.swt.examples.browser.demos/css2/line1.gifbin233 -> 0 bytes
-rw-r--r--examples/org.eclipse.swt.examples.browser.demos/css2/style.css30
-rw-r--r--examples/org.eclipse.swt.examples.browser.demos/css2/wall.pngbin512 -> 0 bytes
-rw-r--r--examples/org.eclipse.swt.examples.browser.demos/css2/welcome.html32
-rw-r--r--examples/org.eclipse.swt.examples.browser.demos/css2/white.pngbin959 -> 0 bytes
-rw-r--r--examples/org.eclipse.swt.examples.browser.demos/doc-html/hglegal.htm14
-rw-r--r--examples/org.eclipse.swt.examples.browser.demos/doc-html/ngibmcpy.gifbin1101 -> 0 bytes
-rw-r--r--examples/org.eclipse.swt.examples.browser.demos/doc-html/swt_browser_ex.html41
-rw-r--r--examples/org.eclipse.swt.examples.browser.demos/icons/sample.gifbin983 -> 0 bytes
-rw-r--r--examples/org.eclipse.swt.examples.browser.demos/plugin.properties31
-rw-r--r--examples/org.eclipse.swt.examples.browser.demos/plugin.xml55
-rw-r--r--examples/org.eclipse.swt.examples.browser.demos/src/org/eclipse/swt/examples/browser/demos/BrowserDemoPlugin.java49
-rw-r--r--examples/org.eclipse.swt.examples.browser.demos/src/org/eclipse/swt/examples/browser/demos/Pawns.java222
-rw-r--r--examples/org.eclipse.swt.examples.browser.demos/src/org/eclipse/swt/examples/browser/demos/views/BrowserDemoView.java238
-rw-r--r--examples/org.eclipse.swt.examples.browser/.classpath7
-rw-r--r--examples/org.eclipse.swt.examples.browser/.cvsignore1
-rw-r--r--examples/org.eclipse.swt.examples.browser/.project17
-rw-r--r--examples/org.eclipse.swt.examples.browser/about.html30
-rw-r--r--examples/org.eclipse.swt.examples.browser/build.properties20
-rw-r--r--examples/org.eclipse.swt.examples.browser/doc-html/hglegal.htm14
-rw-r--r--examples/org.eclipse.swt.examples.browser/doc-html/ngibmcpy.gifbin1101 -> 0 bytes
-rw-r--r--examples/org.eclipse.swt.examples.browser/doc-html/swt_browser_ex.html33
-rw-r--r--examples/org.eclipse.swt.examples.browser/icons/browser_example.gifbin380 -> 0 bytes
-rw-r--r--examples/org.eclipse.swt.examples.browser/plugin.properties26
-rw-r--r--examples/org.eclipse.swt.examples.browser/plugin.xml61
-rw-r--r--examples/org.eclipse.swt.examples.browser/src/import.properties14
-rw-r--r--examples/org.eclipse.swt.examples.browser/src/org/eclipse/swt/examples/browserexample/BrowserPlugin.java26
-rw-r--r--examples/org.eclipse.swt.examples.browser/src/org/eclipse/swt/examples/browserexample/BrowserView.java53
-rwxr-xr-xexamples/org.eclipse.swt.examples.controls/.classpath7
-rwxr-xr-xexamples/org.eclipse.swt.examples.controls/.cvsignore1
-rw-r--r--examples/org.eclipse.swt.examples.controls/.project28
-rw-r--r--examples/org.eclipse.swt.examples.controls/about.html30
-rwxr-xr-xexamples/org.eclipse.swt.examples.controls/build.properties20
-rwxr-xr-xexamples/org.eclipse.swt.examples.controls/doc-html/hglegal.htm14
-rwxr-xr-xexamples/org.eclipse.swt.examples.controls/doc-html/ngibmcpy.gifbin1101 -> 0 bytes
-rwxr-xr-xexamples/org.eclipse.swt.examples.controls/doc-html/swt_controls_ex.html33
-rw-r--r--examples/org.eclipse.swt.examples.controls/doc-html/swt_customcontrols_ex.html33
-rwxr-xr-xexamples/org.eclipse.swt.examples.controls/icons/controls_example.gifbin111 -> 0 bytes
-rwxr-xr-xexamples/org.eclipse.swt.examples.controls/plugin.properties34
-rwxr-xr-xexamples/org.eclipse.swt.examples.controls/plugin.xml79
-rw-r--r--examples/org.eclipse.swt.examples.controls/src/import.properties14
-rwxr-xr-xexamples/org.eclipse.swt.examples.controls/src/org/eclipse/swt/examples/controls/ControlPlugin.java26
-rwxr-xr-xexamples/org.eclipse.swt.examples.controls/src/org/eclipse/swt/examples/controls/ControlView.java55
-rw-r--r--examples/org.eclipse.swt.examples.controls/src/org/eclipse/swt/examples/controls/CustomControlView.java35
-rwxr-xr-xexamples/org.eclipse.swt.examples.launcher/.classpath7
-rwxr-xr-xexamples/org.eclipse.swt.examples.launcher/.cvsignore1
-rw-r--r--examples/org.eclipse.swt.examples.launcher/.project28
-rw-r--r--examples/org.eclipse.swt.examples.launcher/about.html30
-rwxr-xr-xexamples/org.eclipse.swt.examples.launcher/build.properties22
-rwxr-xr-xexamples/org.eclipse.swt.examples.launcher/doc-html/hglegal.htm14
-rwxr-xr-xexamples/org.eclipse.swt.examples.launcher/doc-html/ngibmcpy.gifbin1101 -> 0 bytes
-rwxr-xr-xexamples/org.eclipse.swt.examples.launcher/doc-html/swt_launcher_ex.html44
-rwxr-xr-xexamples/org.eclipse.swt.examples.launcher/doc/org.eclipse.swt.examples.launcher.launchItems.html60
-rwxr-xr-xexamples/org.eclipse.swt.examples.launcher/icons/closedFolder.gifbin160 -> 0 bytes
-rwxr-xr-xexamples/org.eclipse.swt.examples.launcher/icons/generic_example.gifbin158 -> 0 bytes
-rwxr-xr-xexamples/org.eclipse.swt.examples.launcher/icons/launcher_example.gifbin168 -> 0 bytes
-rwxr-xr-xexamples/org.eclipse.swt.examples.launcher/icons/openFolder.gifbin152 -> 0 bytes
-rwxr-xr-xexamples/org.eclipse.swt.examples.launcher/plugin.properties49
-rwxr-xr-xexamples/org.eclipse.swt.examples.launcher/plugin.xml80
-rw-r--r--examples/org.eclipse.swt.examples.launcher/schema/org.eclipse.swt.examples.launcher.launchItems.exsd210
-rw-r--r--examples/org.eclipse.swt.examples.launcher/src/import.properties14
-rwxr-xr-xexamples/org.eclipse.swt.examples.launcher/src/org/eclipse/swt/examples/launcher/ItemDescriptor.java145
-rwxr-xr-xexamples/org.eclipse.swt.examples.launcher/src/org/eclipse/swt/examples/launcher/ItemTreeNode.java79
-rwxr-xr-xexamples/org.eclipse.swt.examples.launcher/src/org/eclipse/swt/examples/launcher/LauncherPlugin.java396
-rwxr-xr-xexamples/org.eclipse.swt.examples.launcher/src/org/eclipse/swt/examples/launcher/LauncherView.java233
-rwxr-xr-xexamples/org.eclipse.swt.examples.launcher/src/org/eclipse/swt/examples/launcher/SplitLayout.java139
-rw-r--r--examples/org.eclipse.swt.examples.layouts/.classpath7
-rw-r--r--examples/org.eclipse.swt.examples.layouts/.cvsignore1
-rw-r--r--examples/org.eclipse.swt.examples.layouts/.project28
-rw-r--r--examples/org.eclipse.swt.examples.layouts/about.html30
-rw-r--r--examples/org.eclipse.swt.examples.layouts/build.properties20
-rw-r--r--examples/org.eclipse.swt.examples.layouts/doc-html/hglegal.htm14
-rw-r--r--examples/org.eclipse.swt.examples.layouts/doc-html/ngibmcpy.gifbin1101 -> 0 bytes
-rw-r--r--examples/org.eclipse.swt.examples.layouts/doc-html/swt_layout_ex.html35
-rw-r--r--examples/org.eclipse.swt.examples.layouts/icons/layouts_example.gifbin217 -> 0 bytes
-rw-r--r--examples/org.eclipse.swt.examples.layouts/plugin.properties28
-rw-r--r--examples/org.eclipse.swt.examples.layouts/plugin.xml62
-rw-r--r--examples/org.eclipse.swt.examples.layouts/src/import.properties14
-rw-r--r--examples/org.eclipse.swt.examples.layouts/src/org/eclipse/swt/examples/layouts/LayoutPlugin.java26
-rw-r--r--examples/org.eclipse.swt.examples.layouts/src/org/eclipse/swt/examples/layouts/LayoutView.java55
-rwxr-xr-xexamples/org.eclipse.swt.examples.ole.win32/.classpath7
-rwxr-xr-xexamples/org.eclipse.swt.examples.ole.win32/.cvsignore1
-rw-r--r--examples/org.eclipse.swt.examples.ole.win32/.project28
-rw-r--r--examples/org.eclipse.swt.examples.ole.win32/about.html30
-rwxr-xr-xexamples/org.eclipse.swt.examples.ole.win32/build.properties20
-rwxr-xr-xexamples/org.eclipse.swt.examples.ole.win32/doc-html/hglegal.htm14
-rwxr-xr-xexamples/org.eclipse.swt.examples.ole.win32/doc-html/ngibmcpy.gifbin1101 -> 0 bytes
-rwxr-xr-xexamples/org.eclipse.swt.examples.ole.win32/doc-html/swt_ole_ex.html37
-rwxr-xr-xexamples/org.eclipse.swt.examples.ole.win32/icons/backward_nav.gifbin881 -> 0 bytes
-rwxr-xr-xexamples/org.eclipse.swt.examples.ole.win32/icons/forward_nav.gifbin883 -> 0 bytes
-rwxr-xr-xexamples/org.eclipse.swt.examples.ole.win32/icons/home_nav.gifbin928 -> 0 bytes
-rwxr-xr-xexamples/org.eclipse.swt.examples.ole.win32/icons/refresh_nav.gifbin160 -> 0 bytes
-rwxr-xr-xexamples/org.eclipse.swt.examples.ole.win32/icons/search_nav.gifbin245 -> 0 bytes
-rwxr-xr-xexamples/org.eclipse.swt.examples.ole.win32/icons/stop_nav.gifbin174 -> 0 bytes
-rwxr-xr-xexamples/org.eclipse.swt.examples.ole.win32/icons/webbrowser_example.gifbin380 -> 0 bytes
-rwxr-xr-xexamples/org.eclipse.swt.examples.ole.win32/plugin.properties60
-rwxr-xr-xexamples/org.eclipse.swt.examples.ole.win32/plugin.xml61
-rw-r--r--examples/org.eclipse.swt.examples.ole.win32/src/import.properties14
-rwxr-xr-xexamples/org.eclipse.swt.examples.ole.win32/src/org/eclipse/swt/examples/ole/win32/OleBrowserView.java370
-rwxr-xr-xexamples/org.eclipse.swt.examples.ole.win32/src/org/eclipse/swt/examples/ole/win32/OlePlugin.java189
-rwxr-xr-xexamples/org.eclipse.swt.examples.ole.win32/src/org/eclipse/swt/examples/ole/win32/OleWebBrowser.java228
-rwxr-xr-xexamples/org.eclipse.swt.examples.paint/.classpath7
-rwxr-xr-xexamples/org.eclipse.swt.examples.paint/.cvsignore1
-rw-r--r--examples/org.eclipse.swt.examples.paint/.project28
-rw-r--r--examples/org.eclipse.swt.examples.paint/about.html30
-rwxr-xr-xexamples/org.eclipse.swt.examples.paint/build.properties20
-rwxr-xr-xexamples/org.eclipse.swt.examples.paint/doc-html/hglegal.htm14
-rwxr-xr-xexamples/org.eclipse.swt.examples.paint/doc-html/ngibmcpy.gifbin1101 -> 0 bytes
-rwxr-xr-xexamples/org.eclipse.swt.examples.paint/doc-html/swt_paint_ex.html38
-rwxr-xr-xexamples/org.eclipse.swt.examples.paint/icons/fill_none.gifbin865 -> 0 bytes
-rwxr-xr-xexamples/org.eclipse.swt.examples.paint/icons/fill_outline.gifbin872 -> 0 bytes
-rwxr-xr-xexamples/org.eclipse.swt.examples.paint/icons/fill_solid.gifbin861 -> 0 bytes
-rw-r--r--examples/org.eclipse.swt.examples.paint/icons/linestyle_dash.gifbin880 -> 0 bytes
-rw-r--r--examples/org.eclipse.swt.examples.paint/icons/linestyle_dashdot.gifbin880 -> 0 bytes
-rw-r--r--examples/org.eclipse.swt.examples.paint/icons/linestyle_dot.gifbin879 -> 0 bytes
-rw-r--r--examples/org.eclipse.swt.examples.paint/icons/linestyle_solid.gifbin871 -> 0 bytes
-rwxr-xr-xexamples/org.eclipse.swt.examples.paint/icons/options_font.gifbin868 -> 0 bytes
-rwxr-xr-xexamples/org.eclipse.swt.examples.paint/icons/paint_example.gifbin932 -> 0 bytes
-rwxr-xr-xexamples/org.eclipse.swt.examples.paint/icons/tool_airbrush.gifbin890 -> 0 bytes
-rwxr-xr-xexamples/org.eclipse.swt.examples.paint/icons/tool_ellipse.gifbin872 -> 0 bytes
-rwxr-xr-xexamples/org.eclipse.swt.examples.paint/icons/tool_line.gifbin860 -> 0 bytes
-rwxr-xr-xexamples/org.eclipse.swt.examples.paint/icons/tool_pencil.gifbin874 -> 0 bytes
-rwxr-xr-xexamples/org.eclipse.swt.examples.paint/icons/tool_polyline.gifbin879 -> 0 bytes
-rwxr-xr-xexamples/org.eclipse.swt.examples.paint/icons/tool_rectangle.gifbin865 -> 0 bytes
-rwxr-xr-xexamples/org.eclipse.swt.examples.paint/icons/tool_roundedrectangle.gifbin871 -> 0 bytes
-rwxr-xr-xexamples/org.eclipse.swt.examples.paint/icons/tool_text.gifbin875 -> 0 bytes
-rwxr-xr-xexamples/org.eclipse.swt.examples.paint/plugin.properties134
-rwxr-xr-xexamples/org.eclipse.swt.examples.paint/plugin.xml61
-rw-r--r--examples/org.eclipse.swt.examples.paint/src/import.properties14
-rwxr-xr-xexamples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/AirbrushTool.java79
-rwxr-xr-xexamples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/BasicPaintSession.java37
-rwxr-xr-xexamples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/ContainerFigure.java93
-rwxr-xr-xexamples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/ContinuousPaintSession.java234
-rwxr-xr-xexamples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/DragPaintSession.java136
-rwxr-xr-xexamples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/EllipseFigure.java52
-rwxr-xr-xexamples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/EllipseTool.java63
-rwxr-xr-xexamples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/Figure.java38
-rw-r--r--examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/FigureDrawContext.java40
-rwxr-xr-xexamples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/LineFigure.java52
-rwxr-xr-xexamples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/LineTool.java58
-rwxr-xr-xexamples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/PaintPlugin.java89
-rwxr-xr-xexamples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/PaintSession.java58
-rwxr-xr-xexamples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/PaintSurface.java523
-rwxr-xr-xexamples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/PaintTool.java20
-rwxr-xr-xexamples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/PaintView.java500
-rwxr-xr-xexamples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/PencilTool.java58
-rw-r--r--examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/PointFigure.java40
-rwxr-xr-xexamples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/PolyLineTool.java75
-rwxr-xr-xexamples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/RectangleFigure.java51
-rwxr-xr-xexamples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/RectangleTool.java71
-rwxr-xr-xexamples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/RoundedRectangleFigure.java53
-rwxr-xr-xexamples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/RoundedRectangleTool.java64
-rwxr-xr-xexamples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/SegmentedPaintSession.java159
-rwxr-xr-xexamples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/SolidEllipseFigure.java44
-rwxr-xr-xexamples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/SolidPolygonFigure.java59
-rwxr-xr-xexamples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/SolidRectangleFigure.java43
-rwxr-xr-xexamples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/SolidRoundedRectangleFigure.java45
-rwxr-xr-xexamples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/TextFigure.java49
-rwxr-xr-xexamples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/TextTool.java127
-rwxr-xr-xexamples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/ToolSettings.java62
-rwxr-xr-xexamples/org.eclipse.swt.examples/.classpath7
-rwxr-xr-xexamples/org.eclipse.swt.examples/.cvsignore1
-rw-r--r--examples/org.eclipse.swt.examples/.project28
-rw-r--r--examples/org.eclipse.swt.examples/about.html30
-rwxr-xr-xexamples/org.eclipse.swt.examples/build.properties19
-rwxr-xr-xexamples/org.eclipse.swt.examples/doc-html/hglegal.htm14
-rwxr-xr-xexamples/org.eclipse.swt.examples/doc-html/ngibmcpy.gifbin1101 -> 0 bytes
-rwxr-xr-xexamples/org.eclipse.swt.examples/doc-html/swt_addressbook_ex.html32
-rw-r--r--examples/org.eclipse.swt.examples/doc-html/swt_clipboard_ex.html31
-rwxr-xr-xexamples/org.eclipse.swt.examples/doc-html/swt_fileviewer_ex.html33
-rwxr-xr-xexamples/org.eclipse.swt.examples/doc-html/swt_helloworld_ex.html61
-rwxr-xr-xexamples/org.eclipse.swt.examples/doc-html/swt_hoverhelp_ex.html36
-rwxr-xr-xexamples/org.eclipse.swt.examples/doc-html/swt_imageanalyzer_ex.html56
-rwxr-xr-xexamples/org.eclipse.swt.examples/doc-html/swt_javaviewer_ex.html33
-rwxr-xr-xexamples/org.eclipse.swt.examples/doc-html/swt_manual_setup.html118
-rwxr-xr-xexamples/org.eclipse.swt.examples/doc-html/swt_texteditor_ex.html34
-rwxr-xr-xexamples/org.eclipse.swt.examples/plugin.properties133
-rwxr-xr-xexamples/org.eclipse.swt.examples/plugin.xml153
-rw-r--r--examples/org.eclipse.swt.examples/src/examples_addressbook.properties69
-rw-r--r--examples/org.eclipse.swt.examples/src/examples_browser.properties20
-rw-r--r--examples/org.eclipse.swt.examples/src/examples_control.properties181
-rw-r--r--examples/org.eclipse.swt.examples/src/examples_fileviewer.properties69
-rw-r--r--examples/org.eclipse.swt.examples/src/examples_helloworld.properties11
-rw-r--r--examples/org.eclipse.swt.examples/src/examples_hoverhelp.properties26
-rw-r--r--examples/org.eclipse.swt.examples/src/examples_images.properties111
-rw-r--r--examples/org.eclipse.swt.examples/src/examples_javaviewer.properties17
-rw-r--r--examples/org.eclipse.swt.examples/src/examples_layout.properties51
-rw-r--r--examples/org.eclipse.swt.examples/src/examples_texteditor.properties18
-rw-r--r--examples/org.eclipse.swt.examples/src/import.properties26
-rwxr-xr-xexamples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/addressbook/AddressBook.java879
-rwxr-xr-xexamples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/addressbook/DataEntryDialog.java163
-rwxr-xr-xexamples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/addressbook/FindListener.java18
-rwxr-xr-xexamples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/addressbook/SearchDialog.java202
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/browserexample/BrowserExample.java358
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/browserexample/document.gifbin380 -> 0 bytes
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/browserexample/eclipse01.bmpbin6966 -> 0 bytes
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/browserexample/eclipse02.bmpbin6966 -> 0 bytes
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/browserexample/eclipse03.bmpbin6966 -> 0 bytes
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/browserexample/eclipse04.bmpbin6966 -> 0 bytes
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/browserexample/eclipse05.bmpbin6966 -> 0 bytes
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/browserexample/eclipse06.bmpbin6966 -> 0 bytes
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/browserexample/eclipse07.bmpbin6966 -> 0 bytes
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/browserexample/eclipse08.bmpbin6966 -> 0 bytes
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/browserexample/eclipse09.bmpbin6966 -> 0 bytes
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/browserexample/eclipse10.bmpbin6966 -> 0 bytes
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/browserexample/eclipse11.bmpbin6966 -> 0 bytes
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/browserexample/eclipse12.bmpbin6966 -> 0 bytes
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/clipboard/ClipboardExample.java370
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/clipboard/MyType.java16
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/clipboard/MyTypeTransfer.java92
-rwxr-xr-xexamples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/AlignableTab.java89
-rwxr-xr-xexamples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/ButtonTab.java205
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/CComboTab.java115
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/CLabelTab.java141
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/CTabFolderTab.java302
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/CanvasTab.java304
-rwxr-xr-xexamples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/ComboTab.java140
-rwxr-xr-xexamples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/ControlExample.java208
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/CoolBarTab.java449
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/CustomControlExample.java59
-rwxr-xr-xexamples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/DialogTab.java474
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/GroupTab.java159
-rwxr-xr-xexamples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/LabelTab.java190
-rwxr-xr-xexamples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/ListTab.java85
-rwxr-xr-xexamples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/ProgressBarTab.java145
-rwxr-xr-xexamples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/RangeTab.java183
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/SashFormTab.java100
-rwxr-xr-xexamples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/SashTab.java184
-rwxr-xr-xexamples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/ScrollableTab.java63
-rwxr-xr-xexamples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/ShellTab.java295
-rwxr-xr-xexamples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/SliderTab.java253
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/StyledTextTab.java287
-rwxr-xr-xexamples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/Tab.java938
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/TabFolderTab.java131
-rwxr-xr-xexamples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/TableTab.java379
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/TableTreeTab.java379
-rwxr-xr-xexamples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/TextTab.java138
-rwxr-xr-xexamples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/ToolBarTab.java282
-rwxr-xr-xexamples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/TreeTab.java305
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/bold.bmpbin110 -> 0 bytes
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/bold_mask.bmpbin110 -> 0 bytes
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/closedFolder.gifbin906 -> 0 bytes
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/italic.bmpbin110 -> 0 bytes
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/italic_mask.bmpbin110 -> 0 bytes
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/openFolder.gifbin184 -> 0 bytes
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/red.bmpbin214 -> 0 bytes
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/red_mask.bmpbin110 -> 0 bytes
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/target.gifbin917 -> 0 bytes
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/yellow.bmpbin214 -> 0 bytes
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/yellow_mask.bmpbin110 -> 0 bytes
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/dnd/DNDExample.java1174
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/dnd/ImageTransfer.java76
-rwxr-xr-xexamples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/FileViewer.java1717
-rwxr-xr-xexamples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/IconCache.java156
-rwxr-xr-xexamples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/cmd_Copy.gifbin167 -> 0 bytes
-rwxr-xr-xexamples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/cmd_Cut.gifbin152 -> 0 bytes
-rwxr-xr-xexamples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/cmd_Delete.gifbin143 -> 0 bytes
-rwxr-xr-xexamples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/cmd_Parent.gifbin132 -> 0 bytes
-rwxr-xr-xexamples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/cmd_Paste.gifbin245 -> 0 bytes
-rwxr-xr-xexamples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/cmd_Print.gifbin227 -> 0 bytes
-rwxr-xr-xexamples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/cmd_Refresh.gifbin182 -> 0 bytes
-rwxr-xr-xexamples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/cmd_Rename.gifbin163 -> 0 bytes
-rwxr-xr-xexamples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/cmd_Search.gifbin153 -> 0 bytes
-rwxr-xr-xexamples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/generic_example.gifbin158 -> 0 bytes
-rwxr-xr-xexamples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/icon_ClosedDrive.gifbin217 -> 0 bytes
-rwxr-xr-xexamples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/icon_ClosedFolder.gifbin160 -> 0 bytes
-rwxr-xr-xexamples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/icon_File.gifbin152 -> 0 bytes
-rwxr-xr-xexamples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/icon_OpenDrive.gifbin231 -> 0 bytes
-rwxr-xr-xexamples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/icon_OpenFolder.gifbin152 -> 0 bytes
-rwxr-xr-xexamples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/helloworld/HelloWorld1.java36
-rwxr-xr-xexamples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/helloworld/HelloWorld2.java42
-rwxr-xr-xexamples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/helloworld/HelloWorld3.java49
-rwxr-xr-xexamples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/helloworld/HelloWorld4.java45
-rwxr-xr-xexamples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/helloworld/HelloWorld5.java56
-rwxr-xr-xexamples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/hoverhelp/HoverHelp.java350
-rwxr-xr-xexamples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/hoverhelp/information.gifbin92 -> 0 bytes
-rwxr-xr-xexamples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/hoverhelp/warning.gifbin152 -> 0 bytes
-rwxr-xr-xexamples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/imageanalyzer/ImageAnalyzer.java2108
-rwxr-xr-xexamples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/javaviewer/JavaLineStyler.java378
-rwxr-xr-xexamples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/javaviewer/JavaViewer.java184
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/layoutexample/FillLayoutTab.java179
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/layoutexample/FormLayoutTab.java762
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/layoutexample/GridLayoutTab.java590
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/layoutexample/LayoutExample.java114
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/layoutexample/RowLayoutTab.java413
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/layoutexample/Tab.java646
-rwxr-xr-xexamples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/Images.java58
-rwxr-xr-xexamples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/TextEditor.java348
-rwxr-xr-xexamples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/blue.bmpbin334 -> 0 bytes
-rwxr-xr-xexamples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/blue_mask.bmpbin134 -> 0 bytes
-rwxr-xr-xexamples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/bold.bmpbin134 -> 0 bytes
-rwxr-xr-xexamples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/bold_mask.bmpbin134 -> 0 bytes
-rwxr-xr-xexamples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/erase.bmpbin334 -> 0 bytes
-rwxr-xr-xexamples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/erase_mask.bmpbin134 -> 0 bytes
-rwxr-xr-xexamples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/green.bmpbin334 -> 0 bytes
-rwxr-xr-xexamples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/green_mask.bmpbin134 -> 0 bytes
-rwxr-xr-xexamples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/red.bmpbin334 -> 0 bytes
-rwxr-xr-xexamples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/red_mask.bmpbin134 -> 0 bytes
-rw-r--r--examples/org.eclipse.swt.opengl.examples/.classpath8
-rw-r--r--examples/org.eclipse.swt.opengl.examples/.project19
-rw-r--r--examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/AntialiasingTab.java152
-rw-r--r--examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/AreaTab.java434
-rw-r--r--examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/BezierTab.java211
-rw-r--r--examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/BitmapTextTab.java203
-rw-r--r--examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/ColorSelectionGroup.java166
-rw-r--r--examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/FogTab.java254
-rw-r--r--examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/GradientTab.java233
-rw-r--r--examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/IColorSelectionListener.java18
-rw-r--r--examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/LightTab.java354
-rw-r--r--examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/NurbTab.java294
-rw-r--r--examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/ObjectsTab.java376
-rw-r--r--examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/OpenGLExample.java116
-rw-r--r--examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/OpenGLTab.java243
-rw-r--r--examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/OutlineTextTab.java251
-rw-r--r--examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/ReflectionTab.java556
-rw-r--r--examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/SelectionTab.java57
-rw-r--r--examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/StencilTab.java230
-rw-r--r--examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/TextureTab.java176
-rw-r--r--examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/TransparencyTab.java197
-rw-r--r--examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/images/Ball.jpgbin2648 -> 0 bytes
-rw-r--r--examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/images/Box.bmpbin5174 -> 0 bytes
-rw-r--r--examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/images/Floor.jpgbin3605 -> 0 bytes
-rw-r--r--examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/images/splash.bmpbin495056 -> 0 bytes
-rw-r--r--examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/images/untitled.jpgbin11318 -> 0 bytes
-rw-r--r--examples/org.eclipse.swt.snippets/.classpath7
-rw-r--r--examples/org.eclipse.swt.snippets/.cvsignore1
-rw-r--r--examples/org.eclipse.swt.snippets/.project29
-rw-r--r--examples/org.eclipse.swt.snippets/about.html30
-rw-r--r--examples/org.eclipse.swt.snippets/build.properties11
-rw-r--r--examples/org.eclipse.swt.snippets/plugin.properties12
-rw-r--r--examples/org.eclipse.swt.snippets/plugin.xml12
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet1.java32
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet10.java15
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet100.java46
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet101.java44
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet102.java46
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet103.java71
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet104.java80
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet105.java30
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet106.java65
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet107.java77
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet108.java45
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet109.java53
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet11.java40
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet110.java76
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet111.java109
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet112.java58
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet113.java46
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet114.java46
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet115.java68
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet116.java61
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet117.java63
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet118.java55
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet119.java123
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet12.java40
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet120.java40
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet121.java38
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet122.java79
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet123.java189
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet124.java100
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet125.java107
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet126.java62
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet127.java50
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet128.java130
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet129.java76
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet13.java37
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet130.java84
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet131.java51
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet132.java65
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet133.java323
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet134.java95
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet135.java274
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet136.java44
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet137.java45
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet138.java63
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet139.java137
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet14.java49
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet140.java105
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet141.java157
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet142.java68
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet143.java71
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet144.java60
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet145.java64
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet146.java70
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet147.java61
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet148.java55
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet149.java55
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet15.java52
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet150.java76
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet151.java81
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet152.java95
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet153.java58
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet154.java73
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet155.java54
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet156.java197
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet16.java48
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet17.java50
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet18.java39
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet19.java48
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet2.java92
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet20.java44
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet21.java89
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet22.java37
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet23.java43
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet24.java50
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet25.java143
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet26.java38
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet27.java34
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet28.java34
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet29.java49
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet3.java68
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet30.java31
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet31.java65
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet32.java50
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet33.java36
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet34.java46
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet35.java41
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet36.java48
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet37.java38
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet38.java57
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet39.java15
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet4.java53
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet40.java44
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet41.java43
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet42.java28
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet43.java55
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet44.java43
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet45.java37
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet46.java69
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet47.java70
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet48.java122
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet49.java48
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet5.java60
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet50.java38
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet51.java41
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet52.java41
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet53.java49
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet54.java41
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet55.java43
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet56.java50
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet57.java39
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet58.java53
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet59.java53
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet6.java59
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet60.java43
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet61.java77
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet62.java53
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet63.java57
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet64.java56
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet65.java81
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet66.java53
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet67.java55
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet68.java60
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet69.java53
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet7.java63
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet70.java67
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet71.java58
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet72.java39
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet73.java59
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet74.java35
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet75.java98
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet76.java43
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet77.java81
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet78.java75
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet79.java102
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet8.java73
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet80.java69
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet81.java149
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet82.java60
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet83.java153
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet84.java53
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet85.java53
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet86.java37
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet87.java43
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet88.java84
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet89.java50
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet9.java77
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet90.java51
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet91.java101
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet92.java77
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet93.java42
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet94.java80
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet95.java77
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet96.java131
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet97.java55
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet98.java66
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet99.java43
-rw-r--r--tests/org.eclipse.swt.tests/.classpath8
-rw-r--r--tests/org.eclipse.swt.tests/.cvsignore1
-rw-r--r--tests/org.eclipse.swt.tests/.project27
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/AllBrowserTests.java42
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/AllGraphicsTests.java49
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/AllTests.java229
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/AllWidgetTests.java71
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/EmulatedWidgetsTests.java40
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/StyledTextContentSpec.java1026
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/SwtJunit.java37
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/SwtTestCase.java222
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_SWT.java159
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_SWTError.java128
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_SWTException.java129
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_accessibility_ACC.java61
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_accessibility_Accessible.java198
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_accessibility_AccessibleAdapter.java85
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_accessibility_AccessibleControlAdapter.java127
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_accessibility_AccessibleControlEvent.java82
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_accessibility_AccessibleControlListener.java121
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_accessibility_AccessibleEvent.java82
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_accessibility_AccessibleListener.java79
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_accessibility_AccessibleTextAdapter.java73
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_accessibility_AccessibleTextEvent.java82
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_accessibility_AccessibleTextListener.java67
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_awt_SWT_AWT.java73
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_browser_Browser.java456
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_browser_CloseWindowListener.java71
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_browser_LocationAdapter.java82
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_browser_LocationListener.java79
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_browser_OpenWindowListener.java71
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_browser_ProgressAdapter.java80
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_browser_ProgressListener.java79
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_browser_StatusTextListener.java71
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_browser_TitleListener.java71
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_browser_VisibilityWindowAdapter.java80
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_browser_VisibilityWindowListener.java79
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_AnimatedProgress.java87
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_BidiSegmentEvent.java57
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_BidiSegmentListener.java190
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_BusyIndicator.java65
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_CCombo.java335
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_CLabel.java141
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_CTabFolder.java244
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_CTabFolderAdapter.java65
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_CTabFolderEvent.java57
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_CTabFolderListener.java60
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_CTabItem.java145
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_ControlEditor.java83
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_ExtendedModifyEvent.java63
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_ExtendedModifyListener.java325
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_LineBackgroundEvent.java63
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_LineBackgroundListener.java75
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_LineStyleEvent.java63
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_LineStyleListener.java75
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_PopupList.java113
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_ST.java59
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_SashForm.java131
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_ScrolledComposite.java160
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_StackLayout.java63
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_StyleRange.java190
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_StyledText.java4355
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_StyledTextContent.java178
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_TableCursor.java94
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_TableEditor.java99
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_TableTree.java334
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_TableTreeEditor.java100
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_TableTreeItem.java232
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_TextChangeListener.java566
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_TextChangedEvent.java63
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_TextChangingEvent.java63
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_TreeEditor.java87
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_VerifyKeyListener.java85
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_ViewForm.java154
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_dnd_ByteArrayTransfer.java76
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_dnd_Clipboard.java96
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_dnd_DND.java71
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_dnd_DragSource.java93
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_dnd_DragSourceAdapter.java78
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_dnd_DragSourceEvent.java63
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_dnd_DragSourceListener.java72
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_dnd_DropTarget.java99
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_dnd_DropTargetAdapter.java96
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_dnd_DropTargetEvent.java63
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_dnd_DropTargetListener.java90
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_dnd_FileTransfer.java76
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_dnd_RTFTransfer.java76
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_dnd_TextTransfer.java75
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_dnd_Transfer.java78
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_dnd_TransferData.java59
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_ArmEvent.java70
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_ArmListener.java60
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_ControlAdapter.java72
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_ControlEvent.java70
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_ControlListener.java66
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_DisposeEvent.java70
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_DisposeListener.java60
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_FocusAdapter.java72
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_FocusEvent.java70
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_FocusListener.java66
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_HelpEvent.java70
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_HelpListener.java60
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_KeyAdapter.java72
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_KeyEvent.java70
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_KeyListener.java66
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_MenuAdapter.java72
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_MenuEvent.java70
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_MenuListener.java66
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_ModifyEvent.java70
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_ModifyListener.java60
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_MouseAdapter.java78
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_MouseEvent.java70
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_MouseListener.java72
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_MouseMoveListener.java60
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_MouseTrackAdapter.java77
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_MouseTrackListener.java72
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_PaintEvent.java70
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_PaintListener.java60
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_SelectionAdapter.java71
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_SelectionEvent.java70
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_SelectionListener.java65
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_ShellAdapter.java90
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_ShellEvent.java70
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_ShellListener.java84
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_TraverseEvent.java70
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_TraverseListener.java60
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_TreeAdapter.java72
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_TreeEvent.java70
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_TreeListener.java66
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_TypedEvent.java90
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_VerifyEvent.java70
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_VerifyListener.java60
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_Color.java288
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_Cursor.java248
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_Device.java158
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_DeviceData.java62
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_Drawable.java65
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_Font.java397
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_FontData.java271
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_FontMetrics.java124
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_GC.java812
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_GCData.java59
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_Image.java759
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_ImageData.java1220
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_ImageLoader.java245
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_ImageLoaderEvent.java75
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_ImageLoaderListener.java60
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_PaletteData.java163
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_Point.java103
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_RGB.java164
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_Rectangle.java352
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_Region.java959
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_layout_FillLayout.java69
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_layout_FormAttachment.java113
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_layout_FormData.java67
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_layout_FormLayout.java65
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_layout_GridData.java91
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_layout_GridLayout.java69
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_layout_RowData.java71
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_layout_RowLayout.java69
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_ole_win32_OLE.java89
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_ole_win32_OleAutomation.java187
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_ole_win32_OleClientSite.java143
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_ole_win32_OleControlSite.java155
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_ole_win32_OleEvent.java61
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_ole_win32_OleFrame.java101
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_ole_win32_OleFunctionDescription.java61
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_ole_win32_OleListener.java61
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_ole_win32_OleParameterDescription.java61
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_ole_win32_OlePropertyDescription.java61
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_ole_win32_Variant.java205
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_printing_PrintDialog.java143
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_printing_Printer.java252
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_printing_PrinterData.java77
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_program_Program.java238
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Button.java304
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Canvas.java137
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Caret.java251
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_ColorDialog.java115
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Combo.java908
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Composite.java152
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Control.java874
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_CoolBar.java138
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_CoolItem.java351
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Decorations.java301
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Dialog.java117
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_DirectoryDialog.java129
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Display.java1263
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Event.java81
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_FileDialog.java187
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_FontDialog.java140
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Group.java108
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Item.java149
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Label.java165
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Layout.java72
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_List.java2467
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Listener.java59
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Menu.java382
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_MenuItem.java334
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_MessageBox.java134
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Monitor.java116
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_ProgressBar.java610
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Sash.java101
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Scale.java646
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_ScrollBar.java922
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Scrollable.java96
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Shell.java523
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Slider.java909
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Synchronizer.java62
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_TabFolder.java383
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_TabItem.java172
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Table.java1613
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_TableColumn.java261
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_TableItem.java591
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Text.java1324
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_ToolBar.java196
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_ToolItem.java215
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Tracker.java128
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Tree.java568
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_TreeItem.java300
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_TypedListener.java71
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Widget.java218
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/browser/Browser1.java211
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/browser/Browser2.java221
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/browser/Browser3.java166
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/browser/Browser4.java189
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/browser/Browser5.java162
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/browser/Browser6.java139
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/browser/Browser7.java138
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/browser/Test_BrowserSuite.java127
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/corrupt.bmpbin1441 -> 0 bytes
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/corrupt.gifbin898 -> 0 bytes
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/corrupt.jpgbin783 -> 0 bytes
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/corrupt.pngbin922 -> 0 bytes
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/corruptBadBitDepth.pngbin145 -> 0 bytes
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/empty.txt0
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/folder.bmpbin1438 -> 0 bytes
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/folder.gifbin898 -> 0 bytes
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/folder.jpgbin783 -> 0 bytes
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/folder.pngbin921 -> 0 bytes
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/folderOpen.bmpbin1438 -> 0 bytes
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/folderOpen.gifbin905 -> 0 bytes
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/folderOpen.jpgbin844 -> 0 bytes
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/folderOpen.pngbin937 -> 0 bytes
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/interlaced_target.pngbin619 -> 0 bytes
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/junitGen.java749
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/PerformanceTests.java224
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/SwtPerformanceTestCase.java95
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/Test_org_eclipse_swt_graphics_Color.java276
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/Test_org_eclipse_swt_graphics_Cursor.java226
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/Test_org_eclipse_swt_graphics_DeviceData.java63
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/Test_org_eclipse_swt_graphics_Font.java331
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/Test_org_eclipse_swt_graphics_FontData.java265
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/Test_org_eclipse_swt_graphics_FontMetrics.java199
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/Test_org_eclipse_swt_graphics_GC.java1489
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/Test_org_eclipse_swt_graphics_Image.java463
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/Test_org_eclipse_swt_graphics_ImageData.java448
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/Test_org_eclipse_swt_graphics_ImageLoader.java290
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/Test_org_eclipse_swt_graphics_ImageLoaderEvent.java66
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/Test_org_eclipse_swt_graphics_PaletteData.java127
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/Test_org_eclipse_swt_graphics_Point.java105
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/Test_org_eclipse_swt_graphics_RGB.java104
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/Test_org_eclipse_swt_graphics_Rectangle.java349
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/Test_org_eclipse_swt_graphics_Region.java602
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/target.bmpbin1654 -> 0 bytes
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/target.gifbin972 -> 0 bytes
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/target.jpgbin987 -> 0 bytes
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/target.pngbin980 -> 0 bytes
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/transparent.pngbin354 -> 0 bytes
-rw-r--r--tests/org.eclipse.swt.tests/about.html30
-rw-r--r--tests/org.eclipse.swt.tests/build.properties13
-rw-r--r--tests/org.eclipse.swt.tests/data/browser3.html6
-rw-r--r--tests/org.eclipse.swt.tests/data/browser4.html10
-rw-r--r--tests/org.eclipse.swt.tests/data/browser4a.html14
-rw-r--r--tests/org.eclipse.swt.tests/data/browser5.html48
-rw-r--r--tests/org.eclipse.swt.tests/data/browser6.html6
-rw-r--r--tests/org.eclipse.swt.tests/data/browser7.html18
-rw-r--r--tests/org.eclipse.swt.tests/data/corrupt.bmpbin1441 -> 0 bytes
-rw-r--r--tests/org.eclipse.swt.tests/data/corrupt.gifbin898 -> 0 bytes
-rw-r--r--tests/org.eclipse.swt.tests/data/corrupt.jpgbin783 -> 0 bytes
-rw-r--r--tests/org.eclipse.swt.tests/data/corrupt.pngbin922 -> 0 bytes
-rw-r--r--tests/org.eclipse.swt.tests/data/corruptBadBitDepth.pngbin145 -> 0 bytes
-rw-r--r--tests/org.eclipse.swt.tests/data/empty.txt0
-rw-r--r--tests/org.eclipse.swt.tests/data/folder.bmpbin1438 -> 0 bytes
-rw-r--r--tests/org.eclipse.swt.tests/data/folder.gifbin898 -> 0 bytes
-rw-r--r--tests/org.eclipse.swt.tests/data/folder.jpgbin783 -> 0 bytes
-rw-r--r--tests/org.eclipse.swt.tests/data/folder.pngbin921 -> 0 bytes
-rw-r--r--tests/org.eclipse.swt.tests/data/folderOpen.bmpbin1438 -> 0 bytes
-rw-r--r--tests/org.eclipse.swt.tests/data/folderOpen.gifbin905 -> 0 bytes
-rw-r--r--tests/org.eclipse.swt.tests/data/folderOpen.jpgbin844 -> 0 bytes
-rw-r--r--tests/org.eclipse.swt.tests/data/folderOpen.pngbin937 -> 0 bytes
-rw-r--r--tests/org.eclipse.swt.tests/data/target.bmpbin1654 -> 0 bytes
-rw-r--r--tests/org.eclipse.swt.tests/data/target.gifbin972 -> 0 bytes
-rw-r--r--tests/org.eclipse.swt.tests/data/target.jpgbin987 -> 0 bytes
-rw-r--r--tests/org.eclipse.swt.tests/data/target.pngbin980 -> 0 bytes
-rw-r--r--tests/org.eclipse.swt.tests/data/transparent.pngbin354 -> 0 bytes
-rw-r--r--tests/org.eclipse.swt.tests/plugin.properties12
-rw-r--r--tests/org.eclipse.swt.tests/plugin.xml22
-rw-r--r--tests/org.eclipse.swt.tests/test.xml75
898 files changed, 5 insertions, 131139 deletions
diff --git a/bundles/org.eclipse.swt.opengl/.classpath_gtk b/bundles/org.eclipse.swt.opengl/.classpath_gtk
deleted file mode 100644
index 4fda90ad8f..0000000000
--- a/bundles/org.eclipse.swt.opengl/.classpath_gtk
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry sourcepath="JRE_SRC" kind="var" path="JRE_LIB"/>
- <classpathentry kind="src" path="common"/>
- <classpathentry kind="src" path="gtk"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="/org.eclipse.swt"/>
- <classpathentry kind="output" path="bin"/>
-</classpath> \ No newline at end of file
diff --git a/bundles/org.eclipse.swt.opengl/.classpath_motif b/bundles/org.eclipse.swt.opengl/.classpath_motif
deleted file mode 100644
index 75b5fe1e19..0000000000
--- a/bundles/org.eclipse.swt.opengl/.classpath_motif
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry sourcepath="JRE_SRC" kind="var" path="JRE_LIB"/>
- <classpathentry kind="src" path="common"/>
- <classpathentry kind="src" path="motif"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="/org.eclipse.swt"/>
- <classpathentry kind="output" path="bin"/>
-</classpath> \ No newline at end of file
diff --git a/bundles/org.eclipse.swt.opengl/.classpath_win32 b/bundles/org.eclipse.swt.opengl/.classpath_win32
deleted file mode 100644
index 88fea254f1..0000000000
--- a/bundles/org.eclipse.swt.opengl/.classpath_win32
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry sourcepath="JRE_SRC" kind="var" path="JRE_LIB"/>
- <classpathentry kind="src" path="common"/>
- <classpathentry kind="src" path="win32"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="/org.eclipse.swt"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/bundles/org.eclipse.swt.opengl/.cvsignore b/bundles/org.eclipse.swt.opengl/.cvsignore
deleted file mode 100644
index 661113b158..0000000000
--- a/bundles/org.eclipse.swt.opengl/.cvsignore
+++ /dev/null
@@ -1,3 +0,0 @@
-bin
-.classpath
-ws
diff --git a/bundles/org.eclipse.swt.opengl/.project b/bundles/org.eclipse.swt.opengl/.project
deleted file mode 100644
index 577537ae64..0000000000
--- a/bundles/org.eclipse.swt.opengl/.project
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.swt.opengl</name>
- <comment></comment>
- <projects>
- <project>org.eclipse.swt</project>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.team.cvs.core.cvsnature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.swt.opengl/META-INF/MANIFEST.MF b/bundles/org.eclipse.swt.opengl/META-INF/MANIFEST.MF
deleted file mode 100644
index e12636f5ec..0000000000
--- a/bundles/org.eclipse.swt.opengl/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,9 +0,0 @@
-Manifest-Version: 1.0
-Bundle-Name: %pluginName
-Bundle-Vendor: %providerName
-Bundle-SymbolicName: org.eclipse.swt.opengl; singleton=true
-Bundle-Version: 3.1.0
-Bundle-ClassPath: $ws$/opengl.jar
-Bundle-Localization: plugin
-Provide-Package:
- org.eclipse.swt.opengl
diff --git a/bundles/org.eclipse.swt.opengl/about.html b/bundles/org.eclipse.swt.opengl/about.html
deleted file mode 100644
index 9db411aab9..0000000000
--- a/bundles/org.eclipse.swt.opengl/about.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<title>About</title>
-<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>20th June, 2002</p>
-<h3>License</h3>
-<p>Eclipse.org makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise indicated below, the Content is provided to you under the terms and conditions of the
-Common Public License Version 1.0 (&quot;CPL&quot;). A copy of the CPL is available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>.
-For purposes of the CPL, &quot;Program&quot; will mean the Content.</p>
-
-<h3>Contributions</h3>
-
-<p>If this Content is licensed to you under the terms and conditions of the CPL, any Contributions, as defined in the CPL, uploaded, submitted, or otherwise
-made available to Eclipse.org, members of Eclipse.org and/or the host of Eclipse.org web site, by you that relate to such
-Content are provided under the terms and conditions of the CPL and can be made available to others under the terms of the CPL.</p>
-
-<p>If this Content is licensed to you under license terms and conditions other than the CPL (&quot;Other License&quot;), any modifications, enhancements and/or
-other code and/or documentation (&quot;Modifications&quot;) uploaded, submitted, or otherwise made available to Eclipse.org, members of Eclipse.org and/or the
-host of Eclipse.org, by you that relate to such Content are provided under terms and conditions of the Other License and can be made available
-to others under the terms of the Other License. In addition, with regard to Modifications for which you are the copyright holder, you are also
-providing the Modifications under the terms and conditions of the CPL and such Modifications can be made available to others under the terms of
-the CPL.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/bundles/org.eclipse.swt.opengl/common/library/gl.c b/bundles/org.eclipse.swt.opengl/common/library/gl.c
deleted file mode 100644
index 3147f0cdda..0000000000
--- a/bundles/org.eclipse.swt.opengl/common/library/gl.c
+++ /dev/null
@@ -1,3356 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-#ifdef WIN32
-#include <windows.h>
-#endif
-#include <GL/gl.h>
-#include "swt.h"
-
-#define GL_NATIVE(func) Java_org_eclipse_swt_opengl_GL_##func
-
-JNIEXPORT void JNICALL GL_NATIVE(glAccum)
- (JNIEnv *env, jclass that, jint arg0, jfloat arg1)
-{
- NATIVE_ENTER(env, that, "glAccum\n")
- glAccum(arg0, arg1);
- NATIVE_EXIT(env, that, "glAccum\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glAlphaFunc)
- (JNIEnv *env, jclass that, jint arg0, jfloat arg1)
-{
- NATIVE_ENTER(env, that, "glAlphaFunc\n")
- glAlphaFunc(arg0, arg1);
- NATIVE_EXIT(env, that, "glAlphaFunc\n")
-}
-
-JNIEXPORT jboolean JNICALL GL_NATIVE(glAreTexturesResident)
- (JNIEnv *env, jclass that, jint arg0, jintArray arg1, jbooleanArray arg2)
-{
- jint *lparg1=NULL;
- jboolean *lparg2=NULL;
- jboolean rc;
-
- NATIVE_ENTER(env, that, "glAreTexturesResident\n")
- if (arg1) lparg1 = (*env)->GetIntArrayElements(env, arg1, NULL);
- if (arg2) lparg2 = (*env)->GetBooleanArrayElements(env, arg2, NULL);
- rc = (jboolean)glAreTexturesResident(arg0, (unsigned int *)lparg1, lparg2);
- if (arg1) (*env)->ReleaseIntArrayElements(env, arg1, lparg1, 0);
- if (arg2) (*env)->ReleaseBooleanArrayElements(env, arg2, lparg2, 0);
- NATIVE_EXIT(env, that, "glAreTexturesResident\n")
- return rc;
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glArrayElement)
- (JNIEnv *env, jclass that, jint arg0)
-{
- NATIVE_ENTER(env, that, "glArrayElement\n")
- glArrayElement(arg0);
- NATIVE_EXIT(env, that, "glArrayElement\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glBegin)
- (JNIEnv *env, jclass that, jint arg0)
-{
- NATIVE_ENTER(env, that, "glBegin\n")
- glBegin(arg0);
- NATIVE_EXIT(env, that, "glBegin\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glBindTexture)
- (JNIEnv *env, jclass that, jint arg0, jint arg1)
-{
- NATIVE_ENTER(env, that, "glBindTexture\n")
- glBindTexture(arg0, arg1);
- NATIVE_EXIT(env, that, "glBindTexture\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glBitmap)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jfloat arg2, jfloat arg3, jfloat arg4, jfloat arg5, jbyteArray arg6)
-{
- jbyte *lparg6=NULL;
-
- NATIVE_ENTER(env, that, "glBitmap\n")
- if (arg6) lparg6 = (*env)->GetByteArrayElements(env, arg6, NULL);
- glBitmap(arg0, arg1, arg2, arg3, arg4, arg5, (unsigned char *)lparg6);
- if (arg6) (*env)->ReleaseByteArrayElements(env, arg6, lparg6, 0);
- NATIVE_EXIT(env, that, "glBitmap\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glBlendFunc)
- (JNIEnv *env, jclass that, jint arg0, jint arg1)
-{
- NATIVE_ENTER(env, that, "glBlendFunc\n")
- glBlendFunc(arg0, arg1);
- NATIVE_EXIT(env, that, "glBlendFunc\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glCallList)
- (JNIEnv *env, jclass that, jint arg0)
-{
- NATIVE_ENTER(env, that, "glCallList\n")
- glCallList(arg0);
- NATIVE_EXIT(env, that, "glCallList\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glCallLists__II_3B)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jbyteArray arg2)
-{
- jbyte *lparg2=NULL;
-
- NATIVE_ENTER(env, that, "glCallLists__II_3B\n")
- if (arg2) lparg2 = (*env)->GetByteArrayElements(env, arg2, NULL);
- glCallLists(arg0, arg1, lparg2);
- if (arg2) (*env)->ReleaseByteArrayElements(env, arg2, lparg2, 0);
- NATIVE_EXIT(env, that, "glCallLists__II_3B\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glCallLists__II_3C)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jcharArray arg2)
-{
- jchar *lparg2=NULL;
-
- NATIVE_ENTER(env, that, "glCallLists__II_3C\n")
- if (arg2) lparg2 = (*env)->GetCharArrayElements(env, arg2, NULL);
- glCallLists(arg0, arg1, lparg2);
- if (arg2) (*env)->ReleaseCharArrayElements(env, arg2, lparg2, 0);
- NATIVE_EXIT(env, that, "glCallLists__II_3C\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glCallLists__II_3I)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jintArray arg2)
-{
- jint *lparg2=NULL;
-
- NATIVE_ENTER(env, that, "glCallLists__II_3I\n")
- if (arg2) lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL);
- glCallLists(arg0, arg1, lparg2);
- if (arg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
- NATIVE_EXIT(env, that, "glCallLists__II_3I\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glClear)
- (JNIEnv *env, jclass that, jint arg0)
-{
- NATIVE_ENTER(env, that, "glClear\n")
- glClear(arg0);
- NATIVE_EXIT(env, that, "glClear\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glClearAccum)
- (JNIEnv *env, jclass that, jfloat arg0, jfloat arg1, jfloat arg2, jfloat arg3)
-{
- NATIVE_ENTER(env, that, "glClearAccum\n")
- glClearAccum(arg0, arg1, arg2, arg3);
- NATIVE_EXIT(env, that, "glClearAccum\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glClearColor)
- (JNIEnv *env, jclass that, jfloat arg0, jfloat arg1, jfloat arg2, jfloat arg3)
-{
- NATIVE_ENTER(env, that, "glClearColor\n")
- glClearColor(arg0, arg1, arg2, arg3);
- NATIVE_EXIT(env, that, "glClearColor\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glClearDepth)
- (JNIEnv *env, jclass that, jdouble arg0)
-{
- NATIVE_ENTER(env, that, "glClearDepth\n")
- glClearDepth(arg0);
- NATIVE_EXIT(env, that, "glClearDepth\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glClearIndex)
- (JNIEnv *env, jclass that, jfloat arg0)
-{
- NATIVE_ENTER(env, that, "glClearIndex\n")
- glClearIndex(arg0);
- NATIVE_EXIT(env, that, "glClearIndex\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glClearStencil)
- (JNIEnv *env, jclass that, jint arg0)
-{
- NATIVE_ENTER(env, that, "glClearStencil\n")
- glClearStencil(arg0);
- NATIVE_EXIT(env, that, "glClearStencil\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glClipPlane)
- (JNIEnv *env, jclass that, jint arg0, jdoubleArray arg1)
-{
- jdouble *lparg1=NULL;
-
- NATIVE_ENTER(env, that, "glClipPlane\n")
- if (arg1) lparg1 = (*env)->GetDoubleArrayElements(env, arg1, NULL);
- glClipPlane(arg0, lparg1);
- if (arg1) (*env)->ReleaseDoubleArrayElements(env, arg1, lparg1, 0);
- NATIVE_EXIT(env, that, "glClipPlane\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glColor3b)
- (JNIEnv *env, jclass that, jbyte arg0, jbyte arg1, jbyte arg2)
-{
- NATIVE_ENTER(env, that, "glColor3b\n")
- glColor3b(arg0, arg1, arg2);
- NATIVE_EXIT(env, that, "glColor3b\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glColor3bv)
- (JNIEnv *env, jclass that, jbyteArray arg0)
-{
- jbyte *lparg0=NULL;
-
- NATIVE_ENTER(env, that, "glColor3bv\n")
- if (arg0) lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL);
- glColor3bv(lparg0);
- if (arg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
- NATIVE_EXIT(env, that, "glColor3bv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glColor3d)
- (JNIEnv *env, jclass that, jdouble arg0, jdouble arg1, jdouble arg2)
-{
- NATIVE_ENTER(env, that, "glColor3d\n")
- glColor3d(arg0, arg1, arg2);
- NATIVE_EXIT(env, that, "glColor3d\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glColor3dv)
- (JNIEnv *env, jclass that, jdoubleArray arg0)
-{
- jdouble *lparg0=NULL;
-
- NATIVE_ENTER(env, that, "glColor3dv\n")
- if (arg0) lparg0 = (*env)->GetDoubleArrayElements(env, arg0, NULL);
- glColor3dv(lparg0);
- if (arg0) (*env)->ReleaseDoubleArrayElements(env, arg0, lparg0, 0);
- NATIVE_EXIT(env, that, "glColor3dv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glColor3f)
- (JNIEnv *env, jclass that, jfloat arg0, jfloat arg1, jfloat arg2)
-{
- NATIVE_ENTER(env, that, "glColor3f\n")
- glColor3f(arg0, arg1, arg2);
- NATIVE_EXIT(env, that, "glColor3f\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glColor3fv)
- (JNIEnv *env, jclass that, jfloatArray arg0)
-{
- jfloat *lparg0=NULL;
-
- NATIVE_ENTER(env, that, "glColor3fv\n")
- if (arg0) lparg0 = (*env)->GetFloatArrayElements(env, arg0, NULL);
- glColor3fv(lparg0);
- if (arg0) (*env)->ReleaseFloatArrayElements(env, arg0, lparg0, 0);
- NATIVE_EXIT(env, that, "glColor3fv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glColor3i)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2)
-{
- NATIVE_ENTER(env, that, "glColor3i\n")
- glColor3i(arg0, arg1, arg2);
- NATIVE_EXIT(env, that, "glColor3i\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glColor3iv)
- (JNIEnv *env, jclass that, jintArray arg0)
-{
- jint *lparg0=NULL;
-
- NATIVE_ENTER(env, that, "glColor3iv\n")
- if (arg0) lparg0 = (*env)->GetIntArrayElements(env, arg0, NULL);
- glColor3iv((GLint *)lparg0);
- if (arg0) (*env)->ReleaseIntArrayElements(env, arg0, lparg0, 0);
- NATIVE_EXIT(env, that, "glColor3iv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glColor3s)
- (JNIEnv *env, jclass that, jshort arg0, jshort arg1, jshort arg2)
-{
- NATIVE_ENTER(env, that, "glColor3s\n")
- glColor3s(arg0, arg1, arg2);
- NATIVE_EXIT(env, that, "glColor3s\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glColor3ub)
- (JNIEnv *env, jclass that, jbyte arg0, jbyte arg1, jbyte arg2)
-{
- NATIVE_ENTER(env, that, "glColor3ub\n")
- glColor3ub(arg0, arg1, arg2);
- NATIVE_EXIT(env, that, "glColor3ub\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glColor3ubv)
- (JNIEnv *env, jclass that, jbyteArray arg0)
-{
- jbyte *lparg0=NULL;
-
- NATIVE_ENTER(env, that, "glColor3ubv\n")
- if (arg0) lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL);
- glColor3ubv((unsigned char *)lparg0);
- if (arg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
- NATIVE_EXIT(env, that, "glColor3ubv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glColor3ui)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2)
-{
- NATIVE_ENTER(env, that, "glColor3ui\n")
- glColor3ui(arg0, arg1, arg2);
- NATIVE_EXIT(env, that, "glColor3ui\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glColor3uiv)
- (JNIEnv *env, jclass that, jintArray arg0)
-{
- jint *lparg0=NULL;
-
- NATIVE_ENTER(env, that, "glColor3uiv\n")
- if (arg0) lparg0 = (*env)->GetIntArrayElements(env, arg0, NULL);
- glColor3uiv((unsigned int *)lparg0);
- if (arg0) (*env)->ReleaseIntArrayElements(env, arg0, lparg0, 0);
- NATIVE_EXIT(env, that, "glColor3uiv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glColor3us)
- (JNIEnv *env, jclass that, jshort arg0, jshort arg1, jshort arg2)
-{
- NATIVE_ENTER(env, that, "glColor3us\n")
- glColor3us(arg0, arg1, arg2);
- NATIVE_EXIT(env, that, "glColor3us\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glColor3usv)
- (JNIEnv *env, jclass that, jshortArray arg0)
-{
- jshort *lparg0=NULL;
-
- NATIVE_ENTER(env, that, "glColor3usv\n")
- if (arg0) lparg0 = (*env)->GetShortArrayElements(env, arg0, NULL);
- glColor3usv((unsigned short *)lparg0);
- if (arg0) (*env)->ReleaseShortArrayElements(env, arg0, lparg0, 0);
- NATIVE_EXIT(env, that, "glColor3usv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glColor4b)
- (JNIEnv *env, jclass that, jbyte arg0, jbyte arg1, jbyte arg2, jbyte arg3)
-{
- NATIVE_ENTER(env, that, "glColor4b\n")
- glColor4b(arg0, arg1, arg2, arg3);
- NATIVE_EXIT(env, that, "glColor4b\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glColor4bv)
- (JNIEnv *env, jclass that, jbyteArray arg0)
-{
- jbyte *lparg0=NULL;
-
- NATIVE_ENTER(env, that, "glColor4bv\n")
- if (arg0) lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL);
- glColor4bv(lparg0);
- if (arg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
- NATIVE_EXIT(env, that, "glColor4bv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glColor4d)
- (JNIEnv *env, jclass that, jdouble arg0, jdouble arg1, jdouble arg2, jdouble arg3)
-{
- NATIVE_ENTER(env, that, "glColor4d\n")
- glColor4d(arg0, arg1, arg2, arg3);
- NATIVE_EXIT(env, that, "glColor4d\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glColor4dv)
- (JNIEnv *env, jclass that, jdoubleArray arg0)
-{
- jdouble *lparg0=NULL;
-
- NATIVE_ENTER(env, that, "glColor4dv\n")
- if (arg0) lparg0 = (*env)->GetDoubleArrayElements(env, arg0, NULL);
- glColor4dv(lparg0);
- if (arg0) (*env)->ReleaseDoubleArrayElements(env, arg0, lparg0, 0);
- NATIVE_EXIT(env, that, "glColor4dv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glColor4f)
- (JNIEnv *env, jclass that, jfloat arg0, jfloat arg1, jfloat arg2, jfloat arg3)
-{
- NATIVE_ENTER(env, that, "glColor4f\n")
- glColor4f(arg0, arg1, arg2, arg3);
- NATIVE_EXIT(env, that, "glColor4f\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glColor4fv)
- (JNIEnv *env, jclass that, jfloatArray arg0)
-{
- jfloat *lparg0=NULL;
-
- NATIVE_ENTER(env, that, "glColor4fv\n")
- if (arg0) lparg0 = (*env)->GetFloatArrayElements(env, arg0, NULL);
- glColor4fv(lparg0);
- if (arg0) (*env)->ReleaseFloatArrayElements(env, arg0, lparg0, 0);
- NATIVE_EXIT(env, that, "glColor4fv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glColor4i)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jint arg3)
-{
- NATIVE_ENTER(env, that, "glColor4i\n")
- glColor4i(arg0, arg1, arg2, arg3);
- NATIVE_EXIT(env, that, "glColor4i\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glColor4iv)
- (JNIEnv *env, jclass that, jintArray arg0)
-{
- jint *lparg0=NULL;
-
- NATIVE_ENTER(env, that, "glColor4iv\n")
- if (arg0) lparg0 = (*env)->GetIntArrayElements(env, arg0, NULL);
- glColor4iv((GLint *)lparg0);
- if (arg0) (*env)->ReleaseIntArrayElements(env, arg0, lparg0, 0);
- NATIVE_EXIT(env, that, "glColor4iv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glColor4s)
- (JNIEnv *env, jclass that, jshort arg0, jshort arg1, jshort arg2, jshort arg3)
-{
- NATIVE_ENTER(env, that, "glColor4s\n")
- glColor4s(arg0, arg1, arg2, arg3);
- NATIVE_EXIT(env, that, "glColor4s\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glColor4ub)
- (JNIEnv *env, jclass that, jbyte arg0, jbyte arg1, jbyte arg2, jbyte arg3)
-{
- NATIVE_ENTER(env, that, "glColor4ub\n")
- glColor4ub(arg0, arg1, arg2, arg3);
- NATIVE_EXIT(env, that, "glColor4ub\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glColor4ubv)
- (JNIEnv *env, jclass that, jbyteArray arg0)
-{
- jbyte *lparg0=NULL;
-
- NATIVE_ENTER(env, that, "glColor4ubv\n")
- if (arg0) lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL);
- glColor4ubv((unsigned char *)lparg0);
- if (arg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
- NATIVE_EXIT(env, that, "glColor4ubv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glColor4ui)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jint arg3)
-{
- NATIVE_ENTER(env, that, "glColor4ui\n")
- glColor4ui(arg0, arg1, arg2, arg3);
- NATIVE_EXIT(env, that, "glColor4ui\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glColor4uiv)
- (JNIEnv *env, jclass that, jintArray arg0)
-{
- jint *lparg0=NULL;
-
- NATIVE_ENTER(env, that, "glColor4uiv\n")
- if (arg0) lparg0 = (*env)->GetIntArrayElements(env, arg0, NULL);
- glColor4uiv((unsigned int *)lparg0);
- if (arg0) (*env)->ReleaseIntArrayElements(env, arg0, lparg0, 0);
- NATIVE_EXIT(env, that, "glColor4uiv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glColor4us)
- (JNIEnv *env, jclass that, jshort arg0, jshort arg1, jshort arg2, jshort arg3)
-{
- NATIVE_ENTER(env, that, "glColor4us\n")
- glColor4us(arg0, arg1, arg2, arg3);
- NATIVE_EXIT(env, that, "glColor4us\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glColor4usv)
- (JNIEnv *env, jclass that, jshortArray arg0)
-{
- jshort *lparg0=NULL;
-
- NATIVE_ENTER(env, that, "glColor4usv\n")
- if (arg0) lparg0 = (*env)->GetShortArrayElements(env, arg0, NULL);
- glColor4usv((unsigned short *)lparg0);
- if (arg0) (*env)->ReleaseShortArrayElements(env, arg0, lparg0, 0);
- NATIVE_EXIT(env, that, "glColor4usv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glColorMask)
- (JNIEnv *env, jclass that, jboolean arg0, jboolean arg1, jboolean arg2, jboolean arg3)
-{
- NATIVE_ENTER(env, that, "glColorMask\n")
- glColorMask(arg0, arg1, arg2, arg3);
- NATIVE_EXIT(env, that, "glColorMask\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glColorMaterial)
- (JNIEnv *env, jclass that, jint arg0, jint arg1)
-{
- NATIVE_ENTER(env, that, "glColorMaterial\n")
- glColorMaterial(arg0, arg1);
- NATIVE_EXIT(env, that, "glColorMaterial\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glColorPointer)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jintArray arg3)
-{
- jint *lparg3=NULL;
-
- NATIVE_ENTER(env, that, "glColorPointer\n")
- if (arg3) lparg3 = (*env)->GetIntArrayElements(env, arg3, NULL);
- glColorPointer(arg0, arg1, arg2, lparg3);
- if (arg3) (*env)->ReleaseIntArrayElements(env, arg3, lparg3, 0);
- NATIVE_EXIT(env, that, "glColorPointer\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glCopyPixels)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jint arg3, jint arg4)
-{
- NATIVE_ENTER(env, that, "glCopyPixels\n")
- glCopyPixels(arg0, arg1, arg2, arg3, arg4);
- NATIVE_EXIT(env, that, "glCopyPixels\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glCopyTexImage1D)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jint arg3, jint arg4, jint arg5, jint arg6)
-{
- NATIVE_ENTER(env, that, "glCopyTexImage1D\n")
- glCopyTexImage1D(arg0, arg1, arg2, arg3, arg4, arg5, arg6);
- NATIVE_EXIT(env, that, "glCopyTexImage1D\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glCopyTexImage2D)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jint arg3, jint arg4, jint arg5, jint arg6, jint arg7)
-{
- NATIVE_ENTER(env, that, "glCopyTexImage2D\n")
- glCopyTexImage2D(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
- NATIVE_EXIT(env, that, "glCopyTexImage2D\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glCopyTexSubImage1D)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jint arg3, jint arg4, jint arg5)
-{
- NATIVE_ENTER(env, that, "glCopyTexSubImage1D\n")
- glCopyTexSubImage1D(arg0, arg1, arg2, arg3, arg4, arg5);
- NATIVE_EXIT(env, that, "glCopyTexSubImage1D\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glCopyTexSubImage2D)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jint arg3, jint arg4, jint arg5, jint arg6, jint arg7)
-{
- NATIVE_ENTER(env, that, "glCopyTexSubImage2D\n")
- glCopyTexSubImage2D(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
- NATIVE_EXIT(env, that, "glCopyTexSubImage2D\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glCullFace)
- (JNIEnv *env, jclass that, jint arg0)
-{
- NATIVE_ENTER(env, that, "glCullFace\n")
- glCullFace(arg0);
- NATIVE_EXIT(env, that, "glCullFace\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glDeleteLists)
- (JNIEnv *env, jclass that, jint arg0, jint arg1)
-{
- NATIVE_ENTER(env, that, "glDeleteLists\n")
- glDeleteLists(arg0, arg1);
- NATIVE_EXIT(env, that, "glDeleteLists\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glDeleteTextures)
- (JNIEnv *env, jclass that, jint arg0, jintArray arg1)
-{
- jint *lparg1=NULL;
-
- NATIVE_ENTER(env, that, "glDeleteTextures\n")
- if (arg1) lparg1 = (*env)->GetIntArrayElements(env, arg1, NULL);
- glDeleteTextures(arg0, (unsigned int *)lparg1);
- if (arg1) (*env)->ReleaseIntArrayElements(env, arg1, lparg1, 0);
- NATIVE_EXIT(env, that, "glDeleteTextures\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glDepthFunc)
- (JNIEnv *env, jclass that, jint arg0)
-{
- NATIVE_ENTER(env, that, "glDepthFunc\n")
- glDepthFunc(arg0);
- NATIVE_EXIT(env, that, "glDepthFunc\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glDepthMask)
- (JNIEnv *env, jclass that, jboolean arg0)
-{
- NATIVE_ENTER(env, that, "glDepthMask\n")
- glDepthMask(arg0);
- NATIVE_EXIT(env, that, "glDepthMask\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glDepthRange)
- (JNIEnv *env, jclass that, jdouble arg0, jdouble arg1)
-{
- NATIVE_ENTER(env, that, "glDepthRange\n")
- glDepthRange(arg0, arg1);
- NATIVE_EXIT(env, that, "glDepthRange\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glDisable)
- (JNIEnv *env, jclass that, jint arg0)
-{
- NATIVE_ENTER(env, that, "glDisable\n")
- glDisable(arg0);
- NATIVE_EXIT(env, that, "glDisable\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glDisableClientState)
- (JNIEnv *env, jclass that, jint arg0)
-{
- NATIVE_ENTER(env, that, "glDisableClientState\n")
- glDisableClientState(arg0);
- NATIVE_EXIT(env, that, "glDisableClientState\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glDrawArrays)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2)
-{
- NATIVE_ENTER(env, that, "glDrawArrays\n")
- glDrawArrays(arg0, arg1, arg2);
- NATIVE_EXIT(env, that, "glDrawArrays\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glDrawBuffer)
- (JNIEnv *env, jclass that, jint arg0)
-{
- NATIVE_ENTER(env, that, "glDrawBuffer\n")
- glDrawBuffer(arg0);
- NATIVE_EXIT(env, that, "glDrawBuffer\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glDrawElements)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jintArray arg3)
-{
- jint *lparg3=NULL;
-
- NATIVE_ENTER(env, that, "glDrawElements\n")
- if (arg3) lparg3 = (*env)->GetIntArrayElements(env, arg3, NULL);
- glDrawElements(arg0, arg1, arg2, lparg3);
- if (arg3) (*env)->ReleaseIntArrayElements(env, arg3, lparg3, 0);
- NATIVE_EXIT(env, that, "glDrawElements\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glDrawPixels)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jint arg3, jintArray arg4)
-{
- jint *lparg4=NULL;
-
- NATIVE_ENTER(env, that, "glDrawPixels\n")
- if (arg4) lparg4 = (*env)->GetIntArrayElements(env, arg4, NULL);
- glDrawPixels(arg0, arg1, arg2, arg3, lparg4);
- if (arg4) (*env)->ReleaseIntArrayElements(env, arg4, lparg4, 0);
- NATIVE_EXIT(env, that, "glDrawPixels\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glEdgeFlag)
- (JNIEnv *env, jclass that, jboolean arg0)
-{
- NATIVE_ENTER(env, that, "glEdgeFlag\n")
- glEdgeFlag(arg0);
- NATIVE_EXIT(env, that, "glEdgeFlag\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glEdgeFlagPointer)
- (JNIEnv *env, jclass that, jint arg0, jbooleanArray arg1)
-{
- jboolean *lparg1=NULL;
-
- NATIVE_ENTER(env, that, "glEdgeFlagPointer\n")
- if (arg1) lparg1 = (*env)->GetBooleanArrayElements(env, arg1, NULL);
- glEdgeFlagPointer(arg0, lparg1);
- if (arg1) (*env)->ReleaseBooleanArrayElements(env, arg1, lparg1, 0);
- NATIVE_EXIT(env, that, "glEdgeFlagPointer\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glEdgeFlagv)
- (JNIEnv *env, jclass that, jbooleanArray arg0)
-{
- jboolean *lparg0=NULL;
-
- NATIVE_ENTER(env, that, "glEdgeFlagv\n")
- if (arg0) lparg0 = (*env)->GetBooleanArrayElements(env, arg0, NULL);
- glEdgeFlagv(lparg0);
- if (arg0) (*env)->ReleaseBooleanArrayElements(env, arg0, lparg0, 0);
- NATIVE_EXIT(env, that, "glEdgeFlagv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glEnable)
- (JNIEnv *env, jclass that, jint arg0)
-{
- NATIVE_ENTER(env, that, "glEnable\n")
- glEnable(arg0);
- NATIVE_EXIT(env, that, "glEnable\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glEnableClientState)
- (JNIEnv *env, jclass that, jint arg0)
-{
- NATIVE_ENTER(env, that, "glEnableClientState\n")
- glEnableClientState(arg0);
- NATIVE_EXIT(env, that, "glEnableClientState\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glEnd)
- (JNIEnv *env, jclass that)
-{
- NATIVE_ENTER(env, that, "glEnd\n")
- glEnd();
- NATIVE_EXIT(env, that, "glEnd\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glEndList)
- (JNIEnv *env, jclass that)
-{
- NATIVE_ENTER(env, that, "glEndList\n")
- glEndList();
- NATIVE_EXIT(env, that, "glEndList\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glEvalCoord1d)
- (JNIEnv *env, jclass that, jdouble arg0)
-{
- NATIVE_ENTER(env, that, "glEvalCoord1d\n")
- glEvalCoord1d(arg0);
- NATIVE_EXIT(env, that, "glEvalCoord1d\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glEvalCoord1dv)
- (JNIEnv *env, jclass that, jdoubleArray arg0)
-{
- jdouble *lparg0=NULL;
-
- NATIVE_ENTER(env, that, "glEvalCoord1dv\n")
- if (arg0) lparg0 = (*env)->GetDoubleArrayElements(env, arg0, NULL);
- glEvalCoord1dv(lparg0);
- if (arg0) (*env)->ReleaseDoubleArrayElements(env, arg0, lparg0, 0);
- NATIVE_EXIT(env, that, "glEvalCoord1dv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glEvalCoord1f)
- (JNIEnv *env, jclass that, jfloat arg0)
-{
- NATIVE_ENTER(env, that, "glEvalCoord1f\n")
- glEvalCoord1f(arg0);
- NATIVE_EXIT(env, that, "glEvalCoord1f\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glEvalCoord1fv)
- (JNIEnv *env, jclass that, jfloatArray arg0)
-{
- jfloat *lparg0=NULL;
-
- NATIVE_ENTER(env, that, "glEvalCoord1fv\n")
- if (arg0) lparg0 = (*env)->GetFloatArrayElements(env, arg0, NULL);
- glEvalCoord1fv(lparg0);
- if (arg0) (*env)->ReleaseFloatArrayElements(env, arg0, lparg0, 0);
- NATIVE_EXIT(env, that, "glEvalCoord1fv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glEvalCoord2d)
- (JNIEnv *env, jclass that, jdouble arg0, jdouble arg1)
-{
- NATIVE_ENTER(env, that, "glEvalCoord2d\n")
- glEvalCoord2d(arg0, arg1);
- NATIVE_EXIT(env, that, "glEvalCoord2d\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glEvalCoord2dv)
- (JNIEnv *env, jclass that, jdoubleArray arg0)
-{
- jdouble *lparg0=NULL;
-
- NATIVE_ENTER(env, that, "glEvalCoord2dv\n")
- if (arg0) lparg0 = (*env)->GetDoubleArrayElements(env, arg0, NULL);
- glEvalCoord2dv(lparg0);
- if (arg0) (*env)->ReleaseDoubleArrayElements(env, arg0, lparg0, 0);
- NATIVE_EXIT(env, that, "glEvalCoord2dv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glEvalCoord2f)
- (JNIEnv *env, jclass that, jfloat arg0, jfloat arg1)
-{
- NATIVE_ENTER(env, that, "glEvalCoord2f\n")
- glEvalCoord2f(arg0, arg1);
- NATIVE_EXIT(env, that, "glEvalCoord2f\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glEvalCoord2fv)
- (JNIEnv *env, jclass that, jfloatArray arg0)
-{
- jfloat *lparg0=NULL;
-
- NATIVE_ENTER(env, that, "glEvalCoord2fv\n")
- if (arg0) lparg0 = (*env)->GetFloatArrayElements(env, arg0, NULL);
- glEvalCoord2fv(lparg0);
- if (arg0) (*env)->ReleaseFloatArrayElements(env, arg0, lparg0, 0);
- NATIVE_EXIT(env, that, "glEvalCoord2fv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glEvalMesh1)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2)
-{
- NATIVE_ENTER(env, that, "glEvalMesh1\n")
- glEvalMesh1(arg0, arg1, arg2);
- NATIVE_EXIT(env, that, "glEvalMesh1\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glEvalMesh2)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jint arg3, jint arg4)
-{
- NATIVE_ENTER(env, that, "glEvalMesh2\n")
- glEvalMesh2(arg0, arg1, arg2, arg3, arg4);
- NATIVE_EXIT(env, that, "glEvalMesh2\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glEvalPoint1)
- (JNIEnv *env, jclass that, jint arg0)
-{
- NATIVE_ENTER(env, that, "glEvalPoint1\n")
- glEvalPoint1(arg0);
- NATIVE_EXIT(env, that, "glEvalPoint1\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glEvalPoint2)
- (JNIEnv *env, jclass that, jint arg0, jint arg1)
-{
- NATIVE_ENTER(env, that, "glEvalPoint2\n")
- glEvalPoint2(arg0, arg1);
- NATIVE_EXIT(env, that, "glEvalPoint2\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glFeedbackBuffer)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jfloatArray arg2)
-{
- jfloat *lparg2=NULL;
-
- NATIVE_ENTER(env, that, "glFeedbackBuffer\n")
- if (arg2) lparg2 = (*env)->GetFloatArrayElements(env, arg2, NULL);
- glFeedbackBuffer(arg0, arg1, lparg2);
- if (arg2) (*env)->ReleaseFloatArrayElements(env, arg2, lparg2, 0);
- NATIVE_EXIT(env, that, "glFeedbackBuffer\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glFinish)
- (JNIEnv *env, jclass that)
-{
- NATIVE_ENTER(env, that, "glFinish\n")
- glFinish();
- NATIVE_EXIT(env, that, "glFinish\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glFlush)
- (JNIEnv *env, jclass that)
-{
- NATIVE_ENTER(env, that, "glFlush\n")
- glFlush();
- NATIVE_EXIT(env, that, "glFlush\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glFogf)
- (JNIEnv *env, jclass that, jint arg0, jfloat arg1)
-{
- NATIVE_ENTER(env, that, "glFogf\n")
- glFogf(arg0, arg1);
- NATIVE_EXIT(env, that, "glFogf\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glFogfv)
- (JNIEnv *env, jclass that, jint arg0, jfloatArray arg1)
-{
- jfloat *lparg1=NULL;
-
- NATIVE_ENTER(env, that, "glFogfv\n")
- if (arg1) lparg1 = (*env)->GetFloatArrayElements(env, arg1, NULL);
- glFogfv(arg0, lparg1);
- if (arg1) (*env)->ReleaseFloatArrayElements(env, arg1, lparg1, 0);
- NATIVE_EXIT(env, that, "glFogfv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glFogi)
- (JNIEnv *env, jclass that, jint arg0, jint arg1)
-{
- NATIVE_ENTER(env, that, "glFogi\n")
- glFogi(arg0, arg1);
- NATIVE_EXIT(env, that, "glFogi\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glFogiv)
- (JNIEnv *env, jclass that, jint arg0, jintArray arg1)
-{
- jint *lparg1=NULL;
-
- NATIVE_ENTER(env, that, "glFogiv\n")
- if (arg1) lparg1 = (*env)->GetIntArrayElements(env, arg1, NULL);
- glFogiv(arg0, (GLint *)lparg1);
- if (arg1) (*env)->ReleaseIntArrayElements(env, arg1, lparg1, 0);
- NATIVE_EXIT(env, that, "glFogiv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glFrontFace)
- (JNIEnv *env, jclass that, jint arg0)
-{
- NATIVE_ENTER(env, that, "glFrontFace\n")
- glFrontFace(arg0);
- NATIVE_EXIT(env, that, "glFrontFace\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glFrustum)
- (JNIEnv *env, jclass that, jdouble arg0, jdouble arg1, jdouble arg2, jdouble arg3, jdouble arg4, jdouble arg5)
-{
- NATIVE_ENTER(env, that, "glFrustum\n")
- glFrustum(arg0, arg1, arg2, arg3, arg4, arg5);
- NATIVE_EXIT(env, that, "glFrustum\n")
-}
-
-JNIEXPORT jint JNICALL GL_NATIVE(glGenLists)
- (JNIEnv *env, jclass that, jint arg0)
-{
- jint rc;
- NATIVE_ENTER(env, that, "glGenLists\n")
- rc = (jint)glGenLists(arg0);
- NATIVE_EXIT(env, that, "glGenLists\n")
- return rc;
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glGenTextures)
- (JNIEnv *env, jclass that, jint arg0, jintArray arg1)
-{
- jint *lparg1=NULL;
-
- NATIVE_ENTER(env, that, "glGenTextures\n")
- if (arg1) lparg1 = (*env)->GetIntArrayElements(env, arg1, NULL);
- glGenTextures(arg0, (unsigned int *)lparg1);
- if (arg1) (*env)->ReleaseIntArrayElements(env, arg1, lparg1, 0);
- NATIVE_EXIT(env, that, "glGenTextures\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glGetBooleanv)
- (JNIEnv *env, jclass that, jint arg0, jbooleanArray arg1)
-{
- jboolean *lparg1=NULL;
-
- NATIVE_ENTER(env, that, "glGetBooleanv\n")
- if (arg1) lparg1 = (*env)->GetBooleanArrayElements(env, arg1, NULL);
- glGetBooleanv(arg0, lparg1);
- if (arg1) (*env)->ReleaseBooleanArrayElements(env, arg1, lparg1, 0);
- NATIVE_EXIT(env, that, "glGetBooleanv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glGetClipPlane)
- (JNIEnv *env, jclass that, jint arg0, jdoubleArray arg1)
-{
- jdouble *lparg1=NULL;
-
- NATIVE_ENTER(env, that, "glGetClipPlane\n")
- if (arg1) lparg1 = (*env)->GetDoubleArrayElements(env, arg1, NULL);
- glGetClipPlane(arg0, lparg1);
- if (arg1) (*env)->ReleaseDoubleArrayElements(env, arg1, lparg1, 0);
- NATIVE_EXIT(env, that, "glGetClipPlane\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glGetDoublev)
- (JNIEnv *env, jclass that, jint arg0, jdoubleArray arg1)
-{
- jdouble *lparg1=NULL;
-
- NATIVE_ENTER(env, that, "glGetDoublev\n")
- if (arg1) lparg1 = (*env)->GetDoubleArrayElements(env, arg1, NULL);
- glGetDoublev(arg0, lparg1);
- if (arg1) (*env)->ReleaseDoubleArrayElements(env, arg1, lparg1, 0);
- NATIVE_EXIT(env, that, "glGetDoublev\n")
-}
-
-JNIEXPORT jint JNICALL GL_NATIVE(glGetError)
- (JNIEnv *env, jclass that)
-{
- jint rc;
- NATIVE_ENTER(env, that, "glGetError\n")
- rc = (jint)glGetError();
- NATIVE_EXIT(env, that, "glGetError\n")
- return rc;
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glGetFloatv)
- (JNIEnv *env, jclass that, jint arg0, jfloatArray arg1)
-{
- jfloat *lparg1=NULL;
-
- NATIVE_ENTER(env, that, "glGetFloatv\n")
- if (arg1) lparg1 = (*env)->GetFloatArrayElements(env, arg1, NULL);
- glGetFloatv(arg0, lparg1);
- if (arg1) (*env)->ReleaseFloatArrayElements(env, arg1, lparg1, 0);
- NATIVE_EXIT(env, that, "glGetFloatv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glGetIntegerv)
- (JNIEnv *env, jclass that, jint arg0, jintArray arg1)
-{
- jint *lparg1=NULL;
-
- NATIVE_ENTER(env, that, "glGetIntegerv\n")
- if (arg1) lparg1 = (*env)->GetIntArrayElements(env, arg1, NULL);
- glGetIntegerv(arg0, (GLint *)lparg1);
- if (arg1) (*env)->ReleaseIntArrayElements(env, arg1, lparg1, 0);
- NATIVE_EXIT(env, that, "glGetIntegerv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glGetLightfv)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jfloatArray arg2)
-{
- jfloat *lparg2=NULL;
-
- NATIVE_ENTER(env, that, "glGetLightfv\n")
- if (arg2) lparg2 = (*env)->GetFloatArrayElements(env, arg2, NULL);
- glGetLightfv(arg0, arg1, lparg2);
- if (arg2) (*env)->ReleaseFloatArrayElements(env, arg2, lparg2, 0);
- NATIVE_EXIT(env, that, "glGetLightfv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glGetLightiv)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jintArray arg2)
-{
- jint *lparg2=NULL;
-
- NATIVE_ENTER(env, that, "glGetLightiv\n")
- if (arg2) lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL);
- glGetLightiv(arg0, arg1, (GLint *)lparg2);
- if (arg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
- NATIVE_EXIT(env, that, "glGetLightiv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glGetMapdv)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jdoubleArray arg2)
-{
- jdouble *lparg2=NULL;
-
- NATIVE_ENTER(env, that, "glGetMapdv\n")
- if (arg2) lparg2 = (*env)->GetDoubleArrayElements(env, arg2, NULL);
- glGetMapdv(arg0, arg1, lparg2);
- if (arg2) (*env)->ReleaseDoubleArrayElements(env, arg2, lparg2, 0);
- NATIVE_EXIT(env, that, "glGetMapdv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glGetMapfv)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jfloatArray arg2)
-{
- jfloat *lparg2=NULL;
-
- NATIVE_ENTER(env, that, "glGetMapfv\n")
- if (arg2) lparg2 = (*env)->GetFloatArrayElements(env, arg2, NULL);
- glGetMapfv(arg0, arg1, lparg2);
- if (arg2) (*env)->ReleaseFloatArrayElements(env, arg2, lparg2, 0);
- NATIVE_EXIT(env, that, "glGetMapfv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glGetMapiv)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jintArray arg2)
-{
- jint *lparg2=NULL;
-
- NATIVE_ENTER(env, that, "glGetMapiv\n")
- if (arg2) lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL);
- glGetMapiv(arg0, arg1, (GLint *)lparg2);
- if (arg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
- NATIVE_EXIT(env, that, "glGetMapiv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glGetMaterialfv)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jfloatArray arg2)
-{
- jfloat *lparg2=NULL;
-
- NATIVE_ENTER(env, that, "glGetMaterialfv\n")
- if (arg2) lparg2 = (*env)->GetFloatArrayElements(env, arg2, NULL);
- glGetMaterialfv(arg0, arg1, lparg2);
- if (arg2) (*env)->ReleaseFloatArrayElements(env, arg2, lparg2, 0);
- NATIVE_EXIT(env, that, "glGetMaterialfv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glGetMaterialiv)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jintArray arg2)
-{
- jint *lparg2=NULL;
-
- NATIVE_ENTER(env, that, "glGetMaterialiv\n")
- if (arg2) lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL);
- glGetMaterialiv(arg0, arg1, (GLint *)lparg2);
- if (arg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
- NATIVE_EXIT(env, that, "glGetMaterialiv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glGetPixelMapfv)
- (JNIEnv *env, jclass that, jint arg0, jfloatArray arg1)
-{
- jfloat *lparg1=NULL;
-
- NATIVE_ENTER(env, that, "glGetPixelMapfv\n")
- if (arg1) lparg1 = (*env)->GetFloatArrayElements(env, arg1, NULL);
- glGetPixelMapfv(arg0, lparg1);
- if (arg1) (*env)->ReleaseFloatArrayElements(env, arg1, lparg1, 0);
- NATIVE_EXIT(env, that, "glGetPixelMapfv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glGetPixelMapuiv)
- (JNIEnv *env, jclass that, jint arg0, jintArray arg1)
-{
- jint *lparg1=NULL;
-
- NATIVE_ENTER(env, that, "glGetPixelMapuiv\n")
- if (arg1) lparg1 = (*env)->GetIntArrayElements(env, arg1, NULL);
- glGetPixelMapuiv(arg0, (unsigned int *)lparg1);
- if (arg1) (*env)->ReleaseIntArrayElements(env, arg1, lparg1, 0);
- NATIVE_EXIT(env, that, "glGetPixelMapuiv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glGetPixelMapusv)
- (JNIEnv *env, jclass that, jint arg0, jshortArray arg1)
-{
- jshort *lparg1=NULL;
-
- NATIVE_ENTER(env, that, "glGetPixelMapusv\n")
- if (arg1) lparg1 = (*env)->GetShortArrayElements(env, arg1, NULL);
- glGetPixelMapusv(arg0, (unsigned short *)lparg1);
- if (arg1) (*env)->ReleaseShortArrayElements(env, arg1, lparg1, 0);
- NATIVE_EXIT(env, that, "glGetPixelMapusv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glGetPointerv)
- (JNIEnv *env, jclass that, jint arg0, jintArray arg1)
-{
- jint *lparg1=NULL;
-
- NATIVE_ENTER(env, that, "glGetPointerv\n")
- if (arg1) lparg1 = (*env)->GetIntArrayElements(env, arg1, NULL);
- glGetPointerv(arg0, (void **)lparg1);
- if (arg1) (*env)->ReleaseIntArrayElements(env, arg1, lparg1, 0);
- NATIVE_EXIT(env, that, "glGetPointerv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glGetPolygonStipple)
- (JNIEnv *env, jclass that, jbyteArray arg0)
-{
- jbyte *lparg0=NULL;
-
- NATIVE_ENTER(env, that, "glGetPolygonStipple\n")
- if (arg0) lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL);
- glGetPolygonStipple((unsigned char *)lparg0);
- if (arg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
- NATIVE_EXIT(env, that, "glGetPolygonStipple\n")
-}
-
-JNIEXPORT jint JNICALL GL_NATIVE(glGetString)
- (JNIEnv *env, jclass that, jint arg0)
-{
- NATIVE_ENTER(env, that, "glGetString\n")
- printf ("%s,\n",glGetString(arg0));
- NATIVE_EXIT(env, that, "glGetString\n")
- return 1;
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glGetTexEnvfv)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jfloatArray arg2)
-{
- jfloat *lparg2=NULL;
-
- NATIVE_ENTER(env, that, "glGetTexEnvfv\n")
- if (arg2) lparg2 = (*env)->GetFloatArrayElements(env, arg2, NULL);
- glGetTexEnvfv(arg0, arg1, lparg2);
- if (arg2) (*env)->ReleaseFloatArrayElements(env, arg2, lparg2, 0);
- NATIVE_EXIT(env, that, "glGetTexEnvfv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glGetTexEnviv)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jintArray arg2)
-{
- jint *lparg2=NULL;
-
- NATIVE_ENTER(env, that, "glGetTexEnviv\n")
- if (arg2) lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL);
- glGetTexEnviv(arg0, arg1, (GLint *)lparg2);
- if (arg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
- NATIVE_EXIT(env, that, "glGetTexEnviv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glGetTexGendv)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jdoubleArray arg2)
-{
- jdouble *lparg2=NULL;
-
- NATIVE_ENTER(env, that, "glGetTexGendv\n")
- if (arg2) lparg2 = (*env)->GetDoubleArrayElements(env, arg2, NULL);
- glGetTexGendv(arg0, arg1, lparg2);
- if (arg2) (*env)->ReleaseDoubleArrayElements(env, arg2, lparg2, 0);
- NATIVE_EXIT(env, that, "glGetTexGendv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glGetTexGenfv)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jfloatArray arg2)
-{
- jfloat *lparg2=NULL;
-
- NATIVE_ENTER(env, that, "glGetTexGenfv\n")
- if (arg2) lparg2 = (*env)->GetFloatArrayElements(env, arg2, NULL);
- glGetTexGenfv(arg0, arg1, lparg2);
- if (arg2) (*env)->ReleaseFloatArrayElements(env, arg2, lparg2, 0);
- NATIVE_EXIT(env, that, "glGetTexGenfv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glGetTexGeniv)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jintArray arg2)
-{
- jint *lparg2=NULL;
-
- NATIVE_ENTER(env, that, "glGetTexGeniv\n")
- if (arg2) lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL);
- glGetTexGeniv(arg0, arg1, (GLint *)lparg2);
- if (arg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
- NATIVE_EXIT(env, that, "glGetTexGeniv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glGetTexImage)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jint arg3, jintArray arg4)
-{
- jint *lparg4=NULL;
-
- NATIVE_ENTER(env, that, "glGetTexImage\n")
- if (arg4) lparg4 = (*env)->GetIntArrayElements(env, arg4, NULL);
- glGetTexImage(arg0, arg1, arg2, arg3, lparg4);
- if (arg4) (*env)->ReleaseIntArrayElements(env, arg4, lparg4, 0);
- NATIVE_EXIT(env, that, "glGetTexImage\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glGetTexLevelParameterfv)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jfloatArray arg3)
-{
- jfloat *lparg3=NULL;
-
- NATIVE_ENTER(env, that, "glGetTexLevelParameterfv\n")
- if (arg3) lparg3 = (*env)->GetFloatArrayElements(env, arg3, NULL);
- glGetTexLevelParameterfv(arg0, arg1, arg2, lparg3);
- if (arg3) (*env)->ReleaseFloatArrayElements(env, arg3, lparg3, 0);
- NATIVE_EXIT(env, that, "glGetTexLevelParameterfv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glGetTexLevelParameteriv)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jintArray arg3)
-{
- jint *lparg3=NULL;
-
- NATIVE_ENTER(env, that, "glGetTexLevelParameteriv\n")
- if (arg3) lparg3 = (*env)->GetIntArrayElements(env, arg3, NULL);
- glGetTexLevelParameteriv(arg0, arg1, arg2, (GLint *)lparg3);
- if (arg3) (*env)->ReleaseIntArrayElements(env, arg3, lparg3, 0);
- NATIVE_EXIT(env, that, "glGetTexLevelParameteriv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glGetTexParameterfv)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jfloatArray arg2)
-{
- jfloat *lparg2=NULL;
-
- NATIVE_ENTER(env, that, "glGetTexParameterfv\n")
- if (arg2) lparg2 = (*env)->GetFloatArrayElements(env, arg2, NULL);
- glGetTexParameterfv(arg0, arg1, lparg2);
- if (arg2) (*env)->ReleaseFloatArrayElements(env, arg2, lparg2, 0);
- NATIVE_EXIT(env, that, "glGetTexParameterfv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glGetTexParameteriv)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jintArray arg2)
-{
- jint *lparg2=NULL;
-
- NATIVE_ENTER(env, that, "glGetTexParameteriv\n")
- if (arg2) lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL);
- glGetTexParameteriv(arg0, arg1, (GLint *)lparg2);
- if (arg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
- NATIVE_EXIT(env, that, "glGetTexParameteriv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glHint)
- (JNIEnv *env, jclass that, jint arg0, jint arg1)
-{
- NATIVE_ENTER(env, that, "glHint\n")
- glHint(arg0, arg1);
- NATIVE_EXIT(env, that, "glHint\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glIndexMask)
- (JNIEnv *env, jclass that, jint arg0)
-{
- NATIVE_ENTER(env, that, "glIndexMask\n")
- glIndexMask(arg0);
- NATIVE_EXIT(env, that, "glIndexMask\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glIndexPointer)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jintArray arg2)
-{
- jint *lparg2=NULL;
-
- NATIVE_ENTER(env, that, "glIndexPointer\n")
- if (arg2) lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL);
- glIndexPointer(arg0, arg1, lparg2);
- if (arg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
- NATIVE_EXIT(env, that, "glIndexPointer\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glIndexd)
- (JNIEnv *env, jclass that, jdouble arg0)
-{
- NATIVE_ENTER(env, that, "glIndexd\n")
- glIndexd(arg0);
- NATIVE_EXIT(env, that, "glIndexd\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glIndexdv)
- (JNIEnv *env, jclass that, jdoubleArray arg0)
-{
- jdouble *lparg0=NULL;
-
- NATIVE_ENTER(env, that, "glIndexdv\n")
- if (arg0) lparg0 = (*env)->GetDoubleArrayElements(env, arg0, NULL);
- glIndexdv(lparg0);
- if (arg0) (*env)->ReleaseDoubleArrayElements(env, arg0, lparg0, 0);
- NATIVE_EXIT(env, that, "glIndexdv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glIndexf)
- (JNIEnv *env, jclass that, jfloat arg0)
-{
- NATIVE_ENTER(env, that, "glIndexf\n")
- glIndexf(arg0);
- NATIVE_EXIT(env, that, "glIndexf\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glIndexfv)
- (JNIEnv *env, jclass that, jfloatArray arg0)
-{
- jfloat *lparg0=NULL;
-
- NATIVE_ENTER(env, that, "glIndexfv\n")
- if (arg0) lparg0 = (*env)->GetFloatArrayElements(env, arg0, NULL);
- glIndexfv(lparg0);
- if (arg0) (*env)->ReleaseFloatArrayElements(env, arg0, lparg0, 0);
- NATIVE_EXIT(env, that, "glIndexfv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glIndexi)
- (JNIEnv *env, jclass that, jint arg0)
-{
- NATIVE_ENTER(env, that, "glIndexi\n")
- glIndexi(arg0);
- NATIVE_EXIT(env, that, "glIndexi\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glIndexiv)
- (JNIEnv *env, jclass that, jintArray arg0)
-{
- jint *lparg0=NULL;
-
- NATIVE_ENTER(env, that, "glIndexiv\n")
- if (arg0) lparg0 = (*env)->GetIntArrayElements(env, arg0, NULL);
- glIndexiv((GLint *)lparg0);
- if (arg0) (*env)->ReleaseIntArrayElements(env, arg0, lparg0, 0);
- NATIVE_EXIT(env, that, "glIndexiv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glIndexs)
- (JNIEnv *env, jclass that, jshort arg0)
-{
- NATIVE_ENTER(env, that, "glIndexs\n")
- glIndexs(arg0);
- NATIVE_EXIT(env, that, "glIndexs\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glIndexsv)
- (JNIEnv *env, jclass that, jshortArray arg0)
-{
- jshort *lparg0=NULL;
-
- NATIVE_ENTER(env, that, "glIndexsv\n")
- if (arg0) lparg0 = (*env)->GetShortArrayElements(env, arg0, NULL);
- glIndexsv(lparg0);
- if (arg0) (*env)->ReleaseShortArrayElements(env, arg0, lparg0, 0);
- NATIVE_EXIT(env, that, "glIndexsv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glInitNames)
- (JNIEnv *env, jclass that)
-{
- NATIVE_ENTER(env, that, "glInitNames\n")
- glInitNames();
- NATIVE_EXIT(env, that, "glInitNames\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glInterleavedArrays)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jintArray arg2)
-{
- jint *lparg2=NULL;
-
- NATIVE_ENTER(env, that, "glInterleavedArrays\n")
- if (arg2) lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL);
- glInterleavedArrays(arg0, arg1, lparg2);
- if (arg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
- NATIVE_EXIT(env, that, "glInterleavedArrays\n")
-}
-
-JNIEXPORT jboolean JNICALL GL_NATIVE(glIsEnabled)
- (JNIEnv *env, jclass that, jint arg0)
-{
- jboolean result;
- NATIVE_ENTER(env, that, "glIsEnabled\n")
- result = (jboolean)glIsEnabled(arg0);
- NATIVE_EXIT(env, that, "glIsEnabled\n")
- return result;
-}
-
-JNIEXPORT jboolean JNICALL GL_NATIVE(glIsList)
- (JNIEnv *env, jclass that, jint arg0)
-{
- jboolean result;
- NATIVE_ENTER(env, that, "glIsList\n")
- result = (jboolean)glIsList(arg0);
- NATIVE_EXIT(env, that, "glIsList\n")
- return result;
-}
-
-JNIEXPORT jboolean JNICALL GL_NATIVE(glIsTexture)
- (JNIEnv *env, jclass that, jint arg0)
-{
- jboolean result;
- NATIVE_ENTER(env, that, "glIsTexture\n")
- result = (jboolean)glIsTexture(arg0);
- NATIVE_EXIT(env, that, "glIsTexture\n")
- return result;
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glLightModelf)
- (JNIEnv *env, jclass that, jint arg0, jfloat arg1)
-{
- NATIVE_ENTER(env, that, "glLightModelf\n")
- glLightModelf(arg0, arg1);
- NATIVE_EXIT(env, that, "glLightModelf\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glLightModelfv)
- (JNIEnv *env, jclass that, jint arg0, jfloatArray arg1)
-{
- jfloat *lparg1=NULL;
-
- NATIVE_ENTER(env, that, "glLightModelfv\n")
- if (arg1) lparg1 = (*env)->GetFloatArrayElements(env, arg1, NULL);
- glLightModelfv(arg0, lparg1);
- if (arg1) (*env)->ReleaseFloatArrayElements(env, arg1, lparg1, 0);
- NATIVE_EXIT(env, that, "glLightModelfv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glLightModeli)
- (JNIEnv *env, jclass that, jint arg0, jint arg1)
-{
- NATIVE_ENTER(env, that, "glLightModeli\n")
- glLightModeli(arg0, arg1);
- NATIVE_EXIT(env, that, "glLightModeli\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glLightModeliv)
- (JNIEnv *env, jclass that, jint arg0, jintArray arg1)
-{
- jint *lparg1=NULL;
-
- NATIVE_ENTER(env, that, "glLightModeliv\n")
- if (arg1) lparg1 = (*env)->GetIntArrayElements(env, arg1, NULL);
- glLightModeliv(arg0, (GLint *)lparg1);
- if (arg1) (*env)->ReleaseIntArrayElements(env, arg1, lparg1, 0);
- NATIVE_EXIT(env, that, "glLightModeliv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glLightf)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jfloat arg2)
-{
- NATIVE_ENTER(env, that, "glLightf\n")
- glLightf(arg0, arg1, arg2);
- NATIVE_EXIT(env, that, "glLightf\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glLightfv)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jfloatArray arg2)
-{
- jfloat *lparg2=NULL;
-
- NATIVE_ENTER(env, that, "glLightfv\n")
- if (arg2) lparg2 = (*env)->GetFloatArrayElements(env, arg2, NULL);
- glLightfv(arg0, arg1, lparg2);
- if (arg2) (*env)->ReleaseFloatArrayElements(env, arg2, lparg2, 0);
- NATIVE_EXIT(env, that, "glLightfv\n")
-}
-/*
-JNIEXPORT void JNICALL GL_NATIVE(glLightfv)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jfloat *arg2)
-{
- NATIVE_ENTER(env, that, "glLightfv\n")
- glLightfv(arg0, arg1, arg2);
- NATIVE_EXIT(env, that, "glLightfv\n")
-}
-*/
-JNIEXPORT void JNICALL GL_NATIVE(glLighti)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2)
-{
- NATIVE_ENTER(env, that, "glLighti\n")
- glLighti(arg0, arg1, arg2);
- NATIVE_EXIT(env, that, "glLighti\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glLightiv)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jintArray arg2)
-{
- jint *lparg2=NULL;
-
- NATIVE_ENTER(env, that, "glLightiv\n")
- if (arg2) lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL);
- glLightiv(arg0, arg1, (GLint *)lparg2);
- if (arg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
- NATIVE_EXIT(env, that, "glLightiv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glLineStipple)
- (JNIEnv *env, jclass that, jint arg0, jshort arg1)
-{
- NATIVE_ENTER(env, that, "glLineStipple\n")
- glLineStipple(arg0, arg1);
- NATIVE_EXIT(env, that, "glLineStipple\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glLineWidth)
- (JNIEnv *env, jclass that, jfloat arg0)
-{
- NATIVE_ENTER(env, that, "glLineWidth\n")
- glLineWidth(arg0);
- NATIVE_EXIT(env, that, "glLineWidth\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glListBase)
- (JNIEnv *env, jclass that, jint arg0)
-{
- NATIVE_ENTER(env, that, "glListBase\n")
- glListBase(arg0);
- NATIVE_EXIT(env, that, "glListBase\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glLoadIdentity)
- (JNIEnv *env, jclass that)
-{
- NATIVE_ENTER(env, that, "glLoadIdentity\n")
- glLoadIdentity();
- NATIVE_EXIT(env, that, "glLoadIdentity\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glLoadMatrixd)
- (JNIEnv *env, jclass that, jdoubleArray arg0)
-{
- jdouble *lparg0=NULL;
-
- NATIVE_ENTER(env, that, "glLoadMatrixd\n")
- if (arg0) lparg0 = (*env)->GetDoubleArrayElements(env, arg0, NULL);
- glLoadMatrixd(lparg0);
- if (arg0) (*env)->ReleaseDoubleArrayElements(env, arg0, lparg0, 0);
- NATIVE_EXIT(env, that, "glLoadMatrixd\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glLoadMatrixf)
- (JNIEnv *env, jclass that, jfloatArray arg0)
-{
- jfloat *lparg0=NULL;
-
- NATIVE_ENTER(env, that, "glLoadMatrixf\n")
- if (arg0) lparg0 = (*env)->GetFloatArrayElements(env, arg0, NULL);
- glLoadMatrixf(lparg0);
- if (arg0) (*env)->ReleaseFloatArrayElements(env, arg0, lparg0, 0);
- NATIVE_EXIT(env, that, "glLoadMatrixf\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glLoadName)
- (JNIEnv *env, jclass that, jint arg0)
-{
- NATIVE_ENTER(env, that, "glLoadName\n")
- glLoadName(arg0);
- NATIVE_EXIT(env, that, "glLoadName\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glLogicOp)
- (JNIEnv *env, jclass that, jint arg0)
-{
- NATIVE_ENTER(env, that, "glLogicOp\n")
- glLogicOp(arg0);
- NATIVE_EXIT(env, that, "glLogicOp\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glMap2f)
- (JNIEnv *env, jclass that, jint arg0, jfloat arg1, jfloat arg2, jint arg3, jint arg4,
- jfloat arg5, jfloat arg6, jint arg7, jint arg8, jfloatArray arg9)
-{
- jfloat *lparg9=NULL;
-
- NATIVE_ENTER(env, that, "glMap2f\n")
- if (arg9) lparg9 = (*env)->GetFloatArrayElements(env, arg9, NULL);
- glMap2f(arg0, arg1, arg2, arg3, arg4 ,arg5, arg6, arg7, arg8, lparg9);
- if (arg9) (*env)->ReleaseFloatArrayElements(env, arg9, lparg9, 0);
- NATIVE_EXIT(env, that, "glMap2f\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glMap2d)
- (JNIEnv *env, jclass that, jint arg0, jdouble arg1, jdouble arg2, jint arg3, jint arg4,
- jdouble arg5, jdouble arg6, jint arg7, jint arg8, jdoubleArray arg9)
-{
- jdouble *lparg9=NULL;
-
- NATIVE_ENTER(env, that, "glMap2d\n")
- if (arg9) lparg9 = (*env)->GetDoubleArrayElements(env, arg9, NULL);
- glMap2d(arg0, arg1, arg2, arg3, arg4 ,arg5, arg6, arg7, arg8, lparg9);
- if (arg9) (*env)->ReleaseDoubleArrayElements(env, arg9, lparg9, 0);
- NATIVE_EXIT(env, that, "glMap2d\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glMap1d)
- (JNIEnv *env, jclass that, jint arg0, jdouble arg1, jdouble arg2, jint arg3, jint arg4, jdoubleArray arg5)
-{
- jdouble *lparg5=NULL;
-
- NATIVE_ENTER(env, that, "glMap1d\n")
- if (arg5) lparg5 = (*env)->GetDoubleArrayElements(env, arg5, NULL);
- glMap1d(arg0, arg1, arg2, arg3, arg4, lparg5);
- if (arg5) (*env)->ReleaseDoubleArrayElements(env, arg5, lparg5, 0);
- NATIVE_EXIT(env, that, "glMap1d\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glMap1f)
- (JNIEnv *env, jclass that, jint arg0, jfloat arg1, jfloat arg2, jint arg3, jint arg4, jfloatArray arg5)
-{
- jfloat *lparg5=NULL;
-
- NATIVE_ENTER(env, that, "glMap1f\n")
- if (arg5) lparg5 = (*env)->GetFloatArrayElements(env, arg5, NULL);
- glMap1f(arg0, arg1, arg2, arg3, arg4, lparg5);
- if (arg5) (*env)->ReleaseFloatArrayElements(env, arg5, lparg5, 0);
- NATIVE_EXIT(env, that, "glMap1f\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glMapGrid1d)
- (JNIEnv *env, jclass that, jint arg0, jdouble arg1, jdouble arg2)
-{
- NATIVE_ENTER(env, that, "glMapGrid1d\n")
- glMapGrid1d(arg0, arg1, arg2);
- NATIVE_EXIT(env, that, "glMapGrid1d\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glMapGrid1f)
- (JNIEnv *env, jclass that, jint arg0, jfloat arg1, jfloat arg2)
-{
- NATIVE_ENTER(env, that, "glMapGrid1f\n")
- glMapGrid1f(arg0, arg1, arg2);
- NATIVE_EXIT(env, that, "glMapGrid1f\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glMapGrid2d)
- (JNIEnv *env, jclass that, jint arg0, jdouble arg1, jdouble arg2, jint arg3, jdouble arg4, jdouble arg5)
-{
- NATIVE_ENTER(env, that, "glMapGrid2d\n")
- glMapGrid2d(arg0, arg1, arg2, arg3, arg4, arg5);
- NATIVE_EXIT(env, that, "glMapGrid2d\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glMapGrid2f)
- (JNIEnv *env, jclass that, jint arg0, jfloat arg1, jfloat arg2, jint arg3, jfloat arg4, jfloat arg5)
-{
- NATIVE_ENTER(env, that, "glMapGrid2f\n")
- glMapGrid2f(arg0, arg1, arg2, arg3, arg4, arg5);
- NATIVE_EXIT(env, that, "glMapGrid2f\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glMaterialf)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jfloat arg2)
-{
- NATIVE_ENTER(env, that, "glMaterialf\n")
- glMaterialf(arg0, arg1, arg2);
- NATIVE_EXIT(env, that, "glMaterialf\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glMaterialfv)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jfloatArray arg2)
-{
- jfloat *lparg2=NULL;
-
- NATIVE_ENTER(env, that, "glMaterialfv\n")
- if (arg2) lparg2 = (*env)->GetFloatArrayElements(env, arg2, NULL);
- glMaterialfv(arg0, arg1, lparg2);
- if (arg2) (*env)->ReleaseFloatArrayElements(env, arg2, lparg2, 0);
- NATIVE_EXIT(env, that, "glMaterialfv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glMateriali)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2)
-{
- NATIVE_ENTER(env, that, "glMateriali\n")
- glMateriali(arg0, arg1, arg2);
- NATIVE_EXIT(env, that, "glMateriali\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glMaterialiv)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jintArray arg2)
-{
- jint *lparg2=NULL;
-
- NATIVE_ENTER(env, that, "glMaterialiv\n")
- if (arg2) lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL);
- glMaterialiv(arg0, arg1, (GLint *)lparg2);
- if (arg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
- NATIVE_EXIT(env, that, "glMaterialiv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glMatrixMode)
- (JNIEnv *env, jclass that, jint arg0)
-{
- NATIVE_ENTER(env, that, "glMatrixMode\n")
- glMatrixMode(arg0);
- NATIVE_EXIT(env, that, "glMatrixMode\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glMultMatrixd)
- (JNIEnv *env, jclass that, jdoubleArray arg0)
-{
- jdouble *lparg0=NULL;
-
- NATIVE_ENTER(env, that, "glMultMatrixd\n")
- if (arg0) lparg0 = (*env)->GetDoubleArrayElements(env, arg0, NULL);
- glMultMatrixd(lparg0);
- if (arg0) (*env)->ReleaseDoubleArrayElements(env, arg0, lparg0, 0);
- NATIVE_EXIT(env, that, "glMultMatrixd\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glMultMatrixf)
- (JNIEnv *env, jclass that, jfloatArray arg0)
-{
- jfloat *lparg0=NULL;
-
- NATIVE_ENTER(env, that, "glMultMatrixf\n")
- if (arg0) lparg0 = (*env)->GetFloatArrayElements(env, arg0, NULL);
- glMultMatrixf(lparg0);
- if (arg0) (*env)->ReleaseFloatArrayElements(env, arg0, lparg0, 0);
- NATIVE_EXIT(env, that, "glMultMatrixf\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glNewList)
- (JNIEnv *env, jclass that, jint arg0, jint arg1)
-{
- NATIVE_ENTER(env, that, "glNewList\n")
- glNewList(arg0, arg1);
- NATIVE_EXIT(env, that, "glNewList\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glNormal3b)
- (JNIEnv *env, jclass that, jbyte arg0, jbyte arg1, jbyte arg2)
-{
- NATIVE_ENTER(env, that, "glNormal3b\n")
- glNormal3b(arg0, arg1, arg2);
- NATIVE_EXIT(env, that, "glNormal3b\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glNormal3bv)
- (JNIEnv *env, jclass that, jbyteArray arg0)
-{
- jbyte *lparg0=NULL;
-
- NATIVE_ENTER(env, that, "glNormal3bv\n")
- if (arg0) lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL);
- glNormal3bv(lparg0);
- if (arg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
- NATIVE_EXIT(env, that, "glNormal3bv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glNormal3d)
- (JNIEnv *env, jclass that, jdouble arg0, jdouble arg1, jdouble arg2)
-{
- NATIVE_ENTER(env, that, "glNormal3d\n")
- glNormal3d(arg0, arg1, arg2);
- NATIVE_EXIT(env, that, "glNormal3d\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glNormal3dv)
- (JNIEnv *env, jclass that, jdoubleArray arg0)
-{
- jdouble *lparg0=NULL;
-
- NATIVE_ENTER(env, that, "glNormal3dv\n")
- if (arg0) lparg0 = (*env)->GetDoubleArrayElements(env, arg0, NULL);
- glNormal3dv(lparg0);
- if (arg0) (*env)->ReleaseDoubleArrayElements(env, arg0, lparg0, 0);
- NATIVE_EXIT(env, that, "glNormal3dv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glNormal3f)
- (JNIEnv *env, jclass that, jfloat arg0, jfloat arg1, jfloat arg2)
-{
- NATIVE_ENTER(env, that, "glNormal3f\n")
- glNormal3f(arg0, arg1, arg2);
- NATIVE_EXIT(env, that, "glNormal3f\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glNormal3fv)
- (JNIEnv *env, jclass that, jfloatArray arg0)
-{
- jfloat *lparg0=NULL;
-
- NATIVE_ENTER(env, that, "glNormal3fv\n")
- if (arg0) lparg0 = (*env)->GetFloatArrayElements(env, arg0, NULL);
- glNormal3fv(lparg0);
- if (arg0) (*env)->ReleaseFloatArrayElements(env, arg0, lparg0, 0);
- NATIVE_EXIT(env, that, "glNormal3fv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glNormal3i)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2)
-{
- NATIVE_ENTER(env, that, "glNormal3i\n")
- glNormal3i(arg0, arg1, arg2);
- NATIVE_EXIT(env, that, "glNormal3i\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glNormal3iv)
- (JNIEnv *env, jclass that, jintArray arg0)
-{
- jint *lparg0=NULL;
-
- NATIVE_ENTER(env, that, "glNormal3iv\n")
- if (arg0) lparg0 = (*env)->GetIntArrayElements(env, arg0, NULL);
- glNormal3iv((GLint *)lparg0);
- if (arg0) (*env)->ReleaseIntArrayElements(env, arg0, lparg0, 0);
- NATIVE_EXIT(env, that, "glNormal3iv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glNormal3s)
- (JNIEnv *env, jclass that, jshort arg0, jshort arg1, jshort arg2)
-{
- NATIVE_ENTER(env, that, "glNormal3s\n")
- glNormal3s(arg0, arg1, arg2);
- NATIVE_EXIT(env, that, "glNormal3s\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glNormal3sv)
- (JNIEnv *env, jclass that, jshortArray arg0)
-{
- jshort *lparg0=NULL;
-
- NATIVE_ENTER(env, that, "glNormal3sv\n")
- if (arg0) lparg0 = (*env)->GetShortArrayElements(env, arg0, NULL);
- glNormal3sv(lparg0);
- if (arg0) (*env)->ReleaseShortArrayElements(env, arg0, lparg0, 0);
- NATIVE_EXIT(env, that, "glNormal3sv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glNormalPointer)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jintArray arg2)
-{
- jint *lparg2=NULL;
-
- NATIVE_ENTER(env, that, "glNormalPointer\n")
- if (arg2) lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL);
- glNormalPointer(arg0, arg1, lparg2);
- if (arg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
- NATIVE_EXIT(env, that, "glNormalPointer\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glOrtho)
- (JNIEnv *env, jclass that, jdouble arg0, jdouble arg1, jdouble arg2, jdouble arg3, jdouble arg4, jdouble arg5)
-{
- NATIVE_ENTER(env, that, "glOrtho\n")
- glOrtho(arg0, arg1, arg2, arg3, arg4, arg5);
- NATIVE_EXIT(env, that, "glOrtho\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glPassThrough)
- (JNIEnv *env, jclass that, jfloat arg0)
-{
- NATIVE_ENTER(env, that, "glPassThrough\n")
- glPassThrough(arg0);
- NATIVE_EXIT(env, that, "glPassThrough\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glPixelMapfv)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jfloatArray arg2)
-{
- jfloat *lparg2=NULL;
-
- NATIVE_ENTER(env, that, "glPixelMapfv\n")
- if (arg2) lparg2 = (*env)->GetFloatArrayElements(env, arg2, NULL);
- glPixelMapfv(arg0, arg1, lparg2);
- if (arg2) (*env)->ReleaseFloatArrayElements(env, arg2, lparg2, 0);
- NATIVE_EXIT(env, that, "glPixelMapfv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glPixelMapuiv)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jintArray arg2)
-{
- jint *lparg2=NULL;
-
- NATIVE_ENTER(env, that, "glPixelMapuiv\n")
- if (arg2) lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL);
- glPixelMapuiv(arg0, arg1, (unsigned int *)lparg2);
- if (arg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
- NATIVE_EXIT(env, that, "glPixelMapuiv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glPixelMapusv)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jshortArray arg2)
-{
- jshort *lparg2=NULL;
-
- NATIVE_ENTER(env, that, "glPixelMapusv\n")
- if (arg2) lparg2 = (*env)->GetShortArrayElements(env, arg2, NULL);
- glPixelMapusv(arg0, arg1, (unsigned short *)lparg2);
- if (arg2) (*env)->ReleaseShortArrayElements(env, arg2, lparg2, 0);
- NATIVE_EXIT(env, that, "glPixelMapusv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glPixelStoref)
- (JNIEnv *env, jclass that, jint arg0, jfloat arg1)
-{
- NATIVE_ENTER(env, that, "glPixelStoref\n")
- glPixelStoref(arg0, arg1);
- NATIVE_EXIT(env, that, "glPixelStoref\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glPixelStorei)
- (JNIEnv *env, jclass that, jint arg0, jint arg1)
-{
- NATIVE_ENTER(env, that, "glPixelStorei\n")
- glPixelStorei(arg0, arg1);
- NATIVE_EXIT(env, that, "glPixelStorei\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glPixelTransferf)
- (JNIEnv *env, jclass that, jint arg0, jfloat arg1)
-{
- NATIVE_ENTER(env, that, "glPixelTransferf\n")
- glPixelTransferf(arg0, arg1);
- NATIVE_EXIT(env, that, "glPixelTransferf\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glPixelTransferi)
- (JNIEnv *env, jclass that, jint arg0, jint arg1)
-{
- NATIVE_ENTER(env, that, "glPixelTransferi\n")
- glPixelTransferi(arg0, arg1);
- NATIVE_EXIT(env, that, "glPixelTransferi\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glPixelZoom)
- (JNIEnv *env, jclass that, jfloat arg0, jfloat arg1)
-{
- NATIVE_ENTER(env, that, "glPixelZoom\n")
- glPixelZoom(arg0, arg1);
- NATIVE_EXIT(env, that, "glPixelZoom\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glPointSize)
- (JNIEnv *env, jclass that, jfloat arg0)
-{
- NATIVE_ENTER(env, that, "glPointSize\n")
- glPointSize(arg0);
- NATIVE_EXIT(env, that, "glPointSize\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glPolygonMode)
- (JNIEnv *env, jclass that, jint arg0, jint arg1)
-{
- NATIVE_ENTER(env, that, "glPolygonMode\n")
- glPolygonMode(arg0, arg1);
- NATIVE_EXIT(env, that, "glPolygonMode\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glPolygonOffset)
- (JNIEnv *env, jclass that, jfloat arg0, jfloat arg1)
-{
- NATIVE_ENTER(env, that, "glPolygonOffset\n")
- glPolygonOffset(arg0, arg1);
- NATIVE_EXIT(env, that, "glPolygonOffset\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glPolygonStipple)
- (JNIEnv *env, jclass that, jbyteArray arg0)
-{
- jbyte *lparg0=NULL;
-
- NATIVE_ENTER(env, that, "glPolygonStipple\n")
- if (arg0) lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL);
- glPolygonStipple((unsigned char *)lparg0);
- if (arg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
- NATIVE_EXIT(env, that, "glPolygonStipple\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glPopAttrib)
- (JNIEnv *env, jclass that)
-{
- NATIVE_ENTER(env, that, "glPopAttrib\n")
- glPopAttrib();
- NATIVE_EXIT(env, that, "glPopAttrib\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glPopClientAttrib)
- (JNIEnv *env, jclass that)
-{
- NATIVE_ENTER(env, that, "glPopClientAttrib\n")
- glPopClientAttrib();
- NATIVE_EXIT(env, that, "glPopClientAttrib\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glPopMatrix)
- (JNIEnv *env, jclass that)
-{
- NATIVE_ENTER(env, that, "glPopMatrix\n")
- glPopMatrix();
- NATIVE_EXIT(env, that, "glPopMatrix\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glPopName)
- (JNIEnv *env, jclass that)
-{
- NATIVE_ENTER(env, that, "glPopName\n")
- glPopName();
- NATIVE_EXIT(env, that, "glPopName\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glPrioritizeTextures)
- (JNIEnv *env, jclass that, jint arg0, jintArray arg1, jfloatArray arg2)
-{
- jint *lparg1=NULL;
- jfloat *lparg2=NULL;
-
- NATIVE_ENTER(env, that, "glPrioritizeTextures\n")
- if (arg1) lparg1 = (*env)->GetIntArrayElements(env, arg1, NULL);
- if (arg2) lparg2 = (*env)->GetFloatArrayElements(env, arg2, NULL);
- glPrioritizeTextures(arg0, (unsigned int *)lparg1, lparg2);
- if (arg1) (*env)->ReleaseIntArrayElements(env, arg1, lparg1, 0);
- if (arg2) (*env)->ReleaseFloatArrayElements(env, arg2, lparg2, 0);
- NATIVE_EXIT(env, that, "glPrioritizeTextures\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glPushAttrib)
- (JNIEnv *env, jclass that, jint arg0)
-{
- NATIVE_ENTER(env, that, "glPushAttrib\n")
- glPushAttrib(arg0);
- NATIVE_EXIT(env, that, "glPushAttrib\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glPushClientAttrib)
- (JNIEnv *env, jclass that, jint arg0)
-{
- NATIVE_ENTER(env, that, "glPushClientAttrib\n")
- glPushClientAttrib(arg0);
- NATIVE_EXIT(env, that, "glPushClientAttrib\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glPushMatrix)
- (JNIEnv *env, jclass that)
-{
- NATIVE_ENTER(env, that, "glPushMatrix\n")
- glPushMatrix();
- NATIVE_EXIT(env, that, "glPushMatrix\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glPushName)
- (JNIEnv *env, jclass that, jint arg0)
-{
- NATIVE_ENTER(env, that, "glPushName\n")
- glPushName(arg0);
- NATIVE_EXIT(env, that, "glPushName\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glRasterPos2d)
- (JNIEnv *env, jclass that, jdouble arg0, jdouble arg1)
-{
- NATIVE_ENTER(env, that, "glRasterPos2d\n")
- glRasterPos2d(arg0, arg1);
- NATIVE_EXIT(env, that, "glRasterPos2d\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glRasterPos2dv)
- (JNIEnv *env, jclass that, jdoubleArray arg0)
-{
- jdouble *lparg0=NULL;
-
- NATIVE_ENTER(env, that, "glRasterPos2dv\n")
- if (arg0) lparg0 = (*env)->GetDoubleArrayElements(env, arg0, NULL);
- glRasterPos2dv(lparg0);
- if (arg0) (*env)->ReleaseDoubleArrayElements(env, arg0, lparg0, 0);
- NATIVE_EXIT(env, that, "glRasterPos2dv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glRasterPos2f)
- (JNIEnv *env, jclass that, jfloat arg0, jfloat arg1)
-{
- NATIVE_ENTER(env, that, "glRasterPos2f\n")
- glRasterPos2f(arg0, arg1);
- NATIVE_EXIT(env, that, "glRasterPos2f\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glRasterPos2fv)
- (JNIEnv *env, jclass that, jfloatArray arg0)
-{
- jfloat *lparg0=NULL;
-
- NATIVE_ENTER(env, that, "glRasterPos2fv\n")
- if (arg0) lparg0 = (*env)->GetFloatArrayElements(env, arg0, NULL);
- glRasterPos2fv(lparg0);
- if (arg0) (*env)->ReleaseFloatArrayElements(env, arg0, lparg0, 0);
- NATIVE_EXIT(env, that, "glRasterPos2fv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glRasterPos2i)
- (JNIEnv *env, jclass that, jint arg0, jint arg1)
-{
- NATIVE_ENTER(env, that, "glRasterPos2i\n")
- glRasterPos2i(arg0, arg1);
- NATIVE_EXIT(env, that, "glRasterPos2i\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glRasterPos2iv)
- (JNIEnv *env, jclass that, jintArray arg0)
-{
- jint *lparg0=NULL;
-
- NATIVE_ENTER(env, that, "glRasterPos2iv\n")
- if (arg0) lparg0 = (*env)->GetIntArrayElements(env, arg0, NULL);
- glRasterPos2iv((GLint *)lparg0);
- if (arg0) (*env)->ReleaseIntArrayElements(env, arg0, lparg0, 0);
- NATIVE_EXIT(env, that, "glRasterPos2iv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glRasterPos2s)
- (JNIEnv *env, jclass that, jshort arg0, jshort arg1)
-{
- NATIVE_ENTER(env, that, "glRasterPos2s\n")
- glRasterPos2s(arg0, arg1);
- NATIVE_EXIT(env, that, "glRasterPos2s\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glRasterPos2sv)
- (JNIEnv *env, jclass that, jshortArray arg0)
-{
- jshort *lparg0=NULL;
-
- NATIVE_ENTER(env, that, "glRasterPos2sv\n")
- if (arg0) lparg0 = (*env)->GetShortArrayElements(env, arg0, NULL);
- glRasterPos2sv(lparg0);
- if (arg0) (*env)->ReleaseShortArrayElements(env, arg0, lparg0, 0);
- NATIVE_EXIT(env, that, "glRasterPos2sv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glRasterPos3d)
- (JNIEnv *env, jclass that, jdouble arg0, jdouble arg1, jdouble arg2)
-{
- NATIVE_ENTER(env, that, "glRasterPos3d\n")
- glRasterPos3d(arg0, arg1, arg2);
- NATIVE_EXIT(env, that, "glRasterPos3d\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glRasterPos3dv)
- (JNIEnv *env, jclass that, jdoubleArray arg0)
-{
- jdouble *lparg0=NULL;
-
- NATIVE_ENTER(env, that, "glRasterPos3dv\n")
- if (arg0) lparg0 = (*env)->GetDoubleArrayElements(env, arg0, NULL);
- glRasterPos3dv(lparg0);
- if (arg0) (*env)->ReleaseDoubleArrayElements(env, arg0, lparg0, 0);
- NATIVE_EXIT(env, that, "glRasterPos3dv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glRasterPos3f)
- (JNIEnv *env, jclass that, jfloat arg0, jfloat arg1, jfloat arg2)
-{
- NATIVE_ENTER(env, that, "glRasterPos3f\n")
- glRasterPos3f(arg0, arg1, arg2);
- NATIVE_EXIT(env, that, "glRasterPos3f\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glRasterPos3fv)
- (JNIEnv *env, jclass that, jfloatArray arg0)
-{
- jfloat *lparg0=NULL;
-
- NATIVE_ENTER(env, that, "glRasterPos3fv\n")
- if (arg0) lparg0 = (*env)->GetFloatArrayElements(env, arg0, NULL);
- glRasterPos3fv(lparg0);
- if (arg0) (*env)->ReleaseFloatArrayElements(env, arg0, lparg0, 0);
- NATIVE_EXIT(env, that, "glRasterPos3fv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glRasterPos3i)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2)
-{
- NATIVE_ENTER(env, that, "glRasterPos3i\n")
- glRasterPos3i(arg0, arg1, arg2);
- NATIVE_EXIT(env, that, "glRasterPos3i\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glRasterPos3iv)
- (JNIEnv *env, jclass that, jintArray arg0)
-{
- jint *lparg0=NULL;
-
- NATIVE_ENTER(env, that, "glRasterPos3iv\n")
- if (arg0) lparg0 = (*env)->GetIntArrayElements(env, arg0, NULL);
- glRasterPos3iv((GLint *)lparg0);
- if (arg0) (*env)->ReleaseIntArrayElements(env, arg0, lparg0, 0);
- NATIVE_EXIT(env, that, "glRasterPos3iv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glRasterPos3s)
- (JNIEnv *env, jclass that, jshort arg0, jshort arg1, jshort arg2)
-{
- NATIVE_ENTER(env, that, "glRasterPos3s\n")
- glRasterPos3s(arg0, arg1, arg2);
- NATIVE_EXIT(env, that, "glRasterPos3s\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glRasterPos3sv)
- (JNIEnv *env, jclass that, jshortArray arg0)
-{
- jshort *lparg0=NULL;
-
- NATIVE_ENTER(env, that, "glRasterPos3sv\n")
- if (arg0) lparg0 = (*env)->GetShortArrayElements(env, arg0, NULL);
- glRasterPos3sv(lparg0);
- if (arg0) (*env)->ReleaseShortArrayElements(env, arg0, lparg0, 0);
- NATIVE_EXIT(env, that, "glRasterPos3sv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glRasterPos4d)
- (JNIEnv *env, jclass that, jdouble arg0, jdouble arg1, jdouble arg2, jdouble arg3)
-{
- NATIVE_ENTER(env, that, "glRasterPos4d\n")
- glRasterPos4d(arg0, arg1, arg2, arg3);
- NATIVE_EXIT(env, that, "glRasterPos4d\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glRasterPos4dv)
- (JNIEnv *env, jclass that, jdoubleArray arg0)
-{
- jdouble *lparg0=NULL;
-
- NATIVE_ENTER(env, that, "glRasterPos4dv\n")
- if (arg0) lparg0 = (*env)->GetDoubleArrayElements(env, arg0, NULL);
- glRasterPos4dv(lparg0);
- if (arg0) (*env)->ReleaseDoubleArrayElements(env, arg0, lparg0, 0);
- NATIVE_EXIT(env, that, "glRasterPos4dv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glRasterPos4f)
- (JNIEnv *env, jclass that, jfloat arg0, jfloat arg1, jfloat arg2, jfloat arg3)
-{
- NATIVE_ENTER(env, that, "glRasterPos4f\n")
- glRasterPos4f(arg0, arg1, arg2, arg3);
- NATIVE_EXIT(env, that, "glRasterPos4f\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glRasterPos4fv)
- (JNIEnv *env, jclass that, jfloatArray arg0)
-{
- jfloat *lparg0=NULL;
-
- NATIVE_ENTER(env, that, "glRasterPos4fv\n")
- if (arg0) lparg0 = (*env)->GetFloatArrayElements(env, arg0, NULL);
- glRasterPos4fv(lparg0);
- if (arg0) (*env)->ReleaseFloatArrayElements(env, arg0, lparg0, 0);
- NATIVE_EXIT(env, that, "glRasterPos4fv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glRasterPos4i)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jint arg3)
-{
- NATIVE_ENTER(env, that, "glRasterPos4i\n")
- glRasterPos4i(arg0, arg1, arg2, arg3);
- NATIVE_EXIT(env, that, "glRasterPos4i\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glRasterPos4iv)
- (JNIEnv *env, jclass that, jintArray arg0)
-{
- jint *lparg0=NULL;
-
- NATIVE_ENTER(env, that, "glRasterPos4iv\n")
- if (arg0) lparg0 = (*env)->GetIntArrayElements(env, arg0, NULL);
- glRasterPos4iv((GLint *)lparg0);
- if (arg0) (*env)->ReleaseIntArrayElements(env, arg0, lparg0, 0);
- NATIVE_EXIT(env, that, "glRasterPos4iv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glRasterPos4s)
- (JNIEnv *env, jclass that, jshort arg0, jshort arg1, jshort arg2, jshort arg3)
-{
- NATIVE_ENTER(env, that, "glRasterPos4s\n")
- glRasterPos4s(arg0, arg1, arg2, arg3);
- NATIVE_EXIT(env, that, "glRasterPos4s\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glRasterPos4sv)
- (JNIEnv *env, jclass that, jshortArray arg0)
-{
- jshort *lparg0=NULL;
-
- NATIVE_ENTER(env, that, "glRasterPos4sv\n")
- if (arg0) lparg0 = (*env)->GetShortArrayElements(env, arg0, NULL);
- glRasterPos4sv(lparg0);
- if (arg0) (*env)->ReleaseShortArrayElements(env, arg0, lparg0, 0);
- NATIVE_EXIT(env, that, "glRasterPos4sv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glReadBuffer)
- (JNIEnv *env, jclass that, jint arg0)
-{
- NATIVE_ENTER(env, that, "glReadBuffer\n")
- glReadBuffer(arg0);
- NATIVE_EXIT(env, that, "glReadBuffer\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glReadPixels)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jint arg3, jint arg4, jint arg5, jintArray arg6)
-{
- jint *lparg6=NULL;
-
- NATIVE_ENTER(env, that, "glReadPixels\n")
- if (arg6) lparg6 = (*env)->GetIntArrayElements(env, arg6, NULL);
- glReadPixels(arg0, arg1, arg2, arg3, arg4, arg5, lparg6);
- if (arg6) (*env)->ReleaseIntArrayElements(env, arg6, lparg6, 0);
- NATIVE_EXIT(env, that, "glReadPixels\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glRectd)
- (JNIEnv *env, jclass that, jdouble arg0, jdouble arg1, jdouble arg2, jdouble arg3)
-{
- NATIVE_ENTER(env, that, "glRectd\n")
- glRectd(arg0, arg1, arg2, arg3);
- NATIVE_EXIT(env, that, "glRectd\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glRectdv)
- (JNIEnv *env, jclass that, jdoubleArray arg0, jdoubleArray arg1)
-{
- jdouble *lparg0=NULL;
- jdouble *lparg1=NULL;
-
- NATIVE_ENTER(env, that, "glRectdv\n")
- if (arg0) lparg0 = (*env)->GetDoubleArrayElements(env, arg0, NULL);
- if (arg1) lparg1 = (*env)->GetDoubleArrayElements(env, arg1, NULL);
- glRectdv(lparg0, lparg1);
- if (arg0) (*env)->ReleaseDoubleArrayElements(env, arg0, lparg0, 0);
- if (arg1) (*env)->ReleaseDoubleArrayElements(env, arg1, lparg1, 0);
- NATIVE_EXIT(env, that, "glRectdv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glRectf)
- (JNIEnv *env, jclass that, jfloat arg0, jfloat arg1, jfloat arg2, jfloat arg3)
-{
- NATIVE_ENTER(env, that, "glRectf\n")
- glRectf(arg0, arg1, arg2, arg3);
- NATIVE_EXIT(env, that, "glRectf\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glRectfv)
- (JNIEnv *env, jclass that, jfloatArray arg0, jfloatArray arg1)
-{
- jfloat *lparg0=NULL;
- jfloat *lparg1=NULL;
-
- NATIVE_ENTER(env, that, "glRectfv\n")
- if (arg0) lparg0 = (*env)->GetFloatArrayElements(env, arg0, NULL);
- if (arg1) lparg1 = (*env)->GetFloatArrayElements(env, arg1, NULL);
- glRectfv(lparg0, lparg1);
- if (arg0) (*env)->ReleaseFloatArrayElements(env, arg0, lparg0, 0);
- if (arg1) (*env)->ReleaseFloatArrayElements(env, arg1, lparg1, 0);
- NATIVE_EXIT(env, that, "glRectfv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glRecti)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jint arg3)
-{
- NATIVE_ENTER(env, that, "glRecti\n")
- glRecti(arg0, arg1, arg2, arg3);
- NATIVE_EXIT(env, that, "glRecti\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glRectiv)
- (JNIEnv *env, jclass that, jintArray arg0, jintArray arg1)
-{
- jint *lparg0=NULL;
- jint *lparg1=NULL;
-
- NATIVE_ENTER(env, that, "glRectiv\n")
- if (arg0) lparg0 = (*env)->GetIntArrayElements(env, arg0, NULL);
- if (arg1) lparg1 = (*env)->GetIntArrayElements(env, arg1, NULL);
- glRectiv((GLint *)lparg0, (GLint *)lparg1);
- if (arg0) (*env)->ReleaseIntArrayElements(env, arg0, lparg0, 0);
- if (arg1) (*env)->ReleaseIntArrayElements(env, arg1, lparg1, 0);
- NATIVE_EXIT(env, that, "glRectiv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glRects)
- (JNIEnv *env, jclass that, jshort arg0, jshort arg1, jshort arg2, jshort arg3)
-{
- NATIVE_ENTER(env, that, "glRects\n")
- glRects(arg0, arg1, arg2, arg3);
- NATIVE_EXIT(env, that, "glRects\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glRectsv)
- (JNIEnv *env, jclass that, jshortArray arg0, jshortArray arg1)
-{
- jshort *lparg0=NULL;
- jshort *lparg1=NULL;
-
- NATIVE_ENTER(env, that, "glRectsv\n")
- if (arg0) lparg0 = (*env)->GetShortArrayElements(env, arg0, NULL);
- if (arg1) lparg1 = (*env)->GetShortArrayElements(env, arg1, NULL);
- glRectsv(lparg0, lparg1);
- if (arg0) (*env)->ReleaseShortArrayElements(env, arg0, lparg0, 0);
- if (arg1) (*env)->ReleaseShortArrayElements(env, arg1, lparg1, 0);
- NATIVE_EXIT(env, that, "glRectsv\n")
-}
-
-JNIEXPORT jint JNICALL GL_NATIVE(glRenderMode)
- (JNIEnv *env, jclass that, jint arg0)
-{
- jint rc;
- NATIVE_ENTER(env, that, "glRenderMode\n")
- rc = (jint)glRenderMode(arg0);
- NATIVE_EXIT(env, that, "glRenderMode\n")
- return rc;
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glRotated)
- (JNIEnv *env, jclass that, jdouble arg0, jdouble arg1, jdouble arg2, jdouble arg3)
-{
- NATIVE_ENTER(env, that, "glRotated\n")
- glRotated(arg0, arg1, arg2, arg3);
- NATIVE_EXIT(env, that, "glRotated\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glRotatef)
- (JNIEnv *env, jclass that, jfloat arg0, jfloat arg1, jfloat arg2, jfloat arg3)
-{
- NATIVE_ENTER(env, that, "glRotatef\n")
- glRotatef(arg0, arg1, arg2, arg3);
- NATIVE_EXIT(env, that, "glRotatef\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glScaled)
- (JNIEnv *env, jclass that, jdouble arg0, jdouble arg1, jdouble arg2)
-{
- NATIVE_ENTER(env, that, "glScaled\n")
- glScaled(arg0, arg1, arg2);
- NATIVE_EXIT(env, that, "glScaled\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glScalef)
- (JNIEnv *env, jclass that, jfloat arg0, jfloat arg1, jfloat arg2)
-{
- NATIVE_ENTER(env, that, "glScalef\n")
- glScalef(arg0, arg1, arg2);
- NATIVE_EXIT(env, that, "glScalef\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glScissor)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jint arg3)
-{
- NATIVE_ENTER(env, that, "glScissor\n")
- glScissor(arg0, arg1, arg2, arg3);
- NATIVE_EXIT(env, that, "glScissor\n")
-}
-
-/*
-JNIEXPORT void JNICALL GL_NATIVE(glSelectBuffer)
- (JNIEnv *env, jclass that, jint arg0, jintArray arg1)
-{
- jint *lparg1=NULL;
-
- NATIVE_ENTER(env, that, "glSelectBuffer\n")
- if (arg1) lparg1 = (*env)->GetIntArrayElements(env, arg1, NULL);
- glSelectBuffer(arg0, lparg1);
- if (arg1) (*env)->ReleaseIntArrayElements(env, arg1, lparg1, 0);
- NATIVE_EXIT(env, that, "glSelectBuffer\n")
-}
-*/
-
-
-JNIEXPORT void JNICALL GL_NATIVE(glSelectBuffer)
- (JNIEnv *env, jclass that, jint arg0, jint *arg1)
-{
- NATIVE_ENTER(env, that, "glSelectBuffer\n")
- glSelectBuffer(arg0, (unsigned int *)arg1);
- NATIVE_EXIT(env, that, "glSelectBuffer\n")
-}
-
-
-JNIEXPORT void JNICALL GL_NATIVE(glShadeModel)
- (JNIEnv *env, jclass that, jint arg0)
-{
- NATIVE_ENTER(env, that, "glShadeModel\n")
- glShadeModel(arg0);
- NATIVE_EXIT(env, that, "glShadeModel\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glStencilFunc)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2)
-{
- NATIVE_ENTER(env, that, "glStencilFunc\n")
- glStencilFunc(arg0, arg1, arg2);
- NATIVE_EXIT(env, that, "glStencilFunc\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glStencilMask)
- (JNIEnv *env, jclass that, jint arg0)
-{
- NATIVE_ENTER(env, that, "glStencilMask\n")
- glStencilMask(arg0);
- NATIVE_EXIT(env, that, "glStencilMask\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glStencilOp)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2)
-{
- NATIVE_ENTER(env, that, "glStencilOp\n")
- glStencilOp(arg0, arg1, arg2);
- NATIVE_EXIT(env, that, "glStencilOp\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glTexCoord1d)
- (JNIEnv *env, jclass that, jdouble arg0)
-{
- NATIVE_ENTER(env, that, "glTexCoord1d\n")
- glTexCoord1d(arg0);
- NATIVE_EXIT(env, that, "glTexCoord1d\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glTexCoord1dv)
- (JNIEnv *env, jclass that, jdoubleArray arg0)
-{
- jdouble *lparg0=NULL;
-
- NATIVE_ENTER(env, that, "glTexCoord1dv\n")
- if (arg0) lparg0 = (*env)->GetDoubleArrayElements(env, arg0, NULL);
- glTexCoord1dv(lparg0);
- if (arg0) (*env)->ReleaseDoubleArrayElements(env, arg0, lparg0, 0);
- NATIVE_EXIT(env, that, "glTexCoord1dv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glTexCoord1f)
- (JNIEnv *env, jclass that, jfloat arg0)
-{
- NATIVE_ENTER(env, that, "glTexCoord1f\n")
- glTexCoord1f(arg0);
- NATIVE_EXIT(env, that, "glTexCoord1f\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glTexCoord1fv)
- (JNIEnv *env, jclass that, jfloatArray arg0)
-{
- jfloat *lparg0=NULL;
-
- NATIVE_ENTER(env, that, "glTexCoord1fv\n")
- if (arg0) lparg0 = (*env)->GetFloatArrayElements(env, arg0, NULL);
- glTexCoord1fv(lparg0);
- if (arg0) (*env)->ReleaseFloatArrayElements(env, arg0, lparg0, 0);
- NATIVE_EXIT(env, that, "glTexCoord1fv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glTexCoord1i)
- (JNIEnv *env, jclass that, jint arg0)
-{
- NATIVE_ENTER(env, that, "glTexCoord1i\n")
- glTexCoord1i(arg0);
- NATIVE_EXIT(env, that, "glTexCoord1i\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glTexCoord1iv)
- (JNIEnv *env, jclass that, jintArray arg0)
-{
- jint *lparg0=NULL;
-
- NATIVE_ENTER(env, that, "glTexCoord1iv\n")
- if (arg0) lparg0 = (*env)->GetIntArrayElements(env, arg0, NULL);
- glTexCoord1iv((GLint *)lparg0);
- if (arg0) (*env)->ReleaseIntArrayElements(env, arg0, lparg0, 0);
- NATIVE_EXIT(env, that, "glTexCoord1iv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glTexCoord1s)
- (JNIEnv *env, jclass that, jshort arg0)
-{
- NATIVE_ENTER(env, that, "glTexCoord1s\n")
- glTexCoord1s(arg0);
- NATIVE_EXIT(env, that, "glTexCoord1s\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glTexCoord1sv)
- (JNIEnv *env, jclass that, jshortArray arg0)
-{
- jshort *lparg0=NULL;
-
- NATIVE_ENTER(env, that, "glTexCoord1sv\n")
- if (arg0) lparg0 = (*env)->GetShortArrayElements(env, arg0, NULL);
- glTexCoord1sv(lparg0);
- if (arg0) (*env)->ReleaseShortArrayElements(env, arg0, lparg0, 0);
- NATIVE_EXIT(env, that, "glTexCoord1sv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glTexCoord2d)
- (JNIEnv *env, jclass that, jdouble arg0, jdouble arg1)
-{
- NATIVE_ENTER(env, that, "glTexCoord2d\n")
- glTexCoord2d(arg0, arg1);
- NATIVE_EXIT(env, that, "glTexCoord2d\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glTexCoord2dv)
- (JNIEnv *env, jclass that, jdoubleArray arg0)
-{
- jdouble *lparg0=NULL;
-
- NATIVE_ENTER(env, that, "glTexCoord2dv\n")
- if (arg0) lparg0 = (*env)->GetDoubleArrayElements(env, arg0, NULL);
- glTexCoord2dv(lparg0);
- if (arg0) (*env)->ReleaseDoubleArrayElements(env, arg0, lparg0, 0);
- NATIVE_EXIT(env, that, "glTexCoord2dv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glTexCoord2f)
- (JNIEnv *env, jclass that, jfloat arg0, jfloat arg1)
-{
- NATIVE_ENTER(env, that, "glTexCoord2f\n")
- glTexCoord2f(arg0, arg1);
- NATIVE_EXIT(env, that, "glTexCoord2f\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glTexCoord2fv)
- (JNIEnv *env, jclass that, jfloatArray arg0)
-{
- jfloat *lparg0=NULL;
-
- NATIVE_ENTER(env, that, "glTexCoord2fv\n")
- if (arg0) lparg0 = (*env)->GetFloatArrayElements(env, arg0, NULL);
- glTexCoord2fv(lparg0);
- if (arg0) (*env)->ReleaseFloatArrayElements(env, arg0, lparg0, 0);
- NATIVE_EXIT(env, that, "glTexCoord2fv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glTexCoord2i)
- (JNIEnv *env, jclass that, jint arg0, jint arg1)
-{
- NATIVE_ENTER(env, that, "glTexCoord2i\n")
- glTexCoord2i(arg0, arg1);
- NATIVE_EXIT(env, that, "glTexCoord2i\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glTexCoord2iv)
- (JNIEnv *env, jclass that, jintArray arg0)
-{
- jint *lparg0=NULL;
-
- NATIVE_ENTER(env, that, "glTexCoord2iv\n")
- if (arg0) lparg0 = (*env)->GetIntArrayElements(env, arg0, NULL);
- glTexCoord2iv((GLint *)lparg0);
- if (arg0) (*env)->ReleaseIntArrayElements(env, arg0, lparg0, 0);
- NATIVE_EXIT(env, that, "glTexCoord2iv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glTexCoord2s)
- (JNIEnv *env, jclass that, jshort arg0, jshort arg1)
-{
- NATIVE_ENTER(env, that, "glTexCoord2s\n")
- glTexCoord2s(arg0, arg1);
- NATIVE_EXIT(env, that, "glTexCoord2s\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glTexCoord2sv)
- (JNIEnv *env, jclass that, jshortArray arg0)
-{
- jshort *lparg0=NULL;
-
- NATIVE_ENTER(env, that, "glTexCoord2sv\n")
- if (arg0) lparg0 = (*env)->GetShortArrayElements(env, arg0, NULL);
- glTexCoord2sv(lparg0);
- if (arg0) (*env)->ReleaseShortArrayElements(env, arg0, lparg0, 0);
- NATIVE_EXIT(env, that, "glTexCoord2sv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glTexCoord3d)
- (JNIEnv *env, jclass that, jdouble arg0, jdouble arg1, jdouble arg2)
-{
- NATIVE_ENTER(env, that, "glTexCoord3d\n")
- glTexCoord3d(arg0, arg1, arg2);
- NATIVE_EXIT(env, that, "glTexCoord3d\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glTexCoord3dv)
- (JNIEnv *env, jclass that, jdoubleArray arg0)
-{
- jdouble *lparg0=NULL;
-
- NATIVE_ENTER(env, that, "glTexCoord3dv\n")
- if (arg0) lparg0 = (*env)->GetDoubleArrayElements(env, arg0, NULL);
- glTexCoord3dv(lparg0);
- if (arg0) (*env)->ReleaseDoubleArrayElements(env, arg0, lparg0, 0);
- NATIVE_EXIT(env, that, "glTexCoord3dv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glTexCoord3f)
- (JNIEnv *env, jclass that, jfloat arg0, jfloat arg1, jfloat arg2)
-{
- NATIVE_ENTER(env, that, "glTexCoord3f\n")
- glTexCoord3f(arg0, arg1, arg2);
- NATIVE_EXIT(env, that, "glTexCoord3f\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glTexCoord3fv)
- (JNIEnv *env, jclass that, jfloatArray arg0)
-{
- jfloat *lparg0=NULL;
-
- NATIVE_ENTER(env, that, "glTexCoord3fv\n")
- if (arg0) lparg0 = (*env)->GetFloatArrayElements(env, arg0, NULL);
- glTexCoord3fv(lparg0);
- if (arg0) (*env)->ReleaseFloatArrayElements(env, arg0, lparg0, 0);
- NATIVE_EXIT(env, that, "glTexCoord3fv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glTexCoord3i)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2)
-{
- NATIVE_ENTER(env, that, "glTexCoord3i\n")
- glTexCoord3i(arg0, arg1, arg2);
- NATIVE_EXIT(env, that, "glTexCoord3i\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glTexCoord3iv)
- (JNIEnv *env, jclass that, jintArray arg0)
-{
- jint *lparg0=NULL;
-
- NATIVE_ENTER(env, that, "glTexCoord3iv\n")
- if (arg0) lparg0 = (*env)->GetIntArrayElements(env, arg0, NULL);
- glTexCoord3iv((GLint *)lparg0);
- if (arg0) (*env)->ReleaseIntArrayElements(env, arg0, lparg0, 0);
- NATIVE_EXIT(env, that, "glTexCoord3iv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glTexCoord3s)
- (JNIEnv *env, jclass that, jshort arg0, jshort arg1, jshort arg2)
-{
- NATIVE_ENTER(env, that, "glTexCoord3s\n")
- glTexCoord3s(arg0, arg1, arg2);
- NATIVE_EXIT(env, that, "glTexCoord3s\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glTexCoord3sv)
- (JNIEnv *env, jclass that, jshortArray arg0)
-{
- jshort *lparg0=NULL;
-
- NATIVE_ENTER(env, that, "glTexCoord3sv\n")
- if (arg0) lparg0 = (*env)->GetShortArrayElements(env, arg0, NULL);
- glTexCoord3sv(lparg0);
- if (arg0) (*env)->ReleaseShortArrayElements(env, arg0, lparg0, 0);
- NATIVE_EXIT(env, that, "glTexCoord3sv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glTexCoord4d)
- (JNIEnv *env, jclass that, jdouble arg0, jdouble arg1, jdouble arg2, jdouble arg3)
-{
- NATIVE_ENTER(env, that, "glTexCoord4d\n")
- glTexCoord4d(arg0, arg1, arg2, arg3);
- NATIVE_EXIT(env, that, "glTexCoord4d\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glTexCoord4dv)
- (JNIEnv *env, jclass that, jdoubleArray arg0)
-{
- jdouble *lparg0=NULL;
-
- NATIVE_ENTER(env, that, "glTexCoord4dv\n")
- if (arg0) lparg0 = (*env)->GetDoubleArrayElements(env, arg0, NULL);
- glTexCoord4dv(lparg0);
- if (arg0) (*env)->ReleaseDoubleArrayElements(env, arg0, lparg0, 0);
- NATIVE_EXIT(env, that, "glTexCoord4dv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glTexCoord4f)
- (JNIEnv *env, jclass that, jfloat arg0, jfloat arg1, jfloat arg2, jfloat arg3)
-{
- NATIVE_ENTER(env, that, "glTexCoord4f\n")
- glTexCoord4f(arg0, arg1, arg2, arg3);
- NATIVE_EXIT(env, that, "glTexCoord4f\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glTexCoord4fv)
- (JNIEnv *env, jclass that, jfloatArray arg0)
-{
- jfloat *lparg0=NULL;
-
- NATIVE_ENTER(env, that, "glTexCoord4fv\n")
- if (arg0) lparg0 = (*env)->GetFloatArrayElements(env, arg0, NULL);
- glTexCoord4fv(lparg0);
- if (arg0) (*env)->ReleaseFloatArrayElements(env, arg0, lparg0, 0);
- NATIVE_EXIT(env, that, "glTexCoord4fv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glTexCoord4i)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jint arg3)
-{
- NATIVE_ENTER(env, that, "glTexCoord4i\n")
- glTexCoord4i(arg0, arg1, arg2, arg3);
- NATIVE_EXIT(env, that, "glTexCoord4i\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glTexCoord4iv)
- (JNIEnv *env, jclass that, jintArray arg0)
-{
- jint *lparg0=NULL;
-
- NATIVE_ENTER(env, that, "glTexCoord4iv\n")
- if (arg0) lparg0 = (*env)->GetIntArrayElements(env, arg0, NULL);
- glTexCoord4iv((GLint *)lparg0);
- if (arg0) (*env)->ReleaseIntArrayElements(env, arg0, lparg0, 0);
- NATIVE_EXIT(env, that, "glTexCoord4iv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glTexCoord4s)
- (JNIEnv *env, jclass that, jshort arg0, jshort arg1, jshort arg2, jshort arg3)
-{
- NATIVE_ENTER(env, that, "glTexCoord4s\n")
- glTexCoord4s(arg0, arg1, arg2, arg3);
- NATIVE_EXIT(env, that, "glTexCoord4s\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glTexCoord4sv)
- (JNIEnv *env, jclass that, jshortArray arg0)
-{
- jshort *lparg0=NULL;
-
- NATIVE_ENTER(env, that, "glTexCoord4sv\n")
- if (arg0) lparg0 = (*env)->GetShortArrayElements(env, arg0, NULL);
- glTexCoord4sv(lparg0);
- if (arg0) (*env)->ReleaseShortArrayElements(env, arg0, lparg0, 0);
- NATIVE_EXIT(env, that, "glTexCoord4sv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glTexCoordPointer)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jintArray arg3)
-{
- jint *lparg3=NULL;
-
- NATIVE_ENTER(env, that, "glTexCoordPointer\n")
- if (arg3) lparg3 = (*env)->GetIntArrayElements(env, arg3, NULL);
- glTexCoordPointer(arg0, arg1, arg2, lparg3);
- if (arg3) (*env)->ReleaseIntArrayElements(env, arg3, lparg3, 0);
- NATIVE_EXIT(env, that, "glTexCoordPointer\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glTexEnvf)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jfloat arg2)
-{
- NATIVE_ENTER(env, that, "glTexEnvf\n")
- glTexEnvf(arg0, arg1, arg2);
- NATIVE_EXIT(env, that, "glTexEnvf\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glTexEnvfv)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jfloatArray arg2)
-{
- jfloat *lparg2=NULL;
-
- NATIVE_ENTER(env, that, "glTexEnvfv\n")
- if (arg2) lparg2 = (*env)->GetFloatArrayElements(env, arg2, NULL);
- glTexEnvfv(arg0, arg1, lparg2);
- if (arg2) (*env)->ReleaseFloatArrayElements(env, arg2, lparg2, 0);
- NATIVE_EXIT(env, that, "glTexEnvfv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glTexEnvi)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2)
-{
- NATIVE_ENTER(env, that, "glTexEnvi\n")
- glTexEnvi(arg0, arg1, arg2);
- NATIVE_EXIT(env, that, "glTexEnvi\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glTexEnviv)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jintArray arg2)
-{
- jint *lparg2=NULL;
-
- NATIVE_ENTER(env, that, "glTexEnviv\n")
- if (arg2) lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL);
- glTexEnviv(arg0, arg1, (GLint *)lparg2);
- if (arg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
- NATIVE_EXIT(env, that, "glTexEnviv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glTexGend)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jdouble arg2)
-{
- NATIVE_ENTER(env, that, "glTexGend\n")
- glTexGend(arg0, arg1, arg2);
- NATIVE_EXIT(env, that, "glTexGend\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glTexGendv)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jdoubleArray arg2)
-{
- jdouble *lparg2=NULL;
-
- NATIVE_ENTER(env, that, "glTexGendv\n")
- if (arg2) lparg2 = (*env)->GetDoubleArrayElements(env, arg2, NULL);
- glTexGendv(arg0, arg1, lparg2);
- if (arg2) (*env)->ReleaseDoubleArrayElements(env, arg2, lparg2, 0);
- NATIVE_EXIT(env, that, "glTexGendv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glTexGenf)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jfloat arg2)
-{
- NATIVE_ENTER(env, that, "glTexGenf\n")
- glTexGenf(arg0, arg1, arg2);
- NATIVE_EXIT(env, that, "glTexGenf\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glTexGenfv)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jfloatArray arg2)
-{
- jfloat *lparg2=NULL;
-
- NATIVE_ENTER(env, that, "glTexGenfv\n")
- if (arg2) lparg2 = (*env)->GetFloatArrayElements(env, arg2, NULL);
- glTexGenfv(arg0, arg1, lparg2);
- if (arg2) (*env)->ReleaseFloatArrayElements(env, arg2, lparg2, 0);
- NATIVE_EXIT(env, that, "glTexGenfv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glTexGeni)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2)
-{
- NATIVE_ENTER(env, that, "glTexGeni\n")
- glTexGeni(arg0, arg1, arg2);
- NATIVE_EXIT(env, that, "glTexGeni\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glTexGeniv)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jintArray arg2)
-{
- jint *lparg2=NULL;
-
- NATIVE_ENTER(env, that, "glTexGeniv\n")
- if (arg2) lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL);
- glTexGeniv(arg0, arg1, (GLint *)lparg2);
- if (arg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
- NATIVE_EXIT(env, that, "glTexGeniv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glTexImage1D)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jint arg3, jint arg4, jint arg5, jint arg6, jintArray arg7)
-{
- jint *lparg7=NULL;
-
- NATIVE_ENTER(env, that, "glTexImage1D\n")
- if (arg7) lparg7 = (*env)->GetIntArrayElements(env, arg7, NULL);
- glTexImage1D(arg0, arg1, arg2, arg3, arg4, arg5, arg6, lparg7);
- if (arg7) (*env)->ReleaseIntArrayElements(env, arg7, lparg7, 0);
- NATIVE_EXIT(env, that, "glTexImage1D\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glTexImage2D)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jint arg3, jint arg4, jint arg5, jint arg6, jint arg7, jbyteArray arg8)
-{
- jbyte *lparg8=NULL;
-
- NATIVE_ENTER(env, that, "glTexImage2D\n")
- if (arg8) lparg8 = (*env)->GetByteArrayElements(env, arg8, NULL);
- glTexImage2D(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, lparg8);
- if (arg8) (*env)->ReleaseByteArrayElements(env, arg8, lparg8, 0);
- NATIVE_EXIT(env, that, "glTexImage2D\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glTexParameterf)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jfloat arg2)
-{
- NATIVE_ENTER(env, that, "glTexParameterf\n")
- glTexParameterf(arg0, arg1, arg2);
- NATIVE_EXIT(env, that, "glTexParameterf\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glTexParameterfv)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jfloatArray arg2)
-{
- jfloat *lparg2=NULL;
-
- NATIVE_ENTER(env, that, "glTexParameterfv\n")
- if (arg2) lparg2 = (*env)->GetFloatArrayElements(env, arg2, NULL);
- glTexParameterfv(arg0, arg1, lparg2);
- if (arg2) (*env)->ReleaseFloatArrayElements(env, arg2, lparg2, 0);
- NATIVE_EXIT(env, that, "glTexParameterfv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glTexParameteri)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2)
-{
- NATIVE_ENTER(env, that, "glTexParameteri\n")
- glTexParameteri(arg0, arg1, arg2);
- NATIVE_EXIT(env, that, "glTexParameteri\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glTexParameteriv)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jintArray arg2)
-{
- jint *lparg2=NULL;
-
- NATIVE_ENTER(env, that, "glTexParameteriv\n")
- if (arg2) lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL);
- glTexParameteriv(arg0, arg1, (GLint *)lparg2);
- if (arg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
- NATIVE_EXIT(env, that, "glTexParameteriv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glTexSubImage1D)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jint arg3, jint arg4, jint arg5, jintArray arg6)
-{
- jint *lparg6=NULL;
-
- NATIVE_ENTER(env, that, "glTexSubImage1D\n")
- if (arg6) lparg6 = (*env)->GetIntArrayElements(env, arg6, NULL);
- glTexSubImage1D(arg0, arg1, arg2, arg3, arg4, arg5, lparg6);
- if (arg6) (*env)->ReleaseIntArrayElements(env, arg6, lparg6, 0);
- NATIVE_EXIT(env, that, "glTexSubImage1D\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glTexSubImage2D)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jint arg3, jint arg4, jint arg5, jint arg6, jint arg7, jintArray arg8)
-{
- jint *lparg8=NULL;
-
- NATIVE_ENTER(env, that, "glTexSubImage2D\n")
- if (arg8) lparg8 = (*env)->GetIntArrayElements(env, arg8, NULL);
- glTexSubImage2D(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, lparg8);
- if (arg8) (*env)->ReleaseIntArrayElements(env, arg8, lparg8, 0);
- NATIVE_EXIT(env, that, "glTexSubImage2D\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glTranslated)
- (JNIEnv *env, jclass that, jdouble arg0, jdouble arg1, jdouble arg2)
-{
- NATIVE_ENTER(env, that, "glTranslated\n")
- glTranslated(arg0, arg1, arg2);
- NATIVE_EXIT(env, that, "glTranslated\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glTranslatef)
- (JNIEnv *env, jclass that, jfloat arg0, jfloat arg1, jfloat arg2)
-{
- NATIVE_ENTER(env, that, "glTranslatef\n")
- glTranslatef(arg0, arg1, arg2);
- NATIVE_EXIT(env, that, "glTranslatef\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glVertex2d)
- (JNIEnv *env, jclass that, jdouble arg0, jdouble arg1)
-{
- NATIVE_ENTER(env, that, "glVertex2d\n")
- glVertex2d(arg0, arg1);
- NATIVE_EXIT(env, that, "glVertex2d\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glVertex2dv)
- (JNIEnv *env, jclass that, jdoubleArray arg0)
-{
- jdouble *lparg0=NULL;
-
- NATIVE_ENTER(env, that, "glVertex2dv\n")
- if (arg0) lparg0 = (*env)->GetDoubleArrayElements(env, arg0, NULL);
- glVertex2dv(lparg0);
- if (arg0) (*env)->ReleaseDoubleArrayElements(env, arg0, lparg0, 0);
- NATIVE_EXIT(env, that, "glVertex2dv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glVertex2f)
- (JNIEnv *env, jclass that, jfloat arg0, jfloat arg1)
-{
- NATIVE_ENTER(env, that, "glVertex2f\n")
- glVertex2f(arg0, arg1);
- NATIVE_EXIT(env, that, "glVertex2f\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glVertex2fv)
- (JNIEnv *env, jclass that, jfloatArray arg0)
-{
- jfloat *lparg0=NULL;
-
- NATIVE_ENTER(env, that, "glVertex2fv\n")
- if (arg0) lparg0 = (*env)->GetFloatArrayElements(env, arg0, NULL);
- glVertex2fv(lparg0);
- if (arg0) (*env)->ReleaseFloatArrayElements(env, arg0, lparg0, 0);
- NATIVE_EXIT(env, that, "glVertex2fv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glVertex2i)
- (JNIEnv *env, jclass that, jint arg0, jint arg1)
-{
- NATIVE_ENTER(env, that, "glVertex2i\n")
- glVertex2i(arg0, arg1);
- NATIVE_EXIT(env, that, "glVertex2i\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glVertex2iv)
- (JNIEnv *env, jclass that, jintArray arg0)
-{
- jint *lparg0=NULL;
-
- NATIVE_ENTER(env, that, "glVertex2iv\n")
- if (arg0) lparg0 = (*env)->GetIntArrayElements(env, arg0, NULL);
- glVertex2iv((GLint *)lparg0);
- if (arg0) (*env)->ReleaseIntArrayElements(env, arg0, lparg0, 0);
- NATIVE_EXIT(env, that, "glVertex2iv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glVertex2s)
- (JNIEnv *env, jclass that, jshort arg0, jshort arg1)
-{
- NATIVE_ENTER(env, that, "glVertex2s\n")
- glVertex2s(arg0, arg1);
- NATIVE_EXIT(env, that, "glVertex2s\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glVertex2sv)
- (JNIEnv *env, jclass that, jshortArray arg0)
-{
- jshort *lparg0=NULL;
-
- NATIVE_ENTER(env, that, "glVertex2sv\n")
- if (arg0) lparg0 = (*env)->GetShortArrayElements(env, arg0, NULL);
- glVertex2sv(lparg0);
- if (arg0) (*env)->ReleaseShortArrayElements(env, arg0, lparg0, 0);
- NATIVE_EXIT(env, that, "glVertex2sv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glVertex3d)
- (JNIEnv *env, jclass that, jdouble arg0, jdouble arg1, jdouble arg2)
-{
- NATIVE_ENTER(env, that, "glVertex3d\n")
- glVertex3d(arg0, arg1, arg2);
- NATIVE_EXIT(env, that, "glVertex3d\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glVertex3dv__I)
- (JNIEnv *env, jclass that, jdoubleArray arg0)
-{
- jdouble *lparg0=NULL;
-
- NATIVE_ENTER(env, that, "glVertex3dv\n")
- if (arg0) lparg0 = (*env)->GetDoubleArrayElements(env, arg0, NULL);
- glVertex3dv(lparg0);
- if (arg0) (*env)->ReleaseDoubleArrayElements(env, arg0, lparg0, 0);
- NATIVE_EXIT(env, that, "glVertex3dv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glVertex3dv)
- (JNIEnv *env, jclass that, jint arg0)
-{
- NATIVE_ENTER(env, that, "glVertex3dv\n")
- glVertex3dv((double*)arg0);
- NATIVE_EXIT(env, that, "glVertex3dv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glVertex3f)
- (JNIEnv *env, jclass that, jfloat arg0, jfloat arg1, jfloat arg2)
-{
- NATIVE_ENTER(env, that, "glVertex3f\n")
- glVertex3f(arg0, arg1, arg2);
- NATIVE_EXIT(env, that, "glVertex3f\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glVertex3fv)
- (JNIEnv *env, jclass that, jfloatArray arg0)
-{
- jfloat *lparg0=NULL;
-
- NATIVE_ENTER(env, that, "glVertex3fv\n")
- if (arg0) lparg0 = (*env)->GetFloatArrayElements(env, arg0, NULL);
- glVertex3fv(lparg0);
- if (arg0) (*env)->ReleaseFloatArrayElements(env, arg0, lparg0, 0);
- NATIVE_EXIT(env, that, "glVertex3fv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glVertex3i)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2)
-{
- NATIVE_ENTER(env, that, "glVertex3i\n")
- glVertex3i(arg0, arg1, arg2);
- NATIVE_EXIT(env, that, "glVertex3i\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glVertex3iv)
- (JNIEnv *env, jclass that, jintArray arg0)
-{
- jint *lparg0=NULL;
-
- NATIVE_ENTER(env, that, "glVertex3iv\n")
- if (arg0) lparg0 = (*env)->GetIntArrayElements(env, arg0, NULL);
- glVertex3iv((GLint *)lparg0);
- if (arg0) (*env)->ReleaseIntArrayElements(env, arg0, lparg0, 0);
- NATIVE_EXIT(env, that, "glVertex3iv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glVertex3s)
- (JNIEnv *env, jclass that, jshort arg0, jshort arg1, jshort arg2)
-{
- NATIVE_ENTER(env, that, "glVertex3s\n")
- glVertex3s(arg0, arg1, arg2);
- NATIVE_EXIT(env, that, "glVertex3s\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glVertex3sv)
- (JNIEnv *env, jclass that, jshortArray arg0)
-{
- jshort *lparg0=NULL;
-
- NATIVE_ENTER(env, that, "glVertex3sv\n")
- if (arg0) lparg0 = (*env)->GetShortArrayElements(env, arg0, NULL);
- glVertex3sv(lparg0);
- if (arg0) (*env)->ReleaseShortArrayElements(env, arg0, lparg0, 0);
- NATIVE_EXIT(env, that, "glVertex3sv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glVertex4d)
- (JNIEnv *env, jclass that, jdouble arg0, jdouble arg1, jdouble arg2, jdouble arg3)
-{
- NATIVE_ENTER(env, that, "glVertex4d\n")
- glVertex4d(arg0, arg1, arg2, arg3);
- NATIVE_EXIT(env, that, "glVertex4d\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glVertex4dv)
- (JNIEnv *env, jclass that, jdoubleArray arg0)
-{
- jdouble *lparg0=NULL;
-
- NATIVE_ENTER(env, that, "glVertex4dv\n")
- if (arg0) lparg0 = (*env)->GetDoubleArrayElements(env, arg0, NULL);
- glVertex4dv(lparg0);
- if (arg0) (*env)->ReleaseDoubleArrayElements(env, arg0, lparg0, 0);
- NATIVE_EXIT(env, that, "glVertex4dv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glVertex4f)
- (JNIEnv *env, jclass that, jfloat arg0, jfloat arg1, jfloat arg2, jfloat arg3)
-{
- NATIVE_ENTER(env, that, "glVertex4f\n")
- glVertex4f(arg0, arg1, arg2, arg3);
- NATIVE_EXIT(env, that, "glVertex4f\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glVertex4fv)
- (JNIEnv *env, jclass that, jfloatArray arg0)
-{
- jfloat *lparg0=NULL;
-
- NATIVE_ENTER(env, that, "glVertex4fv\n")
- if (arg0) lparg0 = (*env)->GetFloatArrayElements(env, arg0, NULL);
- glVertex4fv(lparg0);
- if (arg0) (*env)->ReleaseFloatArrayElements(env, arg0, lparg0, 0);
- NATIVE_EXIT(env, that, "glVertex4fv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glVertex4i)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jint arg3)
-{
- NATIVE_ENTER(env, that, "glVertex4i\n")
- glVertex4i(arg0, arg1, arg2, arg3);
- NATIVE_EXIT(env, that, "glVertex4i\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glVertex4iv)
- (JNIEnv *env, jclass that, jintArray arg0)
-{
- jint *lparg0=NULL;
-
- NATIVE_ENTER(env, that, "glVertex4iv\n")
- if (arg0) lparg0 = (*env)->GetIntArrayElements(env, arg0, NULL);
- glVertex4iv((GLint *)lparg0);
- if (arg0) (*env)->ReleaseIntArrayElements(env, arg0, lparg0, 0);
- NATIVE_EXIT(env, that, "glVertex4iv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glVertex4s)
- (JNIEnv *env, jclass that, jshort arg0, jshort arg1, jshort arg2, jshort arg3)
-{
- NATIVE_ENTER(env, that, "glVertex4s\n")
- glVertex4s(arg0, arg1, arg2, arg3);
- NATIVE_EXIT(env, that, "glVertex4s\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glVertex4sv)
- (JNIEnv *env, jclass that, jshortArray arg0)
-{
- jshort *lparg0=NULL;
-
- NATIVE_ENTER(env, that, "glVertex4sv\n")
- if (arg0) lparg0 = (*env)->GetShortArrayElements(env, arg0, NULL);
- glVertex4sv(lparg0);
- if (arg0) (*env)->ReleaseShortArrayElements(env, arg0, lparg0, 0);
- NATIVE_EXIT(env, that, "glVertex4sv\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glVertexPointer)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jintArray arg3)
-{
- jint *lparg3=NULL;
-
- NATIVE_ENTER(env, that, "glVertexPointer\n")
- if (arg3) lparg3 = (*env)->GetIntArrayElements(env, arg3, NULL);
- glVertexPointer(arg0, arg1, arg2, lparg3);
- if (arg3) (*env)->ReleaseIntArrayElements(env, arg3, lparg3, 0);
- NATIVE_EXIT(env, that, "glVertexPointer\n")
-}
-
-JNIEXPORT void JNICALL GL_NATIVE(glViewport)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jint arg3)
-{
- NATIVE_ENTER(env, that, "glViewport\n")
- glViewport(arg0, arg1, arg2, arg3);
- NATIVE_EXIT(env, that, "glViewport\n")
-}
diff --git a/bundles/org.eclipse.swt.opengl/common/library/glu.c b/bundles/org.eclipse.swt.opengl/common/library/glu.c
deleted file mode 100644
index eabf63a9fa..0000000000
--- a/bundles/org.eclipse.swt.opengl/common/library/glu.c
+++ /dev/null
@@ -1,546 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-#ifdef WIN32
-#include <windows.h>
-#endif
-#include <GL/glu.h>
-#include "swt.h"
-
-#define GLU_NATIVE(func) Java_org_eclipse_swt_opengl_GLU_##func
-
-JNIEXPORT void JNICALL GLU_NATIVE(gluBeginCurve)
- (JNIEnv *env, jclass that, jint arg0)
-{
- NATIVE_ENTER(env, that, "gluBeginCurve\n")
- gluBeginCurve((GLUnurbsObj *)arg0);
- NATIVE_EXIT(env, that, "gluBeginCurve\n")
-}
-
-JNIEXPORT void JNICALL GLU_NATIVE(gluBeginPolygon)
- (JNIEnv *env, jclass that, jint arg0)
-{
- NATIVE_ENTER(env, that, "gluBeginPolygon\n")
- gluBeginPolygon((GLUtesselator *)arg0);
- NATIVE_EXIT(env, that, "gluBeginPolygon\n")
-}
-
-JNIEXPORT void JNICALL GLU_NATIVE(gluBeginSurface)
- (JNIEnv *env, jclass that, jint arg0)
-{
- NATIVE_ENTER(env, that, "gluBeginSurface\n")
- gluBeginSurface((GLUnurbs *)arg0);
- NATIVE_EXIT(env, that, "gluBeginSurface\n")
-}
-
-JNIEXPORT void JNICALL GLU_NATIVE(gluBeginTrim)
- (JNIEnv *env, jclass that, jint arg0)
-{
- NATIVE_ENTER(env, that, "gluBeginTrim\n")
- gluBeginTrim((GLUnurbs *)arg0);
- NATIVE_EXIT(env, that, "gluBeginTrim\n")
-}
-
-JNIEXPORT jint JNICALL GLU_NATIVE(gluBuild1DMipmaps)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jint arg3, jint arg4, jint arg5)
-{
- jint rc;
- NATIVE_ENTER(env, that, "gluBuild1DMipmaps\n")
- rc = (jint)gluBuild1DMipmaps(arg0, arg1, arg2, arg3, arg4, (const void *)arg5);
- NATIVE_EXIT(env, that, "gluBuild1DMipmaps\n")
- return rc;
-}
-
-/*
-JNIEXPORT jint JNICALL GLU_NATIVE(gluBuild2DMipmaps)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jint arg3, jint arg4, jint arg5, jint arg6)
-{
- jint rc;
- NATIVE_ENTER(env, that, "gluBuild2DMipmaps\n")
- rc = (jint)gluBuild2DMipmaps(arg0, arg1, arg2, arg3, arg4, arg5, (const void *)arg6);
- NATIVE_EXIT(env, that, "gluBuild2DMipmaps\n")
- return rc;
-}
-*/
-
-JNIEXPORT jint JNICALL GLU_NATIVE(gluBuild2DMipmaps)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jint arg3, jint arg4, jint arg5, jbyteArray arg6)
-{
- jbyte *lparg6=NULL;
- jint rc;
-
- NATIVE_ENTER(env, that, "gluBuild2DMipmaps\n")
- if (arg6) lparg6 = (*env)->GetByteArrayElements(env, arg6, NULL);
- rc = (jint)gluBuild2DMipmaps(arg0, arg1, arg2, arg3, arg4, arg5, (const void *)lparg6);
- if (arg6) (*env)->ReleaseByteArrayElements(env, arg6, lparg6, 0);
- NATIVE_EXIT(env, that, "gluBuild2DMipmaps\n")
- return rc;
-}
-
-JNIEXPORT void JNICALL GLU_NATIVE(gluCylinder)
- (JNIEnv *env, jclass that, jint arg0, jdouble arg1, jdouble arg2, jdouble arg3, jint arg4, jint arg5)
-{
- NATIVE_ENTER(env, that, "gluCylinder\n")
- gluCylinder((GLUquadric *)arg0, arg1, arg2, arg3, arg4, arg5);
- NATIVE_EXIT(env, that, "gluCylinder\n")
-}
-
-JNIEXPORT void JNICALL GLU_NATIVE(gluDeleteNurbsRenderer)
- (JNIEnv *env, jclass that, jint arg0)
-{
- NATIVE_ENTER(env, that, "gluDeleteNurbsRenderer\n")
- gluDeleteNurbsRenderer((GLUnurbs *)arg0);
- NATIVE_EXIT(env, that, "gluDeleteNurbsRenderer\n")
-}
-
-JNIEXPORT void JNICALL GLU_NATIVE(gluDeleteQuadric)
- (JNIEnv *env, jclass that, jint arg0)
-{
- NATIVE_ENTER(env, that, "gluDeleteQuadric\n")
- gluDeleteQuadric((GLUquadric *)arg0);
- NATIVE_EXIT(env, that, "gluDeleteQuadric\n")
-}
-
-JNIEXPORT void JNICALL GLU_NATIVE(gluDeleteTess)
- (JNIEnv *env, jclass that, jint arg0)
-{
- NATIVE_ENTER(env, that, "gluDeleteTess\n")
- gluDeleteTess((GLUtesselator *)arg0);
- NATIVE_EXIT(env, that, "gluDeleteTess\n")
-}
-
-JNIEXPORT void JNICALL GLU_NATIVE(gluDisk)
- (JNIEnv *env, jclass that, jint arg0, jdouble arg1, jdouble arg2, jint arg3, jint arg4)
-{
- NATIVE_ENTER(env, that, "gluDisk\n")
- gluDisk((GLUquadric *)arg0, arg1, arg2, arg3, arg4);
- NATIVE_EXIT(env, that, "gluDisk\n")
-}
-
-JNIEXPORT void JNICALL GLU_NATIVE(gluEndCurve)
- (JNIEnv *env, jclass that, jint arg0)
-{
- NATIVE_ENTER(env, that, "gluEndCurve\n")
- gluEndCurve((GLUnurbsObj *)arg0);
- NATIVE_EXIT(env, that, "gluEndCurve\n")
-}
-
-JNIEXPORT void JNICALL GLU_NATIVE(gluEndPolygon)
- (JNIEnv *env, jclass that, jint arg0)
-{
- NATIVE_ENTER(env, that, "gluEndPolygon\n")
- gluEndPolygon((GLUtesselator *)arg0);
- NATIVE_EXIT(env, that, "gluEndPolygon\n")
-}
-
-JNIEXPORT void JNICALL GLU_NATIVE(gluEndSurface)
- (JNIEnv *env, jclass that, jint arg0)
-{
- NATIVE_ENTER(env, that, "gluEndSurface\n")
- gluEndSurface((GLUnurbs *)arg0);
- NATIVE_EXIT(env, that, "gluEndSurface\n")
-}
-
-JNIEXPORT void JNICALL GLU_NATIVE(gluEndTrim)
- (JNIEnv *env, jclass that, jint arg0)
-{
- NATIVE_ENTER(env, that, "gluEndTrim\n")
- gluEndTrim((GLUnurbs *)arg0);
- NATIVE_EXIT(env, that, "gluEndTrim\n")
-}
-
-JNIEXPORT jint JNICALL GLU_NATIVE(gluErrorString)
- (JNIEnv *env, jclass that, jint arg0)
-{
- jint rc;
- NATIVE_ENTER(env, that, "gluErrorString\n")
- rc = (jint)gluErrorString(arg0);
- NATIVE_EXIT(env, that, "gluErrorString\n")
- return rc;
-}
-
-JNIEXPORT void JNICALL GLU_NATIVE(gluGetNurbsProperty)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jfloatArray arg2)
-{
- jfloat *lparg2=NULL;
-
- NATIVE_ENTER(env, that, "gluGetNurbsProperty\n")
- if (arg2) lparg2 = (*env)->GetFloatArrayElements(env, arg2, NULL);
- gluGetNurbsProperty((GLUnurbs *)arg0, arg1, lparg2);
- if (arg2) (*env)->ReleaseFloatArrayElements(env, arg2, lparg2, 0);
- NATIVE_EXIT(env, that, "gluGetNurbsProperty\n")
-}
-
-JNIEXPORT jint JNICALL GLU_NATIVE(gluGetString)
- (JNIEnv *env, jclass that, jint arg0)
-{
- jint rc;
- NATIVE_ENTER(env, that, "gluGetString\n")
- rc = (jint)gluGetString(arg0);
- NATIVE_EXIT(env, that, "gluGetString\n")
- return rc;
-}
-
-JNIEXPORT void JNICALL GLU_NATIVE(gluGetTessProperty)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jdoubleArray arg2)
-{
- jdouble *lparg2=NULL;
-
- NATIVE_ENTER(env, that, "gluGetTessProperty\n")
- if (arg2) lparg2 = (*env)->GetDoubleArrayElements(env, arg2, NULL);
- gluGetTessProperty((GLUtesselator *)arg0, arg1, lparg2);
- if (arg2) (*env)->ReleaseDoubleArrayElements(env, arg2, lparg2, 0);
- NATIVE_EXIT(env, that, "gluGetTessProperty\n")
-}
-
-JNIEXPORT void JNICALL GLU_NATIVE(gluLoadSamplingMatrices)
- (JNIEnv *env, jclass that, jint arg0, jfloatArray arg1, jfloatArray arg2, jintArray arg3)
-{
- jfloat *lparg1=NULL;
- jfloat *lparg2=NULL;
- jint *lparg3=NULL;
-
- NATIVE_ENTER(env, that, "gluLoadSamplingMatrices\n")
- if (arg1) lparg1 = (*env)->GetFloatArrayElements(env, arg1, NULL);
- if (arg2) lparg2 = (*env)->GetFloatArrayElements(env, arg2, NULL);
- if (arg3) lparg3 = (*env)->GetIntArrayElements(env, arg3, NULL);
- gluLoadSamplingMatrices((GLUnurbs *)arg0, lparg1, lparg2, (GLint *)lparg3);
- if (arg1) (*env)->ReleaseFloatArrayElements(env, arg1, lparg1, 0);
- if (arg2) (*env)->ReleaseFloatArrayElements(env, arg2, lparg2, 0);
- if (arg3) (*env)->ReleaseIntArrayElements(env, arg3, lparg3, 0);
- NATIVE_EXIT(env, that, "gluLoadSamplingMatrices\n")
-}
-
-JNIEXPORT void JNICALL GLU_NATIVE(gluLookAt)
- (JNIEnv *env, jclass that, jdouble arg0, jdouble arg1, jdouble arg2, jdouble arg3, jdouble arg4, jdouble arg5, jdouble arg6, jdouble arg7, jdouble arg8)
-{
- NATIVE_ENTER(env, that, "gluLookAt\n")
- gluLookAt(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
- NATIVE_EXIT(env, that, "gluLookAt\n")
-}
-
-JNIEXPORT jint JNICALL GLU_NATIVE(gluNewNurbsRenderer)
- (JNIEnv *env, jclass that)
-{
- jint rc;
- NATIVE_ENTER(env, that, "gluNewNurbsRenderer\n")
- rc = (jint)gluNewNurbsRenderer();
- NATIVE_EXIT(env, that, "gluNewNurbsRenderer\n")
- return rc;
-}
-
-JNIEXPORT jint JNICALL GLU_NATIVE(gluNewQuadric)
- (JNIEnv *env, jclass that)
-{
- jint rc;
- NATIVE_ENTER(env, that, "gluNewQuadric\n")
- rc = (jint)gluNewQuadric();
- NATIVE_EXIT(env, that, "gluNewQuadric\n")
- return rc;
-}
-
-JNIEXPORT jint JNICALL GLU_NATIVE(gluNewTess)
- (JNIEnv *env, jclass that)
-{
- jint rc;
- NATIVE_ENTER(env, that, "gluNewTess\n")
- rc = (jint)gluNewTess();
- NATIVE_EXIT(env, that, "gluNewTess\n")
- return rc;
-}
-
-JNIEXPORT void JNICALL GLU_NATIVE(gluNextContour)
- (JNIEnv *env, jclass that, jint arg0, jint arg1)
-{
- NATIVE_ENTER(env, that, "gluNextContour\n")
- gluNextContour((GLUtesselator *)arg0, arg1);
- NATIVE_EXIT(env, that, "gluNextContour\n")
-}
-
-JNIEXPORT void JNICALL GLU_NATIVE(gluNurbsCallback)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2)
-{
- NATIVE_ENTER(env, that, "gluNurbsCallback\n")
- gluNurbsCallback((GLUnurbs *)arg0, arg1, (GLvoid(*))arg2);
- NATIVE_EXIT(env, that, "gluNurbsCallback\n")
-}
-
-JNIEXPORT void JNICALL GLU_NATIVE(gluNurbsCurve)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jfloatArray arg2, jint arg3, jfloatArray arg4, jint arg5, jint arg6)
-{
- jfloat *lparg2=NULL;
- jfloat *lparg4=NULL;
-
- NATIVE_ENTER(env, that, "gluNurbsCurve\n")
- if (arg2) lparg2 = (*env)->GetFloatArrayElements(env, arg2, NULL);
- if (arg4) lparg4 = (*env)->GetFloatArrayElements(env, arg4, NULL);
- gluNurbsCurve((GLUnurbs *)arg0, arg1, lparg2, arg3, lparg4, arg5, arg6);
- if (arg2) (*env)->ReleaseFloatArrayElements(env, arg2, lparg2, 0);
- if (arg4) (*env)->ReleaseFloatArrayElements(env, arg4, lparg4, 0);
- NATIVE_EXIT(env, that, "gluNurbsCurve\n")
-}
-
-JNIEXPORT void JNICALL GLU_NATIVE(gluNurbsProperty)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jfloat arg2)
-{
- NATIVE_ENTER(env, that, "gluNurbsProperty\n")
- gluNurbsProperty((GLUnurbs *)arg0, arg1, arg2);
- NATIVE_EXIT(env, that, "gluNurbsProperty\n")
-}
-
-JNIEXPORT void JNICALL GLU_NATIVE(gluNurbsSurface)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jfloatArray arg2, jint arg3, jfloatArray arg4, jint arg5, jint arg6, jfloatArray arg7, jint arg8, jint arg9, jint arg10)
-{
- jfloat *lparg2=NULL;
- jfloat *lparg4=NULL;
- jfloat *lparg7=NULL;
-
- NATIVE_ENTER(env, that, "gluNurbsSurface\n")
- if (arg2) lparg2 = (*env)->GetFloatArrayElements(env, arg2, NULL);
- if (arg4) lparg4 = (*env)->GetFloatArrayElements(env, arg4, NULL);
- if (arg7) lparg7 = (*env)->GetFloatArrayElements(env, arg7, NULL);
- gluNurbsSurface((GLUnurbs *)arg0, arg1, lparg2, arg3, lparg4, arg5, arg6, lparg7, arg8, arg9, arg10);
- if (arg2) (*env)->ReleaseFloatArrayElements(env, arg2, lparg2, 0);
- if (arg4) (*env)->ReleaseFloatArrayElements(env, arg4, lparg4, 0);
- if (arg7) (*env)->ReleaseFloatArrayElements(env, arg7, lparg7, 0);
- NATIVE_EXIT(env, that, "gluNurbsSurface\n")
-}
-
-JNIEXPORT void JNICALL GLU_NATIVE(gluOrtho2D)
- (JNIEnv *env, jclass that, jdouble arg0, jdouble arg1, jdouble arg2, jdouble arg3)
-{
- NATIVE_ENTER(env, that, "gluOrtho2D\n")
- gluOrtho2D(arg0, arg1, arg2, arg3);
- NATIVE_EXIT(env, that, "gluOrtho2D\n")
-}
-
-JNIEXPORT void JNICALL GLU_NATIVE(gluPartialDisk)
- (JNIEnv *env, jclass that, jint arg0, jdouble arg1, jdouble arg2, jint arg3, jint arg4, jdouble arg5, jdouble arg6)
-{
- NATIVE_ENTER(env, that, "gluPartialDisk\n")
- gluPartialDisk((GLUquadric *)arg0, arg1, arg2, arg3, arg4, arg5, arg6);
- NATIVE_EXIT(env, that, "gluPartialDisk\n")
-}
-
-JNIEXPORT void JNICALL GLU_NATIVE(gluPerspective)
- (JNIEnv *env, jclass that, jdouble arg0, jdouble arg1, jdouble arg2, jdouble arg3)
-{
- NATIVE_ENTER(env, that, "gluPerspective\n")
- gluPerspective(arg0, arg1, arg2, arg3);
- NATIVE_EXIT(env, that, "gluPerspective\n")
-}
-
-JNIEXPORT void JNICALL GLU_NATIVE(gluPickMatrix)
- (JNIEnv *env, jclass that, jdouble arg0, jdouble arg1, jdouble arg2, jdouble arg3, jintArray arg4)
-{
- jint *lparg4=NULL;
-
- NATIVE_ENTER(env, that, "gluPickMatrix\n")
- if (arg4) lparg4 = (*env)->GetIntArrayElements(env, arg4, NULL);
- gluPickMatrix(arg0, arg1, arg2, arg3, (GLint *)lparg4);
- if (arg4) (*env)->ReleaseIntArrayElements(env, arg4, lparg4, 0);
- NATIVE_EXIT(env, that, "gluPickMatrix\n")
-}
-
-JNIEXPORT jint JNICALL GLU_NATIVE(gluProject)
- (JNIEnv *env, jclass that, jdouble arg0, jdouble arg1, jdouble arg2, jdoubleArray arg3, jdoubleArray arg4, jintArray arg5, jdoubleArray arg6, jdoubleArray arg7, jdoubleArray arg8)
-{
- jdouble *lparg3=NULL;
- jdouble *lparg4=NULL;
- jint *lparg5=NULL;
- jdouble *lparg6=NULL;
- jdouble *lparg7=NULL;
- jdouble *lparg8=NULL;
- jint rc;
-
- NATIVE_ENTER(env, that, "gluProject\n")
- if (arg3) lparg3 = (*env)->GetDoubleArrayElements(env, arg3, NULL);
- if (arg4) lparg4 = (*env)->GetDoubleArrayElements(env, arg4, NULL);
- if (arg5) lparg5 = (*env)->GetIntArrayElements(env, arg5, NULL);
- if (arg6) lparg6 = (*env)->GetDoubleArrayElements(env, arg6, NULL);
- if (arg7) lparg7 = (*env)->GetDoubleArrayElements(env, arg7, NULL);
- if (arg8) lparg8 = (*env)->GetDoubleArrayElements(env, arg8, NULL);
- rc = (jint)gluProject(arg0, arg1, arg2, lparg3, lparg4, (GLint *)lparg5, lparg6, lparg7, lparg8);
- if (arg3) (*env)->ReleaseDoubleArrayElements(env, arg3, lparg3, 0);
- if (arg4) (*env)->ReleaseDoubleArrayElements(env, arg4, lparg4, 0);
- if (arg5) (*env)->ReleaseIntArrayElements(env, arg5, lparg5, 0);
- if (arg6) (*env)->ReleaseDoubleArrayElements(env, arg6, lparg6, 0);
- if (arg7) (*env)->ReleaseDoubleArrayElements(env, arg7, lparg7, 0);
- if (arg8) (*env)->ReleaseDoubleArrayElements(env, arg8, lparg8, 0);
- NATIVE_EXIT(env, that, "gluProject\n")
- return rc;
-}
-
-JNIEXPORT void JNICALL GLU_NATIVE(gluPwlCurve)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jfloatArray arg2, jint arg3, jint arg4)
-{
- jfloat *lparg2=NULL;
-
- NATIVE_ENTER(env, that, "gluPwlCurve\n")
- if (arg2) lparg2 = (*env)->GetFloatArrayElements(env, arg2, NULL);
- gluPwlCurve((GLUnurbs *)arg0, arg1, lparg2, arg3, arg4);
- if (arg2) (*env)->ReleaseFloatArrayElements(env, arg2, lparg2, 0);
- NATIVE_EXIT(env, that, "gluPwlCurve\n")
-}
-
-JNIEXPORT void JNICALL GLU_NATIVE(gluQuadricCallback)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2)
-{
- NATIVE_ENTER(env, that, "gluQuadricCallback\n")
- gluQuadricCallback((GLUquadric *)arg0, arg1, (GLvoid(*))arg2);
- NATIVE_EXIT(env, that, "gluQuadricCallback\n")
-}
-
-JNIEXPORT void JNICALL GLU_NATIVE(gluQuadricDrawStyle)
- (JNIEnv *env, jclass that, jint arg0, jint arg1)
-{
- NATIVE_ENTER(env, that, "gluQuadricDrawStyle\n")
- gluQuadricDrawStyle((GLUquadric *)arg0, arg1);
- NATIVE_EXIT(env, that, "gluQuadricDrawStyle\n")
-}
-
-JNIEXPORT void JNICALL GLU_NATIVE(gluQuadricNormals)
- (JNIEnv *env, jclass that, jint arg0, jint arg1)
-{
- NATIVE_ENTER(env, that, "gluQuadricNormals\n")
- gluQuadricNormals((GLUquadric *)arg0, arg1);
- NATIVE_EXIT(env, that, "gluQuadricNormals\n")
-}
-
-JNIEXPORT void JNICALL GLU_NATIVE(gluQuadricOrientation)
- (JNIEnv *env, jclass that, jint arg0, jint arg1)
-{
- NATIVE_ENTER(env, that, "gluQuadricOrientation\n")
- gluQuadricOrientation((GLUquadric *)arg0, arg1);
- NATIVE_EXIT(env, that, "gluQuadricOrientation\n")
-}
-
-JNIEXPORT void JNICALL GLU_NATIVE(gluQuadricTexture)
- (JNIEnv *env, jclass that, jint arg0, jboolean arg1)
-{
- NATIVE_ENTER(env, that, "gluQuadricTexture\n")
- gluQuadricTexture((GLUquadric *)arg0, arg1);
- NATIVE_EXIT(env, that, "gluQuadricTexture\n")
-}
-
-JNIEXPORT jint JNICALL GLU_NATIVE(gluScaleImage)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jint arg3, jint arg4, jint arg5, jint arg6, jint arg7, jint arg8)
-{
- jint rc;
- NATIVE_ENTER(env, that, "gluScaleImage\n")
- rc = (jint)gluScaleImage(arg0, arg1, arg2, arg3, (const void *)arg4, arg5, arg6, arg7, (void *)arg8);
- NATIVE_EXIT(env, that, "gluScaleImage\n")
- return rc;
-}
-
-JNIEXPORT void JNICALL GLU_NATIVE(gluSphere)
- (JNIEnv *env, jclass that, jint arg0, jdouble arg1, jint arg2, jint arg3)
-{
- NATIVE_ENTER(env, that, "gluSphere\n")
- gluSphere((GLUquadric *)arg0, arg1, arg2, arg3);
- NATIVE_EXIT(env, that, "gluSphere\n")
-}
-
-JNIEXPORT void JNICALL GLU_NATIVE(gluTessBeginContour)
- (JNIEnv *env, jclass that, jint arg0)
-{
- NATIVE_ENTER(env, that, "gluTessBeginContour\n")
- gluTessBeginContour((GLUtesselator *)arg0);
- NATIVE_EXIT(env, that, "gluTessBeginContour\n")
-}
-
-JNIEXPORT void JNICALL GLU_NATIVE(gluTessBeginPolygon)
- (JNIEnv *env, jclass that, jint arg0, jint arg1)
-{
- NATIVE_ENTER(env, that, "gluTessBeginPolygon\n")
- gluTessBeginPolygon((GLUtesselator *)arg0, (void *)arg1);
- NATIVE_EXIT(env, that, "gluTessBeginPolygon\n")
-}
-
-JNIEXPORT void JNICALL GLU_NATIVE(gluTessCallback)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2)
-{
- NATIVE_ENTER(env, that, "gluTessCallback\n")
- gluTessCallback((GLUtesselator *)arg0, arg1, (GLvoid(*))arg2);
- NATIVE_EXIT(env, that, "gluTessCallback\n")
-}
-
-JNIEXPORT void JNICALL GLU_NATIVE(gluTessEndContour)
- (JNIEnv *env, jclass that, jint arg0)
-{
- NATIVE_ENTER(env, that, "gluTessEndContour\n")
- gluTessEndContour((GLUtesselator *)arg0);
- NATIVE_EXIT(env, that, "gluTessEndContour\n")
-}
-
-JNIEXPORT void JNICALL GLU_NATIVE(gluTessEndPolygon)
- (JNIEnv *env, jclass that, jint arg0)
-{
- NATIVE_ENTER(env, that, "gluTessEndPolygon\n")
- gluTessEndPolygon((GLUtesselator *)arg0);
- NATIVE_EXIT(env, that, "gluTessEndPolygon\n")
-}
-
-JNIEXPORT void JNICALL GLU_NATIVE(gluTessNormal)
- (JNIEnv *env, jclass that, jint arg0, jdouble arg1, jdouble arg2, jdouble arg3)
-{
- NATIVE_ENTER(env, that, "gluTessNormal\n")
- gluTessNormal((GLUtesselator *)arg0, arg1, arg2, arg3);
- NATIVE_EXIT(env, that, "gluTessNormal\n")
-}
-
-JNIEXPORT void JNICALL GLU_NATIVE(gluTessProperty)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jfloat arg2)
-{
- NATIVE_ENTER(env, that, "gluTessProperty\n")
- gluTessProperty((GLUtesselator *)arg0, arg1, arg2);
- NATIVE_EXIT(env, that, "gluTessProperty\n")
-}
-
-JNIEXPORT void JNICALL GLU_NATIVE(gluTessVertex)
- (JNIEnv *env, jclass that, jint arg0, jdoubleArray arg1, jint arg2)
-{
- jdouble *lparg1=NULL;
-
- NATIVE_ENTER(env, that, "gluTessVertex\n")
- if (arg1) lparg1 = (*env)->GetDoubleArrayElements(env, arg1, NULL);
- gluTessVertex((GLUtesselator *)arg0, lparg1, (void *)arg2);
- if (arg1) (*env)->ReleaseDoubleArrayElements(env, arg1, lparg1, 0);
- NATIVE_EXIT(env, that, "gluTessVertex\n")
-}
-
-JNIEXPORT jint JNICALL GLU_NATIVE(gluUnProject)
- (JNIEnv *env, jclass that, jdouble arg0, jdouble arg1, jdouble arg2, jdoubleArray arg3, jdoubleArray arg4, jintArray arg5, jdoubleArray arg6, jdoubleArray arg7, jdoubleArray arg8)
-{
- jdouble *lparg3=NULL;
- jdouble *lparg4=NULL;
- jint *lparg5=NULL;
- jdouble *lparg6=NULL;
- jdouble *lparg7=NULL;
- jdouble *lparg8=NULL;
- jint rc;
-
- NATIVE_ENTER(env, that, "gluUnProject\n")
- if (arg3) lparg3 = (*env)->GetDoubleArrayElements(env, arg3, NULL);
- if (arg4) lparg4 = (*env)->GetDoubleArrayElements(env, arg4, NULL);
- if (arg5) lparg5 = (*env)->GetIntArrayElements(env, arg5, NULL);
- if (arg6) lparg6 = (*env)->GetDoubleArrayElements(env, arg6, NULL);
- if (arg7) lparg7 = (*env)->GetDoubleArrayElements(env, arg7, NULL);
- if (arg8) lparg8 = (*env)->GetDoubleArrayElements(env, arg8, NULL);
- rc = (jint)gluUnProject(arg0, arg1, arg2, lparg3, lparg4, (GLint *)lparg5, lparg6, lparg7, lparg8);
- if (arg3) (*env)->ReleaseDoubleArrayElements(env, arg3, lparg3, 0);
- if (arg4) (*env)->ReleaseDoubleArrayElements(env, arg4, lparg4, 0);
- if (arg5) (*env)->ReleaseIntArrayElements(env, arg5, lparg5, 0);
- if (arg6) (*env)->ReleaseDoubleArrayElements(env, arg6, lparg6, 0);
- if (arg7) (*env)->ReleaseDoubleArrayElements(env, arg7, lparg7, 0);
- if (arg8) (*env)->ReleaseDoubleArrayElements(env, arg8, lparg8, 0);
- NATIVE_EXIT(env, that, "gluUnProject\n")
- return rc;
-}
diff --git a/bundles/org.eclipse.swt.opengl/common/library/swt.h b/bundles/org.eclipse.swt.opengl/common/library/swt.h
deleted file mode 100644
index 0d47c9e26e..0000000000
--- a/bundles/org.eclipse.swt.opengl/common/library/swt.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-#ifndef INC_swt_H
-#define INC_swt_H
-
-#include "jni.h"
-
-/* For debugging */
-#define DEBUG_PRINTF(x)
-/*#define DEBUG_PRINTF(x) printf x; */
-
-/* define this to print out debug statements */
-/* #define DEBUG_CALL_PRINTS */
-/* #define DEBUG_CHECK_NULL_EXCEPTIONS */
-
-#ifdef DEBUG_CALL_PRINTS
-#define DEBUG_CALL(func) fprintf(stderr, func);
-#else
-#define DEBUG_CALL(func)
-#endif
-
-#ifdef DEBUG_CHECK_NULL_EXCEPTIONS
-#define DEBUG_CHECK_NULL(env, address) \
- if (address == 0) { \
- jclass clazz = (*env)->FindClass(env, "org/eclipse/swt/SWTError"); \
- if (clazz != NULL) { \
- (*env)->ThrowNew(env, clazz, "Argument cannot be NULL"); \
- } \
- return; \
- }
-#else
-#define DEBUG_CHECK_NULL(env, address)
-#endif
-
-#define DECL_GLOB(pSym)
-#define PGLOB(x) x
-
-#define NATIVE_ENTER(env,clazz,func)
-#define NATIVE_EXIT(env,clazz,func)
-
-#endif /* ifndef INC_swt_H */
diff --git a/bundles/org.eclipse.swt.opengl/common/org/eclipse/swt/opengl/GL.java b/bundles/org.eclipse.swt.opengl/common/org/eclipse/swt/opengl/GL.java
deleted file mode 100644
index ba4b372784..0000000000
--- a/bundles/org.eclipse.swt.opengl/common/org/eclipse/swt/opengl/GL.java
+++ /dev/null
@@ -1,1449 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.opengl;
-
-public class GL {
-
- public static final int GL_VERSION_1_1 = 1;
-
- /* AccumOp */
- public static final int GL_ACCUM = 0x0100;
- public static final int GL_LOAD = 0x0101;
- public static final int GL_RETURN = 0x0102;
- public static final int GL_MULT = 0x0103;
- public static final int GL_ADD = 0x0104;
-
- /* AlphaFunction */
- public static final int GL_NEVER = 0x0200;
- public static final int GL_LESS = 0x0201;
- public static final int GL_EQUAL = 0x0202;
- public static final int GL_LEQUAL = 0x0203;
- public static final int GL_GREATER = 0x0204;
- public static final int GL_NOTEQUAL = 0x0205;
- public static final int GL_GEQUAL = 0x0206;
- public static final int GL_ALWAYS = 0x0207;
-
- /* AttribMask */
- public static final int GL_CURRENT_BIT = 0x00000001;
- public static final int GL_POINT_BIT = 0x00000002;
- public static final int GL_LINE_BIT = 0x00000004;
- public static final int GL_POLYGON_BIT = 0x00000008;
- public static final int GL_POLYGON_STIPPLE_BIT = 0x00000010;
- public static final int GL_PIXEL_MODE_BIT = 0x00000020;
- public static final int GL_LIGHTING_BIT = 0x00000040;
- public static final int GL_FOG_BIT = 0x00000080;
- public static final int GL_DEPTH_BUFFER_BIT = 0x00000100;
- public static final int GL_ACCUM_BUFFER_BIT = 0x00000200;
- public static final int GL_STENCIL_BUFFER_BIT = 0x00000400;
- public static final int GL_VIEWPORT_BIT = 0x00000800;
- public static final int GL_TRANSFORM_BIT = 0x00001000;
- public static final int GL_ENABLE_BIT = 0x00002000;
- public static final int GL_COLOR_BUFFER_BIT = 0x00004000;
- public static final int GL_HINT_BIT = 0x00008000;
- public static final int GL_EVAL_BIT = 0x00010000;
- public static final int GL_LIST_BIT = 0x00020000;
- public static final int GL_TEXTURE_BIT = 0x00040000;
- public static final int GL_SCISSOR_BIT = 0x00080000;
- public static final int GL_ALL_ATTRIB_BITS = 0x000fffff;
-
- /* BeginMode */
- public static final int GL_POINTS = 0x0000;
- public static final int GL_LINES = 0x0001;
- public static final int GL_LINE_LOOP = 0x0002;
- public static final int GL_LINE_STRIP = 0x0003;
- public static final int GL_TRIANGLES = 0x0004;
- public static final int GL_TRIANGLE_STRIP = 0x0005;
- public static final int GL_TRIANGLE_FAN = 0x0006;
- public static final int GL_QUADS = 0x0007;
- public static final int GL_QUAD_STRIP = 0x0008;
- public static final int GL_POLYGON = 0x0009;
-
- /* BlendingFactorDest */
- public static final int GL_ZERO = 0;
- public static final int GL_ONE = 1;
- public static final int GL_SRC_COLOR = 0x0300;
- public static final int GL_ONE_MINUS_SRC_COLOR = 0x0301;
- public static final int GL_SRC_ALPHA = 0x0302;
- public static final int GL_ONE_MINUS_SRC_ALPHA = 0x0303;
- public static final int GL_DST_ALPHA = 0x0304;
- public static final int GL_ONE_MINUS_DST_ALPHA = 0x0305;
-
- /* BlendingFactorSrc */
- /* GL_ZERO */
- /* GL_ONE */
- public static final int GL_DST_COLOR = 0x0306;
- public static final int GL_ONE_MINUS_DST_COLOR = 0x0307;
- public static final int GL_SRC_ALPHA_SATURATE = 0x0308;
- /* GL_SRC_ALPHA */
- /* GL_ONE_MINUS_SRC_ALPHA */
- /* GL_DST_ALPHA */
- /* GL_ONE_MINUS_DST_ALPHA */
-
- /* Boolean */
- public static final int GL_TRUE = 1;
- public static final int GL_FALSE = 0;
-
- /* ClearBufferMask */
- /* GL_COLOR_BUFFER_BIT */
- /* GL_ACCUM_BUFFER_BIT */
- /* GL_STENCIL_BUFFER_BIT */
- /* GL_DEPTH_BUFFER_BIT */
-
- /* ClientArrayType */
- /* GL_VERTEX_ARRAY */
- /* GL_NORMAL_ARRAY */
- /* GL_COLOR_ARRAY */
- /* GL_INDEX_ARRAY */
- /* GL_TEXTURE_COORD_ARRAY */
- /* GL_EDGE_FLAG_ARRAY */
-
- /* ClipPlaneName */
- public static final int GL_CLIP_PLANE0 = 0x3000;
- public static final int GL_CLIP_PLANE1 = 0x3001;
- public static final int GL_CLIP_PLANE2 = 0x3002;
- public static final int GL_CLIP_PLANE3 = 0x3003;
- public static final int GL_CLIP_PLANE4 = 0x3004;
- public static final int GL_CLIP_PLANE5 = 0x3005;
-
- /* ColorMaterialFace */
- /* GL_FRONT */
- /* GL_BACK */
- /* GL_FRONT_AND_BACK */
-
- /* ColorMaterialParameter */
- /* GL_AMBIENT */
- /* GL_DIFFUSE */
- /* GL_SPECULAR */
- /* GL_EMISSION */
- /* GL_AMBIENT_AND_DIFFUSE */
-
- /* ColorPointerType */
- /* GL_BYTE */
- /* GL_UNSIGNED_BYTE */
- /* GL_SHORT */
- /* GL_UNSIGNED_SHORT */
- /* GL_INT */
- /* GL_UNSIGNED_INT */
- /* GL_FLOAT */
- /* GL_DOUBLE */
-
- /* CullFaceMode */
- /* GL_FRONT */
- /* GL_BACK */
- /* GL_FRONT_AND_BACK */
-
- /* DataType */
- public static final int GL_BYTE = 0x1400;
- public static final int GL_UNSIGNED_BYTE = 0x1401;
- public static final int GL_SHORT = 0x1402;
- public static final int GL_UNSIGNED_SHORT = 0x1403;
- public static final int GL_INT = 0x1404;
- public static final int GL_UNSIGNED_INT = 0x1405;
- public static final int GL_FLOAT = 0x1406;
- public static final int GL_2_BYTES = 0x1407;
- public static final int GL_3_BYTES = 0x1408;
- public static final int GL_4_BYTES = 0x1409;
- public static final int GL_DOUBLE = 0x140A;
-
- /* DepthFunction */
- /* GL_NEVER */
- /* GL_LESS */
- /* GL_EQUAL */
- /* GL_LEQUAL */
- /* GL_GREATER */
- /* GL_NOTEQUAL */
- /* GL_GEQUAL */
- /* GL_ALWAYS */
-
- /* DrawBufferMode */
- public static final int GL_NONE = 0;
- public static final int GL_FRONT_LEFT = 0x0400;
- public static final int GL_FRONT_RIGHT = 0x0401;
- public static final int GL_BACK_LEFT = 0x0402;
- public static final int GL_BACK_RIGHT = 0x0403;
- public static final int GL_FRONT = 0x0404;
- public static final int GL_BACK = 0x0405;
- public static final int GL_LEFT = 0x0406;
- public static final int GL_RIGHT = 0x0407;
- public static final int GL_FRONT_AND_BACK = 0x0408;
- public static final int GL_AUX0 = 0x0409;
- public static final int GL_AUX1 = 0x040A;
- public static final int GL_AUX2 = 0x040B;
- public static final int GL_AUX3 = 0x040C;
-
- /* Enable */
- /* GL_FOG */
- /* GL_LIGHTING */
- /* GL_TEXTURE_1D */
- /* GL_TEXTURE_2D */
- /* GL_LINE_STIPPLE */
- /* GL_POLYGON_STIPPLE */
- /* GL_CULL_FACE */
- /* GL_ALPHA_TEST */
- /* GL_BLEND */
- /* GL_INDEX_LOGIC_OP */
- /* GL_COLOR_LOGIC_OP */
- /* GL_DITHER */
- /* GL_STENCIL_TEST */
- /* GL_DEPTH_TEST */
- /* GL_CLIP_PLANE0 */
- /* GL_CLIP_PLANE1 */
- /* GL_CLIP_PLANE2 */
- /* GL_CLIP_PLANE3 */
- /* GL_CLIP_PLANE4 */
- /* GL_CLIP_PLANE5 */
- /* GL_LIGHT0 */
- /* GL_LIGHT1 */
- /* GL_LIGHT2 */
- /* GL_LIGHT3 */
- /* GL_LIGHT4 */
- /* GL_LIGHT5 */
- /* GL_LIGHT6 */
- /* GL_LIGHT7 */
- /* GL_TEXTURE_GEN_S */
- /* GL_TEXTURE_GEN_T */
- /* GL_TEXTURE_GEN_R */
- /* GL_TEXTURE_GEN_Q */
- /* GL_MAP1_VERTEX_3 */
- /* GL_MAP1_VERTEX_4 */
- /* GL_MAP1_COLOR_4 */
- /* GL_MAP1_INDEX */
- /* GL_MAP1_NORMAL */
- /* GL_MAP1_TEXTURE_COORD_1 */
- /* GL_MAP1_TEXTURE_COORD_2 */
- /* GL_MAP1_TEXTURE_COORD_3 */
- /* GL_MAP1_TEXTURE_COORD_4 */
- /* GL_MAP2_VERTEX_3 */
- /* GL_MAP2_VERTEX_4 */
- /* GL_MAP2_COLOR_4 */
- /* GL_MAP2_INDEX */
- /* GL_MAP2_NORMAL */
- /* GL_MAP2_TEXTURE_COORD_1 */
- /* GL_MAP2_TEXTURE_COORD_2 */
- /* GL_MAP2_TEXTURE_COORD_3 */
- /* GL_MAP2_TEXTURE_COORD_4 */
- /* GL_POINT_SMOOTH */
- /* GL_LINE_SMOOTH */
- /* GL_POLYGON_SMOOTH */
- /* GL_SCISSOR_TEST */
- /* GL_COLOR_MATERIAL */
- /* GL_NORMALIZE */
- /* GL_AUTO_NORMAL */
- /* GL_VERTEX_ARRAY */
- /* GL_NORMAL_ARRAY */
- /* GL_COLOR_ARRAY */
- /* GL_INDEX_ARRAY */
- /* GL_TEXTURE_COORD_ARRAY */
- /* GL_EDGE_FLAG_ARRAY */
- /* GL_POLYGON_OFFSET_POINT */
- /* GL_POLYGON_OFFSET_LINE */
- /* GL_POLYGON_OFFSET_FILL */
-
- /* ErrorCode */
- public static final int GL_NO_ERROR = 0;
- public static final int GL_INVALID_ENUM = 0x0500;
- public static final int GL_INVALID_VALUE = 0x0501;
- public static final int GL_INVALID_OPERATION = 0x0502;
- public static final int GL_STACK_OVERFLOW = 0x0503;
- public static final int GL_STACK_UNDERFLOW = 0x0504;
- public static final int GL_OUT_OF_MEMORY = 0x0505;
-
- /* FeedBackMode */
- public static final int GL_2D = 0x0600;
- public static final int GL_3D = 0x0601;
- public static final int GL_3D_COLOR = 0x0602;
- public static final int GL_3D_COLOR_TEXTURE = 0x0603;
- public static final int GL_4D_COLOR_TEXTURE = 0x0604;
-
- /* FeedBackToken */
- public static final int GL_PASS_THROUGH_TOKEN = 0x0700;
- public static final int GL_POINT_TOKEN = 0x0701;
- public static final int GL_LINE_TOKEN = 0x0702;
- public static final int GL_POLYGON_TOKEN = 0x0703;
- public static final int GL_BITMAP_TOKEN = 0x0704;
- public static final int GL_DRAW_PIXEL_TOKEN = 0x0705;
- public static final int GL_COPY_PIXEL_TOKEN = 0x0706;
- public static final int GL_LINE_RESET_TOKEN = 0x0707;
-
- /* FogMode */
- /* GL_LINEAR */
- public static final int GL_EXP = 0x0800;
- public static final int GL_EXP2 = 0x0801;
-
- /* FogParameter */
- /* GL_FOG_COLOR */
- /* GL_FOG_DENSITY */
- /* GL_FOG_END */
- /* GL_FOG_INDEX */
- /* GL_FOG_MODE */
- /* GL_FOG_START */
-
- /* FrontFaceDirection */
- public static final int GL_CW = 0x0900;
- public static final int GL_CCW = 0x0901;
-
- /* GetMapTarget */
- public static final int GL_COEFF = 0x0A00;
- public static final int GL_ORDER = 0x0A01;
- public static final int GL_DOMAIN = 0x0A02;
-
- /* GetPixelMap */
- /* GL_PIXEL_MAP_I_TO_I */
- /* GL_PIXEL_MAP_S_TO_S */
- /* GL_PIXEL_MAP_I_TO_R */
- /* GL_PIXEL_MAP_I_TO_G */
- /* GL_PIXEL_MAP_I_TO_B */
- /* GL_PIXEL_MAP_I_TO_A */
- /* GL_PIXEL_MAP_R_TO_R */
- /* GL_PIXEL_MAP_G_TO_G */
- /* GL_PIXEL_MAP_B_TO_B */
- /* GL_PIXEL_MAP_A_TO_A */
-
- /* GetPointerTarget */
- /* GL_VERTEX_ARRAY_POINTER */
- /* GL_NORMAL_ARRAY_POINTER */
- /* GL_COLOR_ARRAY_POINTER */
- /* GL_INDEX_ARRAY_POINTER */
- /* GL_TEXTURE_COORD_ARRAY_POINTER */
- /* GL_EDGE_FLAG_ARRAY_POINTER */
-
- /* GetTarget */
- public static final int GL_CURRENT_COLOR = 0x0B00;
- public static final int GL_CURRENT_INDEX = 0x0B01;
- public static final int GL_CURRENT_NORMAL = 0x0B02;
- public static final int GL_CURRENT_TEXTURE_COORDS = 0x0B03;
- public static final int GL_CURRENT_RASTER_COLOR = 0x0B04;
- public static final int GL_CURRENT_RASTER_INDEX = 0x0B05;
- public static final int GL_CURRENT_RASTER_TEXTURE_COORDS = 0x0B06;
- public static final int GL_CURRENT_RASTER_POSITION = 0x0B07;
- public static final int GL_CURRENT_RASTER_POSITION_VALID = 0x0B08;
- public static final int GL_CURRENT_RASTER_DISTANCE = 0x0B09;
- public static final int GL_POINT_SMOOTH = 0x0B10;
- public static final int GL_POINT_SIZE = 0x0B11;
- public static final int GL_POINT_SIZE_RANGE = 0x0B12;
- public static final int GL_POINT_SIZE_GRANULARITY = 0x0B13;
- public static final int GL_LINE_SMOOTH = 0x0B20;
- public static final int GL_LINE_WIDTH = 0x0B21;
- public static final int GL_LINE_WIDTH_RANGE = 0x0B22;
- public static final int GL_LINE_WIDTH_GRANULARITY = 0x0B23;
- public static final int GL_LINE_STIPPLE = 0x0B24;
- public static final int GL_LINE_STIPPLE_PATTERN = 0x0B25;
- public static final int GL_LINE_STIPPLE_REPEAT = 0x0B26;
- public static final int GL_LIST_MODE = 0x0B30;
- public static final int GL_MAX_LIST_NESTING = 0x0B31;
- public static final int GL_LIST_BASE = 0x0B32;
- public static final int GL_LIST_INDEX = 0x0B33;
- public static final int GL_POLYGON_MODE = 0x0B40;
- public static final int GL_POLYGON_SMOOTH = 0x0B41;
- public static final int GL_POLYGON_STIPPLE = 0x0B42;
- public static final int GL_EDGE_FLAG = 0x0B43;
- public static final int GL_CULL_FACE = 0x0B44;
- public static final int GL_CULL_FACE_MODE = 0x0B45;
- public static final int GL_FRONT_FACE = 0x0B46;
- public static final int GL_LIGHTING = 0x0B50;
- public static final int GL_LIGHT_MODEL_LOCAL_VIEWER = 0x0B51;
- public static final int GL_LIGHT_MODEL_TWO_SIDE = 0x0B52;
- public static final int GL_LIGHT_MODEL_AMBIENT = 0x0B53;
- public static final int GL_SHADE_MODEL = 0x0B54;
- public static final int GL_COLOR_MATERIAL_FACE = 0x0B55;
- public static final int GL_COLOR_MATERIAL_PARAMETER = 0x0B56;
- public static final int GL_COLOR_MATERIAL = 0x0B57;
- public static final int GL_FOG = 0x0B60;
- public static final int GL_FOG_INDEX = 0x0B61;
- public static final int GL_FOG_DENSITY = 0x0B62;
- public static final int GL_FOG_START = 0x0B63;
- public static final int GL_FOG_END = 0x0B64;
- public static final int GL_FOG_MODE = 0x0B65;
- public static final int GL_FOG_COLOR = 0x0B66;
- public static final int GL_DEPTH_RANGE = 0x0B70;
- public static final int GL_DEPTH_TEST = 0x0B71;
- public static final int GL_DEPTH_WRITEMASK = 0x0B72;
- public static final int GL_DEPTH_CLEAR_VALUE = 0x0B73;
- public static final int GL_DEPTH_FUNC = 0x0B74;
- public static final int GL_ACCUM_CLEAR_VALUE = 0x0B80;
- public static final int GL_STENCIL_TEST = 0x0B90;
- public static final int GL_STENCIL_CLEAR_VALUE = 0x0B91;
- public static final int GL_STENCIL_FUNC = 0x0B92;
- public static final int GL_STENCIL_VALUE_MASK = 0x0B93;
- public static final int GL_STENCIL_FAIL = 0x0B94;
- public static final int GL_STENCIL_PASS_DEPTH_FAIL = 0x0B95;
- public static final int GL_STENCIL_PASS_DEPTH_PASS = 0x0B96;
- public static final int GL_STENCIL_REF = 0x0B97;
- public static final int GL_STENCIL_WRITEMASK = 0x0B98;
- public static final int GL_MATRIX_MODE = 0x0BA0;
- public static final int GL_NORMALIZE = 0x0BA1;
- public static final int GL_VIEWPORT = 0x0BA2;
- public static final int GL_MODELVIEW_STACK_DEPTH = 0x0BA3;
- public static final int GL_PROJECTION_STACK_DEPTH = 0x0BA4;
- public static final int GL_TEXTURE_STACK_DEPTH = 0x0BA5;
- public static final int GL_MODELVIEW_MATRIX = 0x0BA6;
- public static final int GL_PROJECTION_MATRIX = 0x0BA7;
- public static final int GL_TEXTURE_MATRIX = 0x0BA8;
- public static final int GL_ATTRIB_STACK_DEPTH = 0x0BB0;
- public static final int GL_CLIENT_ATTRIB_STACK_DEPTH = 0x0BB1;
- public static final int GL_ALPHA_TEST = 0x0BC0;
- public static final int GL_ALPHA_TEST_FUNC = 0x0BC1;
- public static final int GL_ALPHA_TEST_REF = 0x0BC2;
- public static final int GL_DITHER = 0x0BD0;
- public static final int GL_BLEND_DST = 0x0BE0;
- public static final int GL_BLEND_SRC = 0x0BE1;
- public static final int GL_BLEND = 0x0BE2;
- public static final int GL_LOGIC_OP_MODE = 0x0BF0;
- public static final int GL_INDEX_LOGIC_OP = 0x0BF1;
- public static final int GL_COLOR_LOGIC_OP = 0x0BF2;
- public static final int GL_AUX_BUFFERS = 0x0C00;
- public static final int GL_DRAW_BUFFER = 0x0C01;
- public static final int GL_READ_BUFFER = 0x0C02;
- public static final int GL_SCISSOR_BOX = 0x0C10;
- public static final int GL_SCISSOR_TEST = 0x0C11;
- public static final int GL_INDEX_CLEAR_VALUE = 0x0C20;
- public static final int GL_INDEX_WRITEMASK = 0x0C21;
- public static final int GL_COLOR_CLEAR_VALUE = 0x0C22;
- public static final int GL_COLOR_WRITEMASK = 0x0C23;
- public static final int GL_INDEX_MODE = 0x0C30;
- public static final int GL_RGBA_MODE = 0x0C31;
- public static final int GL_DOUBLEBUFFER = 0x0C32;
- public static final int GL_STEREO = 0x0C33;
- public static final int GL_RENDER_MODE = 0x0C40;
- public static final int GL_PERSPECTIVE_CORRECTION_HINT = 0x0C50;
- public static final int GL_POINT_SMOOTH_HINT = 0x0C51;
- public static final int GL_LINE_SMOOTH_HINT = 0x0C52;
- public static final int GL_POLYGON_SMOOTH_HINT = 0x0C53;
- public static final int GL_FOG_HINT = 0x0C54;
- public static final int GL_TEXTURE_GEN_S = 0x0C60;
- public static final int GL_TEXTURE_GEN_T = 0x0C61;
- public static final int GL_TEXTURE_GEN_R = 0x0C62;
- public static final int GL_TEXTURE_GEN_Q = 0x0C63;
- public static final int GL_PIXEL_MAP_I_TO_I = 0x0C70;
- public static final int GL_PIXEL_MAP_S_TO_S = 0x0C71;
- public static final int GL_PIXEL_MAP_I_TO_R = 0x0C72;
- public static final int GL_PIXEL_MAP_I_TO_G = 0x0C73;
- public static final int GL_PIXEL_MAP_I_TO_B = 0x0C74;
- public static final int GL_PIXEL_MAP_I_TO_A = 0x0C75;
- public static final int GL_PIXEL_MAP_R_TO_R = 0x0C76;
- public static final int GL_PIXEL_MAP_G_TO_G = 0x0C77;
- public static final int GL_PIXEL_MAP_B_TO_B = 0x0C78;
- public static final int GL_PIXEL_MAP_A_TO_A = 0x0C79;
- public static final int GL_PIXEL_MAP_I_TO_I_SIZE = 0x0CB0;
- public static final int GL_PIXEL_MAP_S_TO_S_SIZE = 0x0CB1;
- public static final int GL_PIXEL_MAP_I_TO_R_SIZE = 0x0CB2;
- public static final int GL_PIXEL_MAP_I_TO_G_SIZE = 0x0CB3;
- public static final int GL_PIXEL_MAP_I_TO_B_SIZE = 0x0CB4;
- public static final int GL_PIXEL_MAP_I_TO_A_SIZE = 0x0CB5;
- public static final int GL_PIXEL_MAP_R_TO_R_SIZE = 0x0CB6;
- public static final int GL_PIXEL_MAP_G_TO_G_SIZE = 0x0CB7;
- public static final int GL_PIXEL_MAP_B_TO_B_SIZE = 0x0CB8;
- public static final int GL_PIXEL_MAP_A_TO_A_SIZE = 0x0CB9;
- public static final int GL_UNPACK_SWAP_BYTES = 0x0CF0;
- public static final int GL_UNPACK_LSB_FIRST = 0x0CF1;
- public static final int GL_UNPACK_ROW_LENGTH = 0x0CF2;
- public static final int GL_UNPACK_SKIP_ROWS = 0x0CF3;
- public static final int GL_UNPACK_SKIP_PIXELS = 0x0CF4;
- public static final int GL_UNPACK_ALIGNMENT = 0x0CF5;
- public static final int GL_PACK_SWAP_BYTES = 0x0D00;
- public static final int GL_PACK_LSB_FIRST = 0x0D01;
- public static final int GL_PACK_ROW_LENGTH = 0x0D02;
- public static final int GL_PACK_SKIP_ROWS = 0x0D03;
- public static final int GL_PACK_SKIP_PIXELS = 0x0D04;
- public static final int GL_PACK_ALIGNMENT = 0x0D05;
- public static final int GL_MAP_COLOR = 0x0D10;
- public static final int GL_MAP_STENCIL = 0x0D11;
- public static final int GL_INDEX_SHIFT = 0x0D12;
- public static final int GL_INDEX_OFFSET = 0x0D13;
- public static final int GL_RED_SCALE = 0x0D14;
- public static final int GL_RED_BIAS = 0x0D15;
- public static final int GL_ZOOM_X = 0x0D16;
- public static final int GL_ZOOM_Y = 0x0D17;
- public static final int GL_GREEN_SCALE = 0x0D18;
- public static final int GL_GREEN_BIAS = 0x0D19;
- public static final int GL_BLUE_SCALE = 0x0D1A;
- public static final int GL_BLUE_BIAS = 0x0D1B;
- public static final int GL_ALPHA_SCALE = 0x0D1C;
- public static final int GL_ALPHA_BIAS = 0x0D1D;
- public static final int GL_DEPTH_SCALE = 0x0D1E;
- public static final int GL_DEPTH_BIAS = 0x0D1F;
- public static final int GL_MAX_EVAL_ORDER = 0x0D30;
- public static final int GL_MAX_LIGHTS = 0x0D31;
- public static final int GL_MAX_CLIP_PLANES = 0x0D32;
- public static final int GL_MAX_TEXTURE_SIZE = 0x0D33;
- public static final int GL_MAX_PIXEL_MAP_TABLE = 0x0D34;
- public static final int GL_MAX_ATTRIB_STACK_DEPTH = 0x0D35;
- public static final int GL_MAX_MODELVIEW_STACK_DEPTH = 0x0D36;
- public static final int GL_MAX_NAME_STACK_DEPTH = 0x0D37;
- public static final int GL_MAX_PROJECTION_STACK_DEPTH = 0x0D38;
- public static final int GL_MAX_TEXTURE_STACK_DEPTH = 0x0D39;
- public static final int GL_MAX_VIEWPORT_DIMS = 0x0D3A;
- public static final int GL_MAX_CLIENT_ATTRIB_STACK_DEPTH = 0x0D3B;
- public static final int GL_SUBPIXEL_BITS = 0x0D50;
- public static final int GL_INDEX_BITS = 0x0D51;
- public static final int GL_RED_BITS = 0x0D52;
- public static final int GL_GREEN_BITS = 0x0D53;
- public static final int GL_BLUE_BITS = 0x0D54;
- public static final int GL_ALPHA_BITS = 0x0D55;
- public static final int GL_DEPTH_BITS = 0x0D56;
- public static final int GL_STENCIL_BITS = 0x0D57;
- public static final int GL_ACCUM_RED_BITS = 0x0D58;
- public static final int GL_ACCUM_GREEN_BITS = 0x0D59;
- public static final int GL_ACCUM_BLUE_BITS = 0x0D5A;
- public static final int GL_ACCUM_ALPHA_BITS = 0x0D5B;
- public static final int GL_NAME_STACK_DEPTH = 0x0D70;
- public static final int GL_AUTO_NORMAL = 0x0D80;
- public static final int GL_MAP1_COLOR_4 = 0x0D90;
- public static final int GL_MAP1_INDEX = 0x0D91;
- public static final int GL_MAP1_NORMAL = 0x0D92;
- public static final int GL_MAP1_TEXTURE_COORD_1 = 0x0D93;
- public static final int GL_MAP1_TEXTURE_COORD_2 = 0x0D94;
- public static final int GL_MAP1_TEXTURE_COORD_3 = 0x0D95;
- public static final int GL_MAP1_TEXTURE_COORD_4 = 0x0D96;
- public static final int GL_MAP1_VERTEX_3 = 0x0D97;
- public static final int GL_MAP1_VERTEX_4 = 0x0D98;
- public static final int GL_MAP2_COLOR_4 = 0x0DB0;
- public static final int GL_MAP2_INDEX = 0x0DB1;
- public static final int GL_MAP2_NORMAL = 0x0DB2;
- public static final int GL_MAP2_TEXTURE_COORD_1 = 0x0DB3;
- public static final int GL_MAP2_TEXTURE_COORD_2 = 0x0DB4;
- public static final int GL_MAP2_TEXTURE_COORD_3 = 0x0DB5;
- public static final int GL_MAP2_TEXTURE_COORD_4 = 0x0DB6;
- public static final int GL_MAP2_VERTEX_3 = 0x0DB7;
- public static final int GL_MAP2_VERTEX_4 = 0x0DB8;
- public static final int GL_MAP1_GRID_DOMAIN = 0x0DD0;
- public static final int GL_MAP1_GRID_SEGMENTS = 0x0DD1;
- public static final int GL_MAP2_GRID_DOMAIN = 0x0DD2;
- public static final int GL_MAP2_GRID_SEGMENTS = 0x0DD3;
- public static final int GL_TEXTURE_1D = 0x0DE0;
- public static final int GL_TEXTURE_2D = 0x0DE1;
- public static final int GL_FEEDBACK_BUFFER_POINTER = 0x0DF0;
- public static final int GL_FEEDBACK_BUFFER_SIZE = 0x0DF1;
- public static final int GL_FEEDBACK_BUFFER_TYPE = 0x0DF2;
- public static final int GL_SELECTION_BUFFER_POINTER = 0x0DF3;
- public static final int GL_SELECTION_BUFFER_SIZE = 0x0DF4;
- /* GL_TEXTURE_BINDING_1D */
- /* GL_TEXTURE_BINDING_2D */
- /* GL_VERTEX_ARRAY */
- /* GL_NORMAL_ARRAY */
- /* GL_COLOR_ARRAY */
- /* GL_INDEX_ARRAY */
- /* GL_TEXTURE_COORD_ARRAY */
- /* GL_EDGE_FLAG_ARRAY */
- /* GL_VERTEX_ARRAY_SIZE */
- /* GL_VERTEX_ARRAY_TYPE */
- /* GL_VERTEX_ARRAY_STRIDE */
- /* GL_NORMAL_ARRAY_TYPE */
- /* GL_NORMAL_ARRAY_STRIDE */
- /* GL_COLOR_ARRAY_SIZE */
- /* GL_COLOR_ARRAY_TYPE */
- /* GL_COLOR_ARRAY_STRIDE */
- /* GL_INDEX_ARRAY_TYPE */
- /* GL_INDEX_ARRAY_STRIDE */
- /* GL_TEXTURE_COORD_ARRAY_SIZE */
- /* GL_TEXTURE_COORD_ARRAY_TYPE */
- /* GL_TEXTURE_COORD_ARRAY_STRIDE */
- /* GL_EDGE_FLAG_ARRAY_STRIDE */
- /* GL_POLYGON_OFFSET_FACTOR */
- /* GL_POLYGON_OFFSET_UNITS */
-
- /* GetTextureParameter */
- /* GL_TEXTURE_MAG_FILTER */
- /* GL_TEXTURE_MIN_FILTER */
- /* GL_TEXTURE_WRAP_S */
- /* GL_TEXTURE_WRAP_T */
- public static final int GL_TEXTURE_WIDTH = 0x1000;
- public static final int GL_TEXTURE_HEIGHT = 0x1001;
- public static final int GL_TEXTURE_INTERNAL_FORMAT = 0x1003;
- public static final int GL_TEXTURE_BORDER_COLOR = 0x1004;
- public static final int GL_TEXTURE_BORDER = 0x1005;
- /* GL_TEXTURE_RED_SIZE */
- /* GL_TEXTURE_GREEN_SIZE */
- /* GL_TEXTURE_BLUE_SIZE */
- /* GL_TEXTURE_ALPHA_SIZE */
- /* GL_TEXTURE_LUMINANCE_SIZE */
- /* GL_TEXTURE_INTENSITY_SIZE */
- /* GL_TEXTURE_PRIORITY */
- /* GL_TEXTURE_RESIDENT */
-
- /* HintMode */
- public static final int GL_DONT_CARE = 0x1100;
- public static final int GL_FASTEST = 0x1101;
- public static final int GL_NICEST = 0x1102;
-
- /* HintTarget */
- /* GL_PERSPECTIVE_CORRECTION_HINT */
- /* GL_POINT_SMOOTH_HINT */
- /* GL_LINE_SMOOTH_HINT */
- /* GL_POLYGON_SMOOTH_HINT */
- /* GL_FOG_HINT */
- /* GL_PHONG_HINT */
-
- /* IndexPointerType */
- /* GL_SHORT */
- /* GL_INT */
- /* GL_FLOAT */
- /* GL_DOUBLE */
-
- /* LightModelParameter */
- /* GL_LIGHT_MODEL_AMBIENT */
- /* GL_LIGHT_MODEL_LOCAL_VIEWER */
- /* GL_LIGHT_MODEL_TWO_SIDE */
-
- /* LightName */
- public static final int GL_LIGHT0 = 0x4000;
- public static final int GL_LIGHT1 = 0x4001;
- public static final int GL_LIGHT2 = 0x4002;
- public static final int GL_LIGHT3 = 0x4003;
- public static final int GL_LIGHT4 = 0x4004;
- public static final int GL_LIGHT5 = 0x4005;
- public static final int GL_LIGHT6 = 0x4006;
- public static final int GL_LIGHT7 = 0x4007;
-
- /* LightParameter */
- public static final int GL_AMBIENT = 0x1200;
- public static final int GL_DIFFUSE = 0x1201;
- public static final int GL_SPECULAR = 0x1202;
- public static final int GL_POSITION = 0x1203;
- public static final int GL_SPOT_DIRECTION = 0x1204;
- public static final int GL_SPOT_EXPONENT = 0x1205;
- public static final int GL_SPOT_CUTOFF = 0x1206;
- public static final int GL_CONSTANT_ATTENUATION = 0x1207;
- public static final int GL_LINEAR_ATTENUATION = 0x1208;
- public static final int GL_QUADRATIC_ATTENUATION = 0x1209;
-
- /* InterleavedArrays */
- /* GL_V2F */
- /* GL_V3F */
- /* GL_C4UB_V2F */
- /* GL_C4UB_V3F */
- /* GL_C3F_V3F */
- /* GL_N3F_V3F */
- /* GL_C4F_N3F_V3F */
- /* GL_T2F_V3F */
- /* GL_T4F_V4F */
- /* GL_T2F_C4UB_V3F */
- /* GL_T2F_C3F_V3F */
- /* GL_T2F_N3F_V3F */
- /* GL_T2F_C4F_N3F_V3F */
- /* GL_T4F_C4F_N3F_V4F */
-
- /* ListMode */
- public static final int GL_COMPILE = 0x1300;
- public static final int GL_COMPILE_AND_EXECUTE = 0x1301;
-
- /* ListNameType */
- /* GL_BYTE */
- /* GL_UNSIGNED_BYTE */
- /* GL_SHORT */
- /* GL_UNSIGNED_SHORT */
- /* GL_INT */
- /* GL_UNSIGNED_INT */
- /* GL_FLOAT */
- /* GL_2_BYTES */
- /* GL_3_BYTES */
- /* GL_4_BYTES */
-
- /* LogicOp */
- public static final int GL_CLEAR = 0x1500;
- public static final int GL_AND = 0x1501;
- public static final int GL_AND_REVERSE = 0x1502;
- public static final int GL_COPY = 0x1503;
- public static final int GL_AND_INVERTED = 0x1504;
- public static final int GL_NOOP = 0x1505;
- public static final int GL_XOR = 0x1506;
- public static final int GL_OR = 0x1507;
- public static final int GL_NOR = 0x1508;
- public static final int GL_EQUIV = 0x1509;
- public static final int GL_INVERT = 0x150A;
- public static final int GL_OR_REVERSE = 0x150B;
- public static final int GL_COPY_INVERTED = 0x150C;
- public static final int GL_OR_INVERTED = 0x150D;
- public static final int GL_NAND = 0x150E;
- public static final int GL_SET = 0x150F;
-
- /* MapTarget */
- /* GL_MAP1_COLOR_4 */
- /* GL_MAP1_INDEX */
- /* GL_MAP1_NORMAL */
- /* GL_MAP1_TEXTURE_COORD_1 */
- /* GL_MAP1_TEXTURE_COORD_2 */
- /* GL_MAP1_TEXTURE_COORD_3 */
- /* GL_MAP1_TEXTURE_COORD_4 */
- /* GL_MAP1_VERTEX_3 */
- /* GL_MAP1_VERTEX_4 */
- /* GL_MAP2_COLOR_4 */
- /* GL_MAP2_INDEX */
- /* GL_MAP2_NORMAL */
- /* GL_MAP2_TEXTURE_COORD_1 */
- /* GL_MAP2_TEXTURE_COORD_2 */
- /* GL_MAP2_TEXTURE_COORD_3 */
- /* GL_MAP2_TEXTURE_COORD_4 */
- /* GL_MAP2_VERTEX_3 */
- /* GL_MAP2_VERTEX_4 */
-
- /* MaterialFace */
- /* GL_FRONT */
- /* GL_BACK */
- /* GL_FRONT_AND_BACK */
-
- /* MaterialParameter */
- public static final int GL_EMISSION = 0x1600;
- public static final int GL_SHININESS = 0x1601;
- public static final int GL_AMBIENT_AND_DIFFUSE = 0x1602;
- public static final int GL_COLOR_INDEXES = 0x1603;
- /* GL_AMBIENT */
- /* GL_DIFFUSE */
- /* GL_SPECULAR */
-
- /* MatrixMode */
- public static final int GL_MODELVIEW = 0x1700;
- public static final int GL_PROJECTION = 0x1701;
- public static final int GL_TEXTURE = 0x1702;
-
- /* MeshMode1 */
- /* GL_POINT */
- /* GL_LINE */
-
- /* MeshMode2 */
- /* GL_POINT */
- /* GL_LINE */
- /* GL_FILL */
-
- /* NormalPointerType */
- /* GL_BYTE */
- /* GL_SHORT */
- /* GL_INT */
- /* GL_FLOAT */
- /* GL_DOUBLE */
-
- /* PixelCopyType */
- public static final int GL_COLOR = 0x1800;
- public static final int GL_DEPTH = 0x1801;
- public static final int GL_STENCIL = 0x1802;
-
- /* PixelFormat */
- public static final int GL_COLOR_INDEX = 0x1900;
- public static final int GL_STENCIL_INDEX = 0x1901;
- public static final int GL_DEPTH_COMPONENT = 0x1902;
- public static final int GL_RED = 0x1903;
- public static final int GL_GREEN = 0x1904;
- public static final int GL_BLUE = 0x1905;
- public static final int GL_ALPHA = 0x1906;
- public static final int GL_RGB = 0x1907;
- public static final int GL_RGBA = 0x1908;
- public static final int GL_LUMINANCE = 0x1909;
- public static final int GL_LUMINANCE_ALPHA = 0x190A;
-
- /* PixelMap */
- /* GL_PIXEL_MAP_I_TO_I */
- /* GL_PIXEL_MAP_S_TO_S */
- /* GL_PIXEL_MAP_I_TO_R */
- /* GL_PIXEL_MAP_I_TO_G */
- /* GL_PIXEL_MAP_I_TO_B */
- /* GL_PIXEL_MAP_I_TO_A */
- /* GL_PIXEL_MAP_R_TO_R */
- /* GL_PIXEL_MAP_G_TO_G */
- /* GL_PIXEL_MAP_B_TO_B */
- /* GL_PIXEL_MAP_A_TO_A */
-
- /* PixelStore */
- /* GL_UNPACK_SWAP_BYTES */
- /* GL_UNPACK_LSB_FIRST */
- /* GL_UNPACK_ROW_LENGTH */
- /* GL_UNPACK_SKIP_ROWS */
- /* GL_UNPACK_SKIP_PIXELS */
- /* GL_UNPACK_ALIGNMENT */
- /* GL_PACK_SWAP_BYTES */
- /* GL_PACK_LSB_FIRST */
- /* GL_PACK_ROW_LENGTH */
- /* GL_PACK_SKIP_ROWS */
- /* GL_PACK_SKIP_PIXELS */
- /* GL_PACK_ALIGNMENT */
-
- /* PixelTransfer */
- /* GL_MAP_COLOR */
- /* GL_MAP_STENCIL */
- /* GL_INDEX_SHIFT */
- /* GL_INDEX_OFFSET */
- /* GL_RED_SCALE */
- /* GL_RED_BIAS */
- /* GL_GREEN_SCALE */
- /* GL_GREEN_BIAS */
- /* GL_BLUE_SCALE */
- /* GL_BLUE_BIAS */
- /* GL_ALPHA_SCALE */
- /* GL_ALPHA_BIAS */
- /* GL_DEPTH_SCALE */
- /* GL_DEPTH_BIAS */
-
- /* PixelType */
- public static final int GL_BITMAP = 0x1A00;
- /* GL_BYTE */
- /* GL_UNSIGNED_BYTE */
- /* GL_SHORT */
- /* GL_UNSIGNED_SHORT */
- /* GL_INT */
- /* GL_UNSIGNED_INT */
- /* GL_FLOAT */
-
- /* PolygonMode */
- public static final int GL_POINT = 0x1B00;
- public static final int GL_LINE = 0x1B01;
- public static final int GL_FILL = 0x1B02;
-
- /* ReadBufferMode */
- /* GL_FRONT_LEFT */
- /* GL_FRONT_RIGHT */
- /* GL_BACK_LEFT */
- /* GL_BACK_RIGHT */
- /* GL_FRONT */
- /* GL_BACK */
- /* GL_LEFT */
- /* GL_RIGHT */
- /* GL_AUX0 */
- /* GL_AUX1 */
- /* GL_AUX2 */
- /* GL_AUX3 */
-
- /* RenderingMode */
- public static final int GL_RENDER = 0x1C00;
- public static final int GL_FEEDBACK = 0x1C01;
- public static final int GL_SELECT = 0x1C02;
-
- /* ShadingModel */
- public static final int GL_FLAT = 0x1D00;
- public static final int GL_SMOOTH = 0x1D01;
-
- /* StencilFunction */
- /* GL_NEVER */
- /* GL_LESS */
- /* GL_EQUAL */
- /* GL_LEQUAL */
- /* GL_GREATER */
- /* GL_NOTEQUAL */
- /* GL_GEQUAL */
- /* GL_ALWAYS */
-
- /* StencilOp */
- /* GL_ZERO */
- public static final int GL_KEEP = 0x1E00;
- public static final int GL_REPLACE = 0x1E01;
- public static final int GL_INCR = 0x1E02;
- public static final int GL_DECR = 0x1E03;
- /* GL_INVERT */
-
- /* StringName */
- public static final int GL_VENDOR = 0x1F00;
- public static final int GL_RENDERER = 0x1F01;
- public static final int GL_VERSION = 0x1F02;
- public static final int GL_EXTENSIONS = 0x1F03;
-
- /* TextureCoordName */
- public static final int GL_S = 0x2000;
- public static final int GL_T = 0x2001;
- public static final int GL_R = 0x2002;
- public static final int GL_Q = 0x2003;
-
- /* TexCoordPointerType */
- /* GL_SHORT */
- /* GL_INT */
- /* GL_FLOAT */
- /* GL_DOUBLE */
-
- /* TextureEnvMode */
- public static final int GL_MODULATE = 0x2100;
- public static final int GL_DECAL = 0x2101;
- /* GL_BLEND */
- /* GL_REPLACE */
-
- /* TextureEnvParameter */
- public static final int GL_TEXTURE_ENV_MODE = 0x2200;
- public static final int GL_TEXTURE_ENV_COLOR = 0x2201;
-
- /* TextureEnvTarget */
- public static final int GL_TEXTURE_ENV = 0x2300;
-
- /* TextureGenMode */
- public static final int GL_EYE_LINEAR = 0x2400;
- public static final int GL_OBJECT_LINEAR = 0x2401;
- public static final int GL_SPHERE_MAP = 0x2402;
-
- /* TextureGenParameter */
- public static final int GL_TEXTURE_GEN_MODE = 0x2500;
- public static final int GL_OBJECT_PLANE = 0x2501;
- public static final int GL_EYE_PLANE = 0x2502;
-
- /* TextureMagFilter */
- public static final int GL_NEAREST = 0x2600;
- public static final int GL_LINEAR = 0x2601;
-
- /* TextureMinFilter */
- /* GL_NEAREST */
- /* GL_LINEAR */
- public static final int GL_NEAREST_MIPMAP_NEAREST = 0x2700;
- public static final int GL_LINEAR_MIPMAP_NEAREST = 0x2701;
- public static final int GL_NEAREST_MIPMAP_LINEAR = 0x2702;
- public static final int GL_LINEAR_MIPMAP_LINEAR = 0x2703;
-
- /* TextureParameterName */
- public static final int GL_TEXTURE_MAG_FILTER = 0x2800;
- public static final int GL_TEXTURE_MIN_FILTER = 0x2801;
- public static final int GL_TEXTURE_WRAP_S = 0x2802;
- public static final int GL_TEXTURE_WRAP_T = 0x2803;
- /* GL_TEXTURE_BORDER_COLOR */
- /* GL_TEXTURE_PRIORITY */
-
- /* TextureTarget */
- /* GL_TEXTURE_1D */
- /* GL_TEXTURE_2D */
- /* GL_PROXY_TEXTURE_1D */
- /* GL_PROXY_TEXTURE_2D */
-
- /* TextureWrapMode */
- public static final int GL_CLAMP = 0x2900;
- public static final int GL_REPEAT = 0x2901;
-
- /* VertexPointerType */
- /* GL_SHORT */
- /* GL_INT */
- /* GL_FLOAT */
- /* GL_DOUBLE */
-
- /* ClientAttribMask */
- public static final int GL_CLIENT_PIXEL_STORE_BIT = 0x00000001;
- public static final int GL_CLIENT_VERTEX_ARRAY_BIT = 0x00000002;
- public static final int GL_CLIENT_ALL_ATTRIB_BITS = 0xffffffff;
-
- /* polygon_offset */
- public static final int GL_POLYGON_OFFSET_FACTOR = 0x8038;
- public static final int GL_POLYGON_OFFSET_UNITS = 0x2A00;
- public static final int GL_POLYGON_OFFSET_POINT = 0x2A01;
- public static final int GL_POLYGON_OFFSET_LINE = 0x2A02;
- public static final int GL_POLYGON_OFFSET_FILL = 0x8037;
-
- /* texture */
- public static final int GL_ALPHA4 = 0x803B;
- public static final int GL_ALPHA8 = 0x803C;
- public static final int GL_ALPHA12 = 0x803D;
- public static final int GL_ALPHA16 = 0x803E;
- public static final int GL_LUMINANCE4 = 0x803F;
- public static final int GL_LUMINANCE8 = 0x8040;
- public static final int GL_LUMINANCE12 = 0x8041;
- public static final int GL_LUMINANCE16 = 0x8042;
- public static final int GL_LUMINANCE4_ALPHA4 = 0x8043;
- public static final int GL_LUMINANCE6_ALPHA2 = 0x8044;
- public static final int GL_LUMINANCE8_ALPHA8 = 0x8045;
- public static final int GL_LUMINANCE12_ALPHA4 = 0x8046;
- public static final int GL_LUMINANCE12_ALPHA12 = 0x8047;
- public static final int GL_LUMINANCE16_ALPHA16 = 0x8048;
- public static final int GL_INTENSITY = 0x8049;
- public static final int GL_INTENSITY4 = 0x804A;
- public static final int GL_INTENSITY8 = 0x804B;
- public static final int GL_INTENSITY12 = 0x804C;
- public static final int GL_INTENSITY16 = 0x804D;
- public static final int GL_R3_G3_B2 = 0x2A10;
- public static final int GL_RGB4 = 0x804F;
- public static final int GL_RGB5 = 0x8050;
- public static final int GL_RGB8 = 0x8051;
- public static final int GL_RGB10 = 0x8052;
- public static final int GL_RGB12 = 0x8053;
- public static final int GL_RGB16 = 0x8054;
- public static final int GL_RGBA2 = 0x8055;
- public static final int GL_RGBA4 = 0x8056;
- public static final int GL_RGB5_A1 = 0x8057;
- public static final int GL_RGBA8 = 0x8058;
- public static final int GL_RGB10_A2 = 0x8059;
- public static final int GL_RGBA12 = 0x805A;
- public static final int GL_RGBA16 = 0x805B;
- public static final int GL_TEXTURE_RED_SIZE = 0x805C;
- public static final int GL_TEXTURE_GREEN_SIZE = 0x805D;
- public static final int GL_TEXTURE_BLUE_SIZE = 0x805E;
- public static final int GL_TEXTURE_ALPHA_SIZE = 0x805F;
- public static final int GL_TEXTURE_LUMINANCE_SIZE = 0x8060;
- public static final int GL_TEXTURE_INTENSITY_SIZE = 0x8061;
- public static final int GL_PROXY_TEXTURE_1D = 0x8063;
- public static final int GL_PROXY_TEXTURE_2D = 0x8064;
-
- /* texture_object */
- public static final int GL_TEXTURE_PRIORITY = 0x8066;
- public static final int GL_TEXTURE_RESIDENT = 0x8067;
- public static final int GL_TEXTURE_BINDING_1D = 0x8068;
- public static final int GL_TEXTURE_BINDING_2D = 0x8069;
-
- /* vertex_array */
- public static final int GL_VERTEX_ARRAY = 0x8074;
- public static final int GL_NORMAL_ARRAY = 0x8075;
- public static final int GL_COLOR_ARRAY = 0x8076;
- public static final int GL_INDEX_ARRAY = 0x8077;
- public static final int GL_TEXTURE_COORD_ARRAY = 0x8078;
- public static final int GL_EDGE_FLAG_ARRAY = 0x8079;
- public static final int GL_VERTEX_ARRAY_SIZE = 0x807A;
- public static final int GL_VERTEX_ARRAY_TYPE = 0x807B;
- public static final int GL_VERTEX_ARRAY_STRIDE = 0x807C;
- public static final int GL_NORMAL_ARRAY_TYPE = 0x807E;
- public static final int GL_NORMAL_ARRAY_STRIDE = 0x807F;
- public static final int GL_COLOR_ARRAY_SIZE = 0x8081;
- public static final int GL_COLOR_ARRAY_TYPE = 0x8082;
- public static final int GL_COLOR_ARRAY_STRIDE = 0x8083;
- public static final int GL_INDEX_ARRAY_TYPE = 0x8085;
- public static final int GL_INDEX_ARRAY_STRIDE = 0x8086;
- public static final int GL_TEXTURE_COORD_ARRAY_SIZE = 0x8088;
- public static final int GL_TEXTURE_COORD_ARRAY_TYPE = 0x8089;
- public static final int GL_TEXTURE_COORD_ARRAY_STRIDE = 0x808A;
- public static final int GL_EDGE_FLAG_ARRAY_STRIDE = 0x808C;
- public static final int GL_VERTEX_ARRAY_POINTER = 0x808E;
- public static final int GL_NORMAL_ARRAY_POINTER = 0x808F;
- public static final int GL_COLOR_ARRAY_POINTER = 0x8090;
- public static final int GL_INDEX_ARRAY_POINTER = 0x8091;
- public static final int GL_TEXTURE_COORD_ARRAY_POINTER = 0x8092;
- public static final int GL_EDGE_FLAG_ARRAY_POINTER = 0x8093;
- public static final int GL_V2F = 0x2A20;
- public static final int GL_V3F = 0x2A21;
- public static final int GL_C4UB_V2F = 0x2A22;
- public static final int GL_C4UB_V3F = 0x2A23;
- public static final int GL_C3F_V3F = 0x2A24;
- public static final int GL_N3F_V3F = 0x2A25;
- public static final int GL_C4F_N3F_V3F = 0x2A26;
- public static final int GL_T2F_V3F = 0x2A27;
- public static final int GL_T4F_V4F = 0x2A28;
- public static final int GL_T2F_C4UB_V3F = 0x2A29;
- public static final int GL_T2F_C3F_V3F = 0x2A2A;
- public static final int GL_T2F_N3F_V3F = 0x2A2B;
- public static final int GL_T2F_C4F_N3F_V3F = 0x2A2C;
- public static final int GL_T4F_C4F_N3F_V4F = 0x2A2D;
-
- /* Extensions */
- public static final int GL_EXT_vertex_array = 1;
- public static final int GL_EXT_bgra = 1;
- public static final int GL_EXT_paletted_texture = 1;
- public static final int GL_WIN_swap_hint = 1;
- public static final int GL_WIN_draw_range_elements = 1;
- // public static final int GL_WIN_phong_shading = 1;
- // public static final int GL_WIN_specular_fog = 1;
-
- /* EXT_vertex_array */
- public static final int GL_VERTEX_ARRAY_EXT = 0x8074;
- public static final int GL_NORMAL_ARRAY_EXT = 0x8075;
- public static final int GL_COLOR_ARRAY_EXT = 0x8076;
- public static final int GL_INDEX_ARRAY_EXT = 0x8077;
- public static final int GL_TEXTURE_COORD_ARRAY_EXT = 0x8078;
- public static final int GL_EDGE_FLAG_ARRAY_EXT = 0x8079;
- public static final int GL_VERTEX_ARRAY_SIZE_EXT = 0x807A;
- public static final int GL_VERTEX_ARRAY_TYPE_EXT = 0x807B;
- public static final int GL_VERTEX_ARRAY_STRIDE_EXT = 0x807C;
- public static final int GL_VERTEX_ARRAY_COUNT_EXT = 0x807D;
- public static final int GL_NORMAL_ARRAY_TYPE_EXT = 0x807E;
- public static final int GL_NORMAL_ARRAY_STRIDE_EXT = 0x807F;
- public static final int GL_NORMAL_ARRAY_COUNT_EXT = 0x8080;
- public static final int GL_COLOR_ARRAY_SIZE_EXT = 0x8081;
- public static final int GL_COLOR_ARRAY_TYPE_EXT = 0x8082;
- public static final int GL_COLOR_ARRAY_STRIDE_EXT = 0x8083;
- public static final int GL_COLOR_ARRAY_COUNT_EXT = 0x8084;
- public static final int GL_INDEX_ARRAY_TYPE_EXT = 0x8085;
- public static final int GL_INDEX_ARRAY_STRIDE_EXT = 0x8086;
- public static final int GL_INDEX_ARRAY_COUNT_EXT = 0x8087;
- public static final int GL_TEXTURE_COORD_ARRAY_SIZE_EXT = 0x8088;
- public static final int GL_TEXTURE_COORD_ARRAY_TYPE_EXT = 0x8089;
- public static final int GL_TEXTURE_COORD_ARRAY_STRIDE_EXT = 0x808A;
- public static final int GL_TEXTURE_COORD_ARRAY_COUNT_EXT = 0x808B;
- public static final int GL_EDGE_FLAG_ARRAY_STRIDE_EXT = 0x808C;
- public static final int GL_EDGE_FLAG_ARRAY_COUNT_EXT = 0x808D;
- public static final int GL_VERTEX_ARRAY_POINTER_EXT = 0x808E;
- public static final int GL_NORMAL_ARRAY_POINTER_EXT = 0x808F;
- public static final int GL_COLOR_ARRAY_POINTER_EXT = 0x8090;
- public static final int GL_INDEX_ARRAY_POINTER_EXT = 0x8091;
- public static final int GL_TEXTURE_COORD_ARRAY_POINTER_EXT = 0x8092;
- public static final int GL_EDGE_FLAG_ARRAY_POINTER_EXT = 0x8093;
- public static final int GL_DOUBLE_EXT = GL_DOUBLE;
-
- /* EXT_bgra */
- public static final int GL_BGR_EXT = 0x80E0;
- public static final int GL_BGRA_EXT = 0x80E1;
-
- /* EXT_paletted_texture */
-
- /* These must match the GL_COLOR_TABLE_*_SGI enumerants */
- public static final int GL_COLOR_TABLE_FORMAT_EXT = 0x80D8;
- public static final int GL_COLOR_TABLE_WIDTH_EXT = 0x80D9;
- public static final int GL_COLOR_TABLE_RED_SIZE_EXT = 0x80DA;
- public static final int GL_COLOR_TABLE_GREEN_SIZE_EXT = 0x80DB;
- public static final int GL_COLOR_TABLE_BLUE_SIZE_EXT = 0x80DC;
- public static final int GL_COLOR_TABLE_ALPHA_SIZE_EXT = 0x80DD;
- public static final int GL_COLOR_TABLE_LUMINANCE_SIZE_EXT = 0x80DE;
- public static final int GL_COLOR_TABLE_INTENSITY_SIZE_EXT = 0x80DF;
-
- public static final int GL_COLOR_INDEX1_EXT = 0x80E2;
- public static final int GL_COLOR_INDEX2_EXT = 0x80E3;
- public static final int GL_COLOR_INDEX4_EXT = 0x80E4;
- public static final int GL_COLOR_INDEX8_EXT = 0x80E5;
- public static final int GL_COLOR_INDEX12_EXT = 0x80E6;
- public static final int GL_COLOR_INDEX16_EXT = 0x80E7;
-
- /* WIN_draw_range_elements */
- public static final int GL_MAX_ELEMENTS_VERTICES_WIN = 0x80E8;
- public static final int GL_MAX_ELEMENTS_INDICES_WIN = 0x80E9;
-
- /* WIN_phong_shading */
- public static final int GL_PHONG_WIN = 0x80EA;
- public static final int GL_PHONG_HINT_WIN = 0x80EB;
-
- /* WIN_specular_fog */
- public static final int GL_FOG_SPECULAR_TEXTURE_WIN = 0x80EC;
-
- /* For compatibility with OpenGL v1.0 */
- public static final int GL_LOGIC_OP = GL_INDEX_LOGIC_OP;
- public static final int GL_TEXTURE_COMPONENTS = GL_TEXTURE_INTERNAL_FORMAT;
-
- public static final native void glAccum (int op, float value);
- public static final native void glAlphaFunc (int func, float ref);
- public static final native boolean glAreTexturesResident (int n, int[] textures, boolean[] residences);
- public static final native void glArrayElement (int index);
- public static final native int glBegin (int mode);
- public static final native int glEnd ();
- public static final native void glBindTexture (int target, int texture);
- public static final native void glBitmap (int width, int height, float xorig, float yorig, float xmove, float ymove, byte[] bitmap);
- public static final native void glBlendFunc (int sfactor, int dfactor);
- public static final native void glCallList (int list);
- public static final native void glCallLists (int n, int type, byte[] lists);
- public static final native void glCallLists (int n, int type, char[] lists);
- public static final native void glCallLists (int n, int type, int[] lists);
- public static final native void glClear (int mask);
- public static final native void glClearAccum (float red, float green, float blue, float alpha);
- public static final native void glClearColor (float red, float green, float blue, float alpha);
- public static final native void glClearDepth (double depth);
- public static final native void glClearIndex (float c);
- public static final native void glClearStencil (int s);
- public static final native void glClipPlane (int plane, double[] equation);
- public static final native void glColor3b (byte red, byte green, byte blue);
- public static final native void glColor3d (double red, double green, double blue);
- public static final native void glColor3f (float red, float green, float blue);
- public static final native void glColor3i (int red, int green, int blue);
- public static final native void glColor3s (short red, short green, short blue);
- public static final native void glColor3ub (byte red, byte green, byte blue);
- public static final native void glColor3ui (int red, int green, int blue);
- public static final native void glColor3us (short red, short green, short blue);
- public static final native void glColor4b (byte red, byte green, byte blue, byte alpha);
- public static final native void glColor4d (double red, double green, double blue, double alpha);
- public static final native void glColor4f (float red, float green, float blue, float alpha);
- public static final native void glColor4i (int red, int green, int blue, int alpha);
- public static final native void glColor4s (short red, short green, short blue, short alpha);
- public static final native void glColor4ub (byte red, byte green, byte blue, byte alpha);
- public static final native void glColor4ui (int red, int green, int blue, int alpha);
- public static final native void glColor4us (short red, short green, short blue, short alpha);
- public static final native void glColor3bv (byte[] v);
- public static final native void glColor3dv (double[] v);
- public static final native void glColor3fv (float[] v);
- public static final native void glColor3iv (int[] v);
- public static final native void glColor3sv (short[] v);
- public static final native void glColor3ubv (byte[] v);
- public static final native void glColor3uiv (int[] v);
- public static final native void glColor3usv (short[] v);
- public static final native void glColor4bv (byte[] v);
- public static final native void glColor4dv (double[] v);
- public static final native void glColor4fv (float[] v);
- public static final native void glColor4iv (int[] v);
- public static final native void glColor4ubv (byte[] v);
- public static final native void glColor4uiv (int[] v);
- public static final native void glColor4usv (short[] v);
- public static final native void glColor4ubv (short[] v);
- public static final native void glColorMask (boolean red, boolean green, boolean blue, boolean alpha);
- public static final native void glColorMaterial (int face, int mode);
- public static final native void glColorPointer (int size, int type, int stride, int[] pointer);
- //public static final native void glColorTableEXT (int target, int internalFormat, int width, int format, int type, int[] data);
- //public static final native void glColorSubTableEXT (int target, int start, int count, int format, int type, int[] data);
- public static final native void glCopyPixels (int x, int y, int width, int height, int type);
- public static final native void glCopyTexImage1D (int target, int level, int internalFormat, int x, int y, int width, int border);
- public static final native void glCopyTexImage2D (int target, int level, int internalFormat, int x, int y, int width, int height, int border);
- public static final native void glCopyTexSubImage1D (int target, int level, int xoffset, int x, int y, int width);
- public static final native void glCopyTexSubImage2D (int target, int level, int xoffset, int yoffset, int x, int y, int width, int height);
- public static final native void glCullFace (int mode);
- public static final native void glDeleteLists (int list, int range);
- public static final native void glDeleteTextures (int n, int[] textures);
- public static final native void glDepthFunc (int func);
- public static final native void glDepthMask (boolean flag);
- public static final native void glDepthRange (double znear, double zfar);
- public static final native void glDrawArrays (int mode, int first, int count);
- public static final native void glDrawBuffer (int mode);
- public static final native void glDrawElements (int mode, int count, int type, int[] indices); /* MULTIPLES TYPES */
- public static final native void glDrawPixels (int width, int height, int format, int type, int[] pixels); /* MULTIPLES TYPES */
- public static final native void glEdgeFlag (boolean flag);
- public static final native void glEdgeFlagv (boolean[] flag);
- public static final native void glEdgeFlagPointer (int stride, boolean[] pointer);
- public static final native void glEnable (int cap);
- public static final native void glDisable (int cap);
- public static final native void glEnableClientState (int array);
- public static final native void glDisableClientState (int array);
- public static final native void glEvalCoord1d (double u);
- public static final native void glEvalCoord1f (float u);
- public static final native void glEvalCoord2d (double u, double v);
- public static final native void glEvalCoord2f (float u, float v);
- public static final native void glEvalCoord1dv (double[] u);
- public static final native void glEvalCoord1fv (float[] u);
- public static final native void glEvalCoord2dv (double[] u);
- public static final native void glEvalCoord2fv (float[] u);
- public static final native void glEvalMesh1 (int mode, int i1, int i2);
- public static final native void glEvalMesh2 (int mode, int i1, int i2, int j1, int j2);
- public static final native void glEvalPoint1 (int i);
- public static final native void glEvalPoint2 (int i, int j);
- public static final native void glFeedbackBuffer (int size, int type, float[] buffer);
- public static final native void glFinish ();
- public static final native void glFlush ();
- public static final native void glFogf (int pname, float param);
- public static final native void glFogi (int pname, int param);
- public static final native void glFogfv (int pname, float[] params);
- public static final native void glFogiv (int pname, int[] params);
- public static final native void glFrontFace (int mode);
- public static final native void glFrustum (double left, double right, double bottom, double top, double znear, double zfar);
- public static final native int glGenLists (int range);
- public static final native void glGenTextures (int n, int[] textures);
- public static final native void glGetBooleanv (int pname, boolean[] params);
- public static final native void glGetDoublev (int pname, double[] params);
- public static final native void glGetFloatv (int pname, float[] params);
- public static final native void glGetIntegerv (int pname, int[] params);
- public static final native void glGetClipPlane (int plane, double[] equation);
- //public static final native void glGetColorTableEXT (int target, int format, int type, int[] data);
- //public static final native void glGetColorTableParameterfvEXT (int target, int pname, float[] params);
- //public static final native void glGetColorTableParameterivEXT (int target, int pname, int[] params);
- public static final native int glGetError ();
- public static final native void glGetLightfv (int light, int pname, float[] params);
- public static final native void glGetLightiv (int light, int pname, int[] params);
- public static final native void glGetMapdv (int tagert, int query, double[] v);
- public static final native void glGetMapfv (int tagert, int query, float[] v);
- public static final native void glGetMapiv (int tagert, int query, int[] v);
- public static final native void glGetMaterialfv (int face, int pname, float[] params);
- public static final native void glGetMaterialiv (int face, int pname, int[] params);
- public static final native void glGetPixelMapfv (int map, float[] values);
- public static final native void glGetPixelMapuiv (int map, int[] values);
- public static final native void glGetPixelMapusv (int map, short[] values);
- public static final native void glGetPointerv (int pname, int[] params);
- /* TEST */
- public static final native void glGetPolygonStipple (byte[] mask);
- public static final native int glGetString (int name);
- /* SHOULD RETURN A STRING */
- public static final native void glGetTexEnvfv (int target, int pname, float[] params);
- public static final native void glGetTexEnviv (int target, int pname, int[] params);
- public static final native void glGetTexGendv (int coord, int pname, double[] params);
- public static final native void glGetTexGenfv (int coord, int pname, float[] params);
- public static final native void glGetTexGeniv (int coord, int pname, int[] params);
- public static final native void glGetTexImage (int target, int level, int format, int type, int[] pixels); /* MULTIPLES TYPES ARRAY */
- public static final native void glGetTexLevelParameterfv (int target, int level, int pname, float[] params);
- public static final native void glGetTexLevelParameteriv (int target, int level, int pname, int[] params);
- public static final native void glGetTexParameterfv (int target, int pname, float[] params);
- public static final native void glGetTexParameteriv (int target, int pname, int[] params);
- public static final native void glHint (int target, int mode);
- public static final native void glIndexd (double c);
- public static final native void glIndexf (float c);
- public static final native void glIndexi (int c);
- public static final native void glIndexs (short c);
- public static final native void glIndexdv (double[] c);
- public static final native void glIndexfv (float[] c);
- public static final native void glIndexiv (int[] c);
- public static final native void glIndexsv (short[] c);
- public static final native void glIndexMask (int mask);
- public static final native void glIndexPointer (int type, int stride, int[] pointer);
- /* MULTIPLES TYPES */
- public static final native void glInitNames ();
- public static final native void glInterleavedArrays (int format, int stride, int[] pointer);
- /* CHECK */
- public static final native boolean glIsEnabled (int cap);
- public static final native boolean glIsList (int list);
- public static final native boolean glIsTexture (int texture);
- public static final native void glLightf (int light, int pname, float param);
- public static final native void glLighti (int light, int pname, int param);
- public static final native void glLightfv (int light, int pname, float[] param);
- //public static final native void glLightfv (int light, int pname, int param);
- public static final native void glLightiv (int light, int pname, int[] param);
- public static final native void glLightModelf (int pname, float param);
- public static final native void glLightModeli (int pname, int param);
- public static final native void glLightModelfv (int pname, float[] param);
- public static final native void glLightModeliv (int pname, int[] param);
- public static final native void glLineStipple (int factor, short pattern);
- public static final native void glLineWidth (float width);
- public static final native void glListBase (int base);
- public static final native void glLoadIdentity ();
- public static final native void glLoadMatrixd (double[] m);
- public static final native void glLoadMatrixf (float[] m);
- public static final native void glLoadName (int name);
- public static final native void glLogicOp (int opcode);
- public static final native void glMap1d (int target, double u1, double u2, int stride, int order, double[] points);
- public static final native void glMap1f (int target, float u1, float u2, int stride, int order, float[] points);
- public static final native void glMap2d (int target, double u1, double u2, int ustride, int uorder, double v1, double v2, int vstride, int vorder, double[] points);
- public static final native void glMap2f (int target, float u1, float u2, int ustride, int uorder, float v1, float v2, int vstride, int vorder, float[] points);
- public static final native void glMapGrid1d (int un, double u1, double u2);
- public static final native void glMapGrid1f (int un, float u1, float u2);
- public static final native void glMapGrid2d (int un, double u1, double u2, int vm, double v1, double v2);
- public static final native void glMapGrid2f (int un, float u1, float u2, int vm, float v1, float v2);
- public static final native void glMaterialf (int face, int pname, float param);
- public static final native void glMateriali (int face, int pname, int param);
- public static final native void glMaterialfv (int face, int pname, float[] param);
- public static final native void glMaterialiv (int face, int pname, int[] param);
- public static final native void glMatrixMode (int mode);
- public static final native void glMultMatrixd (double[] m);
- public static final native void glMultMatrixf (float[] m);
- public static final native void glNewList (int list, int mode);
- public static final native void glEndList ();
- public static final native void glNormal3b (byte nx, byte ny, byte nz);
- public static final native void glNormal3d (double nx, double ny, double nz);
- public static final native void glNormal3f (float nx, float ny, float nz);
- public static final native void glNormal3i (int nx, int ny, int nz);
- public static final native void glNormal3s (short nx, short ny, short nz);
- public static final native void glNormal3bv (byte[] v);
- public static final native void glNormal3dv (double[] v);
- public static final native void glNormal3fv (float[] v);
- public static final native void glNormal3iv (int[] v);
- public static final native void glNormal3sv (short[] v);
- public static final native void glNormalPointer (int type, int stride, int[] pointer); /* MULTIPLES TYPES ARRAY */
- public static final native void glOrtho (double left, double right, double bottom, double top, double znear, double zfar);
- public static final native void glPassThrough (float token);
- public static final native void glPixelMapfv (int map, int mapsize, float[] values);
- public static final native void glPixelMapuiv (int map, int mapsize, int[] values);
- public static final native void glPixelMapusv (int map, int mapsize, short[] values);
- public static final native void glPixelStoref (int pname, float param);
- public static final native void glPixelStorei (int pname, int param);
- public static final native void glPixelTransferf (int pname, float param);
- public static final native void glPixelTransferi (int pname, int param);
- public static final native void glPixelZoom (float xfactor, float yfactor);
- public static final native void glPointSize (float size);
- public static final native void glPolygonMode (int face, int mode);
- public static final native void glPolygonOffset (float factor, float units);
- public static final native void glPolygonStipple (byte[] mask);
- public static final native void glPrioritizeTextures (int n, int[] textures, float[] priorities);
- public static final native void glPushAttrib (int mask);
- public static final native void glPopAttrib ();
- public static final native void glPushClientAttrib (int mask);
- public static final native void glPopClientAttrib ();
- public static final native void glPushMatrix ();
- public static final native void glPopMatrix ();
- public static final native void glPushName (int name);
- public static final native void glPopName ();
- public static final native void glRasterPos2d (double x, double y);
- public static final native void glRasterPos2f (float x, float y);
- public static final native void glRasterPos2i (int x, int y);
- public static final native void glRasterPos2s (short x, short y);
- public static final native void glRasterPos3d (double x, double y, double z);
- public static final native void glRasterPos3f (float x, float y, float z);
- public static final native void glRasterPos3i (int x, int y, int z);
- public static final native void glRasterPos3s (short x, short y, short z);
- public static final native void glRasterPos4d (double x, double y, double z, double w);
- public static final native void glRasterPos4f (float x, float y, float z, float w);
- public static final native void glRasterPos4i (int x, int y, int z, int w);
- public static final native void glRasterPos4s (short x, short y, short z, short w);
- public static final native void glRasterPos2dv (double[] v);
- public static final native void glRasterPos2fv (float[] v);
- public static final native void glRasterPos2iv (int[] v);
- public static final native void glRasterPos2sv (short[] v);
- public static final native void glRasterPos3dv (double[] v);
- public static final native void glRasterPos3fv (float[] v);
- public static final native void glRasterPos3iv (int[] v);
- public static final native void glRasterPos3sv (short[] v);
- public static final native void glRasterPos4dv (double[] v);
- public static final native void glRasterPos4fv (float[] v);
- public static final native void glRasterPos4iv (int[] v);
- public static final native void glRasterPos4sv (short[] v);
- public static final native void glReadBuffer (int mode);
- public static final native void glReadPixels (int x, int y, int width, int height, int format, int type, int[] pixels); /* MULTIPLES TYPES ARRAY */
- public static final native void glRectd (double x1, double y1, double x2, double y2);
- public static final native void glRectf (float x1, float y1, float x2, float y2);
- public static final native void glRecti (int x1, int y1, int x2, int y2);
- public static final native void glRects (short x1, short y1, short x2, short y2);
- public static final native void glRectdv (double[] v1, double[] v2);
- public static final native void glRectfv (float[] v1, float[] v2);
- public static final native void glRectiv (int[] v1, int[] v2);
- public static final native void glRectsv (short[] v, short[] v2);
- public static final native int glRenderMode (int mode);
- public static final native void glRotated (double angle, double x, double y, double z);
- public static final native void glRotatef (float angle, float x, float y, float z);
- public static final native void glScaled (double x, double y, double z);
- public static final native void glScalef (float x, float y, float z);
- public static final native void glScissor (int x, int y, int width, int height);
- //public static final native void glSelectBuffer (int size, int[] buffer);
- public static final native void glSelectBuffer (int size, int buffer);
- public static final native void glShadeModel (int mode);
- public static final native void glStencilFunc (int func, int ref, int mask);
- public static final native void glStencilMask (int mask);
- public static final native void glStencilOp (int fail, int zfail, int zpass);
- public static final native void glTexCoord1d (double s);
- public static final native void glTexCoord1f (float s);
- public static final native void glTexCoord1i (int s);
- public static final native void glTexCoord1s (short s);
- public static final native void glTexCoord2d (double s, double t);
- public static final native void glTexCoord2f (float s, float t);
- public static final native void glTexCoord2i (int s, int t);
- public static final native void glTexCoord2s (short s, short t);
- public static final native void glTexCoord3d (double s, double t, double r);
- public static final native void glTexCoord3f (float s, float t, float r);
- public static final native void glTexCoord3i (int s, int t, int r);
- public static final native void glTexCoord3s (short s, short t, short r);
- public static final native void glTexCoord4d (double s, double t, double r, double q);
- public static final native void glTexCoord4f (float s, float t, float r, float q);
- public static final native void glTexCoord4i (int s, int t, int r, int q);
- public static final native void glTexCoord4s (short s, short t, short r, short q);
- public static final native void glTexCoord1dv (double[] v);
- public static final native void glTexCoord1fv (float[] v);
- public static final native void glTexCoord1iv (int[] v);
- public static final native void glTexCoord1sv (short[] v);
- public static final native void glTexCoord2dv (double[] v);
- public static final native void glTexCoord2fv (float[] v);
- public static final native void glTexCoord2iv (int[] v);
- public static final native void glTexCoord2sv (short[] v);
- public static final native void glTexCoord3dv (double[] v);
- public static final native void glTexCoord3fv (float[] v);
- public static final native void glTexCoord3iv (int[] v);
- public static final native void glTexCoord3sv (short[] v);
- public static final native void glTexCoord4dv (double[] v);
- public static final native void glTexCoord4fv (float[] v);
- public static final native void glTexCoord4iv (int[] v);
- public static final native void glTexCoord4sv (short[] v);
- public static final native void glTexCoordPointer (int size, int type, int stride, int[] pointer); /*MULTIPLES ARRAYS - CHECK MSDK, COUNT PARAM MISSING */
- public static final native void glTexEnvf (int target, int pname, float param);
- public static final native void glTexEnvi (int target, int pname, int param);
- public static final native void glTexEnvfv (int target, int pname, float[] params);
- public static final native void glTexEnviv (int target, int pname, int[] params);
- public static final native void glTexGend (int coord, int pname, double param);
- public static final native void glTexGenf (int coord, int pname, float param);
- public static final native void glTexGeni (int coord, int pname, int param);
- public static final native void glTexGendv (int coord, int pname, double[] params);
- public static final native void glTexGenfv (int coord, int pname, float[] params);
- public static final native void glTexGeniv (int coord, int pname, int[] params);
- public static final native void glTexImage1D (int target, int level, int internalFormat, int width, int border, int format, int type, int[] pixels); /* MULTIPLES ARRAYS */
- public static final native void glTexImage2D (int target, int level, int internalFormat, int width, int height, int border, int format, int type, byte[] pixels); /* MULTIPLES ARRAYS */
- public static final native void glTexParameterf (int target, int pname, float param);
- public static final native void glTexParameteri (int target, int pname, int param);
- public static final native void glTexParameterfv (int target, int pname, float[] params);
- public static final native void glTexParameteriv (int target, int pname, int[] params);
- public static final native void glTexSubImage1D (int target, int level, int xoffset, int width, int format, int type, int[] pixels); /* MULTIPLES ARRAYS */
- public static final native void glTexSubImage2D (int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, int[] pixels); /* MULTIPLES ARRAYS */
- public static final native void glTranslated (double x, double y, double z);
- public static final native void glTranslatef (float x, float y, float z);
- public static final native void glVertex2d (double x, double y);
- public static final native void glVertex2f (float x, float y);
- public static final native void glVertex2i (int x, int y);
- public static final native void glVertex2s (short x, short y);
- public static final native void glVertex3d (double x, double y, double z);
- public static final native void glVertex3f (float x, float y, float z);
- public static final native void glVertex3i (int x, int y, int z);
- public static final native void glVertex3s (short x, short y, short z);
- public static final native void glVertex4d (double x, double y, double z, double w);
- public static final native void glVertex4f (float x, float y, float z, float w);
- public static final native void glVertex4i (int x, int y, int z, int w);
- public static final native void glVertex4s (short x, short y, short z, short w);
- public static final native void glVertex2dv (double[] v);
- public static final native void glVertex2fv (float[] v);
- public static final native void glVertex2iv (int[] v);
- public static final native void glVertex2sv (short[] v);
- public static final native int glVertex3dv (double[] v);
- public static final native int glVertex3dv (int v);
- public static final native void glVertex3fv (float[] v);
- public static final native void glVertex3iv (int[] v);
- public static final native void glVertex3sv (short[] v);
- public static final native int glVertex4dv (double[] v);
- public static final native void glVertex4fv (float[] v);
- public static final native void glVertex4iv (int[] v);
- public static final native void glVertex4sv (short[] v);
- public static final native void glVertexPointer (int size, int type, int stride, int[] pointer); /* MULTIPLES ARRAYS */
- public static final native void glViewport (int x, int y, int width, int height);
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.swt.opengl/common/org/eclipse/swt/opengl/GLU.java b/bundles/org.eclipse.swt.opengl/common/org/eclipse/swt/opengl/GLU.java
deleted file mode 100644
index 2f837004a2..0000000000
--- a/bundles/org.eclipse.swt.opengl/common/org/eclipse/swt/opengl/GLU.java
+++ /dev/null
@@ -1,245 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.opengl;
-
-
-public class GLU {
-
- /* Version */
- public static final int GLU_VERSION_1_1 = 1;
- public static final int GLU_VERSION_1_2 = 1;
-
- /* Errors: (return value 0 = no error) */
- public static final int GLU_INVALID_ENUM = 100900;
- public static final int GLU_INVALID_VALUE = 100901;
- public static final int GLU_OUT_OF_MEMORY = 100902;
- public static final int GLU_INCOMPATIBLE_GL_VERSION = 100903;
-
- /* StringName */
- public static final int GLU_VERSION = 100800;
- public static final int GLU_EXTENSIONS = 100801;
-
-
- /**** Quadric constants ****/
-
- /* QuadricNormal */
- public static final int GLU_SMOOTH = 100000;
- public static final int GLU_FLAT = 100001;
- public static final int GLU_NONE = 100002;
-
- /* QuadricDrawStyle */
- public static final int GLU_POINT = 100010;
- public static final int GLU_LINE = 100011;
- public static final int GLU_FILL = 100012;
- public static final int GLU_SILHOUETTE = 100013;
-
- /* QuadricOrientation */
- public static final int GLU_OUTSIDE = 100020;
- public static final int GLU_INSIDE = 100021;
-
- /* Callback types: */
- /* GLU_ERROR 100103 */
-
-
- /**** Tesselation constants ****/
-
- public static final double GLU_TESS_MAX_COORD = 1.0e150;
-
- /* TessProperty */
- public static final int GLU_TESS_WINDING_RULE = 100140;
- public static final int GLU_TESS_BOUNDARY_ONLY = 100141;
- public static final int GLU_TESS_TOLERANCE = 100142;
-
- /* TessWinding */
- public static final int GLU_TESS_WINDING_ODD = 100130;
- public static final int GLU_TESS_WINDING_NONZERO = 100131;
- public static final int GLU_TESS_WINDING_POSITIVE = 100132;
- public static final int GLU_TESS_WINDING_NEGATIVE = 100133;
- public static final int GLU_TESS_WINDING_ABS_GEQ_TWO = 100134;
-
- /* TessCallback */
- public static final int GLU_TESS_BEGIN = 100100; /* void (CALLBACK*)(GLenum type) */
- public static final int GLU_TESS_VERTEX = 100101; /* void (CALLBACK*)(void *data) */
- public static final int GLU_TESS_END = 100102; /* void (CALLBACK*)(void) */
- public static final int GLU_TESS_ERROR = 100103; /* void (CALLBACK*)(GLenum errno) */
- public static final int GLU_TESS_EDGE_FLAG = 100104; /* void (CALLBACK*)(GLboolean boundaryEdge) */
- public static final int GLU_TESS_COMBINE = 100105; /* void (CALLBACK*)(GLdouble coords[3],
- void *data[4],
- GLfloat weight[4],
- void **dataOut) */
- public static final int GLU_TESS_BEGIN_DATA = 100106; /* void (CALLBACK*)(GLenum type,
- void *polygon_data) */
- public static final int GLU_TESS_VERTEX_DATA = 100107; /* void (CALLBACK*)(void *data,
- void *polygon_data) */
- public static final int GLU_TESS_END_DATA = 100108; /* void (CALLBACK*)(void *polygon_data) */
- public static final int GLU_TESS_ERROR_DATA = 100109; /* void (CALLBACK*)(GLenum errno,
- void *polygon_data) */
- public static final int GLU_TESS_EDGE_FLAG_DATA = 100110; /* void (CALLBACK*)(GLboolean boundaryEdge,
- void *polygon_data) */
- public static final int GLU_TESS_COMBINE_DATA = 100111; /* void (CALLBACK*)(GLdouble coords[3],
- void *data[4],
- GLfloat weight[4],
- void **dataOut,
- void *polygon_data) */
-
- /* TessError */
- public static final int GLU_TESS_ERROR1 = 100151;
- public static final int GLU_TESS_ERROR2 = 100152;
- public static final int GLU_TESS_ERROR3 = 100153;
- public static final int GLU_TESS_ERROR4 = 100154;
- public static final int GLU_TESS_ERROR5 = 100155;
- public static final int GLU_TESS_ERROR6 = 100156;
- public static final int GLU_TESS_ERROR7 = 100157;
- public static final int GLU_TESS_ERROR8 = 100158;
-
- public static final int GLU_TESS_MISSING_BEGIN_POLYGON = GLU_TESS_ERROR1;
- public static final int GLU_TESS_MISSING_BEGIN_CONTOUR = GLU_TESS_ERROR2;
- public static final int GLU_TESS_MISSING_END_POLYGON = GLU_TESS_ERROR3;
- public static final int GLU_TESS_MISSING_END_CONTOUR = GLU_TESS_ERROR4;
- public static final int GLU_TESS_COORD_TOO_LARGE = GLU_TESS_ERROR5;
- public static final int GLU_TESS_NEED_COMBINE_CALLBACK = GLU_TESS_ERROR6;
-
- /**** NURBS constants ****/
-
- /* NurbsProperty */
- public static final int GLU_AUTO_LOAD_MATRIX = 100200;
- public static final int GLU_CULLING = 100201;
- public static final int GLU_SAMPLING_TOLERANCE = 100203;
- public static final int GLU_DISPLAY_MODE = 100204;
- public static final int GLU_PARAMETRIC_TOLERANCE = 100202;
- public static final int GLU_SAMPLING_METHOD = 100205;
- public static final int GLU_U_STEP = 100206;
- public static final int GLU_V_STEP = 100207;
-
- /* NurbsSampling */
- public static final int GLU_PATH_LENGTH = 100215;
- public static final int GLU_PARAMETRIC_ERROR = 100216;
- public static final int GLU_DOMAIN_DISTANCE = 100217;
-
-
- /* NurbsTrim */
- public static final int GLU_MAP1_TRIM_2 = 100210;
- public static final int GLU_MAP1_TRIM_3 = 100211;
-
- /* NurbsDisplay */
- /* GLU_FILL 100012 */
- public static final int GLU_OUTLINE_POLYGON = 100240;
- public static final int GLU_OUTLINE_PATCH = 100241;
-
- /* NurbsCallback */
- /* GLU_ERROR 100103 */
-
- /* NurbsErrors */
- public static final int GLU_NURBS_ERROR1 = 100251;
- public static final int GLU_NURBS_ERROR2 = 100252;
- public static final int GLU_NURBS_ERROR3 = 100253;
- public static final int GLU_NURBS_ERROR4 = 100254;
- public static final int GLU_NURBS_ERROR5 = 100255;
- public static final int GLU_NURBS_ERROR6 = 100256;
- public static final int GLU_NURBS_ERROR7 = 100257;
- public static final int GLU_NURBS_ERROR8 = 100258;
- public static final int GLU_NURBS_ERROR9 = 100259;
- public static final int GLU_NURBS_ERROR10 = 100260;
- public static final int GLU_NURBS_ERROR11 = 100261;
- public static final int GLU_NURBS_ERROR12 = 100262;
- public static final int GLU_NURBS_ERROR13 = 100263;
- public static final int GLU_NURBS_ERROR14 = 100264;
- public static final int GLU_NURBS_ERROR15 = 100265;
- public static final int GLU_NURBS_ERROR16 = 100266;
- public static final int GLU_NURBS_ERROR17 = 100267;
- public static final int GLU_NURBS_ERROR18 = 100268;
- public static final int GLU_NURBS_ERROR19 = 100269;
- public static final int GLU_NURBS_ERROR20 = 100270;
- public static final int GLU_NURBS_ERROR21 = 100271;
- public static final int GLU_NURBS_ERROR22 = 100272;
- public static final int GLU_NURBS_ERROR23 = 100273;
- public static final int GLU_NURBS_ERROR24 = 100274;
- public static final int GLU_NURBS_ERROR25 = 100275;
- public static final int GLU_NURBS_ERROR26 = 100276;
- public static final int GLU_NURBS_ERROR27 = 100277;
- public static final int GLU_NURBS_ERROR28 = 100278;
- public static final int GLU_NURBS_ERROR29 = 100279;
- public static final int GLU_NURBS_ERROR30 = 100280;
- public static final int GLU_NURBS_ERROR31 = 100281;
- public static final int GLU_NURBS_ERROR32 = 100282;
- public static final int GLU_NURBS_ERROR33 = 100283;
- public static final int GLU_NURBS_ERROR34 = 100284;
- public static final int GLU_NURBS_ERROR35 = 100285;
- public static final int GLU_NURBS_ERROR36 = 100286;
- public static final int GLU_NURBS_ERROR37 = 100287;
-
- /* Contours types -- obsolete! */
- public static final int GLU_CW = 100120;
- public static final int GLU_CCW = 100121;
- public static final int GLU_INTERIOR = 100122;
- public static final int GLU_EXTERIOR = 100123;
- public static final int GLU_UNKNOWN = 100124;
-
- /* Names without "TESS_" prefix */
- public static final int GLU_BEGIN = GLU_TESS_BEGIN;
- public static final int GLU_VERTEX = GLU_TESS_VERTEX;
- public static final int GLU_END = GLU_TESS_END;
- public static final int GLU_ERROR = GLU_TESS_ERROR;
- public static final int GLU_EDGE_FLAG = GLU_TESS_EDGE_FLAG;
-
-
- public static final native void gluBeginCurve (int nobj);
- public static final native void gluEndCurve (int nobj);
- public static final native void gluBeginPolygon (int tess);
- public static final native void gluEndPolygon (int tess);
- public static final native void gluBeginSurface (int nobj);
- public static final native void gluEndSurface (int nobj);
- public static final native void gluBeginTrim (int nobj);
- public static final native void gluEndTrim (int nobj);
- public static final native int gluBuild1DMipmaps (int target, int componenets, int width, int format, int type, int data); /* MULTIPLES TYPES ARRAY */
- public static final native int gluBuild2DMipmaps (int target, int componenets, int width, int height, int format, int type, byte[] data); /* MULTIPLES TYPES ARRAY */
- public static final native void gluCylinder (int qobj, double baseRadius, double topRadius, double height, int slices, int stacks);
- public static final native void gluDeleteNurbsRenderer (int nobj);
- public static final native void gluDeleteQuadric (int qobj);
- public static final native void gluDeleteTess (int tess);
- public static final native void gluDisk (int qobj, double innerRadius, double outerRadius, int slices, int loops);
- public static final native int gluErrorString (int errCode); /* SHOULD RETURN A STRING */
- public static final native void gluGetNurbsProperty (int nobj, int property, float[] value);
- public static final native int gluGetString (int name); /* SHOULD RETURN A STRING */
- public static final native void gluGetTessProperty (int tess, int which, double[] value);
- public static final native void gluLoadSamplingMatrices (int nobj, float[] modelMatrix, float[] projMatrix, int[] viewport);
- public static final native void gluLookAt (double eyex, double eyey, double eyez, double centerx, double centery, double centerz, double upx, double upy, double upz);
- public static final native int gluNewNurbsRenderer ();
- public static final native int gluNewQuadric ();
- public static final native int gluNewTess ();
- public static final native void gluNextContour (int tess, int type);
- public static final native void gluNurbsCallback (int nobj, int which, int fn);
- public static final native void gluNurbsCurve (int nobj, int nknots, float[] knot, int stride, float[] ctlarray, int order, int type);
- public static final native void gluNurbsProperty (int nobj, int property, float value);
- public static final native void gluNurbsSurface (int nobj, int sknot_count, float[] sknot, int tknot_count, float[] tknot, int s_stride, int t_stride, float[] ctlarray, int sorder, int torder, int type);
- public static final native void gluOrtho2D (double left, double right, double bottom, double top);
- public static final native void gluPartialDisk (int qobj, double innerRadius, double outerRadius, int slices, int loops, double startAngle, double sweepAngle);
- public static final native void gluPerspective (double fovy, double aspect, double zNear, double zFar);
- public static final native void gluPickMatrix (double x, double y, double width, double height, int[] viewport);
- public static final native int gluProject (double objx, double objy, double objz,double[] modelMatrix, double[] projMatrix, int[] viewport, double[] winx, double[] winy, double[] winz);
- public static final native void gluPwlCurve (int nobj, int count, float[] array, int stride, int type);
- public static final native void gluQuadricCallback (int qobj, int which, int fn);
- public static final native void gluQuadricDrawStyle (int qobj, int drawStyle);
- public static final native void gluQuadricNormals (int qobj, int normals);
- public static final native void gluQuadricOrientation (int qobj, int orientation);
- public static final native void gluQuadricTexture (int qobj, boolean textureCoords);
- public static final native int gluScaleImage (int format, int widthin, int heightin, int typein, int datain, int widthout, int heightout, int typeout, int dataout); /*MULTIPLES TYPES ARRAYS*/
- public static final native void gluSphere (int qobj, double radius, int slices, int stacks);
- public static final native void gluTessBeginContour (int tess);
- public static final native void gluTessEndContour (int tess);
- public static final native void gluTessBeginPolygon (int tess, int polygon_data);
- public static final native void gluTessEndPolygon (int tess);
- public static final native void gluTessCallback (int tess, int which, int fn);
- public static final native void gluTessNormal (int tess, double x, double y, double z);
- public static final native void gluTessProperty (int tess, int property, double value); /* CHECK MSDN, VALUE'S TYPE IS DOUBLE */
- public static final native void gluTessVertex (int tess, double[] coords, int data);
- public static final native int gluUnProject (double winx, double winy, double winz, double[] modelMatrix, double[] projMatrix, int[] viewport, double[] objx, double[] objy, double[] objz);
-}
diff --git a/bundles/org.eclipse.swt.opengl/common/org/eclipse/swt/opengl/GLYPHMETRICSFLOAT.java b/bundles/org.eclipse.swt.opengl/common/org/eclipse/swt/opengl/GLYPHMETRICSFLOAT.java
deleted file mode 100644
index 4da0a94c4b..0000000000
--- a/bundles/org.eclipse.swt.opengl/common/org/eclipse/swt/opengl/GLYPHMETRICSFLOAT.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.opengl;
-
-
-public class GLYPHMETRICSFLOAT {
- public float gmfBlackBoxX;
- public float gmfBlackBoxY;
- public float gmfptGlyphOrigin_x;
- public float gmfptGlyphOrigin_y;
- public float gmfCellIncX;
- public float gmfCellIncY;
- public static final int sizeof = 24;
-}
diff --git a/bundles/org.eclipse.swt.opengl/common/org/eclipse/swt/opengl/ImageDataUtil.java b/bundles/org.eclipse.swt.opengl/common/org/eclipse/swt/opengl/ImageDataUtil.java
deleted file mode 100644
index d9002851c4..0000000000
--- a/bundles/org.eclipse.swt.opengl/common/org/eclipse/swt/opengl/ImageDataUtil.java
+++ /dev/null
@@ -1,524 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.opengl;
-
-
-public class ImageDataUtil {
- /**
- * Alpha mode, values 0 - 255 specify global alpha level
- */
- static final int
- ALPHA_OPAQUE = 255, // Fully opaque (ignores any alpha data)
- ALPHA_TRANSPARENT = 0, // Fully transparent (ignores any alpha data)
- ALPHA_CHANNEL_SEPARATE = -1, // Use alpha channel from separate alphaData
- ALPHA_CHANNEL_SOURCE = -2, // Use alpha channel embedded in sourceData
- ALPHA_MASK_UNPACKED = -3, // Use transparency mask formed by bytes in alphaData (non-zero is opaque)
- ALPHA_MASK_PACKED = -4, // Use transparency mask formed by packed bits in alphaData
- ALPHA_MASK_INDEX = -5, // Consider source palette indices transparent if in alphaData array
- ALPHA_MASK_RGB = -6; // Consider source RGBs transparent if in RGB888 format alphaData array
-
- /**
- * Data types (internal)
- */
- private static final int
- // direct / true color formats with arbitrary masks & shifts
- TYPE_GENERIC_8 = 0,
- TYPE_GENERIC_16_MSB = 1,
- TYPE_GENERIC_16_LSB = 2,
- TYPE_GENERIC_24 = 3,
- TYPE_GENERIC_32_MSB = 4,
- TYPE_GENERIC_32_LSB = 5,
- // palette indexed color formats
- TYPE_INDEX_8 = 6,
- TYPE_INDEX_4 = 7,
- TYPE_INDEX_2 = 8,
- TYPE_INDEX_1_MSB = 9,
- TYPE_INDEX_1_LSB = 10;
-
- /**
- * Byte and bit order constants.
- */
- static final int LSB_FIRST = 0;
- static final int MSB_FIRST = 1;
-
- /**
- * Blit operation bits to be OR'ed together to specify the desired operation.
- */
- static final int
- BLIT_SRC = 1, // copy source directly, else applies logic operations
- BLIT_ALPHA = 2, // enable alpha blending
- BLIT_DITHER = 4; // enable dithering in low color modes
-
- /**
- * Arbitrary channel width data to 8-bit conversion table.
- */
- static final byte[][] ANY_TO_EIGHT = new byte[9][];
- static {
- for (int b = 0; b < 9; ++b) {
- byte[] data = ANY_TO_EIGHT[b] = new byte[1 << b];
- if (b == 0) continue;
- int inc = 0;
- for (int bit = 0x10000; (bit >>= b) != 0;) inc |= bit;
- for (int v = 0, p = 0; v < 0x10000; v+= inc) data[p++] = (byte)(v >> 8);
- }
- }
-
- /**
- * Blits a direct palette image into a direct palette image.
- * <p>
- * Note: When the source and destination depth, order and masks
- * are pairwise equal and the blitter operation is BLIT_SRC,
- * the masks are ignored. Hence when not changing the image
- * data format, 0 may be specified for the masks.
- * </p>
- *
- * @param op the blitter operation: a combination of BLIT_xxx flags
- * (see BLIT_xxx constants)
- * @param srcData the source byte array containing image data
- * @param srcDepth the source depth: one of 8, 16, 24, 32
- * @param srcStride the source number of bytes per line
- * @param srcOrder the source byte ordering: one of MSB_FIRST or LSB_FIRST;
- * ignored if srcDepth is not 16 or 32
- * @param srcX the top-left x-coord of the source blit region
- * @param srcY the top-left y-coord of the source blit region
- * @param srcWidth the width of the source blit region
- * @param srcHeight the height of the source blit region
- * @param srcRedMask the source red channel mask
- * @param srcGreenMask the source green channel mask
- * @param srcBlueMask the source blue channel mask
- * @param alphaMode the alpha blending or mask mode, may be
- * an integer 0-255 for global alpha; ignored if BLIT_ALPHA
- * not specified in the blitter operations
- * (see ALPHA_MODE_xxx constants)
- * @param alphaData the alpha blending or mask data, varies depending
- * on the value of alphaMode and sometimes ignored
- * @param alphaStride the alpha data number of bytes per line
- * @param alphaX the top-left x-coord of the alpha blit region
- * @param alphaY the top-left y-coord of the alpha blit region
- * @param destData the destination byte array containing image data
- * @param destDepth the destination depth: one of 8, 16, 24, 32
- * @param destStride the destination number of bytes per line
- * @param destOrder the destination byte ordering: one of MSB_FIRST or LSB_FIRST;
- * ignored if destDepth is not 16 or 32
- * @param destX the top-left x-coord of the destination blit region
- * @param destY the top-left y-coord of the destination blit region
- * @param destWidth the width of the destination blit region
- * @param destHeight the height of the destination blit region
- * @param destRedMask the destination red channel mask
- * @param destGreenMask the destination green channel mask
- * @param destBlueMask the destination blue channel mask
- * @param flipX if true the resulting image is flipped along the vertical axis
- * @param flipY if true the resulting image is flipped along the horizontal axis
- */
- static void blit(int op,
- byte[] srcData, int srcDepth, int srcStride, int srcOrder,
- int srcX, int srcY, int srcWidth, int srcHeight,
- int srcRedMask, int srcGreenMask, int srcBlueMask,
- int alphaMode, byte[] alphaData, int alphaStride, int alphaX, int alphaY,
- byte[] destData, int destDepth, int destStride, int destOrder,
- int destX, int destY, int destWidth, int destHeight,
- int destRedMask, int destGreenMask, int destBlueMask,
- boolean flipX, boolean flipY) {
- if ((destWidth <= 0) || (destHeight <= 0) || (alphaMode == ALPHA_TRANSPARENT)) return;
-
- // these should be supplied as params later
- final int srcAlphaMask = 0, destAlphaMask = 0;
-
- /*** Prepare scaling data ***/
- final int dwm1 = destWidth - 1;
- final int sfxi = (dwm1 != 0) ? (int)((((long)srcWidth << 16) - 1) / dwm1) : 0;
- final int dhm1 = destHeight - 1;
- final int sfyi = (dhm1 != 0) ? (int)((((long)srcHeight << 16) - 1) / dhm1) : 0;
-
- /*** Prepare source-related data ***/
- final int sbpp, stype;
- switch (srcDepth) {
- case 8:
- sbpp = 1;
- stype = TYPE_GENERIC_8;
- break;
- case 16:
- sbpp = 2;
- stype = (srcOrder == MSB_FIRST) ? TYPE_GENERIC_16_MSB : TYPE_GENERIC_16_LSB;
- break;
- case 24:
- sbpp = 3;
- stype = TYPE_GENERIC_24;
- break;
- case 32:
- sbpp = 4;
- stype = (srcOrder == MSB_FIRST) ? TYPE_GENERIC_32_MSB : TYPE_GENERIC_32_LSB;
- break;
- default:
- //throw new IllegalArgumentException("Invalid source type");
- return;
- }
- int spr = srcY * srcStride + srcX * sbpp;
-
- /*** Prepare destination-related data ***/
- final int dbpp, dtype;
- switch (destDepth) {
- case 8:
- dbpp = 1;
- dtype = TYPE_GENERIC_8;
- break;
- case 16:
- dbpp = 2;
- dtype = (destOrder == MSB_FIRST) ? TYPE_GENERIC_16_MSB : TYPE_GENERIC_16_LSB;
- break;
- case 24:
- dbpp = 3;
- dtype = TYPE_GENERIC_24;
- break;
- case 32:
- dbpp = 4;
- dtype = (destOrder == MSB_FIRST) ? TYPE_GENERIC_32_MSB : TYPE_GENERIC_32_LSB;
- break;
- default:
- //throw new IllegalArgumentException("Invalid destination type");
- return;
- }
- int dpr = ((flipY) ? destY + dhm1 : destY) * destStride + ((flipX) ? destX + dwm1 : destX) * dbpp;
- final int dprxi = (flipX) ? -dbpp : dbpp;
- final int dpryi = (flipY) ? -destStride : destStride;
-
- /*** Prepare special processing data ***/
- int apr;
- if ((op & BLIT_ALPHA) != 0) {
- switch (alphaMode) {
- case ALPHA_MASK_UNPACKED:
- case ALPHA_CHANNEL_SEPARATE:
- if (alphaData == null) alphaMode = 0x10000;
- apr = alphaY * alphaStride + alphaX;
- break;
- case ALPHA_MASK_PACKED:
- if (alphaData == null) alphaMode = 0x10000;
- alphaStride <<= 3;
- apr = alphaY * alphaStride + alphaX;
- break;
- case ALPHA_MASK_INDEX:
- //throw new IllegalArgumentException("Invalid alpha type");
- return;
- case ALPHA_MASK_RGB:
- if (alphaData == null) alphaMode = 0x10000;
- apr = 0;
- break;
- default:
- alphaMode = (alphaMode << 16) / 255; // prescale
- case ALPHA_CHANNEL_SOURCE:
- apr = 0;
- break;
- }
- } else {
- alphaMode = 0x10000;
- apr = 0;
- }
-
- /*** Blit ***/
- int dp = dpr;
- int sp = spr;
- if ((alphaMode == 0x10000) && (stype == dtype) &&
- (srcRedMask == destRedMask) && (srcGreenMask == destGreenMask) &&
- (srcBlueMask == destBlueMask) && (srcAlphaMask == destAlphaMask)) {
- /*** Fast blit (straight copy) ***/
- switch (sbpp) {
- case 1:
- for (int dy = destHeight, sfy = sfyi; dy > 0; --dy, sp = spr += (sfy >>> 16) * srcStride, sfy = (sfy & 0xffff) + sfyi, dp = dpr += dpryi) {
- for (int dx = destWidth, sfx = sfxi; dx > 0; --dx, dp += dprxi, sfx = (sfx & 0xffff) + sfxi) {
- destData[dp] = srcData[sp];
- sp += (sfx >>> 16);
- }
- }
- break;
- case 2:
- for (int dy = destHeight, sfy = sfyi; dy > 0; --dy, sp = spr += (sfy >>> 16) * srcStride, sfy = (sfy & 0xffff) + sfyi, dp = dpr += dpryi) {
- for (int dx = destWidth, sfx = sfxi; dx > 0; --dx, dp += dprxi, sfx = (sfx & 0xffff) + sfxi) {
- destData[dp] = srcData[sp];
- destData[dp + 1] = srcData[sp + 1];
- sp += (sfx >>> 16) * 2;
- }
- }
- break;
- case 3:
- for (int dy = destHeight, sfy = sfyi; dy > 0; --dy, sp = spr += (sfy >>> 16) * srcStride, sfy = (sfy & 0xffff) + sfyi, dp = dpr += dpryi) {
- for (int dx = destWidth, sfx = sfxi; dx > 0; --dx, dp += dprxi, sfx = (sfx & 0xffff) + sfxi) {
- destData[dp] = srcData[sp];
- destData[dp + 1] = srcData[sp + 1];
- destData[dp + 2] = srcData[sp + 2];
- sp += (sfx >>> 16) * 3;
- }
- }
- break;
- case 4:
- for (int dy = destHeight, sfy = sfyi; dy > 0; --dy, sp = spr += (sfy >>> 16) * srcStride, sfy = (sfy & 0xffff) + sfyi, dp = dpr += dpryi) {
- for (int dx = destWidth, sfx = sfxi; dx > 0; --dx, dp += dprxi, sfx = (sfx & 0xffff) + sfxi) {
- destData[dp] = srcData[sp];
- destData[dp + 1] = srcData[sp + 1];
- destData[dp + 2] = srcData[sp + 2];
- destData[dp + 3] = srcData[sp + 3];
- sp += (sfx >>> 16) * 4;
- }
- }
- break;
- }
- return;
- }
- /*** Comprehensive blit (apply transformations) ***/
- final int srcRedShift = getChannelShift(srcRedMask);
- final byte[] srcReds = ANY_TO_EIGHT[getChannelWidth(srcRedMask, srcRedShift)];
- final int srcGreenShift = getChannelShift(srcGreenMask);
- final byte[] srcGreens = ANY_TO_EIGHT[getChannelWidth(srcGreenMask, srcGreenShift)];
- final int srcBlueShift = getChannelShift(srcBlueMask);
- final byte[] srcBlues = ANY_TO_EIGHT[getChannelWidth(srcBlueMask, srcBlueShift)];
- final int srcAlphaShift = getChannelShift(srcAlphaMask);
- final byte[] srcAlphas = ANY_TO_EIGHT[getChannelWidth(srcAlphaMask, srcAlphaShift)];
-
- final int destRedShift = getChannelShift(destRedMask);
- final int destRedWidth = getChannelWidth(destRedMask, destRedShift);
- final byte[] destReds = ANY_TO_EIGHT[destRedWidth];
- final int destRedPreShift = 8 - destRedWidth;
- final int destGreenShift = getChannelShift(destGreenMask);
- final int destGreenWidth = getChannelWidth(destGreenMask, destGreenShift);
- final byte[] destGreens = ANY_TO_EIGHT[destGreenWidth];
- final int destGreenPreShift = 8 - destGreenWidth;
- final int destBlueShift = getChannelShift(destBlueMask);
- final int destBlueWidth = getChannelWidth(destBlueMask, destBlueShift);
- final byte[] destBlues = ANY_TO_EIGHT[destBlueWidth];
- final int destBluePreShift = 8 - destBlueWidth;
- final int destAlphaShift = getChannelShift(destAlphaMask);
- final int destAlphaWidth = getChannelWidth(destAlphaMask, destAlphaShift);
- final byte[] destAlphas = ANY_TO_EIGHT[destAlphaWidth];
- final int destAlphaPreShift = 8 - destAlphaWidth;
-
- int ap = apr, alpha = alphaMode;
- int r = 0, g = 0, b = 0, a = 0;
- int rq = 0, gq = 0, bq = 0, aq = 0;
- for (int dy = destHeight, sfy = sfyi; dy > 0; --dy,
- sp = spr += (sfy >>> 16) * srcStride,
- ap = apr += (sfy >>> 16) * alphaStride,
- sfy = (sfy & 0xffff) + sfyi,
- dp = dpr += dpryi) {
- for (int dx = destWidth, sfx = sfxi; dx > 0; --dx,
- dp += dprxi,
- sfx = (sfx & 0xffff) + sfxi) {
- /*** READ NEXT PIXEL ***/
- switch (stype) {
- case TYPE_GENERIC_8: {
- final int data = srcData[sp] & 0xff;
- sp += (sfx >>> 16);
- r = srcReds[(data & srcRedMask) >>> srcRedShift] & 0xff;
- g = srcGreens[(data & srcGreenMask) >>> srcGreenShift] & 0xff;
- b = srcBlues[(data & srcBlueMask) >>> srcBlueShift] & 0xff;
- a = srcAlphas[(data & srcAlphaMask) >>> srcAlphaShift] & 0xff;
- } break;
- case TYPE_GENERIC_16_MSB: {
- final int data = ((srcData[sp] & 0xff) << 8) | (srcData[sp + 1] & 0xff);
- sp += (sfx >>> 16) * 2;
- r = srcReds[(data & srcRedMask) >>> srcRedShift] & 0xff;
- g = srcGreens[(data & srcGreenMask) >>> srcGreenShift] & 0xff;
- b = srcBlues[(data & srcBlueMask) >>> srcBlueShift] & 0xff;
- a = srcAlphas[(data & srcAlphaMask) >>> srcAlphaShift] & 0xff;
- } break;
- case TYPE_GENERIC_16_LSB: {
- final int data = ((srcData[sp + 1] & 0xff) << 8) | (srcData[sp] & 0xff);
- sp += (sfx >>> 16) * 2;
- r = srcReds[(data & srcRedMask) >>> srcRedShift] & 0xff;
- g = srcGreens[(data & srcGreenMask) >>> srcGreenShift] & 0xff;
- b = srcBlues[(data & srcBlueMask) >>> srcBlueShift] & 0xff;
- a = srcAlphas[(data & srcAlphaMask) >>> srcAlphaShift] & 0xff;
- } break;
- case TYPE_GENERIC_24: {
- final int data = (( ((srcData[sp] & 0xff) << 8) |
- (srcData[sp + 1] & 0xff)) << 8) |
- (srcData[sp + 2] & 0xff);
- sp += (sfx >>> 16) * 3;
- r = srcReds[(data & srcRedMask) >>> srcRedShift] & 0xff;
- g = srcGreens[(data & srcGreenMask) >>> srcGreenShift] & 0xff;
- b = srcBlues[(data & srcBlueMask) >>> srcBlueShift] & 0xff;
- a = srcAlphas[(data & srcAlphaMask) >>> srcAlphaShift] & 0xff;
- } break;
- case TYPE_GENERIC_32_MSB: {
- final int data = (( (( ((srcData[sp] & 0xff) << 8) |
- (srcData[sp + 1] & 0xff)) << 8) |
- (srcData[sp + 2] & 0xff)) << 8) |
- (srcData[sp + 3] & 0xff);
- sp += (sfx >>> 16) * 4;
- r = srcReds[(data & srcRedMask) >>> srcRedShift] & 0xff;
- g = srcGreens[(data & srcGreenMask) >>> srcGreenShift] & 0xff;
- b = srcBlues[(data & srcBlueMask) >>> srcBlueShift] & 0xff;
- a = srcAlphas[(data & srcAlphaMask) >>> srcAlphaShift] & 0xff;
- } break;
- case TYPE_GENERIC_32_LSB: {
- final int data = (( (( ((srcData[sp + 3] & 0xff) << 8) |
- (srcData[sp + 2] & 0xff)) << 8) |
- (srcData[sp + 1] & 0xff)) << 8) |
- (srcData[sp] & 0xff);
- sp += (sfx >>> 16) * 4;
- r = srcReds[(data & srcRedMask) >>> srcRedShift] & 0xff;
- g = srcGreens[(data & srcGreenMask) >>> srcGreenShift] & 0xff;
- b = srcBlues[(data & srcBlueMask) >>> srcBlueShift] & 0xff;
- a = srcAlphas[(data & srcAlphaMask) >>> srcAlphaShift] & 0xff;
- } break;
- }
-
- /*** DO SPECIAL PROCESSING IF REQUIRED ***/
- switch (alphaMode) {
- case ALPHA_CHANNEL_SEPARATE:
- alpha = ((alphaData[ap] & 0xff) << 16) / 255;
- ap += (sfx >> 16);
- break;
- case ALPHA_CHANNEL_SOURCE:
- alpha = (a << 16) / 255;
- break;
- case ALPHA_MASK_UNPACKED:
- alpha = (alphaData[ap] != 0) ? 0x10000 : 0;
- ap += (sfx >> 16);
- break;
- case ALPHA_MASK_PACKED:
- alpha = (alphaData[ap >> 3] << ((ap & 7) + 9)) & 0x10000;
- ap += (sfx >> 16);
- break;
- case ALPHA_MASK_RGB:
- alpha = 0x10000;
- for (int i = 0; i < alphaData.length; i += 3) {
- if ((r == alphaData[i]) && (g == alphaData[i + 1]) && (b == alphaData[i + 2])) {
- alpha = 0x0000;
- break;
- }
- }
- break;
- }
- if (alpha != 0x10000) {
- if (alpha == 0x0000) continue;
- switch (dtype) {
- case TYPE_GENERIC_8: {
- final int data = destData[dp] & 0xff;
- rq = destReds[(data & destRedMask) >>> destRedShift] & 0xff;
- gq = destGreens[(data & destGreenMask) >>> destGreenShift] & 0xff;
- bq = destBlues[(data & destBlueMask) >>> destBlueShift] & 0xff;
- aq = destAlphas[(data & destAlphaMask) >>> destAlphaShift] & 0xff;
- } break;
- case TYPE_GENERIC_16_MSB: {
- final int data = ((destData[dp] & 0xff) << 8) | (destData[dp + 1] & 0xff);
- rq = destReds[(data & destRedMask) >>> destRedShift] & 0xff;
- gq = destGreens[(data & destGreenMask) >>> destGreenShift] & 0xff;
- bq = destBlues[(data & destBlueMask) >>> destBlueShift] & 0xff;
- aq = destAlphas[(data & destAlphaMask) >>> destAlphaShift] & 0xff;
- } break;
- case TYPE_GENERIC_16_LSB: {
- final int data = ((destData[dp + 1] & 0xff) << 8) | (destData[dp] & 0xff);
- rq = destReds[(data & destRedMask) >>> destRedShift] & 0xff;
- gq = destGreens[(data & destGreenMask) >>> destGreenShift] & 0xff;
- bq = destBlues[(data & destBlueMask) >>> destBlueShift] & 0xff;
- aq = destAlphas[(data & destAlphaMask) >>> destAlphaShift] & 0xff;
- } break;
- case TYPE_GENERIC_24: {
- final int data = (( ((destData[dp] & 0xff) << 8) |
- (destData[dp + 1] & 0xff)) << 8) |
- (destData[dp + 2] & 0xff);
- rq = destReds[(data & destRedMask) >>> destRedShift] & 0xff;
- gq = destGreens[(data & destGreenMask) >>> destGreenShift] & 0xff;
- bq = destBlues[(data & destBlueMask) >>> destBlueShift] & 0xff;
- aq = destAlphas[(data & destAlphaMask) >>> destAlphaShift] & 0xff;
- } break;
- case TYPE_GENERIC_32_MSB: {
- final int data = (( (( ((destData[dp] & 0xff) << 8) |
- (destData[dp + 1] & 0xff)) << 8) |
- (destData[dp + 2] & 0xff)) << 8) |
- (destData[dp + 3] & 0xff);
- rq = destReds[(data & destRedMask) >>> destRedShift] & 0xff;
- gq = destGreens[(data & destGreenMask) >>> destGreenShift] & 0xff;
- bq = destBlues[(data & destBlueMask) >>> destBlueShift] & 0xff;
- aq = destAlphas[(data & destAlphaMask) >>> destAlphaShift] & 0xff;
- } break;
- case TYPE_GENERIC_32_LSB: {
- final int data = (( (( ((destData[dp + 3] & 0xff) << 8) |
- (destData[dp + 2] & 0xff)) << 8) |
- (destData[dp + 1] & 0xff)) << 8) |
- (destData[dp] & 0xff);
- rq = destReds[(data & destRedMask) >>> destRedShift] & 0xff;
- gq = destGreens[(data & destGreenMask) >>> destGreenShift] & 0xff;
- bq = destBlues[(data & destBlueMask) >>> destBlueShift] & 0xff;
- aq = destAlphas[(data & destAlphaMask) >>> destAlphaShift] & 0xff;
- } break;
- }
- // Perform alpha blending
- a = aq + ((a - aq) * alpha >> 16);
- r = rq + ((r - rq) * alpha >> 16);
- g = gq + ((g - gq) * alpha >> 16);
- b = bq + ((b - bq) * alpha >> 16);
- }
-
- /*** WRITE NEXT PIXEL ***/
- final int data =
- (r >>> destRedPreShift << destRedShift) |
- (g >>> destGreenPreShift << destGreenShift) |
- (b >>> destBluePreShift << destBlueShift) |
- (a >>> destAlphaPreShift << destAlphaShift);
- switch (dtype) {
- case TYPE_GENERIC_8: {
- destData[dp] = (byte) data;
- } break;
- case TYPE_GENERIC_16_MSB: {
- destData[dp] = (byte) (data >>> 8);
- destData[dp + 1] = (byte) (data & 0xff);
- } break;
- case TYPE_GENERIC_16_LSB: {
- destData[dp] = (byte) (data & 0xff);
- destData[dp + 1] = (byte) (data >>> 8);
- } break;
- case TYPE_GENERIC_24: {
- destData[dp] = (byte) (data >>> 16);
- destData[dp + 1] = (byte) (data >>> 8);
- destData[dp + 2] = (byte) (data & 0xff);
- } break;
- case TYPE_GENERIC_32_MSB: {
- destData[dp] = (byte) (data >>> 24);
- destData[dp + 1] = (byte) (data >>> 16);
- destData[dp + 2] = (byte) (data >>> 8);
- destData[dp + 3] = (byte) (data & 0xff);
- } break;
- case TYPE_GENERIC_32_LSB: {
- destData[dp] = (byte) (data & 0xff);
- destData[dp + 1] = (byte) (data >>> 8);
- destData[dp + 2] = (byte) (data >>> 16);
- destData[dp + 3] = (byte) (data >>> 24);
- } break;
- }
- }
- }
- }
-
- /**
- * Computes the required channel shift from a mask.
- */
- static int getChannelShift(int mask) {
- if (mask == 0) return 0;
- int i;
- for (i = 0; ((mask & 1) == 0) && (i < 32); ++i) {
- mask >>>= 1;
- }
- return i;
- }
-
- /**
- * Computes the required channel width (depth) from a mask.
- */
- static int getChannelWidth(int mask, int shift) {
- if (mask == 0) return 0;
- int i;
- mask >>>= shift;
- for (i = shift; ((mask & 1) != 0) && (i < 32); ++i) {
- mask >>>= 1;
- }
- return i - shift;
- }
-}
diff --git a/bundles/org.eclipse.swt.opengl/common/org/eclipse/swt/opengl/Library.java b/bundles/org.eclipse.swt.opengl/common/org/eclipse/swt/opengl/Library.java
deleted file mode 100644
index 7a486e3eca..0000000000
--- a/bundles/org.eclipse.swt.opengl/common/org/eclipse/swt/opengl/Library.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.opengl;
-
-
-public class Library {
-
-/**
- * Returns the platform name.
- *
- * @return the platform name of the currently running SWT
- */
-static String getPlatform () {
- String [] names = new String [] {"motif", "gtk", "win32", "photon", "carbon"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
- for (int i = 0; i < names.length; i++) {
- try {
- Class.forName("org.eclipse.swt.internal."+names[i]+".OS"); //$NON-NLS-1$ //$NON-NLS-2$
- return names[i];
- } catch (ClassNotFoundException e) {
- }
- }
- return "unknown"; //$NON-NLS-1$
-}
-
-/**
- * Loads the shared library that matches the version of the
- * Java code which is currently running. SWT shared libraries
- * follow an encoding scheme where the major, minor and revision
- * numbers are embedded in the library name and this along with
- * <code>name</code> is used to load the library. If this fails,
- * <code>name</code> is used in another attempt to load the library,
- * this time ignoring the SWT version encoding scheme.
- *
- * @param name the name of the library to load
- */
-public static void loadLibrary (String name) {
- /*
- * Include platform name to support different windowing systems
- * on same operating system.
- */
- String platform = getPlatform ();
-
- try {
- String newName = name + "-" + platform; //$NON-NLS-1$ //$NON-NLS-2$
- System.loadLibrary (newName);
- return;
- } catch (UnsatisfiedLinkError e1) {
- throw e1;
- }
-}
-
-}
diff --git a/bundles/org.eclipse.swt.opengl/gtk/library/build.sh b/bundles/org.eclipse.swt.opengl/gtk/library/build.sh
deleted file mode 100644
index 9133ca2f7f..0000000000
--- a/bundles/org.eclipse.swt.opengl/gtk/library/build.sh
+++ /dev/null
@@ -1,14 +0,0 @@
-#*******************************************************************************
-# Copyright (c) 2000, 2003 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Common Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/cpl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-#*******************************************************************************
-
-#!/bin/sh
-
-make -f make_gtk.mak ${1+"$@"}
diff --git a/bundles/org.eclipse.swt.opengl/gtk/library/glx.c b/bundles/org.eclipse.swt.opengl/gtk/library/glx.c
deleted file mode 100644
index c0987fe77b..0000000000
--- a/bundles/org.eclipse.swt.opengl/gtk/library/glx.c
+++ /dev/null
@@ -1,247 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-#include <GL/glx.h>
-#include <string.h>
-#include "swt.h"
-#include "structs.h"
-
-#define XGL_NATIVE(func) Java_org_eclipse_swt_opengl_internal_gtk_XGL_##func
-
-JNIEXPORT jint JNICALL XGL_NATIVE(glXChooseVisual)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jintArray arg2)
-{
- jint *lparg2=NULL;
- jint rc;
-
- NATIVE_ENTER(env, that, "glXChooseVisual\n")
- if (arg2) lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL);
- rc = (jint)glXChooseVisual((Display *)arg0, arg1, (int *)lparg2);
- if (arg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
- NATIVE_EXIT(env, that, "glXChooseVisual\n")
- return rc;
-}
-
-JNIEXPORT void JNICALL XGL_NATIVE(glXCopyContext)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jint arg3)
-{
- NATIVE_ENTER(env, that, "glXCopyContext\n")
- glXCopyContext((Display *)arg0, (GLXContext)arg1, (GLXContext)arg2, arg3);
- NATIVE_EXIT(env, that, "glXCopyContext\n")
-}
-
-JNIEXPORT jint JNICALL XGL_NATIVE(glXCreateContext)
- (JNIEnv *env, jclass that, jint arg0, jobject arg1, jint arg2, jboolean arg3)
-{
- XVisualInfo _arg1, *lparg1=NULL;
- jint rc;
-
- NATIVE_ENTER(env, that, "glXCreateContext\n")
- if (arg1) lparg1 = getXVisualInfoFields(env, arg1, &_arg1);
- rc = (jint)glXCreateContext((Display *)arg0, lparg1, (GLXContext)arg2, arg3);
- if (arg1) setXVisualInfoFields(env, arg1, lparg1);
- NATIVE_EXIT(env, that, "glXCreateContext\n")
- return rc;
-}
-
-JNIEXPORT jint JNICALL XGL_NATIVE(glXCreateGLXPixmap)
- (JNIEnv *env, jclass that, jint arg0, jobject arg1, jint arg2)
-{
- XVisualInfo _arg1, *lparg1=NULL;
- jint rc;
-
- NATIVE_ENTER(env, that, "glXCreateGLXPixmap\n")
- if (arg1) lparg1 = getXVisualInfoFields(env, arg1, &_arg1);
- rc = (jint)glXCreateGLXPixmap((Display *)arg0, lparg1, arg2);
- if (arg1) setXVisualInfoFields(env, arg1, lparg1);
- NATIVE_EXIT(env, that, "glXCreateGLXPixmap\n")
- return rc;
-}
-
-JNIEXPORT void JNICALL XGL_NATIVE(glXDestroyContext)
- (JNIEnv *env, jclass that, jint arg0, jint arg1)
-{
- NATIVE_ENTER(env, that, "glXDestroyContext\n")
- glXDestroyContext((Display *)arg0, (GLXContext)arg1);
- NATIVE_EXIT(env, that, "glXDestroyContext\n")
-}
-
-JNIEXPORT void JNICALL XGL_NATIVE(glXDestroyGLXPixmap)
- (JNIEnv *env, jclass that, jint arg0, jint arg1)
-{
- NATIVE_ENTER(env, that, "glXDestroyGLXPixmap\n")
- glXDestroyGLXPixmap((Display *)arg0, arg1);
- NATIVE_EXIT(env, that, "glXDestroyGLXPixmap\n")
-}
-
-JNIEXPORT jint JNICALL XGL_NATIVE(glXGetClientString)
- (JNIEnv *env, jclass that, jint arg0, jint arg1)
-{
- jint rc;
- NATIVE_ENTER(env, that, "glXGetClientString\n")
- rc = (jint)glXGetClientString((Display *)arg0, arg1);
- NATIVE_EXIT(env, that, "glXGetClientString\n")
- return rc;
-}
-
-JNIEXPORT jint JNICALL XGL_NATIVE(glXGetConfig)
- (JNIEnv *env, jclass that, jint arg0, jobject arg1, jint arg2, jintArray arg3)
-{
- XVisualInfo _arg1, *lparg1=NULL;
- jint *lparg3=NULL;
- jint rc;
-
- NATIVE_ENTER(env, that, "glXGetConfig\n")
- if (arg1) lparg1 = getXVisualInfoFields(env, arg1, &_arg1);
- if (arg3) lparg3 = (*env)->GetIntArrayElements(env, arg3, NULL);
- rc = (jint)glXGetConfig((Display *)arg0, lparg1, arg2, (int *)lparg3);
- if (arg1) setXVisualInfoFields(env, arg1, lparg1);
- if (arg3) (*env)->ReleaseIntArrayElements(env, arg3, lparg3, 0);
- NATIVE_EXIT(env, that, "glXGetConfig\n")
- return rc;
-}
-
-JNIEXPORT jint JNICALL XGL_NATIVE(glXGetCurrentContext)
- (JNIEnv *env, jclass that)
-{
- jint rc;
- NATIVE_ENTER(env, that, "glXGetCurrentContext\n")
- rc = (jint)glXGetCurrentContext();
- NATIVE_EXIT(env, that, "glXGetCurrentContext\n")
- return rc;
-}
-
-JNIEXPORT jint JNICALL XGL_NATIVE(glXGetCurrentDrawable)
- (JNIEnv *env, jclass that)
-{
- jint rc;
- NATIVE_ENTER(env, that, "glXGetCurrentDrawable\n")
- rc = (jint)glXGetCurrentDrawable();
- NATIVE_EXIT(env, that, "glXGetCurrentDrawable\n")
- return rc;
-}
-
-JNIEXPORT jboolean JNICALL XGL_NATIVE(glXIsDirect)
- (JNIEnv *env, jclass that, jint arg0, jint arg1)
-{
- jboolean result;
- NATIVE_ENTER(env, that, "glXIsDirect\n")
- result = (jboolean)glXIsDirect((Display *)arg0, (GLXContext)arg1);
- NATIVE_EXIT(env, that, "glXIsDirect\n")
- return result;
-}
-
-JNIEXPORT jboolean JNICALL XGL_NATIVE(glXMakeCurrent)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2)
-{
- jboolean result;
- NATIVE_ENTER(env, that, "glXMakeCurrent\n")
- result = (jboolean)glXMakeCurrent((Display *)arg0, (GLXDrawable)arg1, (GLXContext)arg2);
- NATIVE_EXIT(env, that, "glXMakeCurrent\n")
- return result;
-}
-
-JNIEXPORT jboolean JNICALL XGL_NATIVE(glXQueryExtension)
- (JNIEnv *env, jclass that, jint arg0, jintArray arg1, jintArray arg2)
-{
- jint *lparg1=NULL;
- jint *lparg2=NULL;
- jboolean rc;
-
- NATIVE_ENTER(env, that, "glXQueryExtension\n")
- if (arg1) lparg1 = (*env)->GetIntArrayElements(env, arg1, NULL);
- if (arg2) lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL);
- rc = (jboolean)glXQueryExtension((Display *)arg0, (int *)lparg1, (int *)lparg2);
- if (arg1) (*env)->ReleaseIntArrayElements(env, arg1, lparg1, 0);
- if (arg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
- NATIVE_EXIT(env, that, "glXQueryExtension\n")
- return rc;
-}
-
-JNIEXPORT jint JNICALL XGL_NATIVE(glXQueryExtensionsString)
- (JNIEnv *env, jclass that, jint arg0, jint arg1)
-{
- jint rc;
- NATIVE_ENTER(env, that, "glXQueryExtensionsString\n")
- rc = (jint)glXQueryExtensionsString((Display *)arg0, arg1);
- NATIVE_EXIT(env, that, "glXQueryExtensionsString\n")
- return rc;
-}
-
-JNIEXPORT jint JNICALL XGL_NATIVE(glXQueryServerString)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2)
-{
- jint rc;
- NATIVE_ENTER(env, that, "glXQueryServerString\n")
- rc = (jint)glXQueryServerString((Display *)arg0, arg1, arg2);
- NATIVE_EXIT(env, that, "glXQueryServerString\n")
- return rc;
-}
-
-JNIEXPORT jboolean JNICALL XGL_NATIVE(glXQueryVersion)
- (JNIEnv *env, jclass that, jint arg0, jintArray arg1, jintArray arg2)
-{
- jint *lparg1=NULL;
- jint *lparg2=NULL;
- jboolean rc;
-
- NATIVE_ENTER(env, that, "glXQueryVersion\n")
- if (arg1) lparg1 = (*env)->GetIntArrayElements(env, arg1, NULL);
- if (arg2) lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL);
- rc = (jboolean)glXQueryVersion((Display *)arg0, (int *)lparg1, (int *)lparg2);
- if (arg1) (*env)->ReleaseIntArrayElements(env, arg1, lparg1, 0);
- if (arg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
- NATIVE_EXIT(env, that, "glXQueryVersion\n")
- return rc;
-}
-
-JNIEXPORT void JNICALL XGL_NATIVE(glXSwapBuffers)
- (JNIEnv *env, jclass that, jint arg0, jint arg1)
-{
- NATIVE_ENTER(env, that, "glXSwapBuffers\n")
- glXSwapBuffers((Display *)arg0, (GLXDrawable)arg1);
- NATIVE_EXIT(env, that, "glXSwapBuffers\n")
-}
-
-JNIEXPORT void JNICALL XGL_NATIVE(glXUseXFont)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jint arg3)
-{
- NATIVE_ENTER(env, that, "glXUseXFont\n")
- glXUseXFont(arg0, arg1, arg2, arg3);
- NATIVE_EXIT(env, that, "glXUseXFont\n")
-}
-
-JNIEXPORT void JNICALL XGL_NATIVE(glXWaitGL)
- (JNIEnv *env, jclass that)
-{
- NATIVE_ENTER(env, that, "glXWaitGL\n")
- glXWaitGL();
- NATIVE_EXIT(env, that, "glXWaitGL\n")
-}
-
-JNIEXPORT void JNICALL XGL_NATIVE(glXWaitX)
- (JNIEnv *env, jclass that)
-{
- NATIVE_ENTER(env, that, "glXWaitX\n")
- glXWaitX();
- NATIVE_EXIT(env, that, "glXWaitX\n")
-}
-
-JNIEXPORT void JNICALL XGL_NATIVE(memmove__Lorg_eclipse_swt_opengl_internal_gtk_XVisualInfo_2II)
- (JNIEnv *env, jclass that, jobject arg0, jint arg1, jint arg2)
-{
- XVisualInfo _arg0, *lparg0=NULL;
-
- NATIVE_ENTER(env, that, "memmove__Lorg_eclipse_swt_opengl_internal_gtk_XVisualInfo_2II\n")
- if (arg0) lparg0 = &_arg0;
- memmove((void *)lparg0, (const void *)arg1, (size_t)arg2);
- if (arg0) setXVisualInfoFields(env, arg0, lparg0);
- NATIVE_EXIT(env, that, "memmove__Lorg_eclipse_swt_opengl_internal_gtk_XVisualInfo_2II\n")
-}
diff --git a/bundles/org.eclipse.swt.opengl/gtk/library/make_gtk.mak b/bundles/org.eclipse.swt.opengl/gtk/library/make_gtk.mak
deleted file mode 100644
index d765b8bd5e..0000000000
--- a/bundles/org.eclipse.swt.opengl/gtk/library/make_gtk.mak
+++ /dev/null
@@ -1,52 +0,0 @@
-#*******************************************************************************
-# Copyright (c) 2000, 2003 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Common Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/cpl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-#*******************************************************************************
-
-# Define the installation directories for various products.
-JAVA_HOME = /bluebird/teamswt/swt-builddir/ive/bin
-
-CC=gcc
-LD=gcc
-
-# Define the various shared libraries to be made.
-WS_PREFIX = gtk
-GL_PREFIX = gl
-GL_DLL = lib$(GL_PREFIX)-$(WS_PREFIX).so
-GL_OBJ = gl.o glu.o structs.o glx.o
-GL_LIB = -shared -L/usr/X11R6/lib -lGL -lGLU -lm
-XGTK_PREFIX = xgtk
-XGTK_DLL = lib$(XGTK_PREFIX)-$(WS_PREFIX).so
-XGTK_OBJ = xgtk.o
-XGTK_LIB = -shared `pkg-config --libs gtk+-2.0 gthread-2.0`
-
-#
-# The following CFLAGS are for compiling the SWT OpenGL libraries.
-#
-CFLAGS = -O -Wall \
- -I./ \
- -I$(JAVA_HOME)/include \
- `pkg-config --cflags gtk+-2.0`
-
-all: make_gl make_xgtk
-
-make_gl: $(GL_DLL)
- $(LD) $(GL_LIB) -o $(GL_DLL) $(GL_OBJ)
-
-$(GL_DLL): $(GL_OBJ)
- $(CC) $(CFLAGS) -c glx.c
-
-make_xgtk: $(XGTK_DLL)
- $(LD) $(XGTK_LIB) -o $(XGTK_DLL) $(XGTK_OBJ)
-
-$(XGTK_DLL): $(XGTK_OBJ)
- $(CC) $(CFLAGS) -c xgtk.c
-
-clean:
- rm -f *.so *.o
diff --git a/bundles/org.eclipse.swt.opengl/gtk/library/structs.c b/bundles/org.eclipse.swt.opengl/gtk/library/structs.c
deleted file mode 100644
index 368852dc33..0000000000
--- a/bundles/org.eclipse.swt.opengl/gtk/library/structs.c
+++ /dev/null
@@ -1,73 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-#include <X11/X.h>
-#include <X11/Xlib.h>
-#include "swt.h"
-#include "structs.h"
-
-typedef struct XVisualInfo_FID_CACHE {
- int cached;
- jclass clazz;
- jfieldID visual, visualid, screen, depth, cclass, red_mask, green_mask, blue_mask, colormap_size, bits_per_rgb;
-} XVisualInfo_FID_CACHE;
-typedef XVisualInfo_FID_CACHE *PXVisualInfo_FID_CACHE;
-
-XVisualInfo_FID_CACHE XVisualInfoFc;
-
-void cacheXVisualInfoFids(JNIEnv *env, jobject lpObject, PXVisualInfo_FID_CACHE lpCache)
-{
- if (lpCache->cached) return;
- lpCache->clazz = (*env)->GetObjectClass(env, lpObject);
- lpCache->visual = (*env)->GetFieldID(env, lpCache->clazz, "visual", "I");
- lpCache->visualid = (*env)->GetFieldID(env, lpCache->clazz, "visualid", "I");
- lpCache->screen = (*env)->GetFieldID(env, lpCache->clazz, "screen", "I");
- lpCache->depth = (*env)->GetFieldID(env, lpCache->clazz, "depth", "I");
- lpCache->cclass = (*env)->GetFieldID(env, lpCache->clazz, "cclass", "I");
- lpCache->red_mask = (*env)->GetFieldID(env, lpCache->clazz, "red_mask", "I");
- lpCache->green_mask = (*env)->GetFieldID(env, lpCache->clazz, "green_mask", "I");
- lpCache->blue_mask = (*env)->GetFieldID(env, lpCache->clazz, "blue_mask", "I");
- lpCache->colormap_size = (*env)->GetFieldID(env, lpCache->clazz, "colormap_size", "I");
- lpCache->bits_per_rgb = (*env)->GetFieldID(env, lpCache->clazz, "bits_per_rgb", "I");
- lpCache->cached = 1;
-}
-
-XVisualInfo *getXVisualInfoFields(JNIEnv *env, jobject lpObject, XVisualInfo *lpStruct)
-{
- PXVisualInfo_FID_CACHE lpCache = &XVisualInfoFc;
- if (!lpCache->cached) cacheXVisualInfoFids(env, lpObject, lpCache);
- lpStruct->visual = (Visual *)(*env)->GetIntField(env, lpObject, lpCache->visual);
- lpStruct->visualid = (*env)->GetIntField(env, lpObject, lpCache->visualid);
- lpStruct->screen = (*env)->GetIntField(env, lpObject, lpCache->screen);
- lpStruct->depth = (*env)->GetIntField(env, lpObject, lpCache->depth);
- lpStruct->class = (*env)->GetIntField(env, lpObject, lpCache->cclass);
- lpStruct->red_mask = (*env)->GetIntField(env, lpObject, lpCache->red_mask);
- lpStruct->green_mask = (*env)->GetIntField(env, lpObject, lpCache->green_mask);
- lpStruct->blue_mask = (*env)->GetIntField(env, lpObject, lpCache->blue_mask);
- lpStruct->colormap_size = (*env)->GetIntField(env, lpObject, lpCache->colormap_size);
- lpStruct->bits_per_rgb = (*env)->GetIntField(env, lpObject, lpCache->bits_per_rgb);
- return lpStruct;
-}
-
-void setXVisualInfoFields(JNIEnv *env, jobject lpObject, XVisualInfo *lpStruct)
-{
- PXVisualInfo_FID_CACHE lpCache = &XVisualInfoFc;
- if (!lpCache->cached) cacheXVisualInfoFids(env, lpObject, lpCache);
- (*env)->SetIntField(env, lpObject, lpCache->visual, (jint)lpStruct->visual);
- (*env)->SetIntField(env, lpObject, lpCache->visualid, (jint)lpStruct->visualid);
- (*env)->SetIntField(env, lpObject, lpCache->screen, (jint)lpStruct->screen);
- (*env)->SetIntField(env, lpObject, lpCache->depth, (jint)lpStruct->depth);
- (*env)->SetIntField(env, lpObject, lpCache->cclass, (jint)lpStruct->class);
- (*env)->SetIntField(env, lpObject, lpCache->red_mask, (jint)lpStruct->red_mask);
- (*env)->SetIntField(env, lpObject, lpCache->green_mask, (jint)lpStruct->green_mask);
- (*env)->SetIntField(env, lpObject, lpCache->blue_mask, (jint)lpStruct->blue_mask);
- (*env)->SetIntField(env, lpObject, lpCache->colormap_size, (jint)lpStruct->colormap_size);
- (*env)->SetIntField(env, lpObject, lpCache->bits_per_rgb, (jint)lpStruct->bits_per_rgb);
-}
diff --git a/bundles/org.eclipse.swt.opengl/gtk/library/structs.h b/bundles/org.eclipse.swt.opengl/gtk/library/structs.h
deleted file mode 100644
index 80791498e6..0000000000
--- a/bundles/org.eclipse.swt.opengl/gtk/library/structs.h
+++ /dev/null
@@ -1,16 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-#include <X11/X.h>
-#include <X11/Xutil.h>
-
-XVisualInfo *getXVisualInfoFields(JNIEnv *env, jobject lpObject, XVisualInfo *lpStruct);
-void setXVisualInfoFields(JNIEnv *env, jobject lpObject, XVisualInfo *lpStruct);
-
diff --git a/bundles/org.eclipse.swt.opengl/gtk/library/xgtk.c b/bundles/org.eclipse.swt.opengl/gtk/library/xgtk.c
deleted file mode 100644
index 2de68a4c37..0000000000
--- a/bundles/org.eclipse.swt.opengl/gtk/library/xgtk.c
+++ /dev/null
@@ -1,109 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-#include "swt.h"
-#include <gdk/gdkx.h>
-#include <stdlib.h>
-
-#define XGTK_NATIVE(func) Java_org_eclipse_swt_opengl_internal_gtk_XGTK_##func
-
-#ifndef NO_free
-JNIEXPORT void JNICALL XGTK_NATIVE(free)
- (JNIEnv *env, jclass that, jint arg0)
-{
- NATIVE_ENTER(env, that, "free\n")
- free((char *)arg0);
- NATIVE_EXIT(env, that, "free\n")
-}
-#endif
-
-#ifndef NO_malloc
-JNIEXPORT jint JNICALL XGTK_NATIVE(malloc)
- (JNIEnv *env, jclass that, jint arg0)
-{
- jint rc;
- NATIVE_ENTER(env, that, "malloc\n")
- rc = (jint)malloc(arg0);
- NATIVE_EXIT(env, that, "malloc\n")
- return rc;
-}
-#endif
-
-#ifndef NO_gdk_1x11_1gc_1get_1xdisplay
-JNIEXPORT int JNICALL XGTK_NATIVE(gdk_1x11_1gc_1get_1xdisplay)
- (JNIEnv *env, jclass that, jint arg0)
-{
- jint rc;
- NATIVE_ENTER(env, that, "gdk_1x11_1gc_1get_1xdisplay\n")
- rc = (jint)gdk_x11_gc_get_xdisplay((GdkGC *)arg0);
- NATIVE_EXIT(env, that, "gdk_1x11_1gc_1get_1xdisplay\n")
- return rc;
-}
-#endif
-
-#ifndef NO_gdk_1x11_1drawable_1get_1xid
-JNIEXPORT int JNICALL XGTK_NATIVE(gdk_1x11_1drawable_1get_1xid)
- (JNIEnv *env, jclass that, jint arg0)
-{
- jint rc;
- NATIVE_ENTER(env, that, "gdk_1x11_1drawable_1get_1xid\n")
- rc = (jint)gdk_x11_drawable_get_xid((GdkDrawable *)arg0);
- NATIVE_EXIT(env, that, "gdk_1x11_1drawable_1get_1xid\n")
- return rc;
-}
-#endif
-
-#ifndef NO_XDefaultScreen
-JNIEXPORT jint JNICALL XGTK_NATIVE(XDefaultScreen)
- (JNIEnv *env, jclass that, jint arg0)
-{
- jint rc;
- NATIVE_ENTER(env, that, "XDefaultScreen\n")
- rc = (jint)XDefaultScreen((Display *)arg0);
- NATIVE_EXIT(env, that, "XDefaultScreen\n")
- return rc;
-}
-#endif
-
-#ifndef NO_XDefaultScreenOfDisplay
-JNIEXPORT jint JNICALL XGTK_NATIVE(XDefaultScreenOfDisplay)
- (JNIEnv *env, jclass that, jint arg0)
-{
- jint rc;
- NATIVE_ENTER(env, that, "XDefaultScreenOfDisplay\n")
- rc = (jint)XDefaultScreenOfDisplay((Display *)arg0);
- NATIVE_EXIT(env, that, "XDefaultScreenOfDisplay\n")
- return rc;
-}
-#endif
-
-#ifndef NO_XDefaultDepthOfScreen
-JNIEXPORT jint JNICALL XGTK_NATIVE(XDefaultDepthOfScreen)
- (JNIEnv *env, jclass that, jint arg0)
-{
- jint rc;
- NATIVE_ENTER(env, that, "XDefaultDepthOfScreen\n")
- rc = (jint)XDefaultDepthOfScreen((Screen *)arg0);
- NATIVE_EXIT(env, that, "XDefaultDepthOfScreen\n")
- return rc;
-}
-#endif
-
-#ifndef NO_XFree
-JNIEXPORT jint JNICALL XGTK_NATIVE(XFree)
- (JNIEnv *env, jclass that, jint arg0)
-{
- jint rc;
- NATIVE_ENTER(env, that, "XFree\n")
- rc = (jint)XFree((char *)arg0);
- NATIVE_EXIT(env, that, "XFree\n")
- return rc;
-}
-#endif
diff --git a/bundles/org.eclipse.swt.opengl/gtk/org/eclipse/swt/opengl/GLContext.java b/bundles/org.eclipse.swt.opengl/gtk/org/eclipse/swt/opengl/GLContext.java
deleted file mode 100644
index 0acee0d4ec..0000000000
--- a/bundles/org.eclipse.swt.opengl/gtk/org/eclipse/swt/opengl/GLContext.java
+++ /dev/null
@@ -1,307 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.opengl;
-
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.internal.gtk.*;
-import org.eclipse.swt.opengl.internal.gtk.*;
-
-/**
- * Instances of <code>GLContext</code> are used to draw on swt <code>Drawable</code>s
- * through invocations of provided OpenGL functions.
- * <p>
- * Application code must explicitly invoke the <code>GLContext.dispose ()</code>
- * method to release the operating system resources managed by each instance
- * when those instances are no longer required. This is <em>particularly</em>
- * important on Windows95 and Windows98 where the operating system has a limited
- * number of device contexts available.
- * </p>
- */
-public class GLContext {
- int handle;
- int gc;
- GCData data;
- Drawable drawable;
- int selectBufferPtr = 0;
-
- static final int MSB_FIRST = 1;
- static final int LSB_FIRST = 2;
-
- /**
- * Constructs a new instance of this class which has been
- * configured to draw on the specified drawable.
- * <p>
- * You must dispose the <code>GLContext</code> when it is no longer required.
- * </p>
- *
- * @param drawable the drawable to draw on
- * @exception IllegalArgumentException <ul>
- * <li>ERROR_NULL_ARGUMENT - if the drawable is null</li>
- * </ul>
- * @exception SWTError <ul>
- * <li>ERROR_NO_HANDLES if a handle could not be obtained for gc creation</li>
- * <li>ERROR_UNSUPPORTED_DEPTH - if the current display depth is not supported</li>
- * </ul>
- */
- public GLContext (Drawable drawable) {
- if (drawable == null) SWT.error (SWT.ERROR_NULL_ARGUMENT);
- this.drawable = drawable;
- data = new GCData ();
- gc = drawable.internal_new_GC (data);
- if (gc == 0) SWT.error (SWT.ERROR_NO_HANDLES);
- int xDisplay = XGTK.gdk_x11_gc_get_xdisplay (gc);
- int screen = XGTK.XDefaultScreen (xDisplay);
- int depth = XGTK.XDefaultDepthOfScreen (XGTK.XDefaultScreenOfDisplay (xDisplay));
- int attrib [] = {
- XGL.GLX_LEVEL,
- 0,
- XGL.GLX_RGBA,
- XGL.GLX_DOUBLEBUFFER,
- XGL.GLX_DEPTH_SIZE,
- depth,
- 0
- };
- int infoPtr = XGL.glXChooseVisual (xDisplay, screen, attrib);
- if (infoPtr == 0) SWT.error (SWT.ERROR_UNSUPPORTED_DEPTH);
- XVisualInfo info = new XVisualInfo ();
- XGL.memmove (info, infoPtr, XVisualInfo.sizeof);
- XGTK.XFree (infoPtr);
- handle = XGL.glXCreateContext (xDisplay, info, 0, false);
- if (handle == 0) SWT.error (SWT.ERROR_NO_HANDLES);
- }
-
- public ImageData convertImageData (ImageData source) {
- PaletteData palette = new PaletteData (0xff0000, 0xff00, 0xff);
- ImageData newSource = new ImageData (source.width, source.height, 24, palette);
- ImageDataUtil.blit (
- 1,
- source.data,
- source.depth,
- source.bytesPerLine,
- (source.depth != 16) ? MSB_FIRST : LSB_FIRST,
- 0,
- 0,
- source.width,
- source.height,
- source.palette.redMask,
- source.palette.greenMask,
- source.palette.blueMask,
- 255,
- null,
- 0,
- 0,
- 0,
- newSource.data,
- newSource.depth,
- newSource.bytesPerLine,
- (newSource.depth != 16) ? MSB_FIRST : LSB_FIRST,
- 0,
- 0,
- newSource.width,
- newSource.height,
- newSource.palette.redMask,
- newSource.palette.greenMask,
- newSource.palette.blueMask,
- false,
- true);
-
- return newSource;
- }
-
- /**
- * Disposes of the operating system resources associated with
- * the receiver. Applications must dispose of all <code>GLContext</code>s
- * that they allocate.
- */
- public void dispose () {
- if (handle == 0) return;
- int xDisplay = XGTK.gdk_x11_gc_get_xdisplay (gc);
- if (XGL.glXGetCurrentContext () == handle) {
- int display = XGTK.gdk_x11_gc_get_xdisplay (gc);
- XGL.glXMakeCurrent (display, 0, 0);
- }
- if (selectBufferPtr != 0) XGTK.free (selectBufferPtr);
- XGL.glXDestroyContext (xDisplay, handle);
- handle = 0;
- // drawable may be disposed
- try {
- drawable.internal_dispose_GC (gc, data);
- } catch (SWTException e) {
- }
- gc = 0;
- data.clipRgn = data.context = data.drawable = 0;
- data.font = data.layout = data.style = 0;
- drawable = null;
- data.device = null;
- data.image = null;
- data = null;
- }
-
- public int[] getSelectBuffer (int selectBufferPtr, int[] selectBuffer) {
- OS.memmove (selectBuffer, selectBufferPtr, selectBuffer.length * 4);
- return selectBuffer;
- }
-
- public int getSelectBufferPtr (int[] selectBuffer) {
- if (selectBufferPtr == 0) {
- selectBufferPtr = XGTK.malloc (selectBuffer.length * 4);
- }
- OS.memmove (selectBufferPtr, selectBuffer, selectBuffer.length * 4);
- return selectBufferPtr;
- }
-
- /**
- * Returns a boolean indicating whether the receiver is the current
- * <code>GLContext</code>.
- *
- * @return true if the receiver is the current <code>GLContext</code>,
- * false otherwise
- * @exception SWTError <ul>
- * <li>ERROR_GRAPHIC_DISPOSED if the receiver is disposed</li>
- * </ul>
- */
- public boolean isCurrent () {
- if (isDisposed ()) SWT.error (SWT.ERROR_GRAPHIC_DISPOSED);
- return XGL.glXGetCurrentContext () == handle;
- }
-
- /**
- * Returns a boolean indicating whether the <code>GLContext</code> has been
- * disposed.
- * <p>
- * This method gets the dispose state for the <code>GLContext</code>.
- * When a <code>GLContext</code> has been disposed, it is an error to
- * invoke any other method using the <code>GLContext</code>.
- *
- * @return true if the <code>GLContext</code> is disposed, false otherwise
- */
- public boolean isDisposed () {
- return handle == 0;
- }
-
- /**
- * Loads the specified bitmap font.
- *
- * @param fdata
- * @param device
- * @param base
- * @param first
- * @param count
- */
- public void loadBitmapFont (FontData fdata, Device device, int base, int startIndex, int length) {
- /* Temporary code, due some problems when running on UTF-8 loadBitmapFont ()
- * is restrict to works only for ascii.
- * Note: en_US.ISO8859-1 also code be used.
- */
-// fdata.setLocale ("C");
-// Font font = new Font (device, fdata);
-// int fontList = font.handle;
-// int[] buffer = new int [1];
-// if (!OS.XmFontListInitFontContext (buffer, fontList)) return;
-// int context = buffer [0];
-// XFontStruct fontStruct = new XFontStruct ();
-// int fontListEntry;
-// int[] fontStructPtr = new int [1];
-// int[] fontNamePtr = new int [1];
-// int xfont = 0;
-// // go through each entry in the font list
-// while ((fontListEntry = OS.XmFontListNextEntry (context)) != 0) {
-// int fontPtr = OS.XmFontListEntryGetFont (fontListEntry, buffer);
-// if (buffer [0] == OS.XmFONT_IS_FONT) {
-// // FontList contains a single font
-// OS.memmove (fontStruct, fontPtr, 20 * 4);
-// xfont = fontStruct.fid;
-// } else {
-// // FontList contains a fontSet
-// int nFonts = OS.XFontsOfFontSet (fontPtr, fontStructPtr, fontNamePtr);
-// int[] fontStructs = new int [nFonts];
-// OS.memmove (fontStructs, fontStructPtr [0], nFonts * 4);
-// // Go through each fontStruct in the font set.
-// for (int i = 0; i < nFonts; i++) {
-// OS.memmove (fontStruct, fontStructs [i], XFontStruct.sizeof);
-// xfont = fontStruct.fid;
-// }
-// }
-// }
-// if (xfont != 0) {
-// XGL.glXUseXFont (xfont, startIndex, length, base);
-// }
-// font.dispose ();
-// OS.XmFontListFreeFontContext (context);
- }
-
- /**
- * Loads the specified outline font.
- *
- * @param fdata
- * @param device
- * @param base
- * @param first
- * @param count
- * @param deviation
- * @param extrusion
- * @param format
- * @param lpgmf
- */
- public void loadOutlineFont (FontData fdata, Device device, int base, int first,
- int count, float deviation, float extrusion, int format, GLYPHMETRICSFLOAT[] lpgmf) {
- // stub
- }
-
- /**
- * Resizes the receiver.
- *
- * @param x
- * @param y
- * @param width
- * @param height
- */
- public void resize (int x, int y, int width, int height) {
- if (height == 0) height = 1;
- GL.glViewport (x, y, width, height);
- GL.glMatrixMode (GL.GL_PROJECTION);
- GL.glLoadIdentity ();
- GLU.gluPerspective (45.0f, (float) width / (float) height, 0.1f, 100.0f);
- GL.glMatrixMode (GL.GL_MODELVIEW);
- GL.glLoadIdentity ();
- }
-
- /**
- * Sets the receiver to be the current <code>GLContext</code>.
- *
- * @exception SWTError <ul>
- * <li>ERROR_GRAPHIC_DISPOSED if the receiver is disposed</li>
- * </ul>
- */
- public void setCurrent () {
- if (isDisposed ()) SWT.error (SWT.ERROR_GRAPHIC_DISPOSED);
- if (XGL.glXGetCurrentContext () == handle) return;
- int display = XGTK.gdk_x11_gc_get_xdisplay (gc);
- int drawable = XGTK.gdk_x11_drawable_get_xid (data.drawable);
- XGL.glXMakeCurrent (display, drawable, handle);
- }
-
- /**
- * Swaps the receiver's buffers.
- *
- * @exception SWTError <ul>
- * <li>ERROR_GRAPHIC_DISPOSED if the receiver is disposed</li>
- * </ul>
- */
- public void swapBuffers () {
- if (isDisposed ()) SWT.error (SWT.ERROR_GRAPHIC_DISPOSED);
- int display = XGTK.gdk_x11_gc_get_xdisplay (gc);
- int drawable = XGTK.gdk_x11_drawable_get_xid(data.drawable);
- XGL.glXSwapBuffers (display, drawable);
- }
-}
diff --git a/bundles/org.eclipse.swt.opengl/gtk/org/eclipse/swt/opengl/internal/gtk/XGL.java b/bundles/org.eclipse.swt.opengl/gtk/org/eclipse/swt/opengl/internal/gtk/XGL.java
deleted file mode 100644
index 46f07b9ce4..0000000000
--- a/bundles/org.eclipse.swt.opengl/gtk/org/eclipse/swt/opengl/internal/gtk/XGL.java
+++ /dev/null
@@ -1,226 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.opengl.internal.gtk;
-
-import org.eclipse.swt.opengl.Library;
-
-public class XGL {
-
-static {
- Library.loadLibrary("gl");
-}
-
-public static final int GLX_VERSION_1_1 = 1;
-public static final int GLX_VERSION_1_2 = 1;
-public static final int GLX_VERSION_1_3 = 1;
-
-/*
-** Visual Config Attributes (glXGetConfig, glXGetFBConfigAttrib)
-*/
-public static final int GLX_USE_GL = 1; /* support GLX rendering */
-public static final int GLX_BUFFER_SIZE = 2; /* depth of the color buffer */
-public static final int GLX_LEVEL = 3; /* level in plane stacking */
-public static final int GLX_RGBA = 4; /* true if RGBA mode */
-public static final int GLX_DOUBLEBUFFER = 5; /* double buffering supported */
-public static final int GLX_STEREO = 6; /* stereo buffering supported */
-public static final int GLX_AUX_BUFFERS = 7; /* number of aux buffers */
-public static final int GLX_RED_SIZE = 8; /* number of red component bits */
-public static final int GLX_GREEN_SIZE = 9; /* number of green component bits */
-public static final int GLX_BLUE_SIZE = 10; /* number of blue component bits */
-public static final int GLX_ALPHA_SIZE = 11; /* number of alpha component bits */
-public static final int GLX_DEPTH_SIZE = 12; /* number of depth bits */
-public static final int GLX_STENCIL_SIZE = 13; /* number of stencil bits */
-public static final int GLX_ACCUM_RED_SIZE = 14; /* number of red accum bits */
-public static final int GLX_ACCUM_GREEN_SIZE = 15; /* number of green accum bits */
-public static final int GLX_ACCUM_BLUE_SIZE = 16; /* number of blue accum bits */
-public static final int GLX_ACCUM_ALPHA_SIZE = 17; /* number of alpha accum bits */
-/*
-** FBConfig-specific attributes
-*/
-public static final int GLX_X_VISUAL_TYPE = 0x22;
-public static final int GLX_CONFIG_CAVEAT = 0x20; /* Like visual_info VISUAL_CAVEAT_EXT */
-public static final int GLX_TRANSPARENT_TYPE = 0x23;
-public static final int GLX_TRANSPARENT_INDEX_VALUE = 0x24;
-public static final int GLX_TRANSPARENT_RED_VALUE = 0x25;
-public static final int GLX_TRANSPARENT_GREEN_VALUE = 0x26;
-public static final int GLX_TRANSPARENT_BLUE_VALUE = 0x27;
-public static final int GLX_TRANSPARENT_ALPHA_VALUE = 0x28;
-public static final int GLX_DRAWABLE_TYPE = 0x8010;
-public static final int GLX_RENDER_TYPE = 0x8011;
-public static final int GLX_X_RENDERABLE = 0x8012;
-public static final int GLX_FBCONFIG_ID = 0x8013;
-public static final int GLX_MAX_PBUFFER_WIDTH = 0x8016;
-public static final int GLX_MAX_PBUFFER_HEIGHT = 0x8017;
-public static final int GLX_MAX_PBUFFER_PIXELS = 0x8018;
-public static final int GLX_VISUAL_ID = 0x800B;
-
-/*
-** Error return values from glXGetConfig. Success is indicated by
-** a value of 0.
-*/
-public static final int GLX_BAD_SCREEN = 1; /* screen # is bad */
-public static final int GLX_BAD_ATTRIBUTE = 2; /* attribute to get is bad */
-public static final int GLX_NO_EXTENSION = 3; /* no glx extension on server */
-public static final int GLX_BAD_VISUAL = 4; /* visual # not known by GLX */
-public static final int GLX_BAD_CONTEXT = 5; /* returned only by import_context EXT? */
-public static final int GLX_BAD_VALUE = 6; /* returned only by glXSwapIntervalSGI? */
-public static final int GLX_BAD_ENUM = 7; /* unused? */
-
-/* FBConfig attribute values */
-
-/*
-** Generic "don't care" value for glX ChooseFBConfig attributes (except
-** GLX_LEVEL)
-*/
-public static final int GLX_DONT_CARE = 0xFFFFFFFF;
-
-/* GLX_RENDER_TYPE bits */
-public static final int GLX_RGBA_BIT = 0x00000001;
-public static final int GLX_COLOR_INDEX_BIT = 0x00000002;
-
-/* GLX_DRAWABLE_TYPE bits */
-public static final int GLX_WINDOW_BIT = 0x00000001;
-public static final int GLX_PIXMAP_BIT = 0x00000002;
-public static final int GLX_PBUFFER_BIT = 0x00000004;
-
-/* GLX_CONFIG_CAVEAT attribute values */
-public static final int GLX_NONE = 0x8000;
-public static final int GLX_SLOW_CONFIG = 0x8001;
-public static final int GLX_NON_CONFORMANT_CONFIG = 0x800D;
-
-/* GLX_X_VISUAL_TYPE attribute values */
-public static final int GLX_TRUE_COLOR = 0x8002;
-public static final int GLX_DIRECT_COLOR = 0x8003;
-public static final int GLX_PSEUDO_COLOR = 0x8004;
-public static final int GLX_STATIC_COLOR = 0x8005;
-public static final int GLX_GRAY_SCALE = 0x8006;
-public static final int GLX_STATIC_GRAY = 0x8007;
-
-/* GLX_TRANSPARENT_TYPE attribute values */
-/* public static final int GLX_NONE 0x8000 */
-public static final int GLX_TRANSPARENT_RGB = 0x8008;
-public static final int GLX_TRANSPARENT_INDEX = 0x8009;
-
-/* glXCreateGLXPbuffer attributes */
-public static final int GLX_PRESERVED_CONTENTS = 0x801B;
-public static final int GLX_LARGEST_PBUFFER = 0x801C;
-public static final int GLX_PBUFFER_HEIGHT = 0x8040; /* New for GLX 1.3 */
-public static final int GLX_PBUFFER_WIDTH = 0x8041; /* New for GLX 1.3 */
-
-/* glXQueryGLXPBuffer attributes */
-public static final int GLX_WIDTH = 0x801D;
-public static final int GLX_HEIGHT = 0x801E;
-public static final int GLX_EVENT_MASK = 0x801F;
-
-/* glXCreateNewContext render_type attribute values */
-public static final int GLX_RGBA_TYPE = 0x8014;
-public static final int GLX_COLOR_INDEX_TYPE = 0x8015;
-
-/* glXQueryContext attributes */
-/* public static final int GLX_FBCONFIG_ID 0x8013 */
-/* public static final int GLX_RENDER_TYPE 0x8011 */
-public static final int GLX_SCREEN = 0x800C;
-
-/* glXSelectEvent event mask bits */
-public static final int GLX_PBUFFER_CLOBBER_MASK = 0x08000000;
-
-/* GLXPbufferClobberEvent event_type values */
-public static final int GLX_DAMAGED = 0x8020;
-public static final int GLX_SAVED = 0x8021;
-
-/* GLXPbufferClobberEvent draw_type values */
-public static final int GLX_WINDOW = 0x8022;
-public static final int GLX_PBUFFER = 0x8023;
-
-/* GLXPbufferClobberEvent buffer_mask bits */
-public static final int GLX_FRONT_LEFT_BUFFER_BIT = 0x00000001;
-public static final int GLX_FRONT_RIGHT_BUFFER_BIT = 0x00000002;
-public static final int GLX_BACK_LEFT_BUFFER_BIT = 0x00000004;
-public static final int GLX_BACK_RIGHT_BUFFER_BIT = 0x00000008;
-public static final int GLX_AUX_BUFFERS_BIT = 0x00000010;
-public static final int GLX_DEPTH_BUFFER_BIT = 0x00000020;
-public static final int GLX_STENCIL_BUFFER_BIT = 0x00000040;
-public static final int GLX_ACCUM_BUFFER_BIT = 0x00000080;
-
-/*
-** Extension return values from glXGetConfig. These are also
-** accepted as parameter values for glXChooseVisual.
-*/
-
-public static final int GLX_X_VISUAL_TYPE_EXT = 0x22; /* visual_info extension type */
-public static final int GLX_TRANSPARENT_TYPE_EXT = 0x23; /* visual_info extension */
-public static final int GLX_TRANSPARENT_INDEX_VALUE_EXT = 0x24; /* visual_info extension */
-public static final int GLX_TRANSPARENT_RED_VALUE_EXT = 0x25; /* visual_info extension */
-public static final int GLX_TRANSPARENT_GREEN_VALUE_EXT = 0x26; /* visual_info extension */
-public static final int GLX_TRANSPARENT_BLUE_VALUE_EXT = 0x27; /* visual_info extension */
-public static final int GLX_TRANSPARENT_ALPHA_VALUE_EXT = 0x28; /* visual_info extension */
-
-/* Property values for visual_type */
-public static final int GLX_TRUE_COLOR_EXT = 0x8002;
-public static final int GLX_DIRECT_COLOR_EXT = 0x8003;
-public static final int GLX_PSEUDO_COLOR_EXT = 0x8004;
-public static final int GLX_STATIC_COLOR_EXT = 0x8005;
-public static final int GLX_GRAY_SCALE_EXT = 0x8006;
-public static final int GLX_STATIC_GRAY_EXT = 0x8007;
-
-/* Property values for transparent pixel */
-public static final int GLX_NONE_EXT = 0x8000;
-public static final int GLX_TRANSPARENT_RGB_EXT = 0x8008;
-public static final int GLX_TRANSPARENT_INDEX_EXT = 0x8009;
-
-/* Property values for visual_rating */
-public static final int GLX_VISUAL_CAVEAT_EXT = 0x20; /* visual_rating extension type */
-public static final int GLX_SLOW_VISUAL_EXT = 0x8001;
-public static final int GLX_NON_CONFORMANT_VISUAL_EXT = 0x800D;
-
-/*
-** Names for attributes to glXGetClientString.
-*/
-public static final int GLX_VENDOR = 0x1;
-public static final int GLX_VERSION = 0x2;
-public static final int GLX_EXTENSIONS = 0x3;
-
-/*
-** Names for attributes to glXQueryContextInfoEXT.
-*/
-public static final int GLX_SHARE_CONTEXT_EXT = 0x800A; /* id of share context */
-public static final int GLX_VISUAL_ID_EXT = 0x800B; /* id of context's visual */
-public static final int GLX_SCREEN_EXT = 0x800C; /* screen number */
-
-/* GLX Extension Strings */
-public static final int GLX_EXT_import_context = 1;
-public static final int GLX_EXT_visual_info = 1;
-public static final int GLX_EXT_visual_rating = 1;
-public static final int GLX_ARB_get_proc_address = 1;
-
-public static final native int glXChooseVisual(int dpy, int screen, int[] attribList);
-public static final native void glXCopyContext(int dpy, int src, int dst, int mask);
-//public static final native int glXCreateContext(int dpy, int vis, int shareList, boolean direct);
-public static final native int glXCreateContext(int dpy, XVisualInfo vis, int shareList, boolean direct);
-public static final native int glXCreateGLXPixmap(int dpy, XVisualInfo vis, int pixmap);
-public static final native void glXDestroyContext(int dpy, int ctx);
-public static final native void glXDestroyGLXPixmap(int dpy, int pix);
-public static final native int glXGetConfig(int dpy, XVisualInfo vis, int attrib, int[] value);
-public static final native int glXGetCurrentContext();
-public static final native int glXGetCurrentDrawable();
-public static final native boolean glXIsDirect(int dpy, int ctx);
-public static final native boolean glXMakeCurrent(int dpy, int drawable, int ctx);
-public static final native boolean glXQueryExtension(int dpy, int[] errorBase, int[] eventBase);
-public static final native boolean glXQueryVersion(int dpy, int[] major, int[] minor);
-public static final native void glXSwapBuffers(int dpy, int drawable);
-public static final native void glXUseXFont(int font, int first, int count, int listBase);
-public static final native void glXWaitGL();
-public static final native void glXWaitX();
-public static final native int glXGetClientString(int dpy, int name);
-public static final native int glXQueryServerString(int dpy, int screen, int name);
-public static final native int glXQueryExtensionsString(int dpy, int screen);
-public static final native void memmove(XVisualInfo dest, int src, int size);
-}
diff --git a/bundles/org.eclipse.swt.opengl/gtk/org/eclipse/swt/opengl/internal/gtk/XGTK.java b/bundles/org.eclipse.swt.opengl/gtk/org/eclipse/swt/opengl/internal/gtk/XGTK.java
deleted file mode 100644
index d6c017a923..0000000000
--- a/bundles/org.eclipse.swt.opengl/gtk/org/eclipse/swt/opengl/internal/gtk/XGTK.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.opengl.internal.gtk;
-
-import org.eclipse.swt.opengl.Library;
-
-public class XGTK {
-
- static {
- Library.loadLibrary("xgtk");
- }
-
- public static final synchronized native int gdk_x11_gc_get_xdisplay(int gc);
- public static final synchronized native int gdk_x11_drawable_get_xid(int gc);
- public static final synchronized native int XDefaultScreen(int display);
- public static final synchronized native int XDefaultScreenOfDisplay(int display);
- public static final synchronized native int XDefaultDepthOfScreen(int screen);
- public static final synchronized native int XFree(int address);
- public static final synchronized native void free(int ptr);
- public static final synchronized native int malloc(int size);
-}
diff --git a/bundles/org.eclipse.swt.opengl/gtk/org/eclipse/swt/opengl/internal/gtk/XVisualInfo.java b/bundles/org.eclipse.swt.opengl/gtk/org/eclipse/swt/opengl/internal/gtk/XVisualInfo.java
deleted file mode 100644
index cc89f202e6..0000000000
--- a/bundles/org.eclipse.swt.opengl/gtk/org/eclipse/swt/opengl/internal/gtk/XVisualInfo.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.opengl.internal.gtk;
-
-
-public class XVisualInfo {
- public int visual;
- public int visualid;
- public int screen;
- public int depth;
- public int cclass;
- public int red_mask, green_mask, blue_mask;
- public int colormap_size;
- public int bits_per_rgb;
- public static final int sizeof = 40;
-}
diff --git a/bundles/org.eclipse.swt.opengl/motif/library/build.sh b/bundles/org.eclipse.swt.opengl/motif/library/build.sh
deleted file mode 100644
index 994b199aac..0000000000
--- a/bundles/org.eclipse.swt.opengl/motif/library/build.sh
+++ /dev/null
@@ -1,68 +0,0 @@
-#!/bin/sh
-#*******************************************************************************
-# Copyright (c) 2000, 2004 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Common Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/cpl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-# Kevin Cornell (Rational Software Corporation)
-# Tom Tromey (Red Hat, Inc.)
-# Sridhar Bidigalu (ICS)
-#*******************************************************************************
-
-cd `dirname $0`
-
-# Determine the operating system being built
-makefile=""
-OS=`uname -s`
-MODEL=`uname -m`
-
-case $OS in
- "AIX")
- JAVA_HOME=/bluebird/teamswt/swt-builddir/aixj9
- MOTIF_HOME=/usr
- CDE_HOME=/usr/dt
- makefile="make_aix.mak"
- echo "Building AIX version of SWT"
- ;;
- "Linux")
- JAVA_HOME=/bluebird/teamswt/swt-builddir/IBMJava2-141
- MOTIF_HOME=/bluebird/teamswt/swt-builddir/motif21
- QT_HOME=$QTDIR
- makefile="make_linux.mak"
- echo "Building Linux version of SWT"
- ;;
- "SunOS")
- JAVA_HOME=/usr/java
- MOTIF_HOME=/usr/dt
- CDE_HOME=/usr/dt
- makefile="make_solaris.mak"
- echo "Building Solaris version of SWT"
- ;;
- "HP-UX")
- JAVA_HOME=/opt/jdk14101
- MOTIF_HOME=/usr
- CDE_HOME=/usr/dt
- case $MODEL in
- "ia64")
- makefile="make_hpux_ia64.mak"
- echo "Building HPUX ia64 version of SWT"
- ;;
- *)
- makefile="make_hpux_PA_RISC.mak"
- echo "Building HPUX risc version of SWT"
- ;;
- esac
- ;;
-
- *)
- echo "Unknown OS -- build aborted"
- ;;
-esac
-
-export JAVA_HOME MOTIF_HOME CDE_HOME QT_HOME
-
-make -f $makefile $1 $2 $3 $4 \ No newline at end of file
diff --git a/bundles/org.eclipse.swt.opengl/motif/library/glx.c b/bundles/org.eclipse.swt.opengl/motif/library/glx.c
deleted file mode 100644
index 4fca4eb8eb..0000000000
--- a/bundles/org.eclipse.swt.opengl/motif/library/glx.c
+++ /dev/null
@@ -1,232 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-#include <GL/glx.h>
-#include "swt.h"
-#include "structs.h"
-
-#define XGL_NATIVE(func) Java_org_eclipse_swt_opengl_internal_motif_XGL_##func
-
-JNIEXPORT jint JNICALL XGL_NATIVE(glXChooseVisual)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jintArray arg2)
-{
- jint *lparg2=NULL;
- jint rc;
-
- DEBUG_CALL("glXChooseVisual\n")
-
- if (arg2) lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL);
- rc = (jint)glXChooseVisual((Display *)arg0, arg1, (int *)lparg2);
- if (arg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
- return rc;
-}
-
-JNIEXPORT void JNICALL XGL_NATIVE(glXCopyContext)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jint arg3)
-{
- DEBUG_CALL("glXCopyContext\n")
-
- glXCopyContext((Display *)arg0, (GLXContext)arg1, (GLXContext)arg2, arg3);
-}
-
-JNIEXPORT jint JNICALL XGL_NATIVE(glXCreateContext)
- (JNIEnv *env, jclass that, jint arg0, jobject arg1, jint arg2, jboolean arg3)
-{
- XVisualInfo _arg1, *lparg1=NULL;
- jint rc;
-
- DEBUG_CALL("glXCreateContext\n")
-
- if (arg1) lparg1 = getXVisualInfoFields(env, arg1, &_arg1);
- rc = (jint)glXCreateContext((Display *)arg0, lparg1, (GLXContext)arg2, arg3);
- if (arg1) setXVisualInfoFields(env, arg1, lparg1);
- return rc;
-}
-
-JNIEXPORT jint JNICALL XGL_NATIVE(glXCreateGLXPixmap)
- (JNIEnv *env, jclass that, jint arg0, jobject arg1, jint arg2)
-{
- XVisualInfo _arg1, *lparg1=NULL;
- jint rc;
-
- DEBUG_CALL("glXCreateGLXPixmap\n")
-
- if (arg1) lparg1 = getXVisualInfoFields(env, arg1, &_arg1);
- rc = (jint)glXCreateGLXPixmap((Display *)arg0, lparg1, arg2);
- if (arg1) setXVisualInfoFields(env, arg1, lparg1);
- return rc;
-}
-
-JNIEXPORT void JNICALL XGL_NATIVE(glXDestroyContext)
- (JNIEnv *env, jclass that, jint arg0, jint arg1)
-{
- DEBUG_CALL("glXDestroyContext\n")
-
- glXDestroyContext((Display *)arg0, (GLXContext)arg1);
-}
-
-JNIEXPORT void JNICALL XGL_NATIVE(glXDestroyGLXPixmap)
- (JNIEnv *env, jclass that, jint arg0, jint arg1)
-{
- DEBUG_CALL("glXDestroyGLXPixmap\n")
-
- glXDestroyGLXPixmap((Display *)arg0, arg1);
-}
-
-JNIEXPORT jint JNICALL XGL_NATIVE(glXGetClientString)
- (JNIEnv *env, jclass that, jint arg0, jint arg1)
-{
- DEBUG_CALL("glXGetClientString\n")
-
- return (jint)glXGetClientString((Display *)arg0, arg1);
-}
-
-JNIEXPORT jint JNICALL XGL_NATIVE(glXGetConfig)
- (JNIEnv *env, jclass that, jint arg0, jobject arg1, jint arg2, jintArray arg3)
-{
- XVisualInfo _arg1, *lparg1=NULL;
- jint *lparg3=NULL;
- jint rc;
-
- DEBUG_CALL("glXGetConfig\n")
-
- if (arg1) lparg1 = getXVisualInfoFields(env, arg1, &_arg1);
- if (arg3) lparg3 = (*env)->GetIntArrayElements(env, arg3, NULL);
- rc = (jint)glXGetConfig((Display *)arg0, lparg1, arg2, (int *)lparg3);
- if (arg1) setXVisualInfoFields(env, arg1, lparg1);
- if (arg3) (*env)->ReleaseIntArrayElements(env, arg3, lparg3, 0);
- return rc;
-}
-
-JNIEXPORT jint JNICALL XGL_NATIVE(glXGetCurrentContext)
- (JNIEnv *env, jclass that)
-{
- DEBUG_CALL("glXGetCurrentContext\n")
-
- return (jint)glXGetCurrentContext();
-}
-
-JNIEXPORT jint JNICALL XGL_NATIVE(glXGetCurrentDrawable)
- (JNIEnv *env, jclass that)
-{
- DEBUG_CALL("glXGetCurrentDrawable\n")
-
- return (jint)glXGetCurrentDrawable();
-}
-
-JNIEXPORT jboolean JNICALL XGL_NATIVE(glXIsDirect)
- (JNIEnv *env, jclass that, jint arg0, jint arg1)
-{
- DEBUG_CALL("glXIsDirect\n")
-
- return (jboolean)glXIsDirect((Display *)arg0, (GLXContext)arg1);
-}
-
-JNIEXPORT jboolean JNICALL XGL_NATIVE(glXMakeCurrent)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2)
-{
- DEBUG_CALL("glXMakeCurrent\n")
-
- return (jboolean)glXMakeCurrent((Display *)arg0, (GLXDrawable)arg1, (GLXContext)arg2);
-}
-
-JNIEXPORT jboolean JNICALL XGL_NATIVE(glXQueryExtension)
- (JNIEnv *env, jclass that, jint arg0, jintArray arg1, jintArray arg2)
-{
- jint *lparg1=NULL;
- jint *lparg2=NULL;
- jboolean rc;
-
- DEBUG_CALL("glXQueryExtension\n")
-
- if (arg1) lparg1 = (*env)->GetIntArrayElements(env, arg1, NULL);
- if (arg2) lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL);
- rc = (jboolean)glXQueryExtension((Display *)arg0, (int *)lparg1, (int *)lparg2);
- if (arg1) (*env)->ReleaseIntArrayElements(env, arg1, lparg1, 0);
- if (arg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
- return rc;
-}
-
-JNIEXPORT jint JNICALL XGL_NATIVE(glXQueryExtensionsString)
- (JNIEnv *env, jclass that, jint arg0, jint arg1)
-{
- DEBUG_CALL("glXQueryExtensionsString\n")
-
- return (jint)glXQueryExtensionsString((Display *)arg0, arg1);
-}
-
-JNIEXPORT jint JNICALL XGL_NATIVE(glXQueryServerString)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2)
-{
- DEBUG_CALL("glXQueryServerString\n")
-
- return (jint)glXQueryServerString((Display *)arg0, arg1, arg2);
-}
-
-JNIEXPORT jboolean JNICALL XGL_NATIVE(glXQueryVersion)
- (JNIEnv *env, jclass that, jint arg0, jintArray arg1, jintArray arg2)
-{
- jint *lparg1=NULL;
- jint *lparg2=NULL;
- jboolean rc;
-
- DEBUG_CALL("glXQueryVersion\n")
-
- if (arg1) lparg1 = (*env)->GetIntArrayElements(env, arg1, NULL);
- if (arg2) lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL);
- rc = (jboolean)glXQueryVersion((Display *)arg0, (int *)lparg1, (int *)lparg2);
- if (arg1) (*env)->ReleaseIntArrayElements(env, arg1, lparg1, 0);
- if (arg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
- return rc;
-}
-
-JNIEXPORT void JNICALL XGL_NATIVE(glXSwapBuffers)
- (JNIEnv *env, jclass that, jint arg0, jint arg1)
-{
- DEBUG_CALL("glXSwapBuffers\n")
-
- glXSwapBuffers((Display *)arg0, (GLXDrawable)arg1);
-}
-
-JNIEXPORT void JNICALL XGL_NATIVE(glXUseXFont)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jint arg3)
-{
- DEBUG_CALL("glXUseXFont\n")
-
- glXUseXFont(arg0, arg1, arg2, arg3);
-}
-
-JNIEXPORT void JNICALL XGL_NATIVE(glXWaitGL)
- (JNIEnv *env, jclass that)
-{
- DEBUG_CALL("glXWaitGL\n")
-
- glXWaitGL();
-}
-
-JNIEXPORT void JNICALL XGL_NATIVE(glXWaitX)
- (JNIEnv *env, jclass that)
-{
- DEBUG_CALL("glXWaitX\n")
-
- glXWaitX();
-}
-
-JNIEXPORT void JNICALL XGL_NATIVE(memmove__Lorg_eclipse_swt_opengl_internal_motif_XVisualInfo_2II)
- (JNIEnv *env, jclass that, jobject arg0, jint arg1, jint arg2)
-{
- XVisualInfo _arg0, *lparg0=NULL;
-
- DEBUG_CALL("memmove__Lorg_eclipse_swt_opengl_internal_motif_XVisualInfo_2II\n")
-
- if (arg0) lparg0 = &_arg0;
- memmove((void *)lparg0, (const void *)arg1, (size_t)arg2);
- if (arg0) setXVisualInfoFields(env, arg0, lparg0);
-}
diff --git a/bundles/org.eclipse.swt.opengl/motif/library/make_aix.mak b/bundles/org.eclipse.swt.opengl/motif/library/make_aix.mak
deleted file mode 100644
index 6928cabd4e..0000000000
--- a/bundles/org.eclipse.swt.opengl/motif/library/make_aix.mak
+++ /dev/null
@@ -1,40 +0,0 @@
-#*******************************************************************************
-# Copyright (c) 2000, 2003 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Common Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/cpl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-#*******************************************************************************
-
-# Define the installation directories for various products.
-# JAVA_HOME - The JDK > 1.3
-JAVA_HOME = /usr/java131
-
-# Define the various shared libraries to be made.
-SWT_PREFIX = swt
-WS_PREFIX = motif
-SWT_DLL = lib$(SWT_PREFIX)-$(WS_PREFIX).so
-SWT_OBJ = gl.o glu.o structs.o glx.o
-SWT_LIB = -G -bnoentry -lc_r -lC_r -lm -bexpall -lMrm -lX11 -lXext -liconv -lGL -lGLU
-
-#
-# The following CFLAGS are for compiling the SWT OpenGL library.
-#
-CFLAGS = -O -s \
- -DAIX \
- -DNO_XINERAMA_EXTENSIONS \
- -q mbcs -qlanglvl=extended -qmaxmem=8192 \
- -I$(JAVA_HOME)/include
-
-all: make_swt
-
-make_swt: $(SWT_DLL)
-
-$(SWT_DLL): $(SWT_OBJ)
- ld $(SWT_LIB) -o $(SWT_DLL) $(SWT_OBJ)
-
-clean:
- rm -f *.o *.so *.a
diff --git a/bundles/org.eclipse.swt.opengl/motif/library/make_hpux.mak b/bundles/org.eclipse.swt.opengl/motif/library/make_hpux.mak
deleted file mode 100644
index 16648de5f0..0000000000
--- a/bundles/org.eclipse.swt.opengl/motif/library/make_hpux.mak
+++ /dev/null
@@ -1,44 +0,0 @@
-#*******************************************************************************
-# Copyright (c) 2000, 2003 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Common Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/cpl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-#*******************************************************************************
-
-# Define the installation directories for various products.
-JAVA_HOME = /opt/java1.3
-
-# Define the various shared libraries to be made.
-SWT_PREFIX = gl
-WS_PREFIX = motif
-SWT_DLL = lib$(SWT_PREFIX)-$(WS_PREFIX).sl
-SWT_OBJ = gl.o glu.o structs.o glx.o
-SWT_LIB = -L/usr/lib -L/opt/graphics/OpenGL/lib -G -lGL -lGLU -lc -ldld -lm
-
-#
-# The following CFLAGS are for compiling the SWT OpenGL library.
-#
-# Note:
-# The flag -xarch=generic ensure the compiled modules will be targeted
-# for 32-bit architectures. If this flag is not
-#
-CFLAGS = -Ae +z \
- -DNO_XINERAMA_EXTENSIONS \
- -D_HPUX -D_POSIX_C_SOURCE=199506L \
- -I./ \
- -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/hp-ux \
- -I/opt/graphics/OpenGL/include
-
-all: make_swt
-
-make_swt: $(SWT_DLL)
-
-$(SWT_DLL): $(SWT_OBJ)
- ld -b -z -o $@ $(SWT_OBJ) $(SWT_LIB)
-
-clean:
- rm -f *.sl *.o
diff --git a/bundles/org.eclipse.swt.opengl/motif/library/make_linux.mak b/bundles/org.eclipse.swt.opengl/motif/library/make_linux.mak
deleted file mode 100644
index 755895fe3d..0000000000
--- a/bundles/org.eclipse.swt.opengl/motif/library/make_linux.mak
+++ /dev/null
@@ -1,38 +0,0 @@
-#*******************************************************************************
-# Copyright (c) 2000, 2003 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Common Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/cpl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-#*******************************************************************************
-
-# Define the installation directories for various products.
-JAVA_HOME = /bluebird/teamswt/swt-builddir/ive/bin
-
-
-# Define the various shared libraries to be made.
-SWT_PREFIX = gl
-WS_PREFIX = motif
-SWT_DLL = lib$(SWT_PREFIX)-$(WS_PREFIX).so
-SWT_OBJ = gl.o glu.o structs.o glx.o
-SWT_LIB = -shared -L/usr/X11R6/lib -lGL -lGLU -lm
-
-#
-# The following CFLAGS are for compiling the SWT OpenGL library.
-#
-CFLAGS = -O -s \
- -I./ \
- -I$(JAVA_HOME)/include
-
-all: make_swt
-
-make_swt: $(SWT_DLL)
-
-$(SWT_DLL): $(SWT_OBJ)
- ld -o $@ $(SWT_OBJ) $(SWT_LIB)
-
-clean:
- rm -f *.so *.o
diff --git a/bundles/org.eclipse.swt.opengl/motif/library/make_solaris.mak b/bundles/org.eclipse.swt.opengl/motif/library/make_solaris.mak
deleted file mode 100644
index 1b08b07f47..0000000000
--- a/bundles/org.eclipse.swt.opengl/motif/library/make_solaris.mak
+++ /dev/null
@@ -1,45 +0,0 @@
-#*******************************************************************************
-# Copyright (c) 2000, 2003 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Common Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/cpl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-#*******************************************************************************
-
-# Define the installation directories for various products.
-JAVA_HOME = /bluebird/teamswt/swt-builddir/ive/bin
-
-# Define the various shared libraries to be made.
-SWT_PREFIX = gl
-WS_PREFIX = motif
-SWT_DLL = lib$(SWT_PREFIX)-$(WS_PREFIX).so
-SWT_OBJ = gl.o glu.o structs.o glx.o
-SWT_LIB = -G -L/usr/lib -lm -lGL -lGLU
-
-#
-# The following CFLAGS are for compiling the SWT OpenGL library.
-#
-# Note:
-# The flag -xarch=generic ensure the compiled modules will be targeted
-# for 32-bit architectures.
-#
-CFLAGS = -O -s \
- -xarch=generic \
- -KPIC \
- -I./ \
- -I$(JAVA_HOME)/include
-
-all: make_swt
-
-make_swt: $(SWT_DLL)
-
-$(SWT_DLL): $(SWT_OBJ)
- ld -o $@ $(SWT_OBJ) $(SWT_LIB)
-
-clean:
- rm -f *.so *.o
-
-
diff --git a/bundles/org.eclipse.swt.opengl/motif/library/structs.c b/bundles/org.eclipse.swt.opengl/motif/library/structs.c
deleted file mode 100644
index bf8db55dfa..0000000000
--- a/bundles/org.eclipse.swt.opengl/motif/library/structs.c
+++ /dev/null
@@ -1,73 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-#include <X11/X.h>
-#include <X11/Xlib.h>
-#include "swt.h"
-#include "structs.h"
-
-typedef struct XVisualInfo_FID_CACHE {
- int cached;
- jclass clazz;
- jfieldID visual, visualid, screen, depth, cclass, red_mask, green_mask, blue_mask, colormap_size, bits_per_rgb;
-} XVisualInfo_FID_CACHE;
-typedef XVisualInfo_FID_CACHE *PXVisualInfo_FID_CACHE;
-
-XVisualInfo_FID_CACHE XVisualInfoFc;
-
-void cacheXVisualInfoFids(JNIEnv *env, jobject lpObject, PXVisualInfo_FID_CACHE lpCache)
-{
- if (lpCache->cached) return;
- lpCache->clazz = (*env)->GetObjectClass(env, lpObject);
- lpCache->visual = (*env)->GetFieldID(env, lpCache->clazz, "visual", "I");
- lpCache->visualid = (*env)->GetFieldID(env, lpCache->clazz, "visualid", "I");
- lpCache->screen = (*env)->GetFieldID(env, lpCache->clazz, "screen", "I");
- lpCache->depth = (*env)->GetFieldID(env, lpCache->clazz, "depth", "I");
- lpCache->cclass = (*env)->GetFieldID(env, lpCache->clazz, "cclass", "I");
- lpCache->red_mask = (*env)->GetFieldID(env, lpCache->clazz, "red_mask", "I");
- lpCache->green_mask = (*env)->GetFieldID(env, lpCache->clazz, "green_mask", "I");
- lpCache->blue_mask = (*env)->GetFieldID(env, lpCache->clazz, "blue_mask", "I");
- lpCache->colormap_size = (*env)->GetFieldID(env, lpCache->clazz, "colormap_size", "I");
- lpCache->bits_per_rgb = (*env)->GetFieldID(env, lpCache->clazz, "bits_per_rgb", "I");
- lpCache->cached = 1;
-}
-
-XVisualInfo *getXVisualInfoFields(JNIEnv *env, jobject lpObject, XVisualInfo *lpStruct)
-{
- PXVisualInfo_FID_CACHE lpCache = &XVisualInfoFc;
- if (!lpCache->cached) cacheXVisualInfoFids(env, lpObject, lpCache);
- lpStruct->visual = (Visual *)(*env)->GetIntField(env, lpObject, lpCache->visual);
- lpStruct->visualid = (*env)->GetIntField(env, lpObject, lpCache->visualid);
- lpStruct->screen = (*env)->GetIntField(env, lpObject, lpCache->screen);
- lpStruct->depth = (*env)->GetIntField(env, lpObject, lpCache->depth);
- lpStruct->class = (*env)->GetIntField(env, lpObject, lpCache->cclass);
- lpStruct->red_mask = (*env)->GetIntField(env, lpObject, lpCache->red_mask);
- lpStruct->green_mask = (*env)->GetIntField(env, lpObject, lpCache->green_mask);
- lpStruct->blue_mask = (*env)->GetIntField(env, lpObject, lpCache->blue_mask);
- lpStruct->colormap_size = (*env)->GetIntField(env, lpObject, lpCache->colormap_size);
- lpStruct->bits_per_rgb = (*env)->GetIntField(env, lpObject, lpCache->bits_per_rgb);
- return lpStruct;
-}
-
-void setXVisualInfoFields(JNIEnv *env, jobject lpObject, XVisualInfo *lpStruct)
-{
- PXVisualInfo_FID_CACHE lpCache = &XVisualInfoFc;
- if (!lpCache->cached) cacheXVisualInfoFids(env, lpObject, lpCache);
- (*env)->SetIntField(env, lpObject, lpCache->visual, (jint)lpStruct->visual);
- (*env)->SetIntField(env, lpObject, lpCache->visualid, (jint)lpStruct->visualid);
- (*env)->SetIntField(env, lpObject, lpCache->screen, (jint)lpStruct->screen);
- (*env)->SetIntField(env, lpObject, lpCache->depth, (jint)lpStruct->depth);
- (*env)->SetIntField(env, lpObject, lpCache->cclass, (jint)lpStruct->class);
- (*env)->SetIntField(env, lpObject, lpCache->red_mask, (jint)lpStruct->red_mask);
- (*env)->SetIntField(env, lpObject, lpCache->green_mask, (jint)lpStruct->green_mask);
- (*env)->SetIntField(env, lpObject, lpCache->blue_mask, (jint)lpStruct->blue_mask);
- (*env)->SetIntField(env, lpObject, lpCache->colormap_size, (jint)lpStruct->colormap_size);
- (*env)->SetIntField(env, lpObject, lpCache->bits_per_rgb, (jint)lpStruct->bits_per_rgb);
-}
diff --git a/bundles/org.eclipse.swt.opengl/motif/library/structs.h b/bundles/org.eclipse.swt.opengl/motif/library/structs.h
deleted file mode 100644
index 4121f7f488..0000000000
--- a/bundles/org.eclipse.swt.opengl/motif/library/structs.h
+++ /dev/null
@@ -1,16 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-#include <X11/X.h>
-#include <X11/Xutil.h>
-
-XVisualInfo *getXVisualInfoFields(JNIEnv *env, jobject lpObject, XVisualInfo *lpStruct);
-void setXVisualInfoFields(JNIEnv *env, jobject lpObject, XVisualInfo *lpStruct);
-
diff --git a/bundles/org.eclipse.swt.opengl/motif/org/eclipse/swt/opengl/GLContext.java b/bundles/org.eclipse.swt.opengl/motif/org/eclipse/swt/opengl/GLContext.java
deleted file mode 100644
index ea831351c5..0000000000
--- a/bundles/org.eclipse.swt.opengl/motif/org/eclipse/swt/opengl/GLContext.java
+++ /dev/null
@@ -1,303 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.opengl;
-
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.internal.motif.*;
-import org.eclipse.swt.opengl.internal.motif.*;
-
-/**
- * Instances of <code>GLContext</code> are used to draw on swt <code>Drawable</code>s
- * through invocations of provided OpenGL functions.
- * <p>
- * Application code must explicitly invoke the <code>GLContext.dispose ()</code>
- * method to release the operating system resources managed by each instance
- * when those instances are no longer required. This is <em>particularly</em>
- * important on Windows95 and Windows98 where the operating system has a limited
- * number of device contexts available.
- * </p>
- */
-public class GLContext {
- int handle;
- int gc;
- GCData data;
- Drawable drawable;
- int selectBufferPtr = 0;
-
- static final int MSB_FIRST = 1;
- static final int LSB_FIRST = 2;
-
- /**
- * Constructs a new instance of this class which has been
- * configured to draw on the specified drawable.
- * <p>
- * You must dispose the <code>GLContext</code> when it is no longer required.
- * </p>
- *
- * @param drawable the drawable to draw on
- * @exception IllegalArgumentException <ul>
- * <li>ERROR_NULL_ARGUMENT - if the drawable is null</li>
- * </ul>
- * @exception SWTError <ul>
- * <li>ERROR_NO_HANDLES if a handle could not be obtained for gc creation</li>
- * <li>ERROR_UNSUPPORTED_DEPTH - if the current display depth is not supported</li>
- * </ul>
- */
- public GLContext (Drawable drawable) {
- if (drawable == null) SWT.error (SWT.ERROR_NULL_ARGUMENT);
- this.drawable = drawable;
- this.data = new GCData ();
- gc = drawable.internal_new_GC (data);
- if (gc == 0) SWT.error (SWT.ERROR_NO_HANDLES);
- int xDisplay = data.display;
- int screen = OS.XDefaultScreen (xDisplay);
- int depth = OS.XDefaultDepthOfScreen (OS.XDefaultScreenOfDisplay (xDisplay));
- int attrib [] = {
- XGL.GLX_LEVEL,
- 0,
- XGL.GLX_RGBA,
- XGL.GLX_DOUBLEBUFFER,
-// XGL.GLX_DEPTH_SIZE,
-// depth,
- 0
- };
- int infoPtr = XGL.glXChooseVisual (xDisplay, screen, attrib);
- if (infoPtr == 0) SWT.error (SWT.ERROR_UNSUPPORTED_DEPTH);
- XVisualInfo info = new XVisualInfo ();
- XGL.memmove (info, infoPtr, XVisualInfo.sizeof);
- OS.XFree (infoPtr);
- handle = XGL.glXCreateContext (xDisplay, info, 0, false);
- if (handle == 0) SWT.error (SWT.ERROR_NO_HANDLES);
- }
-
- public ImageData convertImageData (ImageData source) {
- PaletteData palette = new PaletteData (0xff0000, 0xff00, 0xff);
- ImageData newSource = new ImageData (source.width, source.height, 24, palette);
- ImageDataUtil.blit (
- 1,
- source.data,
- source.depth,
- source.bytesPerLine,
- (source.depth != 16) ? MSB_FIRST : LSB_FIRST,
- 0,
- 0,
- source.width,
- source.height,
- source.palette.redMask,
- source.palette.greenMask,
- source.palette.blueMask,
- 255,
- null,
- 0,
- 0,
- 0,
- newSource.data,
- newSource.depth,
- newSource.bytesPerLine,
- (newSource.depth != 16) ? MSB_FIRST : LSB_FIRST,
- 0,
- 0,
- newSource.width,
- newSource.height,
- newSource.palette.redMask,
- newSource.palette.greenMask,
- newSource.palette.blueMask,
- false,
- true);
-
- return newSource;
- }
-
- /**
- * Disposes of the operating system resources associated with
- * the receiver. Applications must dispose of all <code>GLContext</code>s
- * that they allocate.
- */
- public void dispose () {
- if (handle == 0) return;
- int xDisplay = data.display;
- if (XGL.glXGetCurrentContext () == handle) {
- XGL.glXMakeCurrent (xDisplay, 0, 0);
- }
- if (selectBufferPtr != 0) OS.XtFree (selectBufferPtr);
- XGL.glXDestroyContext (xDisplay, handle);
- handle = 0;
- // drawable may be disposed
- try {
- drawable.internal_dispose_GC (gc, data);
- } catch (SWTException e) {
- }
- gc = 0;
- data.display = data.drawable = data.colormap = 0;
- /*data.fontList =*/ data.clipRgn = data.renderTable = 0;
- drawable = null;
- data.device = null;
- data.image = null;
- //data.codePage = null;
- data = null;
- }
-
- public int[] getSelectBuffer (int selectBufferPtr, int[] selectBuffer) {
- OS.memmove (selectBuffer, selectBufferPtr, selectBuffer.length * 4);
- return selectBuffer;
- }
-
- public int getSelectBufferPtr (int[] selectBuffer) {
- if (selectBufferPtr == 0) {
- selectBufferPtr = OS.XtMalloc (selectBuffer.length * 4);
- }
- OS.memmove (selectBufferPtr, selectBuffer, selectBuffer.length * 4);
- return selectBufferPtr;
- }
-
- /**
- * Returns a boolean indicating whether the receiver is the current
- * <code>GLContext</code>.
- *
- * @return true if the receiver is the current <code>GLContext</code>,
- * false otherwise
- * @exception SWTError <ul>
- * <li>ERROR_GRAPHIC_DISPOSED if the receiver is disposed</li>
- * </ul>
- */
- public boolean isCurrent () {
- if (isDisposed ()) SWT.error (SWT.ERROR_GRAPHIC_DISPOSED);
- return XGL.glXGetCurrentContext () == handle;
- }
-
- /**
- * Returns a boolean indicating whether the <code>GLContext</code> has been
- * disposed.
- * <p>
- * This method gets the dispose state for the <code>GLContext</code>.
- * When a <code>GLContext</code> has been disposed, it is an error to
- * invoke any other method using the <code>GLContext</code>.
- *
- * @return true if the <code>GLContext</code> is disposed, false otherwise
- */
- public boolean isDisposed () {
- return handle == 0;
- }
-
- /**
- * Loads the specified bitmap font.
- *
- * @param fdata
- * @param device
- * @param base
- * @param first
- * @param count
- */
- public void loadBitmapFont (FontData fdata, Device device, int base, int startIndex, int length) {
- /* Temporary code, due some problems when running on UTF-8 loadBitmapFont ()
- * is restrict to works only for ascii.
- * Note: en_US.ISO8859-1 also code be used.
- */
- fdata.setLocale ("C");
- Font font = new Font (device, fdata);
- int fontList = font.handle;
- int[] buffer = new int [1];
- if (!OS.XmFontListInitFontContext (buffer, fontList)) return;
- int context = buffer [0];
- XFontStruct fontStruct = new XFontStruct ();
- int fontListEntry;
- int[] fontStructPtr = new int [1];
- int[] fontNamePtr = new int [1];
- int xfont = 0;
- // go through each entry in the font list
- while ((fontListEntry = OS.XmFontListNextEntry (context)) != 0) {
- int fontPtr = OS.XmFontListEntryGetFont (fontListEntry, buffer);
- if (buffer [0] == OS.XmFONT_IS_FONT) {
- // FontList contains a single font
- OS.memmove (fontStruct, fontPtr, 20 * 4);
- xfont = fontStruct.fid;
- } else {
- // FontList contains a fontSet
- int nFonts = OS.XFontsOfFontSet (fontPtr, fontStructPtr, fontNamePtr);
- int[] fontStructs = new int [nFonts];
- OS.memmove (fontStructs, fontStructPtr [0], nFonts * 4);
- // Go through each fontStruct in the font set.
- for (int i = 0; i < nFonts; i++) {
- OS.memmove (fontStruct, fontStructs [i], XFontStruct.sizeof);
- xfont = fontStruct.fid;
- }
- }
- }
- if (xfont != 0) {
- XGL.glXUseXFont (xfont, startIndex, length, base);
- }
- font.dispose ();
- OS.XmFontListFreeFontContext (context);
- }
-
- /**
- * Loads the specified outline font.
- *
- * @param fdata
- * @param device
- * @param base
- * @param first
- * @param count
- * @param deviation
- * @param extrusion
- * @param format
- * @param lpgmf
- */
- public void loadOutlineFont (FontData fdata, Device device, int base, int first,
- int count, float deviation, float extrusion, int format, GLYPHMETRICSFLOAT[] lpgmf) {
- // stub
- }
-
- /**
- * Resizes the receiver.
- *
- * @param x
- * @param y
- * @param width
- * @param height
- */
- public void resize (int x, int y, int width, int height) {
- if (height == 0) height = 1;
- GL.glViewport (x, y, width, height);
- GL.glMatrixMode (GL.GL_PROJECTION);
- GL.glLoadIdentity ();
- GLU.gluPerspective (45.0f, (float) width / (float) height, 0.1f, 100.0f);
- GL.glMatrixMode (GL.GL_MODELVIEW);
- GL.glLoadIdentity ();
- }
-
- /**
- * Sets the receiver to be the current <code>GLContext</code>.
- *
- * @exception SWTError <ul>
- * <li>ERROR_GRAPHIC_DISPOSED if the receiver is disposed</li>
- * </ul>
- */
- public void setCurrent () {
- if (isDisposed ()) SWT.error (SWT.ERROR_GRAPHIC_DISPOSED);
- if (XGL.glXGetCurrentContext () == handle) return;
- XGL.glXMakeCurrent (data.display, data.drawable, handle);
- }
-
- /**
- * Swaps the receiver's buffers.
- *
- * @exception SWTError <ul>
- * <li>ERROR_GRAPHIC_DISPOSED if the receiver is disposed</li>
- * </ul>
- */
- public void swapBuffers () {
- if (isDisposed ()) SWT.error (SWT.ERROR_GRAPHIC_DISPOSED);
- XGL.glXSwapBuffers (data.display, data.drawable);
- }
-}
diff --git a/bundles/org.eclipse.swt.opengl/motif/org/eclipse/swt/opengl/internal/motif/XGL.java b/bundles/org.eclipse.swt.opengl/motif/org/eclipse/swt/opengl/internal/motif/XGL.java
deleted file mode 100644
index ce3705a06f..0000000000
--- a/bundles/org.eclipse.swt.opengl/motif/org/eclipse/swt/opengl/internal/motif/XGL.java
+++ /dev/null
@@ -1,227 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.opengl.internal.motif;
-
-import org.eclipse.swt.opengl.Library;
-
-public class XGL {
-
-static {
- Library.loadLibrary("gl");
-}
-
-public static final int GLX_VERSION_1_1 = 1;
-public static final int GLX_VERSION_1_2 = 1;
-public static final int GLX_VERSION_1_3 = 1;
-
-/*
-** Visual Config Attributes (glXGetConfig, glXGetFBConfigAttrib)
-*/
-public static final int GLX_USE_GL = 1; /* support GLX rendering */
-public static final int GLX_BUFFER_SIZE = 2; /* depth of the color buffer */
-public static final int GLX_LEVEL = 3; /* level in plane stacking */
-public static final int GLX_RGBA = 4; /* true if RGBA mode */
-public static final int GLX_DOUBLEBUFFER = 5; /* double buffering supported */
-public static final int GLX_STEREO = 6; /* stereo buffering supported */
-public static final int GLX_AUX_BUFFERS = 7; /* number of aux buffers */
-public static final int GLX_RED_SIZE = 8; /* number of red component bits */
-public static final int GLX_GREEN_SIZE = 9; /* number of green component bits */
-public static final int GLX_BLUE_SIZE = 10; /* number of blue component bits */
-public static final int GLX_ALPHA_SIZE = 11; /* number of alpha component bits */
-public static final int GLX_DEPTH_SIZE = 12; /* number of depth bits */
-public static final int GLX_STENCIL_SIZE = 13; /* number of stencil bits */
-public static final int GLX_ACCUM_RED_SIZE = 14; /* number of red accum bits */
-public static final int GLX_ACCUM_GREEN_SIZE = 15; /* number of green accum bits */
-public static final int GLX_ACCUM_BLUE_SIZE = 16; /* number of blue accum bits */
-public static final int GLX_ACCUM_ALPHA_SIZE = 17; /* number of alpha accum bits */
-/*
-** FBConfig-specific attributes
-*/
-public static final int GLX_X_VISUAL_TYPE = 0x22;
-public static final int GLX_CONFIG_CAVEAT = 0x20; /* Like visual_info VISUAL_CAVEAT_EXT */
-public static final int GLX_TRANSPARENT_TYPE = 0x23;
-public static final int GLX_TRANSPARENT_INDEX_VALUE = 0x24;
-public static final int GLX_TRANSPARENT_RED_VALUE = 0x25;
-public static final int GLX_TRANSPARENT_GREEN_VALUE = 0x26;
-public static final int GLX_TRANSPARENT_BLUE_VALUE = 0x27;
-public static final int GLX_TRANSPARENT_ALPHA_VALUE = 0x28;
-public static final int GLX_DRAWABLE_TYPE = 0x8010;
-public static final int GLX_RENDER_TYPE = 0x8011;
-public static final int GLX_X_RENDERABLE = 0x8012;
-public static final int GLX_FBCONFIG_ID = 0x8013;
-public static final int GLX_MAX_PBUFFER_WIDTH = 0x8016;
-public static final int GLX_MAX_PBUFFER_HEIGHT = 0x8017;
-public static final int GLX_MAX_PBUFFER_PIXELS = 0x8018;
-public static final int GLX_VISUAL_ID = 0x800B;
-
-/*
-** Error return values from glXGetConfig. Success is indicated by
-** a value of 0.
-*/
-public static final int GLX_BAD_SCREEN = 1; /* screen # is bad */
-public static final int GLX_BAD_ATTRIBUTE = 2; /* attribute to get is bad */
-public static final int GLX_NO_EXTENSION = 3; /* no glx extension on server */
-public static final int GLX_BAD_VISUAL = 4; /* visual # not known by GLX */
-public static final int GLX_BAD_CONTEXT = 5; /* returned only by import_context EXT? */
-public static final int GLX_BAD_VALUE = 6; /* returned only by glXSwapIntervalSGI? */
-public static final int GLX_BAD_ENUM = 7; /* unused? */
-
-/* FBConfig attribute values */
-
-/*
-** Generic "don't care" value for glX ChooseFBConfig attributes (except
-** GLX_LEVEL)
-*/
-public static final int GLX_DONT_CARE = 0xFFFFFFFF;
-
-/* GLX_RENDER_TYPE bits */
-public static final int GLX_RGBA_BIT = 0x00000001;
-public static final int GLX_COLOR_INDEX_BIT = 0x00000002;
-
-/* GLX_DRAWABLE_TYPE bits */
-public static final int GLX_WINDOW_BIT = 0x00000001;
-public static final int GLX_PIXMAP_BIT = 0x00000002;
-public static final int GLX_PBUFFER_BIT = 0x00000004;
-
-/* GLX_CONFIG_CAVEAT attribute values */
-public static final int GLX_NONE = 0x8000;
-public static final int GLX_SLOW_CONFIG = 0x8001;
-public static final int GLX_NON_CONFORMANT_CONFIG = 0x800D;
-
-/* GLX_X_VISUAL_TYPE attribute values */
-public static final int GLX_TRUE_COLOR = 0x8002;
-public static final int GLX_DIRECT_COLOR = 0x8003;
-public static final int GLX_PSEUDO_COLOR = 0x8004;
-public static final int GLX_STATIC_COLOR = 0x8005;
-public static final int GLX_GRAY_SCALE = 0x8006;
-public static final int GLX_STATIC_GRAY = 0x8007;
-
-/* GLX_TRANSPARENT_TYPE attribute values */
-/* public static final int GLX_NONE 0x8000 */
-public static final int GLX_TRANSPARENT_RGB = 0x8008;
-public static final int GLX_TRANSPARENT_INDEX = 0x8009;
-
-/* glXCreateGLXPbuffer attributes */
-public static final int GLX_PRESERVED_CONTENTS = 0x801B;
-public static final int GLX_LARGEST_PBUFFER = 0x801C;
-public static final int GLX_PBUFFER_HEIGHT = 0x8040; /* New for GLX 1.3 */
-public static final int GLX_PBUFFER_WIDTH = 0x8041; /* New for GLX 1.3 */
-
-/* glXQueryGLXPBuffer attributes */
-public static final int GLX_WIDTH = 0x801D;
-public static final int GLX_HEIGHT = 0x801E;
-public static final int GLX_EVENT_MASK = 0x801F;
-
-/* glXCreateNewContext render_type attribute values */
-public static final int GLX_RGBA_TYPE = 0x8014;
-public static final int GLX_COLOR_INDEX_TYPE = 0x8015;
-
-/* glXQueryContext attributes */
-/* public static final int GLX_FBCONFIG_ID 0x8013 */
-/* public static final int GLX_RENDER_TYPE 0x8011 */
-public static final int GLX_SCREEN = 0x800C;
-
-/* glXSelectEvent event mask bits */
-public static final int GLX_PBUFFER_CLOBBER_MASK = 0x08000000;
-
-/* GLXPbufferClobberEvent event_type values */
-public static final int GLX_DAMAGED = 0x8020;
-public static final int GLX_SAVED = 0x8021;
-
-/* GLXPbufferClobberEvent draw_type values */
-public static final int GLX_WINDOW = 0x8022;
-public static final int GLX_PBUFFER = 0x8023;
-
-/* GLXPbufferClobberEvent buffer_mask bits */
-public static final int GLX_FRONT_LEFT_BUFFER_BIT = 0x00000001;
-public static final int GLX_FRONT_RIGHT_BUFFER_BIT = 0x00000002;
-public static final int GLX_BACK_LEFT_BUFFER_BIT = 0x00000004;
-public static final int GLX_BACK_RIGHT_BUFFER_BIT = 0x00000008;
-public static final int GLX_AUX_BUFFERS_BIT = 0x00000010;
-public static final int GLX_DEPTH_BUFFER_BIT = 0x00000020;
-public static final int GLX_STENCIL_BUFFER_BIT = 0x00000040;
-public static final int GLX_ACCUM_BUFFER_BIT = 0x00000080;
-
-/*
-** Extension return values from glXGetConfig. These are also
-** accepted as parameter values for glXChooseVisual.
-*/
-
-public static final int GLX_X_VISUAL_TYPE_EXT = 0x22; /* visual_info extension type */
-public static final int GLX_TRANSPARENT_TYPE_EXT = 0x23; /* visual_info extension */
-public static final int GLX_TRANSPARENT_INDEX_VALUE_EXT = 0x24; /* visual_info extension */
-public static final int GLX_TRANSPARENT_RED_VALUE_EXT = 0x25; /* visual_info extension */
-public static final int GLX_TRANSPARENT_GREEN_VALUE_EXT = 0x26; /* visual_info extension */
-public static final int GLX_TRANSPARENT_BLUE_VALUE_EXT = 0x27; /* visual_info extension */
-public static final int GLX_TRANSPARENT_ALPHA_VALUE_EXT = 0x28; /* visual_info extension */
-
-/* Property values for visual_type */
-public static final int GLX_TRUE_COLOR_EXT = 0x8002;
-public static final int GLX_DIRECT_COLOR_EXT = 0x8003;
-public static final int GLX_PSEUDO_COLOR_EXT = 0x8004;
-public static final int GLX_STATIC_COLOR_EXT = 0x8005;
-public static final int GLX_GRAY_SCALE_EXT = 0x8006;
-public static final int GLX_STATIC_GRAY_EXT = 0x8007;
-
-/* Property values for transparent pixel */
-public static final int GLX_NONE_EXT = 0x8000;
-public static final int GLX_TRANSPARENT_RGB_EXT = 0x8008;
-public static final int GLX_TRANSPARENT_INDEX_EXT = 0x8009;
-
-/* Property values for visual_rating */
-public static final int GLX_VISUAL_CAVEAT_EXT = 0x20; /* visual_rating extension type */
-public static final int GLX_SLOW_VISUAL_EXT = 0x8001;
-public static final int GLX_NON_CONFORMANT_VISUAL_EXT = 0x800D;
-
-/*
-** Names for attributes to glXGetClientString.
-*/
-public static final int GLX_VENDOR = 0x1;
-public static final int GLX_VERSION = 0x2;
-public static final int GLX_EXTENSIONS = 0x3;
-
-/*
-** Names for attributes to glXQueryContextInfoEXT.
-*/
-public static final int GLX_SHARE_CONTEXT_EXT = 0x800A; /* id of share context */
-public static final int GLX_VISUAL_ID_EXT = 0x800B; /* id of context's visual */
-public static final int GLX_SCREEN_EXT = 0x800C; /* screen number */
-
-/* GLX Extension Strings */
-public static final int GLX_EXT_import_context = 1;
-public static final int GLX_EXT_visual_info = 1;
-public static final int GLX_EXT_visual_rating = 1;
-public static final int GLX_ARB_get_proc_address = 1;
-
-public static final native int glXChooseVisual(int dpy, int screen, int[] attribList);
-public static final native void glXCopyContext(int dpy, int src, int dst, int mask);
-//public static final native int glXCreateContext(int dpy, int vis, int shareList, boolean direct);
-public static final native int glXCreateContext(int dpy, XVisualInfo vis, int shareList, boolean direct);
-public static final native int glXCreateGLXPixmap(int dpy, XVisualInfo vis, int pixmap);
-public static final native void glXDestroyContext(int dpy, int ctx);
-public static final native void glXDestroyGLXPixmap(int dpy, int pix);
-public static final native int glXGetConfig(int dpy, XVisualInfo vis, int attrib, int[] value);
-public static final native int glXGetCurrentContext();
-public static final native int glXGetCurrentDrawable();
-public static final native boolean glXIsDirect(int dpy, int ctx);
-public static final native boolean glXMakeCurrent(int dpy, int drawable, int ctx);
-public static final native boolean glXQueryExtension(int dpy, int[] errorBase, int[] eventBase);
-public static final native boolean glXQueryVersion(int dpy, int[] major, int[] minor);
-public static final native void glXSwapBuffers(int dpy, int drawable);
-public static final native void glXUseXFont(int font, int first, int count, int listBase);
-public static final native void glXWaitGL();
-public static final native void glXWaitX();
-public static final native int glXGetClientString(int dpy, int name);
-public static final native int glXQueryServerString(int dpy, int screen, int name);
-public static final native int glXQueryExtensionsString(int dpy, int screen);
-public static final native void memmove(XVisualInfo dest, int src, int size);
-
-}
diff --git a/bundles/org.eclipse.swt.opengl/motif/org/eclipse/swt/opengl/internal/motif/XVisualInfo.java b/bundles/org.eclipse.swt.opengl/motif/org/eclipse/swt/opengl/internal/motif/XVisualInfo.java
deleted file mode 100644
index d6cba4ad60..0000000000
--- a/bundles/org.eclipse.swt.opengl/motif/org/eclipse/swt/opengl/internal/motif/XVisualInfo.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.opengl.internal.motif;
-
-
-public class XVisualInfo {
- public int visual;
- public int visualid;
- public int screen;
- public int depth;
- public int cclass;
- public int red_mask, green_mask, blue_mask;
- public int colormap_size;
- public int bits_per_rgb;
- public static final int sizeof = 40;
-}
diff --git a/bundles/org.eclipse.swt.opengl/plugin.properties b/bundles/org.eclipse.swt.opengl/plugin.properties
deleted file mode 100644
index 72fe2d9ff6..0000000000
--- a/bundles/org.eclipse.swt.opengl/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2003 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Common Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/cpl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-pluginName = Standard Widget Toolkit OpenGL Bindings
-providerName = Eclipse.org \ No newline at end of file
diff --git a/bundles/org.eclipse.swt.opengl/plugin.xml b/bundles/org.eclipse.swt.opengl/plugin.xml
deleted file mode 100644
index feaf868d11..0000000000
--- a/bundles/org.eclipse.swt.opengl/plugin.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<plugin
- id="org.eclipse.swt.opengl"
- name="%pluginName"
- version="3.1.0"
- provider-name="%providerName">
-
- <runtime>
- <library name="$ws$/swt.jar">
- <export name="*"/>
- <packages prefixes="org.eclipse.swt.opengl"/>
- </library>
- </runtime>
- <requires>
- <import plugin="org.eclipse.swt" export="true"/>
- </requires>
-
-
-</plugin>
diff --git a/bundles/org.eclipse.swt.opengl/win32/library/build.bat b/bundles/org.eclipse.swt.opengl/win32/library/build.bat
deleted file mode 100644
index 7f343981b4..0000000000
--- a/bundles/org.eclipse.swt.opengl/win32/library/build.bat
+++ /dev/null
@@ -1,34 +0,0 @@
-rem *******************************************************************************
-rem Copyright (c) 2000, 2003 IBM Corporation and others.
-rem All rights reserved. This program and the accompanying materials
-rem are made available under the terms of the Common Public License v1.0
-rem which accompanies this distribution, and is available at
-rem http://www.eclipse.org/legal/cpl-v10.html
-rem
-rem Contributors:
-rem IBM Corporation - initial API and implementation
-rem *******************************************************************************
-
-@echo off
-
-IF NOT "%JAVA_HOME%"=="" GOTO MAKE
-
-rem *****
-rem Javah
-rem *****
-set JAVA_HOME=j:\teamswt\swt-builddir\ive\bin
-set path=%JAVA_HOME%;%path%
-
-rem ********
-rem MSVC 6.0
-rem ********
-call k:\dev\products\msvc60\vc98\bin\vcvars32.bat
-
-rem ******
-rem MS-SDK
-rem ******
-set Mssdk=j:\teamswt\swt-builddir\mssdk
-call %mssdk%\setenv.bat
-
-:MAKE
-nmake -f make_win32.mak %1 %2 %3 %4
diff --git a/bundles/org.eclipse.swt.opengl/win32/library/glw.c b/bundles/org.eclipse.swt.opengl/win32/library/glw.c
deleted file mode 100644
index ebe0238cfc..0000000000
--- a/bundles/org.eclipse.swt.opengl/win32/library/glw.c
+++ /dev/null
@@ -1,283 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-#include <windows.h>
-#include <wingdi.h>
-#include "jni.h"
-#include "swt.h"
-#include "structs.h"
-
-#define WGL_NATIVE(func) Java_org_eclipse_swt_opengl_internal_win32_WGL_##func
-
-JNIEXPORT jint JNICALL WGL_NATIVE(ChoosePixelFormat)
- (JNIEnv *env, jclass that, jint arg0, jobject arg1)
-{
- PIXELFORMATDESCRIPTOR _arg1, *lparg1=NULL;
- jint rc;
-
- DEBUG_CALL("ChoosePixelFormat\n")
-
- if (arg1) lparg1 = getPIXELFORMATDESCRIPTORFields(env, arg1, &_arg1);
- rc = (jint)ChoosePixelFormat((HDC)arg0, (CONST PIXELFORMATDESCRIPTOR *)lparg1);
- if (arg1) setPIXELFORMATDESCRIPTORFields(env, arg1, lparg1);
- return rc;
-}
-
-JNIEXPORT jint JNICALL WGL_NATIVE(DescribePixelFormat)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jobject arg3)
-{
- PIXELFORMATDESCRIPTOR _arg3, *lparg3=NULL;
- jint rc;
-
- DEBUG_CALL("DescribePixelFormat\n")
-
- if (arg3) lparg3 = getPIXELFORMATDESCRIPTORFields(env, arg3, &_arg3);
- rc = (jint)DescribePixelFormat((HDC)arg0, arg1, arg2, (LPPIXELFORMATDESCRIPTOR)lparg3);
- if (arg3) setPIXELFORMATDESCRIPTORFields(env, arg3, lparg3);
- return rc;
-}
-
-JNIEXPORT jint JNICALL WGL_NATIVE(GetPixelFormat)
- (JNIEnv *env, jclass that, jint arg0)
-{
- DEBUG_CALL("GetPixelFormat\n")
-
- return (jint)GetPixelFormat((HDC)arg0);
-}
-
-JNIEXPORT jboolean JNICALL WGL_NATIVE(SetPixelFormat)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jobject arg2)
-{
- PIXELFORMATDESCRIPTOR _arg2, *lparg2=NULL;
- jboolean rc;
-
- DEBUG_CALL("SetPixelFormat\n")
-
- if (arg2) lparg2 = getPIXELFORMATDESCRIPTORFields(env, arg2, &_arg2);
- rc = (jboolean)SetPixelFormat((HDC)arg0, arg1, (CONST PIXELFORMATDESCRIPTOR *)lparg2);
- if (arg2) setPIXELFORMATDESCRIPTORFields(env, arg2, lparg2);
- return rc;
-}
-
-JNIEXPORT jboolean JNICALL WGL_NATIVE(SwapBuffers)
- (JNIEnv *env, jclass that, jint arg0)
-{
- DEBUG_CALL("SwapBuffers\n")
-
- return (jboolean)SwapBuffers((HDC)arg0);
-}
-
-JNIEXPORT jboolean JNICALL WGL_NATIVE(wglCopyContext)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2)
-{
- DEBUG_CALL("wglCopyContext\n")
-
- return (jboolean)wglCopyContext((HGLRC)arg0, (HGLRC)arg1, (UINT)arg2);
-}
-
-JNIEXPORT jint JNICALL WGL_NATIVE(wglCreateContext)
- (JNIEnv *env, jclass that, jint arg0)
-{
- DEBUG_CALL("wglCreateContext\n")
-
- return (jint)wglCreateContext((HDC)arg0);
-}
-
-JNIEXPORT jint JNICALL WGL_NATIVE(wglCreateLayerContext)
- (JNIEnv *env, jclass that, jint arg0, jint arg1)
-{
- DEBUG_CALL("wglCreateLayerContext\n")
-
- return (jint)wglCreateLayerContext((HDC)arg0, arg1);
-}
-
-JNIEXPORT jboolean JNICALL WGL_NATIVE(wglDeleteContext)
- (JNIEnv *env, jclass that, jint arg0)
-{
- DEBUG_CALL("wglDeleteContext\n")
-
- return (jboolean)wglDeleteContext((HGLRC)arg0);
-}
-
-JNIEXPORT jboolean JNICALL WGL_NATIVE(wglDescribeLayerPlane)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jint arg3, jobject arg4)
-{
- LAYERPLANEDESCRIPTOR _arg4, *lparg4=NULL;
- jboolean rc;
-
- DEBUG_CALL("wglDescribeLayerPlane\n")
-
- if (arg4) lparg4 = getLAYERPLANEDESCRIPTORFields(env, arg4, &_arg4);
- rc = (jboolean)wglDescribeLayerPlane((HDC)arg0, arg1, arg2, arg3, (LPLAYERPLANEDESCRIPTOR)lparg4);
- if (arg4) setLAYERPLANEDESCRIPTORFields(env, arg4, lparg4);
- return rc;
-}
-
-JNIEXPORT jint JNICALL WGL_NATIVE(wglGetCurrentContext)
- (JNIEnv *env, jclass that)
-{
- DEBUG_CALL("wglGetCurrentContext\n")
-
- return (jint)wglGetCurrentContext();
-}
-
-JNIEXPORT jint JNICALL WGL_NATIVE(wglGetCurrentDC)
- (JNIEnv *env, jclass that)
-{
- DEBUG_CALL("wglGetCurrentDC\n")
-
- return (jint)wglGetCurrentDC();
-}
-
-JNIEXPORT jint JNICALL WGL_NATIVE(wglGetLayerPaletteEntries)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jint arg3, jintArray arg4)
-{
- jint *lparg4=NULL;
- jint rc;
-
- DEBUG_CALL("wglGetLayerPaletteEntries\n")
-
- if (arg4) lparg4 = (*env)->GetIntArrayElements(env, arg4, NULL);
- rc = (jint)wglGetLayerPaletteEntries((HDC)arg0, arg1, arg2, arg3, (COLORREF *)lparg4);
- if (arg4) (*env)->ReleaseIntArrayElements(env, arg4, lparg4, 0);
- return rc;
-}
-
-JNIEXPORT jint JNICALL WGL_NATIVE(wglGetProcAddress)
- (JNIEnv *env, jclass that, jbyteArray arg0)
-{
- jbyte *lparg0=NULL;
- jint rc;
-
- DEBUG_CALL("wglGetProcAddress\n")
-
- if (arg0) lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL);
- rc = (jint)wglGetProcAddress((LPCSTR)lparg0);
- if (arg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
- return rc;
-}
-
-JNIEXPORT jboolean JNICALL WGL_NATIVE(wglMakeCurrent)
- (JNIEnv *env, jclass that, jint arg0, jint arg1)
-{
- DEBUG_CALL("wglMakeCurrent\n")
-
- return (jboolean)wglMakeCurrent((HDC)arg0, (HGLRC)arg1);
-}
-
-JNIEXPORT jboolean JNICALL WGL_NATIVE(wglRealizeLayerPalette)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jboolean arg2)
-{
- DEBUG_CALL("wglRealizeLayerPalette\n")
-
- return (jboolean)wglRealizeLayerPalette((HDC)arg0, arg1, (BOOL)arg2);
-}
-
-JNIEXPORT jint JNICALL WGL_NATIVE(wglSetLayerPaletteEntries)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jint arg3, jintArray arg4)
-{
- jint *lparg4=NULL;
- jint rc;
-
- DEBUG_CALL("wglSetLayerPaletteEntries\n")
-
- if (arg4) lparg4 = (*env)->GetIntArrayElements(env, arg4, NULL);
- rc = (jint)wglSetLayerPaletteEntries((HDC)arg0, arg1, arg2, arg3, (CONST COLORREF *)lparg4);
- if (arg4) (*env)->ReleaseIntArrayElements(env, arg4, lparg4, 0);
- return rc;
-}
-
-JNIEXPORT jboolean JNICALL WGL_NATIVE(wglShareLists)
- (JNIEnv *env, jclass that, jint arg0, jint arg1)
-{
- DEBUG_CALL("wglShareLists\n")
-
- return (jboolean)wglShareLists((HGLRC)arg0, (HGLRC)arg1);
-}
-
-JNIEXPORT jboolean JNICALL WGL_NATIVE(wglSwapLayerBuffers)
- (JNIEnv *env, jclass that, jint arg0, jint arg1)
-{
- DEBUG_CALL("wglSwapLayerBuffers\n")
-
- return (jboolean)wglSwapLayerBuffers((HDC)arg0, arg1);
-}
-
-JNIEXPORT jboolean JNICALL WGL_NATIVE(wglUseFontBitmapsA)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jint arg3)
-{
- DEBUG_CALL("wglUseFontBitmapsA\n")
-
- return (jboolean)wglUseFontBitmapsA((HDC)arg0, arg1, arg2, arg3);
-}
-
-JNIEXPORT jboolean JNICALL WGL_NATIVE(wglUseFontBitmapsW)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jint arg3)
-{
- DEBUG_CALL("wglUseFontBitmapsW\n")
-
- return (jboolean)wglUseFontBitmapsW((HDC)arg0, arg1, arg2, arg3);
-}
-
-JNIEXPORT jboolean JNICALL WGL_NATIVE(wglUseFontOutlinesA)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jint arg3, jfloat arg4, jfloat arg5, jint arg6, jobject arg7)
-{
-// GLYPHMETRICSFLOAT _arg7, *lparg7=NULL;
- jboolean rc;
-
- DEBUG_CALL("wglUseFontOutlinesA\n")
-
-// if (arg7) lparg7 = getGLYPHMETRICSFLOATFields(env, arg7, &_arg7);
- rc = (jboolean)wglUseFontOutlinesA((HDC)arg0, arg1, arg2, arg3, (FLOAT)arg4, (FLOAT)arg5, arg6, (LPGLYPHMETRICSFLOAT)arg7);
-// if (arg7) setGLYPHMETRICSFLOATFields(env, arg7, lparg7);
- return rc;
-}
-
-JNIEXPORT jboolean JNICALL WGL_NATIVE(wglUseFontOutlinesW)
- (JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jint arg3, jfloat arg4, jfloat arg5, jint arg6, jobject arg7)
-{
-// GLYPHMETRICSFLOAT _arg7, *lparg7=NULL;
- jboolean rc;
-
- DEBUG_CALL("wglUseFontOutlinesW\n")
-
-// if (arg7) lparg7 = getGLYPHMETRICSFLOATFields(env, arg7, &_arg7);
- rc = (jboolean)wglUseFontOutlinesW((HDC)arg0, arg1, arg2, arg3, (FLOAT)arg4, (FLOAT)arg5, arg6, (LPGLYPHMETRICSFLOAT)arg7);
-// if (arg7) setGLYPHMETRICSFLOATFields(env, arg7, lparg7);
- return rc;
-}
-
-JNIEXPORT void JNICALL WGL_NATIVE(MoveMemoryW__Lorg_eclipse_swt_opengl_internal_win32_GLYPHMETRICSFLOAT_2II)
- (JNIEnv *env, jclass that, jobject arg0, jint arg1, jint arg2)
-{
- GLYPHMETRICSFLOAT _arg0, *lparg0=NULL;
-
- DEBUG_CALL("MoveMemoryW__Lorg_eclipse_swt_opengl_internal_win32_GLYPHMETRICSFLOAT_2II\n")
- DEBUG_CHECK_NULL(env, arg1)
-
- if (arg0) lparg0 = &_arg0;
- MoveMemory((PVOID)lparg0, (CONST VOID *)arg1, arg2);
- if (arg0) setGLYPHMETRICSFLOATFields(env, arg0, lparg0);
-}
-
-JNIEXPORT void JNICALL WGL_NATIVE(MoveMemoryA__Lorg_eclipse_swt_opengl_internal_win32_GLYPHMETRICSFLOAT_2II)
- (JNIEnv *env, jclass that, jobject arg0, jint arg1, jint arg2)
-{
- GLYPHMETRICSFLOAT _arg0, *lparg0=NULL;
-
- DEBUG_CALL("MoveMemoryA__Lorg_eclipse_swt_opengl_internal_win32_GLYPHMETRICSFLOAT_2II\n")
- DEBUG_CHECK_NULL(env, arg1)
-
- if (arg0) lparg0 = &_arg0;
- MoveMemory((PVOID)lparg0, (CONST VOID *)arg1, arg2);
- if (arg0) setGLYPHMETRICSFLOATFields(env, arg0, lparg0);
-}
-
-
diff --git a/bundles/org.eclipse.swt.opengl/win32/library/make_win32.mak b/bundles/org.eclipse.swt.opengl/win32/library/make_win32.mak
deleted file mode 100644
index 30df1a6cbe..0000000000
--- a/bundles/org.eclipse.swt.opengl/win32/library/make_win32.mak
+++ /dev/null
@@ -1,56 +0,0 @@
-#*******************************************************************************
-# Copyright (c) 2000, 2003 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Common Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/cpl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-#*******************************************************************************
-
-# assumes JAVA_HOME is set in the environment from which nmake is run
-
-APPVER=5.0
-!include <win32.mak>
-
-pgm_ver_str="SWT $(maj_ver).$(min_ver) for Windows"
-timestamp_str=__DATE__\" \"__TIME__\" (EST)\"
-copyright = "Copyright (C) 1999, 2003 IBM Corp. All rights reserved."
-
-SWT_PREFIX=gl
-WS_PREFIX=win32
-SWT_LIB = $(SWT_PREFIX)-$(WS_PREFIX).dll
-
-LINK_LIBS = opengl32.lib glu32.lib gdi32.lib
-
-# note: thoroughly test all examples after changing any optimization flags
-SWT_CDEBUG = #-Zi -Odi
-SWT_LDEBUG = #/DEBUG /DEBUGTYPE:both
-CFLAGS = -c -W3 -G6 -GD -O1 $(SWT_CDEBUG) -nologo -D_X86_=1 -D_WIN32 -D_WIN95 -D_WIN32_WINDOWS=0x0400 -D_MT -MT -DWIN32 -D_WIN32_DCOM /I$(JAVA_HOME)\include /I.
-RCFLAGS = -DSWT_COMMA_VERSION=$(comma_ver)
-LFLAGS = /INCREMENTAL:NO /PDB:NONE /RELEASE /NOLOGO $(SWT_LDEBUG) -entry:_DllMainCRTStartup@12 -dll /BASE:0x10000000 /comment:$(pgm_ver_str) /comment:$(copyright) /DLL
-
-SWT_OBJS = gl.obj glu.obj glw.obj structs.obj
-
-all: $(SWT_LIB)
-
-.c.obj:
- cl $(CFLAGS) $*.c
-
-$(SWT_LIB): $(SWT_OBJS) swt.res
- echo $(LFLAGS) >templrf
- echo $(LINK_LIBS) >>templrf
- echo -machine:IX86 >>templrf
- echo -subsystem:windows >>templrf
- echo -out:$(SWT_LIB) >>templrf
- echo $(SWT_OBJS) >>templrf
- echo swt.res >>templrf
- link @templrf
- del templrf
-
-swt.res:
- rc $(RCFLAGS) -DSWT_ORG_FILENAME=\"$(SWT_LIB)\" -r -fo swt.res swt.rc
-
-clean:
- del *.obj *.res *.dll *.lib *.exp
diff --git a/bundles/org.eclipse.swt.opengl/win32/library/structs.c b/bundles/org.eclipse.swt.opengl/win32/library/structs.c
deleted file mode 100644
index 7c1c26e1a7..0000000000
--- a/bundles/org.eclipse.swt.opengl/win32/library/structs.c
+++ /dev/null
@@ -1,304 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-#include "swt.h"
-#include "structs.h"
-
-typedef struct GLYPHMETRICSFLOAT_FID_CACHE {
- int cached;
- jclass clazz;
- jfieldID gmfCellIncY, gmfCellIncX, gmfptGlyphOrigin_y, gmfptGlyphOrigin_x, gmfBlackBoxY, gmfBlackBoxX;
-} GLYPHMETRICSFLOAT_FID_CACHE;
-typedef GLYPHMETRICSFLOAT_FID_CACHE *PGLYPHMETRICSFLOAT_FID_CACHE;
-
-GLYPHMETRICSFLOAT_FID_CACHE GLYPHMETRICSFLOATFc;
-
-void cacheGLYPHMETRICSFLOATFids(JNIEnv *env, jobject lpObject, PGLYPHMETRICSFLOAT_FID_CACHE lpCache)
-{
- if (lpCache->cached) return;
- lpCache->clazz = (*env)->GetObjectClass(env, lpObject);
- lpCache->gmfCellIncY = (*env)->GetFieldID(env, lpCache->clazz, "gmfCellIncY", "F");
- lpCache->gmfCellIncX = (*env)->GetFieldID(env, lpCache->clazz, "gmfCellIncX", "F");
- lpCache->gmfptGlyphOrigin_y = (*env)->GetFieldID(env, lpCache->clazz, "gmfptGlyphOrigin_y", "F");
- lpCache->gmfptGlyphOrigin_x = (*env)->GetFieldID(env, lpCache->clazz, "gmfptGlyphOrigin_x", "F");
- lpCache->gmfBlackBoxY = (*env)->GetFieldID(env, lpCache->clazz, "gmfBlackBoxY", "F");
- lpCache->gmfBlackBoxX = (*env)->GetFieldID(env, lpCache->clazz, "gmfBlackBoxX", "F");
- lpCache->cached = 1;
-}
-
-GLYPHMETRICSFLOAT *getGLYPHMETRICSFLOATFields(JNIEnv *env, jobject lpObject, GLYPHMETRICSFLOAT *lpStruct)
-{
- PGLYPHMETRICSFLOAT_FID_CACHE lpCache = &GLYPHMETRICSFLOATFc;
- if (!lpCache->cached) cacheGLYPHMETRICSFLOATFids(env, lpObject, lpCache);
- lpStruct->gmfCellIncY = (*env)->GetFloatField(env, lpObject, lpCache->gmfCellIncY);
- lpStruct->gmfCellIncX = (*env)->GetFloatField(env, lpObject, lpCache->gmfCellIncX);
- lpStruct->gmfptGlyphOrigin.y = (*env)->GetFloatField(env, lpObject, lpCache->gmfptGlyphOrigin_y);
- lpStruct->gmfptGlyphOrigin.x = (*env)->GetFloatField(env, lpObject, lpCache->gmfptGlyphOrigin_x);
- lpStruct->gmfBlackBoxY = (*env)->GetFloatField(env, lpObject, lpCache->gmfBlackBoxY);
- lpStruct->gmfBlackBoxX = (*env)->GetFloatField(env, lpObject, lpCache->gmfBlackBoxX);
- return lpStruct;
-}
-
-void setGLYPHMETRICSFLOATFields(JNIEnv *env, jobject lpObject, GLYPHMETRICSFLOAT *lpStruct)
-{
- PGLYPHMETRICSFLOAT_FID_CACHE lpCache = &GLYPHMETRICSFLOATFc;
- if (!lpCache->cached) cacheGLYPHMETRICSFLOATFids(env, lpObject, lpCache);
- (*env)->SetFloatField(env, lpObject, lpCache->gmfCellIncY, (jfloat)lpStruct->gmfCellIncY);
- (*env)->SetFloatField(env, lpObject, lpCache->gmfCellIncX, (jfloat)lpStruct->gmfCellIncX);
- (*env)->SetFloatField(env, lpObject, lpCache->gmfptGlyphOrigin_y, (jfloat)lpStruct->gmfptGlyphOrigin.y);
- (*env)->SetFloatField(env, lpObject, lpCache->gmfptGlyphOrigin_x, (jfloat)lpStruct->gmfptGlyphOrigin.x);
- (*env)->SetFloatField(env, lpObject, lpCache->gmfBlackBoxY, (jfloat)lpStruct->gmfBlackBoxY);
- (*env)->SetFloatField(env, lpObject, lpCache->gmfBlackBoxX, (jfloat)lpStruct->gmfBlackBoxX);
-}
-
-typedef struct LAYERPLANEDESCRIPTOR_FID_CACHE {
- int cached;
- jclass clazz;
- jfieldID crTransparent, bReserved, iLayerPlane, cAuxBuffers, cStencilBits, cDepthBits, cAccumAlphaBits, cAccumBlueBits, cAccumGreenBits, cAccumRedBits, cAccumBits, cAlphaShift, cAlphaBits, cBlueShift, cBlueBits, cGreenShift, cGreenBits, cRedShift, cRedBits, cColorBits, iPixelType, dwFlags, nVersion, nSize;
-} LAYERPLANEDESCRIPTOR_FID_CACHE;
-typedef LAYERPLANEDESCRIPTOR_FID_CACHE *PLAYERPLANEDESCRIPTOR_FID_CACHE;
-
-LAYERPLANEDESCRIPTOR_FID_CACHE LAYERPLANEDESCRIPTORFc;
-
-void cacheLAYERPLANEDESCRIPTORFids(JNIEnv *env, jobject lpObject, PLAYERPLANEDESCRIPTOR_FID_CACHE lpCache)
-{
- if (lpCache->cached) return;
- lpCache->clazz = (*env)->GetObjectClass(env, lpObject);
- lpCache->crTransparent = (*env)->GetFieldID(env, lpCache->clazz, "crTransparent", "I");
- lpCache->bReserved = (*env)->GetFieldID(env, lpCache->clazz, "bReserved", "B");
- lpCache->iLayerPlane = (*env)->GetFieldID(env, lpCache->clazz, "iLayerPlane", "B");
- lpCache->cAuxBuffers = (*env)->GetFieldID(env, lpCache->clazz, "cAuxBuffers", "B");
- lpCache->cStencilBits = (*env)->GetFieldID(env, lpCache->clazz, "cStencilBits", "B");
- lpCache->cDepthBits = (*env)->GetFieldID(env, lpCache->clazz, "cDepthBits", "B");
- lpCache->cAccumAlphaBits = (*env)->GetFieldID(env, lpCache->clazz, "cAccumAlphaBits", "B");
- lpCache->cAccumBlueBits = (*env)->GetFieldID(env, lpCache->clazz, "cAccumBlueBits", "B");
- lpCache->cAccumGreenBits = (*env)->GetFieldID(env, lpCache->clazz, "cAccumGreenBits", "B");
- lpCache->cAccumRedBits = (*env)->GetFieldID(env, lpCache->clazz, "cAccumRedBits", "B");
- lpCache->cAccumBits = (*env)->GetFieldID(env, lpCache->clazz, "cAccumBits", "B");
- lpCache->cAlphaShift = (*env)->GetFieldID(env, lpCache->clazz, "cAlphaShift", "B");
- lpCache->cAlphaBits = (*env)->GetFieldID(env, lpCache->clazz, "cAlphaBits", "B");
- lpCache->cBlueShift = (*env)->GetFieldID(env, lpCache->clazz, "cBlueShift", "B");
- lpCache->cBlueBits = (*env)->GetFieldID(env, lpCache->clazz, "cBlueBits", "B");
- lpCache->cGreenShift = (*env)->GetFieldID(env, lpCache->clazz, "cGreenShift", "B");
- lpCache->cGreenBits = (*env)->GetFieldID(env, lpCache->clazz, "cGreenBits", "B");
- lpCache->cRedShift = (*env)->GetFieldID(env, lpCache->clazz, "cRedShift", "B");
- lpCache->cRedBits = (*env)->GetFieldID(env, lpCache->clazz, "cRedBits", "B");
- lpCache->cColorBits = (*env)->GetFieldID(env, lpCache->clazz, "cColorBits", "B");
- lpCache->iPixelType = (*env)->GetFieldID(env, lpCache->clazz, "iPixelType", "B");
- lpCache->dwFlags = (*env)->GetFieldID(env, lpCache->clazz, "dwFlags", "I");
- lpCache->nVersion = (*env)->GetFieldID(env, lpCache->clazz, "nVersion", "S");
- lpCache->nSize = (*env)->GetFieldID(env, lpCache->clazz, "nSize", "S");
- lpCache->cached = 1;
-}
-
-LAYERPLANEDESCRIPTOR *getLAYERPLANEDESCRIPTORFields(JNIEnv *env, jobject lpObject, LAYERPLANEDESCRIPTOR *lpStruct)
-{
- PLAYERPLANEDESCRIPTOR_FID_CACHE lpCache = &LAYERPLANEDESCRIPTORFc;
- if (!lpCache->cached) cacheLAYERPLANEDESCRIPTORFids(env, lpObject, lpCache);
- lpStruct->crTransparent = (*env)->GetIntField(env, lpObject, lpCache->crTransparent);
- lpStruct->bReserved = (*env)->GetByteField(env, lpObject, lpCache->bReserved);
- lpStruct->iLayerPlane = (*env)->GetByteField(env, lpObject, lpCache->iLayerPlane);
- lpStruct->cAuxBuffers = (*env)->GetByteField(env, lpObject, lpCache->cAuxBuffers);
- lpStruct->cStencilBits = (*env)->GetByteField(env, lpObject, lpCache->cStencilBits);
- lpStruct->cDepthBits = (*env)->GetByteField(env, lpObject, lpCache->cDepthBits);
- lpStruct->cAccumAlphaBits = (*env)->GetByteField(env, lpObject, lpCache->cAccumAlphaBits);
- lpStruct->cAccumBlueBits = (*env)->GetByteField(env, lpObject, lpCache->cAccumBlueBits);
- lpStruct->cAccumGreenBits = (*env)->GetByteField(env, lpObject, lpCache->cAccumGreenBits);
- lpStruct->cAccumRedBits = (*env)->GetByteField(env, lpObject, lpCache->cAccumRedBits);
- lpStruct->cAccumBits = (*env)->GetByteField(env, lpObject, lpCache->cAccumBits);
- lpStruct->cAlphaShift = (*env)->GetByteField(env, lpObject, lpCache->cAlphaShift);
- lpStruct->cAlphaBits = (*env)->GetByteField(env, lpObject, lpCache->cAlphaBits);
- lpStruct->cBlueShift = (*env)->GetByteField(env, lpObject, lpCache->cBlueShift);
- lpStruct->cBlueBits = (*env)->GetByteField(env, lpObject, lpCache->cBlueBits);
- lpStruct->cGreenShift = (*env)->GetByteField(env, lpObject, lpCache->cGreenShift);
- lpStruct->cGreenBits = (*env)->GetByteField(env, lpObject, lpCache->cGreenBits);
- lpStruct->cRedShift = (*env)->GetByteField(env, lpObject, lpCache->cRedShift);
- lpStruct->cRedBits = (*env)->GetByteField(env, lpObject, lpCache->cRedBits);
- lpStruct->cColorBits = (*env)->GetByteField(env, lpObject, lpCache->cColorBits);
- lpStruct->iPixelType = (*env)->GetByteField(env, lpObject, lpCache->iPixelType);
- lpStruct->dwFlags = (*env)->GetIntField(env, lpObject, lpCache->dwFlags);
- lpStruct->nVersion = (*env)->GetShortField(env, lpObject, lpCache->nVersion);
- lpStruct->nSize = (*env)->GetShortField(env, lpObject, lpCache->nSize);
- return lpStruct;
-}
-
-void setLAYERPLANEDESCRIPTORFields(JNIEnv *env, jobject lpObject, LAYERPLANEDESCRIPTOR *lpStruct)
-{
- PLAYERPLANEDESCRIPTOR_FID_CACHE lpCache = &LAYERPLANEDESCRIPTORFc;
- if (!lpCache->cached) cacheLAYERPLANEDESCRIPTORFids(env, lpObject, lpCache);
- (*env)->SetIntField(env, lpObject, lpCache->crTransparent, (jint)lpStruct->crTransparent);
- (*env)->SetByteField(env, lpObject, lpCache->bReserved, (jbyte)lpStruct->bReserved);
- (*env)->SetByteField(env, lpObject, lpCache->iLayerPlane, (jbyte)lpStruct->iLayerPlane);
- (*env)->SetByteField(env, lpObject, lpCache->cAuxBuffers, (jbyte)lpStruct->cAuxBuffers);
- (*env)->SetByteField(env, lpObject, lpCache->cStencilBits, (jbyte)lpStruct->cStencilBits);
- (*env)->SetByteField(env, lpObject, lpCache->cDepthBits, (jbyte)lpStruct->cDepthBits);
- (*env)->SetByteField(env, lpObject, lpCache->cAccumAlphaBits, (jbyte)lpStruct->cAccumAlphaBits);
- (*env)->SetByteField(env, lpObject, lpCache->cAccumBlueBits, (jbyte)lpStruct->cAccumBlueBits);
- (*env)->SetByteField(env, lpObject, lpCache->cAccumGreenBits, (jbyte)lpStruct->cAccumGreenBits);
- (*env)->SetByteField(env, lpObject, lpCache->cAccumRedBits, (jbyte)lpStruct->cAccumRedBits);
- (*env)->SetByteField(env, lpObject, lpCache->cAccumBits, (jbyte)lpStruct->cAccumBits);
- (*env)->SetByteField(env, lpObject, lpCache->cAlphaShift, (jbyte)lpStruct->cAlphaShift);
- (*env)->SetByteField(env, lpObject, lpCache->cAlphaBits, (jbyte)lpStruct->cAlphaBits);
- (*env)->SetByteField(env, lpObject, lpCache->cBlueShift, (jbyte)lpStruct->cBlueShift);
- (*env)->SetByteField(env, lpObject, lpCache->cBlueBits, (jbyte)lpStruct->cBlueBits);
- (*env)->SetByteField(env, lpObject, lpCache->cGreenShift, (jbyte)lpStruct->cGreenShift);
- (*env)->SetByteField(env, lpObject, lpCache->cGreenBits, (jbyte)lpStruct->cGreenBits);
- (*env)->SetByteField(env, lpObject, lpCache->cRedShift, (jbyte)lpStruct->cRedShift);
- (*env)->SetByteField(env, lpObject, lpCache->cRedBits, (jbyte)lpStruct->cRedBits);
- (*env)->SetByteField(env, lpObject, lpCache->cColorBits, (jbyte)lpStruct->cColorBits);
- (*env)->SetByteField(env, lpObject, lpCache->iPixelType, (jbyte)lpStruct->iPixelType);
- (*env)->SetIntField(env, lpObject, lpCache->dwFlags, (jint)lpStruct->dwFlags);
- (*env)->SetShortField(env, lpObject, lpCache->nVersion, (jshort)lpStruct->nVersion);
- (*env)->SetShortField(env, lpObject, lpCache->nSize, (jshort)lpStruct->nSize);
-}
-
-typedef struct POINTFLOAT_FID_CACHE {
- int cached;
- jclass clazz;
- jfieldID y, x;
-} POINTFLOAT_FID_CACHE;
-typedef POINTFLOAT_FID_CACHE *PPOINTFLOAT_FID_CACHE;
-
-POINTFLOAT_FID_CACHE POINTFLOATFc;
-
-void cachePOINTFLOATFids(JNIEnv *env, jobject lpObject, PPOINTFLOAT_FID_CACHE lpCache)
-{
- if (lpCache->cached) return;
- lpCache->clazz = (*env)->GetObjectClass(env, lpObject);
- lpCache->y = (*env)->GetFieldID(env, lpCache->clazz, "y", "F");
- lpCache->x = (*env)->GetFieldID(env, lpCache->clazz, "x", "F");
- lpCache->cached = 1;
-}
-
-POINTFLOAT *getPOINTFLOATFields(JNIEnv *env, jobject lpObject, POINTFLOAT *lpStruct)
-{
- PPOINTFLOAT_FID_CACHE lpCache = &POINTFLOATFc;
- if (!lpCache->cached) cachePOINTFLOATFids(env, lpObject, lpCache);
- lpStruct->y = (*env)->GetFloatField(env, lpObject, lpCache->y);
- lpStruct->x = (*env)->GetFloatField(env, lpObject, lpCache->x);
- return lpStruct;
-}
-
-void setPOINTFLOATFields(JNIEnv *env, jobject lpObject, POINTFLOAT *lpStruct)
-{
- PPOINTFLOAT_FID_CACHE lpCache = &POINTFLOATFc;
- if (!lpCache->cached) cachePOINTFLOATFids(env, lpObject, lpCache);
- (*env)->SetFloatField(env, lpObject, lpCache->y, (jfloat)lpStruct->y);
- (*env)->SetFloatField(env, lpObject, lpCache->x, (jfloat)lpStruct->x);
-}
-
-typedef struct PIXELFORMATDESCRIPTOR_FID_CACHE {
- int cached;
- jclass clazz;
- jfieldID dwDamageMask, dwVisibleMask, dwLayerMask, bReserved, iLayerType, cAuxBuffers, cStencilBits, cDepthBits, cAccumAlphaBits, cAccumBlueBits, cAccumGreenBits, cAccumRedBits, cAccumBits, cAlphaShift, cAlphaBits, cBlueShift, cBlueBits, cGreenShift, cGreenBits, cRedShift, cRedBits, cColorBits, iPixelType, dwFlags, nVersion, nSize;
-} PIXELFORMATDESCRIPTOR_FID_CACHE;
-typedef PIXELFORMATDESCRIPTOR_FID_CACHE *PPIXELFORMATDESCRIPTOR_FID_CACHE;
-
-PIXELFORMATDESCRIPTOR_FID_CACHE PIXELFORMATDESCRIPTORFc;
-
-void cachePIXELFORMATDESCRIPTORFids(JNIEnv *env, jobject lpObject, PPIXELFORMATDESCRIPTOR_FID_CACHE lpCache)
-{
- if (lpCache->cached) return;
- lpCache->clazz = (*env)->GetObjectClass(env, lpObject);
- lpCache->dwDamageMask = (*env)->GetFieldID(env, lpCache->clazz, "dwDamageMask", "I");
- lpCache->dwVisibleMask = (*env)->GetFieldID(env, lpCache->clazz, "dwVisibleMask", "I");
- lpCache->dwLayerMask = (*env)->GetFieldID(env, lpCache->clazz, "dwLayerMask", "I");
- lpCache->bReserved = (*env)->GetFieldID(env, lpCache->clazz, "bReserved", "B");
- lpCache->iLayerType = (*env)->GetFieldID(env, lpCache->clazz, "iLayerType", "B");
- lpCache->cAuxBuffers = (*env)->GetFieldID(env, lpCache->clazz, "cAuxBuffers", "B");
- lpCache->cStencilBits = (*env)->GetFieldID(env, lpCache->clazz, "cStencilBits", "B");
- lpCache->cDepthBits = (*env)->GetFieldID(env, lpCache->clazz, "cDepthBits", "B");
- lpCache->cAccumAlphaBits = (*env)->GetFieldID(env, lpCache->clazz, "cAccumAlphaBits", "B");
- lpCache->cAccumBlueBits = (*env)->GetFieldID(env, lpCache->clazz, "cAccumBlueBits", "B");
- lpCache->cAccumGreenBits = (*env)->GetFieldID(env, lpCache->clazz, "cAccumGreenBits", "B");
- lpCache->cAccumRedBits = (*env)->GetFieldID(env, lpCache->clazz, "cAccumRedBits", "B");
- lpCache->cAccumBits = (*env)->GetFieldID(env, lpCache->clazz, "cAccumBits", "B");
- lpCache->cAlphaShift = (*env)->GetFieldID(env, lpCache->clazz, "cAlphaShift", "B");
- lpCache->cAlphaBits = (*env)->GetFieldID(env, lpCache->clazz, "cAlphaBits", "B");
- lpCache->cBlueShift = (*env)->GetFieldID(env, lpCache->clazz, "cBlueShift", "B");
- lpCache->cBlueBits = (*env)->GetFieldID(env, lpCache->clazz, "cBlueBits", "B");
- lpCache->cGreenShift = (*env)->GetFieldID(env, lpCache->clazz, "cGreenShift", "B");
- lpCache->cGreenBits = (*env)->GetFieldID(env, lpCache->clazz, "cGreenBits", "B");
- lpCache->cRedShift = (*env)->GetFieldID(env, lpCache->clazz, "cRedShift", "B");
- lpCache->cRedBits = (*env)->GetFieldID(env, lpCache->clazz, "cRedBits", "B");
- lpCache->cColorBits = (*env)->GetFieldID(env, lpCache->clazz, "cColorBits", "B");
- lpCache->iPixelType = (*env)->GetFieldID(env, lpCache->clazz, "iPixelType", "B");
- lpCache->dwFlags = (*env)->GetFieldID(env, lpCache->clazz, "dwFlags", "I");
- lpCache->nVersion = (*env)->GetFieldID(env, lpCache->clazz, "nVersion", "S");
- lpCache->nSize = (*env)->GetFieldID(env, lpCache->clazz, "nSize", "S");
- lpCache->cached = 1;
-}
-
-PIXELFORMATDESCRIPTOR *getPIXELFORMATDESCRIPTORFields(JNIEnv *env, jobject lpObject, PIXELFORMATDESCRIPTOR *lpStruct)
-{
- PPIXELFORMATDESCRIPTOR_FID_CACHE lpCache = &PIXELFORMATDESCRIPTORFc;
- if (!lpCache->cached) cachePIXELFORMATDESCRIPTORFids(env, lpObject, lpCache);
- lpStruct->dwDamageMask = (*env)->GetIntField(env, lpObject, lpCache->dwDamageMask);
- lpStruct->dwVisibleMask = (*env)->GetIntField(env, lpObject, lpCache->dwVisibleMask);
- lpStruct->dwLayerMask = (*env)->GetIntField(env, lpObject, lpCache->dwLayerMask);
- lpStruct->bReserved = (*env)->GetByteField(env, lpObject, lpCache->bReserved);
- lpStruct->iLayerType = (*env)->GetByteField(env, lpObject, lpCache->iLayerType);
- lpStruct->cAuxBuffers = (*env)->GetByteField(env, lpObject, lpCache->cAuxBuffers);
- lpStruct->cStencilBits = (*env)->GetByteField(env, lpObject, lpCache->cStencilBits);
- lpStruct->cDepthBits = (*env)->GetByteField(env, lpObject, lpCache->cDepthBits);
- lpStruct->cAccumAlphaBits = (*env)->GetByteField(env, lpObject, lpCache->cAccumAlphaBits);
- lpStruct->cAccumBlueBits = (*env)->GetByteField(env, lpObject, lpCache->cAccumBlueBits);
- lpStruct->cAccumGreenBits = (*env)->GetByteField(env, lpObject, lpCache->cAccumGreenBits);
- lpStruct->cAccumRedBits = (*env)->GetByteField(env, lpObject, lpCache->cAccumRedBits);
- lpStruct->cAccumBits = (*env)->GetByteField(env, lpObject, lpCache->cAccumBits);
- lpStruct->cAlphaShift = (*env)->GetByteField(env, lpObject, lpCache->cAlphaShift);
- lpStruct->cAlphaBits = (*env)->GetByteField(env, lpObject, lpCache->cAlphaBits);
- lpStruct->cBlueShift = (*env)->GetByteField(env, lpObject, lpCache->cBlueShift);
- lpStruct->cBlueBits = (*env)->GetByteField(env, lpObject, lpCache->cBlueBits);
- lpStruct->cGreenShift = (*env)->GetByteField(env, lpObject, lpCache->cGreenShift);
- lpStruct->cGreenBits = (*env)->GetByteField(env, lpObject, lpCache->cGreenBits);
- lpStruct->cRedShift = (*env)->GetByteField(env, lpObject, lpCache->cRedShift);
- lpStruct->cRedBits = (*env)->GetByteField(env, lpObject, lpCache->cRedBits);
- lpStruct->cColorBits = (*env)->GetByteField(env, lpObject, lpCache->cColorBits);
- lpStruct->iPixelType = (*env)->GetByteField(env, lpObject, lpCache->iPixelType);
- lpStruct->dwFlags = (*env)->GetIntField(env, lpObject, lpCache->dwFlags);
- lpStruct->nVersion = (*env)->GetShortField(env, lpObject, lpCache->nVersion);
- lpStruct->nSize = (*env)->GetShortField(env, lpObject, lpCache->nSize);
- return lpStruct;
-}
-
-void setPIXELFORMATDESCRIPTORFields(JNIEnv *env, jobject lpObject, PIXELFORMATDESCRIPTOR *lpStruct)
-{
- PPIXELFORMATDESCRIPTOR_FID_CACHE lpCache = &PIXELFORMATDESCRIPTORFc;
- if (!lpCache->cached) cachePIXELFORMATDESCRIPTORFids(env, lpObject, lpCache);
- (*env)->SetIntField(env, lpObject, lpCache->dwDamageMask, (jint)lpStruct->dwDamageMask);
- (*env)->SetIntField(env, lpObject, lpCache->dwVisibleMask, (jint)lpStruct->dwVisibleMask);
- (*env)->SetIntField(env, lpObject, lpCache->dwLayerMask, (jint)lpStruct->dwLayerMask);
- (*env)->SetByteField(env, lpObject, lpCache->bReserved, (jbyte)lpStruct->bReserved);
- (*env)->SetByteField(env, lpObject, lpCache->iLayerType, (jbyte)lpStruct->iLayerType);
- (*env)->SetByteField(env, lpObject, lpCache->cAuxBuffers, (jbyte)lpStruct->cAuxBuffers);
- (*env)->SetByteField(env, lpObject, lpCache->cStencilBits, (jbyte)lpStruct->cStencilBits);
- (*env)->SetByteField(env, lpObject, lpCache->cDepthBits, (jbyte)lpStruct->cDepthBits);
- (*env)->SetByteField(env, lpObject, lpCache->cAccumAlphaBits, (jbyte)lpStruct->cAccumAlphaBits);
- (*env)->SetByteField(env, lpObject, lpCache->cAccumBlueBits, (jbyte)lpStruct->cAccumBlueBits);
- (*env)->SetByteField(env, lpObject, lpCache->cAccumGreenBits, (jbyte)lpStruct->cAccumGreenBits);
- (*env)->SetByteField(env, lpObject, lpCache->cAccumRedBits, (jbyte)lpStruct->cAccumRedBits);
- (*env)->SetByteField(env, lpObject, lpCache->cAccumBits, (jbyte)lpStruct->cAccumBits);
- (*env)->SetByteField(env, lpObject, lpCache->cAlphaShift, (jbyte)lpStruct->cAlphaShift);
- (*env)->SetByteField(env, lpObject, lpCache->cAlphaBits, (jbyte)lpStruct->cAlphaBits);
- (*env)->SetByteField(env, lpObject, lpCache->cBlueShift, (jbyte)lpStruct->cBlueShift);
- (*env)->SetByteField(env, lpObject, lpCache->cBlueBits, (jbyte)lpStruct->cBlueBits);
- (*env)->SetByteField(env, lpObject, lpCache->cGreenShift, (jbyte)lpStruct->cGreenShift);
- (*env)->SetByteField(env, lpObject, lpCache->cGreenBits, (jbyte)lpStruct->cGreenBits);
- (*env)->SetByteField(env, lpObject, lpCache->cRedShift, (jbyte)lpStruct->cRedShift);
- (*env)->SetByteField(env, lpObject, lpCache->cRedBits, (jbyte)lpStruct->cRedBits);
- (*env)->SetByteField(env, lpObject, lpCache->cColorBits, (jbyte)lpStruct->cColorBits);
- (*env)->SetByteField(env, lpObject, lpCache->iPixelType, (jbyte)lpStruct->iPixelType);
- (*env)->SetIntField(env, lpObject, lpCache->dwFlags, (jint)lpStruct->dwFlags);
- (*env)->SetShortField(env, lpObject, lpCache->nVersion, (jshort)lpStruct->nVersion);
- (*env)->SetShortField(env, lpObject, lpCache->nSize, (jshort)lpStruct->nSize);
-}
-
diff --git a/bundles/org.eclipse.swt.opengl/win32/library/structs.h b/bundles/org.eclipse.swt.opengl/win32/library/structs.h
deleted file mode 100644
index 031dadfc3b..0000000000
--- a/bundles/org.eclipse.swt.opengl/win32/library/structs.h
+++ /dev/null
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-#include <windows.h>
-
-GLYPHMETRICSFLOAT *getGLYPHMETRICSFLOATFields(JNIEnv *env, jobject lpObject, GLYPHMETRICSFLOAT *lpStruct);
-void setGLYPHMETRICSFLOATFields(JNIEnv *env, jobject lpObject, GLYPHMETRICSFLOAT *lpStruct);
-
-LAYERPLANEDESCRIPTOR *getLAYERPLANEDESCRIPTORFields(JNIEnv *env, jobject lpObject, LAYERPLANEDESCRIPTOR *lpStruct);
-void setLAYERPLANEDESCRIPTORFields(JNIEnv *env, jobject lpObject, LAYERPLANEDESCRIPTOR *lpStruct);
-
-POINTFLOAT *getPOINTFLOATFields(JNIEnv *env, jobject lpObject, POINTFLOAT *lpStruct);
-void setPOINTFLOATFields(JNIEnv *env, jobject lpObject, POINTFLOAT *lpStruct);
-
-PIXELFORMATDESCRIPTOR *getPIXELFORMATDESCRIPTORFields(JNIEnv *env, jobject lpObject, PIXELFORMATDESCRIPTOR *lpStruct);
-void setPIXELFORMATDESCRIPTORFields(JNIEnv *env, jobject lpObject, PIXELFORMATDESCRIPTOR *lpStruct);
-
diff --git a/bundles/org.eclipse.swt.opengl/win32/library/swt.rc b/bundles/org.eclipse.swt.opengl/win32/library/swt.rc
deleted file mode 100644
index 9cd71aad57..0000000000
--- a/bundles/org.eclipse.swt.opengl/win32/library/swt.rc
+++ /dev/null
@@ -1,67 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-#include "windows.h"
-
-VS_VERSION_INFO VERSIONINFO
- PRODUCTVERSION 0,0,0,0
- FILEFLAGSMASK 0x3fL
-#ifdef _DEBUG
- FILEFLAGS 0x1L
-#else
- FILEFLAGS 0x0L
-#endif
- FILEOS 0x40000L
- FILETYPE 0x2L
- FILESUBTYPE 0x0L
-BEGIN
- BLOCK "StringFileInfo"
- BEGIN
- BLOCK "040904b0"
- BEGIN
- VALUE "CompanyName", "IBM Corporation\0"
- VALUE "FileDescription", "Standard Widget Toolkit\0"
- VALUE "InternalName", "SWT\0"
- VALUE "LegalCopyright", "© Copyright 2000, 2003 IBM Corp. All Rights Reserved.\0"
- VALUE "OriginalFilename", SWT_ORG_FILENAME
- VALUE "ProductName", "\0"
- VALUE "ProductVersion", "0,0,0,0\0"
- END
- END
- BLOCK "VarFileInfo"
- BEGIN
- VALUE "Translation", 0x409, 1200
- END
-END
-
-/* SHMENUBAR Pocket PC
- * ID_MENU SHMENUBAR DISCARDABLE
- * BEGIN
- * ID_MENU, 1,
- * IMAGE_NONE, ID_MENU_ITEM1, 0, 0,
- * 0, 0, 0,
- * END
- * ID_MENU MENU DISCARDABLE
- * BEGIN
- * MENUITEM "", ID_MENU_ITEM1
- * END
- */
-100 RCDATA DISCARDABLE
-BEGIN
- 100, 1,
- -2, 101, 0, 0,
- 0, 0, 0,
-END
-
-100 MENU DISCARDABLE
-BEGIN
- MENUITEM "", 101
-END \ No newline at end of file
diff --git a/bundles/org.eclipse.swt.opengl/win32/org/eclipse/swt/opengl/GLContext.java b/bundles/org.eclipse.swt.opengl/win32/org/eclipse/swt/opengl/GLContext.java
deleted file mode 100644
index b2863df75c..0000000000
--- a/bundles/org.eclipse.swt.opengl/win32/org/eclipse/swt/opengl/GLContext.java
+++ /dev/null
@@ -1,313 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.opengl;
-
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.opengl.internal.win32.*;
-import org.eclipse.swt.internal.win32.*;
-
-/**
- * Instances of <code>GLContext</code> are used to draw on swt <code>Drawable</code>s
- * through invocations of provided OpenGL functions.
- * <p>
- * Application code must explicitly invoke the <code>GLContext.dispose ()</code>
- * method to release the operating system resources managed by each instance
- * when those instances are no longer required. This is <em>particularly</em>
- * important on Windows95 and Windows98 where the operating system has a limited
- * number of device contexts available.
- * </p>
- */
-public class GLContext {
- int handle;
- int hDC;
- GCData data;
- Drawable drawable;
- int selectBufferPtr = 0;
-
- static final int MSB_FIRST = 1;
- static final int LSB_FIRST = 2;
-
- /**
- * Constructs a new instance of this class which has been
- * configured to draw on the specified drawable.
- * <p>
- * You must dispose the <code>GLContext</code> when it is no longer required.
- * </p>
- *
- * @param drawable the drawable to draw on
- * @exception IllegalArgumentException <ul>
- * <li>ERROR_NULL_ARGUMENT - if the drawable is null</li>
- * </ul>
- * @exception SWTError <ul>
- * <li>ERROR_NO_HANDLES if a handle could not be obtained for gc creation</li>
- * <li>ERROR_UNSUPPORTED_DEPTH - if the current display depth is not supported</li>
- * </ul>
- */
- public GLContext (Drawable drawable) {
- if (drawable == null) SWT.error (SWT.ERROR_NULL_ARGUMENT);
- this.drawable = drawable;
- this.data = new GCData ();
- hDC = drawable.internal_new_GC (data);
- if (hDC == 0) SWT.error (SWT.ERROR_NO_HANDLES);
- int bits = OS.GetDeviceCaps (hDC, OS.BITSPIXEL);
- int planes = OS.GetDeviceCaps (hDC, OS.PLANES);
- int depth = bits * planes;
- PIXELFORMATDESCRIPTOR pfd = new PIXELFORMATDESCRIPTOR ();
- pfd.nSize = (short) PIXELFORMATDESCRIPTOR.sizeof;
- pfd.nVersion = 1;
- pfd.dwFlags =
- WGL.PFD_DRAW_TO_WINDOW
- | WGL.PFD_SUPPORT_OPENGL
- | WGL.PFD_DOUBLEBUFFER;
- pfd.dwLayerMask = WGL.PFD_MAIN_PLANE;
- pfd.iPixelType = (byte) WGL.PFD_TYPE_RGBA;
- pfd.cColorBits = (byte) depth;
- pfd.cDepthBits = (byte) depth;
- pfd.cAccumBits = 0;
- pfd.cStencilBits = 0;
- int pixelFormat = WGL.ChoosePixelFormat (hDC, pfd);
- if (pixelFormat == 0) {
- drawable.internal_dispose_GC (hDC, data);
- SWT.error (SWT.ERROR_UNSUPPORTED_DEPTH);
- }
- if (!WGL.SetPixelFormat (hDC, pixelFormat, pfd)) {
- drawable.internal_dispose_GC (hDC, data);
- SWT.error (SWT.ERROR_UNSUPPORTED_DEPTH);
- }
- handle = WGL.wglCreateContext (hDC);
- if (handle == 0) SWT.error (SWT.ERROR_NO_HANDLES);
- }
-
- public ImageData convertImageData (ImageData source) {
- PaletteData palette = new PaletteData (0xff0000, 0xff00, 0xff);
- ImageData newSource = new ImageData (source.width, source.height, 24, palette);
-
- ImageDataUtil.blit (
- 1,
- source.data,
- source.depth,
- source.bytesPerLine,
- (source.depth != 16) ? MSB_FIRST : LSB_FIRST,
- 0,
- 0,
- source.width,
- source.height,
- source.palette.redMask,
- source.palette.greenMask,
- source.palette.blueMask,
- 255,
- null,
- 0,
- 0,
- 0,
- newSource.data,
- newSource.depth,
- newSource.bytesPerLine,
- (newSource.depth != 16) ? MSB_FIRST : LSB_FIRST,
- 0,
- 0,
- newSource.width,
- newSource.height,
- newSource.palette.redMask,
- newSource.palette.greenMask,
- newSource.palette.blueMask,
- false,
- true);
-
- return newSource;
- }
-
- /**
- * Disposes of the operating system resources associated with
- * the receiver. Applications must dispose of all <code>GLContext</code>s
- * that they allocate.
- */
- public void dispose () {
- if (handle == 0) return;
- if (WGL.wglGetCurrentContext () == handle) {
- WGL.wglMakeCurrent (0, 0);
- }
- WGL.wglDeleteContext (handle);
- handle = 0;
-
- // drawable may be disposed
- try {
- drawable.internal_dispose_GC (hDC, data);
- } catch (SWTException e) {
- }
- int hHeap = OS.GetProcessHeap ();
- if (selectBufferPtr != 0) {
- OS.HeapFree (hHeap, 0, selectBufferPtr);
- }
- hDC = 0;
- drawable = null;
- data.device = null;
- data = null;
- }
-
- public int[] getSelectBuffer (int selectBufferPtr, int[] selectBuffer) {
- OS.MoveMemory (selectBuffer, selectBufferPtr, selectBuffer.length * 4);
- return selectBuffer;
- }
-
- public int getSelectBufferPtr (int[] selectBuffer) {
- if (selectBufferPtr == 0) {
- int hHeap = OS.GetProcessHeap ();
- selectBufferPtr =
- OS.HeapAlloc (
- hHeap,
- OS.HEAP_ZERO_MEMORY,
- selectBuffer.length * 4);
- }
- OS.MoveMemory (selectBufferPtr, selectBuffer, selectBuffer.length * 4);
- return selectBufferPtr;
- }
-
- /**
- * Returns a boolean indicating whether the receiver is the current
- * <code>GLContext</code>.
- *
- * @return true if the receiver is the current <code>GLContext</code>,
- * false otherwise
- * @exception SWTError <ul>
- * <li>ERROR_GRAPHIC_DISPOSED if the receiver is disposed</li>
- * </ul>
- */
- public boolean isCurrent () {
- if (isDisposed ()) SWT.error (SWT.ERROR_GRAPHIC_DISPOSED);
- return WGL.wglGetCurrentContext () == handle;
- }
-
- /**
- * Returns a boolean indicating whether the <code>GLContext</code> has been
- * disposed.
- * <p>
- * This method gets the dispose state for the <code>GLContext</code>.
- * When a <code>GLContext</code> has been disposed, it is an error to
- * invoke any other method using the <code>GLContext</code>.
- *
- * @return true if the <code>GLContext</code> is disposed, false otherwise
- */
- public boolean isDisposed () {
- return handle == 0;
- }
-
- /**
- * Loads the specified bitmap font.
- *
- * @param fdata
- * @param device
- * @param base
- * @param first
- * @param count
- */
- public void loadBitmapFont (FontData fdata, Device device, int base, int first, int count) {
- Font font = new Font (device, fdata);
- int oldFont = OS.SelectObject (hDC, font.handle);
- WGL.wglUseFontBitmaps (hDC, first, count, base);
- OS.SelectObject (hDC, oldFont);
- font.dispose ();
- }
-
- /**
- * Loads the specified outline font.
- *
- * @param fdata
- * @param device
- * @param base
- * @param first
- * @param count
- * @param deviation
- * @param extrusion
- * @param format
- * @param lpgmf
- */
- public void loadOutlineFont (FontData fdata, Device device, int base, int first,
- int count, float deviation, float extrusion, int format, GLYPHMETRICSFLOAT[] lpgmf) {
- int ptr = 0;
- int hHeap = 0;
- if (lpgmf != null && lpgmf.length == count + 1) {
- hHeap = OS.GetProcessHeap ();
- ptr =
- OS.HeapAlloc (
- hHeap,
- OS.HEAP_ZERO_MEMORY,
- count * GLYPHMETRICSFLOAT.sizeof);
- }
-
- if (format == GL.GL_POLYGON) {
- format = WGL.WGL_FONT_POLYGONS;
- }
- if (format == GL.GL_LINE) {
- format = WGL.WGL_FONT_LINES;
- }
-
- Font font = new Font (device, fdata);
- int oldFont = OS.SelectObject (hDC, font.handle);
- WGL.wglUseFontOutlines (hDC, first, count, base, deviation, extrusion, format, ptr);
- OS.SelectObject (hDC, oldFont);
- font.dispose ();
- if (ptr != 0) {
- int sizeof = GLYPHMETRICSFLOAT.sizeof;
- for (int i = 0; i < lpgmf.length; i++) {
- WGL.MoveMemory (lpgmf [i], ptr + (sizeof * i), sizeof);
- };
- OS.HeapFree (hHeap, 0, ptr);
- }
- }
-
- /**
- * Resizes the receiver.
- *
- * @param x
- * @param y
- * @param width
- * @param height
- */
- public void resize (int x, int y, int width, int height) {
- if (height == 0) height = 1;
- GL.glViewport (0, 0, width, height);
- float nRange = 200.0f;
- GL.glMatrixMode (GL.GL_PROJECTION);
- GL.glLoadIdentity ();
- // load projection
- GLU.gluPerspective (45.0f, (float) width / (float) height, 0.1f, 100.0f);
- GL.glMatrixMode (GL.GL_MODELVIEW);
- GL.glLoadIdentity ();
- }
-
- /**
- * Sets the receiver to be the current <code>GLContext</code>.
- *
- * @exception SWTError <ul>
- * <li>ERROR_GRAPHIC_DISPOSED if the receiver is disposed</li>
- * </ul>
- */
- public void setCurrent () {
- if (isDisposed ()) SWT.error (SWT.ERROR_GRAPHIC_DISPOSED);
- if (WGL.wglGetCurrentContext () == handle) return;
- WGL.wglMakeCurrent (hDC, handle);
- }
-
- /**
- * Swaps the receiver's buffers.
- *
- * @exception SWTError <ul>
- * <li>ERROR_GRAPHIC_DISPOSED if the receiver is disposed</li>
- * </ul>
- */
- public void swapBuffers () {
- if (isDisposed ()) SWT.error (SWT.ERROR_GRAPHIC_DISPOSED);
- WGL.SwapBuffers (hDC);
- }
-}
diff --git a/bundles/org.eclipse.swt.opengl/win32/org/eclipse/swt/opengl/internal/win32/LAYERPLANEDESCRIPTOR.java b/bundles/org.eclipse.swt.opengl/win32/org/eclipse/swt/opengl/internal/win32/LAYERPLANEDESCRIPTOR.java
deleted file mode 100644
index ec410a1f54..0000000000
--- a/bundles/org.eclipse.swt.opengl/win32/org/eclipse/swt/opengl/internal/win32/LAYERPLANEDESCRIPTOR.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.opengl.internal.win32;
-
-
-public class LAYERPLANEDESCRIPTOR {
- public short nSize;
- public short nVersion;
- public int dwFlags;
- public byte iPixelType;
- public byte cColorBits;
- public byte cRedBits;
- public byte cRedShift;
- public byte cGreenBits;
- public byte cGreenShift;
- public byte cBlueBits;
- public byte cBlueShift;
- public byte cAlphaBits;
- public byte cAlphaShift;
- public byte cAccumBits;
- public byte cAccumRedBits;
- public byte cAccumGreenBits;
- public byte cAccumBlueBits;
- public byte cAccumAlphaBits;
- public byte cDepthBits;
- public byte cStencilBits;
- public byte cAuxBuffers;
- public byte iLayerPlane;
- public byte bReserved;
- public int crTransparent;
- public static final int sizeof = 36;
-}
diff --git a/bundles/org.eclipse.swt.opengl/win32/org/eclipse/swt/opengl/internal/win32/PIXELFORMATDESCRIPTOR.java b/bundles/org.eclipse.swt.opengl/win32/org/eclipse/swt/opengl/internal/win32/PIXELFORMATDESCRIPTOR.java
deleted file mode 100644
index 254f868f85..0000000000
--- a/bundles/org.eclipse.swt.opengl/win32/org/eclipse/swt/opengl/internal/win32/PIXELFORMATDESCRIPTOR.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.opengl.internal.win32;
-
-
-public class PIXELFORMATDESCRIPTOR {
- public short nSize;
- public short nVersion;
- public int dwFlags;
- public byte iPixelType;
- public byte cColorBits;
- public byte cRedBits;
- public byte cRedShift;
- public byte cGreenBits;
- public byte cGreenShift;
- public byte cBlueBits;
- public byte cBlueShift;
- public byte cAlphaBits;
- public byte cAlphaShift;
- public byte cAccumBits;
- public byte cAccumRedBits;
- public byte cAccumGreenBits;
- public byte cAccumBlueBits;
- public byte cAccumAlphaBits;
- public byte cDepthBits;
- public byte cStencilBits;
- public byte cAuxBuffers;
- public byte iLayerType;
- public byte bReserved;
- public int dwLayerMask;
- public int dwVisibleMask;
- public int dwDamageMask;
- public static final int sizeof = 40;
-}
diff --git a/bundles/org.eclipse.swt.opengl/win32/org/eclipse/swt/opengl/internal/win32/POINTFLOAT.java b/bundles/org.eclipse.swt.opengl/win32/org/eclipse/swt/opengl/internal/win32/POINTFLOAT.java
deleted file mode 100644
index b0601f1953..0000000000
--- a/bundles/org.eclipse.swt.opengl/win32/org/eclipse/swt/opengl/internal/win32/POINTFLOAT.java
+++ /dev/null
@@ -1,18 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.opengl.internal.win32;
-
-
-public class POINTFLOAT {
- public float x;
- public float y;
- public static final int sizeof = 8;
-}
diff --git a/bundles/org.eclipse.swt.opengl/win32/org/eclipse/swt/opengl/internal/win32/WGL.java b/bundles/org.eclipse.swt.opengl/win32/org/eclipse/swt/opengl/internal/win32/WGL.java
deleted file mode 100644
index 000f528d2d..0000000000
--- a/bundles/org.eclipse.swt.opengl/win32/org/eclipse/swt/opengl/internal/win32/WGL.java
+++ /dev/null
@@ -1,142 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.opengl.internal.win32;
-
-
-import org.eclipse.swt.opengl.*;
-import org.eclipse.swt.opengl.Library;
-import org.eclipse.swt.internal.win32.OS;
-
-public class WGL {
-
-static {
- Library.loadLibrary("gl");
-}
-
-public static final int WGL_FONT_LINES = 0;
-public static final int WGL_FONT_POLYGONS = 1;
-
-/* LAYERPLANEDESCRIPTOR flags */
-public static final int LPD_DOUBLEBUFFER = 0x00000001;
-public static final int LPD_STEREO = 0x00000002;
-public static final int LPD_SUPPORT_GDI = 0x00000010;
-public static final int LPD_SUPPORT_OPENGL = 0x00000020;
-public static final int LPD_SHARE_DEPTH = 0x00000040;
-public static final int LPD_SHARE_STENCIL = 0x00000080;
-public static final int LPD_SHARE_ACCUM = 0x00000100;
-public static final int LPD_SWAP_EXCHANGE = 0x00000200;
-public static final int LPD_SWAP_COPY = 0x00000400;
-public static final int LPD_TRANSPARENT = 0x00001000;
-
-public static final int LPD_TYPE_RGBA = 0;
-public static final int LPD_TYPE_COLORINDEX = 1;
-
-/* wglSwapLayerBuffers flags */
-public static final int WGL_SWAP_MAIN_PLANE = 0x00000001;
-public static final int WGL_SWAP_OVERLAY1 = 0x00000002;
-public static final int WGL_SWAP_OVERLAY2 = 0x00000004;
-public static final int WGL_SWAP_OVERLAY3 = 0x00000008;
-public static final int WGL_SWAP_OVERLAY4 = 0x00000010;
-public static final int WGL_SWAP_OVERLAY5 = 0x00000020;
-public static final int WGL_SWAP_OVERLAY6 = 0x00000040;
-public static final int WGL_SWAP_OVERLAY7 = 0x00000080;
-public static final int WGL_SWAP_OVERLAY8 = 0x00000100;
-public static final int WGL_SWAP_OVERLAY9 = 0x00000200;
-public static final int WGL_SWAP_OVERLAY10 = 0x00000400;
-public static final int WGL_SWAP_OVERLAY11 = 0x00000800;
-public static final int WGL_SWAP_OVERLAY12 = 0x00001000;
-public static final int WGL_SWAP_OVERLAY13 = 0x00002000;
-public static final int WGL_SWAP_OVERLAY14 = 0x00004000;
-public static final int WGL_SWAP_OVERLAY15 = 0x00008000;
-public static final int WGL_SWAP_UNDERLAY1 = 0x00010000;
-public static final int WGL_SWAP_UNDERLAY2 = 0x00020000;
-public static final int WGL_SWAP_UNDERLAY3 = 0x00040000;
-public static final int WGL_SWAP_UNDERLAY4 = 0x00080000;
-public static final int WGL_SWAP_UNDERLAY5 = 0x00100000;
-public static final int WGL_SWAP_UNDERLAY6 = 0x00200000;
-public static final int WGL_SWAP_UNDERLAY7 = 0x00400000;
-public static final int WGL_SWAP_UNDERLAY8 = 0x00800000;
-public static final int WGL_SWAP_UNDERLAY9 = 0x01000000;
-public static final int WGL_SWAP_UNDERLAY10 = 0x02000000;
-public static final int WGL_SWAP_UNDERLAY11 = 0x04000000;
-public static final int WGL_SWAP_UNDERLAY12 = 0x08000000;
-public static final int WGL_SWAP_UNDERLAY13 = 0x10000000;
-public static final int WGL_SWAP_UNDERLAY14 = 0x20000000;
-public static final int WGL_SWAP_UNDERLAY15 = 0x40000000;
-
-/* pixel types */
-public static final int PFD_TYPE_RGBA = 0;
-public static final int PFD_TYPE_COLORINDEX = 1;
-
-/* layer types */
-public static final int PFD_MAIN_PLANE = 0;
-public static final int PFD_OVERLAY_PLANE = 1;
-public static final int PFD_UNDERLAY_PLANE = (-1);
-
-/* PIXELFORMATDESCRIPTOR flags */
-public static final int PFD_DOUBLEBUFFER = 0x00000001;
-public static final int PFD_STEREO = 0x00000002;
-public static final int PFD_DRAW_TO_WINDOW = 0x00000004;
-public static final int PFD_DRAW_TO_BITMAP = 0x00000008;
-public static final int PFD_SUPPORT_GDI = 0x00000010;
-public static final int PFD_SUPPORT_OPENGL = 0x00000020;
-public static final int PFD_GENERIC_FORMAT = 0x00000040;
-public static final int PFD_NEED_PALETTE = 0x00000080;
-public static final int PFD_NEED_SYSTEM_PALETTE = 0x00000100;
-public static final int PFD_SWAP_EXCHANGE = 0x00000200;
-public static final int PFD_SWAP_COPY = 0x00000400;
-public static final int PFD_SWAP_LAYER_BUFFERS = 0x00000800;
-public static final int PFD_GENERIC_ACCELERATED = 0x00001000;
-public static final int PFD_SUPPORT_DIRECTDRAW = 0x00002000;
-
-/* PIXELFORMATDESCRIPTOR flags for use in ChoosePixelFormat only */
-public static final int PFD_DEPTH_DONTCARE = 0x20000000;
-public static final int PFD_DOUBLEBUFFER_DONTCARE = 0x40000000;
-public static final int PFD_STEREO_DONTCARE = 0x80000000;
-
-public static final native int ChoosePixelFormat(int hdc, PIXELFORMATDESCRIPTOR ppfd);
-public static final native int DescribePixelFormat(int hdc, int iPixelFormat, int nBytes, PIXELFORMATDESCRIPTOR ppfd);
-public static final native int GetPixelFormat(int hdc);
-public static final native boolean SetPixelFormat(int hdc, int iPixelFormat, PIXELFORMATDESCRIPTOR ppfd);
-public static final native boolean SwapBuffers(int hdc);
-public static final native boolean wglCopyContext(int hglrcSrc, int hglrcDst, int mask);
-public static final native int wglCreateContext(int hdc);
-public static final native int wglCreateLayerContext(int hdc, int iLayerPlane);
-public static final native boolean wglDeleteContext(int hglrc);
-public static final native int wglGetCurrentContext();
-public static final native int wglGetCurrentDC();
-public static final native int wglGetProcAddress(byte[] lpszProc);
-public static final native boolean wglMakeCurrent(int hdc, int hglrc);
-public static final native boolean wglShareLists(int hglrc1, int hglrc2);
-public static final native boolean wglUseFontBitmapsA(int hdc, int first, int count, int listBase);
-public static final native boolean wglUseFontBitmapsW(int hdc, int first, int count, int listBase);
-public static final boolean wglUseFontBitmaps(int hdc, int first, int count, int listBase) {
- if (OS.IsUnicode) return wglUseFontBitmapsW(hdc, first, count, listBase);
- return wglUseFontBitmapsA(hdc, first, count, listBase);
-}
-public static final native boolean wglUseFontOutlinesA(int hdc, int first, int count, int listBase, float deviation, float extrusion, int format, int lpgmf);
-public static final native boolean wglUseFontOutlinesW(int hdc, int first, int count, int listBase, float deviation, float extrusion, int format, int lpgmf);
-public static final boolean wglUseFontOutlines(int hdc, int first, int count, int listBase, float deviation, float extrusion, int format, int lpgmf) {
- if (OS.IsUnicode) return wglUseFontOutlinesW(hdc, first, count, listBase, deviation, extrusion, format, lpgmf);
- return wglUseFontOutlinesA(hdc, first, count, listBase, deviation, extrusion, format, lpgmf);
-}
-public static final native boolean wglDescribeLayerPlane(int hdc, int iPixelFormat, int iLayerPlane, int nBytes, LAYERPLANEDESCRIPTOR plpd);
-public static final native int wglSetLayerPaletteEntries(int hdc, int iLayerPlane, int iStart, int cEntries, int[] pcr);
-public static final native int wglGetLayerPaletteEntries(int hdc, int iLayerPlane, int iStart, int cEntries, int[] pcr);
-public static final native boolean wglRealizeLayerPalette(int hdc, int iLayerPlane, boolean bRealize);
-public static final native boolean wglSwapLayerBuffers(int hdc, int fuPlanes);
-public static final void MoveMemory (GLYPHMETRICSFLOAT Destination, int Source, int Length) {
- if (OS.IsUnicode) MoveMemoryW (Destination, Source, Length);
- else MoveMemoryA(Destination, Source, Length);
-}
-public static final native void MoveMemoryA (GLYPHMETRICSFLOAT Destination, int Source, int Length);
-public static final native void MoveMemoryW (GLYPHMETRICSFLOAT Destination, int Source, int Length);
-}
diff --git a/bundles/org.eclipse.swt.tools/.classpath b/bundles/org.eclipse.swt.tools/.classpath
deleted file mode 100644
index bd5955d701..0000000000
--- a/bundles/org.eclipse.swt.tools/.classpath
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="JNI Generation"/>
- <classpathentry kind="src" path="Sleak"/>
- <classpathentry kind="src" path="NativeStats"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/bundles/org.eclipse.swt.tools/.cvsignore b/bundles/org.eclipse.swt.tools/.cvsignore
deleted file mode 100644
index ba077a4031..0000000000
--- a/bundles/org.eclipse.swt.tools/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/bundles/org.eclipse.swt.tools/.project b/bundles/org.eclipse.swt.tools/.project
deleted file mode 100644
index 8dd524dd69..0000000000
--- a/bundles/org.eclipse.swt.tools/.project
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.swt.tools</name>
- <comment></comment>
- <projects>
- <project>org.apache.ant</project>
- <project>org.eclipse.swt</project>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ClassData.java b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ClassData.java
deleted file mode 100644
index 5ac551b549..0000000000
--- a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ClassData.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tools.internal;
-
-public class ClassData extends ItemData {
-
- Class clazz;
-
-public ClassData(Class clazz, String str) {
- super(str);
- this.clazz = clazz;
-}
-
-public static String[] getAllFlags() {
- return new String[]{"no_gen", "cpp"};
-}
-
-public Class getClazz() {
- return clazz;
-}
-
-public String getExclude() {
- return (String)getParam("exclude");
-}
-
-public void setExclude(String str) {
- setParam("exclude", str);
-}
-
-}
diff --git a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/CleanupClass.java b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/CleanupClass.java
deleted file mode 100644
index 7ff95b3915..0000000000
--- a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/CleanupClass.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tools.internal;
-
-import java.io.*;
-import java.util.*;
-
-public abstract class CleanupClass extends JNIGenerator {
-
-String classSourcePath;
-String[] sourcePath;
-String classSource;
-Hashtable files;
-int usedCount, unusedCount;
-
-void loadClassSource() {
- if (classSourcePath == null) return;
- File f = new File(classSourcePath);
- classSource = loadFile(f);
-}
-
-void loadFiles () {
- // BAD - holds on to a lot of memory
- if (sourcePath == null) return;
- files = new Hashtable ();
- for (int i = 0; i < sourcePath.length; i++) {
- File file = new File(sourcePath[i]);
- if (file.exists()) {
- if (!file.isDirectory()) {
- if (file.getAbsolutePath().endsWith(".java")) {
- files.put(file, loadFile(file));
- }
- } else {
- loadDirectory(file);
- }
- }
- }
-}
-
-String loadFile (File file) {
- try {
- FileReader fr = new FileReader(file);
- BufferedReader br = new BufferedReader(fr);
- StringBuffer str = new StringBuffer();
- char[] buffer = new char[1024];
- int read;
- while ((read = br.read(buffer)) != -1) {
- str.append(buffer, 0, read);
- }
- fr.close();
- return str.toString();
- } catch (IOException e) {
- e.printStackTrace(System.out);
- }
- return "";
-}
-
-void loadDirectory(File file) {
- String[] entries = file.list();
- for (int i = 0; i < entries.length; i++) {
- String entry = entries[i];
- File f = new File(file, entry);
- if (!f.isDirectory()) {
- if (f.getAbsolutePath().endsWith(".java")) {
- files.put(f, loadFile(f));
- }
- } else {
- loadDirectory(f);
- }
- }
-}
-
-public void generate(Class clazz) {
- loadFiles ();
- loadClassSource();
-}
-
-public void setSourcePath(String[] sourcePath) {
- this.sourcePath = sourcePath;
- files = null;
-}
-
-public void setClassSourcePath(String classSourcePath) {
- this.classSourcePath = classSourcePath;
-}
-
-}
diff --git a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/CleanupConstants.java b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/CleanupConstants.java
deleted file mode 100644
index 3216d02152..0000000000
--- a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/CleanupConstants.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tools.internal;
-
-import java.lang.reflect.*;
-import java.util.*;
-
-public class CleanupConstants extends CleanupClass {
-
-String getFieldValue(Field field) {
- String name = field.getName();
- int index = 0;
- while (true) {
- index = classSource.indexOf(name, index + 1);
- if (index == -1) return null;
- int equalsIndex = classSource.indexOf("=", index);
- if (classSource.substring(index + name.length(), equalsIndex).trim().length() == 0) {
- int semiIndex = classSource.indexOf(";", equalsIndex);
- return classSource.substring(equalsIndex + 1, semiIndex).trim();
- }
- }
-}
-
-public void generate(Class clazz) {
- unusedCount = usedCount = 0;
- super.generate(clazz);
- Field[] fields = clazz.getDeclaredFields();
- generate(fields);
- output("used=" + usedCount + " unused=" + unusedCount + " total=" + (unusedCount + usedCount));
-}
-
-public void generate(Field[] fields) {
- sort(fields);
- for (int i = 0; i < fields.length; i++) {
- Field field = fields[i];
- if ((field.getModifiers() & Modifier.FINAL) == 0) continue;
- generate(field);
- }
-}
-
-public void generate(Field field) {
- String name = field.getName();
- Enumeration keys = files.keys();
- while (keys.hasMoreElements()) {
- Object key = keys.nextElement();
- String str = (String)files.get(key);
- if (str.indexOf(name) != -1) {
- int modifiers = field.getModifiers();
- String modifiersStr = Modifier.toString(modifiers);
- output("\t");
- output(modifiersStr);
- if (modifiersStr.length() > 0) output(" ");
- output(getTypeSignature3(field.getType()));
- output(" " );
- output(field.getName());
- output(" = ");
- output(getFieldValue(field));
- outputln(";");
- usedCount++;
- return;
- }
- }
- unusedCount++;
-// output("NOT USED=" + field.toString() + " \n");
-}
-
-public static void main(String[] args) {
- if (args.length < 2) {
- System.out.println("Usage: java CleanupConstants <OS className> <src path> <class source>");
- return;
- }
- try {
- CleanupConstants gen = new CleanupConstants();
- String clazzName = args[0];
- String[] sourcePath = new String[]{args[1]};
- String classSource = args[2];
- Class clazz = Class.forName(clazzName);
- gen.setSourcePath(sourcePath);
- gen.setClassSourcePath(classSource);
- gen.generate(clazz);
- } catch (Exception e) {
- System.out.println("Problem");
- e.printStackTrace(System.out);
- }
-}
-
-}
diff --git a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/CleanupNatives.java b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/CleanupNatives.java
deleted file mode 100644
index 0bd3c02ce9..0000000000
--- a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/CleanupNatives.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tools.internal;
-
-import java.util.*;
-import java.lang.reflect.*;
-
-public class CleanupNatives extends CleanupClass {
-
-public CleanupNatives() {
-}
-
-String[] getArgNames(Method method) {
- int n_args = method.getParameterTypes().length;
- if (n_args == 0) return new String[0];
- String name = method.getName();
- String params = "";
- int index = 0;
- while (true) {
- index = classSource.indexOf(name, index + 1);
- if (index == -1) return null;
- int parantesesStart = classSource.indexOf("(", index);
- if (classSource.substring(index + name.length(), parantesesStart).trim().length() == 0) {
- int parantesesEnd = classSource.indexOf(")", parantesesStart);
- params = classSource.substring(parantesesStart + 1, parantesesEnd);
- break;
- }
- }
- String[] names = new String[n_args];
- StringTokenizer tk = new StringTokenizer(params, ",");
- for (int i = 0; i < names.length; i++) {
- String s = tk.nextToken().trim();
- StringTokenizer tk1 = new StringTokenizer(s, " ");
- String s1 = null;
- while (tk1.hasMoreTokens()) {
- s1 = tk1.nextToken();
- }
- names[i] = s1.trim();
- }
- return names;
-}
-
-public void generate(Class clazz) {
- unusedCount = usedCount = 0;
- super.generate(clazz);
- Method[] methods = clazz.getDeclaredMethods();
- generate(methods);
- output("used=" + usedCount + " unused=" + unusedCount + " total=" + (unusedCount + usedCount));
-}
-
-public void generate(Method[] methods) {
- sort(methods);
- for (int i = 0; i < methods.length; i++) {
- Method method = methods[i];
- if ((method.getModifiers() & Modifier.NATIVE) == 0) continue;
- generate(method);
- }
-}
-
-public void generate(Method method) {
- String name = method.getName();
- Enumeration keys = files.keys();
- while (keys.hasMoreElements()) {
- Object key = keys.nextElement();
- String str = (String)files.get(key);
- if (str.indexOf(name) != -1) {
- int modifiers = method.getModifiers();
- Class clazz = method.getDeclaringClass();
- String modifiersStr = Modifier.toString(modifiers);
- output(modifiersStr);
- if (modifiersStr.length() > 0) output(" ");
- output(getTypeSignature3(method.getReturnType()));
- output(" " );
- output(method.getName());
- output("(");
- Class[] paramTypes = method.getParameterTypes();
- String[] paramNames = getArgNames(method);
- for (int i = 0; i < paramTypes.length; i++) {
- Class paramType = paramTypes[i];
- if (i != 0) output(", ");
- String sig = getTypeSignature3(paramType);
- if (clazz.getPackage().equals(paramType.getPackage())) sig = getClassName(paramType);
- output(sig);
- output(" ");
- output(paramNames[i]);
- }
- outputln(");");
- usedCount++;
- return;
- }
- }
- unusedCount++;
-// output("NOT USED=" + method.toString() + "\n");
-}
-
-public static void main(String[] args) {
- if (args.length < 2) {
- System.out.println("Usage: java CleanupNatives <OS className> <src path> <class source>");
- return;
- }
- try {
- CleanupNatives gen = new CleanupNatives();
- String clazzName = args[0];
- String[] sourcePath = new String[]{args[1]};
- String classSource = args[2];
- Class clazz = Class.forName(clazzName);
- gen.setSourcePath(sourcePath);
- gen.setClassSourcePath(classSource);
- gen.generate(clazz);
- } catch (Exception e) {
- System.out.println("Problem");
- e.printStackTrace(System.out);
- }
-}
-
-}
diff --git a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ConstantsGenerator.java b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ConstantsGenerator.java
deleted file mode 100644
index e13c4e9a53..0000000000
--- a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ConstantsGenerator.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tools.internal;
-
-import java.lang.reflect.*;
-
-public class ConstantsGenerator extends JNIGenerator {
-
-public void generate(Class clazz) {
- Field[] fields = clazz.getDeclaredFields();
- generate(fields);
-}
-
-public void generate(Field[] fields) {
- sort(fields);
- outputln("int main() {");
- for (int i = 0; i < fields.length; i++) {
- Field field = fields[i];
- if ((field.getModifiers() & Modifier.FINAL) == 0) continue;
- generate(field);
- }
- outputln("}");
-}
-
-public void generate(Field field) {
- Class type = field.getType();
- output("\tprintf(\"public static final ");
- output(getTypeSignature3(field.getType()));
- output(" ");
- output(field.getName());
- output(" = ");
- if (type == String.class || type == byte[].class) output("\"%s\"");
- else output("0x%x");
- output(";\\n\", ");
- output(field.getName());
- outputln(");");
-}
-
-public static void main(String[] args) {
- if (args.length < 1) {
- System.out.println("Usage: java ConstantsGenerator <className1> <className2>");
- return;
- }
- try {
- ConstantsGenerator gen = new ConstantsGenerator();
- for (int i = 0; i < args.length; i++) {
- String clazzName = args[i];
- Class clazz = Class.forName(clazzName);
- gen.generate(clazz);
- }
- } catch (Exception e) {
- System.out.println("Problem");
- e.printStackTrace(System.out);
- }
-}
-
-}
diff --git a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/FieldData.java b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/FieldData.java
deleted file mode 100644
index a1a4aa1f16..0000000000
--- a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/FieldData.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tools.internal;
-
-import java.lang.reflect.Field;
-
-public class FieldData extends ItemData {
-
- Field field;
-
-public FieldData(Field field, String str) {
- super(str);
- this.field = field;
-}
-
-public static String[] getAllFlags() {
- return new String[]{"no_gen", "no_wince"};
-}
-
-public String getAccessor() {
- return (String)getParam("accessor");
-}
-
-public String getCast() {
- String cast = ((String)getParam("cast")).trim();
- if (cast.length() > 0) {
- if (!cast.startsWith("(")) cast = "(" + cast;
- if (!cast.endsWith(")")) cast = cast + ")";
- }
- return cast;
-}
-
-public String getExclude() {
- return (String)getParam("exclude");
-}
-
-public Field getField() {
- return field;
-}
-
-public void setAccessor(String str) {
- setParam("accessor", str);
-}
-
-public void setCast(String str) {
- setParam("cast", str);
-}
-
-public void setExclude(String str) {
- setParam("exclude", str);
-}
-
-}
diff --git a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ItemData.java b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ItemData.java
deleted file mode 100644
index 1f78246ae5..0000000000
--- a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ItemData.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tools.internal;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Set;
-import java.util.StringTokenizer;
-
-public abstract class ItemData {
-
- HashMap params;
-
-public ItemData(String str) {
- parse(str);
-}
-
-static String[] split(String str, String separator) {
- StringTokenizer tk = new StringTokenizer(str, separator);
- ArrayList result = new ArrayList();
- while (tk.hasMoreElements()) {
- result.add(tk.nextElement());
- }
- return (String[])result.toArray(new String[result.size()]);
-}
-
-public String[] getFlags() {
- Object flags = getParam("flags");
- if (flags == null) return new String[0];
- if (flags instanceof String[]) return (String[])flags;
- String[] result = split((String)flags, " ");
- params.put("flags", result);
- return result;
-}
-
-public boolean getFlag(String flag) {
- String[] flags = getFlags();
- for (int i = 0; i < flags.length; i++) {
- if (flags[i].equals(flag)) return true;
- }
- return false;
-}
-
-public Object getParam(String key) {
- Object value = params.get(key);
- return value == null ? "" : value;
-}
-
-public boolean getGenerate() {
- return !getFlag("no_gen");
-}
-
-public void parse(String str) {
- this.params = new HashMap();
- if (str.length() == 0) return;
- String[] params = split(str, ",");
- for (int i = 0; i < params.length; i++) {
- String param = params[i];
- int equals = param.indexOf('=');
- if (equals == -1) {
- System.out.println("Error: " + str + " param " + param);
- }
- String key = param.substring(0, equals).trim();
- String value = param.substring(equals + 1).trim();
- setParam(key, value);
- }
-}
-
-public void setFlags(String[] flags) {
- setParam("flags", flags);
-}
-
-public void setFlag(String flag, boolean value) {
- String[] flags = getFlags();
- HashSet set = new HashSet(Arrays.asList(flags));
- if (value) {
- set.add(flag);
- } else {
- set.remove(flag);
- }
- setFlags((String[])set.toArray(new String[set.size()]));
-}
-
-public void setGenerate(boolean value) {
- setFlag("no_gen", !value);
-}
-
-public void setParam(String key, Object value) {
- params.put(key, value);
-}
-
-public String toString() {
- StringBuffer buffer = new StringBuffer();
- Set set = params.keySet();
- String[] keys = (String[])set.toArray(new String[set.size()]);
- Arrays.sort(keys);
- for (int j = 0; j < keys.length; j++) {
- String key = keys[j];
- Object value = params.get(key);
- String valueStr = "";
- if (value instanceof String) {
- valueStr = (String)value;
- } else if (value instanceof String[]) {
- String[] values = (String[])value;
- StringBuffer valueBuffer = new StringBuffer();
- for (int i = 0; i < values.length; i++) {
- if (i != 0) valueBuffer.append(" ");
- valueBuffer.append(values[i]);
- }
- valueStr = valueBuffer.toString();
- } else {
- valueStr = value.toString();
- }
- if (valueStr.length() > 0) {
- if (buffer.length() != 0) buffer.append(",");
- buffer.append(key);
- buffer.append("=");
- buffer.append(valueStr);
- }
- }
- return buffer.toString();
-}
-
-}
diff --git a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/JNIGenerator.java b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/JNIGenerator.java
deleted file mode 100644
index 0b935d2fd2..0000000000
--- a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/JNIGenerator.java
+++ /dev/null
@@ -1,381 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tools.internal;
-
-import java.io.*;
-import java.lang.reflect.*;
-import java.util.*;
-
-import org.eclipse.swt.SWT;
-
-public abstract class JNIGenerator {
-
- Class mainClass;
- Class[] classes;
- MetaData metaData;
- boolean isCPP;
- String delimiter;
- PrintStream output;
- ProgressMonitor progress;
-
-public JNIGenerator() {
- delimiter = System.getProperty("line.separator");
- output = System.out;
- metaData = new MetaData(new Properties());
-}
-
-String fixDelimiter(String str) {
- if (delimiter.equals("\n")) return str;
- int index = 0, length = str.length();
- StringBuffer buffer = new StringBuffer();
- while (index != -1) {
- int start = index;
- index = str.indexOf('\n', start);
- if (index == -1) {
- buffer.append(str.substring(start, length));
- } else {
- buffer.append(str.substring(start, index));
- buffer.append(delimiter);
- index++;
- }
- }
- return buffer.toString();
-}
-
-static String getClassName(Class clazz) {
- String name = clazz.getName();
- int index = name.lastIndexOf('.') + 1;
- return name.substring(index, name.length());
-}
-
-static String getFunctionName(Method method) {
- return getFunctionName(method, method.getParameterTypes());
-}
-
-static String getFunctionName(Method method, Class[] paramTypes) {
- if ((method.getModifiers() & Modifier.NATIVE) == 0) return method.getName();
- String function = toC(method.getName());
- if (!isNativeUnique(method)) {
- StringBuffer buffer = new StringBuffer();
- buffer.append(function);
- buffer.append("__");
- if (paramTypes.length > 0) {
- for (int i = 0; i < paramTypes.length; i++) {
- Class paramType = paramTypes[i];
- buffer.append(toC(getTypeSignature(paramType)));
- }
- }
- return buffer.toString();
- }
- return function;
-}
-
-static int getByteCount(Class clazz) {
- if (clazz == Integer.TYPE) return 4;
- if (clazz == Boolean.TYPE) return 4;
- if (clazz == Long.TYPE) return 8;
- if (clazz == Short.TYPE) return 2;
- if (clazz == Character.TYPE) return 2;
- if (clazz == Byte.TYPE) return 1;
- if (clazz == Float.TYPE) return 4;
- if (clazz == Double.TYPE) return 8;
- return 4;
-}
-
-static String getTypeSignature(Class clazz) {
- if (clazz == Void.TYPE) return "V";
- if (clazz == Integer.TYPE) return "I";
- if (clazz == Boolean.TYPE) return "Z";
- if (clazz == Long.TYPE) return "J";
- if (clazz == Short.TYPE) return "S";
- if (clazz == Character.TYPE) return "C";
- if (clazz == Byte.TYPE) return "B";
- if (clazz == Float.TYPE) return "F";
- if (clazz == Double.TYPE) return "D";
- if (clazz == String.class) return "Ljava/lang/String;";
- if (clazz.isArray()) {
- Class componentType = clazz.getComponentType();
- return "[" + getTypeSignature(componentType);
- }
- return "L" + clazz.getName().replace('.', '/') + ";";
-}
-
-static String getTypeSignature1(Class clazz) {
- if (clazz == Void.TYPE) return "Void";
- if (clazz == Integer.TYPE) return "Int";
- if (clazz == Boolean.TYPE) return "Boolean";
- if (clazz == Long.TYPE) return "Long";
- if (clazz == Short.TYPE) return "Short";
- if (clazz == Character.TYPE) return "Char";
- if (clazz == Byte.TYPE) return "Byte";
- if (clazz == Float.TYPE) return "Float";
- if (clazz == Double.TYPE) return "Double";
- if (clazz == String.class) return "String";
- return "Object";
-}
-
-static String getTypeSignature2(Class clazz) {
- if (clazz == Void.TYPE) return "void";
- if (clazz == Integer.TYPE) return "jint";
- if (clazz == Boolean.TYPE) return "jboolean";
- if (clazz == Long.TYPE) return "jlong";
- if (clazz == Short.TYPE) return "jshort";
- if (clazz == Character.TYPE) return "jchar";
- if (clazz == Byte.TYPE) return "jbyte";
- if (clazz == Float.TYPE) return "jfloat";
- if (clazz == Double.TYPE) return "jdouble";
- if (clazz == String.class) return "jstring";
- if (clazz.isArray()) {
- Class componentType = clazz.getComponentType();
- return getTypeSignature2(componentType) + "Array";
- }
- return "jobject";
-}
-
-static String getTypeSignature3(Class clazz) {
- if (clazz == Void.TYPE) return "void";
- if (clazz == Integer.TYPE) return "int";
- if (clazz == Boolean.TYPE) return "boolean";
- if (clazz == Long.TYPE) return "long";
- if (clazz == Short.TYPE) return "short";
- if (clazz == Character.TYPE) return "char";
- if (clazz == Byte.TYPE) return "byte";
- if (clazz == Float.TYPE) return "float";
- if (clazz == Double.TYPE) return "double";
- if (clazz == String.class) return "String";
- if (clazz.isArray()) {
- Class componentType = clazz.getComponentType();
- return getTypeSignature3(componentType) + "[]";
- }
- return clazz.getName();
-}
-
-static String getTypeSignature4(Class clazz) {
- if (clazz == Void.TYPE) return "void";
- if (clazz == Integer.TYPE) return "jint";
- if (clazz == Boolean.TYPE) return "jboolean";
- if (clazz == Long.TYPE) return "jlong";
- if (clazz == Short.TYPE) return "jshort";
- if (clazz == Character.TYPE) return "jchar";
- if (clazz == Byte.TYPE) return "jbyte";
- if (clazz == Float.TYPE) return "jfloat";
- if (clazz == Double.TYPE) return "jdouble";
- if (clazz == String.class) return "jstring";
- if (clazz.isArray()) {
- Class componentType = clazz.getComponentType();
- return getTypeSignature4(componentType) + " *";
- }
- return getClassName(clazz) + " *";
-}
-
-static HashMap uniqueCache = new HashMap();
-static Class uniqueClassCache;
-static Method[] uniqueMethodsCache;
-static synchronized boolean isNativeUnique(Method method) {
- if ((method.getModifiers() & Modifier.NATIVE) == 0) return false;
- Object unique = uniqueCache.get(method);
- if (unique != null) return ((Boolean)unique).booleanValue();
- boolean result = true;
- Method[] methods;
- String name = method.getName();
- Class clazz = method.getDeclaringClass();
- if (clazz.equals(uniqueClassCache)) {
- methods = uniqueMethodsCache;
- } else {
- methods = clazz.getDeclaredMethods();
- uniqueClassCache = clazz;
- uniqueMethodsCache = methods;
- }
- for (int i = 0; i < methods.length; i++) {
- Method mth = methods[i];
- if ((mth.getModifiers() & Modifier.NATIVE) != 0 &&
- method != mth && !method.equals(mth) &&
- name.equals(mth.getName()))
- {
- result = false;
- break;
- }
- }
- uniqueCache.put(method, new Boolean(result));
- return result;
-}
-
-static void sort(Method[] methods) {
- Arrays.sort(methods, new Comparator() {
- public int compare(Object a, Object b) {
- Method mth1 = (Method)a;
- Method mth2 = (Method)b;
- int result = mth1.getName().compareTo(mth2.getName());
- return result != 0 ? result : getFunctionName(mth1).compareTo(getFunctionName(mth2));
- }
- });
-}
-
-static void sort(Field[] fields) {
- Arrays.sort(fields, new Comparator() {
- public int compare(Object a, Object b) {
- return ((Field)a).getName().compareTo(((Field)b).getName());
- }
- });
-}
-
-static void sort(Class[] classes) {
- Arrays.sort(classes, new Comparator() {
- public int compare(Object a, Object b) {
- return ((Class)a).getName().compareTo(((Class)b).getName());
- }
- });
-}
-
-static String toC(String str) {
- int length = str.length();
- StringBuffer buffer = new StringBuffer(length * 2);
- for (int i = 0; i < length; i++) {
- char c = str.charAt(i);
- switch (c) {
- case '_': buffer.append("_1"); break;
- case ';': buffer.append("_2"); break;
- case '[': buffer.append("_3"); break;
- case '.': buffer.append("_"); break;
- case '/': buffer.append("_"); break;
- default: buffer.append(c);
- }
- }
- return buffer.toString();
-}
-
-public abstract void generate(Class clazz);
-
-public void generateCopyright() {
-}
-
-public void generateIncludes() {
-}
-
-public void generate() {
- if (classes == null) return;
- generateCopyright();
- generateIncludes();
- sort(classes);
- for (int i = 0; i < classes.length; i++) {
- Class clazz = classes[i];
- ClassData data = getMetaData().getMetaData(clazz);
- if (data.getFlag("cpp")) {
- isCPP = true;
- break;
- }
- }
- for (int i = 0; i < classes.length; i++) {
- Class clazz = classes[i];
- if (getGenerate(clazz)) generate(clazz);
- }
- output.flush();
-}
-
-public void generateMetaData(String key) {
- MetaData mt = getMetaData();
- String data = mt.getMetaData(key, null);
- if (data == null) return;
- if (data.length() == 0) return;
- outputln(fixDelimiter(data));
-}
-
-public Class[] getClasses() {
- return classes;
-}
-
-protected boolean getGenerate(Class clazz) {
- ClassData data = getMetaData().getMetaData(clazz);
- return !data.getFlag("no_gen");
-}
-
-public boolean getCPP() {
- return isCPP;
-}
-
-public String getDelimiter() {
- return delimiter;
-}
-
-public String getExtension() {
- return getCPP() ? ".cpp" : ".c";
-}
-
-public String getFileName() {
- return getOutputName() + getSuffix() + getExtension();
-}
-
-public PrintStream getOutput() {
- return output;
-}
-
-public String getOutputName() {
- return getClassName(getMainClass()).toLowerCase();
-}
-
-public Class getMainClass() {
- return mainClass;
-}
-
-public MetaData getMetaData() {
- return metaData;
-}
-
-public String getPlatform() {
- return SWT.getPlatform();
-}
-
-public ProgressMonitor getProgressMonitor() {
- return progress;
-}
-
-public String getSuffix() {
- return "";
-}
-
-public void output(String str) {
- output.print(str);
-}
-
-public void outputln() {
- output(getDelimiter());
-}
-
-public void outputln(String str) {
- output(str);
- output(getDelimiter());
-}
-
-public void setClasses(Class[] classes) {
- this.classes = classes;
-}
-
-public void setDelimiter(String delimiter) {
- this.delimiter = delimiter;
-}
-
-public void setMainClass(Class mainClass) {
- this.mainClass = mainClass;
-}
-
-public void setMetaData(MetaData data) {
- metaData = data;
-}
-
-public void setOutput(PrintStream output) {
- this.output = output;
-}
-
-public void setProgressMonitor(ProgressMonitor progress) {
- this.progress = progress;
-}
-
-}
diff --git a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/JNIGeneratorApp.java b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/JNIGeneratorApp.java
deleted file mode 100644
index 12cf2b6b52..0000000000
--- a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/JNIGeneratorApp.java
+++ /dev/null
@@ -1,416 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tools.internal;
-
-import java.io.*;
-import java.lang.reflect.*;
-import java.util.ArrayList;
-import java.util.Enumeration;
-import java.util.zip.*;
-import java.util.Arrays;
-
-import org.eclipse.swt.SWT;
-
-public class JNIGeneratorApp {
-
- Class mainClass;
- ProgressMonitor progress;
- String mainClassName, outputDir, classpath;
- MetaData metaData;
-
-public JNIGeneratorApp() {
-}
-
-public String getClasspath() {
- return classpath;
-}
-
-public Class getMainClass() {
- return mainClass;
-}
-
-public String getMainClassName() {
- return mainClassName;
-}
-
-public MetaData getMetaData() {
- return metaData;
-}
-
-String getMetaDataDir() {
- return "./JNI Generation/org/eclipse/swt/tools/internal/";
-}
-
-public String getOutputDir() {
- return outputDir;
-}
-
-void generateSTATS_C(Class[] classes) {
- try {
- StatsGenerator gen = new StatsGenerator(false);
- gen.setMainClass(mainClass);
- gen.setClasses(classes);
- gen.setMetaData(metaData);
- gen.setProgressMonitor(progress);
- ByteArrayOutputStream out = new ByteArrayOutputStream();
- PrintStream print = new PrintStream(out);
- gen.setOutput(print);
- gen.generate();
- if (out.size() > 0) output(out.toByteArray(), outputDir + gen.getFileName());
- } catch (Exception e) {
- System.out.println("Problem");
- e.printStackTrace(System.out);
- }
-}
-
-void generateSTATS_H(Class[] classes) {
- try {
- StatsGenerator gen = new StatsGenerator(true);
- gen.setMainClass(mainClass);
- gen.setClasses(classes);
- gen.setMetaData(metaData);
- gen.setProgressMonitor(progress);
- ByteArrayOutputStream out = new ByteArrayOutputStream();
- PrintStream print = new PrintStream(out);
- gen.setOutput(print);
- gen.generate();
- if (out.size() > 0) output(out.toByteArray(), outputDir + gen.getFileName());
- } catch (Exception e) {
- System.out.println("Problem");
- e.printStackTrace(System.out);
- }
-}
-
-void generateSTRUCTS_H(Class[] classes) {
- try {
- StructsGenerator gen = new StructsGenerator(true);
- gen.setMainClass(mainClass);
- gen.setClasses(classes);
- gen.setMetaData(metaData);
- gen.setProgressMonitor(progress);
- ByteArrayOutputStream out = new ByteArrayOutputStream();
- PrintStream print = new PrintStream(out);
- gen.setOutput(print);
- gen.generate();
- if (out.size() > 0) output(out.toByteArray(), outputDir + gen.getFileName());
- } catch (Exception e) {
- System.out.println("Problem");
- e.printStackTrace(System.out);
- }
-
-}
-
-void generateSTRUCTS_C(Class[] classes) {
- try {
- StructsGenerator gen = new StructsGenerator(false);
- gen.setMainClass(mainClass);
- gen.setClasses(classes);
- gen.setMetaData(metaData);
- gen.setProgressMonitor(progress);
- ByteArrayOutputStream out = new ByteArrayOutputStream();
- PrintStream print = new PrintStream(out);
- gen.setOutput(print);
- gen.generate();
- if (out.size() > 0) output(out.toByteArray(), outputDir + gen.getFileName());
- } catch (Exception e) {
- System.out.println("Problem");
- e.printStackTrace(System.out);
- }
-
-}
-
-void generateSWT_C(Class[] classes) {
- try {
- NativesGenerator gen = new NativesGenerator();
- gen.setMainClass(mainClass);
- gen.setClasses(classes);
- gen.setMetaData(metaData);
- gen.setProgressMonitor(progress);
- ByteArrayOutputStream out = new ByteArrayOutputStream();
- PrintStream print = new PrintStream(out);
- gen.setOutput(print);
- gen.generate();
- if (out.size() > 0) output(out.toByteArray(), outputDir + gen.getFileName());
- } catch (Exception e) {
- System.out.println("Problem");
- e.printStackTrace(System.out);
- }
-}
-
-
-void generateMetaData() {
- try {
- MetaDataGenerator gen = new MetaDataGenerator();
- gen.setMainClass(mainClass);
- gen.setClasses(getClasses());
- gen.setMetaData(metaData);
- gen.setProgressMonitor(progress);
- ByteArrayOutputStream out = new ByteArrayOutputStream();
- PrintStream print = new PrintStream(out);
- gen.setOutput(print);
- gen.generate();
- if (!new File(getMetaDataDir()).exists()) {
- System.out.println("Warning: Meta data output dir does not exist");
- return;
- }
- if (out.size() > 0) output(out.toByteArray(), getMetaDataDir() + gen.getFileName());
- } catch (Exception e) {
- System.out.println("Problem");
- e.printStackTrace(System.out);
- }
-}
-
-public void generate() {
- generate(null);
-}
-
-public void generate(ProgressMonitor progress) {
- if (mainClassName == null) return;
- if (progress != null) progress.setMessage("Initializing...");
- Class[] natives = getNativesClasses();
- Class[] structs = getStructureClasses();
- this.progress = progress;
- if (progress != null) {
- int nativeCount = 0;
- for (int i = 0; i < natives.length; i++) {
- Class clazz = natives[i];
- Method[] methods = clazz.getDeclaredMethods();
- for (int j = 0; j < methods.length; j++) {
- Method method = methods[j];
- if ((method.getModifiers() & Modifier.NATIVE) != 0) nativeCount++;
- }
- }
- progress.setTotal(nativeCount * 4 + structs.length * 3);
- progress.setMessage("Generating structs.h ...");
- }
- generateSTRUCTS_H(structs);
- if (progress != null) progress.setMessage("Generating structs.c ...");
- generateSTRUCTS_C(structs);
- if (progress != null) progress.setMessage("Generating natives ...");
- generateSWT_C(natives);
- if (progress != null) progress.setMessage("Generating stats.h ...");
- generateSTATS_H(natives);
- if (progress != null) progress.setMessage("Generating stats.c ...");
- generateSTATS_C(natives);
- if (progress != null) progress.setMessage("Generating meta data ...");
- generateMetaData();
- if (progress != null) progress.setMessage("Done.");
- this.progress = null;
-}
-
-boolean compare(InputStream is1, InputStream is2) throws IOException {
- while (true) {
- int c1 = is1.read();
- int c2 = is2.read();
- if (c1 != c2) return false;
- if (c1 == -1) break;
- }
- return true;
-}
-
-void output(byte[] bytes, String fileName) throws IOException {
- FileInputStream is = null;
- try {
- is = new FileInputStream(fileName);
- if (compare(new ByteArrayInputStream(bytes), new BufferedInputStream(is))) return;
- } catch (FileNotFoundException e) {
- } finally {
- try {
- if (is != null) is.close();
- } catch (IOException e) {}
- }
- FileOutputStream out = new FileOutputStream(fileName);
- out.write(bytes);
- out.close();
-}
-
-String getPackageName(String className) {
- int dot = mainClassName.lastIndexOf('.');
- if (dot == -1) return "";
- return mainClassName.substring(0, dot);
-}
-
-String[] getClassNames(String mainClassName) {
- String pkgName = getPackageName(mainClassName);
- String classpath = getClasspath();
- if (classpath == null) classpath = System.getProperty("java.class.path");
- String pkgPath = pkgName.replace('.', File.separatorChar);
- String pkgZipPath = pkgName.replace('.', '/');
- ArrayList classes = new ArrayList();
- int start = 0;
- int index = 0;
- while (index < classpath.length()) {
- index = classpath.indexOf(File.pathSeparatorChar, start);
- if (index == -1) index = classpath.length();
- String path = classpath.substring(start, index);
- if (path.toLowerCase().endsWith(".jar")) {
- ZipFile zipFile = null;
- try {
- zipFile = new ZipFile(path);
- Enumeration entries = zipFile.entries();
- while (entries.hasMoreElements()) {
- ZipEntry entry = (ZipEntry)entries.nextElement();
- String name = entry.getName();
- if (name.startsWith(pkgZipPath) && name.endsWith(".class")) {
- String className = name.substring(pkgZipPath.length() + 1, name.length() - 6);
- className.replace('/', '.');
- classes.add(className);
- }
- }
- } catch (IOException e) {
- } finally {
- try {
- if (zipFile != null) zipFile.close();
- } catch (IOException ex) {}
- }
- } else {
- File file = new File(path + File.separator + pkgPath);
- if (file.exists()) {
- String[] entries = file.list();
- for (int i = 0; i < entries.length; i++) {
- String entry = entries[i];
- File f = new File(file, entry);
- if (!f.isDirectory()) {
- if (f.getAbsolutePath().endsWith(".class")) {
- String className = entry.substring(0, entry.length() - 6);
- classes.add(className);
- }
- } else {
- throw new Error("SUBDIR NOT DONE=" + f);
- }
- }
- }
- }
- start = index + 1;
- }
- return (String[])classes.toArray(new String[classes.size()]);
-}
-
-public Class[] getClasses() {
- if (mainClassName == null) return new Class[0];
- String[] classNames = getClassNames(mainClassName);
- Arrays.sort(classNames);
- String packageName = getPackageName(mainClassName);
- Class[] classes = new Class[classNames.length];
- for (int i = 0; i < classNames.length; i++) {
- String className = classNames[i];
- try {
- classes[i] = Class.forName(packageName + "." + className, false, getClass().getClassLoader());
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
- return classes;
-}
-
-public Class[] getNativesClasses() {
- if (mainClassName == null) return new Class[0];
- ArrayList result = new ArrayList();
- Class[] classes = getClasses();
- for (int i = 0; i < classes.length; i++) {
- Class clazz = classes[i];
- Method[] methods = clazz.getDeclaredMethods();
- for (int j = 0; j < methods.length; j++) {
- Method method = methods[j];
- int mods = method.getModifiers();
- if ((mods & Modifier.NATIVE) != 0) {
- result.add(clazz);
- break;
- }
- }
- }
- return (Class[])result.toArray(new Class[result.size()]);
-}
-
-public Class[] getStructureClasses() {
- if (mainClassName == null) return new Class[0];
- ArrayList result = new ArrayList();
- Class[] classes = getClasses();
- outer:
- for (int i = 0; i < classes.length; i++) {
- Class clazz = classes[i];
- Method[] methods = clazz.getDeclaredMethods();
- for (int j = 0; j < methods.length; j++) {
- Method method = methods[j];
- int mods = method.getModifiers();
- if ((mods & Modifier.NATIVE) != 0) continue outer;
- }
- Field[] fields = clazz.getFields();
- boolean hasPublicFields = false;
- for (int j = 0; j < fields.length; j++) {
- Field field = fields[j];
- int mods = field.getModifiers();
- if ((mods & Modifier.PUBLIC) != 0 && (mods & Modifier.STATIC) == 0) {
- hasPublicFields = true;
- break;
- }
- }
- if (!hasPublicFields) continue;
- result.add(clazz);
- }
- return (Class[])result.toArray(new Class[result.size()]);
-}
-
-public void setClasspath(String classpath) {
- this.classpath = classpath;
-}
-
-public void setMainClassName(String str) {
- mainClassName = str;
- metaData = new MetaData(mainClassName);
- String mainClasses = getMetaData().getMetaData("swt_main_classes", null);
- if (mainClasses != null) {
- String[] list = ItemData.split(mainClasses, ",");
- for (int i = 0; i < list.length; i += 2) {
- if (mainClassName.equals(list[i].trim())) {
- setOutputDir(list[i + 1].trim());
- }
- }
- }
- if (mainClassName != null) {
- try {
- mainClass = Class.forName(mainClassName, false, getClass().getClassLoader());
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-}
-
-public void setOutputDir(String str) {
- if (str != null) {
- if (!str.endsWith("\\") && !str.endsWith("/") ) {
- str += File.separator;
- }
- }
- outputDir = str;
-}
-
-public static String getDefaultMainClass() {
- return "org.eclipse.swt.internal." + getDefaultPlatform() + ".OS";
-}
-
-public static String getDefaultPlatform() {
- return SWT.getPlatform();
-}
-
-public static void main(String[] args) {
- JNIGeneratorApp gen = new JNIGeneratorApp ();
- if (args.length > 0) {
- gen.setMainClassName(args[0]);
- if (args.length > 1) gen.setOutputDir(args[1]);
- if (args.length > 2) gen.setClasspath(args[2]);
- } else {
- gen.setMainClassName(getDefaultMainClass());
- }
- gen.generate();
-}
-
-}
diff --git a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/JNIGeneratorAppUI.java b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/JNIGeneratorAppUI.java
deleted file mode 100644
index 82c464fdca..0000000000
--- a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/JNIGeneratorAppUI.java
+++ /dev/null
@@ -1,1178 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tools.internal;
-
-import java.io.*;
-import java.lang.reflect.*;
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.custom.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.layout.*;
-
-public class JNIGeneratorAppUI {
-
- Display display;
- Shell shell;
-
- Composite actionsPanel;
- Combo mainClassCb, outputDirCb;
- Table classesLt, membersLt, paramsLt;
- ProgressBar progressBar;
- Label progressLabel;
- FileDialog fileDialog;
-
- TableEditor paramTextEditor, memberTextEditor, classTextEditor;
- FlagsEditor paramListEditor, memberListEditor, classListEditor;
- Text paramEditorTx, memberEditorTx, classEditorTx;
- List paramEditorLt, memberEditorLt, classEditorLt;
-
- static class FlagsEditor {
- Table parent;
- int column = -1;
- TableItem item;
-
- public FlagsEditor(Table parent) {
- this.parent = parent;
- }
-
- public int getColumn() {
- return column;
- }
-
- public TableItem getItem() {
- return item;
- }
-
- public void setColumn(int column) {
- this.column = column;
- }
-
- public void setItem(TableItem item) {
- this.item = item;
- }
- }
-
- JNIGeneratorApp app;
-
- static final int CLASS_NAME_COLUMN = 0;
- static final int CLASS_FLAGS_COLUMN = 1;
- static final int CLASS_EXCLUDE_COLUMN = 2;
-
- static final int FIELD_NAME_COLUMN = 0;
- static final int FIELD_FLAGS_COLUMN = 1;
- static final int FIELD_CAST_COLUMN = 2;
- static final int FIELD_ACCESSOR_COLUMN = 3;
- static final int FIELD_EXCLUDE_COLUMN = 4;
-
- static final int METHOD_NAME_COLUMN = 0;
- static final int METHOD_FLAGS_COLUMN = 1;
- static final int METHOD_ACCESSOR_COLUMN = 2;
- static final int METHOD_EXCLUDE_COLUMN = 3;
-
- static final int PARAM_INDEX_COLUMN = 0;
- static final int PARAM_TYPE_COLUMN = 1;
- static final int PARAM_FLAGS_COLUMN = 2;
- static final int PARAM_CAST_COLUMN = 3;
-
-public JNIGeneratorAppUI() {
- this (new JNIGeneratorApp());
-}
-
-public JNIGeneratorAppUI(JNIGeneratorApp app) {
- this.app = app;
-}
-
-void cleanup() {
-}
-
-void generateStructsHeader () {
- StructsGenerator gen = new StructsGenerator(true);
- gen.setMainClass(app.getMainClass());
- gen.setMetaData(app.getMetaData());
- gen.setClasses(getSelectedClasses());
- gen.generate();
-}
-
-void generateStructs () {
- StructsGenerator gen = new StructsGenerator(false);
- gen.setMainClass(app.getMainClass());
- gen.setMetaData(app.getMetaData());
- gen.setClasses(getSelectedClasses());
- gen.generate();
-}
-
-void generateSizeof () {
- SizeofGenerator gen = new SizeofGenerator();
- gen.setMainClass(app.getMainClass());
- gen.setMetaData(app.getMetaData());
- gen.setClasses(getSelectedClasses());
- gen.generate();
-}
-
-void generateMetaData () {
- MetaDataGenerator gen = new MetaDataGenerator();
- gen.setMainClass(app.getMainClass());
- gen.setMetaData(app.getMetaData());
- Method[] methods = getSelectedMethods();
- if (methods.length != 0) {
- gen.generate(methods);
- } else {
- gen.setClasses(getSelectedClasses());
- gen.generate();
- }
-}
-
-void generateNatives () {
- NativesGenerator gen = new NativesGenerator();
- gen.setMainClass(app.getMainClass());
- gen.setMetaData(app.getMetaData());
- Method[] methods = getSelectedMethods();
- if (methods.length != 0) {
- gen.generate(methods);
- } else {
- gen.setClasses(getSelectedClasses());
- gen.generate();
- }
-}
-
-void generateAll() {
- if (!updateOutputDir()) return;
- Cursor cursor = display.getSystemCursor(SWT.CURSOR_WAIT);
- shell.setCursor(cursor);
- shell.setEnabled(false);
- Control[] children = actionsPanel.getChildren();
- for (int i = 0; i < children.length; i++) {
- Control child = children[i];
- if (child instanceof Button) child.setEnabled(false);
- }
- progressLabel.setText("");
- progressBar.setSelection(0);
- progressLabel.setVisible(true);
- progressBar.setVisible(true);
- final boolean[] done = new boolean[1];
- new Thread() {
- public void run() {
- try {
- app.generate(new ProgressMonitor() {
- public void setTotal(final int total) {
- display.syncExec(new Runnable() {
- public void run() {
- progressBar.setMaximum(total);
- }
- });
- }
- public void step() {
- display.syncExec(new Runnable() {
- public void run() {
- progressBar.setSelection(progressBar.getSelection() + 1);
- }
- });
- }
- public void setMessage(final String message) {
- display.syncExec(new Runnable() {
- public void run() {
- progressLabel.setText(message);
- progressLabel.update();
- }
- });
- }
- });
- } finally {
- done[0] = true;
- display.wake();
- }
- }
- }.start();
- while (!done[0]) {
- if (!display.readAndDispatch()) display.sleep();
- }
- for (int i = 0; i < children.length; i++) {
- Control child = children[i];
- if (child instanceof Button) child.setEnabled(true);
- }
- progressBar.setVisible(false);
- progressLabel.setVisible(false);
- shell.setEnabled(true);
- shell.setCursor(null);
-}
-
-void generateConstants () {
- ConstantsGenerator gen = new ConstantsGenerator();
- gen.setMainClass(app.getMainClass());
- gen.setMetaData(app.getMetaData());
- Field[] fields = getSelectedFields();
- if (fields.length != 0) {
- gen.generate(fields);
- } else {
- gen.setClasses(getSelectedClasses());
- gen.generate();
- }
-}
-
-Class[] getSelectedClasses() {
- TableItem[] items = classesLt.getSelection();
- Class[] classes = new Class[items.length];
- for (int i = 0; i < items.length; i++) {
- TableItem item = items[i];
- classes[i] = ((ClassData)item.getData()).getClazz();
- }
- return classes;
-}
-
-Method[] getSelectedMethods() {
- TableItem[] selection = membersLt.getSelection();
- Method[] methods = new Method[selection.length];
- int count = 0;
- for (int i = 0; i < selection.length; i++) {
- TableItem item = selection [i];
- Object data = item.getData();
- if (data instanceof MethodData) {
- Method method = ((MethodData)data).getMethod();
- methods[count++] = method;
- }
- }
- if (count != methods.length) {
- Method[] result = new Method[count];
- System.arraycopy(methods, 0, result, 0, count);
- methods = result;
- }
- return methods;
-}
-
-Field[] getSelectedFields() {
- TableItem[] selection = membersLt.getSelection();
- Field[] fields = new Field[selection.length];
- int count = 0;
- for (int i = 0; i < selection.length; i++) {
- TableItem item = selection [i];
- Object data = item.getData();
- if (data instanceof FieldData) {
- Field field = ((FieldData)data).getField();
- fields[count++] = field;
- }
- }
- if (count != fields.length) {
- Field[] result = new Field[count];
- System.arraycopy(fields, 0, result, 0, count);
- fields = result;
- }
- return fields;
-}
-
-public void open () {
- display = new Display();
- shell = new Shell(display);
- shell.setText("JNI Generator");
-
- GridData data;
- GridLayout shellLayout = new GridLayout();
- shellLayout.numColumns = 2;
- shell.setLayout(shellLayout);
-
- Composite panel = new Composite(shell, SWT.NONE);
- data = new GridData(GridData.FILL_BOTH);
- panel.setLayoutData(data);
-
- GridLayout panelLayout = new GridLayout();
- panelLayout.numColumns = 1;
- panel.setLayout(panelLayout);
-
- Listener updateMainClassListener = new Listener() {
- public void handleEvent(Event e) {
- updateMainClass();
- if (!updateOutputDir()) return;
- updateClasses();
- updateMembers();
- updateParameters();
- }
- };
- createMainClassPanel(panel, updateMainClassListener);
- createClassesPanel(panel);
- createMembersPanel(panel);
- createParametersPanel(panel);
- createActionButtons(shell);
-
- Point preferredSize = shell.computeSize(SWT.DEFAULT, SWT.DEFAULT);
- shell.setSize(shell.getSize().x, preferredSize.y);
- ((GridData)classesLt.getLayoutData()).heightHint = classesLt.getItemHeight() * 2;
- ((GridData)membersLt.getLayoutData()).heightHint = membersLt.getItemHeight() * 2;
- ((GridData)paramsLt.getLayoutData()).heightHint = paramsLt.getItemHeight() * 2;
- panel.layout(true);
-
- updateMainClass();
- updateClasses();
- updateMembers();
- updateParameters();
-}
-
-void createMainClassPanel(Composite panel, Listener updateListener) {
- Label mainClassLb = new Label(panel, SWT.NONE);
- mainClassLb.setText("&Main Class:");
-
- GridData data;
- mainClassCb = new Combo(panel, SWT.DROP_DOWN);
- String mainClass = app.getMainClassName();
- mainClassCb.setText(mainClass == null ? "" : mainClass);
- data = new GridData(GridData.FILL_HORIZONTAL);
- mainClassCb.setLayoutData(data);
- mainClassCb.addListener(SWT.Selection, updateListener);
- mainClassCb.addListener(SWT.DefaultSelection, updateListener);
-
- Label outputDirLb = new Label(panel, SWT.NONE);
- outputDirLb.setText("&Output Dir:");
-
- outputDirCb = new Combo(panel, SWT.DROP_DOWN);
- String outputDir = app.getOutputDir();
- outputDirCb.setText(outputDir == null ? "" : outputDir);
- data = new GridData(GridData.FILL_HORIZONTAL);
- outputDirCb.setLayoutData(data);
- outputDirCb.addListener(SWT.Selection, updateListener);
- outputDirCb.addListener(SWT.DefaultSelection, updateListener);
-
- String mainClasses = app.getMetaData().getMetaData("swt_main_classes", null);
- if (mainClasses != null) {
- String[] list = ItemData.split(mainClasses, ",");
- for (int i = 0; i < list.length; i += 2) {
- mainClassCb.add(list[i].trim());
- outputDirCb.add(list[i + 1].trim());
- }
- }
-}
-
-void createClassesPanel(Composite panel) {
- Label classesLb = new Label(panel, SWT.NONE);
- classesLb.setText("&Classes:");
-
- GridData data;
- classesLt = new Table(panel, SWT.CHECK | SWT.MULTI | SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL | SWT.FULL_SELECTION);
- data = new GridData(GridData.FILL_BOTH);
- data.heightHint = classesLt.getItemHeight() * 6;
- classesLt.setLayoutData(data);
- classesLt.setHeaderVisible(true);
- classesLt.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- if (e.detail == SWT.CHECK) {
- updateGenerate((TableItem)e.item);
- } else {
- updateMembers();
- updateParameters();
- }
- }
- });
- TableColumn column;
- column = new TableColumn(classesLt, SWT.NONE, CLASS_NAME_COLUMN);
- column.setText("Class");
- column = new TableColumn(classesLt, SWT.NONE, CLASS_FLAGS_COLUMN);
- column.setText("Flags");
- /*
- column = new TableColumn(classesLt, SWT.NONE, CLASS_EXCLUDE_COLUMN);
- column.setText("Exclude");
- */
-
- classTextEditor = new TableEditor(classesLt);
- classTextEditor.grabHorizontal = true;
- classEditorTx = new Text(classesLt, SWT.SINGLE);
- classTextEditor.setEditor(classEditorTx);
- Listener classTextListener = new Listener() {
- public void handleEvent(Event e) {
- if (e.type == SWT.Traverse) {
- switch (e.detail) {
- case SWT.TRAVERSE_ESCAPE:
- classTextEditor.setItem(null);
- break;
- default:
- return;
- }
- }
- classEditorTx.setVisible(false);
- TableItem item = classTextEditor.getItem();
- if (item == null) return;
- int column = classTextEditor.getColumn();
- ClassData classData = (ClassData)item.getData();
- if (column == CLASS_EXCLUDE_COLUMN) {
- String text = classEditorTx.getText();
- classData.setExclude(text);
- item.setText(column, classData.getExclude());
- MetaData metaData = app.getMetaData();
- metaData.setMetaData(classData.getClazz(), classData);
- classesLt.getColumn(column).pack();
- }
- }
- };
- classEditorTx.addListener(SWT.DefaultSelection, classTextListener);
- classEditorTx.addListener(SWT.FocusOut, classTextListener);
- classEditorTx.addListener(SWT.Traverse, classTextListener);
-
- final Shell floater = new Shell(shell, SWT.NO_TRIM);
- floater.setLayout(new FillLayout());
- classListEditor = new FlagsEditor(classesLt);
- classEditorLt = new List(floater, SWT.MULTI | SWT.BORDER);
- classEditorLt.setItems(ClassData.getAllFlags());
- floater.pack();
- floater.addListener(SWT.Close, new Listener() {
- public void handleEvent(Event e) {
- classListEditor.setItem(null);
- e.doit = false;
- floater.setVisible(false);
- }
- });
- Listener classesListListener = new Listener() {
- public void handleEvent(Event e) {
- if (e.type == SWT.Traverse) {
- switch (e.detail) {
- case SWT.TRAVERSE_RETURN:
- break;
- default:
- return;
- }
- }
- floater.setVisible(false);
- TableItem item = classListEditor.getItem();
- if (item == null) return;
- int column = classListEditor.getColumn();
- ClassData classData = (ClassData)item.getData();
- if (column == CLASS_FLAGS_COLUMN) {
- String[] flags = classEditorLt.getSelection();
- classData.setFlags(flags);
- item.setText(column, getFlagsString(classData.getFlags()));
- item.setChecked(classData.getGenerate());
- MetaData metaData = app.getMetaData();
- metaData.setMetaData(classData.getClazz(), classData);
- classesLt.getColumn(column).pack();
- }
- }
- };
- classEditorLt.addListener(SWT.DefaultSelection, classesListListener);
- classEditorLt.addListener(SWT.FocusOut, classesListListener);
- classEditorLt.addListener(SWT.Traverse, classesListListener);
-
- classesLt.addListener(SWT.MouseDown, new Listener() {
- public void handleEvent(Event e) {
- if (e.button != 1) return;
- Point pt = new Point(e.x, e.y);
- TableItem item = classesLt.getItem(pt);
- if (item == null) return;
- int column = -1;
- for (int i = 0; i < classesLt.getColumnCount(); i++) {
- if (item.getBounds(i).contains(pt)) {
- column = i;
- break;
- }
- }
- if (column == -1) return;
- ClassData data = (ClassData)item.getData();
- if (column == CLASS_EXCLUDE_COLUMN) {
- classTextEditor.setColumn(column);
- classTextEditor.setItem(item);
- classEditorTx.setText(data.getExclude());
- classEditorTx.selectAll();
- classEditorTx.setVisible(true);
- classEditorTx.setFocus();
- } else if (column == CLASS_FLAGS_COLUMN) {
- classListEditor.setColumn(column);
- classListEditor.setItem(item);
- classEditorLt.setSelection(data.getFlags());
- floater.setLocation(classesLt.toDisplay(e.x, e.y));
- floater.setVisible(true);
- classEditorLt.setFocus();
- }
- }
- });
-}
-
-void createMembersPanel(Composite panel) {
- Label membersLb = new Label(panel, SWT.NONE);
- membersLb.setText("Mem&bers:");
-
- GridData data;
- membersLt = new Table(panel, SWT.CHECK | SWT.MULTI | SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL | SWT.FULL_SELECTION);
- data = new GridData(GridData.FILL_BOTH);
- data.heightHint = membersLt.getItemHeight() * 6;
- membersLt.setLayoutData(data);
- membersLt.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- if (e.detail == SWT.CHECK) {
- updateGenerate((TableItem)e.item);
- } else {
- updateParameters();
- }
- }
- });
-
- memberTextEditor = new TableEditor(membersLt);
- memberTextEditor.grabHorizontal = true;
- memberEditorTx = new Text(membersLt, SWT.SINGLE);
- memberTextEditor.setEditor(memberEditorTx);
- Listener memberTextListener = new Listener() {
- public void handleEvent(Event e) {
- if (e.type == SWT.Traverse) {
- switch (e.detail) {
- case SWT.TRAVERSE_ESCAPE:
- memberTextEditor.setItem(null);
- break;
- default:
- return;
- }
- }
- memberEditorTx.setVisible(false);
- TableItem item = memberTextEditor.getItem();
- if (item == null) return;
- int column = memberTextEditor.getColumn();
- ItemData memberData = (ItemData)item.getData();
- String text = memberEditorTx.getText();
- MetaData metaData = app.getMetaData();
- if (memberData instanceof FieldData) {
- FieldData fieldData = (FieldData)memberData;
- switch (column) {
- case FIELD_CAST_COLUMN: {
- fieldData.setCast(text);
- item.setText(column, fieldData.getCast());
- break;
- }
- case FIELD_ACCESSOR_COLUMN: {
- fieldData.setAccessor(text);
- item.setText(column, fieldData.getAccessor());
- break;
- }
- case FIELD_EXCLUDE_COLUMN: {
- fieldData.setExclude(text);
- item.setText(column, fieldData.getExclude());
- break;
- }
- }
- metaData.setMetaData(fieldData.getField(), fieldData);
- membersLt.getColumn(column).pack();
- } else if (memberData instanceof MethodData) {
- MethodData methodData = (MethodData)memberData;
- switch (column) {
- case METHOD_EXCLUDE_COLUMN: {
- methodData.setExclude(text);
- item.setText(column, methodData.getExclude());
- break;
- }
- }
- metaData.setMetaData(methodData.getMethod(), methodData);
- membersLt.getColumn(column).pack();
- }
- }
- };
- memberEditorTx.addListener(SWT.DefaultSelection, memberTextListener);
- memberEditorTx.addListener(SWT.FocusOut, memberTextListener);
- memberEditorTx.addListener(SWT.Traverse, memberTextListener);
-
- final Shell floater = new Shell(shell, SWT.NO_TRIM);
- floater.setLayout(new FillLayout());
- memberListEditor = new FlagsEditor(membersLt);
- memberEditorLt = new List(floater, SWT.MULTI | SWT.BORDER);
- floater.addListener(SWT.Close, new Listener() {
- public void handleEvent(Event e) {
- memberListEditor.setItem(null);
- e.doit = false;
- floater.setVisible(false);
- }
- });
- Listener memberListListener = new Listener() {
- public void handleEvent(Event e) {
- if (e.type == SWT.Traverse) {
- switch (e.detail) {
- case SWT.TRAVERSE_RETURN:
- break;
- default:
- return;
- }
- }
- floater.setVisible(false);
- TableItem item = memberListEditor.getItem();
- if (item == null) return;
- int column = memberListEditor.getColumn();
- ItemData data = (ItemData)item.getData();
- String[] flags = memberEditorLt.getSelection();
- data.setFlags(flags);
- item.setText(column, getFlagsString(data.getFlags()));
- item.setChecked(data.getGenerate());
- MetaData metaData = app.getMetaData();
- if (data instanceof FieldData) {
- FieldData fieldData = (FieldData)data;
- metaData.setMetaData(fieldData.getField(), fieldData);
- membersLt.getColumn(column).pack();
- } else if (data instanceof MethodData) {
- MethodData methodData = (MethodData)data;
- metaData.setMetaData(methodData.getMethod(), methodData);
- membersLt.getColumn(column).pack();
- }
- }
- };
- memberEditorLt.addListener(SWT.DefaultSelection, memberListListener);
- memberEditorLt.addListener(SWT.FocusOut, memberListListener);
- memberEditorLt.addListener(SWT.Traverse, memberListListener);
-
- membersLt.addListener(SWT.MouseDown, new Listener() {
- public void handleEvent(Event e) {
- if (e.button != 1) return;
- Point pt = new Point(e.x, e.y);
- TableItem item = membersLt.getItem(pt);
- if (item == null) return;
- int column = -1;
- for (int i = 0; i < membersLt.getColumnCount(); i++) {
- if (item.getBounds(i).contains(pt)) {
- column = i;
- break;
- }
- }
- if (column == -1) return;
- ItemData itemData = (ItemData)item.getData();
- if (itemData instanceof FieldData) {
- FieldData data = (FieldData)itemData;
- if (column == FIELD_CAST_COLUMN || column == FIELD_ACCESSOR_COLUMN || column == FIELD_EXCLUDE_COLUMN) {
- memberTextEditor.setColumn(column);
- memberTextEditor.setItem(item);
- String text = "";
- switch (column) {
- case FIELD_CAST_COLUMN: text = data.getCast(); break;
- case FIELD_ACCESSOR_COLUMN: text = data.getAccessor(); break;
- case FIELD_EXCLUDE_COLUMN: text = data.getExclude(); break;
- }
- memberEditorTx.setText(text);
- memberEditorTx.selectAll();
- memberEditorTx.setVisible(true);
- memberEditorTx.setFocus();
- } else if (column == FIELD_FLAGS_COLUMN) {
- memberListEditor.setColumn(column);
- memberListEditor.setItem(item);
- memberEditorLt.setItems(FieldData.getAllFlags());
- memberEditorLt.setSelection(data.getFlags());
- floater.setLocation(membersLt.toDisplay(e.x, e.y));
- floater.pack();
- floater.setVisible(true);
- memberEditorLt.setFocus();
- }
- } else if (itemData instanceof MethodData) {
- MethodData data = (MethodData)itemData;
- if (column == METHOD_EXCLUDE_COLUMN || column == METHOD_ACCESSOR_COLUMN) {
- memberTextEditor.setColumn(column);
- memberTextEditor.setItem(item);
- String text = "";
- switch (column) {
- case METHOD_ACCESSOR_COLUMN: text = data.getAccessor(); break;
- case METHOD_EXCLUDE_COLUMN: text = data.getExclude(); break;
- }
- memberEditorTx.setText(text);
- memberEditorTx.selectAll();
- memberEditorTx.setVisible(true);
- memberEditorTx.setFocus();
- } else if (column == METHOD_FLAGS_COLUMN) {
- memberListEditor.setColumn(column);
- memberListEditor.setItem(item);
- memberEditorLt.setItems(MethodData.getAllFlags());
- memberEditorLt.setSelection(data.getFlags());
- floater.setLocation(membersLt.toDisplay(e.x, e.y));
- floater.pack();
- floater.setVisible(true);
- memberEditorLt.setFocus();
- }
- }
- }
- });
-}
-
-void createParametersPanel(Composite panel) {
- Label paramsLb = new Label(panel, SWT.NONE);
- paramsLb.setText("&Parameters:");
-
- GridData data;
- paramsLt = new Table(panel, SWT.MULTI | SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL | SWT.FULL_SELECTION);
- data = new GridData(GridData.FILL_BOTH);
- int itemHeight = paramsLt.getItemHeight();
- data.heightHint = itemHeight * 6;
- paramsLt.setLayoutData(data);
- paramsLt.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- if (e.detail == SWT.CHECK) {
- updateGenerate((TableItem)e.item);
- }
- }
- });
-
- TableColumn column;
- column = new TableColumn(paramsLt, SWT.NONE, PARAM_INDEX_COLUMN);
- column = new TableColumn(paramsLt, SWT.NONE, PARAM_TYPE_COLUMN);
- column.setText("Type");
- column = new TableColumn(paramsLt, SWT.NONE, PARAM_FLAGS_COLUMN);
- column.setText("Flags");
- column = new TableColumn(paramsLt, SWT.NONE, PARAM_CAST_COLUMN);
- column.setText("Cast");
-
- paramTextEditor = new TableEditor(paramsLt);
- paramTextEditor.grabHorizontal = true;
- paramEditorTx = new Text(paramsLt, SWT.SINGLE);
- paramTextEditor.setEditor(paramEditorTx);
- Listener paramTextListener = new Listener() {
- public void handleEvent(Event e) {
- if (e.type == SWT.Traverse) {
- switch (e.detail) {
- case SWT.TRAVERSE_ESCAPE:
- paramTextEditor.setItem(null);
- break;
- default:
- return;
- }
- }
- paramEditorTx.setVisible(false);
- TableItem item = paramTextEditor.getItem();
- if (item == null) return;
- int column = paramTextEditor.getColumn();
- ParameterData paramData = (ParameterData)item.getData();
- if (column == PARAM_CAST_COLUMN) {
- String text = paramEditorTx.getText();
- paramData.setCast(text);
- item.setText(column, paramData.getCast());
- MetaData metaData = app.getMetaData();
- metaData.setMetaData(paramData.getMethod(), paramData.getParameter(), paramData);
- paramsLt.getColumn(column).pack();
- }
- }
- };
- paramEditorTx.addListener(SWT.DefaultSelection, paramTextListener);
- paramEditorTx.addListener(SWT.FocusOut, paramTextListener);
- paramEditorTx.addListener(SWT.Traverse, paramTextListener);
-
- final Shell floater = new Shell(shell, SWT.NO_TRIM);
- floater.setLayout(new FillLayout());
- paramListEditor = new FlagsEditor(paramsLt);
- paramEditorLt = new List(floater, SWT.MULTI | SWT.BORDER);
- paramEditorLt.setItems(ParameterData.getAllFlags());
- floater.pack();
- floater.addListener(SWT.Close, new Listener() {
- public void handleEvent(Event e) {
- paramListEditor.setItem(null);
- e.doit = false;
- floater.setVisible(false);
- }
- });
- Listener paramListListener = new Listener() {
- public void handleEvent(Event e) {
- if (e.type == SWT.Traverse) {
- switch (e.detail) {
- case SWT.TRAVERSE_RETURN:
- break;
- default:
- return;
- }
- }
- floater.setVisible(false);
- TableItem item = paramListEditor.getItem();
- if (item == null) return;
- int column = paramListEditor.getColumn();
- ParameterData paramData = (ParameterData)item.getData();
- if (column == PARAM_FLAGS_COLUMN) {
- String[] flags = paramEditorLt.getSelection();
- paramData.setFlags(flags);
- item.setText(column, getFlagsString(paramData.getFlags()));
- MetaData metaData = app.getMetaData();
- metaData.setMetaData(paramData.getMethod(), paramData.getParameter(), paramData);
- paramsLt.getColumn(column).pack();
- }
- }
- };
- paramEditorLt.addListener(SWT.DefaultSelection, paramListListener);
- paramEditorLt.addListener(SWT.FocusOut, paramListListener);
- paramEditorLt.addListener(SWT.Traverse, paramListListener);
-
- paramsLt.addListener(SWT.MouseDown, new Listener() {
- public void handleEvent(Event e) {
- if (e.button != 1) return;
- Point pt = new Point(e.x, e.y);
- TableItem item = paramsLt.getItem(pt);
- if (item == null) return;
- int column = -1;
- for (int i = 0; i < paramsLt.getColumnCount(); i++) {
- if (item.getBounds(i).contains(pt)) {
- column = i;
- break;
- }
- }
- if (column == -1) return;
- ParameterData data = (ParameterData)item.getData();
- if (column == PARAM_CAST_COLUMN) {
- paramTextEditor.setColumn(column);
- paramTextEditor.setItem(item);
- paramEditorTx.setText(data.getCast());
- paramEditorTx.selectAll();
- paramEditorTx.setVisible(true);
- paramEditorTx.setFocus();
- } else if (column == PARAM_FLAGS_COLUMN) {
- paramListEditor.setColumn(column);
- paramListEditor.setItem(item);
- paramEditorLt.setSelection(data.getFlags());
- floater.setLocation(paramsLt.toDisplay(e.x, e.y));
- floater.setVisible(true);
- paramEditorLt.setFocus();
- }
- }
- });
-}
-
-Button createActionButton(Composite parent, String text, Listener listener) {
- Button action = new Button(parent, SWT.PUSH);
- action.setText(text);
- GridData data = new GridData(GridData.FILL_HORIZONTAL);
- action.setLayoutData(data);
- action.addListener(SWT.Selection, listener);
- return action;
-}
-
-void createActionButtons(Composite parent) {
- actionsPanel = new Composite(parent, SWT.NONE);
-
- GridData data = new GridData(GridData.FILL_VERTICAL);
- actionsPanel.setLayoutData(data);
-
- GridLayout actionsLayout = new GridLayout();
- actionsLayout.numColumns = 1;
- actionsPanel.setLayout(actionsLayout);
-
- createActionButton(actionsPanel, "Generate &All", new Listener() {
- public void handleEvent(Event e) {
- generateAll();
- }
- });
-
- Label separator = new Label(actionsPanel, SWT.SEPARATOR | SWT.HORIZONTAL);
- data = new GridData(GridData.FILL_HORIZONTAL);
- separator.setLayoutData(data);
- separator = new Label(actionsPanel, SWT.SEPARATOR | SWT.HORIZONTAL);
- data = new GridData(GridData.FILL_HORIZONTAL);
- separator.setLayoutData(data);
-
- createActionButton(actionsPanel, "Generate Structs &Header", new Listener() {
- public void handleEvent(Event e) {
- generateStructsHeader();
- }
- });
- createActionButton(actionsPanel, "Generate &Structs", new Listener() {
- public void handleEvent(Event e) {
- generateStructs();
- }
- });
- createActionButton(actionsPanel, "Generate &Natives", new Listener() {
- public void handleEvent(Event e) {
- generateNatives();
- }
- });
- createActionButton(actionsPanel, "Generate Meta &Data", new Listener() {
- public void handleEvent(Event e) {
- generateMetaData();
- }
- });
- createActionButton(actionsPanel, "Generate Cons&tants", new Listener() {
- public void handleEvent(Event e) {
- generateConstants();
- }
- });
- createActionButton(actionsPanel, "Generate Si&zeof", new Listener() {
- public void handleEvent(Event e) {
- generateSizeof();
- }
- });
-
- Composite filler = new Composite(actionsPanel, SWT.NONE);
- filler.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- progressLabel = new Label(actionsPanel, SWT.NONE);
- data = new GridData(GridData.FILL_HORIZONTAL);
- progressLabel.setLayoutData(data);
- progressLabel.setVisible(false);
-
- progressBar = new ProgressBar(actionsPanel, SWT.NONE);
- data = new GridData(GridData.FILL_HORIZONTAL);
- progressBar.setLayoutData(data);
- progressBar.setVisible(false);
-}
-
-public void run() {
- shell.open();
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch()) display.sleep ();
- }
- cleanup();
-}
-
-String getPackageString(String className) {
- int dot = app.getMainClassName().lastIndexOf('.');
- if (dot == -1) return "";
- return app.getMainClassName().substring(0, dot);
-}
-
-String getClassString(Class clazz) {
- String name = JNIGenerator.getTypeSignature3(clazz);
- int index = name.lastIndexOf('.');
- if (index == -1) return name;
- return name.substring(index + 1, name.length());
-}
-
-String getFlagsString(String[] flags) {
- if (flags.length == 0) return "";
- StringBuffer buffer = new StringBuffer();
- for (int j = 0; j < flags.length; j++) {
- String flag = flags[j];
- if (buffer.length() != 0) buffer.append(", ");
- buffer.append(flag);
- }
- return buffer.toString();
-}
-
-String getMethodString(Method method) {
- String pkgName = getPackageString(method.getDeclaringClass().getName());
- StringBuffer buffer = new StringBuffer();
- buffer.append(method.getName());
- buffer.append("(");
- Class[] params = method.getParameterTypes();
- for (int i = 0; i < params.length; i++) {
- Class param = params[i];
- if (i != 0) buffer.append(",");
- String string = JNIGenerator.getTypeSignature3(param);
- if (string.startsWith(pkgName)) string = string.substring(pkgName.length() + 1);
- buffer.append(string);
- }
- buffer.append(")");
- return buffer.toString();
-}
-
-String getFieldString(Field field) {
- return field.getName();
-}
-
-void updateClasses() {
- classesLt.removeAll();
- MetaData metaData = app.getMetaData();
- Class[] classes = app.getClasses();
- for (int i = 0; i < classes.length; i++) {
- Class clazz = classes[i];
- ClassData classData = metaData.getMetaData(clazz);
- TableItem item = new TableItem(classesLt, SWT.NONE);
- item.setData(classData);
- item.setText(CLASS_NAME_COLUMN, getClassString(clazz));
- item.setText(CLASS_FLAGS_COLUMN, getFlagsString(classData.getFlags()));
- item.setChecked(classData.getGenerate());
- }
- TableColumn[] columns = classesLt.getColumns();
- for (int i = 0; i < columns.length; i++) {
- TableColumn column = columns[i];
- column.pack();
- }
-}
-
-void updateMembers() {
- membersLt.removeAll();
- MetaData metaData = app.getMetaData();
- membersLt.setHeaderVisible(false);
- TableColumn[] columns = membersLt.getColumns();
- for (int i = 0; i < columns.length; i++) {
- TableColumn column = columns[i];
- column.dispose();
- }
- int[] indices = classesLt.getSelectionIndices();
- if (indices.length != 1) return;
- TableItem classItem = classesLt.getItem(indices[0]);
- ClassData classData = (ClassData)classItem.getData();
- Class clazz = classData.getClazz();
- boolean hasNatives = false;
- Method[] methods = clazz.getDeclaredMethods();
- for (int i = 0; i < methods.length; i++) {
- Method method = methods[i];
- int mods = method.getModifiers();
- if (hasNatives =((mods & Modifier.NATIVE) != 0)) break;
- }
- membersLt.setRedraw(false);
- if (hasNatives) {
- TableColumn column;
- column = new TableColumn(membersLt, SWT.NONE, METHOD_NAME_COLUMN);
- column.setText("Method");
- column = new TableColumn(membersLt, SWT.NONE, METHOD_FLAGS_COLUMN);
- column.setText("Flags");
- column = new TableColumn(membersLt, SWT.NONE, METHOD_ACCESSOR_COLUMN);
- column.setText("Accessor");
- /*
- column = new TableColumn(membersLt, SWT.NONE, METHOD_EXCLUDE_COLUMN);
- column.setText("Exclude");
- */
- JNIGenerator.sort(methods);
- for (int i = 0; i < methods.length; i++) {
- Method method = methods[i];
- if ((method.getModifiers() & Modifier.NATIVE) == 0) continue;
- MethodData methodData = metaData.getMetaData(method);
- TableItem item = new TableItem(membersLt, SWT.NONE);
- item.setData(methodData);
- item.setText(METHOD_NAME_COLUMN, getMethodString(method));
- item.setChecked(methodData.getGenerate());
- item.setText(METHOD_FLAGS_COLUMN, getFlagsString(methodData.getFlags()));
- item.setText(METHOD_ACCESSOR_COLUMN, methodData.getAccessor());
- /*
- item.setText(METHOD_EXCLUDE_COLUMN, methodData.getExclude());
- */
- }
- } else {
- TableColumn column;
- column = new TableColumn(membersLt, SWT.NONE, FIELD_NAME_COLUMN);
- column.setText("Field");
- column = new TableColumn(membersLt, SWT.NONE, FIELD_FLAGS_COLUMN);
- column.setText("Flags");
- column = new TableColumn(membersLt, SWT.NONE, FIELD_CAST_COLUMN);
- column.setText("Cast");
- column = new TableColumn(membersLt, SWT.NONE, FIELD_ACCESSOR_COLUMN);
- column.setText("Accessor");
- /*
- column = new TableColumn(membersLt, SWT.NONE, FIELD_EXCLUDE_COLUMN);
- column.setText("Exclude");
- */
- Field[] fields = clazz.getDeclaredFields();
- for (int i = 0; i < fields.length; i++) {
- Field field = fields[i];
- int mods = field.getModifiers();
- if (((mods & Modifier.PUBLIC) == 0) ||
- ((mods & Modifier.FINAL) != 0) ||
- ((mods & Modifier.STATIC) != 0)) continue;
- FieldData fieldData = metaData.getMetaData(field);
- TableItem item = new TableItem(membersLt, SWT.NONE);
- item.setData(fieldData);
- item.setText(FIELD_NAME_COLUMN, getFieldString(field));
- item.setChecked(fieldData.getGenerate());
- item.setText(FIELD_CAST_COLUMN, fieldData.getCast());
- item.setText(FIELD_FLAGS_COLUMN, getFlagsString(fieldData.getFlags()));
- item.setText(FIELD_ACCESSOR_COLUMN, fieldData.getAccessor());
- /*
- item.setText(FIELD_EXCLUDE_COLUMN, fieldData.getExclude());
- */
- }
- }
- columns = membersLt.getColumns();
- for (int i = 0; i < columns.length; i++) {
- TableColumn column = columns[i];
- column.pack();
- }
- membersLt.setHeaderVisible(true);
- membersLt.setRedraw(true);
-}
-
-void updateParameters() {
- paramsLt.removeAll();
- MetaData metaData = app.getMetaData();
- int[] indices = membersLt.getSelectionIndices();
- if (indices.length != 1) {
- paramsLt.setHeaderVisible(false);
- return;
- }
- TableItem memberItem = membersLt.getItem(indices[0]);
- Object data = memberItem.getData();
- if (!(data instanceof MethodData)) return;
- paramsLt.setRedraw(false);
- MethodData methodData = (MethodData)memberItem.getData();
- Method method = methodData.getMethod();
- Class[] params = method.getParameterTypes();
- for (int i = 0; i < params.length; i++) {
- Class param = params[i];
- ParameterData paramData = metaData.getMetaData(method, i);
- TableItem item = new TableItem(paramsLt, SWT.NONE);
- item.setData(paramData);
- item.setText(PARAM_INDEX_COLUMN, String.valueOf(i));
- item.setText(PARAM_TYPE_COLUMN, getClassString(param));
- item.setText(PARAM_CAST_COLUMN, paramData.getCast());
- item.setText(PARAM_FLAGS_COLUMN, getFlagsString(paramData.getFlags()));
- }
- TableColumn[] columns = paramsLt.getColumns();
- for (int i = 0; i < columns.length; i++) {
- TableColumn column = columns[i];
- column.pack();
- }
- paramsLt.setRedraw(true);
- paramsLt.setHeaderVisible(true);
-}
-
-void updateGenerate(TableItem item) {
- MetaData metaData = app.getMetaData();
- ItemData itemData = (ItemData)item.getData();
- itemData.setGenerate(item.getChecked());
- if (itemData instanceof ClassData) {
- ClassData data = (ClassData)itemData;
- metaData.setMetaData(data.getClazz(), data);
- } else if (itemData instanceof FieldData) {
- FieldData data = (FieldData)itemData;
- item.setText(FIELD_FLAGS_COLUMN, getFlagsString(data.getFlags()));
- metaData.setMetaData(data.getField(), data);
- } else if (itemData instanceof MethodData) {
- MethodData data = (MethodData)itemData;
- item.setText(METHOD_FLAGS_COLUMN, getFlagsString(data.getFlags()));
- metaData.setMetaData(data.getMethod(), data);
- } else if (itemData instanceof ParameterData) {
- ParameterData data = (ParameterData)itemData;
- item.setText(PARAM_FLAGS_COLUMN, getFlagsString(data.getFlags()));
- metaData.setMetaData(data.getMethod(), data.getParameter(), data);
- }
-}
-
-boolean updateOutputDir() {
- String outputDirStr = outputDirCb.getText();
- File file = new File(outputDirStr);
- if (!file.exists()) {
- MessageBox dialog = new MessageBox(shell, SWT.OK | SWT.ICON_ERROR);
- dialog.setMessage("Output directory does not exist.");
- dialog.open();
- return false;
- }
- if (!file.isDirectory()) {
- MessageBox dialog = new MessageBox(shell, SWT.OK | SWT.ICON_ERROR);
- dialog.setMessage("Output directory is not a directory.");
- dialog.open();
- return false;
- }
- if (outputDirStr.length() > 0) {
- if (!outputDirStr.equals(app.getOutputDir())) {
- app.setOutputDir(outputDirStr);
- }
- if (outputDirCb.indexOf(outputDirStr) == -1) {
- outputDirCb.add(outputDirStr);
- }
- }
- return true;
-}
-
-void updateMainClass() {
- String mainClassStr = mainClassCb.getText();
- if (mainClassStr.length() > 0) {
- if (!mainClassStr.equals(app.getMainClassName())) {
- app.setMainClassName(mainClassStr);
- }
- if (mainClassCb.indexOf(mainClassStr) == -1) {
- mainClassCb.add(mainClassStr);
- }
- if (app.getOutputDir() != null) {
- int index = outputDirCb.indexOf(app.getOutputDir());
- if (index != -1) outputDirCb.select(index);
- }
- }
-}
-
-public static void main(String[] args) {
- JNIGeneratorApp gen = new JNIGeneratorApp ();
- if (args.length > 0) {
- gen.setMainClassName(args[0]);
- if (args.length > 1) gen.setOutputDir(args[1]);
- } else {
- gen.setMainClassName(JNIGeneratorApp.getDefaultMainClass());
- }
- JNIGeneratorAppUI ui = new JNIGeneratorAppUI(gen);
- ui.open();
- ui.run();
-}
-
-}
diff --git a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/MetaData.java b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/MetaData.java
deleted file mode 100644
index 41bf86a8f7..0000000000
--- a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/MetaData.java
+++ /dev/null
@@ -1,165 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tools.internal;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-import java.util.Properties;
-
-public class MetaData {
-
- Properties data;
-
-public MetaData(String mainClass) {
- data = new Properties();
- int index = 0;
- Class clazz = getClass();
- int length = mainClass.length();
- while (index < length) {
- index = mainClass.indexOf('.', index);
- if (index == -1) index = length;
- InputStream is = clazz.getResourceAsStream(mainClass.substring(0, index) + ".properties");
- if (is != null) {
- try {
- data.load(is);
- } catch (IOException e) {
- } finally {
- try {
- is.close();
- } catch (IOException e) {}
- }
-
- }
- index++;
- }
-}
-
-public MetaData(Properties data) {
- this.data = data;
-}
-
-public ClassData getMetaData(Class clazz) {
- String key = JNIGenerator.toC(clazz.getName());
- String value = getMetaData(key, "");
- return new ClassData(clazz, value);
-}
-
-public FieldData getMetaData(Field field) {
- String className = JNIGenerator.getClassName(field.getDeclaringClass());
- String key = className + "_" + field.getName();
- String value = getMetaData(key, "");
- return new FieldData(field, value);
-}
-
-boolean convertTo32Bit(Class[] paramTypes) {
- boolean changed = false;
- for (int i = 0; i < paramTypes.length; i++) {
- Class paramType = paramTypes[i];
- if (paramType == Long.TYPE) {
- paramTypes[i] = Integer.TYPE;
- changed = true;
- }
- if (paramType == long[].class) {
- paramTypes[i] = int[].class;
- changed = true;
- }
- }
- return changed;
-}
-
-public MethodData getMetaData(Method method) {
- String className = JNIGenerator.getClassName(method.getDeclaringClass());
- String key = className + "_" + JNIGenerator.getFunctionName(method);
- String value = getMetaData(key, null);
- if (value == null) {
- key = className + "_" + method.getName();
- value = getMetaData(key, null);
- }
- /*
- * Support for 64 bit port.
- */
- if (value == null) {
- Class[] paramTypes = method.getParameterTypes();
- if (convertTo32Bit(paramTypes)) {
- key = className + "_" + JNIGenerator.getFunctionName(method, paramTypes);
- value = getMetaData(key, null);
- }
- }
- if (value == null) value = "";
- return new MethodData(method, value);
-}
-
-public ParameterData getMetaData(Method method, int parameter) {
- String className = JNIGenerator.getClassName(method.getDeclaringClass());
- String key = className + "_" + JNIGenerator.getFunctionName(method) + "_" + parameter;
- String value = getMetaData(key, null);
- if (value == null) {
- key = className + "_" + method.getName() + "_" + parameter;
- value = getMetaData(key, null);
- }
- /*
- * Support for 64 bit port.
- */
- if (value == null) {
- Class[] paramTypes = method.getParameterTypes();
- if (convertTo32Bit(paramTypes)) {
- key = className + "_" + JNIGenerator.getFunctionName(method, paramTypes) + "_" + parameter;
- value = getMetaData(key, null);
- }
- }
- if (value == null) value = "";
- return new ParameterData(method, parameter, value);
-}
-
-public String getMetaData(String key, String defaultValue) {
- return data.getProperty(key, defaultValue);
-}
-
-public void setMetaData(Class clazz, ClassData value) {
- String key = JNIGenerator.toC(clazz.getName());
- setMetaData(key, value.toString());
-}
-
-public void setMetaData(Field field, FieldData value) {
- String className = JNIGenerator.getClassName(field.getDeclaringClass());
- String key = className + "_" + field.getName();
- setMetaData(key, value.toString());
-}
-
-public void setMetaData(Method method, MethodData value) {
- String key;
- String className = JNIGenerator.getClassName(method.getDeclaringClass());
- if (JNIGenerator.isNativeUnique(method)) {
- key = className + "_" + method.getName ();
- } else {
- key = className + "_" + JNIGenerator.getFunctionName(method);
- }
- setMetaData(key, value.toString());
-}
-
-public void setMetaData(Method method, int arg, ParameterData value) {
- String key;
- String className = JNIGenerator.getClassName(method.getDeclaringClass());
- if (JNIGenerator.isNativeUnique(method)) {
- key = className + "_" + method.getName () + "_" + arg;
- } else {
- key = className + "_" + JNIGenerator.getFunctionName(method) + "_" + arg;
- }
- setMetaData(key, value.toString());
-}
-
-public void setMetaData(String key, String value) {
- data.setProperty(key, value);
-}
-
-}
diff --git a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/MetaDataGenerator.java b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/MetaDataGenerator.java
deleted file mode 100644
index bd7d116d8c..0000000000
--- a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/MetaDataGenerator.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tools.internal;
-
-import java.lang.reflect.*;
-
-public class MetaDataGenerator extends JNIGenerator {
-
-public void generateCopyright() {
- generateMetaData("swt_properties_copyright");
-}
-
-public void generate(Class clazz) {
- output(toC(clazz.getName()));
- output("=");
- ClassData data = getMetaData().getMetaData(clazz);
- if (data != null) output(data.toString());
- outputln();
- Field[] fields = clazz.getDeclaredFields();
- generate(fields);
- Method[] methods = clazz.getDeclaredMethods();
- generate(methods);
- outputln();
-}
-
-public void generate(Field[] fields) {
- for (int i = 0; i < fields.length; i++) {
- Field field = fields[i];
- int mods = field.getModifiers();
- if ((mods & Modifier.PUBLIC) == 0) continue;
- if ((mods & Modifier.FINAL) != 0) continue;
- if ((mods & Modifier.STATIC) != 0) continue;
- generate(field);
- outputln();
- if (progress != null) progress.step();
- }
-}
-
-public void generate(Field field) {
- output(getClassName(field.getDeclaringClass()));
- output("_");
- output(field.getName());
- output("=");
- FieldData data = getMetaData().getMetaData(field);
- if (data != null) output(data.toString());
-}
-
-public void generate(Method[] methods) {
- sort(methods);
- for (int i = 0; i < methods.length; i++) {
- Method method = methods[i];
- if ((method.getModifiers() & Modifier.NATIVE) == 0) continue;
- generate(method);
- outputln();
- if (progress != null) progress.step();
- }
-}
-
-public void generate(Method method) {
- StringBuffer buffer = new StringBuffer();
- buffer.append(getClassName(method.getDeclaringClass()));
- buffer.append("_");
- if (isNativeUnique(method)) {
- buffer.append(method.getName());
- } else {
- buffer.append(getFunctionName(method));
- }
- String key = buffer.toString();
- output(key);
- output("=");
- MethodData methodData = getMetaData().getMetaData(method);
- if (methodData != null) output(methodData.toString());
- outputln();
- int length = method.getParameterTypes().length;
- for (int i = 0; i < length; i++) {
- output(key);
- output("_");
- output(i + "=");
- ParameterData paramData = getMetaData().getMetaData(method, i);
- if (paramData != null) output(paramData.toString());
- outputln();
- }
-}
-
-public String getExtension() {
- return ".properties";
-}
-
-public String getOutputName() {
- return getMainClass().getName();
-}
-
-protected boolean getGenerate(Class clazz) {
- return true;
-}
-
-}
diff --git a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/MethodData.java b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/MethodData.java
deleted file mode 100644
index 8948c83c5a..0000000000
--- a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/MethodData.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tools.internal;
-
-import java.lang.reflect.Method;
-
-public class MethodData extends ItemData {
-
- Method method;
-
-public MethodData(Method method, String str) {
- super(str);
- this.method = method;
-}
-
-public static String[] getAllFlags() {
- return new String[]{"no_gen", "address", "const", "dynamic", "cpp", "new", "delete"};
-}
-
-public Method getMethod() {
- return method;
-}
-
-public String getAccessor() {
- return (String)getParam("accessor");
-}
-
-public String getExclude() {
- return (String)getParam("exclude");
-}
-
-public void setAccessor(String str) {
- setParam("accessor", str);
-}
-
-public void setExclude(String str) {
- setParam("exclude", str);
-}
-
-}
diff --git a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/NativesGenerator.java b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/NativesGenerator.java
deleted file mode 100644
index bf05a67b51..0000000000
--- a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/NativesGenerator.java
+++ /dev/null
@@ -1,761 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tools.internal;
-
-import java.lang.reflect.*;
-import java.util.HashSet;
-import java.util.Iterator;
-
-public class NativesGenerator extends JNIGenerator {
-
-boolean enterExitMacro;
-
-public NativesGenerator() {
- enterExitMacro = true;
-}
-
-public void generateCopyright() {
- generateMetaData("swt_copyright");
-}
-
-public void generateIncludes() {
- String outputName = getOutputName();
- outputln("#include \"swt.h\"");
- output("#include \"");
- output(outputName);
- outputln("_structs.h\"");
- output("#include \"");
- output(outputName);
- outputln("_stats.h\"");
- outputln();
-}
-
-public void generate(Class clazz, String methodName) {
- Method[] methods = clazz.getDeclaredMethods();
- int count = 0;
- for (int i = 0; i < methods.length; i++) {
- if (methods[i].getName().startsWith(methodName)) count++;
- }
- Method[] result = new Method[count];
- count = 0;
- for (int i = 0; i < methods.length; i++) {
- if (methods[i].getName().startsWith(methodName)) result[count++] = methods[i];
- }
- generate(result);
-}
-
-public void generate(Class clazz) {
- Method[] methods = clazz.getDeclaredMethods();
- int i = 0;
- for (; i < methods.length; i++) {
- Method method = methods[i];
- if ((method.getModifiers() & Modifier.NATIVE) != 0) break;
- }
- if (i == methods.length) return;
- sort(methods);
- if (isCPP) {
- outputln("extern \"C\" {");
- outputln();
- }
- generateNativeMacro(clazz);
- generateExcludes(methods);
- generate(methods);
- if (isCPP) {
- outputln("}");
- }
-}
-
-public void generate(Method[] methods) {
- sort(methods);
- for (int i = 0; i < methods.length; i++) {
- Method method = methods[i];
- if ((method.getModifiers() & Modifier.NATIVE) == 0) continue;
- generate(method);
- if (progress != null) progress.step();
- }
-}
-
-public void generate(Method method) {
- MethodData methodData = getMetaData().getMetaData(method);
- if (methodData.getFlag("no_gen")) return;
- Class returnType = method.getReturnType();
- Class[] paramTypes = method.getParameterTypes();
- String function = getFunctionName(method);
-
- if (!(returnType == Void.TYPE || returnType.isPrimitive())) {
- output("Warning: bad return type. :");
- outputln(method.toString());
- return;
- }
-
- generateSourceStart(function);
- generateFunctionPrototype(method, function, paramTypes, returnType);
- generateFunctionBody(method, methodData, function, paramTypes, returnType);
- generateSourceEnd(function);
- outputln();
-}
-
-public void setEnterExitMacro(boolean enterExitMacro) {
- this.enterExitMacro = enterExitMacro;
-}
-
-void generateExcludes(Method[] methods) {
- HashSet excludes = new HashSet();
- for (int i = 0; i < methods.length; i++) {
- Method method = methods[i];
- if ((method.getModifiers() & Modifier.NATIVE) == 0) continue;
- MethodData methodData = getMetaData().getMetaData(method);
- String exclude = methodData.getExclude();
- if (exclude.length() != 0) {
- excludes.add(exclude);
- }
- }
- for (Iterator iter = excludes.iterator(); iter.hasNext();) {
- String exclude = (String)iter.next();
- outputln(exclude);
- for (int i = 0; i < methods.length; i++) {
- Method method = methods[i];
- if ((method.getModifiers() & Modifier.NATIVE) == 0) continue;
- MethodData methodData = getMetaData().getMetaData(method);
- String methodExclude = methodData.getExclude();
- if (exclude.equals(methodExclude)) {
- output("#define NO_");
- outputln(getFunctionName(method));
- }
- }
- outputln("#endif");
- outputln();
- }
-}
-
-void generateNativeMacro(Class clazz) {
- output("#define ");
- output(getClassName(clazz));
- output("_NATIVE(func) Java_");
- output(toC(clazz.getName()));
- outputln("_##func");
- outputln();
-}
-
-void generateGetParameter(int i, Class paramType, ParameterData paramData, boolean critical) {
- if (paramType.isPrimitive()) return;
- String iStr = String.valueOf(i);
- output("\tif (arg");
- output(iStr);
- output(") lparg");
- output(iStr);
- output(" = ");
- if (paramType.isArray()) {
- Class componentType = paramType.getComponentType();
- if (componentType.isPrimitive()) {
- if (critical) {
- if (isCPP) {
- output("env->GetPrimitiveArrayCritical(arg");
- } else {
- output("(*env)->GetPrimitiveArrayCritical(env, arg");
- }
- output(iStr);
- output(", NULL);");
- } else {
- if (isCPP) {
- output("env->Get");
- } else {
- output("(*env)->Get");
- }
- output(getTypeSignature1(componentType));
- if (isCPP) {
- output("ArrayElements(arg");
- } else {
- output("ArrayElements(env, arg");
- }
- output(iStr);
- output(", NULL);");
- }
- } else {
- throw new Error("not done");
- }
- } else if (paramType == String.class) {
- if (paramData.getFlag("unicode")) {
- if (isCPP) {
- output("env->GetStringChars(arg");
- } else {
- output("(*env)->GetStringChars(env, arg");
- }
- output(iStr);
- output(", NULL);");
- } else {
- if (isCPP) {
- output("env->GetStringUTFChars(arg");
- } else {
- output("(*env)->GetStringUTFChars(env, arg");
- }
- output(iStr);
- output(", NULL);");
- }
- } else {
- if (paramData.getFlag("no_in")) {
- output("&_arg");
- output(iStr);
- output(";");
- } else {
- output("get");
- output(getClassName(paramType));
- output("Fields(env, arg");
- output(iStr);
- output(", &_arg");
- output(iStr);
- output(");");
- }
- }
- outputln();
-}
-
-void generateSetParameter(int i, Class paramType, ParameterData paramData, boolean critical) {
- if (paramType.isPrimitive()) return;
- String iStr = String.valueOf(i);
- if (paramType.isArray()) {
- output("\tif (arg");
- output(iStr);
- output(") ");
- Class componentType = paramType.getComponentType();
- if (componentType.isPrimitive()) {
- if (critical) {
- if (isCPP) {
- output("env->ReleasePrimitiveArrayCritical(arg");
- } else {
- output("(*env)->ReleasePrimitiveArrayCritical(env, arg");
- }
- output(iStr);
- } else {
- if (isCPP) {
- output("env->Release");
- } else {
- output("(*env)->Release");
- }
- output(getTypeSignature1(componentType));
- if (isCPP) {
- output("ArrayElements(arg");
- } else {
- output("ArrayElements(env, arg");
- }
- output(iStr);
- }
- output(", lparg");
- output(iStr);
- output(", ");
- if (paramData.getFlag("no_out")) {
- output("JNI_ABORT");
- } else {
- output("0");
- }
- output(");");
- } else {
- throw new Error("not done");
- }
- outputln();
- } else if (paramType == String.class) {
- output("\tif (arg");
- output(iStr);
- output(") ");
- if (paramData.getFlag("unicode")) {
- if (isCPP) {
- output("env->ReleaseStringChars(arg");
- } else {
- output("(*env)->ReleaseStringChars(env, arg");
- }
- } else {
- if (isCPP) {
- output("env->ReleaseStringUTFChars(arg");
- } else {
- output("(*env)->ReleaseStringUTFChars(env, arg");
- }
- }
- output(iStr);
- output(", lparg");
- output(iStr);
- outputln(");");
- } else {
- if (!paramData.getFlag("no_out")) {
- output("\tif (arg");
- output(iStr);
- output(") ");
- output("set");
- output(getClassName(paramType));
- output("Fields(env, arg");
- output(iStr);
- output(", lparg");
- output(iStr);
- outputln(");");
- }
- }
-}
-
-void generateExitMacro(Method method, String function) {
- if (!enterExitMacro) return;
- output("\t");
- output(getClassName(method.getDeclaringClass()));
- output("_NATIVE_EXIT(env, that, ");
- output(function);
- outputln("_FUNC);");
-}
-
-void generateEnterMacro(Method method, String function) {
- if (!enterExitMacro) return;
- output("\t");
- output(getClassName(method.getDeclaringClass()));
- output("_NATIVE_ENTER(env, that, ");
- output(function);
- outputln("_FUNC);");
-}
-
-boolean generateLocalVars(Method method, Class[] paramTypes, Class returnType) {
- boolean needsReturn = enterExitMacro;
- for (int i = 0; i < paramTypes.length; i++) {
- Class paramType = paramTypes[i];
- if (paramType.isPrimitive()) continue;
- ParameterData paramData = getMetaData().getMetaData(method, i);
- output("\t");
- if (paramType.isArray()) {
- Class componentType = paramType.getComponentType();
- if (componentType.isPrimitive()) {
- output(getTypeSignature2(componentType));
- output(" *lparg" + i);
- output("=NULL;");
- } else {
- throw new Error("not done");
- }
- } else if (paramType == String.class) {
- if (paramData.getFlag("unicode")) {
- output("const jchar *lparg" + i);
- } else {
- output("const char *lparg" + i);
- }
- output("= NULL;");
- } else {
- output(getClassName(paramType));
- output(" _arg" + i);
- if (paramData.getFlag("init")) output("={0}");
- output(", *lparg" + i);
- output("=NULL;");
- }
- outputln();
- needsReturn = true;
- }
- if (needsReturn) {
- if (returnType != Void.TYPE) {
- output("\t");
- output(getTypeSignature2(returnType));
- outputln(" rc;");
- }
- }
- return needsReturn;
-}
-
-void generateGetters(Method method, Class[] paramTypes) {
- int criticalCount = 0;
- for (int i = 0; i < paramTypes.length; i++) {
- Class paramType = paramTypes[i];
- ParameterData paramData = getMetaData().getMetaData(method, i);
- if (!isCritical(paramType, paramData)) {
- generateGetParameter(i, paramType, paramData, false);
- } else {
- criticalCount++;
- }
- }
- if (criticalCount != 0) {
- outputln("#ifdef JNI_VERSION_1_2");
- outputln("\tif (IS_JNI_1_2) {");
- for (int i = 0; i < paramTypes.length; i++) {
- Class paramType = paramTypes[i];
- ParameterData paramData = getMetaData().getMetaData(method, i);
- if (isCritical(paramType, paramData)) {
- output("\t");
- generateGetParameter(i, paramType, paramData, true);
- }
- }
- outputln("\t} else");
- outputln("#endif");
- outputln("\t{");
- for (int i = 0; i < paramTypes.length; i++) {
- Class paramType = paramTypes[i];
- ParameterData paramData = getMetaData().getMetaData(method, i);
- if (isCritical(paramType, paramData)) {
- output("\t");
- generateGetParameter(i, paramType, paramData, false);
- }
- }
- outputln("\t}");
- }
-}
-
-void generateSetters(Method method, Class[] paramTypes) {
- int criticalCount = 0;
- for (int i = paramTypes.length - 1; i >= 0; i--) {
- Class paramType = paramTypes[i];
- ParameterData paramData = getMetaData().getMetaData(method, i);
- if (isCritical(paramType, paramData)) {
- criticalCount++;
- }
- }
- if (criticalCount != 0) {
- outputln("#ifdef JNI_VERSION_1_2");
- outputln("\tif (IS_JNI_1_2) {");
- for (int i = paramTypes.length - 1; i >= 0; i--) {
- Class paramType = paramTypes[i];
- ParameterData paramData = getMetaData().getMetaData(method, i);
- if (isCritical(paramType, paramData)) {
- output("\t");
- generateSetParameter(i, paramType, paramData, true);
- }
- }
- outputln("\t} else");
- outputln("#endif");
- outputln("\t{");
- for (int i = paramTypes.length - 1; i >= 0; i--) {
- Class paramType = paramTypes[i];
- ParameterData paramData = getMetaData().getMetaData(method, i);
- if (isCritical(paramType, paramData)) {
- output("\t");
- generateSetParameter(i, paramType, paramData, false);
- }
- }
- outputln("\t}");
- }
- for (int i = paramTypes.length - 1; i >= 0; i--) {
- Class paramType = paramTypes[i];
- ParameterData paramData = getMetaData().getMetaData(method, i);
- if (!isCritical(paramType, paramData)) {
- generateSetParameter(i, paramType, paramData, false);
- }
- }
-}
-
-void generateDynamicFunctionCall(Method method, MethodData methodData, Class[] paramTypes, Class returnType, boolean needsReturn) {
- outputln("/*");
- generateFunctionCall(method, methodData, paramTypes, returnType, needsReturn);
- outputln("*/");
- outputln("\t{");
-
- if (getPlatform().equals("win32")) {
- outputln("\t\tstatic int initialized = 0;");
- outputln("\t\tstatic HMODULE hm = NULL;");
- outputln("\t\tstatic FARPROC fp = NULL;");
- if (returnType != Void.TYPE) {
- if (needsReturn) {
- outputln("\t\trc = 0;");
- }
- }
- outputln("\t\tif (!initialized) {");
- output("\t\t\tif (!(hm = GetModuleHandle(");
- output(method.getName());
- output("_LIB))) hm = LoadLibrary(");
- output(method.getName());
- outputln("_LIB);");
- output("\t\t\tif (hm) fp = GetProcAddress(hm, \"");
- output(method.getName());
- outputln("\");");
- outputln("\t\t\tinitialized = 1;");
- outputln("\t\t}");
- outputln("\t\tif (fp) {");
- output("\t\t");
- generateFunctionCallLeftSide(method, methodData, returnType, needsReturn);
- output("fp");
- generateFunctionCallRightSide(method, methodData, paramTypes, 0);
- outputln();
- outputln("\t\t}");
- } else {
- outputln("\t\tstatic int initialized = 0;");
- outputln("\t\tstatic void *handle = NULL;");
- output("\t\ttypedef ");
- output(getTypeSignature2(returnType));
- output(" (*FPTR)(");
- for (int i = 0; i < paramTypes.length; i++) {
- if (i != 0) output(", ");
- Class paramType = paramTypes[i];
- ParameterData paramData = getMetaData().getMetaData(method, i);
- String cast = paramData.getCast();
- if (cast.length() > 2) {
- output(cast.substring(1, cast.length() - 1));
- } else {
- output(getTypeSignature4(paramType));
- }
- }
- outputln(");");
- outputln("\t\tstatic FPTR fptr;");
- if (returnType != Void.TYPE) {
- if (needsReturn) {
- outputln("\t\trc = 0;");
- }
- }
- outputln("\t\tif (!initialized) {");
- output("\t\t\tif (!handle) handle = dlopen(");
- output(method.getName());
- outputln("_LIB, RTLD_LAZY);");
- output("\t\t\tif (handle) fptr = (FPTR)dlsym(handle, \"");
- output(method.getName());
- outputln("\");");
- outputln("\t\t\tinitialized = 1;");
- outputln("\t\t}");
- outputln("\t\tif (fptr) {");
- output("\t\t");
- generateFunctionCallLeftSide(method, methodData, returnType, needsReturn);
- output("(*fptr)");
- generateFunctionCallRightSide(method, methodData, paramTypes, 0);
- outputln();
- outputln("\t\t}");
- }
-
- outputln("\t}");
-}
-
-void generateFunctionCallLeftSide(Method method, MethodData methodData, Class returnType, boolean needsReturn) {
- output("\t");
- if (returnType != Void.TYPE) {
- if (needsReturn) {
- output("rc = ");
- } else {
- output("return ");
- }
- output("(");
- output(getTypeSignature2(returnType));
- output(")");
- }
- if (methodData.getFlag("address")) {
- output("&");
- }
-}
-
-void generateFunctionCallRightSide(Method method, MethodData methodData, Class[] paramTypes, int paramStart) {
- if (!methodData.getFlag("const")) {
- output("(");
- for (int i = paramStart; i < paramTypes.length; i++) {
- Class paramType = paramTypes[i];
- ParameterData paramData = getMetaData().getMetaData(method, i);
- if (i != paramStart) output(", ");
- if (paramData.getFlag("struct")) output("*");
- output(paramData.getCast());
- if (!paramType.isPrimitive()) output("lp");
- output("arg" + i);
- }
- output(")");
- }
- output(";");
-}
-
-void generateFunctionCall(Method method, MethodData methodData, Class[] paramTypes, Class returnType, boolean needsReturn) {
- String copy = (String)methodData.getParam("copy");
- boolean makeCopy = copy.length() != 0 && isCPP && returnType != Void.TYPE;
- if (makeCopy) {
- output("\t");
- output(copy);
- output(" temp = ");
- } else {
- generateFunctionCallLeftSide(method, methodData, returnType, needsReturn);
- }
- int paramStart = 0;
- if (method.getName().equalsIgnoreCase("call")) {
- output("(");
- ParameterData paramData = getMetaData().getMetaData(method, 0);
- String cast = paramData.getCast();
- if (cast.length() != 0 && !cast.equals("()")) {
- output(cast);
- } else {
- output("(");
- output(getTypeSignature2(returnType));
- output(" (*)())");
- }
- output("arg0)");
- paramStart = 1;
- } else if (method.getName().startsWith("VtblCall")) {
- output("((");
- output(getTypeSignature2(returnType));
- output(" (STDMETHODCALLTYPE *)(");
- for (int i = 1; i < paramTypes.length; i++) {
- if (i != 1) output(", ");
- Class paramType = paramTypes[i];
- output(getTypeSignature4(paramType));
- }
- output("))(*(int **)arg1)[arg0])");
- paramStart = 1;
- } else if (methodData.getFlag("cpp")) {
- output("(");
- ParameterData paramData = getMetaData().getMetaData(method, 0);
- if (paramData.getFlag("struct")) output("*");
- String cast = paramData.getCast();
- if (cast.length() != 0 && !cast.equals("()")) {
- output(cast);
- }
- output("arg0)->");
- String accessor = methodData.getAccessor();
- if (accessor.length() != 0) {
- output(accessor);
- } else {
- int index = -1;
- String name = method.getName();
- if ((index = name.indexOf('_')) != -1) {
- output(name.substring(index + 1, name.length()));
- } else {
- output(name);
- }
- }
- paramStart = 1;
- } else if (methodData.getFlag("new")) {
- output("new ");
- String accessor = methodData.getAccessor();
- if (accessor.length() != 0) {
- output(accessor);
- } else {
- int index = -1;
- String name = method.getName();
- if ((index = name.indexOf('_')) != -1) {
- output(name.substring(0, index));
- } else {
- output(name);
- }
- }
- } else if (methodData.getFlag("delete")) {
- output("delete ");
- ParameterData paramData = getMetaData().getMetaData(method, 0);
- String cast = paramData.getCast();
- if (cast.length() != 0 && !cast.equals("()")) {
- output(cast);
- }
- outputln("arg0;");
- return;
- } else {
- String accessor = methodData.getAccessor();
- if (accessor.length() != 0) {
- output(accessor);
- } else {
- output(method.getName());
- }
- }
- generateFunctionCallRightSide(method, methodData, paramTypes, paramStart);
- outputln();
- if (makeCopy) {
- outputln("\t{");
- output("\t\t");
- output(copy);
- output("* copy = new ");
- output(copy);
- outputln("();");
- outputln("\t\t*copy = temp;");
- output("\t\trc = ");
- output("(");
- output(getTypeSignature2(returnType));
- output(")");
- outputln("copy;");
- outputln("\t}");
- }
-}
-
-void generateReturn(Method method, Class returnType, boolean needsReturn) {
- if (needsReturn && returnType != Void.TYPE) {
- outputln("\treturn rc;");
- }
-}
-
-void generateGTKmemmove(Method method, String function, Class[] paramTypes) {
- generateEnterMacro(method, function);
- output("\t");
- boolean get = paramTypes[0].isPrimitive();
- String className = getClassName(paramTypes[get ? 1 : 0]);
- output(get ? "if (arg1) get" : "if (arg0) set");
- output(className);
- output(get ? "Fields(env, arg1, (" : "Fields(env, arg0, (");
- output(className);
- output(get ? " *)arg0)" : " *)arg1)");
- outputln(";");
- generateExitMacro(method, function);
-}
-
-void generateFunctionBody(Method method, MethodData methodData, String function, Class[] paramTypes, Class returnType) {
- outputln("{");
-
- /* Custom GTK memmoves. */
- boolean isGTKmemove = method.getName().equals("memmove") && paramTypes.length == 2 && returnType == Void.TYPE;
- if (isGTKmemove) {
- generateGTKmemmove(method, function, paramTypes);
- } else {
- boolean needsReturn = generateLocalVars(method, paramTypes, returnType);
- generateEnterMacro(method, function);
- generateGetters(method, paramTypes);
- if (methodData.getFlag("dynamic")) {
- generateDynamicFunctionCall(method, methodData, paramTypes, returnType, needsReturn);
- } else {
- generateFunctionCall(method, methodData, paramTypes, returnType, needsReturn);
- }
- generateSetters(method, paramTypes);
- generateExitMacro(method, function);
- generateReturn(method, returnType, needsReturn);
- }
-
- outputln("}");
-}
-
-void generateFunctionPrototype(Method method, String function, Class[] paramTypes, Class returnType) {
- output("JNIEXPORT ");
- output(getTypeSignature2(returnType));
- output(" JNICALL ");
- output(getClassName(method.getDeclaringClass()));
- output("_NATIVE(");
- output(function);
- outputln(")");
- output("\t(JNIEnv *env, ");
- if ((method.getModifiers() & Modifier.STATIC) != 0) {
- output("jclass");
- } else {
- output("jobject");
- }
- output(" that");
- for (int i = 0; i < paramTypes.length; i++) {
- Class paramType = paramTypes[i];
- output(", ");
- output(getTypeSignature2(paramType));
- output(" arg" + i);
- }
- outputln(")");
-}
-
-void generateSourceStart(String function) {
- output("#ifndef NO_");
- outputln(function);
-}
-
-void generateSourceEnd(String function) {
- outputln("#endif");
-}
-
-boolean isCritical(Class paramType, ParameterData paramData) {
- return paramType.isArray() && paramType.getComponentType().isPrimitive() && paramData.getFlag("critical");
-}
-
-public static void main(String[] args) {
-// args = new String[]{"org.eclipse.swt.internal.win32.OS"};
- if (args.length < 1) {
- System.out.println("Usage: java NativesGenerator <className1> <className2>");
- return;
- }
- try {
- NativesGenerator gen = new NativesGenerator();
- for (int i = 0; i < args.length; i++) {
- String clazzName = args[i];
- Class clazz = Class.forName(clazzName);
- gen.generate(clazz);
-// gen.generate(clazz, "CommandBar_Destroy");
- }
- } catch (Exception e) {
- System.out.println("Problem");
- e.printStackTrace(System.out);
- }
-}
-
-}
diff --git a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ParameterData.java b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ParameterData.java
deleted file mode 100644
index c4b8188ac9..0000000000
--- a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ParameterData.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tools.internal;
-
-import java.lang.reflect.Method;
-
-public class ParameterData extends ItemData {
-
- Method method;
- int parameter;
-
-public ParameterData(Method method, int parameter, String str) {
- super(str);
- this.method = method;
- this.parameter = parameter;
-}
-
-public static String[] getAllFlags() {
- return new String[]{"no_in", "no_out", "critical", "init", "struct", "unicode"};
-}
-
-public String getCast() {
- String cast = ((String)getParam("cast")).trim();
- if (cast.length() > 0) {
- if (!cast.startsWith("(")) cast = "(" + cast;
- if (!cast.endsWith(")")) cast = cast + ")";
- }
- return cast;
-}
-
-public Method getMethod() {
- return method;
-}
-
-public int getParameter() {
- return parameter;
-}
-
-public void setCast(String str) {
- setParam("cast", str);
-}
-
-}
diff --git a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ProgressMonitor.java b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ProgressMonitor.java
deleted file mode 100644
index 97d01f2ea0..0000000000
--- a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/ProgressMonitor.java
+++ /dev/null
@@ -1,9 +0,0 @@
-package org.eclipse.swt.tools.internal;
-
-public interface ProgressMonitor {
-
-public void setTotal(int total);
-public void setMessage(String message);
-public void step();
-
-}
diff --git a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/SizeofGenerator.java b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/SizeofGenerator.java
deleted file mode 100644
index 23ff412f45..0000000000
--- a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/SizeofGenerator.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tools.internal;
-
-import java.lang.reflect.*;
-
-public class SizeofGenerator extends JNIGenerator {
-
-
-public void generate(Class clazz) {
- String className = getClassName(clazz);
- output("\tprintf(\"");
- output(className);
- output("=%d\\n\", sizeof(");
- output(className);
- outputln("));");
-// Field[] fields = clazz.getDeclaredFields();
-// generate(fields);
-}
-
-public void generate() {
- outputln("int main() {");
- super.generate();
- outputln("}");
-}
-
-public void generate(Field[] fields) {
- sort(fields);
- for (int i = 0; i < fields.length; i++) {
- Field field = fields[i];
- if ((field.getModifiers() & Modifier.FINAL) == 0) continue;
- generate(field);
- }
-}
-
-public void generate(Field field) {
- output("\tprintf(\"");
- output(field.getName());
- output("=%d\\n\", sizeof(");
- output(field.getName());
- outputln("));");
-}
-
-public static void main(String[] args) {
- if (args.length < 1) {
- System.out.println("Usage: java SizeofGenerator <className1> <className2>");
- return;
- }
- try {
- SizeofGenerator gen = new SizeofGenerator();
- for (int i = 0; i < args.length; i++) {
- String clazzName = args[i];
- Class clazz = Class.forName(clazzName);
- gen.generate(clazz);
- }
- } catch (Exception e) {
- System.out.println("Problem");
- e.printStackTrace(System.out);
- }
-}
-
-}
diff --git a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/StatsGenerator.java b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/StatsGenerator.java
deleted file mode 100644
index 286c974db2..0000000000
--- a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/StatsGenerator.java
+++ /dev/null
@@ -1,190 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tools.internal;
-
-import java.lang.reflect.*;
-
-public class StatsGenerator extends JNIGenerator {
-
- boolean header;
-
-public StatsGenerator(boolean header) {
- this.header = header;
-}
-
-public void generateCopyright() {
- generateMetaData("swt_copyright");
-}
-
-public void generateIncludes() {
- if (!header) {
- outputln("#include \"swt.h\"");
- output("#include \"");
- output(getOutputName());
- outputln("_stats.h\"");
- outputln();
- }
-}
-
-public void generate(Class clazz) {
- if (header) {
- generateHeaderFile(clazz);
- } else {
- generateSourceFile(clazz);
- }
-}
-
-public String getExtension() {
- return header ? ".h" : super.getExtension();
-}
-
-public String getSuffix() {
- return "_stats";
-}
-
-void generateHeaderFile(Class clazz){
- generateNATIVEMacros(clazz);
- Method[] methods = clazz.getDeclaredMethods();
- sort(methods);
- generateFunctionEnum(methods);
-}
-
-void generateNATIVEMacros(Class clazz) {
- String className = getClassName(clazz);
- outputln("#ifdef NATIVE_STATS");
- output("extern int ");
- output(className);
- outputln("_nativeFunctionCount;");
- output("extern int ");
- output(className);
- outputln("_nativeFunctionCallCount[];");
- output("extern char* ");
- output(className);
- outputln("_nativeFunctionNames[];");
- output("#define ");
- output(className);
- output("_NATIVE_ENTER(env, that, func) ");
- output(className);
- outputln("_nativeFunctionCallCount[func]++;");
- output("#define ");
- output(className);
- outputln("_NATIVE_EXIT(env, that, func) ");
- outputln("#else");
- output("#define ");
- output(className);
- outputln("_NATIVE_ENTER(env, that, func) ");
- output("#define ");
- output(className);
- outputln("_NATIVE_EXIT(env, that, func) ");
- outputln("#endif");
- outputln();
-}
-
-void generateSourceFile(Class clazz) {
- outputln("#ifdef NATIVE_STATS");
- outputln();
- Method[] methods = clazz.getDeclaredMethods();
- int methodCount = 0;
- for (int i = 0; i < methods.length; i++) {
- Method method = methods[i];
- if ((method.getModifiers() & Modifier.NATIVE) == 0) continue;
- methodCount++;
- }
- String className = getClassName(clazz);
- output("int ");
- output(className);
- output("_nativeFunctionCount = ");
- output(String.valueOf(methodCount));
- outputln(";");
- output("int ");
- output(className);
- output("_nativeFunctionCallCount[");
- output(String.valueOf(methodCount));
- outputln("];");
- output("char * ");
- output(className);
- outputln("_nativeFunctionNames[] = {");
- sort(methods);
- for (int i = 0; i < methods.length; i++) {
- Method method = methods[i];
- if ((method.getModifiers() & Modifier.NATIVE) == 0) continue;
- output("\t\"");
- output(getFunctionName(method));
- outputln("\", ");
- if (progress != null) progress.step();
- }
- outputln("};");
- outputln();
- generateStatsNatives(className);
- outputln();
- outputln("#endif");
-}
-
-void generateStatsNatives(String className) {
- outputln("#define STATS_NATIVE(func) Java_org_eclipse_swt_tools_internal_NativeStats_##func");
- outputln();
-
- output("JNIEXPORT jint JNICALL STATS_NATIVE(");
- output(toC(className + "_GetFunctionCount"));
- outputln(")");
- outputln("\t(JNIEnv *env, jclass that)");
- outputln("{");
- output("\treturn ");
- output(className);
- outputln("_nativeFunctionCount;");
- outputln("}");
- outputln();
-
- output("JNIEXPORT jstring JNICALL STATS_NATIVE(");
- output(toC(className + "_GetFunctionName"));
- outputln(")");
- outputln("\t(JNIEnv *env, jclass that, jint index)");
- outputln("{");
- output("\treturn ");
- if (isCPP) {
- output("env->NewStringUTF(");
- } else {
- output("(*env)->NewStringUTF(env, ");
- }
- output(className);
- outputln("_nativeFunctionNames[index]);");
- outputln("}");
- outputln();
-
- output("JNIEXPORT jint JNICALL STATS_NATIVE(");
- output(toC(className + "_GetFunctionCallCount"));
- outputln(")");
- outputln("\t(JNIEnv *env, jclass that, jint index)");
- outputln("{");
- output("\treturn ");
- output(className);
- outputln("_nativeFunctionCallCount[index];");
- outputln("}");
-}
-
-void generateFunctionEnum(Method[] methods) {
- if (methods.length == 0) return;
- outputln("typedef enum {");
- for (int i = 0; i < methods.length; i++) {
- Method method = methods[i];
- if ((method.getModifiers() & Modifier.NATIVE) == 0) continue;
- output("\t");
- output(getFunctionName(method));
- outputln("_FUNC,");
- if (progress != null) progress.step();
- }
- Class clazz = methods[0].getDeclaringClass();
- output("} ");
- output(getClassName(clazz));
- outputln("_FUNCS;");
-}
-
-}
diff --git a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/StructsGenerator.java b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/StructsGenerator.java
deleted file mode 100644
index a8e7c8daf2..0000000000
--- a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/StructsGenerator.java
+++ /dev/null
@@ -1,550 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tools.internal;
-
-import java.lang.reflect.*;
-import java.util.HashSet;
-import java.util.Iterator;
-
-public class StructsGenerator extends JNIGenerator {
-
-boolean header;
-
-public StructsGenerator(boolean header) {
- this.header = header;
-}
-
-public void generateCopyright() {
- generateMetaData("swt_copyright");
-}
-
-public void generateIncludes() {
- if (header) {
- output("#include \"");
- output(getOutputName());
- outputln(".h\"");
- } else {
- outputln("#include \"swt.h\"");
- output("#include \"");
- output(getOutputName());
- outputln("_structs.h\"");
- }
- outputln();
-}
-
-public void generate(Class clazz) {
- int j = 0;
- Field[] fields = clazz.getDeclaredFields();
- for (; j < fields.length; j++) {
- Field field = fields[j];
- int mods = field.getModifiers();
- if ((mods & Modifier.PUBLIC) != 0 && (mods & Modifier.STATIC) == 0) {
- break;
- }
- }
- if (j == fields.length) return;
- if (header) {
- generateHeaderFile(clazz);
- } else {
- generateSourceFile(clazz);
- }
- if (progress != null) progress.step();
-}
-
-public void generate() {
- if (!header && getClasses().length == 0) return;
- super.generate();
-}
-
-public String getExtension() {
- return header ? ".h" : super.getExtension();
-}
-
-public String getSuffix() {
- return "_structs";
-}
-
-void generateExcludes(Class[] classes) {
- HashSet excludes = new HashSet();
- for (int i = 0; i < classes.length; i++) {
- Class clazz = classes[i];
- ClassData classData = getMetaData().getMetaData(clazz);
- String exclude = classData.getExclude();
- if (exclude.length() != 0) {
- excludes.add(exclude);
- }
- }
- for (Iterator iter = excludes.iterator(); iter.hasNext();) {
- String exclude = (String)iter.next();
- outputln(exclude);
- for (int i = 0; i < classes.length; i++) {
- Class clazz = classes[i];
- ClassData classData = getMetaData().getMetaData(clazz);
- String classExclude = classData.getExclude();
- if (exclude.equals(classExclude)) {
- output("#define NO_");
- outputln(getClassName(clazz));
- }
- }
- outputln("#endif");
- outputln();
- }
-}
-
-void generateHeaderFile(Class clazz) {
- generateSourceStart(clazz);
- generatePrototypes(clazz);
- generateBlankMacros(clazz);
- generateSourceEnd(clazz);
- outputln();
-}
-
-void generateSourceFile(Class clazz) {
- generateSourceStart(clazz);
- generateFIDsStructure(clazz);
- outputln();
- generateGlobalVar(clazz);
- outputln();
- generateFunctions(clazz);
- generateSourceEnd(clazz);
- outputln();
-}
-
-void generateSourceStart(Class clazz) {
- String clazzName = getClassName(clazz);
- output("#ifndef NO_");
- outputln(clazzName);
-}
-
-void generateSourceEnd(Class clazz) {
- outputln("#endif");
-}
-
-void generateGlobalVar(Class clazz) {
- String clazzName = getClassName(clazz);
- output(clazzName);
- output("_FID_CACHE ");
- output(clazzName);
- outputln("Fc;");
-}
-
-void generateBlankMacros(Class clazz) {
- String clazzName = getClassName(clazz);
- outputln("#else");
- output("#define cache");
- output(clazzName);
- outputln("Fields(a,b)");
- output("#define get");
- output(clazzName);
- outputln("Fields(a,b,c) NULL");
- output("#define set");
- output(clazzName);
- outputln("Fields(a,b,c)");
- output("#define ");
- output(clazzName);
- outputln("_sizeof() 0");
-}
-
-void generatePrototypes(Class clazz) {
- String clazzName = getClassName(clazz);
- output("void cache");
- output(clazzName);
- outputln("Fields(JNIEnv *env, jobject lpObject);");
- output(clazzName);
- output(" *get");
- output(clazzName);
- output("Fields(JNIEnv *env, jobject lpObject, ");
- output(clazzName);
- outputln(" *lpStruct);");
- output("void set");
- output(clazzName);
- output("Fields(JNIEnv *env, jobject lpObject, ");
- output(clazzName);
- outputln(" *lpStruct);");
- output("#define ");
- output(clazzName);
- output("_sizeof() sizeof(");
- output(clazzName);
- outputln(")");
-}
-
-void generateFIDsStructure(Class clazz) {
- String clazzName = getClassName(clazz);
- output("typedef struct ");
- output(clazzName);
- outputln("_FID_CACHE {");
- outputln("\tint cached;");
- outputln("\tjclass clazz;");
- output("\tjfieldID ");
- Field[] fields = clazz.getDeclaredFields();
- boolean first = true;
- for (int i = 0; i < fields.length; i++) {
- Field field = fields[i];
- if (ignoreField(field)) continue;
- if (!first) output(", ");
- output(field.getName());
- first = false;
- }
- outputln(";");
- output("} ");
- output(clazzName);
- outputln("_FID_CACHE;");
-}
-
-void generateCacheFunction(Class clazz) {
- String clazzName = getClassName(clazz);
- output("void cache");
- output(clazzName);
- outputln("Fields(JNIEnv *env, jobject lpObject)");
- outputln("{");
- output("\tif (");
- output(clazzName);
- outputln("Fc.cached) return;");
- Class superclazz = clazz.getSuperclass();
- if (superclazz != Object.class) {
- String superName = getClassName(superclazz);
- output("\tcache");
- output(superName);
- outputln("Fields(env, lpObject);");
- }
- output("\t");
- output(clazzName);
- if (isCPP) {
- output("Fc.clazz = env->GetObjectClass(lpObject);");
- } else {
- output("Fc.clazz = (*env)->GetObjectClass(env, lpObject);");
- }
- outputln();
- Field[] fields = clazz.getDeclaredFields();
- for (int i = 0; i < fields.length; i++) {
- Field field = fields[i];
- if (ignoreField(field)) continue;
- output("\t");
- output(clazzName);
- output("Fc.");
- output(field.getName());
- if (isCPP) {
- output(" = env->GetFieldID(");
- } else {
- output(" = (*env)->GetFieldID(env, ");
- }
- output(clazzName);
- output("Fc.clazz, \"");
- output(field.getName());
- output("\", \"");
- output(getTypeSignature(field.getType()));
- outputln("\");");
- }
- output("\t");
- output(clazzName);
- outputln("Fc.cached = 1;");
- outputln("}");
-}
-
-void generateGetFields(Class clazz) {
- Class superclazz = clazz.getSuperclass();
- String clazzName = getClassName(clazz);
- String superName = getClassName(superclazz);
- if (superclazz != Object.class) {
- /* Windows exception - cannot call get/set function of super class in this case */
- if (!(clazzName.equals(superName + "A") || clazzName.equals(superName + "W"))) {
- output("\tget");
- output(superName);
- output("Fields(env, lpObject, (");
- output(superName);
- outputln(" *)lpStruct);");
- } else {
- generateGetFields(superclazz);
- }
- }
- Field[] fields = clazz.getDeclaredFields();
- for (int i = 0; i < fields.length; i++) {
- Field field = fields[i];
- if (ignoreField(field)) continue;
- FieldData fieldData = getMetaData().getMetaData(field);
- String exclude = fieldData.getExclude();
- if (exclude.length() != 0) {
- outputln(exclude);
- }
- boolean noWinCE = fieldData.getFlag("no_wince");
- if (noWinCE) {
- outputln("#ifndef _WIN32_WCE");
- }
- Class type = field.getType();
- String typeName = getClassName(type);
- String accessor = fieldData.getAccessor();
- if (accessor == null || accessor.length() == 0) accessor = field.getName();
- if (type.isPrimitive()) {
- output("\tlpStruct->");
- output(accessor);
- output(" = ");
- output(fieldData.getCast());
- if (isCPP) {
- output("env->Get");
- } else {
- output("(*env)->Get");
- }
- output(getTypeSignature1(field.getType()));
- if (isCPP) {
- output("Field(lpObject, ");
- } else {
- output("Field(env, lpObject, ");
- }
- output(getClassName(field.getDeclaringClass()));
- output("Fc.");
- output(field.getName());
- output(");");
- } else if (type.isArray()) {
- Class componentType = type.getComponentType();
- if (componentType.isPrimitive()) {
- outputln("\t{");
- output("\t");
- output(getTypeSignature2(field.getType()));
- output(" lpObject1 = (");
- output(getTypeSignature2(field.getType()));
- if (isCPP) {
- output(")env->GetObjectField(lpObject, ");
- } else {
- output(")(*env)->GetObjectField(env, lpObject, ");
- }
- output(getClassName(field.getDeclaringClass()));
- output("Fc.");
- output(field.getName());
- outputln(");");
- if (isCPP) {
- output("\tenv->Get");
- } else {
- output("\t(*env)->Get");
- }
- output(getTypeSignature1(componentType));
- if (isCPP) {
- output("ArrayRegion(lpObject1, 0, sizeof(lpStruct->");
- } else {
- output("ArrayRegion(env, lpObject1, 0, sizeof(lpStruct->");
- }
- output(accessor);
- output(")");
- int byteCount = getByteCount(componentType);
- if (byteCount > 1) {
- output(" / ");
- output(String.valueOf(byteCount));
- }
- output(", (");
- output(getTypeSignature4(type));
- output(")lpStruct->");
- output(accessor);
- outputln(");");
- output("\t}");
- } else {
- throw new Error("not done");
- }
- } else {
- outputln("\t{");
- if (isCPP) {
- output("\tjobject lpObject1 = env->GetObjectField(lpObject, ");
- } else {
- output("\tjobject lpObject1 = (*env)->GetObjectField(env, lpObject, ");
- }
- output(getClassName(field.getDeclaringClass()));
- output("Fc.");
- output(field.getName());
- outputln(");");
- output("\tget");
- output(typeName);
- output("Fields(env, lpObject1, &lpStruct->");
- output(accessor);
- outputln(");");
- output("\t}");
- }
- outputln();
- if (noWinCE) {
- outputln("#endif");
- }
- if (exclude.length() != 0) {
- outputln("#endif");
- }
- }
-}
-
-void generateGetFunction(Class clazz) {
- String clazzName = getClassName(clazz);
- output(clazzName);
- output(" *get");
- output(clazzName);
- output("Fields(JNIEnv *env, jobject lpObject, ");
- output(clazzName);
- outputln(" *lpStruct)");
- outputln("{");
- output("\tif (!");
- output(clazzName);
- output("Fc.cached) cache");
- output(clazzName);
- outputln("Fields(env, lpObject);");
- generateGetFields(clazz);
- outputln("\treturn lpStruct;");
- outputln("}");
-}
-
-void generateSetFields(Class clazz) {
- Class superclazz = clazz.getSuperclass();
- String clazzName = getClassName(clazz);
- String superName = getClassName(superclazz);
- if (superclazz != Object.class) {
- /* Windows exception - cannot call get/set function of super class in this case */
- if (!(clazzName.equals(superName + "A") || clazzName.equals(superName + "W"))) {
- output("\tset");
- output(superName);
- output("Fields(env, lpObject, (");
- output(superName);
- outputln(" *)lpStruct);");
- } else {
- generateSetFields(superclazz);
- }
- }
- Field[] fields = clazz.getDeclaredFields();
- for (int i = 0; i < fields.length; i++) {
- Field field = fields[i];
- if (ignoreField(field)) continue;
- FieldData fieldData = getMetaData().getMetaData(field);
- String exclude = fieldData.getExclude();
- if (exclude.length() != 0) {
- outputln(exclude);
- }
- boolean noWinCE = fieldData.getFlag("no_wince");
- if (noWinCE) {
- outputln("#ifndef _WIN32_WCE");
- }
- Class type = field.getType();
- String typeName = getClassName(type);
- String accessor = fieldData.getAccessor();
- if (accessor == null || accessor.length() == 0) accessor = field.getName();
- if (type.isPrimitive()) {
- if (isCPP) {
- output("\tenv->Set");
- } else {
- output("\t(*env)->Set");
- }
- output(getTypeSignature1(field.getType()));
- if (isCPP) {
- output("Field(lpObject, ");
- } else {
- output("Field(env, lpObject, ");
- }
- output(getClassName(field.getDeclaringClass()));
- output("Fc.");
- output(field.getName());
- output(", (");
- output(getTypeSignature2(field.getType()));
- output(")lpStruct->");
- output(accessor);
- output(");");
- } else if (type.isArray()) {
- Class componentType = type.getComponentType();
- if (componentType.isPrimitive()) {
- outputln("\t{");
- output("\t");
- output(getTypeSignature2(field.getType()));
- output(" lpObject1 = (");
- output(getTypeSignature2(field.getType()));
- if (isCPP) {
- output(")env->GetObjectField(lpObject, ");
- } else {
- output(")(*env)->GetObjectField(env, lpObject, ");
- }
- output(getClassName(field.getDeclaringClass()));
- output("Fc.");
- output(field.getName());
- outputln(");");
- if (isCPP) {
- output("\tenv->Set");
- } else {
- output("\t(*env)->Set");
- }
- output(getTypeSignature1(componentType));
- if (isCPP) {
- output("ArrayRegion(lpObject1, 0, sizeof(lpStruct->");
- } else {
- output("ArrayRegion(env, lpObject1, 0, sizeof(lpStruct->");
- }
- output(accessor);
- output(")");
- int byteCount = getByteCount(componentType);
- if (byteCount > 1) {
- output(" / ");
- output(String.valueOf(byteCount));
- }
- output(", (");
- output(getTypeSignature4(type));
- output(")lpStruct->");
- output(accessor);
- outputln(");");
- output("\t}");
- } else {
- throw new Error("not done");
- }
- } else {
- outputln("\t{");
- output("\tjobject lpObject1 = (*env)->GetObjectField(env, lpObject, ");
- output(getClassName(field.getDeclaringClass()));
- output("Fc.");
- output(field.getName());
- outputln(");");
- output("\tset");
- output(typeName);
- output("Fields(env, lpObject1, &lpStruct->");
- output(accessor);
- outputln(");");
- output("\t}");
- }
- outputln();
- if (noWinCE) {
- outputln("#endif");
- }
- if (exclude.length() != 0) {
- outputln("#endif");
- }
- }
-}
-
-void generateSetFunction(Class clazz) {
- String clazzName = getClassName(clazz);
- output("void set");
- output(clazzName);
- output("Fields(JNIEnv *env, jobject lpObject, ");
- output(clazzName);
- outputln(" *lpStruct)");
- outputln("{");
- output("\tif (!");
- output(clazzName);
- output("Fc.cached) cache");
- output(clazzName);
- outputln("Fields(env, lpObject);");
- generateSetFields(clazz);
- outputln("}");
-}
-
-void generateFunctions(Class clazz) {
- generateCacheFunction(clazz);
- outputln();
- generateGetFunction(clazz);
- outputln();
- generateSetFunction(clazz);
-}
-
-boolean ignoreField(Field field) {
- int mods = field.getModifiers();
- return
- ((mods & Modifier.PUBLIC) == 0) ||
- ((mods & Modifier.FINAL) != 0) ||
- ((mods & Modifier.STATIC) != 0);
-}
-
-}
diff --git a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.accessibility.gtk.ATK.properties b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.accessibility.gtk.ATK.properties
deleted file mode 100644
index e457a66522..0000000000
--- a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.accessibility.gtk.ATK.properties
+++ /dev/null
@@ -1,253 +0,0 @@
-###############################################################################
-# Copyright (c) 2004 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Common Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/cpl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-org_eclipse_swt_internal_accessibility_gtk_ATK=
-ATK_ATK_ACTION_GET_IFACE=
-ATK_ATK_ACTION_GET_IFACE_0=
-
-ATK_ATK_COMPONENT_GET_IFACE=
-ATK_ATK_COMPONENT_GET_IFACE_0=
-
-ATK_ATK_OBJECT_FACTORY_CLASS=
-ATK_ATK_OBJECT_FACTORY_CLASS_0=
-
-ATK_ATK_SELECTION_GET_IFACE=
-ATK_ATK_SELECTION_GET_IFACE_0=
-
-ATK_ATK_TEXT_GET_IFACE=
-ATK_ATK_TEXT_GET_IFACE_0=
-
-ATK_AtkObjectFactoryClass_sizeof=
-
-ATK_AtkObjectFactory_sizeof=
-
-ATK_GTK_ACCESSIBLE=
-ATK_GTK_ACCESSIBLE_0=
-
-ATK_atk_focus_tracker_notify=
-ATK_atk_focus_tracker_notify_0=cast=(AtkObject *)
-
-ATK_atk_get_default_registry=
-
-ATK_atk_object_factory_get_accessible_type=
-ATK_atk_object_factory_get_accessible_type_0=cast=(AtkObjectFactory *)
-
-ATK_atk_object_initialize=
-ATK_atk_object_initialize_0=cast=(AtkObject *)
-ATK_atk_object_initialize_1=cast=(gpointer)
-
-ATK_atk_registry_get_factory=
-ATK_atk_registry_get_factory_0=cast=(AtkRegistry *)
-ATK_atk_registry_get_factory_1=cast=(GType)
-
-ATK_atk_registry_set_factory_type=
-ATK_atk_registry_set_factory_type_0=cast=(AtkRegistry *)
-ATK_atk_registry_set_factory_type_1=cast=(GType)
-ATK_atk_registry_set_factory_type_2=cast=(GType)
-
-ATK_atk_state_set_add_state=
-ATK_atk_state_set_add_state_0=cast=(AtkStateSet *)
-ATK_atk_state_set_add_state_1=cast=(AtkStateType)
-
-ATK_atk_state_set_new=
-
-ATK_call__II=
-ATK_call__II_0=
-ATK_call__II_1=
-
-ATK_call__III=
-ATK_call__III_0=
-ATK_call__III_1=
-ATK_call__III_2=
-
-ATK_call__IIII=
-ATK_call__IIII_0=
-ATK_call__IIII_1=
-ATK_call__IIII_2=
-ATK_call__IIII_3=
-
-ATK_call__IIIII=
-ATK_call__IIIII_0=
-ATK_call__IIIII_1=
-ATK_call__IIIII_2=
-ATK_call__IIIII_3=
-ATK_call__IIIII_4=
-
-ATK_call__IIIIII=
-ATK_call__IIIIII_0=
-ATK_call__IIIIII_1=
-ATK_call__IIIIII_2=
-ATK_call__IIIIII_3=
-ATK_call__IIIIII_4=
-ATK_call__IIIIII_5=
-
-ATK_call__IIIIIII=
-ATK_call__IIIIIII_0=
-ATK_call__IIIIIII_1=
-ATK_call__IIIIIII_2=
-ATK_call__IIIIIII_3=
-ATK_call__IIIIIII_4=
-ATK_call__IIIIIII_5=
-ATK_call__IIIIIII_6=
-
-ATK_memmove__ILorg_eclipse_swt_internal_accessibility_gtk_AtkActionIface_2=
-ATK_memmove__ILorg_eclipse_swt_internal_accessibility_gtk_AtkActionIface_2_0=
-ATK_memmove__ILorg_eclipse_swt_internal_accessibility_gtk_AtkActionIface_2_1=
-
-ATK_memmove__ILorg_eclipse_swt_internal_accessibility_gtk_AtkComponentIface_2=
-ATK_memmove__ILorg_eclipse_swt_internal_accessibility_gtk_AtkComponentIface_2_0=
-ATK_memmove__ILorg_eclipse_swt_internal_accessibility_gtk_AtkComponentIface_2_1=
-
-ATK_memmove__ILorg_eclipse_swt_internal_accessibility_gtk_AtkHypertextIface_2=
-ATK_memmove__ILorg_eclipse_swt_internal_accessibility_gtk_AtkHypertextIface_2_0=
-ATK_memmove__ILorg_eclipse_swt_internal_accessibility_gtk_AtkHypertextIface_2_1=
-
-ATK_memmove__ILorg_eclipse_swt_internal_accessibility_gtk_AtkObjectClass_2=
-ATK_memmove__ILorg_eclipse_swt_internal_accessibility_gtk_AtkObjectClass_2_0=
-ATK_memmove__ILorg_eclipse_swt_internal_accessibility_gtk_AtkObjectClass_2_1=
-
-ATK_memmove__ILorg_eclipse_swt_internal_accessibility_gtk_AtkObjectFactoryClass_2=
-ATK_memmove__ILorg_eclipse_swt_internal_accessibility_gtk_AtkObjectFactoryClass_2_0=
-ATK_memmove__ILorg_eclipse_swt_internal_accessibility_gtk_AtkObjectFactoryClass_2_1=
-
-ATK_memmove__ILorg_eclipse_swt_internal_accessibility_gtk_AtkSelectionIface_2=
-ATK_memmove__ILorg_eclipse_swt_internal_accessibility_gtk_AtkSelectionIface_2_0=
-ATK_memmove__ILorg_eclipse_swt_internal_accessibility_gtk_AtkSelectionIface_2_1=
-
-ATK_memmove__ILorg_eclipse_swt_internal_accessibility_gtk_AtkTextIface_2=
-ATK_memmove__ILorg_eclipse_swt_internal_accessibility_gtk_AtkTextIface_2_0=
-ATK_memmove__ILorg_eclipse_swt_internal_accessibility_gtk_AtkTextIface_2_1=
-
-ATK_memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkActionIface_2I=
-ATK_memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkActionIface_2I_0=
-ATK_memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkActionIface_2I_1=
-
-ATK_memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkComponentIface_2I=
-ATK_memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkComponentIface_2I_0=
-ATK_memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkComponentIface_2I_1=
-
-ATK_memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkHypertextIface_2I=
-ATK_memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkHypertextIface_2I_0=
-ATK_memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkHypertextIface_2I_1=
-
-ATK_memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkObjectClass_2I=
-ATK_memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkObjectClass_2I_0=
-ATK_memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkObjectClass_2I_1=
-
-ATK_memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkObjectFactoryClass_2I=
-ATK_memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkObjectFactoryClass_2I_0=
-ATK_memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkObjectFactoryClass_2I_1=
-
-ATK_memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkSelectionIface_2I=
-ATK_memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkSelectionIface_2I_0=
-ATK_memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkSelectionIface_2I_1=
-
-ATK_memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkTextIface_2I=
-ATK_memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkTextIface_2I_0=
-ATK_memmove__Lorg_eclipse_swt_internal_accessibility_gtk_AtkTextIface_2I_1=
-
-ATK_memmove__Lorg_eclipse_swt_internal_accessibility_gtk_GtkAccessible_2I=
-ATK_memmove__Lorg_eclipse_swt_internal_accessibility_gtk_GtkAccessible_2I_0=
-ATK_memmove__Lorg_eclipse_swt_internal_accessibility_gtk_GtkAccessible_2I_1=
-
-
-org_eclipse_swt_internal_accessibility_gtk_AtkActionIface=
-AtkActionIface_do_action=cast=(gboolean (*)())
-AtkActionIface_get_n_actions=cast=(gint (*)())
-AtkActionIface_get_description=cast=(G_CONST_RETURN gchar *(*)())
-AtkActionIface_get_name=cast=(G_CONST_RETURN gchar *(*)())
-AtkActionIface_get_keybinding=cast=(G_CONST_RETURN gchar *(*)())
-AtkActionIface_set_description=cast=(gboolean (*)())
-
-org_eclipse_swt_internal_accessibility_gtk_AtkComponentIface=
-AtkComponentIface_add_focus_handler=cast=(guint (*)())
-AtkComponentIface_contains=cast=(gboolean (*)())
-AtkComponentIface_ref_accessible_at_point=cast=(AtkObject *(*)())
-AtkComponentIface_get_extents=cast=(void (*)())
-AtkComponentIface_get_position=cast=(void (*)())
-AtkComponentIface_get_size=cast=(void (*)())
-AtkComponentIface_grab_focus=cast=(gboolean (*)())
-AtkComponentIface_remove_focus_handler=cast=(void (*)())
-AtkComponentIface_set_extents=cast=(gboolean (*)())
-AtkComponentIface_set_position=cast=(gboolean (*)())
-AtkComponentIface_set_size=cast=(gboolean (*)())
-AtkComponentIface_get_layer=cast=(AtkLayer (*)())
-AtkComponentIface_get_mdi_zorder=cast=(gint (*)())
-
-org_eclipse_swt_internal_accessibility_gtk_AtkHypertextIface=
-AtkHypertextIface_get_link=cast=(AtkHyperlink *(*)())
-AtkHypertextIface_get_n_links=cast=(gint (*)())
-AtkHypertextIface_get_link_index=cast=(gint (*)())
-
-org_eclipse_swt_internal_accessibility_gtk_AtkObjectClass=
-AtkObjectClass_get_name=cast=(G_CONST_RETURN gchar *(*)())
-AtkObjectClass_get_description=cast=(G_CONST_RETURN gchar *(*)())
-AtkObjectClass_get_parent=cast=(AtkObject *(*)())
-AtkObjectClass_get_n_children=cast=(gint (*)())
-AtkObjectClass_ref_child=cast=(AtkObject *(*)())
-AtkObjectClass_get_index_in_parent=cast=(gint (*)())
-AtkObjectClass_ref_relation_set=cast=(AtkRelationSet *(*)())
-AtkObjectClass_get_role=cast=(AtkRole (*)())
-AtkObjectClass_get_layer=cast=(AtkLayer (*)())
-AtkObjectClass_get_mdi_zorder=cast=(gint (*)())
-AtkObjectClass_ref_state_set=cast=(AtkStateSet *(*)())
-AtkObjectClass_set_name=cast=(void (*)())
-AtkObjectClass_set_description=cast=(void (*)())
-AtkObjectClass_set_parent=cast=(void (*)())
-AtkObjectClass_set_role=cast=(void (*)())
-AtkObjectClass_connect_property_change_handler=cast=(guint (*)())
-AtkObjectClass_remove_property_change_handler=cast=(void (*)())
-AtkObjectClass_initialize=cast=(void (*)())
-AtkObjectClass_children_changed=cast=(void (*)())
-AtkObjectClass_focus_event=cast=(void (*)())
-AtkObjectClass_property_change=cast=(void (*)())
-AtkObjectClass_state_change=cast=(void (*)())
-AtkObjectClass_visible_data_changed=cast=(void (*)())
-
-org_eclipse_swt_internal_accessibility_gtk_AtkObjectFactoryClass=
-AtkObjectFactoryClass_create_accessible=cast=(AtkObject *(*)())
-AtkObjectFactoryClass_invalidate=cast=(void (*)())
-AtkObjectFactoryClass_get_accessible_type=cast=(GType (*)())
-
-org_eclipse_swt_internal_accessibility_gtk_AtkSelectionIface=
-AtkSelectionIface_add_selection=cast=(gboolean (*)())
-AtkSelectionIface_clear_selection=cast=(gboolean (*)())
-AtkSelectionIface_ref_selection=cast=(AtkObject *(*)())
-AtkSelectionIface_get_selection_count=cast=(gint (*)())
-AtkSelectionIface_is_child_selected=cast=(gboolean (*)())
-AtkSelectionIface_remove_selection=cast=(gboolean (*)())
-AtkSelectionIface_select_all_selection=cast=(gboolean (*)())
-AtkSelectionIface_selection_changed=cast=(void (*)())
-
-org_eclipse_swt_internal_accessibility_gtk_AtkTextIface=
-AtkTextIface_get_text=cast=(gchar *(*)())
-AtkTextIface_get_text_after_offset=cast=(gchar *(*)())
-AtkTextIface_get_text_at_offset=cast=(gchar *(*)())
-AtkTextIface_get_character_at_offset=cast=(gunichar (*)())
-AtkTextIface_get_text_before_offset=cast=(gchar *(*)())
-AtkTextIface_get_caret_offset=cast=(gint (*)())
-AtkTextIface_get_run_attributes=cast=(AtkAttributeSet *(*)())
-AtkTextIface_get_default_attributes=cast=(AtkAttributeSet *(*)())
-AtkTextIface_get_character_extents=cast=(void (*)())
-AtkTextIface_get_character_count=cast=(gint (*)())
-AtkTextIface_get_offset_at_point=cast=(gint (*)())
-AtkTextIface_get_n_selections=cast=(gint (*)())
-AtkTextIface_get_selection=cast=(gchar *(*)())
-AtkTextIface_add_selection=cast=(gboolean (*)())
-AtkTextIface_remove_selection=cast=(gboolean (*)())
-AtkTextIface_set_selection=cast=(gboolean (*)())
-AtkTextIface_set_caret_offset=cast=(gboolean (*)())
-AtkTextIface_text_changed=cast=(void (*)())
-AtkTextIface_text_caret_moved=cast=(void (*)())
-AtkTextIface_text_selection_changed=cast=(void (*)())
-
-org_eclipse_swt_internal_accessibility_gtk_GtkAccessible=
-GtkAccessible_widget=cast=(GtkWidget *)
-
diff --git a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.accessibility.gtk.properties b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.accessibility.gtk.properties
deleted file mode 100644
index d39c9f4722..0000000000
--- a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.accessibility.gtk.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-###############################################################################
-# Copyright (c) 2004 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Common Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/cpl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-swt_copyright=/*******************************************************************************\n\
- * Copyright (c) 2000, 2004 IBM Corporation and others. All rights reserved.\n\
- * The contents of this file are made available under the terms\n\
- * of the GNU Lesser General Public License (LGPL) Version 2.1 that\n\
- * accompanies this distribution (lgpl-v21.txt). The LGPL is also\n\
- * available at http://www.gnu.org/licenses/lgpl.html. If the version\n\
- * of the LGPL at http://www.gnu.org is different to the version of\n\
- * the LGPL accompanying this distribution and there is any conflict\n\
- * between the two license versions, the terms of the LGPL accompanying\n\
- * this distribution shall govern.\n\
- * \n\
- * Contributors:\n\
- * IBM Corporation - initial API and implementation\n\
- *******************************************************************************/\n
- \ No newline at end of file
diff --git a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.carbon.OS.properties b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.carbon.OS.properties
deleted file mode 100644
index 46e4017d69..0000000000
--- a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.carbon.OS.properties
+++ /dev/null
@@ -1,3836 +0,0 @@
-###############################################################################
-# Copyright (c) 2004 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Common Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/cpl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-org_eclipse_swt_internal_carbon_AEDesc=
-AEDesc_descriptorType=cast=(DescType)
-AEDesc_dataHandle=cast=(AEDataStorage)
-
-org_eclipse_swt_internal_carbon_ATSTrapezoid=
-ATSTrapezoid_upperLeft_x=accessor=upperLeft.x
-ATSTrapezoid_upperLeft_y=accessor=upperLeft.y
-ATSTrapezoid_upperRight_x=accessor=upperRight.x
-ATSTrapezoid_upperRight_y=accessor=upperRight.y
-ATSTrapezoid_lowerRight_x=accessor=lowerRight.x
-ATSTrapezoid_lowerRight_y=accessor=lowerRight.y
-ATSTrapezoid_lowerLeft_x=accessor=lowerLeft.x
-ATSTrapezoid_lowerLeft_y=accessor=lowerLeft.y
-
-org_eclipse_swt_internal_carbon_ATSUCaret=
-ATSUCaret_fX=
-ATSUCaret_fY=
-ATSUCaret_fDeltaX=
-ATSUCaret_fDeltaY=
-
-org_eclipse_swt_internal_carbon_ATSUTab=
-ATSUTab_tabPosition=
-ATSUTab_tabType=
-
-org_eclipse_swt_internal_carbon_ATSUUnhighlightData=
-ATSUUnhighlightData_dataType=
-ATSUUnhighlightData_red=accessor=unhighlightData.backgroundColor.red
-ATSUUnhighlightData_green=accessor=unhighlightData.backgroundColor.green
-ATSUUnhighlightData_blue=accessor=unhighlightData.backgroundColor.blue
-ATSUUnhighlightData_alpha=accessor=unhighlightData.backgroundColor.alpha
-
-org_eclipse_swt_internal_carbon_AlertStdCFStringAlertParamRec=
-AlertStdCFStringAlertParamRec_version=
-AlertStdCFStringAlertParamRec_movable=
-AlertStdCFStringAlertParamRec_helpButton=
-AlertStdCFStringAlertParamRec_defaultText=cast=(CFStringRef)
-AlertStdCFStringAlertParamRec_cancelText=cast=(CFStringRef)
-AlertStdCFStringAlertParamRec_otherText=cast=(CFStringRef)
-AlertStdCFStringAlertParamRec_defaultButton=
-AlertStdCFStringAlertParamRec_cancelButton=
-AlertStdCFStringAlertParamRec_position=
-AlertStdCFStringAlertParamRec_flags=
-
-org_eclipse_swt_internal_carbon_BitMap=
-BitMap_baseAddr=cast=(void *)
-BitMap_rowBytes=
-BitMap_top=accessor=bounds.top
-BitMap_left=accessor=bounds.left
-BitMap_bottom=accessor=bounds.bottom
-BitMap_right=accessor=bounds.right
-
-org_eclipse_swt_internal_carbon_CFRange=
-CFRange_location=cast=(CFIndex)
-CFRange_length=cast=(CFIndex)
-
-org_eclipse_swt_internal_carbon_CGPoint=
-CGPoint_x=cast=(float)
-CGPoint_y=cast=(float)
-
-org_eclipse_swt_internal_carbon_CGRect=
-CGRect_x=accessor=origin.x,cast=(float)
-CGRect_y=accessor=origin.y,cast=(float)
-CGRect_width=accessor=size.width,cast=(float)
-CGRect_height=accessor=size.height,cast=(float)
-
-org_eclipse_swt_internal_carbon_ColorPickerInfo=
-ColorPickerInfo_profile=accessor=theColor.profile,cast=(CMProfileHandle)
-ColorPickerInfo_red=accessor=theColor.color.rgb.red,cast=(UInt16)
-ColorPickerInfo_green=accessor=theColor.color.rgb.green,cast=(UInt16)
-ColorPickerInfo_blue=accessor=theColor.color.rgb.blue,cast=(UInt16)
-ColorPickerInfo_dstProfile=cast=(CMProfileHandle)
-ColorPickerInfo_flags=cast=(UInt32)
-ColorPickerInfo_placeWhere=cast=(DialogPlacementSpec)
-ColorPickerInfo_h=accessor=dialogOrigin.h,cast=(short)
-ColorPickerInfo_v=accessor=dialogOrigin.v,cast=(short)
-ColorPickerInfo_pickerType=cast=(OSType)
-ColorPickerInfo_eventProc=cast=(UserEventUPP)
-ColorPickerInfo_colorProc=cast=(ColorChangedUPP)
-ColorPickerInfo_colorProcData=cast=(UInt32)
-ColorPickerInfo_prompt=cast=(Str255)
-ColorPickerInfo_editMenuID=accessor=mInfo.editMenuID,cast=(SInt16)
-ColorPickerInfo_cutItem=accessor=mInfo.cutItem,cast=(SInt16)
-ColorPickerInfo_copyItem=accessor=mInfo.copyItem,cast=(SInt16)
-ColorPickerInfo_pasteItem=accessor=mInfo.pasteItem,cast=(SInt16)
-ColorPickerInfo_clearItem=accessor=mInfo.clearItem,cast=(SInt16)
-ColorPickerInfo_undoItem=accessor=mInfo.undoItem,cast=(SInt16)
-ColorPickerInfo_newColorChosen=cast=(Boolean)
-
-org_eclipse_swt_internal_carbon_ControlButtonContentInfo=
-ControlButtonContentInfo_contentType=cast=(ControlContentType)
-ControlButtonContentInfo_iconRef=accessor=u.iconRef,cast=(void *)
-
-org_eclipse_swt_internal_carbon_ControlFontStyleRec=
-ControlFontStyleRec_flags=
-ControlFontStyleRec_font=
-ControlFontStyleRec_size=
-ControlFontStyleRec_style=
-ControlFontStyleRec_mode=
-ControlFontStyleRec_just=
-ControlFontStyleRec_foreColor_red=accessor=foreColor.red
-ControlFontStyleRec_foreColor_green=accessor=foreColor.green
-ControlFontStyleRec_foreColor_blue=accessor=foreColor.blue
-ControlFontStyleRec_backColor_red=accessor=backColor.red
-ControlFontStyleRec_backColor_green=accessor=backColor.green
-ControlFontStyleRec_backColor_blue=accessor=backColor.blue
-
-org_eclipse_swt_internal_carbon_ControlTabEntry=
-ControlTabEntry_icon=cast=(ControlButtonContentInfo *)
-ControlTabEntry_name=cast=(CFStringRef)
-ControlTabEntry_enabled=cast=(Boolean)
-
-org_eclipse_swt_internal_carbon_ControlTabInfoRecV1=
-ControlTabInfoRecV1_version=cast=(SInt16)
-ControlTabInfoRecV1_iconSuiteID=cast=(SInt16)
-ControlTabInfoRecV1_name=cast=(CFStringRef)
-
-org_eclipse_swt_internal_carbon_Cursor=
-Cursor_data=
-Cursor_mask=
-Cursor_hotSpot_v=accessor=hotSpot.v
-Cursor_hotSpot_h=accessor=hotSpot.h
-
-org_eclipse_swt_internal_carbon_DataBrowserCallbacks=
-DataBrowserCallbacks_version=cast=(UInt32)
-DataBrowserCallbacks_v1_itemDataCallback=accessor=u.v1.itemDataCallback,cast=(DataBrowserItemDataUPP)
-DataBrowserCallbacks_v1_itemCompareCallback=accessor=u.v1.itemCompareCallback,cast=(DataBrowserItemCompareUPP)
-DataBrowserCallbacks_v1_itemNotificationCallback=accessor=u.v1.itemNotificationCallback,cast=(DataBrowserItemNotificationUPP)
-DataBrowserCallbacks_v1_addDragItemCallback=accessor=u.v1.addDragItemCallback,cast=(DataBrowserAddDragItemUPP)
-DataBrowserCallbacks_v1_acceptDragCallback=accessor=u.v1.acceptDragCallback,cast=(DataBrowserAcceptDragUPP)
-DataBrowserCallbacks_v1_receiveDragCallback=accessor=u.v1.receiveDragCallback,cast=(DataBrowserReceiveDragUPP)
-DataBrowserCallbacks_v1_postProcessDragCallback=accessor=u.v1.postProcessDragCallback,cast=(DataBrowserPostProcessDragUPP)
-DataBrowserCallbacks_v1_itemHelpContentCallback=accessor=u.v1.itemHelpContentCallback,cast=(DataBrowserItemHelpContentUPP)
-DataBrowserCallbacks_v1_getContextualMenuCallback=accessor=u.v1.getContextualMenuCallback,cast=(DataBrowserGetContextualMenuUPP)
-DataBrowserCallbacks_v1_selectContextualMenuCallback=accessor=u.v1.selectContextualMenuCallback,cast=(DataBrowserSelectContextualMenuUPP)
-
-org_eclipse_swt_internal_carbon_DataBrowserCustomCallbacks=
-DataBrowserCustomCallbacks_version=
-DataBrowserCustomCallbacks_v1_drawItemCallback=accessor=u.v1.drawItemCallback,cast=(DataBrowserDrawItemUPP)
-DataBrowserCustomCallbacks_v1_editTextCallback=accessor=u.v1.editTextCallback,cast=(DataBrowserEditItemUPP)
-DataBrowserCustomCallbacks_v1_hitTestCallback=accessor=u.v1.hitTestCallback,cast=(DataBrowserHitTestUPP)
-DataBrowserCustomCallbacks_v1_trackingCallback=accessor=u.v1.trackingCallback,cast=(DataBrowserTrackingUPP)
-DataBrowserCustomCallbacks_v1_dragRegionCallback=accessor=u.v1.dragRegionCallback,cast=(DataBrowserItemDragRgnUPP)
-DataBrowserCustomCallbacks_v1_acceptDragCallback=accessor=u.v1.acceptDragCallback,cast=(DataBrowserItemAcceptDragUPP)
-DataBrowserCustomCallbacks_v1_receiveDragCallback=accessor=u.v1.receiveDragCallback,cast=(DataBrowserItemReceiveDragUPP)
-
-org_eclipse_swt_internal_carbon_DataBrowserListViewColumnDesc=
-DataBrowserListViewColumnDesc_propertyDesc_propertyID=accessor=propertyDesc.propertyID,cast=(DataBrowserPropertyID)
-DataBrowserListViewColumnDesc_propertyDesc_propertyType=accessor=propertyDesc.propertyType,cast=(OSType)
-DataBrowserListViewColumnDesc_propertyDesc_propertyFlags=accessor=propertyDesc.propertyFlags,cast=(DataBrowserPropertyFlags)
-DataBrowserListViewColumnDesc_headerBtnDesc_version=accessor=headerBtnDesc.version,cast=(UInt32)
-DataBrowserListViewColumnDesc_headerBtnDesc_minimumWidth=accessor=headerBtnDesc.minimumWidth,cast=(UInt16)
-DataBrowserListViewColumnDesc_headerBtnDesc_maximumWidth=accessor=headerBtnDesc.maximumWidth,cast=(UInt16)
-DataBrowserListViewColumnDesc_headerBtnDesc_titleOffset=accessor=headerBtnDesc.titleOffset,cast=(SInt16)
-DataBrowserListViewColumnDesc_headerBtnDesc_titleString=accessor=headerBtnDesc.titleString,cast=(CFStringRef)
-DataBrowserListViewColumnDesc_headerBtnDesc_initialOrder=accessor=headerBtnDesc.initialOrder,cast=(DataBrowserSortOrder)
-DataBrowserListViewColumnDesc_headerBtnDesc_btnFontStyle_flags=accessor=headerBtnDesc.btnFontStyle.flags,cast=(SInt16)
-DataBrowserListViewColumnDesc_headerBtnDesc_btnFontStyle_font=accessor=headerBtnDesc.btnFontStyle.font,cast=(SInt16)
-DataBrowserListViewColumnDesc_headerBtnDesc_btnFontStyle_size=accessor=headerBtnDesc.btnFontStyle.size,cast=(SInt16)
-DataBrowserListViewColumnDesc_headerBtnDesc_btnFontStyle_style=accessor=headerBtnDesc.btnFontStyle.style,cast=(SInt16)
-DataBrowserListViewColumnDesc_headerBtnDesc_btnFontStyle_mode=accessor=headerBtnDesc.btnFontStyle.mode,cast=(SInt16)
-DataBrowserListViewColumnDesc_headerBtnDesc_btnFontStyle_just=accessor=headerBtnDesc.btnFontStyle.just,cast=(SInt16)
-DataBrowserListViewColumnDesc_headerBtnDesc_btnFontStyle_foreColor_red=accessor=headerBtnDesc.btnFontStyle.foreColor.red,cast=(unsigned short)
-DataBrowserListViewColumnDesc_headerBtnDesc_btnFontStyle_foreColor_green=accessor=headerBtnDesc.btnFontStyle.foreColor.green,cast=(unsigned short)
-DataBrowserListViewColumnDesc_headerBtnDesc_btnFontStyle_foreColor_blue=accessor=headerBtnDesc.btnFontStyle.foreColor.blue,cast=(unsigned short)
-DataBrowserListViewColumnDesc_headerBtnDesc_btnFontStyle_backColor_red=accessor=headerBtnDesc.btnFontStyle.backColor.red,cast=(unsigned short)
-DataBrowserListViewColumnDesc_headerBtnDesc_btnFontStyle_backColor_green=accessor=headerBtnDesc.btnFontStyle.backColor.green,cast=(unsigned short)
-DataBrowserListViewColumnDesc_headerBtnDesc_btnFontStyle_backColor_blue=accessor=headerBtnDesc.btnFontStyle.backColor.blue,cast=(unsigned short)
-DataBrowserListViewColumnDesc_headerBtnDesc_btnContentInfo_contentType=accessor=headerBtnDesc.btnContentInfo.contentType,cast=(ControlContentType)
-DataBrowserListViewColumnDesc_headerBtnDesc_btnContentInfo_iconRef=accessor=headerBtnDesc.btnContentInfo.u.iconRef,cast=(IconRef)
-
-org_eclipse_swt_internal_carbon_DataBrowserListViewHeaderDesc=
-DataBrowserListViewHeaderDesc_version=
-DataBrowserListViewHeaderDesc_minimumWidth=
-DataBrowserListViewHeaderDesc_maximumWidth=
-DataBrowserListViewHeaderDesc_titleOffset=
-DataBrowserListViewHeaderDesc_titleString=cast=(CFStringRef)
-DataBrowserListViewHeaderDesc_initialOrder=
-DataBrowserListViewHeaderDesc_btnFontStyle_flags=accessor=btnFontStyle.flags
-DataBrowserListViewHeaderDesc_btnFontStyle_font=accessor=btnFontStyle.font
-DataBrowserListViewHeaderDesc_btnFontStyle_size=accessor=btnFontStyle.size
-DataBrowserListViewHeaderDesc_btnFontStyle_style=accessor=btnFontStyle.style
-DataBrowserListViewHeaderDesc_btnFontStyle_mode=accessor=btnFontStyle.mode
-DataBrowserListViewHeaderDesc_btnFontStyle_just=accessor=btnFontStyle.just
-DataBrowserListViewHeaderDesc_btnFontStyle_foreColor_red=accessor=btnFontStyle.foreColor.red
-DataBrowserListViewHeaderDesc_btnFontStyle_foreColor_green=accessor=btnFontStyle.foreColor.green
-DataBrowserListViewHeaderDesc_btnFontStyle_foreColor_blue=accessor=btnFontStyle.foreColor.blue
-DataBrowserListViewHeaderDesc_btnFontStyle_backColor_red=accessor=btnFontStyle.backColor.red
-DataBrowserListViewHeaderDesc_btnFontStyle_backColor_green=accessor=btnFontStyle.backColor.green
-DataBrowserListViewHeaderDesc_btnFontStyle_backColor_blue=accessor=btnFontStyle.backColor.blue
-DataBrowserListViewHeaderDesc_btnContentInfo_contentType=accessor=btnContentInfo.contentType
-DataBrowserListViewHeaderDesc_btnContentInfo_iconRef=accessor=btnContentInfo.u.iconRef,cast=(IconRef)
-
-org_eclipse_swt_internal_carbon_EventRecord=
-EventRecord_what=cast=(EventKind)
-EventRecord_message=
-EventRecord_when=
-EventRecord_where_v=accessor=where.v
-EventRecord_where_h=accessor=where.h
-EventRecord_modifiers=cast=(EventModifiers)
-
-org_eclipse_swt_internal_carbon_FontInfo=
-FontInfo_ascent=
-FontInfo_descent=
-FontInfo_widMax=
-FontInfo_leading=
-
-org_eclipse_swt_internal_carbon_FontSelectionQDStyle=
-FontSelectionQDStyle_version=
-FontSelectionQDStyle_instance_fontFamily=accessor=instance.fontFamily
-FontSelectionQDStyle_instance_fontStyle=accessor=instance.fontStyle
-FontSelectionQDStyle_size=
-FontSelectionQDStyle_hasColor=
-FontSelectionQDStyle_reserved=
-FontSelectionQDStyle_color_red=accessor=color.red
-FontSelectionQDStyle_color_green=accessor=color.green
-FontSelectionQDStyle_color_blue=accessor=color.blue
-
-org_eclipse_swt_internal_carbon_GDevice=
-GDevice_gdRefNum=
-GDevice_gdID=
-GDevice_gdType=
-GDevice_gdITable=cast=(ITabHandle)
-GDevice_gdResPref=
-GDevice_gdSearchProc=cast=(SProcHndl)
-GDevice_gdCompProc=cast=(CProcHndl)
-GDevice_gdFlags=
-GDevice_gdPMap=cast=(PixMapHandle)
-GDevice_gdRefCon=
-GDevice_gdNextGD=cast=(GDHandle)
-GDevice_left=accessor=gdRect.left
-GDevice_top=accessor=gdRect.top
-GDevice_right=accessor=gdRect.right
-GDevice_bottom=accessor=gdRect.bottom
-GDevice_gdMode=
-GDevice_gdCCBytes=
-GDevice_gdCCDepth=
-GDevice_gdCCXData=cast=(Handle)
-GDevice_gdCCXMask=cast=(Handle)
-GDevice_gdExt=cast=(Handle)
-
-org_eclipse_swt_internal_carbon_HICommand=
-HICommand_attributes=
-HICommand_commandID=
-HICommand_menu_menuRef=accessor=menu.menuRef,cast=(MenuRef)
-HICommand_menu_menuItemIndex=accessor=menu.menuItemIndex,cast=(MenuItemIndex)
-
-org_eclipse_swt_internal_carbon_HMHelpContentRec=
-HMHelpContentRec_version=
-HMHelpContentRec_absHotRect_top=accessor=absHotRect.top
-HMHelpContentRec_absHotRect_left=accessor=absHotRect.left
-HMHelpContentRec_absHotRect_bottom=accessor=absHotRect.bottom
-HMHelpContentRec_absHotRect_right=accessor=absHotRect.right
-HMHelpContentRec_tagSide=
-HMHelpContentRec_content0_contentType=accessor=content[0].contentType
-HMHelpContentRec_content0_tagCFString=accessor=content[0].u.tagCFString,cast=(CFStringRef)
-HMHelpContentRec_content1_contentType=accessor=content[1].contentType
-HMHelpContentRec_content1_tagCFString=accessor=content[1].u.tagCFString,cast=(CFStringRef)
-
-org_eclipse_swt_internal_carbon_MenuTrackingData=
-MenuTrackingData_menu=cast=(MenuRef)
-MenuTrackingData_itemSelected=
-MenuTrackingData_itemUnderMouse=
-MenuTrackingData_top=accessor=itemRect.top
-MenuTrackingData_left=accessor=itemRect.left
-MenuTrackingData_bottom=accessor=itemRect.bottom
-MenuTrackingData_right=accessor=itemRect.right
-MenuTrackingData_virtualMenuTop=
-MenuTrackingData_virtualMenuBottom=
-
-org_eclipse_swt_internal_carbon_NavDialogCreationOptions=
-NavDialogCreationOptions_version=
-NavDialogCreationOptions_optionFlags=cast=(NavDialogOptionFlags)
-NavDialogCreationOptions_location_h=accessor=location.h
-NavDialogCreationOptions_location_v=accessor=location.v
-NavDialogCreationOptions_clientName=cast=(CFStringRef)
-NavDialogCreationOptions_windowTitle=cast=(CFStringRef)
-NavDialogCreationOptions_actionButtonLabel=cast=(CFStringRef)
-NavDialogCreationOptions_cancelButtonLabel=cast=(CFStringRef)
-NavDialogCreationOptions_saveFileName=cast=(CFStringRef)
-NavDialogCreationOptions_message=cast=(CFStringRef)
-NavDialogCreationOptions_preferenceKey=
-NavDialogCreationOptions_popupExtension=cast=(CFArrayRef)
-NavDialogCreationOptions_modality=cast=(WindowModality)
-NavDialogCreationOptions_parentWindow=cast=(WindowRef)
-
-org_eclipse_swt_internal_carbon_NavReplyRecord=
-NavReplyRecord_version=cast=(UInt16)
-NavReplyRecord_validRecord=cast=(Boolean)
-NavReplyRecord_replacing=cast=(Boolean)
-NavReplyRecord_isStationery=cast=(Boolean)
-NavReplyRecord_translationNeeded=cast=(Boolean)
-NavReplyRecord_selection_descriptorType=accessor=selection.descriptorType,cast=(DescType)
-NavReplyRecord_selection_dataHandle=accessor=selection.dataHandle,cast=(AEDataStorage)
-NavReplyRecord_keyScript=cast=(ScriptCode)
-NavReplyRecord_fileTranslation=cast=(FileTranslationSpecArrayHandle)
-NavReplyRecord_reserved1=cast=(UInt32)
-NavReplyRecord_saveFileName=cast=(CFStringRef)
-NavReplyRecord_saveFileExtensionHidden=cast=(Boolean)
-NavReplyRecord_reserved2=cast=(UInt8)
-NavReplyRecord_reserved=cast=(char[])
-
-org_eclipse_swt_internal_carbon_OS=
-OS_AECountItems=
-OS_AECountItems_0=cast=(const AEDescList *)
-OS_AECountItems_1=cast=(long *)
-
-OS_AEGetNthPtr=
-OS_AEGetNthPtr_0=cast=(const AEDescList *)
-OS_AEGetNthPtr_1=
-OS_AEGetNthPtr_2=cast=(DescType)
-OS_AEGetNthPtr_3=cast=(AEKeyword *)
-OS_AEGetNthPtr_4=cast=(DescType *)
-OS_AEGetNthPtr_5=cast=(void *)
-OS_AEGetNthPtr_6=cast=(Size)
-OS_AEGetNthPtr_7=cast=(Size *)
-
-OS_AEProcessAppleEvent=
-OS_AEProcessAppleEvent_0=cast=(const EventRecord *)
-
-OS_ATSFontGetPostScriptName=
-OS_ATSFontGetPostScriptName_0=cast=(ATSFontRef)
-OS_ATSFontGetPostScriptName_1=cast=(ATSOptionFlags)
-OS_ATSFontGetPostScriptName_2=cast=(CFStringRef *)
-
-OS_ATSUBatchBreakLines=
-OS_ATSUBatchBreakLines_0=cast=(ATSUTextLayout)
-OS_ATSUBatchBreakLines_1=
-OS_ATSUBatchBreakLines_2=
-OS_ATSUBatchBreakLines_3=
-OS_ATSUBatchBreakLines_4=cast=(ItemCount *)
-
-OS_ATSUCreateStyle=
-OS_ATSUCreateStyle_0=cast=(ATSUStyle *)
-
-OS_ATSUCreateTextLayout=
-OS_ATSUCreateTextLayout_0=cast=(ATSUTextLayout *)
-
-OS_ATSUCreateTextLayoutWithTextPtr=
-OS_ATSUCreateTextLayoutWithTextPtr_0=cast=(ConstUniCharArrayPtr)
-OS_ATSUCreateTextLayoutWithTextPtr_1=
-OS_ATSUCreateTextLayoutWithTextPtr_2=
-OS_ATSUCreateTextLayoutWithTextPtr_3=
-OS_ATSUCreateTextLayoutWithTextPtr_4=
-OS_ATSUCreateTextLayoutWithTextPtr_5=cast=(const UniCharCount *)
-OS_ATSUCreateTextLayoutWithTextPtr_6=cast=(ATSUStyle *)
-OS_ATSUCreateTextLayoutWithTextPtr_7=cast=(ATSUTextLayout *)
-
-OS_ATSUDisposeStyle=
-OS_ATSUDisposeStyle_0=cast=(ATSUStyle)
-
-OS_ATSUDisposeTextLayout=
-OS_ATSUDisposeTextLayout_0=cast=(ATSUTextLayout)
-
-OS_ATSUDrawText=
-OS_ATSUDrawText_0=cast=(ATSUTextLayout)
-OS_ATSUDrawText_1=cast=(UniCharArrayOffset)
-OS_ATSUDrawText_2=cast=(UniCharCount)
-OS_ATSUDrawText_3=cast=(ATSUTextMeasurement)
-OS_ATSUDrawText_4=cast=(ATSUTextMeasurement)
-
-OS_ATSUFindFontFromName=
-OS_ATSUFindFontFromName_0=
-OS_ATSUFindFontFromName_1=
-OS_ATSUFindFontFromName_2=
-OS_ATSUFindFontFromName_3=
-OS_ATSUFindFontFromName_4=
-OS_ATSUFindFontFromName_5=
-OS_ATSUFindFontFromName_6=
-
-OS_ATSUFindFontName=
-OS_ATSUFindFontName_0=cast=ATSUFontID
-OS_ATSUFindFontName_1=
-OS_ATSUFindFontName_2=
-OS_ATSUFindFontName_3=
-OS_ATSUFindFontName_4=
-OS_ATSUFindFontName_5=
-OS_ATSUFindFontName_6=cast=Ptr
-OS_ATSUFindFontName_7=
-OS_ATSUFindFontName_8=
-
-OS_ATSUGetFontIDs=
-OS_ATSUGetFontIDs_0=cast=ATSUFontID *
-OS_ATSUGetFontIDs_1=
-OS_ATSUGetFontIDs_2=
-
-OS_ATSUGetGlyphBounds__IIIIISII_3I=
-OS_ATSUGetGlyphBounds__IIIIISII_3I_0=cast=(ATSUTextLayout)
-OS_ATSUGetGlyphBounds__IIIIISII_3I_1=cast=(ATSUTextMeasurement)
-OS_ATSUGetGlyphBounds__IIIIISII_3I_2=cast=(ATSUTextMeasurement)
-OS_ATSUGetGlyphBounds__IIIIISII_3I_3=cast=(UniCharArrayOffset)
-OS_ATSUGetGlyphBounds__IIIIISII_3I_4=
-OS_ATSUGetGlyphBounds__IIIIISII_3I_5=
-OS_ATSUGetGlyphBounds__IIIIISII_3I_6=
-OS_ATSUGetGlyphBounds__IIIIISII_3I_7=cast=(ATSTrapezoid *)
-OS_ATSUGetGlyphBounds__IIIIISII_3I_8=cast=(ItemCount *)
-
-OS_ATSUGetGlyphBounds__IIIIISILorg_eclipse_swt_internal_carbon_ATSTrapezoid_2_3I=
-OS_ATSUGetGlyphBounds__IIIIISILorg_eclipse_swt_internal_carbon_ATSTrapezoid_2_3I_0=cast=(ATSUTextLayout)
-OS_ATSUGetGlyphBounds__IIIIISILorg_eclipse_swt_internal_carbon_ATSTrapezoid_2_3I_1=cast=(ATSUTextMeasurement)
-OS_ATSUGetGlyphBounds__IIIIISILorg_eclipse_swt_internal_carbon_ATSTrapezoid_2_3I_2=cast=(ATSUTextMeasurement)
-OS_ATSUGetGlyphBounds__IIIIISILorg_eclipse_swt_internal_carbon_ATSTrapezoid_2_3I_3=cast=(UniCharArrayOffset)
-OS_ATSUGetGlyphBounds__IIIIISILorg_eclipse_swt_internal_carbon_ATSTrapezoid_2_3I_4=
-OS_ATSUGetGlyphBounds__IIIIISILorg_eclipse_swt_internal_carbon_ATSTrapezoid_2_3I_5=
-OS_ATSUGetGlyphBounds__IIIIISILorg_eclipse_swt_internal_carbon_ATSTrapezoid_2_3I_6=
-OS_ATSUGetGlyphBounds__IIIIISILorg_eclipse_swt_internal_carbon_ATSTrapezoid_2_3I_7=cast=(ATSTrapezoid *)
-OS_ATSUGetGlyphBounds__IIIIISILorg_eclipse_swt_internal_carbon_ATSTrapezoid_2_3I_8=cast=(ItemCount *)
-
-OS_ATSUGetLayoutControl=
-OS_ATSUGetLayoutControl_0=cast=(ATSUTextLayout)
-OS_ATSUGetLayoutControl_1=cast=ATSUAttributeTag
-OS_ATSUGetLayoutControl_2=
-OS_ATSUGetLayoutControl_3=cast=ATSUAttributeValuePtr
-OS_ATSUGetLayoutControl_4=cast=ByteCount *
-
-OS_ATSUGetLineControl=
-OS_ATSUGetLineControl_0=cast=(ATSUTextLayout)
-OS_ATSUGetLineControl_1=cast=UniCharArrayOffset
-OS_ATSUGetLineControl_2=cast=ATSUAttributeTag
-OS_ATSUGetLineControl_3=cast=ByteCount
-OS_ATSUGetLineControl_4=cast=ATSUAttributeValuePtr
-OS_ATSUGetLineControl_5=cast=ByteCount *
-
-OS_ATSUGetSoftLineBreaks=
-OS_ATSUGetSoftLineBreaks_0=cast=(ATSUTextLayout)
-OS_ATSUGetSoftLineBreaks_1=cast=(UniCharArrayOffset)
-OS_ATSUGetSoftLineBreaks_2=cast=(UniCharCount)
-OS_ATSUGetSoftLineBreaks_3=cast=(ItemCount)
-OS_ATSUGetSoftLineBreaks_4=cast=(UniCharArrayOffset *)
-OS_ATSUGetSoftLineBreaks_5=cast=(ItemCount *)
-
-OS_ATSUGetTextHighlight=
-OS_ATSUGetTextHighlight_0=cast=(ATSUTextLayout)
-OS_ATSUGetTextHighlight_1=
-OS_ATSUGetTextHighlight_2=
-OS_ATSUGetTextHighlight_3=
-OS_ATSUGetTextHighlight_4=
-OS_ATSUGetTextHighlight_5=cast=RgnHandle
-
-OS_ATSUGetUnjustifiedBounds=
-OS_ATSUGetUnjustifiedBounds_0=cast=(ATSUTextLayout)
-OS_ATSUGetUnjustifiedBounds_1=
-OS_ATSUGetUnjustifiedBounds_2=
-OS_ATSUGetUnjustifiedBounds_3=cast=ATSUTextMeasurement *
-OS_ATSUGetUnjustifiedBounds_4=cast=ATSUTextMeasurement *
-OS_ATSUGetUnjustifiedBounds_5=cast=ATSUTextMeasurement *
-OS_ATSUGetUnjustifiedBounds_6=cast=ATSUTextMeasurement *
-
-OS_ATSUHighlightText=
-OS_ATSUHighlightText_0=cast=ATSUTextLayout
-OS_ATSUHighlightText_1=cast=ATSUTextMeasurement
-OS_ATSUHighlightText_2=cast=ATSUTextMeasurement
-OS_ATSUHighlightText_3=
-OS_ATSUHighlightText_4=
-
-OS_ATSUNextCursorPosition=
-OS_ATSUNextCursorPosition_0=cast=(ATSUTextLayout)
-OS_ATSUNextCursorPosition_1=cast=(UniCharArrayOffset)
-OS_ATSUNextCursorPosition_2=cast=(ATSUCursorMovementType)
-OS_ATSUNextCursorPosition_3=cast=(UniCharArrayOffset *)
-
-OS_ATSUOffsetToPosition=
-OS_ATSUOffsetToPosition_0=cast=(ATSUTextLayout)
-OS_ATSUOffsetToPosition_1=
-OS_ATSUOffsetToPosition_2=
-OS_ATSUOffsetToPosition_3=
-OS_ATSUOffsetToPosition_4=
-OS_ATSUOffsetToPosition_5=cast=Boolean *
-
-OS_ATSUPositionToOffset=
-OS_ATSUPositionToOffset_0=cast=(ATSUTextLayout)
-OS_ATSUPositionToOffset_1=
-OS_ATSUPositionToOffset_2=
-OS_ATSUPositionToOffset_3=cast=UniCharArrayOffset *
-OS_ATSUPositionToOffset_4=cast=Boolean *
-OS_ATSUPositionToOffset_5=cast=UniCharArrayOffset *
-
-OS_ATSUPreviousCursorPosition=
-OS_ATSUPreviousCursorPosition_0=cast=(ATSUTextLayout)
-OS_ATSUPreviousCursorPosition_1=cast=(UniCharArrayOffset)
-OS_ATSUPreviousCursorPosition_2=cast=(ATSUCursorMovementType)
-OS_ATSUPreviousCursorPosition_3=cast=(UniCharArrayOffset *)
-
-OS_ATSUSetAttributes=
-OS_ATSUSetAttributes_0=cast=(ATSUStyle)
-OS_ATSUSetAttributes_1=cast=(ItemCount)
-OS_ATSUSetAttributes_2=cast=(ATSUAttributeTag *)
-OS_ATSUSetAttributes_3=cast=(ByteCount *)
-OS_ATSUSetAttributes_4=cast=(ATSUAttributeValuePtr *)
-
-OS_ATSUSetFontFeatures=
-OS_ATSUSetFontFeatures_0=cast=(ATSUStyle)
-OS_ATSUSetFontFeatures_1=cast=(ItemCount)
-OS_ATSUSetFontFeatures_2=cast=(const ATSUFontFeatureType *)
-OS_ATSUSetFontFeatures_3=cast=(const ATSUFontFeatureSelector *)
-
-OS_ATSUSetHighlightingMethod=
-OS_ATSUSetHighlightingMethod_0=cast=(ATSUTextLayout)
-OS_ATSUSetHighlightingMethod_1=
-OS_ATSUSetHighlightingMethod_2=
-
-OS_ATSUSetLayoutControls=
-OS_ATSUSetLayoutControls_0=cast=(ATSUTextLayout)
-OS_ATSUSetLayoutControls_1=cast=(ItemCount)
-OS_ATSUSetLayoutControls_2=cast=(ATSUAttributeTag *)
-OS_ATSUSetLayoutControls_3=cast=(ByteCount *)
-OS_ATSUSetLayoutControls_4=cast=(ATSUAttributeValuePtr *)
-
-OS_ATSUSetLineControls=
-OS_ATSUSetLineControls_0=cast=ATSUTextLayout
-OS_ATSUSetLineControls_1=cast=UniCharArrayOffset
-OS_ATSUSetLineControls_2=cast=ItemCount
-OS_ATSUSetLineControls_3=cast=const ATSUAttributeTag *
-OS_ATSUSetLineControls_4=cast=const ByteCount *
-OS_ATSUSetLineControls_5=cast=const ATSUAttributeValuePtr *
-
-OS_ATSUSetRunStyle=
-OS_ATSUSetRunStyle_0=cast=(ATSUTextLayout)
-OS_ATSUSetRunStyle_1=cast=(ATSUStyle)
-OS_ATSUSetRunStyle_2=cast=(UniCharArrayOffset)
-OS_ATSUSetRunStyle_3=cast=(UniCharCount)
-
-OS_ATSUSetSoftLineBreak=
-OS_ATSUSetSoftLineBreak_0=cast=(ATSUTextLayout)
-OS_ATSUSetSoftLineBreak_1=
-
-OS_ATSUSetTabArray=
-OS_ATSUSetTabArray_0=cast=(ATSUTextLayout)
-OS_ATSUSetTabArray_1=cast=const ATSUTab *
-OS_ATSUSetTabArray_2=
-
-OS_ATSUSetTextPointerLocation=
-OS_ATSUSetTextPointerLocation_0=cast=(ATSUTextLayout)
-OS_ATSUSetTextPointerLocation_1=cast=(ConstUniCharArrayPtr)
-OS_ATSUSetTextPointerLocation_2=cast=(UniCharArrayOffset)
-OS_ATSUSetTextPointerLocation_3=cast=(UniCharCount)
-OS_ATSUSetTextPointerLocation_4=cast=(UniCharCount)
-
-OS_ATSUSetTransientFontMatching=
-OS_ATSUSetTransientFontMatching_0=cast=(ATSUTextLayout)
-OS_ATSUSetTransientFontMatching_1=
-
-OS_ATSUTextDeleted=
-OS_ATSUTextDeleted_0=cast=(ATSUTextLayout)
-OS_ATSUTextDeleted_1=
-OS_ATSUTextDeleted_2=
-
-OS_ATSUTextInserted=
-OS_ATSUTextInserted_0=cast=(ATSUTextLayout)
-OS_ATSUTextInserted_1=
-OS_ATSUTextInserted_2=
-
-OS_ActiveNonFloatingWindow=
-
-OS_AddDataBrowserItems=
-OS_AddDataBrowserItems_0=cast=(ControlRef)
-OS_AddDataBrowserItems_1=cast=(DataBrowserItemID)
-OS_AddDataBrowserItems_2=cast=(UInt32)
-OS_AddDataBrowserItems_3=cast=(const DataBrowserItemID *)
-OS_AddDataBrowserItems_4=cast=(DataBrowserPropertyID)
-
-OS_AddDataBrowserListViewColumn=
-OS_AddDataBrowserListViewColumn_0=cast=(ControlRef)
-OS_AddDataBrowserListViewColumn_1=cast=(DataBrowserListViewColumnDesc *),flags=init
-OS_AddDataBrowserListViewColumn_2=cast=(DataBrowserTableViewColumnIndex)
-
-OS_AddDragItemFlavor=
-OS_AddDragItemFlavor_0=cast=(DragRef)
-OS_AddDragItemFlavor_1=cast=(DragItemRef)
-OS_AddDragItemFlavor_2=cast=(FlavorType)
-OS_AddDragItemFlavor_3=cast=(const void *)
-OS_AddDragItemFlavor_4=cast=(Size)
-OS_AddDragItemFlavor_5=cast=(FlavorFlags)
-
-OS_AppendMenuItemTextWithCFString=
-OS_AppendMenuItemTextWithCFString_0=cast=(MenuRef)
-OS_AppendMenuItemTextWithCFString_1=cast=(CFStringRef)
-OS_AppendMenuItemTextWithCFString_2=cast=(MenuItemAttributes)
-OS_AppendMenuItemTextWithCFString_3=cast=(MenuCommand)
-OS_AppendMenuItemTextWithCFString_4=cast=(MenuItemIndex *)
-
-OS_AutoSizeDataBrowserListViewColumns=
-OS_AutoSizeDataBrowserListViewColumns_0=cast=(ControlRef)
-
-OS_BeginUpdate=
-OS_BeginUpdate_0=cast=(WindowRef)
-
-OS_BringToFront=
-OS_BringToFront_0=cast=(WindowRef)
-
-OS_CFArrayAppendValue=
-OS_CFArrayAppendValue_0=cast=(CFMutableArrayRef)
-OS_CFArrayAppendValue_1=cast=(const void *)
-
-OS_CFArrayCreateMutable=
-OS_CFArrayCreateMutable_0=cast=(CFAllocatorRef)
-OS_CFArrayCreateMutable_1=cast=(CFIndex)
-OS_CFArrayCreateMutable_2=cast=(const CFArrayCallBacks *)
-
-OS_CFArrayGetCount=
-OS_CFArrayGetCount_0=cast=(CFArrayRef)
-
-OS_CFArrayGetValueAtIndex=
-OS_CFArrayGetValueAtIndex_0=cast=(CFArrayRef)
-OS_CFArrayGetValueAtIndex_1=
-
-OS_CFRelease=
-OS_CFRelease_0=cast=(CFTypeRef)
-
-OS_CFStringCreateWithBytes=
-OS_CFStringCreateWithBytes_0=cast=(CFAllocatorRef)
-OS_CFStringCreateWithBytes_1=cast=(const UInt8 *)
-OS_CFStringCreateWithBytes_2=cast=(CFIndex)
-OS_CFStringCreateWithBytes_3=cast=(CFStringEncoding)
-OS_CFStringCreateWithBytes_4=
-
-OS_CFStringCreateWithCharacters=
-OS_CFStringCreateWithCharacters_0=cast=(CFAllocatorRef)
-OS_CFStringCreateWithCharacters_1=cast=(const UniChar *)
-OS_CFStringCreateWithCharacters_2=cast=(CFIndex)
-
-OS_CFStringGetBytes=
-OS_CFStringGetBytes_0=cast=(CFStringRef)
-OS_CFStringGetBytes_1=cast=(CFRange *),flags=struct
-OS_CFStringGetBytes_2=cast=(CFStringEncoding)
-OS_CFStringGetBytes_3=cast=(UInt8)
-OS_CFStringGetBytes_4=cast=(Boolean)
-OS_CFStringGetBytes_5=cast=(UInt8 *)
-OS_CFStringGetBytes_6=cast=(CFIndex)
-OS_CFStringGetBytes_7=cast=(CFIndex *)
-
-OS_CFStringGetCharacters=
-OS_CFStringGetCharacters_0=cast=(CFStringRef)
-OS_CFStringGetCharacters_1=cast=(CFRange *),flags=struct
-OS_CFStringGetCharacters_2=cast=(UniChar *)
-
-OS_CFStringGetLength=
-OS_CFStringGetLength_0=cast=(CFStringRef)
-
-OS_CFStringGetSystemEncoding=
-
-OS_CFURLCopyFileSystemPath=
-OS_CFURLCopyFileSystemPath_0=cast=(CFURLRef)
-OS_CFURLCopyFileSystemPath_1=cast=(CFURLPathStyle)
-
-OS_CFURLCopyLastPathComponent=
-OS_CFURLCopyLastPathComponent_0=cast=(CFURLRef)
-
-OS_CFURLCreateCopyAppendingPathComponent=
-OS_CFURLCreateCopyAppendingPathComponent_0=cast=(CFAllocatorRef)
-OS_CFURLCreateCopyAppendingPathComponent_1=cast=(CFURLRef)
-OS_CFURLCreateCopyAppendingPathComponent_2=cast=(CFStringRef)
-OS_CFURLCreateCopyAppendingPathComponent_3=cast=(Boolean)
-
-OS_CFURLCreateCopyDeletingLastPathComponent=
-OS_CFURLCreateCopyDeletingLastPathComponent_0=cast=(CFAllocatorRef)
-OS_CFURLCreateCopyDeletingLastPathComponent_1=cast=(CFURLRef)
-
-OS_CFURLCreateFromFSRef=
-OS_CFURLCreateFromFSRef_0=cast=(CFAllocatorRef)
-OS_CFURLCreateFromFSRef_1=cast=(const struct FSRef *)
-
-OS_CFURLCreateWithFileSystemPath=
-OS_CFURLCreateWithFileSystemPath_0=cast=(CFAllocatorRef)
-OS_CFURLCreateWithFileSystemPath_1=cast=(CFStringRef)
-OS_CFURLCreateWithFileSystemPath_2=cast=(CFURLPathStyle)
-OS_CFURLCreateWithFileSystemPath_3=
-
-OS_CFURLGetFSRef=
-OS_CFURLGetFSRef_0=cast=(CFURLRef)
-OS_CFURLGetFSRef_1=cast=(struct FSRef *)
-
-OS_CGBitmapContextCreate=
-OS_CGBitmapContextCreate_0=cast=(void *)
-OS_CGBitmapContextCreate_1=cast=(size_t)
-OS_CGBitmapContextCreate_2=cast=(size_t)
-OS_CGBitmapContextCreate_3=cast=(size_t)
-OS_CGBitmapContextCreate_4=cast=(size_t)
-OS_CGBitmapContextCreate_5=cast=(CGColorSpaceRef)
-OS_CGBitmapContextCreate_6=cast=(CGImageAlphaInfo)
-
-OS_CGColorSpaceCreateDeviceRGB=
-
-OS_CGColorSpaceRelease=
-OS_CGColorSpaceRelease_0=cast=(CGColorSpaceRef)
-
-OS_CGContextAddArc=
-OS_CGContextAddArc_0=cast=(CGContextRef)
-OS_CGContextAddArc_1=cast=(float)
-OS_CGContextAddArc_2=cast=(float)
-OS_CGContextAddArc_3=cast=(float)
-OS_CGContextAddArc_4=cast=(float)
-OS_CGContextAddArc_5=cast=(float)
-OS_CGContextAddArc_6=cast=(Boolean)
-
-OS_CGContextAddArcToPoint=
-OS_CGContextAddArcToPoint_0=cast=(CGContextRef)
-OS_CGContextAddArcToPoint_1=
-OS_CGContextAddArcToPoint_2=
-OS_CGContextAddArcToPoint_3=
-OS_CGContextAddArcToPoint_4=
-OS_CGContextAddArcToPoint_5=
-
-OS_CGContextAddLineToPoint=
-OS_CGContextAddLineToPoint_0=cast=(CGContextRef)
-OS_CGContextAddLineToPoint_1=
-OS_CGContextAddLineToPoint_2=
-
-OS_CGContextAddLines=
-OS_CGContextAddLines_0=cast=(CGContextRef)
-OS_CGContextAddLines_1=cast=(const CGPoint *)
-OS_CGContextAddLines_2=cast=(size_t)
-
-OS_CGContextBeginPath=
-OS_CGContextBeginPath_0=cast=(CGContextRef)
-
-OS_CGContextClearRect=
-OS_CGContextClearRect_0=cast=(CGContextRef)
-OS_CGContextClearRect_1=cast=(CGRect *),flags=struct
-
-OS_CGContextClip=
-OS_CGContextClip_0=cast=(CGContextRef)
-
-OS_CGContextClosePath=
-OS_CGContextClosePath_0=cast=(CGContextRef)
-
-OS_CGContextDrawImage=
-OS_CGContextDrawImage_0=cast=(CGContextRef)
-OS_CGContextDrawImage_1=cast=(CGRect *),flags=struct
-OS_CGContextDrawImage_2=cast=(CGImageRef)
-
-OS_CGContextEOFillPath=
-OS_CGContextEOFillPath_0=cast=(CGContextRef)
-
-OS_CGContextFillPath=
-OS_CGContextFillPath_0=cast=(CGContextRef)
-
-OS_CGContextFillRect=
-OS_CGContextFillRect_0=cast=(CGContextRef)
-OS_CGContextFillRect_1=cast=(CGRect *),flags=struct
-
-OS_CGContextFlush=
-OS_CGContextFlush_0=cast=(CGContextRef)
-
-OS_CGContextGetTextPosition=flags=no_gen
-OS_CGContextGetTextPosition_0=cast=(CGContextRef)
-OS_CGContextGetTextPosition_1=cast=(CGPoint)
-
-OS_CGContextMoveToPoint=
-OS_CGContextMoveToPoint_0=cast=(CGContextRef)
-OS_CGContextMoveToPoint_1=cast=(float)
-OS_CGContextMoveToPoint_2=cast=(float)
-
-OS_CGContextRelease=
-OS_CGContextRelease_0=cast=(CGContextRef)
-
-OS_CGContextRestoreGState=
-OS_CGContextRestoreGState_0=cast=(CGContextRef)
-
-OS_CGContextSaveGState=
-OS_CGContextSaveGState_0=cast=(CGContextRef)
-
-OS_CGContextScaleCTM=
-OS_CGContextScaleCTM_0=cast=(CGContextRef)
-OS_CGContextScaleCTM_1=cast=(float)
-OS_CGContextScaleCTM_2=cast=(float)
-
-OS_CGContextSelectFont=
-OS_CGContextSelectFont_0=cast=(CGContextRef)
-OS_CGContextSelectFont_1=cast=(const char *)
-OS_CGContextSelectFont_2=cast=(float)
-OS_CGContextSelectFont_3=cast=(CGTextEncoding)
-
-OS_CGContextSetFillColor=
-OS_CGContextSetFillColor_0=cast=(CGContextRef)
-OS_CGContextSetFillColor_1=cast=(const float *)
-
-OS_CGContextSetFillColorSpace=
-OS_CGContextSetFillColorSpace_0=cast=(CGContextRef)
-OS_CGContextSetFillColorSpace_1=cast=(CGColorSpaceRef)
-
-OS_CGContextSetFont=
-OS_CGContextSetFont_0=cast=(CGContextRef)
-OS_CGContextSetFont_1=cast=(CGFontRef)
-
-OS_CGContextSetFontSize=
-OS_CGContextSetFontSize_0=cast=(CGContextRef)
-OS_CGContextSetFontSize_1=cast=(float)
-
-OS_CGContextSetLineCap=
-OS_CGContextSetLineCap_0=cast=(CGContextRef)
-OS_CGContextSetLineCap_1=
-
-OS_CGContextSetLineDash=
-OS_CGContextSetLineDash_0=cast=(CGContextRef)
-OS_CGContextSetLineDash_1=cast=(float)
-OS_CGContextSetLineDash_2=cast=(const float *)
-OS_CGContextSetLineDash_3=cast=(size_t)
-
-OS_CGContextSetLineWidth=
-OS_CGContextSetLineWidth_0=cast=(CGContextRef)
-OS_CGContextSetLineWidth_1=cast=(float)
-
-OS_CGContextSetRGBFillColor=
-OS_CGContextSetRGBFillColor_0=cast=(CGContextRef)
-OS_CGContextSetRGBFillColor_1=cast=(float)
-OS_CGContextSetRGBFillColor_2=cast=(float)
-OS_CGContextSetRGBFillColor_3=cast=(float)
-OS_CGContextSetRGBFillColor_4=cast=(float)
-
-OS_CGContextSetRGBStrokeColor=
-OS_CGContextSetRGBStrokeColor_0=cast=(CGContextRef)
-OS_CGContextSetRGBStrokeColor_1=cast=(float)
-OS_CGContextSetRGBStrokeColor_2=cast=(float)
-OS_CGContextSetRGBStrokeColor_3=cast=(float)
-OS_CGContextSetRGBStrokeColor_4=cast=(float)
-
-OS_CGContextSetShouldAntialias=
-OS_CGContextSetShouldAntialias_0=cast=(CGContextRef)
-OS_CGContextSetShouldAntialias_1=
-
-OS_CGContextSetShouldSmoothFonts=
-OS_CGContextSetShouldSmoothFonts_0=cast=(CGContextRef)
-OS_CGContextSetShouldSmoothFonts_1=
-
-OS_CGContextSetStrokeColor=
-OS_CGContextSetStrokeColor_0=cast=(CGContextRef)
-OS_CGContextSetStrokeColor_1=cast=(const float *)
-
-OS_CGContextSetStrokeColorSpace=
-OS_CGContextSetStrokeColorSpace_0=cast=(CGContextRef)
-OS_CGContextSetStrokeColorSpace_1=cast=(CGColorSpaceRef)
-
-OS_CGContextSetTextDrawingMode=
-OS_CGContextSetTextDrawingMode_0=cast=(CGContextRef)
-OS_CGContextSetTextDrawingMode_1=cast=(CGTextDrawingMode)
-
-OS_CGContextSetTextMatrix=
-OS_CGContextSetTextMatrix_0=cast=(CGContextRef)
-OS_CGContextSetTextMatrix_1=cast=(CGAffineTransform *),flags=struct
-
-OS_CGContextSetTextPosition=
-OS_CGContextSetTextPosition_0=cast=(CGContextRef)
-OS_CGContextSetTextPosition_1=cast=(float)
-OS_CGContextSetTextPosition_2=cast=(float)
-
-OS_CGContextShowText=
-OS_CGContextShowText_0=cast=(CGContextRef)
-OS_CGContextShowText_1=cast=(const char *)
-OS_CGContextShowText_2=cast=(size_t)
-
-OS_CGContextShowTextAtPoint=
-OS_CGContextShowTextAtPoint_0=cast=(CGContextRef)
-OS_CGContextShowTextAtPoint_1=cast=(float)
-OS_CGContextShowTextAtPoint_2=cast=(float)
-OS_CGContextShowTextAtPoint_3=cast=(const char *)
-OS_CGContextShowTextAtPoint_4=cast=(size_t)
-
-OS_CGContextStrokePath=
-OS_CGContextStrokePath_0=cast=(CGContextRef)
-
-OS_CGContextStrokeRect=
-OS_CGContextStrokeRect_0=cast=(CGContextRef)
-OS_CGContextStrokeRect_1=cast=(CGRect *),flags=struct
-
-OS_CGContextSynchronize=
-OS_CGContextSynchronize_0=cast=(CGContextRef)
-
-OS_CGContextTranslateCTM=
-OS_CGContextTranslateCTM_0=cast=(CGContextRef)
-OS_CGContextTranslateCTM_1=cast=(float)
-OS_CGContextTranslateCTM_2=cast=(float)
-
-OS_CGDataProviderCreateWithData=
-OS_CGDataProviderCreateWithData_0=cast=(void *)
-OS_CGDataProviderCreateWithData_1=cast=(const void *)
-OS_CGDataProviderCreateWithData_2=cast=(size_t)
-OS_CGDataProviderCreateWithData_3=cast=(void *)
-
-OS_CGDataProviderRelease=
-OS_CGDataProviderRelease_0=cast=(CGDataProviderRef)
-
-OS_CGDisplayBaseAddress=
-OS_CGDisplayBaseAddress_0=cast=(CGDirectDisplayID)
-
-OS_CGDisplayBitsPerPixel=
-OS_CGDisplayBitsPerPixel_0=cast=(CGDirectDisplayID)
-
-OS_CGDisplayBitsPerSample=
-OS_CGDisplayBitsPerSample_0=cast=(CGDirectDisplayID)
-
-OS_CGDisplayBytesPerRow=
-OS_CGDisplayBytesPerRow_0=cast=(CGDirectDisplayID)
-
-OS_CGDisplayPixelsHigh=
-OS_CGDisplayPixelsHigh_0=cast=(CGDirectDisplayID)
-
-OS_CGDisplayPixelsWide=
-OS_CGDisplayPixelsWide_0=cast=(CGDirectDisplayID)
-
-OS_CGFontCreateWithPlatformFont=
-OS_CGFontCreateWithPlatformFont_0=
-
-OS_CGFontRelease=
-OS_CGFontRelease_0=cast=(CGFontRef)
-
-OS_CGGetDisplaysWithRect=
-OS_CGGetDisplaysWithRect_0=flags=struct
-OS_CGGetDisplaysWithRect_1=cast=CGDisplayCount
-OS_CGGetDisplaysWithRect_2=cast=(CGDirectDisplayID *)
-OS_CGGetDisplaysWithRect_3=cast=CGDisplayCount *
-
-OS_CGImageCreate=
-OS_CGImageCreate_0=cast=(size_t)
-OS_CGImageCreate_1=cast=(size_t)
-OS_CGImageCreate_2=cast=(size_t)
-OS_CGImageCreate_3=cast=(size_t)
-OS_CGImageCreate_4=cast=(size_t)
-OS_CGImageCreate_5=cast=(CGColorSpaceRef)
-OS_CGImageCreate_6=cast=(CGImageAlphaInfo)
-OS_CGImageCreate_7=cast=(CGDataProviderRef)
-OS_CGImageCreate_8=cast=(const float *)
-OS_CGImageCreate_9=cast=(Boolean)
-OS_CGImageCreate_10=cast=(CGColorRenderingIntent)
-
-OS_CGImageGetAlphaInfo=
-OS_CGImageGetAlphaInfo_0=cast=(CGImageRef)
-
-OS_CGImageGetBitsPerComponent=
-OS_CGImageGetBitsPerComponent_0=cast=(CGImageRef)
-
-OS_CGImageGetBitsPerPixel=
-OS_CGImageGetBitsPerPixel_0=cast=(CGImageRef)
-
-OS_CGImageGetBytesPerRow=
-OS_CGImageGetBytesPerRow_0=cast=(CGImageRef)
-
-OS_CGImageGetColorSpace=
-OS_CGImageGetColorSpace_0=cast=(CGImageRef)
-
-OS_CGImageGetHeight=
-OS_CGImageGetHeight_0=cast=(CGImageRef)
-
-OS_CGImageGetWidth=
-OS_CGImageGetWidth_0=cast=(CGImageRef)
-
-OS_CGImageRelease=
-OS_CGImageRelease_0=cast=(CGImageRef)
-
-OS_CGPostKeyboardEvent=
-OS_CGPostKeyboardEvent_0=cast=(CGCharCode)
-OS_CGPostKeyboardEvent_1=cast=CGKeyCode
-OS_CGPostKeyboardEvent_2=cast=boolean_t
-
-OS_CGPostMouseEvent=
-OS_CGPostMouseEvent_0=flags=struct
-OS_CGPostMouseEvent_1=cast=boolean_t
-OS_CGPostMouseEvent_2=
-OS_CGPostMouseEvent_3=cast=boolean_t
-OS_CGPostMouseEvent_4=cast=boolean_t
-OS_CGPostMouseEvent_5=cast=boolean_t
-
-OS_CGWarpMouseCursorPosition=
-OS_CGWarpMouseCursorPosition_0=flags=struct
-
-OS_CPSEnableForegroundOperation=
-OS_CPSEnableForegroundOperation_0=
-OS_CPSEnableForegroundOperation_1=
-OS_CPSEnableForegroundOperation_2=
-OS_CPSEnableForegroundOperation_3=
-OS_CPSEnableForegroundOperation_4=
-
-OS_CPSSetProcessName=
-OS_CPSSetProcessName_0=
-OS_CPSSetProcessName_1=
-
-OS_CallNextEventHandler=
-OS_CallNextEventHandler_0=cast=(EventHandlerCallRef)
-OS_CallNextEventHandler_1=cast=(EventRef)
-
-OS_CharWidth=
-OS_CharWidth_0=cast=(CharParameter)
-
-OS_ClearCurrentScrap=
-
-OS_ClearKeyboardFocus=
-OS_ClearKeyboardFocus_0=cast=(WindowRef)
-
-OS_ClearMenuBar=
-
-OS_ClipCGContextToRegion=
-OS_ClipCGContextToRegion_0=cast=(CGContextRef)
-OS_ClipCGContextToRegion_1=cast=(const Rect *)
-OS_ClipCGContextToRegion_2=cast=(RgnHandle)
-
-OS_CloseDataBrowserContainer=
-OS_CloseDataBrowserContainer_0=cast=(ControlRef)
-OS_CloseDataBrowserContainer_1=cast=(DataBrowserItemID)
-
-OS_ClosePoly=
-
-OS_CloseRgn=
-OS_CloseRgn_0=cast=(RgnHandle)
-
-OS_CollapseWindow=
-OS_CollapseWindow_0=cast=(WindowRef)
-OS_CollapseWindow_1=cast=(Boolean)
-
-OS_ConvertEventRefToEventRecord=
-OS_ConvertEventRefToEventRecord_0=cast=(EventRef)
-OS_ConvertEventRefToEventRecord_1=cast=(EventRecord *)
-
-OS_ConvertFromPStringToUnicode=
-OS_ConvertFromPStringToUnicode_0=cast=TextToUnicodeInfo
-OS_ConvertFromPStringToUnicode_1=cast=ConstStr255Param
-OS_ConvertFromPStringToUnicode_2=
-OS_ConvertFromPStringToUnicode_3=
-OS_ConvertFromPStringToUnicode_4=
-
-OS_ConvertFromUnicodeToPString=
-OS_ConvertFromUnicodeToPString_0=cast=UnicodeToTextInfo
-OS_ConvertFromUnicodeToPString_1=
-OS_ConvertFromUnicodeToPString_2=cast=ConstUniCharArrayPtr
-OS_ConvertFromUnicodeToPString_3=
-
-OS_CopyBits=
-OS_CopyBits_0=cast=(const BitMap *)
-OS_CopyBits_1=cast=(const BitMap *)
-OS_CopyBits_2=cast=(const Rect *)
-OS_CopyBits_3=cast=(const Rect *)
-OS_CopyBits_4=cast=(short)
-OS_CopyBits_5=cast=(RgnHandle)
-
-OS_CopyControlTitleAsCFString=
-OS_CopyControlTitleAsCFString_0=cast=(ControlRef)
-OS_CopyControlTitleAsCFString_1=cast=(CFStringRef *)
-
-OS_CopyDeepMask=
-OS_CopyDeepMask_0=cast=(const BitMap *)
-OS_CopyDeepMask_1=cast=(const BitMap *)
-OS_CopyDeepMask_2=cast=(const BitMap *)
-OS_CopyDeepMask_3=cast=(const Rect *)
-OS_CopyDeepMask_4=cast=(const Rect *)
-OS_CopyDeepMask_5=cast=(const Rect *)
-OS_CopyDeepMask_6=cast=(short)
-OS_CopyDeepMask_7=cast=(RgnHandle)
-
-OS_CopyMenuItemTextAsCFString=
-OS_CopyMenuItemTextAsCFString_0=cast=(MenuRef)
-OS_CopyMenuItemTextAsCFString_1=cast=(MenuItemIndex)
-OS_CopyMenuItemTextAsCFString_2=cast=(CFStringRef *)
-
-OS_CopyRgn=
-OS_CopyRgn_0=cast=(RgnHandle)
-OS_CopyRgn_1=cast=(RgnHandle)
-
-OS_CountDragItemFlavors=
-OS_CountDragItemFlavors_0=cast=(DragRef)
-OS_CountDragItemFlavors_1=cast=(DragItemRef)
-OS_CountDragItemFlavors_2=cast=(UInt16 *)
-
-OS_CountDragItems=
-OS_CountDragItems_0=cast=(DragRef)
-OS_CountDragItems_1=cast=(UInt16 *)
-
-OS_CountMenuItems=
-OS_CountMenuItems_0=cast=(MenuRef)
-
-OS_CountSubControls=
-OS_CountSubControls_0=cast=(ControlRef)
-OS_CountSubControls_1=cast=(UInt16 *)
-
-OS_CreateBevelButtonControl=
-OS_CreateBevelButtonControl_0=cast=(WindowRef)
-OS_CreateBevelButtonControl_1=cast=(const Rect *)
-OS_CreateBevelButtonControl_2=cast=(CFStringRef)
-OS_CreateBevelButtonControl_3=cast=(ControlBevelThickness)
-OS_CreateBevelButtonControl_4=cast=(ControlBevelButtonBehavior)
-OS_CreateBevelButtonControl_5=cast=(ControlButtonContentInfoPtr)
-OS_CreateBevelButtonControl_6=cast=(SInt16)
-OS_CreateBevelButtonControl_7=cast=(ControlBevelButtonMenuBehavior)
-OS_CreateBevelButtonControl_8=cast=(ControlBevelButtonMenuPlacement)
-OS_CreateBevelButtonControl_9=cast=(ControlRef *)
-
-OS_CreateCGContextForPort=
-OS_CreateCGContextForPort_0=cast=(CGrafPtr)
-OS_CreateCGContextForPort_1=cast=(CGContextRef *)
-
-OS_CreateCheckBoxControl=
-OS_CreateCheckBoxControl_0=cast=(WindowRef)
-OS_CreateCheckBoxControl_1=cast=(const Rect *)
-OS_CreateCheckBoxControl_2=cast=(CFStringRef)
-OS_CreateCheckBoxControl_3=cast=(SInt32)
-OS_CreateCheckBoxControl_4=cast=(Boolean)
-OS_CreateCheckBoxControl_5=cast=(ControlRef *)
-
-OS_CreateDataBrowserControl=
-OS_CreateDataBrowserControl_0=cast=(WindowRef)
-OS_CreateDataBrowserControl_1=cast=(const Rect *)
-OS_CreateDataBrowserControl_2=cast=(DataBrowserViewStyle)
-OS_CreateDataBrowserControl_3=cast=(ControlRef *)
-
-OS_CreateEditUnicodeTextControl=
-OS_CreateEditUnicodeTextControl_0=cast=(WindowRef)
-OS_CreateEditUnicodeTextControl_1=
-OS_CreateEditUnicodeTextControl_2=cast=(CFStringRef)
-OS_CreateEditUnicodeTextControl_3=
-OS_CreateEditUnicodeTextControl_4=
-OS_CreateEditUnicodeTextControl_5=cast=(ControlRef *)
-
-OS_CreateEvent=
-OS_CreateEvent_0=cast=(CFAllocatorRef)
-OS_CreateEvent_1=cast=(UInt32)
-OS_CreateEvent_2=cast=(UInt32)
-OS_CreateEvent_3=cast=(EventTime)
-OS_CreateEvent_4=cast=(EventAttributes)
-OS_CreateEvent_5=cast=(EventRef *)
-
-OS_CreateGroupBoxControl=
-OS_CreateGroupBoxControl_0=cast=(WindowRef)
-OS_CreateGroupBoxControl_1=cast=(const Rect *)
-OS_CreateGroupBoxControl_2=cast=(CFStringRef)
-OS_CreateGroupBoxControl_3=cast=(Boolean)
-OS_CreateGroupBoxControl_4=cast=(ControlRef *)
-
-OS_CreateIconControl=
-OS_CreateIconControl_0=cast=(WindowRef)
-OS_CreateIconControl_1=
-OS_CreateIconControl_2=
-OS_CreateIconControl_3=
-OS_CreateIconControl_4=cast=(ControlRef *)
-
-OS_CreateNewMenu=
-OS_CreateNewMenu_0=cast=(MenuID)
-OS_CreateNewMenu_1=cast=(MenuAttributes)
-OS_CreateNewMenu_2=cast=(MenuRef *)
-
-OS_CreateNewWindow=
-OS_CreateNewWindow_0=cast=(WindowClass)
-OS_CreateNewWindow_1=cast=(WindowAttributes)
-OS_CreateNewWindow_2=cast=(const Rect *)
-OS_CreateNewWindow_3=cast=(WindowRef *)
-
-OS_CreatePopupArrowControl=
-OS_CreatePopupArrowControl_0=cast=(WindowRef)
-OS_CreatePopupArrowControl_1=cast=(const Rect *)
-OS_CreatePopupArrowControl_2=cast=(ControlPopupArrowOrientation)
-OS_CreatePopupArrowControl_3=cast=(ControlPopupArrowSize)
-OS_CreatePopupArrowControl_4=cast=(ControlRef *)
-
-OS_CreatePopupButtonControl=
-OS_CreatePopupButtonControl_0=cast=(WindowRef)
-OS_CreatePopupButtonControl_1=
-OS_CreatePopupButtonControl_2=cast=(CFStringRef)
-OS_CreatePopupButtonControl_3=
-OS_CreatePopupButtonControl_4=
-OS_CreatePopupButtonControl_5=
-OS_CreatePopupButtonControl_6=
-OS_CreatePopupButtonControl_7=
-OS_CreatePopupButtonControl_8=cast=(ControlRef *)
-
-OS_CreateProgressBarControl=
-OS_CreateProgressBarControl_0=cast=(WindowRef)
-OS_CreateProgressBarControl_1=
-OS_CreateProgressBarControl_2=
-OS_CreateProgressBarControl_3=
-OS_CreateProgressBarControl_4=
-OS_CreateProgressBarControl_5=
-OS_CreateProgressBarControl_6=cast=(ControlRef *)
-
-OS_CreatePushButtonControl=
-OS_CreatePushButtonControl_0=cast=(WindowRef)
-OS_CreatePushButtonControl_1=cast=(const Rect *)
-OS_CreatePushButtonControl_2=cast=(CFStringRef)
-OS_CreatePushButtonControl_3=cast=(ControlRef *)
-
-OS_CreatePushButtonWithIconControl=
-OS_CreatePushButtonWithIconControl_0=cast=(WindowRef)
-OS_CreatePushButtonWithIconControl_1=
-OS_CreatePushButtonWithIconControl_2=cast=(CFStringRef)
-OS_CreatePushButtonWithIconControl_3=cast=(ControlButtonContentInfo *)
-OS_CreatePushButtonWithIconControl_4=cast=(ControlPushButtonIconAlignment)
-OS_CreatePushButtonWithIconControl_5=cast=(ControlRef *)
-
-OS_CreateRadioButtonControl=
-OS_CreateRadioButtonControl_0=cast=(WindowRef)
-OS_CreateRadioButtonControl_1=cast=(const Rect *)
-OS_CreateRadioButtonControl_2=cast=(CFStringRef)
-OS_CreateRadioButtonControl_3=cast=(SInt32)
-OS_CreateRadioButtonControl_4=cast=(Boolean)
-OS_CreateRadioButtonControl_5=cast=(ControlRef *)
-
-OS_CreateRootControl=
-OS_CreateRootControl_0=cast=(WindowRef)
-OS_CreateRootControl_1=cast=(ControlRef *)
-
-OS_CreateScrollBarControl=
-OS_CreateScrollBarControl_0=cast=(WindowRef)
-OS_CreateScrollBarControl_1=
-OS_CreateScrollBarControl_2=
-OS_CreateScrollBarControl_3=
-OS_CreateScrollBarControl_4=
-OS_CreateScrollBarControl_5=
-OS_CreateScrollBarControl_6=
-OS_CreateScrollBarControl_7=cast=(ControlActionUPP)
-OS_CreateScrollBarControl_8=cast=(ControlRef *)
-
-OS_CreateSeparatorControl=
-OS_CreateSeparatorControl_0=cast=(WindowRef)
-OS_CreateSeparatorControl_1=
-OS_CreateSeparatorControl_2=cast=(ControlRef *)
-
-OS_CreateSliderControl=
-OS_CreateSliderControl_0=cast=(WindowRef)
-OS_CreateSliderControl_1=cast=(const Rect *)
-OS_CreateSliderControl_2=cast=(SInt32)
-OS_CreateSliderControl_3=cast=(SInt32)
-OS_CreateSliderControl_4=cast=(SInt32)
-OS_CreateSliderControl_5=cast=(ControlSliderOrientation)
-OS_CreateSliderControl_6=cast=(UInt16)
-OS_CreateSliderControl_7=cast=(Boolean)
-OS_CreateSliderControl_8=cast=(ControlActionUPP)
-OS_CreateSliderControl_9=cast=(ControlRef *)
-
-OS_CreateStandardAlert=
-OS_CreateStandardAlert_0=cast=(AlertType)
-OS_CreateStandardAlert_1=cast=(CFStringRef)
-OS_CreateStandardAlert_2=cast=(CFStringRef)
-OS_CreateStandardAlert_3=cast=(const AlertStdCFStringAlertParamRec *)
-OS_CreateStandardAlert_4=cast=(DialogRef *)
-
-OS_CreateStaticTextControl=
-OS_CreateStaticTextControl_0=cast=(WindowRef)
-OS_CreateStaticTextControl_1=
-OS_CreateStaticTextControl_2=cast=(CFStringRef)
-OS_CreateStaticTextControl_3=cast=(const ControlFontStyleRec *)
-OS_CreateStaticTextControl_4=cast=(ControlRef *)
-
-OS_CreateTabsControl=
-OS_CreateTabsControl_0=cast=(WindowRef)
-OS_CreateTabsControl_1=cast=(const Rect *)
-OS_CreateTabsControl_2=cast=(ControlTabSize)
-OS_CreateTabsControl_3=cast=(ControlTabDirection)
-OS_CreateTabsControl_4=cast=(UInt16)
-OS_CreateTabsControl_5=cast=(const ControlTabEntry *)
-OS_CreateTabsControl_6=cast=(ControlRef *)
-
-OS_CreateTextToUnicodeInfoByEncoding=
-OS_CreateTextToUnicodeInfoByEncoding_0=cast=(TextEncoding)
-OS_CreateTextToUnicodeInfoByEncoding_1=cast=(TextToUnicodeInfo *)
-
-OS_CreateUnicodeToTextInfoByEncoding=
-OS_CreateUnicodeToTextInfoByEncoding_0=cast=(TextEncoding)
-OS_CreateUnicodeToTextInfoByEncoding_1=cast=(UnicodeToTextInfo *)
-
-OS_CreateUserPaneControl=
-OS_CreateUserPaneControl_0=cast=(WindowRef)
-OS_CreateUserPaneControl_1=
-OS_CreateUserPaneControl_2=
-OS_CreateUserPaneControl_3=cast=(ControlRef *)
-
-OS_CreateWindowGroup=
-OS_CreateWindowGroup_0=cast=(WindowGroupAttributes)
-OS_CreateWindowGroup_1=cast=(WindowGroupRef *)
-
-OS_DMGetFirstScreenDevice=
-OS_DMGetFirstScreenDevice_0=cast=(Boolean)
-
-OS_DMGetNextScreenDevice=
-OS_DMGetNextScreenDevice_0=cast=(GDHandle)
-OS_DMGetNextScreenDevice_1=cast=(Boolean)
-
-OS_DeleteMenu=
-OS_DeleteMenu_0=cast=(MenuID)
-
-OS_DeleteMenuItem=
-OS_DeleteMenuItem_0=cast=(MenuRef)
-OS_DeleteMenuItem_1=cast=(short)
-
-OS_DeleteMenuItems=
-OS_DeleteMenuItems_0=cast=(MenuRef)
-OS_DeleteMenuItems_1=cast=(MenuItemIndex)
-OS_DeleteMenuItems_2=cast=(ItemCount)
-
-OS_DiffRgn=
-OS_DiffRgn_0=cast=(RgnHandle)
-OS_DiffRgn_1=cast=(RgnHandle)
-OS_DiffRgn_2=cast=(RgnHandle)
-
-OS_DisableControl=
-OS_DisableControl_0=cast=(ControlRef)
-
-OS_DisableMenuCommand=
-OS_DisableMenuCommand_0=cast=(MenuRef)
-OS_DisableMenuCommand_1=cast=(MenuCommand)
-
-OS_DisableMenuItem=
-OS_DisableMenuItem_0=cast=(MenuRef)
-OS_DisableMenuItem_1=cast=(MenuItemIndex)
-
-OS_DisposeControl=
-OS_DisposeControl_0=cast=(ControlRef)
-
-OS_DisposeDrag=
-OS_DisposeDrag_0=cast=(DragRef)
-
-OS_DisposeGWorld=
-OS_DisposeGWorld_0=cast=(GWorldPtr)
-
-OS_DisposeHandle=
-OS_DisposeHandle_0=cast=(Handle)
-
-OS_DisposeMenu=
-OS_DisposeMenu_0=cast=(MenuRef)
-
-OS_DisposePtr=
-OS_DisposePtr_0=cast=(Ptr)
-
-OS_DisposeRgn=
-OS_DisposeRgn_0=cast=(RgnHandle)
-
-OS_DisposeTextToUnicodeInfo=
-OS_DisposeTextToUnicodeInfo_0=cast=TextToUnicodeInfo *
-
-OS_DisposeUnicodeToTextInfo=
-OS_DisposeUnicodeToTextInfo_0=cast=UnicodeToTextInfo *
-
-OS_DisposeWindow=
-OS_DisposeWindow_0=cast=(WindowRef)
-
-OS_DrawControlInCurrentPort=
-OS_DrawControlInCurrentPort_0=cast=(ControlRef)
-
-OS_DrawMenuBar=
-
-OS_DrawText=
-OS_DrawText_0=cast=(const void *)
-OS_DrawText_1=cast=(short)
-OS_DrawText_2=cast=(short)
-
-OS_DrawThemeButton=
-OS_DrawThemeButton_0=cast=(Rect *)
-OS_DrawThemeButton_1=cast=(ThemeButtonKind)
-OS_DrawThemeButton_2=cast=(const ThemeButtonDrawInfo *)
-OS_DrawThemeButton_3=cast=(const ThemeButtonDrawInfo *)
-OS_DrawThemeButton_4=cast=(ThemeEraseUPP)
-OS_DrawThemeButton_5=cast=(ThemeButtonDrawUPP)
-OS_DrawThemeButton_6=cast=(UInt32)
-
-OS_DrawThemeEditTextFrame=
-OS_DrawThemeEditTextFrame_0=cast=(const Rect *)
-OS_DrawThemeEditTextFrame_1=cast=(ThemeDrawState)
-
-OS_DrawThemeFocusRect=
-OS_DrawThemeFocusRect_0=cast=(const Rect *)
-OS_DrawThemeFocusRect_1=cast=(Boolean)
-
-OS_DrawThemePopupArrow=
-OS_DrawThemePopupArrow_0=
-OS_DrawThemePopupArrow_1=cast=ThemeArrowOrientation
-OS_DrawThemePopupArrow_2=cast=(ThemePopupArrowSize)
-OS_DrawThemePopupArrow_3=cast=(ThemeDrawState)
-OS_DrawThemePopupArrow_4=cast=(ThemeEraseUPP)
-OS_DrawThemePopupArrow_5=cast=(UInt32)
-
-OS_DrawThemeSeparator=
-OS_DrawThemeSeparator_0=cast=(const Rect *)
-OS_DrawThemeSeparator_1=cast=(ThemeDrawState)
-
-OS_DrawThemeTextBox=
-OS_DrawThemeTextBox_0=cast=(CFStringRef)
-OS_DrawThemeTextBox_1=cast=(ThemeFontID)
-OS_DrawThemeTextBox_2=cast=(ThemeDrawState)
-OS_DrawThemeTextBox_3=cast=(Boolean)
-OS_DrawThemeTextBox_4=cast=(const Rect *)
-OS_DrawThemeTextBox_5=cast=(SInt16)
-OS_DrawThemeTextBox_6=cast=(void *)
-
-OS_EmbedControl=
-OS_EmbedControl_0=cast=(ControlRef)
-OS_EmbedControl_1=cast=(ControlRef)
-
-OS_EmptyRect=
-OS_EmptyRect_0=cast=(const Rect *)
-
-OS_EmptyRgn=
-OS_EmptyRgn_0=cast=(RgnHandle)
-
-OS_EnableControl=
-OS_EnableControl_0=cast=(ControlRef)
-
-OS_EnableMenuCommand=
-OS_EnableMenuCommand_0=cast=(MenuRef)
-OS_EnableMenuCommand_1=cast=(MenuCommand)
-
-OS_EnableMenuItem=
-OS_EnableMenuItem_0=cast=(MenuRef)
-OS_EnableMenuItem_1=cast=(MenuItemIndex)
-
-OS_EndUpdate=
-OS_EndUpdate_0=cast=(WindowRef)
-
-OS_EqualRect=
-OS_EqualRect_0=
-OS_EqualRect_1=
-
-OS_EraseRect=
-OS_EraseRect_0=cast=(const Rect *)
-
-OS_EraseRgn=
-OS_EraseRgn_0=cast=(RgnHandle)
-
-OS_FMCreateFontFamilyInstanceIterator=
-OS_FMCreateFontFamilyInstanceIterator_0=cast=(FMFontFamily)
-OS_FMCreateFontFamilyInstanceIterator_1=cast=(FMFontFamilyInstanceIterator *)
-
-OS_FMCreateFontFamilyIterator=
-OS_FMCreateFontFamilyIterator_0=cast=(const FMFilter *)
-OS_FMCreateFontFamilyIterator_1=cast=(void *)
-OS_FMCreateFontFamilyIterator_2=cast=(OptionBits)
-OS_FMCreateFontFamilyIterator_3=cast=(FMFontFamilyIterator *)
-
-OS_FMDisposeFontFamilyInstanceIterator=
-OS_FMDisposeFontFamilyInstanceIterator_0=cast=(FMFontFamilyInstanceIterator *)
-
-OS_FMDisposeFontFamilyIterator=
-OS_FMDisposeFontFamilyIterator_0=cast=(FMFontFamilyIterator *)
-
-OS_FMGetATSFontRefFromFont=
-OS_FMGetATSFontRefFromFont_0=
-
-OS_FMGetFontFamilyFromName=
-OS_FMGetFontFamilyFromName_0=cast=(ConstStr255Param)
-
-OS_FMGetFontFamilyInstanceFromFont=
-OS_FMGetFontFamilyInstanceFromFont_0=cast=FMFont
-OS_FMGetFontFamilyInstanceFromFont_1=cast=FMFontFamily *
-OS_FMGetFontFamilyInstanceFromFont_2=cast=FMFontStyle *
-
-OS_FMGetFontFamilyName=
-OS_FMGetFontFamilyName_0=
-OS_FMGetFontFamilyName_1=
-
-OS_FMGetFontFromFontFamilyInstance=
-OS_FMGetFontFromFontFamilyInstance_0=cast=(FMFontFamily)
-OS_FMGetFontFromFontFamilyInstance_1=cast=(FMFontStyle)
-OS_FMGetFontFromFontFamilyInstance_2=cast=(FMFont *)
-OS_FMGetFontFromFontFamilyInstance_3=cast=(FMFontStyle *)
-
-OS_FMGetNextFontFamily=
-OS_FMGetNextFontFamily_0=cast=(FMFontFamilyIterator *)
-OS_FMGetNextFontFamily_1=cast=(FMFontFamily *)
-
-OS_FMGetNextFontFamilyInstance=
-OS_FMGetNextFontFamilyInstance_0=cast=(FMFontFamilyInstanceIterator *)
-OS_FMGetNextFontFamilyInstance_1=cast=(FMFont *)
-OS_FMGetNextFontFamilyInstance_2=cast=(FMFontStyle *)
-OS_FMGetNextFontFamilyInstance_3=cast=(FMFontSize *)
-
-OS_FPIsFontPanelVisible=
-
-OS_FPShowHideFontPanel=
-
-OS_FSGetCatalogInfo=
-OS_FSGetCatalogInfo_0=cast=(FSRef *)
-OS_FSGetCatalogInfo_1=cast=(FSCatalogInfoBitmap)
-OS_FSGetCatalogInfo_2=cast=(FSCatalogInfo *)
-OS_FSGetCatalogInfo_3=cast=(HFSUniStr255 *)
-OS_FSGetCatalogInfo_4=cast=(FSSpec *)
-OS_FSGetCatalogInfo_5=cast=(FSRef *)
-
-OS_FSpGetFInfo=
-OS_FSpGetFInfo_0=cast=(FSSpec *)
-OS_FSpGetFInfo_1=cast=(FInfo *)
-
-OS_FSpMakeFSRef=
-OS_FSpMakeFSRef_0=cast=(const FSSpec *)
-OS_FSpMakeFSRef_1=cast=(FSRef *)
-
-OS_FetchFontInfo=
-OS_FetchFontInfo_0=
-OS_FetchFontInfo_1=
-OS_FetchFontInfo_2=
-OS_FetchFontInfo_3=
-
-OS_FindWindow=
-OS_FindWindow_0=cast=(Point *),flags=struct
-OS_FindWindow_1=cast=(WindowRef *)
-
-OS_Fix2Long=
-OS_Fix2Long_0=
-
-OS_FrameOval=
-OS_FrameOval_0=cast=(const Rect *)
-
-OS_FramePoly=
-OS_FramePoly_0=cast=(PolyHandle)
-
-OS_FrameRect=
-OS_FrameRect_0=cast=(const Rect *)
-
-OS_FrameRoundRect=
-OS_FrameRoundRect_0=cast=(const Rect *)
-OS_FrameRoundRect_1=cast=(short)
-OS_FrameRoundRect_2=cast=(short)
-
-OS_FrontWindow=
-
-OS_Gestalt=
-OS_Gestalt_0=cast=OSType
-OS_Gestalt_1=cast=long *
-
-OS_GetAppFont=
-
-OS_GetApplicationEventTarget=
-
-OS_GetAvailableWindowAttributes=
-OS_GetAvailableWindowAttributes_0=cast=(WindowClass)
-
-OS_GetAvailableWindowPositioningBounds=
-OS_GetAvailableWindowPositioningBounds_0=cast=(GDHandle)
-OS_GetAvailableWindowPositioningBounds_1=cast=(Rect *)
-
-OS_GetBestControlRect=
-OS_GetBestControlRect_0=cast=(ControlRef)
-OS_GetBestControlRect_1=cast=(Rect *)
-OS_GetBestControlRect_2=cast=(SInt16 *)
-
-OS_GetCaretTime=
-
-OS_GetClip=
-OS_GetClip_0=cast=(RgnHandle)
-
-OS_GetControl32BitMaximum=
-OS_GetControl32BitMaximum_0=cast=(ControlRef)
-
-OS_GetControl32BitMinimum=
-OS_GetControl32BitMinimum_0=cast=(ControlRef)
-
-OS_GetControl32BitValue=
-OS_GetControl32BitValue_0=cast=(ControlRef)
-
-OS_GetControlBounds=
-OS_GetControlBounds_0=cast=(ControlRef)
-OS_GetControlBounds_1=cast=(Rect *)
-
-OS_GetControlData__ISIILorg_eclipse_swt_internal_carbon_ControlFontStyleRec_2_3I=
-OS_GetControlData__ISIILorg_eclipse_swt_internal_carbon_ControlFontStyleRec_2_3I_0=cast=(ControlRef)
-OS_GetControlData__ISIILorg_eclipse_swt_internal_carbon_ControlFontStyleRec_2_3I_1=cast=(ControlPartCode)
-OS_GetControlData__ISIILorg_eclipse_swt_internal_carbon_ControlFontStyleRec_2_3I_2=cast=(ResType)
-OS_GetControlData__ISIILorg_eclipse_swt_internal_carbon_ControlFontStyleRec_2_3I_3=cast=(Size)
-OS_GetControlData__ISIILorg_eclipse_swt_internal_carbon_ControlFontStyleRec_2_3I_4=cast=(void *)
-OS_GetControlData__ISIILorg_eclipse_swt_internal_carbon_ControlFontStyleRec_2_3I_5=cast=(Size *)
-
-OS_GetControlData__ISIILorg_eclipse_swt_internal_carbon_Rect_2_3I=
-OS_GetControlData__ISIILorg_eclipse_swt_internal_carbon_Rect_2_3I_0=cast=(ControlRef)
-OS_GetControlData__ISIILorg_eclipse_swt_internal_carbon_Rect_2_3I_1=cast=(ControlPartCode)
-OS_GetControlData__ISIILorg_eclipse_swt_internal_carbon_Rect_2_3I_2=cast=(ResType)
-OS_GetControlData__ISIILorg_eclipse_swt_internal_carbon_Rect_2_3I_3=cast=(Size)
-OS_GetControlData__ISIILorg_eclipse_swt_internal_carbon_Rect_2_3I_4=cast=(void *)
-OS_GetControlData__ISIILorg_eclipse_swt_internal_carbon_Rect_2_3I_5=cast=(Size *)
-
-OS_GetControlData__ISII_3B_3I=
-OS_GetControlData__ISII_3B_3I_0=cast=(ControlRef)
-OS_GetControlData__ISII_3B_3I_1=cast=(ControlPartCode)
-OS_GetControlData__ISII_3B_3I_2=cast=(ResType)
-OS_GetControlData__ISII_3B_3I_3=cast=(Size)
-OS_GetControlData__ISII_3B_3I_4=cast=(void *)
-OS_GetControlData__ISII_3B_3I_5=cast=(Size *)
-
-OS_GetControlData__ISII_3I_3I=
-OS_GetControlData__ISII_3I_3I_0=cast=(ControlRef)
-OS_GetControlData__ISII_3I_3I_1=cast=(ControlPartCode)
-OS_GetControlData__ISII_3I_3I_2=cast=(ResType)
-OS_GetControlData__ISII_3I_3I_3=cast=(Size)
-OS_GetControlData__ISII_3I_3I_4=cast=(void *)
-OS_GetControlData__ISII_3I_3I_5=cast=(Size *)
-
-OS_GetControlData__ISII_3S_3I=
-OS_GetControlData__ISII_3S_3I_0=cast=(ControlRef)
-OS_GetControlData__ISII_3S_3I_1=cast=(ControlPartCode)
-OS_GetControlData__ISII_3S_3I_2=cast=(ResType)
-OS_GetControlData__ISII_3S_3I_3=cast=(Size)
-OS_GetControlData__ISII_3S_3I_4=cast=(void *)
-OS_GetControlData__ISII_3S_3I_5=cast=(Size *)
-
-OS_GetControlEventTarget=
-OS_GetControlEventTarget_0=cast=(ControlRef)
-
-OS_GetControlFeatures=
-OS_GetControlFeatures_0=cast=(ControlRef)
-OS_GetControlFeatures_1=
-
-OS_GetControlOwner=
-OS_GetControlOwner_0=cast=(ControlRef)
-
-OS_GetControlProperty=
-OS_GetControlProperty_0=cast=(ControlRef)
-OS_GetControlProperty_1=
-OS_GetControlProperty_2=
-OS_GetControlProperty_3=
-OS_GetControlProperty_4=
-OS_GetControlProperty_5=
-
-OS_GetControlReference=
-OS_GetControlReference_0=cast=(ControlRef)
-
-OS_GetControlRegion=
-OS_GetControlRegion_0=cast=(ControlRef)
-OS_GetControlRegion_1=cast=(ControlPartCode)
-OS_GetControlRegion_2=cast=(RgnHandle)
-
-OS_GetControlValue=
-OS_GetControlValue_0=cast=(ControlRef)
-
-OS_GetControlViewSize=
-OS_GetControlViewSize_0=cast=(ControlRef)
-
-OS_GetCurrentEventButtonState=
-
-OS_GetCurrentEventKeyModifiers=
-
-OS_GetCurrentEventLoop=
-
-OS_GetCurrentEventQueue=
-
-OS_GetCurrentProcess=
-OS_GetCurrentProcess_0=cast=(ProcessSerialNumber *)
-
-OS_GetCurrentScrap=
-OS_GetCurrentScrap_0=cast=(ScrapRef *)
-
-OS_GetDataBrowserCallbacks=
-OS_GetDataBrowserCallbacks_0=cast=(ControlRef)
-OS_GetDataBrowserCallbacks_1=cast=(DataBrowserCallbacks *)
-
-OS_GetDataBrowserItemCount=
-OS_GetDataBrowserItemCount_0=cast=(ControlRef)
-OS_GetDataBrowserItemCount_1=cast=(DataBrowserItemID)
-OS_GetDataBrowserItemCount_2=cast=(Boolean)
-OS_GetDataBrowserItemCount_3=cast=(DataBrowserItemState)
-OS_GetDataBrowserItemCount_4=cast=(UInt32 *)
-
-OS_GetDataBrowserItemDataButtonValue=
-OS_GetDataBrowserItemDataButtonValue_0=cast=(ControlRef)
-OS_GetDataBrowserItemDataButtonValue_1=
-
-OS_GetDataBrowserItemPartBounds=
-OS_GetDataBrowserItemPartBounds_0=cast=(ControlRef)
-OS_GetDataBrowserItemPartBounds_1=cast=(DataBrowserItemID)
-OS_GetDataBrowserItemPartBounds_2=cast=(DataBrowserPropertyID)
-OS_GetDataBrowserItemPartBounds_3=cast=(DataBrowserPropertyPart)
-OS_GetDataBrowserItemPartBounds_4=cast=(Rect *)
-
-OS_GetDataBrowserItemState=
-OS_GetDataBrowserItemState_0=cast=(ControlRef)
-OS_GetDataBrowserItemState_1=
-OS_GetDataBrowserItemState_2=
-
-OS_GetDataBrowserItems=
-OS_GetDataBrowserItems_0=cast=(ControlRef)
-OS_GetDataBrowserItems_1=cast=(DataBrowserItemID)
-OS_GetDataBrowserItems_2=cast=(Boolean)
-OS_GetDataBrowserItems_3=cast=(DataBrowserItemState)
-OS_GetDataBrowserItems_4=cast=(Handle)
-
-OS_GetDataBrowserListViewHeaderBtnHeight=
-OS_GetDataBrowserListViewHeaderBtnHeight_0=cast=(ControlRef)
-OS_GetDataBrowserListViewHeaderBtnHeight_1=
-
-OS_GetDataBrowserListViewHeaderDesc=
-OS_GetDataBrowserListViewHeaderDesc_0=cast=(ControlRef)
-OS_GetDataBrowserListViewHeaderDesc_1=cast=(DataBrowserTableViewColumnID)
-OS_GetDataBrowserListViewHeaderDesc_2=cast=(DataBrowserListViewHeaderDesc *)
-
-OS_GetDataBrowserScrollBarInset=
-OS_GetDataBrowserScrollBarInset_0=cast=(ControlRef)
-OS_GetDataBrowserScrollBarInset_1=
-
-OS_GetDataBrowserScrollPosition=
-OS_GetDataBrowserScrollPosition_0=cast=(ControlRef)
-OS_GetDataBrowserScrollPosition_1=cast=(UInt32 *)
-OS_GetDataBrowserScrollPosition_2=cast=(UInt32 *)
-
-OS_GetDataBrowserSelectionAnchor=
-OS_GetDataBrowserSelectionAnchor_0=cast=(ControlRef)
-OS_GetDataBrowserSelectionAnchor_1=cast=(UInt32 *)
-OS_GetDataBrowserSelectionAnchor_2=cast=(UInt32 *)
-
-OS_GetDataBrowserSelectionFlags=
-OS_GetDataBrowserSelectionFlags_0=cast=(ControlRef)
-OS_GetDataBrowserSelectionFlags_1=
-
-OS_GetDataBrowserSortProperty=
-OS_GetDataBrowserSortProperty_0=cast=(ControlRef)
-OS_GetDataBrowserSortProperty_1=
-
-OS_GetDataBrowserTableViewColumnPosition=
-OS_GetDataBrowserTableViewColumnPosition_0=cast=(ControlRef)
-OS_GetDataBrowserTableViewColumnPosition_1=cast=(DataBrowserTableViewColumnID)
-OS_GetDataBrowserTableViewColumnPosition_2=cast=(DataBrowserTableViewColumnIndex *)
-
-OS_GetDataBrowserTableViewItemID=
-OS_GetDataBrowserTableViewItemID_0=cast=(ControlRef)
-OS_GetDataBrowserTableViewItemID_1=cast=(DataBrowserTableViewRowIndex)
-OS_GetDataBrowserTableViewItemID_2=cast=(DataBrowserItemID *)
-
-OS_GetDataBrowserTableViewItemRow=
-OS_GetDataBrowserTableViewItemRow_0=cast=(ControlRef)
-OS_GetDataBrowserTableViewItemRow_1=cast=(DataBrowserTableViewRowIndex)
-OS_GetDataBrowserTableViewItemRow_2=cast=(DataBrowserItemID *)
-
-OS_GetDataBrowserTableViewNamedColumnWidth=
-OS_GetDataBrowserTableViewNamedColumnWidth_0=cast=(ControlRef)
-OS_GetDataBrowserTableViewNamedColumnWidth_1=cast=(DataBrowserTableViewColumnID)
-OS_GetDataBrowserTableViewNamedColumnWidth_2=cast=(UInt16 *)
-
-OS_GetDataBrowserTableViewRowHeight=
-OS_GetDataBrowserTableViewRowHeight_0=cast=(ControlRef)
-OS_GetDataBrowserTableViewRowHeight_1=cast=(UInt16 *)
-
-OS_GetDblTime=
-
-OS_GetDefFontSize=
-
-OS_GetDeviceList=
-
-OS_GetDragAllowableActions=
-OS_GetDragAllowableActions_0=cast=(DragRef)
-OS_GetDragAllowableActions_1=cast=(DragActions *)
-
-OS_GetDragDropAction=
-OS_GetDragDropAction_0=cast=(DragRef)
-OS_GetDragDropAction_1=cast=(DragActions *)
-
-OS_GetDragItemReferenceNumber=
-OS_GetDragItemReferenceNumber_0=cast=(DragRef)
-OS_GetDragItemReferenceNumber_1=
-OS_GetDragItemReferenceNumber_2=cast=(DragItemRef *)
-
-OS_GetDragModifiers=
-OS_GetDragModifiers_0=cast=(DragRef)
-OS_GetDragModifiers_1=cast=(SInt16 *)
-OS_GetDragModifiers_2=cast=(SInt16 *)
-OS_GetDragModifiers_3=cast=(SInt16 *)
-
-OS_GetDragMouse=
-OS_GetDragMouse_0=cast=(DragRef)
-OS_GetDragMouse_1=cast=(Point *)
-OS_GetDragMouse_2=cast=(Point *)
-
-OS_GetEventClass=
-OS_GetEventClass_0=cast=(EventRef)
-
-OS_GetEventDispatcherTarget=
-
-OS_GetEventKind=
-OS_GetEventKind_0=cast=(EventRef)
-
-OS_GetEventParameter__III_3II_3ILorg_eclipse_swt_internal_carbon_CGPoint_2=
-OS_GetEventParameter__III_3II_3ILorg_eclipse_swt_internal_carbon_CGPoint_2_0=cast=(EventRef)
-OS_GetEventParameter__III_3II_3ILorg_eclipse_swt_internal_carbon_CGPoint_2_1=cast=(EventParamName)
-OS_GetEventParameter__III_3II_3ILorg_eclipse_swt_internal_carbon_CGPoint_2_2=cast=(EventParamType)
-OS_GetEventParameter__III_3II_3ILorg_eclipse_swt_internal_carbon_CGPoint_2_3=cast=(EventParamType *)
-OS_GetEventParameter__III_3II_3ILorg_eclipse_swt_internal_carbon_CGPoint_2_4=cast=(UInt32)
-OS_GetEventParameter__III_3II_3ILorg_eclipse_swt_internal_carbon_CGPoint_2_5=cast=(UInt32 *)
-OS_GetEventParameter__III_3II_3ILorg_eclipse_swt_internal_carbon_CGPoint_2_6=cast=(void *)
-
-OS_GetEventParameter__III_3II_3ILorg_eclipse_swt_internal_carbon_HICommand_2=
-OS_GetEventParameter__III_3II_3ILorg_eclipse_swt_internal_carbon_HICommand_2_0=cast=(EventRef)
-OS_GetEventParameter__III_3II_3ILorg_eclipse_swt_internal_carbon_HICommand_2_1=cast=(EventParamName)
-OS_GetEventParameter__III_3II_3ILorg_eclipse_swt_internal_carbon_HICommand_2_2=cast=(EventParamType)
-OS_GetEventParameter__III_3II_3ILorg_eclipse_swt_internal_carbon_HICommand_2_3=cast=(EventParamType *)
-OS_GetEventParameter__III_3II_3ILorg_eclipse_swt_internal_carbon_HICommand_2_4=cast=(UInt32)
-OS_GetEventParameter__III_3II_3ILorg_eclipse_swt_internal_carbon_HICommand_2_5=cast=(UInt32 *)
-OS_GetEventParameter__III_3II_3ILorg_eclipse_swt_internal_carbon_HICommand_2_6=cast=(void *)
-
-OS_GetEventParameter__III_3II_3ILorg_eclipse_swt_internal_carbon_Point_2=
-OS_GetEventParameter__III_3II_3ILorg_eclipse_swt_internal_carbon_Point_2_0=cast=(EventRef)
-OS_GetEventParameter__III_3II_3ILorg_eclipse_swt_internal_carbon_Point_2_1=cast=(EventParamName)
-OS_GetEventParameter__III_3II_3ILorg_eclipse_swt_internal_carbon_Point_2_2=cast=(EventParamType)
-OS_GetEventParameter__III_3II_3ILorg_eclipse_swt_internal_carbon_Point_2_3=cast=(EventParamType *)
-OS_GetEventParameter__III_3II_3ILorg_eclipse_swt_internal_carbon_Point_2_4=cast=(UInt32)
-OS_GetEventParameter__III_3II_3ILorg_eclipse_swt_internal_carbon_Point_2_5=cast=(UInt32 *)
-OS_GetEventParameter__III_3II_3ILorg_eclipse_swt_internal_carbon_Point_2_6=cast=(void *)
-
-OS_GetEventParameter__III_3II_3ILorg_eclipse_swt_internal_carbon_RGBColor_2=
-OS_GetEventParameter__III_3II_3ILorg_eclipse_swt_internal_carbon_RGBColor_2_0=cast=(EventRef)
-OS_GetEventParameter__III_3II_3ILorg_eclipse_swt_internal_carbon_RGBColor_2_1=cast=(EventParamName)
-OS_GetEventParameter__III_3II_3ILorg_eclipse_swt_internal_carbon_RGBColor_2_2=cast=(EventParamType)
-OS_GetEventParameter__III_3II_3ILorg_eclipse_swt_internal_carbon_RGBColor_2_3=cast=(EventParamType *)
-OS_GetEventParameter__III_3II_3ILorg_eclipse_swt_internal_carbon_RGBColor_2_4=cast=(UInt32)
-OS_GetEventParameter__III_3II_3ILorg_eclipse_swt_internal_carbon_RGBColor_2_5=cast=(UInt32 *)
-OS_GetEventParameter__III_3II_3ILorg_eclipse_swt_internal_carbon_RGBColor_2_6=cast=(void *)
-
-OS_GetEventParameter__III_3II_3ILorg_eclipse_swt_internal_carbon_Rect_2=
-OS_GetEventParameter__III_3II_3ILorg_eclipse_swt_internal_carbon_Rect_2_0=cast=(EventRef)
-OS_GetEventParameter__III_3II_3ILorg_eclipse_swt_internal_carbon_Rect_2_1=cast=(EventParamName)
-OS_GetEventParameter__III_3II_3ILorg_eclipse_swt_internal_carbon_Rect_2_2=cast=(EventParamType)
-OS_GetEventParameter__III_3II_3ILorg_eclipse_swt_internal_carbon_Rect_2_3=cast=(EventParamType *)
-OS_GetEventParameter__III_3II_3ILorg_eclipse_swt_internal_carbon_Rect_2_4=cast=(UInt32)
-OS_GetEventParameter__III_3II_3ILorg_eclipse_swt_internal_carbon_Rect_2_5=cast=(UInt32 *)
-OS_GetEventParameter__III_3II_3ILorg_eclipse_swt_internal_carbon_Rect_2_6=cast=(void *)
-
-OS_GetEventParameter__III_3II_3I_3B=
-OS_GetEventParameter__III_3II_3I_3B_0=cast=(EventRef)
-OS_GetEventParameter__III_3II_3I_3B_1=cast=(EventParamName)
-OS_GetEventParameter__III_3II_3I_3B_2=cast=(EventParamType)
-OS_GetEventParameter__III_3II_3I_3B_3=cast=(EventParamType *)
-OS_GetEventParameter__III_3II_3I_3B_4=cast=(UInt32)
-OS_GetEventParameter__III_3II_3I_3B_5=cast=(UInt32 *)
-OS_GetEventParameter__III_3II_3I_3B_6=cast=(void *)
-
-OS_GetEventParameter__III_3II_3I_3C=
-OS_GetEventParameter__III_3II_3I_3C_0=cast=(EventRef)
-OS_GetEventParameter__III_3II_3I_3C_1=cast=(EventParamName)
-OS_GetEventParameter__III_3II_3I_3C_2=cast=(EventParamType)
-OS_GetEventParameter__III_3II_3I_3C_3=cast=(EventParamType *)
-OS_GetEventParameter__III_3II_3I_3C_4=cast=(UInt32)
-OS_GetEventParameter__III_3II_3I_3C_5=cast=(UInt32 *)
-OS_GetEventParameter__III_3II_3I_3C_6=cast=(void *)
-
-OS_GetEventParameter__III_3II_3I_3I=
-OS_GetEventParameter__III_3II_3I_3I_0=cast=(EventRef)
-OS_GetEventParameter__III_3II_3I_3I_1=cast=(EventParamName)
-OS_GetEventParameter__III_3II_3I_3I_2=cast=(EventParamType)
-OS_GetEventParameter__III_3II_3I_3I_3=cast=(EventParamType *)
-OS_GetEventParameter__III_3II_3I_3I_4=cast=(UInt32)
-OS_GetEventParameter__III_3II_3I_3I_5=cast=(UInt32 *)
-OS_GetEventParameter__III_3II_3I_3I_6=cast=(void *)
-
-OS_GetEventParameter__III_3II_3I_3S=
-OS_GetEventParameter__III_3II_3I_3S_0=cast=(EventRef)
-OS_GetEventParameter__III_3II_3I_3S_1=cast=(EventParamName)
-OS_GetEventParameter__III_3II_3I_3S_2=cast=(EventParamType)
-OS_GetEventParameter__III_3II_3I_3S_3=cast=(EventParamType *)
-OS_GetEventParameter__III_3II_3I_3S_4=cast=(UInt32)
-OS_GetEventParameter__III_3II_3I_3S_5=cast=(UInt32 *)
-OS_GetEventParameter__III_3II_3I_3S_6=cast=(void *)
-
-OS_GetEventTime=
-OS_GetEventTime_0=cast=(EventRef)
-
-OS_GetFlavorData=
-OS_GetFlavorData_0=cast=(DragRef)
-OS_GetFlavorData_1=cast=(DragItemRef)
-OS_GetFlavorData_2=cast=(FlavorType)
-OS_GetFlavorData_3=cast=(void *)
-OS_GetFlavorData_4=cast=(Size *)
-OS_GetFlavorData_5=
-
-OS_GetFlavorDataSize=
-OS_GetFlavorDataSize_0=cast=(DragRef)
-OS_GetFlavorDataSize_1=cast=(DragItemRef)
-OS_GetFlavorDataSize_2=cast=(FlavorType)
-OS_GetFlavorDataSize_3=cast=(Size *)
-
-OS_GetFlavorType=
-OS_GetFlavorType_0=cast=(DragRef)
-OS_GetFlavorType_1=cast=(DragItemRef)
-OS_GetFlavorType_2=
-OS_GetFlavorType_3=cast=(FlavorType *)
-
-OS_GetFontInfo=
-OS_GetFontInfo_0=cast=(FontInfo *)
-
-OS_GetGDevice=
-
-OS_GetGWorld=
-OS_GetGWorld_0=cast=(CGrafPtr *)
-OS_GetGWorld_1=cast=(GDHandle *)
-
-OS_GetGlobalMouse=
-OS_GetGlobalMouse_0=cast=(Point *)
-
-OS_GetHandleSize=
-OS_GetHandleSize_0=cast=(Handle)
-
-OS_GetIconFamilyData=
-OS_GetIconFamilyData_0=cast=IconFamilyHandle
-OS_GetIconFamilyData_1=cast=OSType
-OS_GetIconFamilyData_2=cast=(Handle)
-
-OS_GetIconRef=
-OS_GetIconRef_0=cast=(SInt16)
-OS_GetIconRef_1=cast=(OSType)
-OS_GetIconRef_2=cast=(OSType)
-OS_GetIconRef_3=cast=(IconRef *)
-
-OS_GetIndMenuItemWithCommandID=
-OS_GetIndMenuItemWithCommandID_0=cast=(MenuRef)
-OS_GetIndMenuItemWithCommandID_1=cast=(MenuCommand)
-OS_GetIndMenuItemWithCommandID_2=cast=(UInt32)
-OS_GetIndMenuItemWithCommandID_3=cast=(MenuRef *)
-OS_GetIndMenuItemWithCommandID_4=cast=(MenuItemIndex *)
-
-OS_GetIndexedSubControl=
-OS_GetIndexedSubControl_0=cast=(ControlRef)
-OS_GetIndexedSubControl_1=cast=(UInt16)
-OS_GetIndexedSubControl_2=cast=(ControlRef *)
-
-OS_GetItemMark=
-OS_GetItemMark_0=cast=(MenuRef)
-OS_GetItemMark_1=
-OS_GetItemMark_2=
-
-OS_GetKeyboardFocus=
-OS_GetKeyboardFocus_0=cast=(WindowRef)
-OS_GetKeyboardFocus_1=cast=(ControlRef *)
-
-OS_GetLastUserEventTime=
-
-OS_GetMBarHeight=
-
-OS_GetMainDevice=
-
-OS_GetMainEventQueue=
-
-OS_GetMenuCommandMark=
-OS_GetMenuCommandMark_0=cast=(MenuRef)
-OS_GetMenuCommandMark_1=cast=(MenuCommand)
-OS_GetMenuCommandMark_2=cast=(UniChar *)
-
-OS_GetMenuEventTarget=
-OS_GetMenuEventTarget_0=cast=(MenuRef)
-
-OS_GetMenuFont=
-OS_GetMenuFont_0=cast=(MenuRef)
-OS_GetMenuFont_1=cast=(SInt16 *)
-OS_GetMenuFont_2=cast=(UInt16 *)
-
-OS_GetMenuHeight=
-OS_GetMenuHeight_0=cast=(MenuRef)
-
-OS_GetMenuID=
-OS_GetMenuID_0=cast=(MenuRef)
-
-OS_GetMenuItemCommandID=
-OS_GetMenuItemCommandID_0=cast=(MenuRef)
-OS_GetMenuItemCommandID_1=cast=(SInt16)
-OS_GetMenuItemCommandID_2=cast=(MenuCommand *)
-
-OS_GetMenuItemHierarchicalMenu=
-OS_GetMenuItemHierarchicalMenu_0=cast=(MenuRef)
-OS_GetMenuItemHierarchicalMenu_1=cast=(SInt16)
-OS_GetMenuItemHierarchicalMenu_2=cast=(MenuRef *)
-
-OS_GetMenuItemRefCon=
-OS_GetMenuItemRefCon_0=cast=(MenuRef)
-OS_GetMenuItemRefCon_1=cast=(SInt16)
-OS_GetMenuItemRefCon_2=cast=(UInt32 *)
-
-OS_GetMenuTrackingData=
-OS_GetMenuTrackingData_0=cast=(MenuRef)
-OS_GetMenuTrackingData_1=
-
-OS_GetMenuWidth=
-OS_GetMenuWidth_0=cast=(MenuRef)
-
-OS_GetMouse=
-OS_GetMouse_0=cast=(Point *)
-
-OS_GetNextDevice=
-OS_GetNextDevice_0=cast=(GDHandle)
-
-OS_GetPixBounds=
-OS_GetPixBounds_0=cast=(PixMapHandle)
-OS_GetPixBounds_1=cast=(Rect *)
-
-OS_GetPixDepth=
-OS_GetPixDepth_0=cast=(PixMapHandle)
-
-OS_GetPort=
-OS_GetPort_0=cast=(GrafPtr *)
-
-OS_GetPortBitMapForCopyBits=
-OS_GetPortBitMapForCopyBits_0=cast=(CGrafPtr)
-
-OS_GetPortBounds=
-OS_GetPortBounds_0=cast=(CGrafPtr)
-OS_GetPortBounds_1=cast=(Rect *)
-
-OS_GetPortClipRegion=
-OS_GetPortClipRegion_0=cast=(CGrafPtr)
-OS_GetPortClipRegion_1=cast=(RgnHandle)
-
-OS_GetPortVisibleRegion=
-OS_GetPortVisibleRegion_0=cast=(CGrafPtr)
-OS_GetPortVisibleRegion_1=cast=(RgnHandle)
-
-OS_GetPreviousWindow=
-OS_GetPreviousWindow_0=cast=(WindowRef)
-
-OS_GetPtrSize=
-OS_GetPtrSize_0=cast=(Ptr)
-
-OS_GetRegionBounds=
-OS_GetRegionBounds_0=cast=(RgnHandle)
-OS_GetRegionBounds_1=cast=(Rect *)
-
-OS_GetRootControl=
-OS_GetRootControl_0=cast=(WindowRef)
-OS_GetRootControl_1=cast=(ControlRef *)
-
-OS_GetScrapFlavorCount=
-OS_GetScrapFlavorCount_0=cast=(ScrapRef)
-OS_GetScrapFlavorCount_1=cast=(UInt32 *)
-
-OS_GetScrapFlavorData=
-OS_GetScrapFlavorData_0=cast=(ScrapRef)
-OS_GetScrapFlavorData_1=cast=(ScrapFlavorType)
-OS_GetScrapFlavorData_2=cast=(Size *)
-OS_GetScrapFlavorData_3=cast=(void *)
-
-OS_GetScrapFlavorInfoList=
-OS_GetScrapFlavorInfoList_0=cast=(ScrapRef)
-OS_GetScrapFlavorInfoList_1=cast=(UInt32 *)
-OS_GetScrapFlavorInfoList_2=cast=(ScrapFlavorInfo *)
-
-OS_GetScrapFlavorSize=
-OS_GetScrapFlavorSize_0=cast=(ScrapRef)
-OS_GetScrapFlavorSize_1=cast=(ScrapFlavorType)
-OS_GetScrapFlavorSize_2=cast=(Size *)
-
-OS_GetScriptManagerVariable=
-OS_GetScriptManagerVariable_0=
-
-OS_GetSuperControl=
-OS_GetSuperControl_0=cast=(ControlRef)
-OS_GetSuperControl_1=cast=(ControlRef *)
-
-OS_GetTabContentRect=
-OS_GetTabContentRect_0=cast=ControlRef
-OS_GetTabContentRect_1=
-
-OS_GetThemeBrushAsColor=
-OS_GetThemeBrushAsColor_0=
-OS_GetThemeBrushAsColor_1=
-OS_GetThemeBrushAsColor_2=
-OS_GetThemeBrushAsColor_3=
-
-OS_GetThemeButtonContentBounds=
-OS_GetThemeButtonContentBounds_0=
-OS_GetThemeButtonContentBounds_1=
-OS_GetThemeButtonContentBounds_2=
-OS_GetThemeButtonContentBounds_3=
-
-OS_GetThemeDrawingState=
-OS_GetThemeDrawingState_0=cast=(ThemeDrawingState *)
-
-OS_GetThemeFont=
-OS_GetThemeFont_0=cast=(ThemeFontID)
-OS_GetThemeFont_1=cast=(ScriptCode)
-OS_GetThemeFont_2=cast=(char *)
-OS_GetThemeFont_3=cast=(SInt16 *)
-OS_GetThemeFont_4=cast=(Style *)
-
-OS_GetThemeMenuItemExtra=
-OS_GetThemeMenuItemExtra_0=
-OS_GetThemeMenuItemExtra_1=
-OS_GetThemeMenuItemExtra_2=
-
-OS_GetThemeMetric=
-OS_GetThemeMetric_0=
-OS_GetThemeMetric_1=
-
-OS_GetThemeTextColor=
-OS_GetThemeTextColor_0=
-OS_GetThemeTextColor_1=
-OS_GetThemeTextColor_2=
-OS_GetThemeTextColor_3=
-
-OS_GetThemeTextDimensions=
-OS_GetThemeTextDimensions_0=cast=(CFStringRef)
-OS_GetThemeTextDimensions_1=cast=(ThemeFontID)
-OS_GetThemeTextDimensions_2=cast=(ThemeDrawState)
-OS_GetThemeTextDimensions_3=cast=(Boolean)
-OS_GetThemeTextDimensions_4=cast=(Point *)
-OS_GetThemeTextDimensions_5=cast=(SInt16 *)
-
-OS_GetUserFocusEventTarget=
-
-OS_GetUserFocusWindow=
-
-OS_GetWRefCon=
-OS_GetWRefCon_0=cast=(WindowRef)
-
-OS_GetWindowActivationScope=
-OS_GetWindowActivationScope_0=cast=(WindowRef)
-OS_GetWindowActivationScope_1=cast=(WindowActivationScope *)
-
-OS_GetWindowBounds=
-OS_GetWindowBounds_0=cast=(WindowRef)
-OS_GetWindowBounds_1=cast=(WindowRegionCode)
-OS_GetWindowBounds_2=cast=(Rect *)
-
-OS_GetWindowDefaultButton=
-OS_GetWindowDefaultButton_0=cast=(WindowRef)
-OS_GetWindowDefaultButton_1=cast=(ControlRef *)
-
-OS_GetWindowEventTarget=
-OS_GetWindowEventTarget_0=cast=(WindowRef)
-
-OS_GetWindowFromPort=
-OS_GetWindowFromPort_0=cast=(CGrafPtr)
-
-OS_GetWindowGroupOfClass=
-OS_GetWindowGroupOfClass_0=
-
-OS_GetWindowModality=
-OS_GetWindowModality_0=cast=(WindowRef)
-OS_GetWindowModality_1=cast=(WindowModality *)
-OS_GetWindowModality_2=cast=(WindowRef *)
-
-OS_GetWindowPort=
-OS_GetWindowPort_0=cast=(WindowRef)
-
-OS_GetWindowRegion=
-OS_GetWindowRegion_0=cast=(WindowRef)
-OS_GetWindowRegion_1=cast=(WindowRegionCode)
-OS_GetWindowRegion_2=cast=(RgnHandle)
-
-OS_GetWindowResizeLimits=
-OS_GetWindowResizeLimits_0=cast=WindowRef
-OS_GetWindowResizeLimits_1=cast=HISize *
-OS_GetWindowResizeLimits_2=cast=HISize *
-
-OS_GetWindowStructureWidths=
-OS_GetWindowStructureWidths_0=cast=(WindowRef)
-OS_GetWindowStructureWidths_1=cast=(Rect *)
-
-OS_HIComboBoxAppendTextItem=
-OS_HIComboBoxAppendTextItem_0=cast=(HIViewRef)
-OS_HIComboBoxAppendTextItem_1=cast=(CFStringRef)
-OS_HIComboBoxAppendTextItem_2=cast=(CFIndex *)
-
-OS_HIComboBoxCopyTextItemAtIndex=
-OS_HIComboBoxCopyTextItemAtIndex_0=cast=(HIViewRef)
-OS_HIComboBoxCopyTextItemAtIndex_1=cast=(CFIndex)
-OS_HIComboBoxCopyTextItemAtIndex_2=cast=(CFStringRef *)
-
-OS_HIComboBoxCreate=
-OS_HIComboBoxCreate_0=cast=(const HIRect *)
-OS_HIComboBoxCreate_1=cast=(CFStringRef)
-OS_HIComboBoxCreate_2=cast=(const ControlFontStyleRec *)
-OS_HIComboBoxCreate_3=cast=(CFArrayRef)
-OS_HIComboBoxCreate_4=cast=(OptionBits)
-OS_HIComboBoxCreate_5=cast=(HIViewRef *)
-
-OS_HIComboBoxGetItemCount=
-OS_HIComboBoxGetItemCount_0=cast=(HIViewRef)
-
-OS_HIComboBoxInsertTextItemAtIndex=
-OS_HIComboBoxInsertTextItemAtIndex_0=cast=(HIViewRef)
-OS_HIComboBoxInsertTextItemAtIndex_1=cast=(CFIndex)
-OS_HIComboBoxInsertTextItemAtIndex_2=cast=(CFStringRef)
-
-OS_HIComboBoxRemoveItemAtIndex=
-OS_HIComboBoxRemoveItemAtIndex_0=cast=(HIViewRef)
-OS_HIComboBoxRemoveItemAtIndex_1=cast=(CFIndex)
-
-OS_HIObjectCopyClassID=
-OS_HIObjectCopyClassID_0=cast=(HIObjectRef)
-
-OS_HIObjectCreate=
-OS_HIObjectCreate_0=cast=(CFStringRef)
-OS_HIObjectCreate_1=cast=(EventRef)
-OS_HIObjectCreate_2=cast=(HIObjectRef *)
-
-OS_HIObjectRegisterSubclass=
-OS_HIObjectRegisterSubclass_0=cast=(CFStringRef)
-OS_HIObjectRegisterSubclass_1=cast=(CFStringRef)
-OS_HIObjectRegisterSubclass_2=cast=(OptionBits)
-OS_HIObjectRegisterSubclass_3=cast=(EventHandlerUPP)
-OS_HIObjectRegisterSubclass_4=cast=(UInt32)
-OS_HIObjectRegisterSubclass_5=cast=(const EventTypeSpec *)
-OS_HIObjectRegisterSubclass_6=cast=(void *)
-OS_HIObjectRegisterSubclass_7=cast=(HIObjectClassRef *)
-
-OS_HIViewAddSubview=
-OS_HIViewAddSubview_0=cast=(HIViewRef)
-OS_HIViewAddSubview_1=cast=(HIViewRef)
-
-OS_HIViewClick=
-OS_HIViewClick_0=cast=(HIViewRef)
-OS_HIViewClick_1=cast=(EventRef)
-
-OS_HIViewConvertPoint=
-OS_HIViewConvertPoint_0=cast=(HIPoint *)
-OS_HIViewConvertPoint_1=cast=(HIViewRef)
-OS_HIViewConvertPoint_2=cast=(HIViewRef)
-
-OS_HIViewCreateOffscreenImage=
-OS_HIViewCreateOffscreenImage_0=cast=HIViewRef
-OS_HIViewCreateOffscreenImage_1=cast=OptionBits
-OS_HIViewCreateOffscreenImage_2=cast=(HIRect *)
-OS_HIViewCreateOffscreenImage_3=cast=CGImageRef *
-
-OS_HIViewFindByID=
-OS_HIViewFindByID_0=cast=(HIViewRef)
-OS_HIViewFindByID_1=cast=(HIViewID *),flags=struct
-OS_HIViewFindByID_2=cast=(HIViewRef *)
-
-OS_HIViewGetFirstSubview=
-OS_HIViewGetFirstSubview_0=cast=(HIViewRef)
-
-OS_HIViewGetFrame=
-OS_HIViewGetFrame_0=cast=(HIViewRef)
-OS_HIViewGetFrame_1=cast=(HIRect *)
-
-OS_HIViewGetLastSubview=
-OS_HIViewGetLastSubview_0=cast=(HIViewRef)
-
-OS_HIViewGetNextView=
-OS_HIViewGetNextView_0=cast=(HIViewRef)
-
-OS_HIViewGetRoot=
-OS_HIViewGetRoot_0=cast=(WindowRef)
-
-OS_HIViewGetSizeConstraints=
-OS_HIViewGetSizeConstraints_0=cast=(HIViewRef)
-OS_HIViewGetSizeConstraints_1=cast=(HISize *)
-OS_HIViewGetSizeConstraints_2=cast=(HISize *)
-
-OS_HIViewGetSubviewHit=
-OS_HIViewGetSubviewHit_0=cast=(HIViewRef)
-OS_HIViewGetSubviewHit_1=cast=(CGPoint *)
-OS_HIViewGetSubviewHit_2=cast=(Boolean)
-OS_HIViewGetSubviewHit_3=cast=(HIViewRef *)
-
-OS_HIViewGetViewForMouseEvent=
-OS_HIViewGetViewForMouseEvent_0=cast=(HIViewRef)
-OS_HIViewGetViewForMouseEvent_1=cast=(EventRef)
-OS_HIViewGetViewForMouseEvent_2=cast=(HIViewRef *)
-
-OS_HIViewIsVisible=
-OS_HIViewIsVisible_0=cast=(HIViewRef)
-
-OS_HIViewRemoveFromSuperview=
-OS_HIViewRemoveFromSuperview_0=cast=(HIViewRef)
-
-OS_HIViewSetBoundsOrigin=
-OS_HIViewSetBoundsOrigin_0=cast=(HIViewRef)
-OS_HIViewSetBoundsOrigin_1=
-OS_HIViewSetBoundsOrigin_2=
-
-OS_HIViewSetDrawingEnabled=
-OS_HIViewSetDrawingEnabled_0=cast=(HIViewRef)
-OS_HIViewSetDrawingEnabled_1=cast=(Boolean)
-
-OS_HIViewSetFrame=
-OS_HIViewSetFrame_0=cast=(HIViewRef)
-OS_HIViewSetFrame_1=cast=(const HIRect *)
-
-OS_HIViewSetNeedsDisplay=
-OS_HIViewSetNeedsDisplay_0=cast=(HIViewRef)
-OS_HIViewSetNeedsDisplay_1=cast=(Boolean)
-
-OS_HIViewSetNeedsDisplayInRegion=
-OS_HIViewSetNeedsDisplayInRegion_0=cast=(HIViewRef)
-OS_HIViewSetNeedsDisplayInRegion_1=cast=(RgnHandle)
-OS_HIViewSetNeedsDisplayInRegion_2=cast=(Boolean)
-
-OS_HIViewSetVisible=
-OS_HIViewSetVisible_0=cast=(HIViewRef)
-OS_HIViewSetVisible_1=cast=(Boolean)
-
-OS_HIViewSetZOrder=
-OS_HIViewSetZOrder_0=cast=(HIViewRef)
-OS_HIViewSetZOrder_1=cast=(HIViewZOrderOp)
-OS_HIViewSetZOrder_2=cast=(HIViewRef)
-
-OS_HIViewSimulateClick=
-OS_HIViewSimulateClick_0=cast=(HIViewRef)
-OS_HIViewSimulateClick_1=cast=(HIViewPartCode)
-OS_HIViewSimulateClick_2=cast=(UInt32)
-OS_HIViewSimulateClick_3=cast=(ControlPartCode *)
-
-OS_HLock=
-OS_HLock_0=cast=(Handle)
-
-OS_HMGetTagDelay=
-OS_HMGetTagDelay_0=
-
-OS_HMHideTag=
-
-OS_HMInstallControlContentCallback=
-OS_HMInstallControlContentCallback_0=cast=(ControlRef)
-OS_HMInstallControlContentCallback_1=cast=(HMControlContentUPP)
-
-OS_HMSetTagDelay=
-OS_HMSetTagDelay_0=
-
-OS_HUnlock=
-OS_HUnlock_0=cast=(Handle)
-
-OS_HandleControlClick=
-OS_HandleControlClick_0=cast=(ControlRef)
-OS_HandleControlClick_1=flags=struct
-OS_HandleControlClick_2=cast=(EventModifiers)
-OS_HandleControlClick_3=cast=(ControlActionUPP)
-
-OS_HandleControlSetCursor=
-OS_HandleControlSetCursor_0=cast=(ControlRef)
-OS_HandleControlSetCursor_1=flags=struct
-OS_HandleControlSetCursor_2=cast=(EventModifiers)
-OS_HandleControlSetCursor_3=cast=(Boolean *)
-
-OS_HiWord=
-OS_HiWord_0=
-
-OS_HideWindow=
-OS_HideWindow_0=cast=(WindowRef)
-
-OS_HiliteMenu=
-OS_HiliteMenu_0=cast=(MenuID)
-
-OS_IconRefToIconFamily=
-OS_IconRefToIconFamily_0=cast=IconRef
-OS_IconRefToIconFamily_1=cast=IconSelectorValue
-OS_IconRefToIconFamily_2=cast=IconFamilyHandle *
-
-OS_InitContextualMenus=
-
-OS_InitCursor=
-
-OS_InitDataBrowserCallbacks=
-OS_InitDataBrowserCallbacks_0=cast=(DataBrowserCallbacks *),flags=init
-
-OS_InitDataBrowserCustomCallbacks=
-OS_InitDataBrowserCustomCallbacks_0=
-
-OS_InsertMenu=
-OS_InsertMenu_0=cast=(MenuRef)
-OS_InsertMenu_1=cast=(MenuID)
-
-OS_InsertMenuItemTextWithCFString=
-OS_InsertMenuItemTextWithCFString_0=cast=(MenuRef)
-OS_InsertMenuItemTextWithCFString_1=cast=(CFStringRef)
-OS_InsertMenuItemTextWithCFString_2=cast=(MenuItemIndex)
-OS_InsertMenuItemTextWithCFString_3=cast=(MenuItemAttributes)
-OS_InsertMenuItemTextWithCFString_4=cast=(MenuCommand)
-
-OS_InstallEventHandler=
-OS_InstallEventHandler_0=cast=(EventTargetRef)
-OS_InstallEventHandler_1=cast=(EventHandlerUPP)
-OS_InstallEventHandler_2=cast=(UInt32)
-OS_InstallEventHandler_3=cast=(const EventTypeSpec *)
-OS_InstallEventHandler_4=cast=(void *)
-OS_InstallEventHandler_5=cast=(EventHandlerRef *)
-
-OS_InstallEventLoopTimer=
-OS_InstallEventLoopTimer_0=cast=(EventLoopRef)
-OS_InstallEventLoopTimer_1=cast=(EventTimerInterval)
-OS_InstallEventLoopTimer_2=cast=(EventTimerInterval)
-OS_InstallEventLoopTimer_3=cast=(EventLoopTimerUPP)
-OS_InstallEventLoopTimer_4=cast=(void *)
-OS_InstallEventLoopTimer_5=cast=(EventLoopTimerRef *)
-
-OS_InstallReceiveHandler=
-OS_InstallReceiveHandler_0=cast=(DragReceiveHandlerUPP)
-OS_InstallReceiveHandler_1=cast=(WindowRef)
-OS_InstallReceiveHandler_2=cast=(void *)
-
-OS_InstallTrackingHandler=
-OS_InstallTrackingHandler_0=cast=(DragTrackingHandlerUPP)
-OS_InstallTrackingHandler_1=cast=(WindowRef)
-OS_InstallTrackingHandler_2=cast=(void *)
-
-OS_InvalWindowRect=
-OS_InvalWindowRect_0=cast=(WindowRef)
-OS_InvalWindowRect_1=cast=(const Rect *)
-
-OS_InvalWindowRgn=
-OS_InvalWindowRgn_0=cast=(WindowRef)
-OS_InvalWindowRgn_1=cast=(RgnHandle)
-
-OS_InvertRect=
-OS_InvertRect_0=cast=(const Rect *)
-
-OS_InvertRgn=
-OS_InvertRgn_0=cast=(RgnHandle)
-
-OS_IsControlActive=
-OS_IsControlActive_0=cast=(ControlRef)
-
-OS_IsControlEnabled=
-OS_IsControlEnabled_0=cast=(ControlRef)
-
-OS_IsControlVisible=
-OS_IsControlVisible_0=cast=(ControlRef)
-
-OS_IsDataBrowserItemSelected=
-OS_IsDataBrowserItemSelected_0=cast=(ControlRef)
-OS_IsDataBrowserItemSelected_1=cast=(DataBrowserItemID)
-
-OS_IsMenuCommandEnabled=
-OS_IsMenuCommandEnabled_0=cast=(MenuRef)
-OS_IsMenuCommandEnabled_1=cast=(MenuCommand)
-
-OS_IsMenuItemEnabled=
-OS_IsMenuItemEnabled_0=cast=(MenuRef)
-OS_IsMenuItemEnabled_1=cast=(MenuItemIndex)
-
-OS_IsValidControlHandle=
-OS_IsValidControlHandle_0=cast=(ControlRef)
-
-OS_IsValidMenu=
-OS_IsValidMenu_0=cast=(MenuRef)
-
-OS_IsValidWindowPtr=
-OS_IsValidWindowPtr_0=cast=(WindowRef)
-
-OS_IsWindowActive=
-OS_IsWindowActive_0=cast=(WindowRef)
-
-OS_IsWindowCollapsed=
-OS_IsWindowCollapsed_0=cast=(WindowRef)
-
-OS_IsWindowVisible=
-OS_IsWindowVisible_0=cast=(WindowRef)
-
-OS_KeyTranslate=
-OS_KeyTranslate_0=cast=const void *
-OS_KeyTranslate_1=
-OS_KeyTranslate_2=cast=UInt32 *
-
-OS_KillPoly=
-OS_KillPoly_0=cast=(PolyHandle)
-
-OS_LineTo=
-OS_LineTo_0=cast=(short)
-OS_LineTo_1=cast=(short)
-
-OS_LoWord=
-OS_LoWord_0=
-
-OS_LockPortBits=
-OS_LockPortBits_0=cast=(GrafPtr)
-
-OS_Long2Fix=
-OS_Long2Fix_0=
-
-OS_MenuSelect=
-OS_MenuSelect_0=cast=(Point *),flags=struct
-
-OS_MoveControl=
-OS_MoveControl_0=cast=(ControlRef)
-OS_MoveControl_1=cast=(SInt16)
-OS_MoveControl_2=cast=(SInt16)
-
-OS_MoveTo=
-OS_MoveTo_0=cast=(short)
-OS_MoveTo_1=cast=(short)
-
-OS_MoveWindow=
-OS_MoveWindow_0=cast=(WindowRef)
-OS_MoveWindow_1=cast=(short)
-OS_MoveWindow_2=cast=(short)
-OS_MoveWindow_3=cast=(Boolean)
-
-OS_NavCreateChooseFolderDialog=
-OS_NavCreateChooseFolderDialog_0=cast=(const NavDialogCreationOptions *)
-OS_NavCreateChooseFolderDialog_1=cast=(NavEventUPP)
-OS_NavCreateChooseFolderDialog_2=cast=(NavObjectFilterUPP)
-OS_NavCreateChooseFolderDialog_3=cast=(void *)
-OS_NavCreateChooseFolderDialog_4=cast=(NavDialogRef *)
-
-OS_NavCreateGetFileDialog=
-OS_NavCreateGetFileDialog_0=cast=(const NavDialogCreationOptions *)
-OS_NavCreateGetFileDialog_1=cast=(NavTypeListHandle)
-OS_NavCreateGetFileDialog_2=cast=(NavEventUPP)
-OS_NavCreateGetFileDialog_3=cast=(NavPreviewUPP)
-OS_NavCreateGetFileDialog_4=cast=(NavObjectFilterUPP)
-OS_NavCreateGetFileDialog_5=cast=(void *)
-OS_NavCreateGetFileDialog_6=cast=(NavDialogRef *)
-
-OS_NavCreatePutFileDialog=
-OS_NavCreatePutFileDialog_0=cast=(const NavDialogCreationOptions *)
-OS_NavCreatePutFileDialog_1=cast=(OSType)
-OS_NavCreatePutFileDialog_2=cast=(OSType)
-OS_NavCreatePutFileDialog_3=cast=(NavEventUPP)
-OS_NavCreatePutFileDialog_4=cast=(void *)
-OS_NavCreatePutFileDialog_5=cast=(NavDialogRef *)
-
-OS_NavDialogDispose=
-OS_NavDialogDispose_0=cast=(NavDialogRef)
-
-OS_NavDialogGetReply=
-OS_NavDialogGetReply_0=cast=(NavDialogRef)
-OS_NavDialogGetReply_1=cast=(NavReplyRecord *)
-
-OS_NavDialogGetSaveFileName=
-OS_NavDialogGetSaveFileName_0=cast=(NavDialogRef)
-
-OS_NavDialogGetUserAction=
-OS_NavDialogGetUserAction_0=cast=(NavDialogRef)
-
-OS_NavDialogRun=
-OS_NavDialogRun_0=cast=(NavDialogRef)
-
-OS_NavDialogSetSaveFileName=
-OS_NavDialogSetSaveFileName_0=cast=(NavDialogRef)
-OS_NavDialogSetSaveFileName_1=cast=(CFStringRef)
-
-OS_NavGetDefaultDialogCreationOptions=
-OS_NavGetDefaultDialogCreationOptions_0=cast=(NavDialogCreationOptions *)
-
-OS_NewControl=
-OS_NewControl_0=cast=(WindowRef)
-OS_NewControl_1=cast=(const Rect *)
-OS_NewControl_2=cast=(ConstStr255Param)
-OS_NewControl_3=cast=(Boolean)
-OS_NewControl_4=cast=(SInt16)
-OS_NewControl_5=cast=(SInt16)
-OS_NewControl_6=cast=(SInt16)
-OS_NewControl_7=cast=(SInt16)
-OS_NewControl_8=cast=(SInt32)
-
-OS_NewDrag=
-OS_NewDrag_0=cast=(DragRef *)
-
-OS_NewGWorldFromPtr=
-OS_NewGWorldFromPtr_0=cast=(GWorldPtr *)
-OS_NewGWorldFromPtr_1=cast=(unsigned long)
-OS_NewGWorldFromPtr_2=cast=(const Rect *)
-OS_NewGWorldFromPtr_3=cast=(CTabHandle)
-OS_NewGWorldFromPtr_4=cast=(GDHandle)
-OS_NewGWorldFromPtr_5=cast=(GWorldFlags)
-OS_NewGWorldFromPtr_6=cast=(Ptr)
-OS_NewGWorldFromPtr_7=cast=(long)
-
-OS_NewHandle=
-OS_NewHandle_0=cast=(Size)
-
-OS_NewHandleClear=
-OS_NewHandleClear_0=cast=(Size)
-
-OS_NewPtr=
-OS_NewPtr_0=cast=(Size)
-
-OS_NewPtrClear=
-OS_NewPtrClear_0=cast=(Size)
-
-OS_NewRgn=
-
-OS_OffsetRect=
-OS_OffsetRect_0=
-OS_OffsetRect_1=
-OS_OffsetRect_2=
-
-OS_OffsetRgn=
-OS_OffsetRgn_0=cast=(RgnHandle)
-OS_OffsetRgn_1=cast=(short)
-OS_OffsetRgn_2=cast=(short)
-
-OS_OpenDataBrowserContainer=
-OS_OpenDataBrowserContainer_0=cast=(ControlRef)
-OS_OpenDataBrowserContainer_1=cast=(DataBrowserItemID)
-
-OS_OpenPoly=
-
-OS_OpenRgn=
-
-OS_PMCreatePageFormat=
-OS_PMCreatePageFormat_0=cast=(PMPageFormat *)
-
-OS_PMCreatePrintSettings=
-OS_PMCreatePrintSettings_0=cast=(PMPrintSettings *)
-
-OS_PMCreateSession=
-OS_PMCreateSession_0=cast=(PMPrintSession *)
-
-OS_PMFlattenPageFormat=
-OS_PMFlattenPageFormat_0=cast=PMPageFormat
-OS_PMFlattenPageFormat_1=cast=Handle *
-
-OS_PMFlattenPrintSettings=
-OS_PMFlattenPrintSettings_0=cast=PMPrintSettings
-OS_PMFlattenPrintSettings_1=cast=Handle *
-
-OS_PMGetAdjustedPageRect=
-OS_PMGetAdjustedPageRect_0=cast=(PMPageFormat)
-OS_PMGetAdjustedPageRect_1=cast=(PMRect *)
-
-OS_PMGetAdjustedPaperRect=
-OS_PMGetAdjustedPaperRect_0=cast=(PMPageFormat)
-OS_PMGetAdjustedPaperRect_1=cast=(PMRect *)
-
-OS_PMGetCollate=
-OS_PMGetCollate_0=cast=PMPrintSettings
-OS_PMGetCollate_1=
-
-OS_PMGetCopies=
-OS_PMGetCopies_0=cast=(PMPrintSettings)
-OS_PMGetCopies_1=cast=(UInt32 *)
-
-OS_PMGetFirstPage=
-OS_PMGetFirstPage_0=cast=(PMPrintSettings)
-OS_PMGetFirstPage_1=cast=(UInt32 *)
-
-OS_PMGetJobNameCFString=
-OS_PMGetJobNameCFString_0=cast=(PMPrintSettings)
-OS_PMGetJobNameCFString_1=cast=(CFStringRef *)
-
-OS_PMGetLastPage=
-OS_PMGetLastPage_0=cast=(PMPrintSettings)
-OS_PMGetLastPage_1=cast=(UInt32 *)
-
-OS_PMGetPageRange=
-OS_PMGetPageRange_0=cast=(PMPrintSettings)
-OS_PMGetPageRange_1=cast=(UInt32 *)
-OS_PMGetPageRange_2=cast=(UInt32 *)
-
-OS_PMGetResolution=
-OS_PMGetResolution_0=cast=(PMPageFormat)
-OS_PMGetResolution_1=cast=(PMResolution *)
-
-OS_PMRelease=
-OS_PMRelease_0=cast=(PMObject)
-
-OS_PMSessionBeginDocumentNoDialog=
-OS_PMSessionBeginDocumentNoDialog_0=cast=(PMPrintSession)
-OS_PMSessionBeginDocumentNoDialog_1=cast=(PMPrintSettings)
-OS_PMSessionBeginDocumentNoDialog_2=cast=(PMPageFormat)
-
-OS_PMSessionBeginPageNoDialog=
-OS_PMSessionBeginPageNoDialog_0=cast=(PMPrintSession)
-OS_PMSessionBeginPageNoDialog_1=cast=(PMPageFormat)
-OS_PMSessionBeginPageNoDialog_2=cast=(const PMRect *)
-
-OS_PMSessionCopyDestinationLocation=
-OS_PMSessionCopyDestinationLocation_0=cast=PMPrintSession
-OS_PMSessionCopyDestinationLocation_1=cast=PMPrintSettings
-OS_PMSessionCopyDestinationLocation_2=cast=(CFURLRef *)
-
-OS_PMSessionCreatePrinterList=
-OS_PMSessionCreatePrinterList_0=cast=PMPrintSession
-OS_PMSessionCreatePrinterList_1=cast=CFArrayRef *
-OS_PMSessionCreatePrinterList_2=cast=CFIndex *
-OS_PMSessionCreatePrinterList_3=cast=PMPrinter *
-
-OS_PMSessionDefaultPageFormat=
-OS_PMSessionDefaultPageFormat_0=cast=(PMPrintSession)
-OS_PMSessionDefaultPageFormat_1=cast=(PMPageFormat)
-
-OS_PMSessionDefaultPrintSettings=
-OS_PMSessionDefaultPrintSettings_0=cast=(PMPrintSession)
-OS_PMSessionDefaultPrintSettings_1=cast=(PMPrintSettings)
-
-OS_PMSessionEndDocumentNoDialog=
-OS_PMSessionEndDocumentNoDialog_0=cast=(PMPrintSession)
-
-OS_PMSessionEndPageNoDialog=
-OS_PMSessionEndPageNoDialog_0=cast=(PMPrintSession)
-
-OS_PMSessionError=
-OS_PMSessionError_0=cast=(PMPrintSession)
-
-OS_PMSessionGetDestinationType=
-OS_PMSessionGetDestinationType_0=cast=PMPrintSession
-OS_PMSessionGetDestinationType_1=cast=PMPrintSettings
-OS_PMSessionGetDestinationType_2=cast=(PMDestinationType *)
-
-OS_PMSessionGetGraphicsContext=
-OS_PMSessionGetGraphicsContext_0=cast=(PMPrintSession)
-OS_PMSessionGetGraphicsContext_1=cast=(CFStringRef)
-OS_PMSessionGetGraphicsContext_2=cast=(void **)
-
-OS_PMSessionPageSetupDialog=
-OS_PMSessionPageSetupDialog_0=cast=(PMPrintSession)
-OS_PMSessionPageSetupDialog_1=cast=(PMPageFormat)
-OS_PMSessionPageSetupDialog_2=cast=(Boolean *)
-
-OS_PMSessionPrintDialog=
-OS_PMSessionPrintDialog_0=cast=(PMPrintSession)
-OS_PMSessionPrintDialog_1=cast=(PMPrintSettings)
-OS_PMSessionPrintDialog_2=cast=(PMPageFormat)
-OS_PMSessionPrintDialog_3=cast=(Boolean *)
-
-OS_PMSessionSetCurrentPrinter=
-OS_PMSessionSetCurrentPrinter_0=cast=PMPrintSession
-OS_PMSessionSetCurrentPrinter_1=cast=CFStringRef
-
-OS_PMSessionSetDestination=
-OS_PMSessionSetDestination_0=cast=PMPrintSession
-OS_PMSessionSetDestination_1=cast=PMPrintSettings
-OS_PMSessionSetDestination_2=cast=PMDestinationType
-OS_PMSessionSetDestination_3=cast=CFStringRef
-OS_PMSessionSetDestination_4=cast=CFURLRef
-
-OS_PMSessionSetDocumentFormatGeneration=
-OS_PMSessionSetDocumentFormatGeneration_0=cast=(PMPrintSession)
-OS_PMSessionSetDocumentFormatGeneration_1=cast=(CFStringRef)
-OS_PMSessionSetDocumentFormatGeneration_2=cast=(CFArrayRef)
-OS_PMSessionSetDocumentFormatGeneration_3=cast=(CFTypeRef)
-
-OS_PMSessionSetError=
-OS_PMSessionSetError_0=cast=(PMPrintSession)
-OS_PMSessionSetError_1=
-
-OS_PMSessionUseSheets=
-OS_PMSessionUseSheets_0=cast=(PMPrintSession)
-OS_PMSessionUseSheets_1=cast=(WindowRef)
-OS_PMSessionUseSheets_2=cast=(PMSheetDoneUPP)
-
-OS_PMSessionValidatePageFormat=
-OS_PMSessionValidatePageFormat_0=cast=(PMPrintSession)
-OS_PMSessionValidatePageFormat_1=cast=(PMPageFormat)
-OS_PMSessionValidatePageFormat_2=cast=(Boolean *)
-
-OS_PMSessionValidatePrintSettings=
-OS_PMSessionValidatePrintSettings_0=cast=(PMPrintSession)
-OS_PMSessionValidatePrintSettings_1=cast=(PMPrintSettings)
-OS_PMSessionValidatePrintSettings_2=cast=(Boolean *)
-
-OS_PMSetCollate=
-OS_PMSetCollate_0=cast=PMPrintSettings
-OS_PMSetCollate_1=
-
-OS_PMSetFirstPage=
-OS_PMSetFirstPage_0=cast=(PMPrintSettings)
-OS_PMSetFirstPage_1=cast=(UInt32)
-OS_PMSetFirstPage_2=cast=(Boolean)
-
-OS_PMSetJobNameCFString=
-OS_PMSetJobNameCFString_0=cast=(PMPrintSettings)
-OS_PMSetJobNameCFString_1=cast=CFStringRef
-
-OS_PMSetLastPage=
-OS_PMSetLastPage_0=cast=(PMPrintSettings)
-OS_PMSetLastPage_1=cast=(UInt32)
-OS_PMSetLastPage_2=cast=(Boolean)
-
-OS_PMSetPageRange=
-OS_PMSetPageRange_0=cast=(PMPrintSettings)
-OS_PMSetPageRange_1=cast=(UInt32)
-OS_PMSetPageRange_2=cast=(UInt32)
-
-OS_PMUnflattenPageFormat=
-OS_PMUnflattenPageFormat_0=cast=Handle
-OS_PMUnflattenPageFormat_1=cast=PMPageFormat *
-
-OS_PMUnflattenPrintSettings=
-OS_PMUnflattenPrintSettings_0=cast=Handle
-OS_PMUnflattenPrintSettings_1=cast=(PMPrintSettings *)
-
-OS_PaintOval=
-OS_PaintOval_0=cast=(const Rect *)
-
-OS_PaintPoly=
-OS_PaintPoly_0=cast=(PolyHandle)
-
-OS_PaintRect=
-OS_PaintRect_0=cast=(const Rect *)
-
-OS_PaintRoundRect=
-OS_PaintRoundRect_0=cast=(const Rect *)
-OS_PaintRoundRect_1=cast=(short)
-OS_PaintRoundRect_2=cast=(short)
-
-OS_PenSize=
-OS_PenSize_0=cast=(short)
-OS_PenSize_1=cast=(short)
-
-OS_PickColor=
-OS_PickColor_0=cast=(ColorPickerInfo *)
-
-OS_PopUpMenuSelect=
-OS_PopUpMenuSelect_0=cast=(MenuRef)
-OS_PopUpMenuSelect_1=cast=(short)
-OS_PopUpMenuSelect_2=cast=(short)
-OS_PopUpMenuSelect_3=cast=(short)
-
-OS_PostEvent=
-OS_PostEvent_0=cast=(EventKind)
-OS_PostEvent_1=cast=(UInt32)
-
-OS_PostEventToQueue=
-OS_PostEventToQueue_0=cast=(EventQueueRef)
-OS_PostEventToQueue_1=cast=(EventRef)
-OS_PostEventToQueue_2=cast=(EventPriority)
-
-OS_PtInRect=
-OS_PtInRect_0=cast=(Point *),flags=struct
-OS_PtInRect_1=cast=(const Rect *)
-
-OS_PtInRgn=
-OS_PtInRgn_0=cast=(Point *),flags=struct
-OS_PtInRgn_1=cast=(RgnHandle)
-
-OS_PutScrapFlavor=
-OS_PutScrapFlavor_0=cast=(ScrapRef)
-OS_PutScrapFlavor_1=cast=(ScrapFlavorType)
-OS_PutScrapFlavor_2=cast=(ScrapFlavorFlags)
-OS_PutScrapFlavor_3=cast=(Size)
-OS_PutScrapFlavor_4=cast=(const void *)
-
-OS_QDBeginCGContext=
-OS_QDBeginCGContext_0=cast=(CGrafPtr)
-OS_QDBeginCGContext_1=cast=(CGContextRef *)
-
-OS_QDEndCGContext=
-OS_QDEndCGContext_0=cast=(CGrafPtr)
-OS_QDEndCGContext_1=cast=(CGContextRef *)
-
-OS_QDFlushPortBuffer=
-OS_QDFlushPortBuffer_0=cast=(CGrafPtr)
-OS_QDFlushPortBuffer_1=cast=(RgnHandle)
-
-OS_QDGlobalToLocalPoint=
-OS_QDGlobalToLocalPoint_0=cast=(CGrafPtr)
-OS_QDGlobalToLocalPoint_1=cast=(Point *)
-
-OS_QDLocalToGlobalPoint=
-OS_QDLocalToGlobalPoint_0=cast=(CGrafPtr)
-OS_QDLocalToGlobalPoint_1=cast=(Point *)
-
-OS_QDSetDirtyRegion=
-OS_QDSetDirtyRegion_0=cast=(CGrafPtr)
-OS_QDSetDirtyRegion_1=cast=(RgnHandle)
-
-OS_QDSetPatternOrigin=
-OS_QDSetPatternOrigin_0=cast=(Point *),flags=struct
-
-OS_QDSwapTextFlags=
-OS_QDSwapTextFlags_0=cast=(UInt32)
-
-OS_RGBBackColor=
-OS_RGBBackColor_0=cast=(const RGBColor *)
-
-OS_RGBForeColor=
-OS_RGBForeColor_0=cast=(const RGBColor *)
-
-OS_ReceiveNextEvent=
-OS_ReceiveNextEvent_0=cast=(UInt32)
-OS_ReceiveNextEvent_1=cast=(const EventTypeSpec *)
-OS_ReceiveNextEvent_2=cast=(EventTimeout)
-OS_ReceiveNextEvent_3=cast=(Boolean)
-OS_ReceiveNextEvent_4=cast=(EventRef *)
-
-OS_RectInRgn=
-OS_RectInRgn_0=cast=(const Rect *)
-OS_RectInRgn_1=cast=(RgnHandle)
-
-OS_RectRgn=
-OS_RectRgn_0=cast=(RgnHandle)
-OS_RectRgn_1=cast=(const Rect *)
-
-OS_RegisterAppearanceClient=
-
-OS_ReleaseEvent=
-OS_ReleaseEvent_0=cast=(EventRef)
-
-OS_ReleaseIconRef=
-OS_ReleaseIconRef_0=cast=IconRef
-
-OS_ReleaseMenu=
-OS_ReleaseMenu_0=cast=(MenuRef)
-
-OS_ReleaseWindow=
-OS_ReleaseWindow_0=cast=WindowRef
-
-OS_ReleaseWindowGroup=
-OS_ReleaseWindowGroup_0=cast=(WindowGroupRef)
-
-OS_RemoveControlProperty=
-OS_RemoveControlProperty_0=cast=(ControlRef)
-OS_RemoveControlProperty_1=
-OS_RemoveControlProperty_2=
-
-OS_RemoveDataBrowserItems=
-OS_RemoveDataBrowserItems_0=cast=(ControlRef)
-OS_RemoveDataBrowserItems_1=cast=(DataBrowserItemID)
-OS_RemoveDataBrowserItems_2=cast=(UInt32)
-OS_RemoveDataBrowserItems_3=cast=(const DataBrowserItemID *)
-OS_RemoveDataBrowserItems_4=cast=(DataBrowserPropertyID)
-
-OS_RemoveDataBrowserTableViewColumn=
-OS_RemoveDataBrowserTableViewColumn_0=cast=(ControlRef)
-OS_RemoveDataBrowserTableViewColumn_1=cast=(DataBrowserTableViewColumnID)
-
-OS_RemoveEventHandler=
-OS_RemoveEventHandler_0=cast=(EventHandlerRef)
-
-OS_RemoveEventLoopTimer=
-OS_RemoveEventLoopTimer_0=cast=(EventLoopTimerRef)
-
-OS_RemoveReceiveHandler=
-OS_RemoveReceiveHandler_0=cast=(DragReceiveHandlerUPP)
-OS_RemoveReceiveHandler_1=cast=(WindowRef)
-
-OS_RemoveTrackingHandler=
-OS_RemoveTrackingHandler_0=cast=(DragTrackingHandlerUPP)
-OS_RemoveTrackingHandler_1=cast=(WindowRef)
-
-OS_RepositionWindow=
-OS_RepositionWindow_0=cast=(WindowRef)
-OS_RepositionWindow_1=cast=(WindowRef)
-OS_RepositionWindow_2=
-
-OS_ReshapeCustomWindow=
-OS_ReshapeCustomWindow_0=cast=WindowRef
-
-OS_RestoreApplicationDockTileImage=
-
-OS_RetainEvent=
-OS_RetainEvent_0=cast=(EventRef)
-
-OS_RetainMenu=
-OS_RetainMenu_0=cast=(MenuRef)
-
-OS_RetainWindow=
-OS_RetainWindow_0=cast=(WindowRef)
-
-OS_RevealDataBrowserItem=
-OS_RevealDataBrowserItem_0=cast=(ControlRef)
-OS_RevealDataBrowserItem_1=cast=(DataBrowserItemID)
-OS_RevealDataBrowserItem_2=cast=(DataBrowserPropertyID)
-OS_RevealDataBrowserItem_3=cast=(DataBrowserRevealOptions)
-
-OS_RunStandardAlert=
-OS_RunStandardAlert_0=cast=(DialogRef)
-OS_RunStandardAlert_1=cast=(ModalFilterUPP)
-OS_RunStandardAlert_2=cast=(DialogItemIndex *)
-
-OS_ScrollRect=
-OS_ScrollRect_0=cast=(const Rect *)
-OS_ScrollRect_1=cast=(short)
-OS_ScrollRect_2=cast=(short)
-OS_ScrollRect_3=cast=(RgnHandle)
-
-OS_SectRect=
-OS_SectRect_0=flags=no_out
-OS_SectRect_1=flags=no_out
-OS_SectRect_2=flags=no_in
-
-OS_SectRgn=
-OS_SectRgn_0=cast=(RgnHandle)
-OS_SectRgn_1=cast=(RgnHandle)
-OS_SectRgn_2=cast=(RgnHandle)
-
-OS_SelectWindow=
-OS_SelectWindow_0=cast=(WindowRef)
-
-OS_SendBehind=
-OS_SendBehind_0=cast=(WindowRef)
-OS_SendBehind_1=cast=(WindowRef)
-
-OS_SendEventToEventTarget=
-OS_SendEventToEventTarget_0=cast=(EventRef)
-OS_SendEventToEventTarget_1=cast=(EventTargetRef)
-
-OS_SetApplicationDockTileImage=
-OS_SetApplicationDockTileImage_0=cast=(CGImageRef)
-
-OS_SetBevelButtonContentInfo=
-OS_SetBevelButtonContentInfo_0=cast=(ControlRef)
-OS_SetBevelButtonContentInfo_1=cast=(ControlButtonContentInfoPtr)
-
-OS_SetClip=
-OS_SetClip_0=cast=(RgnHandle)
-
-OS_SetControl32BitMaximum=
-OS_SetControl32BitMaximum_0=cast=(ControlRef)
-OS_SetControl32BitMaximum_1=cast=(SInt32)
-
-OS_SetControl32BitMinimum=
-OS_SetControl32BitMinimum_0=cast=(ControlRef)
-OS_SetControl32BitMinimum_1=cast=(SInt32)
-
-OS_SetControl32BitValue=
-OS_SetControl32BitValue_0=cast=(ControlRef)
-OS_SetControl32BitValue_1=cast=(SInt32)
-
-OS_SetControlAction=
-OS_SetControlAction_0=cast=(ControlRef)
-OS_SetControlAction_1=cast=(ControlActionUPP)
-
-OS_SetControlBounds=
-OS_SetControlBounds_0=cast=(ControlRef)
-OS_SetControlBounds_1=cast=(const Rect *)
-
-OS_SetControlColorProc=
-OS_SetControlColorProc_0=cast=(ControlRef)
-OS_SetControlColorProc_1=cast=(ControlColorUPP)
-
-OS_SetControlData__IIIII=
-OS_SetControlData__IIIII_0=cast=(ControlRef)
-OS_SetControlData__IIIII_1=cast=(ControlPartCode)
-OS_SetControlData__IIIII_2=cast=(ResType)
-OS_SetControlData__IIIII_3=cast=(Size)
-OS_SetControlData__IIIII_4=cast=(const void *)
-
-OS_SetControlData__IIIILorg_eclipse_swt_internal_carbon_ControlButtonContentInfo_2=
-OS_SetControlData__IIIILorg_eclipse_swt_internal_carbon_ControlButtonContentInfo_2_0=cast=(ControlRef)
-OS_SetControlData__IIIILorg_eclipse_swt_internal_carbon_ControlButtonContentInfo_2_1=cast=(ControlPartCode)
-OS_SetControlData__IIIILorg_eclipse_swt_internal_carbon_ControlButtonContentInfo_2_2=cast=(ResType)
-OS_SetControlData__IIIILorg_eclipse_swt_internal_carbon_ControlButtonContentInfo_2_3=cast=(Size)
-OS_SetControlData__IIIILorg_eclipse_swt_internal_carbon_ControlButtonContentInfo_2_4=cast=(const void *)
-
-OS_SetControlData__IIIILorg_eclipse_swt_internal_carbon_ControlTabInfoRecV1_2=
-OS_SetControlData__IIIILorg_eclipse_swt_internal_carbon_ControlTabInfoRecV1_2_0=cast=(ControlRef)
-OS_SetControlData__IIIILorg_eclipse_swt_internal_carbon_ControlTabInfoRecV1_2_1=cast=(ControlPartCode)
-OS_SetControlData__IIIILorg_eclipse_swt_internal_carbon_ControlTabInfoRecV1_2_2=cast=(ResType)
-OS_SetControlData__IIIILorg_eclipse_swt_internal_carbon_ControlTabInfoRecV1_2_3=cast=(Size)
-OS_SetControlData__IIIILorg_eclipse_swt_internal_carbon_ControlTabInfoRecV1_2_4=cast=(const void *)
-
-OS_SetControlData__IIIILorg_eclipse_swt_internal_carbon_Rect_2=
-OS_SetControlData__IIIILorg_eclipse_swt_internal_carbon_Rect_2_0=cast=(ControlRef)
-OS_SetControlData__IIIILorg_eclipse_swt_internal_carbon_Rect_2_1=cast=(ControlPartCode)
-OS_SetControlData__IIIILorg_eclipse_swt_internal_carbon_Rect_2_2=cast=(ResType)
-OS_SetControlData__IIIILorg_eclipse_swt_internal_carbon_Rect_2_3=cast=(Size)
-OS_SetControlData__IIIILorg_eclipse_swt_internal_carbon_Rect_2_4=cast=(const void *)
-
-OS_SetControlData__IIII_3B=
-OS_SetControlData__IIII_3B_0=cast=(ControlRef)
-OS_SetControlData__IIII_3B_1=cast=(ControlPartCode)
-OS_SetControlData__IIII_3B_2=cast=(ResType)
-OS_SetControlData__IIII_3B_3=cast=(Size)
-OS_SetControlData__IIII_3B_4=cast=(const void *)
-
-OS_SetControlData__IIII_3I=
-OS_SetControlData__IIII_3I_0=cast=(ControlRef)
-OS_SetControlData__IIII_3I_1=cast=(ControlPartCode)
-OS_SetControlData__IIII_3I_2=cast=(ResType)
-OS_SetControlData__IIII_3I_3=cast=(Size)
-OS_SetControlData__IIII_3I_4=cast=(const void *)
-
-OS_SetControlData__IIII_3S=
-OS_SetControlData__IIII_3S_0=cast=(ControlRef)
-OS_SetControlData__IIII_3S_1=cast=(ControlPartCode)
-OS_SetControlData__IIII_3S_2=cast=(ResType)
-OS_SetControlData__IIII_3S_3=cast=(Size)
-OS_SetControlData__IIII_3S_4=cast=(const void *)
-
-OS_SetControlFontStyle=
-OS_SetControlFontStyle_0=cast=(ControlRef)
-OS_SetControlFontStyle_1=cast=(const ControlFontStyleRec *)
-
-OS_SetControlPopupMenuHandle=
-OS_SetControlPopupMenuHandle_0=cast=(ControlRef)
-OS_SetControlPopupMenuHandle_1=cast=(MenuRef)
-
-OS_SetControlProperty=
-OS_SetControlProperty_0=cast=(ControlRef)
-OS_SetControlProperty_1=
-OS_SetControlProperty_2=
-OS_SetControlProperty_3=
-OS_SetControlProperty_4=cast=(const void *)
-
-OS_SetControlReference=
-OS_SetControlReference_0=cast=(ControlRef)
-OS_SetControlReference_1=cast=(SInt32)
-
-OS_SetControlTitleWithCFString=
-OS_SetControlTitleWithCFString_0=cast=(ControlRef)
-OS_SetControlTitleWithCFString_1=cast=(CFStringRef)
-
-OS_SetControlViewSize=
-OS_SetControlViewSize_0=cast=(ControlRef)
-OS_SetControlViewSize_1=cast=(SInt32)
-
-OS_SetControlVisibility=
-OS_SetControlVisibility_0=cast=(ControlRef)
-OS_SetControlVisibility_1=
-OS_SetControlVisibility_2=
-
-OS_SetCursor=
-OS_SetCursor_0=cast=(const Cursor *)
-
-OS_SetDataBrowserCallbacks=
-OS_SetDataBrowserCallbacks_0=cast=(ControlRef)
-OS_SetDataBrowserCallbacks_1=cast=(const DataBrowserCallbacks *),flags=init
-
-OS_SetDataBrowserCustomCallbacks=
-OS_SetDataBrowserCustomCallbacks_0=cast=(ControlRef)
-OS_SetDataBrowserCustomCallbacks_1=
-
-OS_SetDataBrowserHasScrollBars=
-OS_SetDataBrowserHasScrollBars_0=cast=(ControlRef)
-OS_SetDataBrowserHasScrollBars_1=cast=(Boolean)
-OS_SetDataBrowserHasScrollBars_2=cast=(Boolean)
-
-OS_SetDataBrowserItemDataBooleanValue=
-OS_SetDataBrowserItemDataBooleanValue_0=cast=(DataBrowserItemDataRef)
-OS_SetDataBrowserItemDataBooleanValue_1=cast=(Boolean)
-
-OS_SetDataBrowserItemDataButtonValue=
-OS_SetDataBrowserItemDataButtonValue_0=cast=(DataBrowserItemDataRef)
-OS_SetDataBrowserItemDataButtonValue_1=cast=(ThemeButtonValue)
-
-OS_SetDataBrowserItemDataIcon=
-OS_SetDataBrowserItemDataIcon_0=cast=(DataBrowserItemDataRef)
-OS_SetDataBrowserItemDataIcon_1=cast=(IconRef)
-
-OS_SetDataBrowserItemDataItemID=
-OS_SetDataBrowserItemDataItemID_0=cast=(DataBrowserItemDataRef)
-OS_SetDataBrowserItemDataItemID_1=cast=(DataBrowserItemID)
-
-OS_SetDataBrowserItemDataText=
-OS_SetDataBrowserItemDataText_0=cast=(DataBrowserItemDataRef)
-OS_SetDataBrowserItemDataText_1=cast=(CFStringRef)
-
-OS_SetDataBrowserListViewDisclosureColumn=
-OS_SetDataBrowserListViewDisclosureColumn_0=cast=(ControlRef)
-OS_SetDataBrowserListViewDisclosureColumn_1=cast=(DataBrowserTableViewColumnID)
-OS_SetDataBrowserListViewDisclosureColumn_2=cast=(Boolean)
-
-OS_SetDataBrowserListViewHeaderBtnHeight=
-OS_SetDataBrowserListViewHeaderBtnHeight_0=cast=(ControlRef)
-OS_SetDataBrowserListViewHeaderBtnHeight_1=cast=(UInt16)
-
-OS_SetDataBrowserListViewHeaderDesc=
-OS_SetDataBrowserListViewHeaderDesc_0=cast=(ControlRef)
-OS_SetDataBrowserListViewHeaderDesc_1=
-OS_SetDataBrowserListViewHeaderDesc_2=
-
-OS_SetDataBrowserScrollPosition=
-OS_SetDataBrowserScrollPosition_0=cast=(ControlRef)
-OS_SetDataBrowserScrollPosition_1=cast=(UInt32)
-OS_SetDataBrowserScrollPosition_2=cast=(UInt32)
-
-OS_SetDataBrowserSelectedItems=
-OS_SetDataBrowserSelectedItems_0=cast=(ControlRef)
-OS_SetDataBrowserSelectedItems_1=cast=(UInt32)
-OS_SetDataBrowserSelectedItems_2=cast=(const DataBrowserItemID *)
-OS_SetDataBrowserSelectedItems_3=cast=(DataBrowserSetOption)
-
-OS_SetDataBrowserSelectionFlags=
-OS_SetDataBrowserSelectionFlags_0=cast=(ControlRef)
-OS_SetDataBrowserSelectionFlags_1=cast=(DataBrowserSelectionFlags)
-
-OS_SetDataBrowserSortOrder=
-OS_SetDataBrowserSortOrder_0=cast=(ControlRef)
-OS_SetDataBrowserSortOrder_1=
-
-OS_SetDataBrowserTableViewColumnPosition=
-OS_SetDataBrowserTableViewColumnPosition_0=cast=(ControlRef)
-OS_SetDataBrowserTableViewColumnPosition_1=
-OS_SetDataBrowserTableViewColumnPosition_2=
-
-OS_SetDataBrowserTableViewHiliteStyle=
-OS_SetDataBrowserTableViewHiliteStyle_0=cast=(ControlRef)
-OS_SetDataBrowserTableViewHiliteStyle_1=
-
-OS_SetDataBrowserTableViewItemRow=
-OS_SetDataBrowserTableViewItemRow_0=cast=(ControlRef)
-OS_SetDataBrowserTableViewItemRow_1=
-OS_SetDataBrowserTableViewItemRow_2=
-
-OS_SetDataBrowserTableViewNamedColumnWidth=
-OS_SetDataBrowserTableViewNamedColumnWidth_0=cast=(ControlRef)
-OS_SetDataBrowserTableViewNamedColumnWidth_1=cast=(DataBrowserTableViewColumnID)
-OS_SetDataBrowserTableViewNamedColumnWidth_2=cast=(UInt16)
-
-OS_SetDataBrowserTarget=
-OS_SetDataBrowserTarget_0=cast=(ControlRef)
-OS_SetDataBrowserTarget_1=cast=(DataBrowserItemID)
-
-OS_SetDragAllowableActions=
-OS_SetDragAllowableActions_0=cast=(DragRef)
-OS_SetDragAllowableActions_1=cast=(DragActions)
-OS_SetDragAllowableActions_2=cast=(Boolean)
-
-OS_SetDragDropAction=
-OS_SetDragDropAction_0=cast=(DragRef)
-OS_SetDragDropAction_1=cast=(DragActions)
-
-OS_SetDragInputProc=
-OS_SetDragInputProc_0=cast=(DragRef)
-OS_SetDragInputProc_1=cast=(DragInputUPP)
-OS_SetDragInputProc_2=cast=(void *)
-
-OS_SetEventLoopTimerNextFireTime=
-OS_SetEventLoopTimerNextFireTime_0=cast=(EventLoopTimerRef)
-OS_SetEventLoopTimerNextFireTime_1=cast=(EventTimerInterval)
-
-OS_SetEventParameter__IIII_3C=
-OS_SetEventParameter__IIII_3C_0=cast=(EventRef)
-OS_SetEventParameter__IIII_3C_1=cast=(EventParamName)
-OS_SetEventParameter__IIII_3C_2=cast=(EventParamType)
-OS_SetEventParameter__IIII_3C_3=cast=(UInt32)
-OS_SetEventParameter__IIII_3C_4=cast=(const void *)
-
-OS_SetEventParameter__IIII_3S=
-OS_SetEventParameter__IIII_3S_0=cast=(EventRef)
-OS_SetEventParameter__IIII_3S_1=cast=(EventParamName)
-OS_SetEventParameter__IIII_3S_2=cast=(EventParamType)
-OS_SetEventParameter__IIII_3S_3=cast=(UInt32)
-OS_SetEventParameter__IIII_3S_4=cast=(const void *)
-
-OS_SetFontInfoForSelection=
-OS_SetFontInfoForSelection_0=cast=(OSType)
-OS_SetFontInfoForSelection_1=cast=(UInt32)
-OS_SetFontInfoForSelection_2=cast=(void *)
-OS_SetFontInfoForSelection_3=cast=(HIObjectRef)
-
-OS_SetFrontProcess=
-OS_SetFrontProcess_0=cast=(const ProcessSerialNumber *)
-
-OS_SetFrontProcessWithOptions=
-OS_SetFrontProcessWithOptions_0=cast=(const ProcessSerialNumber *)
-OS_SetFrontProcessWithOptions_1=
-
-OS_SetGWorld=
-OS_SetGWorld_0=cast=(CGrafPtr)
-OS_SetGWorld_1=cast=(GDHandle)
-
-OS_SetItemMark=
-OS_SetItemMark_0=cast=(MenuRef)
-OS_SetItemMark_1=
-OS_SetItemMark_2=
-
-OS_SetKeyboardFocus=
-OS_SetKeyboardFocus_0=cast=(WindowRef)
-OS_SetKeyboardFocus_1=cast=(ControlRef)
-OS_SetKeyboardFocus_2=cast=(ControlFocusPart)
-
-OS_SetMenuCommandMark=
-OS_SetMenuCommandMark_0=cast=(MenuRef)
-OS_SetMenuCommandMark_1=cast=(MenuCommand)
-OS_SetMenuCommandMark_2=cast=(UniChar)
-
-OS_SetMenuFont=
-OS_SetMenuFont_0=cast=(MenuRef)
-OS_SetMenuFont_1=cast=(SInt16)
-OS_SetMenuFont_2=cast=(UInt16)
-
-OS_SetMenuItemCommandKey=
-OS_SetMenuItemCommandKey_0=cast=(MenuRef)
-OS_SetMenuItemCommandKey_1=cast=(MenuItemIndex)
-OS_SetMenuItemCommandKey_2=cast=(Boolean)
-OS_SetMenuItemCommandKey_3=cast=(UInt16)
-
-OS_SetMenuItemHierarchicalMenu=
-OS_SetMenuItemHierarchicalMenu_0=cast=(MenuRef)
-OS_SetMenuItemHierarchicalMenu_1=cast=(MenuItemIndex)
-OS_SetMenuItemHierarchicalMenu_2=cast=(MenuRef)
-
-OS_SetMenuItemIconHandle=
-OS_SetMenuItemIconHandle_0=cast=(MenuRef)
-OS_SetMenuItemIconHandle_1=cast=(SInt16)
-OS_SetMenuItemIconHandle_2=cast=(UInt8)
-OS_SetMenuItemIconHandle_3=cast=(Handle)
-
-OS_SetMenuItemKeyGlyph=
-OS_SetMenuItemKeyGlyph_0=cast=(MenuRef)
-OS_SetMenuItemKeyGlyph_1=cast=(SInt16)
-OS_SetMenuItemKeyGlyph_2=cast=(SInt16)
-
-OS_SetMenuItemModifiers=
-OS_SetMenuItemModifiers_0=cast=(MenuRef)
-OS_SetMenuItemModifiers_1=cast=(SInt16)
-OS_SetMenuItemModifiers_2=cast=(UInt8)
-
-OS_SetMenuItemRefCon=
-OS_SetMenuItemRefCon_0=cast=(MenuRef)
-OS_SetMenuItemRefCon_1=cast=(SInt16)
-OS_SetMenuItemRefCon_2=cast=(UInt32)
-
-OS_SetMenuItemTextWithCFString=
-OS_SetMenuItemTextWithCFString_0=cast=(MenuRef)
-OS_SetMenuItemTextWithCFString_1=cast=(MenuItemIndex)
-OS_SetMenuItemTextWithCFString_2=cast=(CFStringRef)
-
-OS_SetMenuTitleWithCFString=
-OS_SetMenuTitleWithCFString_0=cast=(MenuRef)
-OS_SetMenuTitleWithCFString_1=cast=(CFStringRef)
-
-OS_SetOrigin=
-OS_SetOrigin_0=cast=(short)
-OS_SetOrigin_1=cast=(short)
-
-OS_SetPort=
-OS_SetPort_0=cast=(GrafPtr)
-
-OS_SetPortBounds=
-OS_SetPortBounds_0=cast=(CGrafPtr)
-OS_SetPortBounds_1=cast=(const Rect *)
-
-OS_SetPortWindowPort=
-OS_SetPortWindowPort_0=cast=(WindowRef)
-
-OS_SetPt=
-OS_SetPt_0=cast=(Point *)
-OS_SetPt_1=cast=(short)
-OS_SetPt_2=cast=(short)
-
-OS_SetRect=
-OS_SetRect_0=cast=(Rect *)
-OS_SetRect_1=cast=(short)
-OS_SetRect_2=cast=(short)
-OS_SetRect_3=cast=(short)
-OS_SetRect_4=cast=(short)
-
-OS_SetRectRgn=
-OS_SetRectRgn_0=cast=(RgnHandle)
-OS_SetRectRgn_1=cast=(short)
-OS_SetRectRgn_2=cast=(short)
-OS_SetRectRgn_3=cast=(short)
-OS_SetRectRgn_4=cast=(short)
-
-OS_SetRootMenu=
-OS_SetRootMenu_0=cast=(MenuRef)
-
-OS_SetThemeBackground=
-OS_SetThemeBackground_0=cast=(ThemeBrush)
-OS_SetThemeBackground_1=cast=(SInt16)
-OS_SetThemeBackground_2=cast=(Boolean)
-
-OS_SetThemeCursor=
-OS_SetThemeCursor_0=cast=(ThemeCursor)
-
-OS_SetThemeDrawingState=
-OS_SetThemeDrawingState_0=cast=(ThemeDrawingState)
-OS_SetThemeDrawingState_1=cast=(Boolean)
-
-OS_SetThemeTextColor=
-OS_SetThemeTextColor_0=
-OS_SetThemeTextColor_1=
-OS_SetThemeTextColor_2=
-
-OS_SetThemeWindowBackground=
-OS_SetThemeWindowBackground_0=cast=(WindowRef)
-OS_SetThemeWindowBackground_1=cast=(ThemeBrush)
-OS_SetThemeWindowBackground_2=cast=(Boolean)
-
-OS_SetUpControlBackground=
-OS_SetUpControlBackground_0=cast=(ControlRef)
-OS_SetUpControlBackground_1=cast=(SInt16)
-OS_SetUpControlBackground_2=cast=(Boolean)
-
-OS_SetWRefCon=
-OS_SetWRefCon_0=cast=(WindowRef)
-OS_SetWRefCon_1=cast=(long)
-
-OS_SetWindowActivationScope=
-OS_SetWindowActivationScope_0=cast=(WindowRef)
-OS_SetWindowActivationScope_1=cast=(WindowActivationScope)
-
-OS_SetWindowBounds=
-OS_SetWindowBounds_0=cast=(WindowRef)
-OS_SetWindowBounds_1=cast=(WindowRegionCode)
-OS_SetWindowBounds_2=cast=(Rect *)
-
-OS_SetWindowDefaultButton=
-OS_SetWindowDefaultButton_0=cast=(WindowRef)
-OS_SetWindowDefaultButton_1=cast=(ControlRef)
-
-OS_SetWindowGroup=
-OS_SetWindowGroup_0=cast=(WindowRef)
-OS_SetWindowGroup_1=cast=(WindowGroupRef)
-
-OS_SetWindowGroupOwner=
-OS_SetWindowGroupOwner_0=cast=(WindowGroupRef)
-OS_SetWindowGroupOwner_1=cast=(WindowRef)
-
-OS_SetWindowGroupParent=
-OS_SetWindowGroupParent_0=cast=(WindowGroupRef)
-OS_SetWindowGroupParent_1=cast=(WindowGroupRef)
-
-OS_SetWindowModality=
-OS_SetWindowModality_0=cast=(WindowRef)
-OS_SetWindowModality_1=cast=(WindowModality)
-OS_SetWindowModality_2=cast=(WindowRef)
-
-OS_SetWindowResizeLimits=
-OS_SetWindowResizeLimits_0=cast=WindowRef
-OS_SetWindowResizeLimits_1=cast=(HISize *)
-OS_SetWindowResizeLimits_2=cast=(HISize *)
-
-OS_SetWindowTitleWithCFString=
-OS_SetWindowTitleWithCFString_0=cast=(WindowRef)
-OS_SetWindowTitleWithCFString_1=cast=(CFStringRef)
-
-OS_ShowWindow=
-OS_ShowWindow_0=cast=(WindowRef)
-
-OS_SizeControl=
-OS_SizeControl_0=cast=(ControlRef)
-OS_SizeControl_1=cast=(SInt16)
-OS_SizeControl_2=cast=(SInt16)
-
-OS_SizeWindow=
-OS_SizeWindow_0=cast=(WindowRef)
-OS_SizeWindow_1=cast=(short)
-OS_SizeWindow_2=cast=(short)
-OS_SizeWindow_3=cast=(Boolean)
-
-OS_StillDown=
-
-OS_SyncCGContextOriginWithPort=
-OS_SyncCGContextOriginWithPort_0=cast=(CGContextRef)
-OS_SyncCGContextOriginWithPort_1=cast=(CGrafPtr)
-
-OS_SysBeep=
-OS_SysBeep_0=cast=(short)
-
-OS_TXNActivate=
-OS_TXNActivate_0=cast=(TXNObject)
-OS_TXNActivate_1=cast=(TXNFrameID)
-OS_TXNActivate_2=cast=(TXNScrollBarState)
-
-OS_TXNAdjustCursor=
-OS_TXNAdjustCursor_0=cast=(TXNObject)
-OS_TXNAdjustCursor_1=cast=(RgnHandle)
-
-OS_TXNClick=
-OS_TXNClick_0=cast=(TXNObject)
-OS_TXNClick_1=cast=(const EventRecord *)
-
-OS_TXNCopy=
-OS_TXNCopy_0=cast=(TXNObject)
-
-OS_TXNCut=
-OS_TXNCut_0=cast=(TXNObject)
-
-OS_TXNDataSize=
-OS_TXNDataSize_0=cast=(TXNObject)
-
-OS_TXNDeleteObject=
-OS_TXNDeleteObject_0=cast=(TXNObject)
-
-OS_TXNDraw=
-OS_TXNDraw_0=cast=(TXNObject)
-OS_TXNDraw_1=cast=(GWorldPtr)
-
-OS_TXNEchoMode=
-OS_TXNEchoMode_0=cast=(TXNObject)
-OS_TXNEchoMode_1=cast=(UniChar)
-OS_TXNEchoMode_2=cast=(TextEncoding)
-OS_TXNEchoMode_3=cast=(Boolean)
-
-OS_TXNFocus=
-OS_TXNFocus_0=cast=(TXNObject)
-OS_TXNFocus_1=cast=(Boolean)
-
-OS_TXNGetData=
-OS_TXNGetData_0=cast=(TXNObject)
-OS_TXNGetData_1=cast=(TXNOffset)
-OS_TXNGetData_2=cast=(TXNOffset)
-OS_TXNGetData_3=cast=(Handle *)
-
-OS_TXNGetLineCount=
-OS_TXNGetLineCount_0=cast=(TXNObject)
-OS_TXNGetLineCount_1=cast=(ItemCount *)
-
-OS_TXNGetLineMetrics=
-OS_TXNGetLineMetrics_0=cast=(TXNObject)
-OS_TXNGetLineMetrics_1=cast=(UInt32)
-OS_TXNGetLineMetrics_2=cast=(Fixed *)
-OS_TXNGetLineMetrics_3=cast=(Fixed *)
-
-OS_TXNGetRectBounds=
-OS_TXNGetRectBounds_0=cast=(TXNObject)
-OS_TXNGetRectBounds_1=cast=(Rect *)
-OS_TXNGetRectBounds_2=cast=(TXNLongRect *)
-OS_TXNGetRectBounds_3=cast=(TXNLongRect *)
-
-OS_TXNGetSelection=
-OS_TXNGetSelection_0=cast=(TXNObject)
-OS_TXNGetSelection_1=cast=(TXNOffset *)
-OS_TXNGetSelection_2=cast=(TXNOffset *)
-
-OS_TXNGetTXNObjectControls=
-OS_TXNGetTXNObjectControls_0=cast=(TXNObject)
-OS_TXNGetTXNObjectControls_1=cast=(ItemCount)
-OS_TXNGetTXNObjectControls_2=cast=(const TXNControlTag *)
-OS_TXNGetTXNObjectControls_3=cast=(TXNControlData *)
-
-OS_TXNGetViewRect=
-OS_TXNGetViewRect_0=cast=(TXNObject)
-OS_TXNGetViewRect_1=
-
-OS_TXNInitTextension=
-OS_TXNInitTextension_0=cast=(const TXNMacOSPreferredFontDescription *)
-OS_TXNInitTextension_1=cast=(ItemCount)
-OS_TXNInitTextension_2=cast=(TXNInitOptions)
-
-OS_TXNNewObject=
-OS_TXNNewObject_0=cast=(const FSSpec *)
-OS_TXNNewObject_1=cast=(WindowRef)
-OS_TXNNewObject_2=cast=(const Rect *)
-OS_TXNNewObject_3=cast=(TXNFrameOptions)
-OS_TXNNewObject_4=cast=(TXNFrameType)
-OS_TXNNewObject_5=cast=(TXNFileType)
-OS_TXNNewObject_6=cast=(TXNPermanentTextEncodingType)
-OS_TXNNewObject_7=cast=(TXNObject *)
-OS_TXNNewObject_8=cast=(TXNFrameID *)
-OS_TXNNewObject_9=cast=(TXNObjectRefcon)
-
-OS_TXNOffsetToPoint=
-OS_TXNOffsetToPoint_0=cast=(TXNObject)
-OS_TXNOffsetToPoint_1=cast=(TXNOffset)
-OS_TXNOffsetToPoint_2=cast=(Point *)
-
-OS_TXNPaste=
-OS_TXNPaste_0=cast=(TXNObject)
-
-OS_TXNPointToOffset=
-OS_TXNPointToOffset_0=cast=(TXNObject)
-OS_TXNPointToOffset_1=flags=struct
-OS_TXNPointToOffset_2=cast=(TXNOffset *)
-
-OS_TXNSelectAll=
-OS_TXNSelectAll_0=cast=(TXNObject)
-
-OS_TXNSetBackground=
-OS_TXNSetBackground_0=cast=(TXNObject)
-OS_TXNSetBackground_1=cast=(const TXNBackground *)
-
-OS_TXNSetData=
-OS_TXNSetData_0=cast=(TXNObject)
-OS_TXNSetData_1=cast=(TXNDataType)
-OS_TXNSetData_2=cast=(const void *)
-OS_TXNSetData_3=cast=(ByteCount)
-OS_TXNSetData_4=cast=(TXNOffset)
-OS_TXNSetData_5=cast=(TXNOffset)
-
-OS_TXNSetFrameBounds=
-OS_TXNSetFrameBounds_0=cast=(TXNObject)
-OS_TXNSetFrameBounds_1=cast=(SInt32)
-OS_TXNSetFrameBounds_2=cast=(SInt32)
-OS_TXNSetFrameBounds_3=cast=(SInt32)
-OS_TXNSetFrameBounds_4=cast=(SInt32)
-OS_TXNSetFrameBounds_5=cast=(TXNFrameID)
-
-OS_TXNSetRectBounds=
-OS_TXNSetRectBounds_0=cast=(TXNObject)
-OS_TXNSetRectBounds_1=cast=(Rect *)
-OS_TXNSetRectBounds_2=cast=(TXNLongRect *)
-OS_TXNSetRectBounds_3=cast=(Boolean)
-
-OS_TXNSetSelection=
-OS_TXNSetSelection_0=cast=(TXNObject)
-OS_TXNSetSelection_1=cast=(TXNOffset)
-OS_TXNSetSelection_2=cast=(TXNOffset)
-
-OS_TXNSetTXNObjectControls=
-OS_TXNSetTXNObjectControls_0=cast=(TXNObject)
-OS_TXNSetTXNObjectControls_1=cast=(Boolean)
-OS_TXNSetTXNObjectControls_2=cast=(ItemCount)
-OS_TXNSetTXNObjectControls_3=cast=(const TXNControlTag *)
-OS_TXNSetTXNObjectControls_4=cast=(const TXNControlData *)
-
-OS_TXNSetTypeAttributes=
-OS_TXNSetTypeAttributes_0=cast=(TXNObject)
-OS_TXNSetTypeAttributes_1=cast=(ItemCount)
-OS_TXNSetTypeAttributes_2=cast=(const TXNTypeAttributes *)
-OS_TXNSetTypeAttributes_3=cast=(TXNOffset)
-OS_TXNSetTypeAttributes_4=cast=(TXNOffset)
-
-OS_TXNShowSelection=
-OS_TXNShowSelection_0=cast=(TXNObject)
-OS_TXNShowSelection_1=cast=(Boolean)
-
-OS_TestControl=
-OS_TestControl_0=cast=(ControlRef)
-OS_TestControl_1=cast=(Point *),flags=struct
-
-OS_TextFace=
-OS_TextFace_0=cast=(StyleParameter)
-
-OS_TextFont=
-OS_TextFont_0=cast=(short)
-
-OS_TextMode=
-OS_TextMode_0=cast=(short)
-
-OS_TextSize=
-OS_TextSize_0=cast=(short)
-
-OS_TextWidth=
-OS_TextWidth_0=cast=(const void *)
-OS_TextWidth_1=cast=(short)
-OS_TextWidth_2=cast=(short)
-
-OS_TrackDrag=
-OS_TrackDrag_0=cast=(DragRef)
-OS_TrackDrag_1=cast=(const EventRecord *)
-OS_TrackDrag_2=cast=(RgnHandle)
-
-OS_TrackMouseLocationWithOptions=
-OS_TrackMouseLocationWithOptions_0=cast=(GrafPtr)
-OS_TrackMouseLocationWithOptions_1=cast=(OptionBits)
-OS_TrackMouseLocationWithOptions_2=cast=(EventTimeout)
-OS_TrackMouseLocationWithOptions_3=cast=(Point *)
-OS_TrackMouseLocationWithOptions_4=cast=(UInt32 *)
-OS_TrackMouseLocationWithOptions_5=cast=(MouseTrackingResult *)
-
-OS_UnionRect=
-OS_UnionRect_0=flags=no_out
-OS_UnionRect_1=flags=no_out
-OS_UnionRect_2=flags=no_in
-
-OS_UnionRgn=
-OS_UnionRgn_0=cast=(RgnHandle)
-OS_UnionRgn_1=cast=(RgnHandle)
-OS_UnionRgn_2=cast=(RgnHandle)
-
-OS_UnlockPortBits=
-OS_UnlockPortBits_0=cast=(GrafPtr)
-
-OS_UpdateControls=
-OS_UpdateControls_0=cast=(WindowRef)
-OS_UpdateControls_1=cast=(RgnHandle)
-
-OS_UpdateDataBrowserItems=
-OS_UpdateDataBrowserItems_0=cast=(ControlRef)
-OS_UpdateDataBrowserItems_1=cast=(DataBrowserItemID)
-OS_UpdateDataBrowserItems_2=cast=(UInt32)
-OS_UpdateDataBrowserItems_3=cast=(const DataBrowserItemID *)
-OS_UpdateDataBrowserItems_4=cast=(DataBrowserPropertyID)
-OS_UpdateDataBrowserItems_5=cast=(DataBrowserPropertyID)
-
-OS_UpgradeScriptInfoToTextEncoding=
-OS_UpgradeScriptInfoToTextEncoding_0=
-OS_UpgradeScriptInfoToTextEncoding_1=
-OS_UpgradeScriptInfoToTextEncoding_2=
-OS_UpgradeScriptInfoToTextEncoding_3=
-OS_UpgradeScriptInfoToTextEncoding_4=
-
-OS_WaitMouseMoved=
-OS_WaitMouseMoved_0=flags=struct
-
-OS_X2Fix=
-OS_X2Fix_0=
-
-OS_ZoomWindowIdeal=
-OS_ZoomWindowIdeal_0=cast=(WindowRef)
-OS_ZoomWindowIdeal_1=cast=(WindowPartCode)
-OS_ZoomWindowIdeal_2=cast=(Point *)
-
-OS_kHIViewWindowContentID=flags=const address
-
-OS_kPMDocumentFormatPDF=flags=const
-
-OS_kPMGraphicsContextCoreGraphics=flags=const
-
-OS_memcpy__III=
-OS_memcpy__III_0=cast=(void *)
-OS_memcpy__III_1=cast=(const void *)
-OS_memcpy__III_2=cast=(size_t)
-
-OS_memcpy__ILorg_eclipse_swt_internal_carbon_ATSUTab_2I=
-OS_memcpy__ILorg_eclipse_swt_internal_carbon_ATSUTab_2I_0=cast=(void *)
-OS_memcpy__ILorg_eclipse_swt_internal_carbon_ATSUTab_2I_1=cast=(const void *),flags=no_out
-OS_memcpy__ILorg_eclipse_swt_internal_carbon_ATSUTab_2I_2=cast=(size_t)
-
-OS_memcpy__ILorg_eclipse_swt_internal_carbon_BitMap_2I=
-OS_memcpy__ILorg_eclipse_swt_internal_carbon_BitMap_2I_0=cast=(void *)
-OS_memcpy__ILorg_eclipse_swt_internal_carbon_BitMap_2I_1=cast=(const void *),flags=no_out
-OS_memcpy__ILorg_eclipse_swt_internal_carbon_BitMap_2I_2=cast=(size_t)
-
-OS_memcpy__ILorg_eclipse_swt_internal_carbon_Cursor_2I=
-OS_memcpy__ILorg_eclipse_swt_internal_carbon_Cursor_2I_0=cast=(void *)
-OS_memcpy__ILorg_eclipse_swt_internal_carbon_Cursor_2I_1=cast=(const void *),flags=no_out
-OS_memcpy__ILorg_eclipse_swt_internal_carbon_Cursor_2I_2=cast=(size_t)
-
-OS_memcpy__ILorg_eclipse_swt_internal_carbon_EventRecord_2I=
-OS_memcpy__ILorg_eclipse_swt_internal_carbon_EventRecord_2I_0=cast=(void *)
-OS_memcpy__ILorg_eclipse_swt_internal_carbon_EventRecord_2I_1=cast=(const void *),flags=no_out
-OS_memcpy__ILorg_eclipse_swt_internal_carbon_EventRecord_2I_2=cast=(size_t)
-
-OS_memcpy__ILorg_eclipse_swt_internal_carbon_FontSelectionQDStyle_2I=
-OS_memcpy__ILorg_eclipse_swt_internal_carbon_FontSelectionQDStyle_2I_0=cast=(void *)
-OS_memcpy__ILorg_eclipse_swt_internal_carbon_FontSelectionQDStyle_2I_1=cast=(const void *),flags=no_out
-OS_memcpy__ILorg_eclipse_swt_internal_carbon_FontSelectionQDStyle_2I_2=cast=(size_t)
-
-OS_memcpy__ILorg_eclipse_swt_internal_carbon_HMHelpContentRec_2I=
-OS_memcpy__ILorg_eclipse_swt_internal_carbon_HMHelpContentRec_2I_0=cast=(void *)
-OS_memcpy__ILorg_eclipse_swt_internal_carbon_HMHelpContentRec_2I_1=cast=(const void *),flags=no_out
-OS_memcpy__ILorg_eclipse_swt_internal_carbon_HMHelpContentRec_2I_2=cast=(size_t)
-
-OS_memcpy__ILorg_eclipse_swt_internal_carbon_PixMap_2I=
-OS_memcpy__ILorg_eclipse_swt_internal_carbon_PixMap_2I_0=cast=(void *)
-OS_memcpy__ILorg_eclipse_swt_internal_carbon_PixMap_2I_1=cast=(const void *),flags=no_out
-OS_memcpy__ILorg_eclipse_swt_internal_carbon_PixMap_2I_2=cast=(size_t)
-
-OS_memcpy__ILorg_eclipse_swt_internal_carbon_RGBColor_2I=
-OS_memcpy__ILorg_eclipse_swt_internal_carbon_RGBColor_2I_0=cast=(void *)
-OS_memcpy__ILorg_eclipse_swt_internal_carbon_RGBColor_2I_1=cast=(const void *),flags=no_out
-OS_memcpy__ILorg_eclipse_swt_internal_carbon_RGBColor_2I_2=cast=(size_t)
-
-OS_memcpy__ILorg_eclipse_swt_internal_carbon_Rect_2I=
-OS_memcpy__ILorg_eclipse_swt_internal_carbon_Rect_2I_0=cast=(void *)
-OS_memcpy__ILorg_eclipse_swt_internal_carbon_Rect_2I_1=cast=(const void *),flags=no_out
-OS_memcpy__ILorg_eclipse_swt_internal_carbon_Rect_2I_2=cast=(size_t)
-
-OS_memcpy__I_3BI=
-OS_memcpy__I_3BI_0=cast=(void *)
-OS_memcpy__I_3BI_1=cast=(const void *),flags=critical no_out
-OS_memcpy__I_3BI_2=cast=(size_t)
-
-OS_memcpy__I_3CI=
-OS_memcpy__I_3CI_0=cast=(void *)
-OS_memcpy__I_3CI_1=cast=(const void *),flags=critical no_out
-OS_memcpy__I_3CI_2=cast=(size_t)
-
-OS_memcpy__I_3II=
-OS_memcpy__I_3II_0=cast=(void *)
-OS_memcpy__I_3II_1=cast=(const void *),flags=critical no_out
-OS_memcpy__I_3II_2=cast=(size_t)
-
-OS_memcpy__Lorg_eclipse_swt_internal_carbon_ATSTrapezoid_2II=
-OS_memcpy__Lorg_eclipse_swt_internal_carbon_ATSTrapezoid_2II_0=cast=(void *),flags=no_in
-OS_memcpy__Lorg_eclipse_swt_internal_carbon_ATSTrapezoid_2II_1=cast=(const void *)
-OS_memcpy__Lorg_eclipse_swt_internal_carbon_ATSTrapezoid_2II_2=cast=(size_t)
-
-OS_memcpy__Lorg_eclipse_swt_internal_carbon_FontSelectionQDStyle_2II=
-OS_memcpy__Lorg_eclipse_swt_internal_carbon_FontSelectionQDStyle_2II_0=cast=(void *),flags=no_in
-OS_memcpy__Lorg_eclipse_swt_internal_carbon_FontSelectionQDStyle_2II_1=cast=(const void *)
-OS_memcpy__Lorg_eclipse_swt_internal_carbon_FontSelectionQDStyle_2II_2=cast=(size_t)
-
-OS_memcpy__Lorg_eclipse_swt_internal_carbon_GDevice_2II=
-OS_memcpy__Lorg_eclipse_swt_internal_carbon_GDevice_2II_0=cast=(void *),flags=no_in
-OS_memcpy__Lorg_eclipse_swt_internal_carbon_GDevice_2II_1=cast=(const void *)
-OS_memcpy__Lorg_eclipse_swt_internal_carbon_GDevice_2II_2=cast=(size_t)
-
-OS_memcpy__Lorg_eclipse_swt_internal_carbon_HMHelpContentRec_2II=
-OS_memcpy__Lorg_eclipse_swt_internal_carbon_HMHelpContentRec_2II_0=cast=(void *),flags=no_in
-OS_memcpy__Lorg_eclipse_swt_internal_carbon_HMHelpContentRec_2II_1=cast=(const void *)
-OS_memcpy__Lorg_eclipse_swt_internal_carbon_HMHelpContentRec_2II_2=cast=(size_t)
-
-OS_memcpy__Lorg_eclipse_swt_internal_carbon_PixMap_2II=
-OS_memcpy__Lorg_eclipse_swt_internal_carbon_PixMap_2II_0=cast=(void *),flags=no_in
-OS_memcpy__Lorg_eclipse_swt_internal_carbon_PixMap_2II_1=cast=(const void *)
-OS_memcpy__Lorg_eclipse_swt_internal_carbon_PixMap_2II_2=cast=(size_t)
-
-OS_memcpy__Lorg_eclipse_swt_internal_carbon_Rect_2II=
-OS_memcpy__Lorg_eclipse_swt_internal_carbon_Rect_2II_0=cast=(void *),flags=no_in
-OS_memcpy__Lorg_eclipse_swt_internal_carbon_Rect_2II_1=cast=(const void *)
-OS_memcpy__Lorg_eclipse_swt_internal_carbon_Rect_2II_2=cast=(size_t)
-
-OS_memcpy___3BII=
-OS_memcpy___3BII_0=cast=(void *),flags=critical no_in
-OS_memcpy___3BII_1=cast=(const void *)
-OS_memcpy___3BII_2=cast=(size_t)
-
-OS_memcpy___3B_3CI=
-OS_memcpy___3B_3CI_0=cast=(void *),flags=critical no_in
-OS_memcpy___3B_3CI_1=cast=(const void *),flags=critical no_out
-OS_memcpy___3B_3CI_2=cast=(size_t)
-
-OS_memcpy___3CII=
-OS_memcpy___3CII_0=cast=(void *),flags=critical no_in
-OS_memcpy___3CII_1=cast=(const void *)
-OS_memcpy___3CII_2=cast=(size_t)
-
-OS_memcpy___3C_3BI=
-OS_memcpy___3C_3BI_0=cast=(void *),flags=critical no_in
-OS_memcpy___3C_3BI_1=cast=(const void *),flags=critical no_out
-OS_memcpy___3C_3BI_2=cast=(size_t)
-
-OS_memcpy___3FII=
-OS_memcpy___3FII_0=cast=(void *),flags=critical no_in
-OS_memcpy___3FII_1=cast=(const void *)
-OS_memcpy___3FII_2=cast=(size_t)
-
-OS_memcpy___3III=
-OS_memcpy___3III_0=cast=(void *),flags=critical no_in
-OS_memcpy___3III_1=cast=(const void *)
-OS_memcpy___3III_2=cast=(size_t)
-
-OS_memset=
-OS_memset_0=cast=(void *)
-OS_memset_1=
-OS_memset_2=
-
-
-org_eclipse_swt_internal_carbon_PMRect=
-PMRect_top=cast=(double)
-PMRect_left=cast=(double)
-PMRect_bottom=cast=(double)
-PMRect_right=cast=(double)
-
-org_eclipse_swt_internal_carbon_PMResolution=
-PMResolution_hRes=
-PMResolution_vRes=
-
-org_eclipse_swt_internal_carbon_PixMap=
-PixMap_pmVersion=
-PixMap_packType=
-PixMap_packSize=
-PixMap_hRes=
-PixMap_vRes=
-PixMap_pixelType=
-PixMap_pixelSize=
-PixMap_cmpCount=
-PixMap_cmpSize=
-PixMap_pixelFormat=
-PixMap_pmTable=cast=(CTabHandle)
-PixMap_pmExt=cast=(void *)
-
-org_eclipse_swt_internal_carbon_Point=
-Point_v=
-Point_h=
-
-org_eclipse_swt_internal_carbon_RGBColor=
-RGBColor_red=
-RGBColor_green=
-RGBColor_blue=
-
-org_eclipse_swt_internal_carbon_Rect=
-Rect_top=
-Rect_left=
-Rect_bottom=
-Rect_right=
-
-org_eclipse_swt_internal_carbon_TXNBackground=
-TXNBackground_bgType=
-TXNBackground_bg_red=accessor=bg.color.red
-TXNBackground_bg_green=accessor=bg.color.green
-TXNBackground_bg_blue=accessor=bg.color.blue
-
-org_eclipse_swt_internal_carbon_TXNLongRect=
-TXNLongRect_top=
-TXNLongRect_left=
-TXNLongRect_bottom=
-TXNLongRect_right=
-
-org_eclipse_swt_internal_carbon_ThemeButtonDrawInfo=
-ThemeButtonDrawInfo_state=cast=(ThemeDrawState)
-ThemeButtonDrawInfo_value=cast=(ThemeButtonValue)
-ThemeButtonDrawInfo_adornment=cast=(ThemeButtonAdornment)
-
diff --git a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.cde.CDE.properties b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.cde.CDE.properties
deleted file mode 100644
index b848f4f0e6..0000000000
--- a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.cde.CDE.properties
+++ /dev/null
@@ -1,59 +0,0 @@
-###############################################################################
-# Copyright (c) 2004 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Common Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/cpl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-org_eclipse_swt_internal_cde_CDE=
-CDE_DtActionInvoke=
-CDE_DtActionInvoke_0=cast=Widget
-CDE_DtActionInvoke_1=cast=char *
-CDE_DtActionInvoke_2=
-CDE_DtActionInvoke_3=
-CDE_DtActionInvoke_4=cast=char *
-CDE_DtActionInvoke_5=cast=char *
-CDE_DtActionInvoke_6=cast=char *
-CDE_DtActionInvoke_7=
-CDE_DtActionInvoke_8=cast=DtActionCallbackProc
-CDE_DtActionInvoke_9=cast=XtPointer
-
-CDE_DtAppInitialize=
-CDE_DtAppInitialize_0=cast=(XtAppContext)
-CDE_DtAppInitialize_1=cast=(Display *)
-CDE_DtAppInitialize_2=cast=Widget
-CDE_DtAppInitialize_3=cast=(char *)
-CDE_DtAppInitialize_4=cast=(char *)
-
-CDE_DtDbLoad=
-
-CDE_DtDtsDataTypeIsAction=
-CDE_DtDtsDataTypeIsAction_0=cast=char *
-
-CDE_DtDtsDataTypeNames=
-
-CDE_DtDtsDataTypeToAttributeValue=
-CDE_DtDtsDataTypeToAttributeValue_0=cast=char *
-CDE_DtDtsDataTypeToAttributeValue_1=cast=char *
-CDE_DtDtsDataTypeToAttributeValue_2=cast=char *
-
-CDE_DtDtsFileToDataType=
-CDE_DtDtsFileToDataType_0=cast=char *
-
-CDE_DtDtsFreeAttributeValue=
-CDE_DtDtsFreeAttributeValue_0=cast=char *
-
-CDE_DtDtsFreeDataType=
-CDE_DtDtsFreeDataType_0=cast=char *
-
-CDE_DtDtsFreeDataTypeNames=
-CDE_DtDtsFreeDataTypeNames_0=cast=char **
-
-
-org_eclipse_swt_internal_cde_DtActionArg=
-DtActionArg_argClass=
-DtActionArg_name=accessor=u.file.name,cast=char *
-
diff --git a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.gnome.GNOME.properties b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.gnome.GNOME.properties
deleted file mode 100644
index 166775a676..0000000000
--- a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.gnome.GNOME.properties
+++ /dev/null
@@ -1,75 +0,0 @@
-###############################################################################
-# Copyright (c) 2004 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Common Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/cpl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-org_eclipse_swt_internal_gnome_GNOME=
-GNOME_GnomeVFSMimeApplication_sizeof=
-
-GNOME_g_free=
-GNOME_g_free_0=cast=gpointer
-
-GNOME_g_list_next=
-GNOME_g_list_next_0=
-
-GNOME_g_object_unref=
-GNOME_g_object_unref_0=cast=gpointer
-
-GNOME_gnome_icon_lookup=
-GNOME_gnome_icon_lookup_0=cast=(GnomeIconTheme *)
-GNOME_gnome_icon_lookup_1=cast=GnomeThumbnailFactory *
-GNOME_gnome_icon_lookup_2=cast=const char *
-GNOME_gnome_icon_lookup_3=cast=const char *
-GNOME_gnome_icon_lookup_4=cast=GnomeVFSFileInfo *
-GNOME_gnome_icon_lookup_5=cast=const char *
-GNOME_gnome_icon_lookup_6=cast=GnomeIconLookupFlags
-GNOME_gnome_icon_lookup_7=cast=GnomeIconLookupResultFlags *
-
-GNOME_gnome_icon_theme_lookup_icon=
-GNOME_gnome_icon_theme_lookup_icon_0=cast=GnomeIconTheme *
-GNOME_gnome_icon_theme_lookup_icon_1=cast=const char *
-GNOME_gnome_icon_theme_lookup_icon_2=
-GNOME_gnome_icon_theme_lookup_icon_3=cast=(const GnomeIconData **)
-GNOME_gnome_icon_theme_lookup_icon_4=
-
-GNOME_gnome_icon_theme_new=
-
-GNOME_gnome_vfs_get_registered_mime_types=
-
-GNOME_gnome_vfs_init=
-
-GNOME_gnome_vfs_mime_application_free=
-GNOME_gnome_vfs_mime_application_free_0=cast=GnomeVFSMimeApplication *
-
-GNOME_gnome_vfs_mime_extensions_list_free=
-GNOME_gnome_vfs_mime_extensions_list_free_0=cast=GList *
-
-GNOME_gnome_vfs_mime_get_default_application=
-GNOME_gnome_vfs_mime_get_default_application_0=
-
-GNOME_gnome_vfs_mime_get_extensions_list=
-GNOME_gnome_vfs_mime_get_extensions_list_0=cast=const char *
-
-GNOME_gnome_vfs_mime_registered_mime_type_list_free=
-GNOME_gnome_vfs_mime_registered_mime_type_list_free_0=cast=GList *
-
-GNOME_memmove=
-GNOME_memmove_0=cast=void *,flags=no_in
-GNOME_memmove_1=cast=const void *
-GNOME_memmove_2=cast=size_t
-
-
-org_eclipse_swt_internal_gnome_GnomeVFSMimeApplication=
-GnomeVFSMimeApplication_id=cast=char *
-GnomeVFSMimeApplication_name=cast=char *
-GnomeVFSMimeApplication_command=cast=char *
-GnomeVFSMimeApplication_can_open_multiple_files=cast=gboolean
-GnomeVFSMimeApplication_expects_uris=cast=GnomeVFSMimeApplicationArgumentType
-GnomeVFSMimeApplication_supported_uri_schemes=cast=(GList *)
-GnomeVFSMimeApplication_requires_terminal=cast=gboolean
-
diff --git a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.gnome.properties b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.gnome.properties
deleted file mode 100644
index d39c9f4722..0000000000
--- a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.gnome.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-###############################################################################
-# Copyright (c) 2004 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Common Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/cpl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-swt_copyright=/*******************************************************************************\n\
- * Copyright (c) 2000, 2004 IBM Corporation and others. All rights reserved.\n\
- * The contents of this file are made available under the terms\n\
- * of the GNU Lesser General Public License (LGPL) Version 2.1 that\n\
- * accompanies this distribution (lgpl-v21.txt). The LGPL is also\n\
- * available at http://www.gnu.org/licenses/lgpl.html. If the version\n\
- * of the LGPL at http://www.gnu.org is different to the version of\n\
- * the LGPL accompanying this distribution and there is any conflict\n\
- * between the two license versions, the terms of the LGPL accompanying\n\
- * this distribution shall govern.\n\
- * \n\
- * Contributors:\n\
- * IBM Corporation - initial API and implementation\n\
- *******************************************************************************/\n
- \ No newline at end of file
diff --git a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.gtk.GTK.properties b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.gtk.GTK.properties
deleted file mode 100644
index 38241348f2..0000000000
--- a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.gtk.GTK.properties
+++ /dev/null
@@ -1,49 +0,0 @@
-###############################################################################
-# Copyright (c) 2004 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Common Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/cpl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-org_eclipse_swt_internal_gtk_GTK=
-GTK_GTK_WIDGET_HEIGHT=
-GTK_GTK_WIDGET_HEIGHT_0=cast=GtkWidget *
-
-GTK_GTK_WIDGET_WIDTH=
-GTK_GTK_WIDGET_WIDTH_0=cast=GtkWidget *
-
-GTK_g_signal_connect=
-GTK_g_signal_connect_0=cast=(gpointer)
-GTK_g_signal_connect_1=cast=(const gchar *),flags=no_out
-GTK_g_signal_connect_2=cast=(GCallback)
-GTK_g_signal_connect_3=cast=gpointer
-
-GTK_gtk_events_pending=
-
-GTK_gtk_init_check=
-GTK_gtk_init_check_0=cast=int *
-GTK_gtk_init_check_1=cast=char ***
-
-GTK_gtk_main=
-
-GTK_gtk_main_iteration=
-
-GTK_gtk_plug_new=
-GTK_gtk_plug_new_0=
-
-GTK_gtk_widget_destroy=
-GTK_gtk_widget_destroy_0=cast=GtkWidget *
-
-GTK_gtk_widget_show=
-GTK_gtk_widget_show_0=cast=GtkWidget *
-
-GTK_gtk_widget_show_now=
-GTK_gtk_widget_show_now_0=cast=GtkWidget *
-
-GTK_gtk_window_new=
-GTK_gtk_window_new_0=cast=GtkWindowType
-
-
diff --git a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.gtk.OS.properties b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.gtk.OS.properties
deleted file mode 100644
index 07de573b56..0000000000
--- a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.gtk.OS.properties
+++ /dev/null
@@ -1,4062 +0,0 @@
-###############################################################################
-# Copyright (c) 2004 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Common Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/cpl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-org_eclipse_swt_internal_gtk_GInterfaceInfo=
-GInterfaceInfo_interface_init=cast=(GInterfaceInitFunc)
-GInterfaceInfo_interface_finalize=cast=(GInterfaceFinalizeFunc)
-GInterfaceInfo_interface_data=cast=(gpointer)
-
-org_eclipse_swt_internal_gtk_GObjectClass=
-GObjectClass_constructor=cast=(GObject *(*)())
-GObjectClass_set_property=cast=(void (*)())
-GObjectClass_get_property=cast=(void (*)())
-GObjectClass_dispose=cast=(void (*)())
-GObjectClass_finalize=cast=(void (*)())
-GObjectClass_dispatch_properties_changed=cast=(void (*)())
-GObjectClass_notify=cast=(void (*)())
-
-org_eclipse_swt_internal_gtk_GTypeInfo=
-GTypeInfo_class_size=cast=(guint16)
-GTypeInfo_base_init=cast=(GBaseInitFunc)
-GTypeInfo_base_finalize=cast=(GBaseFinalizeFunc)
-GTypeInfo_class_init=cast=(GClassInitFunc)
-GTypeInfo_class_finalize=cast=(GClassFinalizeFunc)
-GTypeInfo_class_data=cast=(gconstpointer)
-GTypeInfo_instance_size=cast=(guint16)
-GTypeInfo_n_preallocs=cast=(guint16)
-GTypeInfo_instance_init=cast=(GInstanceInitFunc)
-GTypeInfo_value_table=cast=(GTypeValueTable *)
-
-org_eclipse_swt_internal_gtk_GTypeQuery=
-GTypeQuery_type=cast=(GType)
-GTypeQuery_type_name=cast=(const gchar *)
-GTypeQuery_class_size=cast=(guint)
-GTypeQuery_instance_size=cast=(guint)
-
-org_eclipse_swt_internal_gtk_GdkColor=
-GdkColor_pixel=cast=(guint32)
-GdkColor_red=cast=(guint16)
-GdkColor_green=cast=(guint16)
-GdkColor_blue=cast=(guint16)
-
-org_eclipse_swt_internal_gtk_GdkDragContext=
-GdkDragContext_protocol=cast=(GdkDragProtocol)
-GdkDragContext_is_source=cast=(gboolean)
-GdkDragContext_source_window=cast=(GdkWindow *)
-GdkDragContext_dest_window=cast=(GdkWindow *)
-GdkDragContext_targets=cast=(GList *)
-GdkDragContext_actions=cast=(GdkDragAction)
-GdkDragContext_suggested_action=cast=(GdkDragAction)
-GdkDragContext_action=cast=(GdkDragAction)
-GdkDragContext_start_time=cast=(guint32)
-
-org_eclipse_swt_internal_gtk_GdkEvent=
-GdkEvent_type=cast=(GdkEventType)
-
-org_eclipse_swt_internal_gtk_GdkEventButton=
-GdkEventButton_window=cast=(GdkWindow *)
-GdkEventButton_send_event=cast=(gint8)
-GdkEventButton_time=cast=(guint32)
-GdkEventButton_x=cast=(gdouble)
-GdkEventButton_y=cast=(gdouble)
-GdkEventButton_axes=cast=(gdouble *)
-GdkEventButton_state=cast=(guint)
-GdkEventButton_button=cast=(guint)
-GdkEventButton_device=cast=(GdkDevice *)
-GdkEventButton_x_root=cast=(gdouble)
-GdkEventButton_y_root=cast=(gdouble)
-
-org_eclipse_swt_internal_gtk_GdkEventCrossing=
-GdkEventCrossing_window=cast=(GdkWindow *)
-GdkEventCrossing_send_event=cast=(gint8)
-GdkEventCrossing_subwindow=cast=(GdkWindow *)
-GdkEventCrossing_time=
-GdkEventCrossing_x=
-GdkEventCrossing_y=
-GdkEventCrossing_x_root=
-GdkEventCrossing_y_root=
-GdkEventCrossing_mode=cast=(GdkCrossingMode)
-GdkEventCrossing_detail=cast=(GdkNotifyType)
-GdkEventCrossing_focus=cast=(gboolean)
-GdkEventCrossing_state=
-
-org_eclipse_swt_internal_gtk_GdkEventExpose=
-GdkEventExpose_window=cast=(GdkWindow *)
-GdkEventExpose_send_event=cast=(gint8)
-GdkEventExpose_area_x=accessor=area.x
-GdkEventExpose_area_y=accessor=area.y
-GdkEventExpose_area_width=accessor=area.width
-GdkEventExpose_area_height=accessor=area.height
-GdkEventExpose_region=cast=(GdkRegion *)
-GdkEventExpose_count=cast=(gint)
-
-org_eclipse_swt_internal_gtk_GdkEventFocus=
-GdkEventFocus_window=cast=(GdkWindow *)
-GdkEventFocus_send_event=cast=(gint8)
-GdkEventFocus_in=cast=(gint16)
-
-org_eclipse_swt_internal_gtk_GdkEventKey=
-GdkEventKey_window=cast=(GdkWindow *)
-GdkEventKey_send_event=cast=(gint8)
-GdkEventKey_time=cast=(guint32)
-GdkEventKey_state=cast=(guint)
-GdkEventKey_keyval=cast=(guint)
-GdkEventKey_length=cast=(gint)
-GdkEventKey_string=cast=(gchar *)
-GdkEventKey_hardware_keycode=cast=(guint16)
-GdkEventKey_group=cast=(guint8)
-
-org_eclipse_swt_internal_gtk_GdkEventMotion=
-GdkEventMotion_window=cast=(GdkWindow *)
-GdkEventMotion_send_event=cast=(gint8)
-GdkEventMotion_time=cast=(guint32)
-GdkEventMotion_x=cast=(gdouble)
-GdkEventMotion_y=cast=(gdouble)
-GdkEventMotion_axes=cast=(gdouble *)
-GdkEventMotion_state=cast=(guint)
-GdkEventMotion_is_hint=cast=(gint16)
-GdkEventMotion_device=cast=(GdkDevice *)
-GdkEventMotion_x_root=cast=(gdouble)
-GdkEventMotion_y_root=cast=(gdouble)
-
-org_eclipse_swt_internal_gtk_GdkEventVisibility=
-GdkEventVisibility_window=cast=(GdkWindow *)
-GdkEventVisibility_send_event=cast=(gint8)
-GdkEventVisibility_state=cast=GdkVisibilityState
-
-org_eclipse_swt_internal_gtk_GdkEventWindowState=
-GdkEventWindowState_window=cast=(GdkWindow *)
-GdkEventWindowState_send_event=
-GdkEventWindowState_changed_mask=
-GdkEventWindowState_new_window_state=
-
-org_eclipse_swt_internal_gtk_GdkGCValues=
-GdkGCValues_foreground_pixel=accessor=foreground.pixel,cast=(guint32)
-GdkGCValues_foreground_red=accessor=foreground.red,cast=(guint16)
-GdkGCValues_foreground_green=accessor=foreground.green,cast=(guint16)
-GdkGCValues_foreground_blue=accessor=foreground.blue,cast=(guint16)
-GdkGCValues_background_pixel=accessor=background.pixel,cast=(guint32)
-GdkGCValues_background_red=accessor=background.red,cast=(guint16)
-GdkGCValues_background_green=accessor=background.green,cast=(guint16)
-GdkGCValues_background_blue=accessor=background.blue,cast=(guint16)
-GdkGCValues_font=cast=(GdkFont *)
-GdkGCValues_function=cast=(GdkFunction)
-GdkGCValues_fill=cast=(GdkFill)
-GdkGCValues_tile=cast=(GdkPixmap *)
-GdkGCValues_stipple=cast=(GdkPixmap *)
-GdkGCValues_clip_mask=cast=(GdkPixmap *)
-GdkGCValues_subwindow_mode=cast=(GdkSubwindowMode)
-GdkGCValues_ts_x_origin=cast=(gint)
-GdkGCValues_ts_y_origin=cast=(gint)
-GdkGCValues_clip_x_origin=cast=(gint)
-GdkGCValues_clip_y_origin=cast=(gint)
-GdkGCValues_graphics_exposures=cast=(gint)
-GdkGCValues_line_width=cast=(gint)
-GdkGCValues_line_style=cast=(GdkLineStyle)
-GdkGCValues_cap_style=cast=(GdkCapStyle)
-GdkGCValues_join_style=cast=(GdkJoinStyle)
-
-org_eclipse_swt_internal_gtk_GdkGeometry=
-GdkGeometry_min_width=
-GdkGeometry_min_height=
-GdkGeometry_max_width=
-GdkGeometry_max_height=
-GdkGeometry_base_width=
-GdkGeometry_base_height=
-GdkGeometry_width_inc=
-GdkGeometry_height_inc=
-GdkGeometry_min_aspect=
-GdkGeometry_max_aspect=
-GdkGeometry_win_gravity=
-
-org_eclipse_swt_internal_gtk_GdkImage=
-GdkImage_type=cast=(GdkImageType)
-GdkImage_visual=cast=(GdkVisual *)
-GdkImage_byte_order=cast=(GdkByteOrder)
-GdkImage_width=cast=(gint)
-GdkImage_height=cast=(gint)
-GdkImage_depth=cast=(guint16)
-GdkImage_bpp=cast=(guint16)
-GdkImage_bpl=cast=(guint16)
-GdkImage_bits_per_pixel=cast=(guint16)
-GdkImage_mem=cast=(gpointer)
-GdkImage_colormap=cast=(GdkColormap *)
-GdkImage_windowing_data=cast=(gpointer)
-
-org_eclipse_swt_internal_gtk_GdkRectangle=
-GdkRectangle_x=cast=(gint)
-GdkRectangle_y=cast=(gint)
-GdkRectangle_width=cast=(gint)
-GdkRectangle_height=cast=(gint)
-
-org_eclipse_swt_internal_gtk_GdkVisual=
-GdkVisual_type=cast=(GdkVisualType)
-GdkVisual_depth=cast=(gint)
-GdkVisual_byte_order=cast=(GdkByteOrder)
-GdkVisual_colormap_size=cast=(gint)
-GdkVisual_bits_per_rgb=cast=(gint)
-GdkVisual_red_mask=cast=(guint32)
-GdkVisual_red_shift=cast=(gint)
-GdkVisual_red_prec=cast=(gint)
-GdkVisual_green_mask=cast=(guint32)
-GdkVisual_green_shift=cast=(gint)
-GdkVisual_green_prec=cast=(gint)
-GdkVisual_blue_mask=cast=(guint32)
-GdkVisual_blue_shift=cast=(gint)
-GdkVisual_blue_prec=cast=(gint)
-
-org_eclipse_swt_internal_gtk_GdkWindowAttr=
-GdkWindowAttr_title=cast=gchar *
-GdkWindowAttr_event_mask=
-GdkWindowAttr_x=
-GdkWindowAttr_y=
-GdkWindowAttr_width=
-GdkWindowAttr_height=
-GdkWindowAttr_wclass=
-GdkWindowAttr_visual=cast=GdkVisual *
-GdkWindowAttr_colormap=cast=GdkColormap *
-GdkWindowAttr_window_type=
-GdkWindowAttr_cursor=cast=GdkCursor *
-GdkWindowAttr_wmclass_name=cast=gchar *
-GdkWindowAttr_wmclass_class=cast=gchar *
-GdkWindowAttr_override_redirect=
-
-org_eclipse_swt_internal_gtk_GtkAdjustment=
-GtkAdjustment_lower=cast=(gdouble)
-GtkAdjustment_upper=cast=(gdouble)
-GtkAdjustment_value=cast=(gdouble)
-GtkAdjustment_step_increment=cast=(gdouble)
-GtkAdjustment_page_increment=cast=(gdouble)
-GtkAdjustment_page_size=cast=(gdouble)
-
-org_eclipse_swt_internal_gtk_GtkAllocation=
-GtkAllocation_x=
-GtkAllocation_y=
-GtkAllocation_width=
-GtkAllocation_height=
-
-org_eclipse_swt_internal_gtk_GtkBorder=
-GtkBorder_left=
-GtkBorder_right=
-GtkBorder_top=
-GtkBorder_bottom=
-
-org_eclipse_swt_internal_gtk_GtkColorSelectionDialog=
-GtkColorSelectionDialog_colorsel=cast=(GtkWidget *)
-GtkColorSelectionDialog_ok_button=cast=(GtkWidget *)
-GtkColorSelectionDialog_cancel_button=cast=(GtkWidget *)
-GtkColorSelectionDialog_help_button=cast=(GtkWidget *)
-
-org_eclipse_swt_internal_gtk_GtkCombo=
-GtkCombo_entry=cast=(GtkWidget *)
-GtkCombo_list=cast=(GtkWidget *)
-
-org_eclipse_swt_internal_gtk_GtkFileSelection=
-GtkFileSelection_dir_list=cast=(GtkWidget *)
-GtkFileSelection_file_list=cast=(GtkWidget *)
-GtkFileSelection_selection_entry=cast=(GtkWidget *)
-GtkFileSelection_selection_text=cast=(GtkWidget *)
-GtkFileSelection_main_vbox=cast=(GtkWidget *)
-GtkFileSelection_ok_button=cast=(GtkWidget *)
-GtkFileSelection_cancel_button=cast=(GtkWidget *)
-GtkFileSelection_help_button=cast=(GtkWidget *)
-GtkFileSelection_history_pulldown=cast=(GtkWidget *)
-GtkFileSelection_history_menu=cast=(GtkWidget *)
-GtkFileSelection_history_list=cast=(GList *)
-GtkFileSelection_fileop_dialog=cast=(GtkWidget *)
-GtkFileSelection_fileop_entry=cast=(GtkWidget *)
-GtkFileSelection_fileop_file=cast=(gchar *)
-GtkFileSelection_cmpl_state=cast=(gpointer)
-GtkFileSelection_fileop_c_dir=cast=(GtkWidget *)
-GtkFileSelection_fileop_del_file=cast=(GtkWidget *)
-GtkFileSelection_fileop_ren_file=cast=(GtkWidget *)
-GtkFileSelection_button_area=cast=(GtkWidget *)
-GtkFileSelection_action_area=cast=(GtkWidget *)
-
-org_eclipse_swt_internal_gtk_GtkFixed=
-GtkFixed_children=cast=(GList *)
-
-org_eclipse_swt_internal_gtk_GtkRequisition=
-GtkRequisition_width=
-GtkRequisition_height=
-
-org_eclipse_swt_internal_gtk_GtkSelectionData=
-GtkSelectionData_selection=cast=(GdkAtom)
-GtkSelectionData_target=cast=(GdkAtom)
-GtkSelectionData_type=cast=(GdkAtom)
-GtkSelectionData_format=cast=(gint)
-GtkSelectionData_data=cast=(guchar *)
-GtkSelectionData_length=cast=(gint)
-
-org_eclipse_swt_internal_gtk_GtkTargetEntry=
-GtkTargetEntry_target=cast=(gchar *)
-GtkTargetEntry_flags=cast=(guint)
-GtkTargetEntry_info=cast=(guint)
-
-org_eclipse_swt_internal_gtk_GtkTargetPair=
-GtkTargetPair_target=cast=(GdkAtom)
-GtkTargetPair_flags=cast=(guint)
-GtkTargetPair_info=cast=(guint)
-
-org_eclipse_swt_internal_gtk_GtkWidgetClass=
-GtkWidgetClass_activate_signal=
-GtkWidgetClass_set_scroll_adjustments_signal=
-GtkWidgetClass_dispatch_child_properties_changed=cast=(void(*)())
-GtkWidgetClass_show=cast=(void(*)())
-GtkWidgetClass_show_all=cast=(void(*)())
-GtkWidgetClass_hide=cast=(void(*)())
-GtkWidgetClass_hide_all=cast=(void(*)())
-GtkWidgetClass_map=cast=(void(*)())
-GtkWidgetClass_unmap=cast=(void(*)())
-GtkWidgetClass_realize=cast=(void(*)())
-GtkWidgetClass_unrealize=cast=(void(*)())
-GtkWidgetClass_size_request=cast=(void(*)())
-GtkWidgetClass_size_allocate=cast=(void(*)())
-GtkWidgetClass_state_changed=cast=(void(*)())
-GtkWidgetClass_parent_set=cast=(void(*)())
-GtkWidgetClass_hierarchy_changed=cast=(void(*)())
-GtkWidgetClass_style_set=cast=(void(*)())
-GtkWidgetClass_direction_changed=cast=(void(*)())
-GtkWidgetClass_grab_notify=cast=(void(*)())
-GtkWidgetClass_child_notify=cast=(void(*)())
-GtkWidgetClass_mnemonic_activate=cast=(gboolean(*)())
-GtkWidgetClass_grab_focus=cast=(void(*)())
-GtkWidgetClass_focus=cast=(gboolean(*)())
-GtkWidgetClass_event=cast=(gboolean(*)())
-GtkWidgetClass_button_press_event=cast=(gboolean(*)())
-GtkWidgetClass_button_release_event=cast=(gboolean(*)())
-GtkWidgetClass_scroll_event=cast=(gboolean(*)())
-GtkWidgetClass_motion_notify_event=cast=(gboolean(*)())
-GtkWidgetClass_delete_event=cast=(gboolean(*)())
-GtkWidgetClass_destroy_event=cast=(gboolean(*)())
-GtkWidgetClass_expose_event=cast=(gboolean(*)())
-GtkWidgetClass_key_press_event=cast=(gboolean(*)())
-GtkWidgetClass_key_release_event=cast=(gboolean(*)())
-GtkWidgetClass_enter_notify_event=cast=(gboolean(*)())
-GtkWidgetClass_leave_notify_event=cast=(gboolean(*)())
-GtkWidgetClass_configure_event=cast=(gboolean(*)())
-GtkWidgetClass_focus_in_event=cast=(gboolean(*)())
-GtkWidgetClass_focus_out_event=cast=(gboolean(*)())
-GtkWidgetClass_map_event=cast=(gboolean(*)())
-GtkWidgetClass_unmap_event=cast=(gboolean(*)())
-GtkWidgetClass_property_notify_event=cast=(gboolean(*)())
-GtkWidgetClass_selection_clear_event=cast=(gboolean(*)())
-GtkWidgetClass_selection_request_event=cast=(gboolean(*)())
-GtkWidgetClass_selection_notify_event=cast=(gboolean(*)())
-GtkWidgetClass_proximity_in_event=cast=(gboolean(*)())
-GtkWidgetClass_proximity_out_event=cast=(gboolean(*)())
-GtkWidgetClass_visibility_notify_event=cast=(gboolean(*)())
-GtkWidgetClass_client_event=cast=(gboolean(*)())
-GtkWidgetClass_no_expose_event=cast=(gboolean(*)())
-GtkWidgetClass_window_state_event=cast=(gboolean(*)())
-GtkWidgetClass_selection_get=cast=(void(*)())
-GtkWidgetClass_selection_received=cast=(void(*)())
-GtkWidgetClass_drag_begin=cast=(void(*)())
-GtkWidgetClass_drag_end=cast=(void(*)())
-GtkWidgetClass_drag_data_get=cast=(void(*)())
-GtkWidgetClass_drag_data_delete=cast=(void(*)())
-GtkWidgetClass_drag_leave=cast=(void(*)())
-GtkWidgetClass_drag_motion=cast=(gboolean(*)())
-GtkWidgetClass_drag_drop=cast=(gboolean(*)())
-GtkWidgetClass_drag_data_received=cast=(void(*)())
-GtkWidgetClass_popup_menu=cast=(gboolean(*)())
-GtkWidgetClass_show_help=cast=(gboolean(*)())
-GtkWidgetClass_get_accessible=cast=(AtkObject*(*)())
-GtkWidgetClass_screen_changed=cast=(void(*)())
-
-org_eclipse_swt_internal_gtk_LONG=flags=no_gen
-LONG_value=
-
-org_eclipse_swt_internal_gtk_OS=
-OS_GDK_DISPLAY=
-
-OS_GDK_PIXMAP_XID=
-OS_GDK_PIXMAP_XID_0=cast=GdkPixmap *
-
-OS_GDK_ROOT_PARENT=
-
-OS_GDK_TYPE_COLOR=flags=const
-
-OS_GDK_TYPE_PIXBUF=flags=const
-
-OS_GDK_WINDOWING_X11=flags=no_gen
-
-OS_GInterfaceInfo_sizeof=
-
-OS_GTK_ACCEL_LABEL_GET_ACCEL_STRING=
-OS_GTK_ACCEL_LABEL_GET_ACCEL_STRING_0=cast=(GtkAccelLabel *)
-
-OS_GTK_ACCEL_LABEL_SET_ACCEL_STRING=
-OS_GTK_ACCEL_LABEL_SET_ACCEL_STRING_0=cast=(GtkAccelLabel *)
-OS_GTK_ACCEL_LABEL_SET_ACCEL_STRING_1=cast=(gchar *)
-
-OS_GTK_ENTRY_IM_CONTEXT=
-OS_GTK_ENTRY_IM_CONTEXT_0=cast=(GtkEntry *)
-
-OS_GTK_IS_BUTTON=
-OS_GTK_IS_BUTTON_0=
-
-OS_GTK_IS_CELL_RENDERER_PIXBUF=
-OS_GTK_IS_CELL_RENDERER_PIXBUF_0=
-
-OS_GTK_IS_IMAGE_MENU_ITEM=
-OS_GTK_IS_IMAGE_MENU_ITEM_0=
-
-OS_GTK_SCROLLED_WINDOW_HSCROLLBAR=
-OS_GTK_SCROLLED_WINDOW_HSCROLLBAR_0=cast=(GtkScrolledWindow *)
-
-OS_GTK_SCROLLED_WINDOW_SCROLLBAR_SPACING=
-OS_GTK_SCROLLED_WINDOW_SCROLLBAR_SPACING_0=cast=(GtkScrolledWindow *)
-
-OS_GTK_SCROLLED_WINDOW_VSCROLLBAR=
-OS_GTK_SCROLLED_WINDOW_VSCROLLBAR_0=cast=(GtkScrolledWindow *)
-
-OS_GTK_TEXTVIEW_IM_CONTEXT=
-OS_GTK_TEXTVIEW_IM_CONTEXT_0=cast=(GtkTextView *)
-
-OS_GTK_TYPE_FIXED=flags=const
-
-OS_GTK_WIDGET_FLAGS=
-OS_GTK_WIDGET_FLAGS_0=
-
-OS_GTK_WIDGET_HAS_DEFAULT=
-OS_GTK_WIDGET_HAS_DEFAULT_0=
-
-OS_GTK_WIDGET_HAS_FOCUS=
-OS_GTK_WIDGET_HAS_FOCUS_0=
-
-OS_GTK_WIDGET_HEIGHT=
-OS_GTK_WIDGET_HEIGHT_0=cast=(GtkWidget *)
-
-OS_GTK_WIDGET_IS_SENSITIVE=
-OS_GTK_WIDGET_IS_SENSITIVE_0=
-
-OS_GTK_WIDGET_MAPPED=
-OS_GTK_WIDGET_MAPPED_0=
-
-OS_GTK_WIDGET_SENSITIVE=
-OS_GTK_WIDGET_SENSITIVE_0=
-
-OS_GTK_WIDGET_SET_FLAGS=
-OS_GTK_WIDGET_SET_FLAGS_0=
-OS_GTK_WIDGET_SET_FLAGS_1=
-
-OS_GTK_WIDGET_UNSET_FLAGS=
-OS_GTK_WIDGET_UNSET_FLAGS_0=
-OS_GTK_WIDGET_UNSET_FLAGS_1=
-
-OS_GTK_WIDGET_VISIBLE=
-OS_GTK_WIDGET_VISIBLE_0=
-
-OS_GTK_WIDGET_WIDTH=
-OS_GTK_WIDGET_WIDTH_0=cast=(GtkWidget *)
-
-OS_GTK_WIDGET_WINDOW=
-OS_GTK_WIDGET_WINDOW_0=cast=(GtkWidget *)
-
-OS_GTK_WIDGET_X=
-OS_GTK_WIDGET_X_0=cast=(GtkWidget *)
-
-OS_GTK_WIDGET_Y=
-OS_GTK_WIDGET_Y_0=cast=(GtkWidget *)
-
-OS_GTypeInfo_sizeof=
-
-OS_GTypeQuery_sizeof=
-
-OS_G_OBJECT_CLASS=
-OS_G_OBJECT_CLASS_0=
-
-OS_G_OBJECT_GET_CLASS=
-OS_G_OBJECT_GET_CLASS_0=
-
-OS_G_OBJECT_TYPE=
-OS_G_OBJECT_TYPE_0=
-
-OS_G_TYPE_BOOLEAN=flags=const
-
-OS_G_TYPE_INT=flags=const
-
-OS_G_TYPE_STRING=flags=const
-
-OS_GdkColor_sizeof=
-
-OS_GdkDragContext_sizeof=
-
-OS_GdkEventButton_sizeof=
-
-OS_GdkEventCrossing_sizeof=
-
-OS_GdkEventExpose_sizeof=
-
-OS_GdkEventFocus_sizeof=
-
-OS_GdkEventKey_sizeof=
-
-OS_GdkEventMotion_sizeof=
-
-OS_GdkEventVisibility_sizeof=
-
-OS_GdkEventWindowState_sizeof=
-
-OS_GdkEvent_sizeof=
-
-OS_GdkGCValues_sizeof=
-
-OS_GdkGeometry_sizeof=
-
-OS_GdkImage_sizeof=
-
-OS_GdkRectangle_sizeof=
-
-OS_GdkVisual_sizeof=
-
-OS_GdkWindowAttr_sizeof=
-
-OS_GtkAdjustment_sizeof=
-
-OS_GtkAllocation_sizeof=
-
-OS_GtkBorder_sizeof=
-
-OS_GtkColorSelectionDialog_sizeof=
-
-OS_GtkCombo_sizeof=
-
-OS_GtkFileSelection_sizeof=
-
-OS_GtkFixedClass_sizeof=
-
-OS_GtkFixed_sizeof=
-
-OS_GtkRequisition_sizeof=
-
-OS_GtkSelectionData_sizeof=
-
-OS_GtkTargetEntry_sizeof=
-
-OS_GtkTargetPair_sizeof=
-
-OS_GtkTextIter_sizeof=
-
-OS_GtkTreeIter_sizeof=
-
-OS_PANGO_PIXELS=
-OS_PANGO_PIXELS_0=
-
-OS_PANGO_TYPE_FONT_DESCRIPTION=flags=const
-
-OS_PTR_sizeof=
-
-OS_PangoAttribute_sizeof=
-
-OS_PangoItem_sizeof=
-
-OS_PangoLayoutLine_sizeof=
-
-OS_PangoLayoutRun_sizeof=
-
-OS_PangoLogAttr_sizeof=
-
-OS_PangoRectangle_sizeof=
-
-OS_XAnyEvent_sizeof=
-
-OS_XCheckIfEvent=
-OS_XCheckIfEvent_0=cast=(Display *)
-OS_XCheckIfEvent_1=cast=XEvent *
-OS_XCheckIfEvent_2=cast=(Bool (*)())
-OS_XCheckIfEvent_3=cast=(XPointer)
-
-OS_XCheckMaskEvent=
-OS_XCheckMaskEvent_0=cast=(Display *)
-OS_XCheckMaskEvent_1=cast=(long)
-OS_XCheckMaskEvent_2=cast=(XEvent *)
-
-OS_XCheckWindowEvent=
-OS_XCheckWindowEvent_0=cast=(Display *)
-OS_XCheckWindowEvent_1=cast=Window
-OS_XCheckWindowEvent_2=cast=(long)
-OS_XCheckWindowEvent_3=cast=(XEvent *)
-
-OS_XClientMessageEvent_sizeof=
-
-OS_XCrossingEvent_sizeof=
-
-OS_XDefaultRootWindow=
-OS_XDefaultRootWindow_0=cast=Display *
-
-OS_XDefaultScreen=
-OS_XDefaultScreen_0=cast=Display *
-
-OS_XEvent_sizeof=
-
-OS_XExposeEvent_sizeof=
-
-OS_XFocusChangeEvent_sizeof=
-
-OS_XFree=
-OS_XFree_0=cast=void *
-
-OS_XGetSelectionOwner=
-OS_XGetSelectionOwner_0=cast=(Display *)
-OS_XGetSelectionOwner_1=cast=(Atom)
-
-OS_XInternAtom=
-OS_XInternAtom_0=cast=Display *
-OS_XInternAtom_1=cast=char *
-OS_XInternAtom_2=cast=Bool
-
-OS_XKeysymToKeycode=
-OS_XKeysymToKeycode_0=cast=Display *
-OS_XKeysymToKeycode_1=cast=KeySym
-
-OS_XListProperties=
-OS_XListProperties_0=cast=Display *
-OS_XListProperties_1=cast=Window
-OS_XListProperties_2=cast=int *
-
-OS_XQueryTree=
-OS_XQueryTree_0=cast=Display *
-OS_XQueryTree_1=cast=Window
-OS_XQueryTree_2=cast=Window *
-OS_XQueryTree_3=cast=Window *
-OS_XQueryTree_4=cast=Window **
-OS_XQueryTree_5=cast=unsigned int *
-
-OS_XReconfigureWMWindow=
-OS_XReconfigureWMWindow_0=cast=Display *
-OS_XReconfigureWMWindow_1=cast=(Window)
-OS_XReconfigureWMWindow_2=
-OS_XReconfigureWMWindow_3=
-OS_XReconfigureWMWindow_4=
-
-OS_XSendEvent=
-OS_XSendEvent_0=cast=(Display *)
-OS_XSendEvent_1=cast=(Window)
-OS_XSendEvent_2=
-OS_XSendEvent_3=
-OS_XSendEvent_4=cast=(XEvent *)
-
-OS_XSetInputFocus=
-OS_XSetInputFocus_0=cast=Display *
-OS_XSetInputFocus_1=cast=Window
-OS_XSetInputFocus_2=
-OS_XSetInputFocus_3=
-
-OS_XSynchronize=
-OS_XSynchronize_0=cast=(Display *)
-OS_XSynchronize_1=
-
-OS_XTestFakeButtonEvent=
-OS_XTestFakeButtonEvent_0=cast=Display *
-OS_XTestFakeButtonEvent_1=
-OS_XTestFakeButtonEvent_2=cast=Bool
-OS_XTestFakeButtonEvent_3=cast=(unsigned long)
-
-OS_XTestFakeKeyEvent=
-OS_XTestFakeKeyEvent_0=cast=Display *
-OS_XTestFakeKeyEvent_1=
-OS_XTestFakeKeyEvent_2=cast=Bool
-OS_XTestFakeKeyEvent_3=cast=unsigned long
-
-OS_XTestFakeMotionEvent=
-OS_XTestFakeMotionEvent_0=cast=Display *
-OS_XTestFakeMotionEvent_1=
-OS_XTestFakeMotionEvent_2=
-OS_XTestFakeMotionEvent_3=
-OS_XTestFakeMotionEvent_4=cast=unsigned long
-
-OS_XVisibilityEvent_sizeof=
-
-OS_XWarpPointer=
-OS_XWarpPointer_0=cast=Display *
-OS_XWarpPointer_1=cast=Window
-OS_XWarpPointer_2=cast=Window
-OS_XWarpPointer_3=
-OS_XWarpPointer_4=
-OS_XWarpPointer_5=
-OS_XWarpPointer_6=
-OS_XWarpPointer_7=
-OS_XWarpPointer_8=
-
-OS_XWindowChanges_sizeof=
-
-OS_g_filename_from_uri=
-OS_g_filename_from_uri_0=cast=(const char *)
-OS_g_filename_from_uri_1=cast=(char **)
-OS_g_filename_from_uri_2=cast=(GError **)
-
-OS_g_filename_from_utf8=
-OS_g_filename_from_utf8_0=cast=(const gchar *)
-OS_g_filename_from_utf8_1=cast=(gssize)
-OS_g_filename_from_utf8_2=cast=(gsize *)
-OS_g_filename_from_utf8_3=cast=(gsize *)
-OS_g_filename_from_utf8_4=cast=(GError **)
-
-OS_g_filename_to_uri=
-OS_g_filename_to_uri_0=cast=(const char *)
-OS_g_filename_to_uri_1=cast=(const char *)
-OS_g_filename_to_uri_2=cast=(GError **)
-
-OS_g_filename_to_utf8=
-OS_g_filename_to_utf8_0=cast=(const gchar *)
-OS_g_filename_to_utf8_1=cast=(gssize)
-OS_g_filename_to_utf8_2=cast=(gsize *)
-OS_g_filename_to_utf8_3=cast=(gsize *)
-OS_g_filename_to_utf8_4=cast=(GError **)
-
-OS_g_free=
-OS_g_free_0=cast=(gpointer)
-
-OS_g_list_append=
-OS_g_list_append_0=cast=(GList *)
-OS_g_list_append_1=cast=(gpointer)
-
-OS_g_list_data=
-OS_g_list_data_0=cast=(GList *)
-
-OS_g_list_free=
-OS_g_list_free_0=cast=(GList *)
-
-OS_g_list_free_1=
-OS_g_list_free_1_0=cast=(GList *)
-
-OS_g_list_length=
-OS_g_list_length_0=cast=(GList *)
-
-OS_g_list_next=
-OS_g_list_next_0=
-
-OS_g_list_nth=
-OS_g_list_nth_0=cast=(GList *)
-OS_g_list_nth_1=cast=(guint)
-
-OS_g_list_nth_data=
-OS_g_list_nth_data_0=cast=(GList *)
-OS_g_list_nth_data_1=cast=(guint)
-
-OS_g_list_prepend=
-OS_g_list_prepend_0=cast=(GList *)
-OS_g_list_prepend_1=cast=(gpointer)
-
-OS_g_list_previous=
-OS_g_list_previous_0=
-
-OS_g_list_remove_link=
-OS_g_list_remove_link_0=cast=(GList *)
-OS_g_list_remove_link_1=cast=(GList *)
-
-OS_g_list_reverse=
-OS_g_list_reverse_0=cast=(GList *)
-
-OS_g_list_set_next=
-OS_g_list_set_next_0=cast=(GList *)
-OS_g_list_set_next_1=cast=(GList *)
-
-OS_g_list_set_previous=
-OS_g_list_set_previous_0=cast=(GList *)
-OS_g_list_set_previous_1=cast=(GList *)
-
-OS_g_locale_from_utf8=
-OS_g_locale_from_utf8_0=cast=(const gchar *)
-OS_g_locale_from_utf8_1=cast=(gssize)
-OS_g_locale_from_utf8_2=cast=(gsize *)
-OS_g_locale_from_utf8_3=cast=(gsize *)
-OS_g_locale_from_utf8_4=cast=(GError **)
-
-OS_g_locale_to_utf8=
-OS_g_locale_to_utf8_0=cast=(const gchar *)
-OS_g_locale_to_utf8_1=cast=(gssize)
-OS_g_locale_to_utf8_2=cast=(gsize *)
-OS_g_locale_to_utf8_3=cast=(gsize *)
-OS_g_locale_to_utf8_4=cast=(GError **)
-
-OS_g_log_default_handler=
-OS_g_log_default_handler_0=cast=(gchar *)
-OS_g_log_default_handler_1=cast=(GLogLevelFlags)
-OS_g_log_default_handler_2=cast=(gchar *)
-OS_g_log_default_handler_3=cast=(gpointer)
-
-OS_g_log_remove_handler=
-OS_g_log_remove_handler_0=cast=(gchar *),flags=no_out
-OS_g_log_remove_handler_1=cast=(gint)
-
-OS_g_log_set_handler=
-OS_g_log_set_handler_0=cast=(gchar *),flags=no_out
-OS_g_log_set_handler_1=cast=(GLogLevelFlags)
-OS_g_log_set_handler_2=cast=(GLogFunc)
-OS_g_log_set_handler_3=cast=(gpointer)
-
-OS_g_malloc=
-OS_g_malloc_0=cast=(gulong)
-
-OS_g_object_get=
-OS_g_object_get_0=cast=GObject *
-OS_g_object_get_1=cast=(const gchar *),flags=no_out
-OS_g_object_get_2=
-OS_g_object_get_3=
-
-OS_g_object_get_qdata=
-OS_g_object_get_qdata_0=cast=(GObject *)
-OS_g_object_get_qdata_1=cast=(GQuark)
-
-OS_g_object_new=
-OS_g_object_new_0=cast=(GType)
-OS_g_object_new_1=cast=(const gchar *)
-
-OS_g_object_ref=
-OS_g_object_ref_0=cast=(gpointer)
-
-OS_g_1object_1set__I_3BFI=
-OS_g_1object_1set__I_3BFI_0=cast=(gpointer)
-OS_g_1object_1set__I_3BFI_1=cast=(const gchar *),flags=no_out
-OS_g_1object_1set__I_3BFI_2=
-OS_g_1object_1set__I_3BFI_3=
-
-OS_g_1object_1set__I_3BII=
-OS_g_1object_1set__I_3BII_0=cast=(gpointer)
-OS_g_1object_1set__I_3BII_1=cast=(const gchar *),flags=no_out
-OS_g_1object_1set__I_3BII_2=
-OS_g_1object_1set__I_3BII_3=
-
-OS_g_1object_1set__I_3BZI=
-OS_g_1object_1set__I_3BZI_0=cast=(gpointer)
-OS_g_1object_1set__I_3BZI_1=cast=(const gchar *),flags=no_out
-OS_g_1object_1set__I_3BZI_2=
-OS_g_1object_1set__I_3BZI_3=
-
-OS_g_object_set_qdata=
-OS_g_object_set_qdata_0=cast=(GObject *)
-OS_g_object_set_qdata_1=cast=(GQuark)
-OS_g_object_set_qdata_2=cast=(gpointer)
-
-OS_g_object_unref=
-OS_g_object_unref_0=cast=(gpointer)
-
-OS_g_quark_from_string=
-OS_g_quark_from_string_0=cast=const gchar *,flags=no_out
-
-OS_g_signal_connect=
-OS_g_signal_connect_0=cast=(gpointer)
-OS_g_signal_connect_1=cast=(const gchar *),flags=no_out
-OS_g_signal_connect_2=cast=(GCallback)
-OS_g_signal_connect_3=cast=(gpointer)
-
-OS_g_signal_connect_after=
-OS_g_signal_connect_after_0=cast=(gpointer)
-OS_g_signal_connect_after_1=cast=(const gchar *),flags=no_out
-OS_g_signal_connect_after_2=cast=(GCallback)
-OS_g_signal_connect_after_3=cast=(gpointer)
-
-OS_g_1signal_1emit_1by_1name__I_3B=
-OS_g_1signal_1emit_1by_1name__I_3B_0=cast=(gpointer)
-OS_g_1signal_1emit_1by_1name__I_3B_1=cast=(const gchar *),flags=no_out
-
-OS_g_1signal_1emit_1by_1name__I_3BI=
-OS_g_1signal_1emit_1by_1name__I_3BI_0=cast=(gpointer)
-OS_g_1signal_1emit_1by_1name__I_3BI_1=cast=(const gchar *),flags=no_out
-OS_g_1signal_1emit_1by_1name__I_3BI_2=
-
-OS_g_1signal_1emit_1by_1name__I_3BII=
-OS_g_1signal_1emit_1by_1name__I_3BII_0=cast=(gpointer)
-OS_g_1signal_1emit_1by_1name__I_3BII_1=cast=(const gchar *),flags=no_out
-OS_g_1signal_1emit_1by_1name__I_3BII_2=
-OS_g_1signal_1emit_1by_1name__I_3BII_3=
-
-OS_g_1signal_1emit_1by_1name__I_3B_3B=
-OS_g_1signal_1emit_1by_1name__I_3B_3B_0=cast=(gpointer)
-OS_g_1signal_1emit_1by_1name__I_3B_3B_1=cast=(const gchar *),flags=no_out
-OS_g_1signal_1emit_1by_1name__I_3B_3B_2=
-
-OS_g_signal_handler_disconnect=
-OS_g_signal_handler_disconnect_0=cast=(gpointer)
-OS_g_signal_handler_disconnect_1=cast=(gulong)
-
-OS_g_signal_handlers_block_matched=
-OS_g_signal_handlers_block_matched_0=cast=(gpointer)
-OS_g_signal_handlers_block_matched_1=cast=(GSignalMatchType)
-OS_g_signal_handlers_block_matched_2=cast=(guint)
-OS_g_signal_handlers_block_matched_3=cast=(GQuark)
-OS_g_signal_handlers_block_matched_4=cast=(GClosure *)
-OS_g_signal_handlers_block_matched_5=cast=(gpointer)
-OS_g_signal_handlers_block_matched_6=cast=(gpointer)
-
-OS_g_signal_handlers_disconnect_matched=
-OS_g_signal_handlers_disconnect_matched_0=cast=(gpointer)
-OS_g_signal_handlers_disconnect_matched_1=cast=(GSignalMatchType)
-OS_g_signal_handlers_disconnect_matched_2=cast=(guint)
-OS_g_signal_handlers_disconnect_matched_3=cast=(GQuark)
-OS_g_signal_handlers_disconnect_matched_4=cast=(GClosure *)
-OS_g_signal_handlers_disconnect_matched_5=cast=(gpointer)
-OS_g_signal_handlers_disconnect_matched_6=cast=(gpointer)
-
-OS_g_signal_handlers_unblock_matched=
-OS_g_signal_handlers_unblock_matched_0=cast=(gpointer)
-OS_g_signal_handlers_unblock_matched_1=cast=(GSignalMatchType)
-OS_g_signal_handlers_unblock_matched_2=cast=(guint)
-OS_g_signal_handlers_unblock_matched_3=cast=(GQuark)
-OS_g_signal_handlers_unblock_matched_4=cast=(GClosure *)
-OS_g_signal_handlers_unblock_matched_5=cast=(gpointer)
-OS_g_signal_handlers_unblock_matched_6=cast=(gpointer)
-
-OS_g_signal_lookup=
-OS_g_signal_lookup_0=cast=const gchar *,flags=no_out
-OS_g_signal_lookup_1=
-
-OS_g_signal_stop_emission_by_name=
-OS_g_signal_stop_emission_by_name_0=cast=(gpointer)
-OS_g_signal_stop_emission_by_name_1=cast=(const gchar *),flags=no_out
-
-OS_g_slist_data=
-OS_g_slist_data_0=cast=GSList *
-
-OS_g_slist_next=
-OS_g_slist_next_0=cast=GSList *
-
-OS_g_strfreev=
-OS_g_strfreev_0=cast=(gchar **)
-
-OS_g_type_add_interface_static=
-OS_g_type_add_interface_static_0=cast=(GType)
-OS_g_type_add_interface_static_1=cast=(GType)
-OS_g_type_add_interface_static_2=cast=(const GInterfaceInfo *)
-
-OS_g_type_class_peek=
-OS_g_type_class_peek_0=cast=(GType)
-
-OS_g_type_class_peek_parent=
-OS_g_type_class_peek_parent_0=cast=(gpointer)
-
-OS_g_type_from_name=
-OS_g_type_from_name_0=
-
-OS_g_type_interface_peek_parent=
-OS_g_type_interface_peek_parent_0=cast=(gpointer)
-
-OS_g_type_is_a=
-OS_g_type_is_a_0=cast=(GType)
-OS_g_type_is_a_1=cast=(GType)
-
-OS_g_type_name=
-OS_g_type_name_0=cast=(GType)
-
-OS_g_type_parent=
-OS_g_type_parent_0=cast=(GType)
-
-OS_g_type_query=
-OS_g_type_query_0=cast=(GType)
-OS_g_type_query_1=cast=(GTypeQuery *)
-
-OS_g_type_register_static=
-OS_g_type_register_static_0=cast=(GType)
-OS_g_type_register_static_1=
-OS_g_type_register_static_2=cast=(const GTypeInfo *)
-OS_g_type_register_static_3=cast=(GTypeFlags)
-
-OS_g_utf16_to_utf8=
-OS_g_utf16_to_utf8_0=cast=(const gunichar2 *),flags=no_out critical
-OS_g_utf16_to_utf8_1=cast=(glong)
-OS_g_utf16_to_utf8_2=cast=(glong *),flags=critical
-OS_g_utf16_to_utf8_3=cast=(glong *),flags=critical
-OS_g_utf16_to_utf8_4=cast=(GError **),flags=critical
-
-OS_g_utf8_offset_to_pointer=
-OS_g_utf8_offset_to_pointer_0=cast=const gchar *
-OS_g_utf8_offset_to_pointer_1=
-
-OS_g_utf8_pointer_to_offset=
-OS_g_utf8_pointer_to_offset_0=cast=const gchar *
-OS_g_utf8_pointer_to_offset_1=cast=const gchar *
-
-OS_g_utf8_strlen=
-OS_g_utf8_strlen_0=cast=const gchar *
-OS_g_utf8_strlen_1=
-
-OS_g_1utf8_1to_1utf16__II_3I_3I_3I=
-OS_g_1utf8_1to_1utf16__II_3I_3I_3I_0=cast=(const gchar *)
-OS_g_1utf8_1to_1utf16__II_3I_3I_3I_1=cast=(glong)
-OS_g_1utf8_1to_1utf16__II_3I_3I_3I_2=cast=(glong *),flags=critical
-OS_g_1utf8_1to_1utf16__II_3I_3I_3I_3=cast=(glong *),flags=critical
-OS_g_1utf8_1to_1utf16__II_3I_3I_3I_4=cast=(GError **),flags=critical
-
-OS_g_1utf8_1to_1utf16___3BI_3I_3I_3I=
-OS_g_1utf8_1to_1utf16___3BI_3I_3I_3I_0=cast=(const gchar *),flags=no_out critical
-OS_g_1utf8_1to_1utf16___3BI_3I_3I_3I_1=cast=(glong)
-OS_g_1utf8_1to_1utf16___3BI_3I_3I_3I_2=cast=(glong *),flags=critical
-OS_g_1utf8_1to_1utf16___3BI_3I_3I_3I_3=cast=(glong *),flags=critical
-OS_g_1utf8_1to_1utf16___3BI_3I_3I_3I_4=cast=(GError **),flags=critical
-
-OS_gdk_atom_intern=
-OS_gdk_atom_intern_0=cast=(const gchar *),flags=no_out critical
-OS_gdk_atom_intern_1=
-
-OS_gdk_atom_name=
-OS_gdk_atom_name_0=cast=(GdkAtom)
-
-OS_gdk_beep=
-
-OS_gdk_bitmap_create_from_data=
-OS_gdk_bitmap_create_from_data_0=cast=(GdkWindow *)
-OS_gdk_bitmap_create_from_data_1=cast=(const gchar *),flags=no_out critical
-OS_gdk_bitmap_create_from_data_2=cast=(gint)
-OS_gdk_bitmap_create_from_data_3=cast=(gint)
-
-OS_gdk_color_white=
-OS_gdk_color_white_0=cast=(GdkColormap *)
-OS_gdk_color_white_1=cast=(GdkColor *),flags=no_in
-
-OS_gdk_colormap_alloc_color=
-OS_gdk_colormap_alloc_color_0=cast=(GdkColormap *)
-OS_gdk_colormap_alloc_color_1=cast=(GdkColor *)
-OS_gdk_colormap_alloc_color_2=cast=(gboolean)
-OS_gdk_colormap_alloc_color_3=cast=(gboolean)
-
-OS_gdk_colormap_free_colors=
-OS_gdk_colormap_free_colors_0=cast=(GdkColormap *)
-OS_gdk_colormap_free_colors_1=cast=(GdkColor *)
-OS_gdk_colormap_free_colors_2=cast=(gint)
-
-OS_gdk_colormap_get_system=
-
-OS_gdk_colormap_query_color=
-OS_gdk_colormap_query_color_0=cast=(GdkColormap *)
-OS_gdk_colormap_query_color_1=cast=(gulong)
-OS_gdk_colormap_query_color_2=cast=(GdkColor *)
-
-OS_gdk_cursor_destroy=
-OS_gdk_cursor_destroy_0=cast=(GdkCursor *)
-
-OS_gdk_cursor_new=
-OS_gdk_cursor_new_0=cast=(GdkCursorType)
-
-OS_gdk_cursor_new_from_pixmap=
-OS_gdk_cursor_new_from_pixmap_0=cast=(GdkPixmap *)
-OS_gdk_cursor_new_from_pixmap_1=cast=(GdkPixmap *)
-OS_gdk_cursor_new_from_pixmap_2=cast=(GdkColor *)
-OS_gdk_cursor_new_from_pixmap_3=cast=(GdkColor *)
-OS_gdk_cursor_new_from_pixmap_4=cast=(gint)
-OS_gdk_cursor_new_from_pixmap_5=cast=(gint)
-
-OS_gdk_drag_status=
-OS_gdk_drag_status_0=cast=(GdkDragContext *)
-OS_gdk_drag_status_1=cast=(GdkDragAction)
-OS_gdk_drag_status_2=cast=(guint32)
-
-OS_gdk_draw_arc=
-OS_gdk_draw_arc_0=cast=(GdkDrawable *)
-OS_gdk_draw_arc_1=cast=(GdkGC *)
-OS_gdk_draw_arc_2=cast=(gint)
-OS_gdk_draw_arc_3=cast=(gint)
-OS_gdk_draw_arc_4=cast=(gint)
-OS_gdk_draw_arc_5=cast=(gint)
-OS_gdk_draw_arc_6=cast=(gint)
-OS_gdk_draw_arc_7=cast=(gint)
-OS_gdk_draw_arc_8=cast=(gint)
-
-OS_gdk_draw_drawable=
-OS_gdk_draw_drawable_0=cast=(GdkDrawable *)
-OS_gdk_draw_drawable_1=cast=(GdkGC *)
-OS_gdk_draw_drawable_2=cast=(GdkDrawable *)
-OS_gdk_draw_drawable_3=cast=(gint)
-OS_gdk_draw_drawable_4=cast=(gint)
-OS_gdk_draw_drawable_5=cast=(gint)
-OS_gdk_draw_drawable_6=cast=(gint)
-OS_gdk_draw_drawable_7=cast=(gint)
-OS_gdk_draw_drawable_8=cast=(gint)
-
-OS_gdk_draw_layout=
-OS_gdk_draw_layout_0=cast=(GdkDrawable *)
-OS_gdk_draw_layout_1=cast=(GdkGC *)
-OS_gdk_draw_layout_2=cast=(gint)
-OS_gdk_draw_layout_3=cast=(gint)
-OS_gdk_draw_layout_4=cast=(PangoLayout *)
-
-OS_gdk_draw_layout_with_colors=
-OS_gdk_draw_layout_with_colors_0=cast=GdkDrawable *
-OS_gdk_draw_layout_with_colors_1=cast=(GdkGC *)
-OS_gdk_draw_layout_with_colors_2=cast=(gint)
-OS_gdk_draw_layout_with_colors_3=cast=(gint)
-OS_gdk_draw_layout_with_colors_4=cast=(PangoLayout *)
-OS_gdk_draw_layout_with_colors_5=
-OS_gdk_draw_layout_with_colors_6=
-
-OS_gdk_draw_line=
-OS_gdk_draw_line_0=cast=(GdkDrawable *)
-OS_gdk_draw_line_1=cast=(GdkGC *)
-OS_gdk_draw_line_2=cast=(gint)
-OS_gdk_draw_line_3=cast=(gint)
-OS_gdk_draw_line_4=cast=(gint)
-OS_gdk_draw_line_5=cast=(gint)
-
-OS_gdk_draw_lines=
-OS_gdk_draw_lines_0=cast=(GdkDrawable *)
-OS_gdk_draw_lines_1=cast=(GdkGC *)
-OS_gdk_draw_lines_2=cast=(GdkPoint *),flags=no_out critical
-OS_gdk_draw_lines_3=cast=(gint)
-
-OS_gdk_draw_point=
-OS_gdk_draw_point_0=cast=(GdkDrawable *)
-OS_gdk_draw_point_1=cast=GdkGC *
-OS_gdk_draw_point_2=
-OS_gdk_draw_point_3=
-
-OS_gdk_draw_polygon=
-OS_gdk_draw_polygon_0=cast=(GdkDrawable *)
-OS_gdk_draw_polygon_1=cast=(GdkGC *)
-OS_gdk_draw_polygon_2=cast=(gint)
-OS_gdk_draw_polygon_3=cast=(GdkPoint *),flags=no_out critical
-OS_gdk_draw_polygon_4=cast=(gint)
-
-OS_gdk_draw_rectangle=
-OS_gdk_draw_rectangle_0=cast=(GdkDrawable *)
-OS_gdk_draw_rectangle_1=cast=(GdkGC *)
-OS_gdk_draw_rectangle_2=cast=(gint)
-OS_gdk_draw_rectangle_3=cast=(gint)
-OS_gdk_draw_rectangle_4=cast=(gint)
-OS_gdk_draw_rectangle_5=cast=(gint)
-OS_gdk_draw_rectangle_6=cast=(gint)
-
-OS_gdk_drawable_get_image=
-OS_gdk_drawable_get_image_0=cast=(GdkDrawable *)
-OS_gdk_drawable_get_image_1=cast=(gint)
-OS_gdk_drawable_get_image_2=cast=(gint)
-OS_gdk_drawable_get_image_3=cast=(gint)
-OS_gdk_drawable_get_image_4=cast=(gint)
-
-OS_gdk_drawable_get_size=
-OS_gdk_drawable_get_size_0=cast=(GdkDrawable *)
-OS_gdk_drawable_get_size_1=cast=(gint *),flags=no_in critical
-OS_gdk_drawable_get_size_2=cast=(gint *),flags=no_in critical
-
-OS_gdk_drawable_get_visible_region=
-OS_gdk_drawable_get_visible_region_0=cast=(GdkDrawable *)
-
-OS_gdk_error_trap_pop=
-
-OS_gdk_error_trap_push=
-
-OS_gdk_event_copy=
-OS_gdk_event_copy_0=cast=(GdkEvent *)
-
-OS_gdk_event_free=
-OS_gdk_event_free_0=cast=(GdkEvent *)
-
-OS_gdk_event_get=
-
-OS_gdk_event_get_coords=
-OS_gdk_event_get_coords_0=cast=(GdkEvent *)
-OS_gdk_event_get_coords_1=cast=(gdouble *)
-OS_gdk_event_get_coords_2=cast=(gdouble *)
-
-OS_gdk_event_get_graphics_expose=
-OS_gdk_event_get_graphics_expose_0=cast=(GdkWindow *)
-
-OS_gdk_event_get_root_coords=
-OS_gdk_event_get_root_coords_0=cast=(GdkEvent *)
-OS_gdk_event_get_root_coords_1=cast=(gdouble *)
-OS_gdk_event_get_root_coords_2=cast=(gdouble *)
-
-OS_gdk_event_get_state=
-OS_gdk_event_get_state_0=cast=(GdkEvent *)
-OS_gdk_event_get_state_1=cast=(GdkModifierType *)
-
-OS_gdk_event_get_time=
-OS_gdk_event_get_time_0=cast=(GdkEvent *)
-
-OS_gdk_event_handler_set=
-OS_gdk_event_handler_set_0=cast=(GdkEventFunc)
-OS_gdk_event_handler_set_1=cast=(gpointer)
-OS_gdk_event_handler_set_2=cast=(GDestroyNotify)
-
-OS_gdk_event_put=
-OS_gdk_event_put_0=cast=(GdkEvent *)
-
-OS_gdk_flush=
-
-OS_gdk_free_text_list=
-OS_gdk_free_text_list_0=cast=(gchar **)
-
-OS_gdk_gc_get_values=
-OS_gdk_gc_get_values_0=cast=(GdkGC *)
-OS_gdk_gc_get_values_1=cast=(GdkGCValues *),flags=no_in
-
-OS_gdk_gc_new=
-OS_gdk_gc_new_0=cast=(GdkDrawable *)
-
-OS_gdk_gc_set_background=
-OS_gdk_gc_set_background_0=cast=(GdkGC *)
-OS_gdk_gc_set_background_1=cast=(GdkColor *),flags=no_out
-
-OS_gdk_gc_set_clip_mask=
-OS_gdk_gc_set_clip_mask_0=cast=(GdkGC *)
-OS_gdk_gc_set_clip_mask_1=cast=(GdkBitmap *)
-
-OS_gdk_gc_set_clip_origin=
-OS_gdk_gc_set_clip_origin_0=cast=(GdkGC *)
-OS_gdk_gc_set_clip_origin_1=cast=(gint)
-OS_gdk_gc_set_clip_origin_2=cast=(gint)
-
-OS_gdk_gc_set_clip_rectangle=
-OS_gdk_gc_set_clip_rectangle_0=cast=(GdkGC *)
-OS_gdk_gc_set_clip_rectangle_1=cast=(GdkRectangle *),flags=no_out
-
-OS_gdk_gc_set_clip_region=
-OS_gdk_gc_set_clip_region_0=cast=(GdkGC *)
-OS_gdk_gc_set_clip_region_1=cast=(GdkRegion *)
-
-OS_gdk_gc_set_dashes=
-OS_gdk_gc_set_dashes_0=cast=(GdkGC *)
-OS_gdk_gc_set_dashes_1=cast=(gint)
-OS_gdk_gc_set_dashes_2=cast=(gint8 *),flags=no_out critical
-OS_gdk_gc_set_dashes_3=cast=(gint)
-
-OS_gdk_gc_set_exposures=
-OS_gdk_gc_set_exposures_0=cast=(GdkGC *)
-OS_gdk_gc_set_exposures_1=cast=(gboolean)
-
-OS_gdk_gc_set_fill=
-OS_gdk_gc_set_fill_0=cast=(GdkGC *)
-OS_gdk_gc_set_fill_1=cast=(GdkFill)
-
-OS_gdk_gc_set_foreground=
-OS_gdk_gc_set_foreground_0=cast=(GdkGC *)
-OS_gdk_gc_set_foreground_1=cast=(GdkColor *),flags=no_out
-
-OS_gdk_gc_set_function=
-OS_gdk_gc_set_function_0=cast=(GdkGC *)
-OS_gdk_gc_set_function_1=cast=(GdkFunction)
-
-OS_gdk_gc_set_line_attributes=
-OS_gdk_gc_set_line_attributes_0=cast=(GdkGC *)
-OS_gdk_gc_set_line_attributes_1=cast=(gint)
-OS_gdk_gc_set_line_attributes_2=cast=(GdkLineStyle)
-OS_gdk_gc_set_line_attributes_3=cast=(GdkCapStyle)
-OS_gdk_gc_set_line_attributes_4=cast=(GdkJoinStyle)
-
-OS_gdk_gc_set_stipple=
-OS_gdk_gc_set_stipple_0=cast=(GdkGC *)
-OS_gdk_gc_set_stipple_1=cast=(GdkPixmap *)
-
-OS_gdk_gc_set_subwindow=
-OS_gdk_gc_set_subwindow_0=cast=(GdkGC *)
-OS_gdk_gc_set_subwindow_1=cast=(GdkSubwindowMode)
-
-OS_gdk_gc_set_values=
-OS_gdk_gc_set_values_0=cast=(GdkGC *)
-OS_gdk_gc_set_values_1=cast=(GdkGCValues *),flags=no_out
-OS_gdk_gc_set_values_2=cast=(GdkGCValuesMask)
-
-OS_gdk_image_get=
-OS_gdk_image_get_0=cast=(GdkDrawable *)
-OS_gdk_image_get_1=cast=(gint)
-OS_gdk_image_get_2=cast=(gint)
-OS_gdk_image_get_3=cast=(gint)
-OS_gdk_image_get_4=cast=(gint)
-
-OS_gdk_image_get_pixel=
-OS_gdk_image_get_pixel_0=cast=(GdkImage *)
-OS_gdk_image_get_pixel_1=cast=(gint)
-OS_gdk_image_get_pixel_2=cast=(gint)
-
-OS_gdk_keyboard_ungrab=
-OS_gdk_keyboard_ungrab_0=
-
-OS_gdk_keymap_get_default=
-
-OS_gdk_keymap_translate_keyboard_state=
-OS_gdk_keymap_translate_keyboard_state_0=cast=GdkKeymap*
-OS_gdk_keymap_translate_keyboard_state_1=
-OS_gdk_keymap_translate_keyboard_state_2=cast=GdkModifierType
-OS_gdk_keymap_translate_keyboard_state_3=
-OS_gdk_keymap_translate_keyboard_state_4=cast=guint*
-OS_gdk_keymap_translate_keyboard_state_5=cast=gint*
-OS_gdk_keymap_translate_keyboard_state_6=cast=gint*
-OS_gdk_keymap_translate_keyboard_state_7=cast=GdkModifierType *
-
-OS_gdk_keyval_to_lower=
-OS_gdk_keyval_to_lower_0=
-
-OS_gdk_keyval_to_unicode=
-OS_gdk_keyval_to_unicode_0=
-
-OS_gdk_pango_context_get=
-
-OS_gdk_pango_context_set_colormap=
-OS_gdk_pango_context_set_colormap_0=cast=PangoContext *
-OS_gdk_pango_context_set_colormap_1=cast=(GdkColormap *)
-
-OS_gdk_pango_layout_get_clip_region=
-OS_gdk_pango_layout_get_clip_region_0=cast=(PangoLayout *)
-OS_gdk_pango_layout_get_clip_region_1=
-OS_gdk_pango_layout_get_clip_region_2=
-OS_gdk_pango_layout_get_clip_region_3=
-OS_gdk_pango_layout_get_clip_region_4=
-
-OS_gdk_pixbuf_get_from_drawable=
-OS_gdk_pixbuf_get_from_drawable_0=cast=(GdkPixbuf *)
-OS_gdk_pixbuf_get_from_drawable_1=cast=(GdkDrawable *)
-OS_gdk_pixbuf_get_from_drawable_2=cast=(GdkColormap *)
-OS_gdk_pixbuf_get_from_drawable_3=
-OS_gdk_pixbuf_get_from_drawable_4=
-OS_gdk_pixbuf_get_from_drawable_5=
-OS_gdk_pixbuf_get_from_drawable_6=
-OS_gdk_pixbuf_get_from_drawable_7=
-OS_gdk_pixbuf_get_from_drawable_8=
-
-OS_gdk_pixbuf_get_pixels=
-OS_gdk_pixbuf_get_pixels_0=cast=(const GdkPixbuf *)
-
-OS_gdk_pixbuf_get_rowstride=
-OS_gdk_pixbuf_get_rowstride_0=cast=(const GdkPixbuf *)
-
-OS_gdk_pixbuf_new=
-OS_gdk_pixbuf_new_0=cast=(GdkColorspace)
-OS_gdk_pixbuf_new_1=cast=(gboolean)
-OS_gdk_pixbuf_new_2=
-OS_gdk_pixbuf_new_3=
-OS_gdk_pixbuf_new_4=
-
-OS_gdk_pixbuf_render_pixmap_and_mask=
-OS_gdk_pixbuf_render_pixmap_and_mask_0=cast=(GdkPixbuf *)
-OS_gdk_pixbuf_render_pixmap_and_mask_1=cast=(GdkDrawable **)
-OS_gdk_pixbuf_render_pixmap_and_mask_2=cast=(GdkBitmap **)
-OS_gdk_pixbuf_render_pixmap_and_mask_3=
-
-OS_gdk_pixbuf_render_to_drawable=
-OS_gdk_pixbuf_render_to_drawable_0=cast=(GdkPixbuf *)
-OS_gdk_pixbuf_render_to_drawable_1=cast=(GdkDrawable *)
-OS_gdk_pixbuf_render_to_drawable_2=cast=(GdkGC *)
-OS_gdk_pixbuf_render_to_drawable_3=
-OS_gdk_pixbuf_render_to_drawable_4=
-OS_gdk_pixbuf_render_to_drawable_5=
-OS_gdk_pixbuf_render_to_drawable_6=
-OS_gdk_pixbuf_render_to_drawable_7=
-OS_gdk_pixbuf_render_to_drawable_8=
-OS_gdk_pixbuf_render_to_drawable_9=cast=(GdkRgbDither)
-OS_gdk_pixbuf_render_to_drawable_10=
-OS_gdk_pixbuf_render_to_drawable_11=
-
-OS_gdk_pixbuf_render_to_drawable_alpha=
-OS_gdk_pixbuf_render_to_drawable_alpha_0=cast=(GdkPixbuf *)
-OS_gdk_pixbuf_render_to_drawable_alpha_1=cast=(GdkDrawable *)
-OS_gdk_pixbuf_render_to_drawable_alpha_2=
-OS_gdk_pixbuf_render_to_drawable_alpha_3=
-OS_gdk_pixbuf_render_to_drawable_alpha_4=
-OS_gdk_pixbuf_render_to_drawable_alpha_5=
-OS_gdk_pixbuf_render_to_drawable_alpha_6=
-OS_gdk_pixbuf_render_to_drawable_alpha_7=
-OS_gdk_pixbuf_render_to_drawable_alpha_8=cast=(GdkPixbufAlphaMode)
-OS_gdk_pixbuf_render_to_drawable_alpha_9=
-OS_gdk_pixbuf_render_to_drawable_alpha_10=cast=(GdkRgbDither)
-OS_gdk_pixbuf_render_to_drawable_alpha_11=
-OS_gdk_pixbuf_render_to_drawable_alpha_12=
-
-OS_gdk_pixbuf_scale=
-OS_gdk_pixbuf_scale_0=cast=(const GdkPixbuf *)
-OS_gdk_pixbuf_scale_1=cast=(GdkPixbuf *)
-OS_gdk_pixbuf_scale_2=
-OS_gdk_pixbuf_scale_3=
-OS_gdk_pixbuf_scale_4=
-OS_gdk_pixbuf_scale_5=
-OS_gdk_pixbuf_scale_6=cast=(double)
-OS_gdk_pixbuf_scale_7=cast=(double)
-OS_gdk_pixbuf_scale_8=cast=(double)
-OS_gdk_pixbuf_scale_9=cast=(double)
-OS_gdk_pixbuf_scale_10=
-
-OS_gdk_pixbuf_scale_simple=
-OS_gdk_pixbuf_scale_simple_0=cast=(const GdkPixbuf *)
-OS_gdk_pixbuf_scale_simple_1=
-OS_gdk_pixbuf_scale_simple_2=
-OS_gdk_pixbuf_scale_simple_3=cast=(GdkInterpType)
-
-OS_gdk_pixmap_foreign_new=
-OS_gdk_pixmap_foreign_new_0=
-
-OS_gdk_pixmap_new=
-OS_gdk_pixmap_new_0=cast=(GdkWindow *)
-OS_gdk_pixmap_new_1=cast=(gint)
-OS_gdk_pixmap_new_2=cast=(gint)
-OS_gdk_pixmap_new_3=cast=(gint)
-
-OS_gdk_pointer_grab=
-OS_gdk_pointer_grab_0=cast=(GdkWindow *)
-OS_gdk_pointer_grab_1=cast=(gboolean)
-OS_gdk_pointer_grab_2=cast=(GdkEventMask)
-OS_gdk_pointer_grab_3=cast=(GdkWindow *)
-OS_gdk_pointer_grab_4=cast=(GdkCursor *)
-OS_gdk_pointer_grab_5=cast=(guint32)
-
-OS_gdk_pointer_is_grabbed=
-
-OS_gdk_pointer_ungrab=
-OS_gdk_pointer_ungrab_0=cast=(guint32)
-
-OS_gdk_property_get=
-OS_gdk_property_get_0=cast=(GdkWindow *)
-OS_gdk_property_get_1=cast=(GdkAtom)
-OS_gdk_property_get_2=cast=(GdkAtom)
-OS_gdk_property_get_3=
-OS_gdk_property_get_4=
-OS_gdk_property_get_5=
-OS_gdk_property_get_6=cast=(GdkAtom *)
-OS_gdk_property_get_7=cast=(gint *)
-OS_gdk_property_get_8=cast=(gint *)
-OS_gdk_property_get_9=cast=(guchar **)
-
-OS_gdk_region_destroy=
-OS_gdk_region_destroy_0=cast=(GdkRegion *)
-
-OS_gdk_region_empty=
-OS_gdk_region_empty_0=cast=(GdkRegion *)
-
-OS_gdk_region_get_clipbox=
-OS_gdk_region_get_clipbox_0=cast=(GdkRegion *)
-OS_gdk_region_get_clipbox_1=cast=(GdkRectangle *),flags=no_in
-
-OS_gdk_region_get_rectangles=
-OS_gdk_region_get_rectangles_0=cast=(GdkRegion *)
-OS_gdk_region_get_rectangles_1=cast=(GdkRectangle **)
-OS_gdk_region_get_rectangles_2=cast=(gint *)
-
-OS_gdk_region_intersect=
-OS_gdk_region_intersect_0=cast=(GdkRegion *)
-OS_gdk_region_intersect_1=cast=(GdkRegion *)
-
-OS_gdk_region_new=
-
-OS_gdk_region_offset=
-OS_gdk_region_offset_0=cast=(GdkRegion *)
-OS_gdk_region_offset_1=cast=(gint)
-OS_gdk_region_offset_2=cast=(gint)
-
-OS_gdk_region_point_in=
-OS_gdk_region_point_in_0=cast=(GdkRegion *)
-OS_gdk_region_point_in_1=cast=(gint)
-OS_gdk_region_point_in_2=cast=(gint)
-
-OS_gdk_region_polygon=
-OS_gdk_region_polygon_0=cast=(GdkPoint *)
-OS_gdk_region_polygon_1=
-OS_gdk_region_polygon_2=cast=(GdkFillRule)
-
-OS_gdk_region_rect_in=
-OS_gdk_region_rect_in_0=cast=(GdkRegion *)
-OS_gdk_region_rect_in_1=cast=(GdkRectangle *),flags=no_out
-
-OS_gdk_region_rectangle=
-OS_gdk_region_rectangle_0=
-
-OS_gdk_region_subtract=
-OS_gdk_region_subtract_0=cast=(GdkRegion *)
-OS_gdk_region_subtract_1=cast=(GdkRegion *)
-
-OS_gdk_region_union=
-OS_gdk_region_union_0=cast=(GdkRegion *)
-OS_gdk_region_union_1=cast=(GdkRegion *)
-
-OS_gdk_region_union_with_rect=
-OS_gdk_region_union_with_rect_0=cast=(GdkRegion *)
-OS_gdk_region_union_with_rect_1=cast=(GdkRectangle *),flags=no_out
-
-OS_gdk_rgb_init=
-
-OS_gdk_screen_get_default=flags=dynamic
-
-OS_gdk_screen_get_monitor_at_window=flags=dynamic
-OS_gdk_screen_get_monitor_at_window_0=cast=(GdkScreen *)
-OS_gdk_screen_get_monitor_at_window_1=cast=(GdkWindow *)
-
-OS_gdk_screen_get_monitor_geometry=flags=dynamic
-OS_gdk_screen_get_monitor_geometry_0=cast=(GdkScreen *)
-OS_gdk_screen_get_monitor_geometry_1=
-OS_gdk_screen_get_monitor_geometry_2=
-
-OS_gdk_screen_get_n_monitors=flags=dynamic
-OS_gdk_screen_get_n_monitors_0=cast=(GdkScreen *)
-
-OS_gdk_screen_get_number=flags=dynamic
-OS_gdk_screen_get_number_0=cast=(GdkScreen *)
-
-OS_gdk_screen_height=
-
-OS_gdk_screen_width=
-
-OS_gdk_screen_width_mm=
-
-OS_gdk_set_program_class=
-OS_gdk_set_program_class_0=
-
-OS_gdk_text_property_to_utf8_list=
-OS_gdk_text_property_to_utf8_list_0=cast=(GdkAtom)
-OS_gdk_text_property_to_utf8_list_1=
-OS_gdk_text_property_to_utf8_list_2=cast=(guchar *)
-OS_gdk_text_property_to_utf8_list_3=
-OS_gdk_text_property_to_utf8_list_4=cast=(gchar ***)
-
-OS_gdk_unicode_to_keyval=
-OS_gdk_unicode_to_keyval_0=
-
-OS_gdk_utf8_to_compound_text=
-OS_gdk_utf8_to_compound_text_0=cast=(const gchar *)
-OS_gdk_utf8_to_compound_text_1=cast=(GdkAtom *)
-OS_gdk_utf8_to_compound_text_2=cast=(gint *)
-OS_gdk_utf8_to_compound_text_3=cast=(guchar **)
-OS_gdk_utf8_to_compound_text_4=cast=(gint *)
-
-OS_gdk_visual_get_system=
-
-OS_gdk_window_add_filter=
-OS_gdk_window_add_filter_0=cast=GdkWindow *
-OS_gdk_window_add_filter_1=cast=GdkFilterFunc
-OS_gdk_window_add_filter_2=cast=gpointer
-
-OS_gdk_window_at_pointer=
-OS_gdk_window_at_pointer_0=cast=(gint *)
-OS_gdk_window_at_pointer_1=cast=(gint *)
-
-OS_gdk_window_begin_paint_rect=
-OS_gdk_window_begin_paint_rect_0=cast=GdkWindow *
-OS_gdk_window_begin_paint_rect_1=cast=GdkRectangle *
-
-OS_gdk_window_destroy=
-OS_gdk_window_destroy_0=cast=GdkWindow *
-
-OS_gdk_window_end_paint=
-OS_gdk_window_end_paint_0=cast=GdkWindow *
-
-OS_gdk_window_focus=
-OS_gdk_window_focus_0=cast=GdkWindow *
-OS_gdk_window_focus_1=
-
-OS_gdk_window_freeze_updates=
-OS_gdk_window_freeze_updates_0=cast=GdkWindow *
-
-OS_gdk_window_get_children=
-OS_gdk_window_get_children_0=cast=GdkWindow *
-
-OS_gdk_window_get_events=
-OS_gdk_window_get_events_0=cast=GdkWindow *
-
-OS_gdk_window_get_frame_extents=
-OS_gdk_window_get_frame_extents_0=cast=(GdkWindow *)
-OS_gdk_window_get_frame_extents_1=cast=(GdkRectangle *)
-
-OS_gdk_window_get_internal_paint_info=
-OS_gdk_window_get_internal_paint_info_0=cast=GdkWindow *
-OS_gdk_window_get_internal_paint_info_1=cast=GdkDrawable **
-OS_gdk_window_get_internal_paint_info_2=cast=gint *
-OS_gdk_window_get_internal_paint_info_3=cast=gint *
-
-OS_gdk_window_get_origin=
-OS_gdk_window_get_origin_0=cast=(GdkWindow *)
-OS_gdk_window_get_origin_1=cast=(gint *)
-OS_gdk_window_get_origin_2=cast=(gint *)
-
-OS_gdk_window_get_parent=
-OS_gdk_window_get_parent_0=cast=(GdkWindow *)
-
-OS_gdk_window_get_pointer=
-OS_gdk_window_get_pointer_0=cast=(GdkWindow *)
-OS_gdk_window_get_pointer_1=cast=(gint *)
-OS_gdk_window_get_pointer_2=cast=(gint *)
-OS_gdk_window_get_pointer_3=cast=(GdkModifierType *)
-
-OS_gdk_window_get_user_data=
-OS_gdk_window_get_user_data_0=cast=(GdkWindow *)
-OS_gdk_window_get_user_data_1=cast=(gpointer *)
-
-OS_gdk_window_hide=
-OS_gdk_window_hide_0=cast=(GdkWindow *)
-
-OS_gdk_window_invalidate_rect=
-OS_gdk_window_invalidate_rect_0=cast=(GdkWindow *)
-OS_gdk_window_invalidate_rect_1=cast=(GdkRectangle *)
-OS_gdk_window_invalidate_rect_2=cast=(gboolean)
-
-OS_gdk_window_invalidate_region=
-OS_gdk_window_invalidate_region_0=cast=(GdkWindow *)
-OS_gdk_window_invalidate_region_1=cast=(GdkRegion *)
-OS_gdk_window_invalidate_region_2=cast=(gboolean)
-
-OS_gdk_window_lookup=
-OS_gdk_window_lookup_0=
-
-OS_gdk_window_lower=
-OS_gdk_window_lower_0=cast=(GdkWindow *)
-
-OS_gdk_window_move=
-OS_gdk_window_move_0=cast=GdkWindow *
-OS_gdk_window_move_1=
-OS_gdk_window_move_2=
-
-OS_gdk_window_new=
-OS_gdk_window_new_0=cast=(GdkWindow *)
-OS_gdk_window_new_1=
-OS_gdk_window_new_2=
-
-OS_gdk_window_process_all_updates=
-
-OS_gdk_window_process_updates=
-OS_gdk_window_process_updates_0=cast=(GdkWindow *)
-OS_gdk_window_process_updates_1=cast=(gboolean)
-
-OS_gdk_window_raise=
-OS_gdk_window_raise_0=cast=(GdkWindow *)
-
-OS_gdk_window_resize=
-OS_gdk_window_resize_0=cast=GdkWindow *
-OS_gdk_window_resize_1=
-OS_gdk_window_resize_2=
-
-OS_gdk_window_scroll=
-OS_gdk_window_scroll_0=cast=(GdkWindow *)
-OS_gdk_window_scroll_1=
-OS_gdk_window_scroll_2=
-
-OS_gdk_window_set_accept_focus=flags=dynamic
-OS_gdk_window_set_accept_focus_0=cast=GdkWindow *
-OS_gdk_window_set_accept_focus_1=cast=gboolean
-
-OS_gdk_window_set_back_pixmap=
-OS_gdk_window_set_back_pixmap_0=cast=(GdkWindow *)
-OS_gdk_window_set_back_pixmap_1=cast=(GdkPixmap *)
-OS_gdk_window_set_back_pixmap_2=cast=gboolean
-
-OS_gdk_window_set_cursor=
-OS_gdk_window_set_cursor_0=cast=(GdkWindow *)
-OS_gdk_window_set_cursor_1=cast=(GdkCursor *)
-
-OS_gdk_window_set_decorations=
-OS_gdk_window_set_decorations_0=cast=(GdkWindow *)
-OS_gdk_window_set_decorations_1=cast=(GdkWMDecoration)
-
-OS_gdk_window_set_events=
-OS_gdk_window_set_events_0=cast=GdkWindow *
-OS_gdk_window_set_events_1=
-
-OS_gdk_window_set_icon=
-OS_gdk_window_set_icon_0=cast=(GdkWindow *)
-OS_gdk_window_set_icon_1=cast=(GdkWindow *)
-OS_gdk_window_set_icon_2=cast=(GdkPixmap *)
-OS_gdk_window_set_icon_3=cast=(GdkBitmap *)
-
-OS_gdk_window_set_icon_list=
-OS_gdk_window_set_icon_list_0=cast=GdkWindow *
-OS_gdk_window_set_icon_list_1=cast=GList *
-
-OS_gdk_window_set_keep_above=flags=dynamic
-OS_gdk_window_set_keep_above_0=cast=(GdkWindow *)
-OS_gdk_window_set_keep_above_1=cast=gboolean
-
-OS_gdk_window_set_override_redirect=
-OS_gdk_window_set_override_redirect_0=cast=(GdkWindow *)
-OS_gdk_window_set_override_redirect_1=cast=(gboolean)
-
-OS_gdk_window_set_user_data=
-OS_gdk_window_set_user_data_0=cast=(GdkWindow *)
-OS_gdk_window_set_user_data_1=cast=gpointer
-
-OS_gdk_window_shape_combine_region=
-OS_gdk_window_shape_combine_region_0=cast=GdkWindow *
-OS_gdk_window_shape_combine_region_1=cast=(GdkRegion *)
-OS_gdk_window_shape_combine_region_2=
-OS_gdk_window_shape_combine_region_3=
-
-OS_gdk_window_show=
-OS_gdk_window_show_0=cast=(GdkWindow *)
-
-OS_gdk_window_show_unraised=
-OS_gdk_window_show_unraised_0=cast=(GdkWindow *)
-
-OS_gdk_window_thaw_updates=
-OS_gdk_window_thaw_updates_0=cast=GdkWindow *
-
-OS_gdk_x11_atom_to_xatom=
-OS_gdk_x11_atom_to_xatom_0=cast=(GdkAtom)
-
-OS_gdk_x11_drawable_get_xdisplay=
-OS_gdk_x11_drawable_get_xdisplay_0=cast=GdkDrawable *
-
-OS_gdk_x11_drawable_get_xid=
-OS_gdk_x11_drawable_get_xid_0=cast=GdkDrawable *
-
-OS_gtk_accel_group_new=
-
-OS_gtk_accel_groups_activate=
-OS_gtk_accel_groups_activate_0=cast=(GObject *)
-OS_gtk_accel_groups_activate_1=cast=(guint)
-OS_gtk_accel_groups_activate_2=cast=(GdkModifierType)
-
-OS_gtk_accel_label_set_accel_widget=
-OS_gtk_accel_label_set_accel_widget_0=cast=(GtkAccelLabel *)
-OS_gtk_accel_label_set_accel_widget_1=cast=(GtkWidget *)
-
-OS_gtk_adjustment_changed=
-OS_gtk_adjustment_changed_0=cast=(GtkAdjustment *)
-
-OS_gtk_adjustment_new=
-OS_gtk_adjustment_new_0=cast=(gdouble)
-OS_gtk_adjustment_new_1=cast=(gdouble)
-OS_gtk_adjustment_new_2=cast=(gdouble)
-OS_gtk_adjustment_new_3=cast=(gdouble)
-OS_gtk_adjustment_new_4=cast=(gdouble)
-OS_gtk_adjustment_new_5=
-
-OS_gtk_adjustment_set_value=
-OS_gtk_adjustment_set_value_0=cast=(GtkAdjustment *)
-OS_gtk_adjustment_set_value_1=cast=(gdouble)
-
-OS_gtk_adjustment_value_changed=
-OS_gtk_adjustment_value_changed_0=cast=(GtkAdjustment *)
-
-OS_gtk_arrow_new=
-OS_gtk_arrow_new_0=cast=(GtkArrowType)
-OS_gtk_arrow_new_1=cast=(GtkArrowType)
-
-OS_gtk_arrow_set=
-OS_gtk_arrow_set_0=cast=(GtkArrow *)
-OS_gtk_arrow_set_1=cast=(GtkArrowType)
-OS_gtk_arrow_set_2=cast=(GtkArrowType)
-
-OS_gtk_bin_get_child=
-OS_gtk_bin_get_child_0=cast=(GtkBin *)
-
-OS_gtk_button_new=
-
-OS_gtk_button_set_relief=
-OS_gtk_button_set_relief_0=cast=(GtkButton *)
-OS_gtk_button_set_relief_1=cast=(GtkReliefStyle)
-
-OS_gtk_cell_renderer_get_size=
-OS_gtk_cell_renderer_get_size_0=cast=(GtkCellRenderer *)
-OS_gtk_cell_renderer_get_size_1=cast=(GtkWidget *)
-OS_gtk_cell_renderer_get_size_2=cast=(GdkRectangle *)
-OS_gtk_cell_renderer_get_size_3=cast=(gint *)
-OS_gtk_cell_renderer_get_size_4=cast=(gint *)
-OS_gtk_cell_renderer_get_size_5=cast=(gint *)
-OS_gtk_cell_renderer_get_size_6=cast=(gint *)
-
-OS_gtk_cell_renderer_pixbuf_new=
-
-OS_gtk_cell_renderer_text_new=
-
-OS_gtk_cell_renderer_toggle_new=
-
-OS_gtk_check_button_new=
-
-OS_gtk_check_menu_item_get_active=
-OS_gtk_check_menu_item_get_active_0=cast=(GtkCheckMenuItem *)
-
-OS_gtk_check_menu_item_new_with_label=
-OS_gtk_check_menu_item_new_with_label_0=cast=(const gchar *)
-
-OS_gtk_check_menu_item_set_active=
-OS_gtk_check_menu_item_set_active_0=cast=(GtkCheckMenuItem *)
-OS_gtk_check_menu_item_set_active_1=cast=(gboolean)
-
-OS_gtk_check_version=
-OS_gtk_check_version_0=
-OS_gtk_check_version_1=
-OS_gtk_check_version_2=
-
-OS_gtk_clipboard_clear=
-OS_gtk_clipboard_clear_0=cast=(GtkClipboard *)
-
-OS_gtk_clipboard_get=
-OS_gtk_clipboard_get_0=cast=(GdkAtom)
-
-OS_gtk_clipboard_set_with_data=
-OS_gtk_clipboard_set_with_data_0=cast=(GtkClipboard *)
-OS_gtk_clipboard_set_with_data_1=cast=(const GtkTargetEntry *)
-OS_gtk_clipboard_set_with_data_2=cast=(guint)
-OS_gtk_clipboard_set_with_data_3=cast=(GtkClipboardGetFunc)
-OS_gtk_clipboard_set_with_data_4=cast=(GtkClipboardClearFunc)
-OS_gtk_clipboard_set_with_data_5=cast=(GObject *)
-
-OS_gtk_clipboard_wait_for_contents=
-OS_gtk_clipboard_wait_for_contents_0=cast=(GtkClipboard *)
-OS_gtk_clipboard_wait_for_contents_1=cast=(GdkAtom)
-
-OS_gtk_color_selection_dialog_new=
-OS_gtk_color_selection_dialog_new_0=cast=(const gchar *)
-
-OS_gtk_color_selection_get_current_color=
-OS_gtk_color_selection_get_current_color_0=cast=(GtkColorSelection *)
-OS_gtk_color_selection_get_current_color_1=cast=(GdkColor *)
-
-OS_gtk_color_selection_set_current_color=
-OS_gtk_color_selection_set_current_color_0=cast=(GtkColorSelection *)
-OS_gtk_color_selection_set_current_color_1=cast=(GdkColor *)
-
-OS_gtk_combo_disable_activate=
-OS_gtk_combo_disable_activate_0=cast=(GtkCombo *)
-
-OS_gtk_combo_new=
-
-OS_gtk_combo_set_case_sensitive=
-OS_gtk_combo_set_case_sensitive_0=cast=(GtkCombo *)
-OS_gtk_combo_set_case_sensitive_1=cast=(gboolean)
-
-OS_gtk_combo_set_popdown_strings=
-OS_gtk_combo_set_popdown_strings_0=cast=(GtkCombo *)
-OS_gtk_combo_set_popdown_strings_1=cast=(GList *)
-
-OS_gtk_container_add=
-OS_gtk_container_add_0=cast=(GtkContainer *)
-OS_gtk_container_add_1=cast=(GtkWidget *)
-
-OS_gtk_container_get_border_width=
-OS_gtk_container_get_border_width_0=cast=(GtkContainer *)
-
-OS_gtk_container_get_children=
-OS_gtk_container_get_children_0=cast=(GtkContainer *)
-
-OS_gtk_container_remove=
-OS_gtk_container_remove_0=cast=(GtkContainer *)
-OS_gtk_container_remove_1=cast=(GtkWidget *)
-
-OS_gtk_container_resize_children=
-OS_gtk_container_resize_children_0=cast=(GtkContainer *)
-
-OS_gtk_container_set_border_width=
-OS_gtk_container_set_border_width_0=cast=(GtkContainer *)
-OS_gtk_container_set_border_width_1=cast=(guint)
-
-OS_gtk_dialog_add_button=
-OS_gtk_dialog_add_button_0=cast=(GtkDialog *)
-OS_gtk_dialog_add_button_1=cast=(const gchar *)
-OS_gtk_dialog_add_button_2=cast=(gint)
-
-OS_gtk_dialog_run=
-OS_gtk_dialog_run_0=cast=(GtkDialog *)
-
-OS_gtk_drag_begin=
-OS_gtk_drag_begin_0=cast=(GtkWidget *)
-OS_gtk_drag_begin_1=cast=(GtkTargetList *)
-OS_gtk_drag_begin_2=cast=(GdkDragAction)
-OS_gtk_drag_begin_3=cast=(gint)
-OS_gtk_drag_begin_4=cast=(GdkEvent *)
-
-OS_gtk_drag_check_threshold=
-OS_gtk_drag_check_threshold_0=cast=(GtkWidget *)
-OS_gtk_drag_check_threshold_1=cast=(gint)
-OS_gtk_drag_check_threshold_2=cast=(gint)
-OS_gtk_drag_check_threshold_3=cast=(gint)
-OS_gtk_drag_check_threshold_4=cast=(gint)
-
-OS_gtk_drag_dest_find_target=
-OS_gtk_drag_dest_find_target_0=cast=(GtkWidget *)
-OS_gtk_drag_dest_find_target_1=cast=(GdkDragContext *)
-OS_gtk_drag_dest_find_target_2=cast=(GtkTargetList *)
-
-OS_gtk_drag_dest_set=
-OS_gtk_drag_dest_set_0=cast=(GtkWidget *)
-OS_gtk_drag_dest_set_1=cast=(GtkDestDefaults)
-OS_gtk_drag_dest_set_2=cast=(const GtkTargetEntry *)
-OS_gtk_drag_dest_set_3=cast=(gint)
-OS_gtk_drag_dest_set_4=cast=(GdkDragAction)
-
-OS_gtk_drag_dest_unset=
-OS_gtk_drag_dest_unset_0=cast=(GtkWidget *)
-
-OS_gtk_drag_finish=
-OS_gtk_drag_finish_0=cast=(GdkDragContext *)
-OS_gtk_drag_finish_1=cast=(gboolean)
-OS_gtk_drag_finish_2=cast=(gboolean)
-OS_gtk_drag_finish_3=cast=(guint32)
-
-OS_gtk_drag_get_data=
-OS_gtk_drag_get_data_0=cast=(GtkWidget *)
-OS_gtk_drag_get_data_1=cast=(GdkDragContext *)
-OS_gtk_drag_get_data_2=cast=(GdkAtom)
-OS_gtk_drag_get_data_3=cast=(guint32)
-
-OS_gtk_drawing_area_new=
-
-OS_gtk_editable_copy_clipboard=
-OS_gtk_editable_copy_clipboard_0=cast=(GtkEditable *)
-
-OS_gtk_editable_cut_clipboard=
-OS_gtk_editable_cut_clipboard_0=cast=(GtkEditable *)
-
-OS_gtk_editable_delete_selection=
-OS_gtk_editable_delete_selection_0=cast=(GtkEditable *)
-
-OS_gtk_editable_delete_text=
-OS_gtk_editable_delete_text_0=cast=(GtkEditable *)
-OS_gtk_editable_delete_text_1=cast=(gint)
-OS_gtk_editable_delete_text_2=cast=(gint)
-
-OS_gtk_editable_get_chars=
-OS_gtk_editable_get_chars_0=cast=(GtkEditable *)
-OS_gtk_editable_get_chars_1=cast=(gint)
-OS_gtk_editable_get_chars_2=cast=(gint)
-
-OS_gtk_editable_get_editable=
-OS_gtk_editable_get_editable_0=cast=(GtkEditable *)
-
-OS_gtk_editable_get_position=
-OS_gtk_editable_get_position_0=cast=(GtkEditable *)
-
-OS_gtk_editable_get_selection_bounds=
-OS_gtk_editable_get_selection_bounds_0=cast=(GtkEditable *)
-OS_gtk_editable_get_selection_bounds_1=cast=(gint *)
-OS_gtk_editable_get_selection_bounds_2=cast=(gint *)
-
-OS_gtk_editable_insert_text=
-OS_gtk_editable_insert_text_0=cast=(GtkEditable *)
-OS_gtk_editable_insert_text_1=cast=(gchar *)
-OS_gtk_editable_insert_text_2=cast=(gint)
-OS_gtk_editable_insert_text_3=cast=(gint *)
-
-OS_gtk_editable_paste_clipboard=
-OS_gtk_editable_paste_clipboard_0=cast=(GtkEditable *)
-
-OS_gtk_editable_select_region=
-OS_gtk_editable_select_region_0=cast=(GtkEditable *)
-OS_gtk_editable_select_region_1=cast=(gint)
-OS_gtk_editable_select_region_2=cast=(gint)
-
-OS_gtk_editable_set_editable=
-OS_gtk_editable_set_editable_0=cast=(GtkEditable *)
-OS_gtk_editable_set_editable_1=cast=(gboolean)
-
-OS_gtk_editable_set_position=
-OS_gtk_editable_set_position_0=cast=(GtkEditable *)
-OS_gtk_editable_set_position_1=cast=(gint)
-
-OS_gtk_entry_get_invisible_char=
-OS_gtk_entry_get_invisible_char_0=cast=(GtkEntry *)
-
-OS_gtk_entry_get_layout=
-OS_gtk_entry_get_layout_0=cast=(GtkEntry *)
-
-OS_gtk_entry_get_max_length=
-OS_gtk_entry_get_max_length_0=cast=(GtkEntry *)
-
-OS_gtk_entry_get_text=
-OS_gtk_entry_get_text_0=cast=(GtkEntry *)
-
-OS_gtk_entry_get_visibility=
-OS_gtk_entry_get_visibility_0=cast=(GtkEntry *)
-
-OS_gtk_entry_new=
-
-OS_gtk_entry_set_activates_default=
-OS_gtk_entry_set_activates_default_0=cast=(GtkEntry *)
-OS_gtk_entry_set_activates_default_1=cast=(gboolean)
-
-OS_gtk_entry_set_alignment=flags=dynamic
-OS_gtk_entry_set_alignment_0=cast=(GtkEntry *)
-OS_gtk_entry_set_alignment_1=cast=(gfloat)
-
-OS_gtk_entry_set_has_frame=
-OS_gtk_entry_set_has_frame_0=cast=(GtkEntry *)
-OS_gtk_entry_set_has_frame_1=cast=(gboolean)
-
-OS_gtk_entry_set_invisible_char=
-OS_gtk_entry_set_invisible_char_0=cast=(GtkEntry *)
-OS_gtk_entry_set_invisible_char_1=cast=(gint)
-
-OS_gtk_entry_set_max_length=
-OS_gtk_entry_set_max_length_0=cast=(GtkEntry *)
-OS_gtk_entry_set_max_length_1=cast=(gint)
-
-OS_gtk_entry_set_text=
-OS_gtk_entry_set_text_0=cast=(GtkEntry *)
-OS_gtk_entry_set_text_1=cast=(const gchar *)
-
-OS_gtk_entry_set_visibility=
-OS_gtk_entry_set_visibility_0=cast=(GtkEntry *)
-OS_gtk_entry_set_visibility_1=cast=(gboolean)
-
-OS_gtk_events_pending=
-
-OS_gtk_file_selection_complete=
-OS_gtk_file_selection_complete_0=cast=(GtkFileSelection *)
-OS_gtk_file_selection_complete_1=cast=(const gchar *)
-
-OS_gtk_file_selection_get_filename=
-OS_gtk_file_selection_get_filename_0=cast=(GtkFileSelection *)
-
-OS_gtk_file_selection_get_selections=
-OS_gtk_file_selection_get_selections_0=cast=(GtkFileSelection *)
-
-OS_gtk_file_selection_hide_fileop_buttons=
-OS_gtk_file_selection_hide_fileop_buttons_0=cast=(GtkFileSelection *)
-
-OS_gtk_file_selection_new=
-OS_gtk_file_selection_new_0=cast=(const gchar *)
-
-OS_gtk_file_selection_set_filename=
-OS_gtk_file_selection_set_filename_0=cast=(GtkFileSelection *)
-OS_gtk_file_selection_set_filename_1=cast=(const gchar *)
-
-OS_gtk_file_selection_set_select_multiple=
-OS_gtk_file_selection_set_select_multiple_0=cast=(GtkFileSelection *)
-OS_gtk_file_selection_set_select_multiple_1=cast=(gboolean)
-
-OS_gtk_fixed_move=
-OS_gtk_fixed_move_0=cast=(GtkFixed *)
-OS_gtk_fixed_move_1=cast=(GtkWidget *)
-OS_gtk_fixed_move_2=cast=(gint)
-OS_gtk_fixed_move_3=cast=(gint)
-
-OS_gtk_fixed_new=
-
-OS_gtk_fixed_set_has_window=
-OS_gtk_fixed_set_has_window_0=cast=(GtkFixed *)
-OS_gtk_fixed_set_has_window_1=cast=(gboolean)
-
-OS_gtk_font_selection_dialog_get_font_name=
-OS_gtk_font_selection_dialog_get_font_name_0=cast=(GtkFontSelectionDialog *)
-
-OS_gtk_font_selection_dialog_new=
-OS_gtk_font_selection_dialog_new_0=cast=(const gchar *)
-
-OS_gtk_font_selection_dialog_set_font_name=
-OS_gtk_font_selection_dialog_set_font_name_0=cast=(GtkFontSelectionDialog *)
-OS_gtk_font_selection_dialog_set_font_name_1=cast=(const gchar *)
-
-OS_gtk_frame_get_label_widget=
-OS_gtk_frame_get_label_widget_0=cast=(GtkFrame *)
-
-OS_gtk_frame_new=
-OS_gtk_frame_new_0=cast=(const gchar *)
-
-OS_gtk_frame_set_label=
-OS_gtk_frame_set_label_0=cast=(GtkFrame *)
-OS_gtk_frame_set_label_1=cast=(const gchar *)
-
-OS_gtk_frame_set_label_widget=
-OS_gtk_frame_set_label_widget_0=cast=(GtkFrame *)
-OS_gtk_frame_set_label_widget_1=cast=(GtkWidget *)
-
-OS_gtk_frame_set_shadow_type=
-OS_gtk_frame_set_shadow_type_0=cast=(GtkFrame *)
-OS_gtk_frame_set_shadow_type_1=cast=(GtkShadowType)
-
-OS_gtk_get_current_event=
-
-OS_gtk_get_current_event_state=
-OS_gtk_get_current_event_state_0=cast=GdkModifierType*
-
-OS_gtk_get_current_event_time=
-
-OS_gtk_get_default_language=
-
-OS_gtk_get_event_widget=
-OS_gtk_get_event_widget_0=cast=GdkEvent *
-
-OS_gtk_grab_add=
-OS_gtk_grab_add_0=cast=GtkWidget *
-
-OS_gtk_grab_get_current=
-
-OS_gtk_grab_remove=
-OS_gtk_grab_remove_0=cast=(GtkWidget *)
-
-OS_gtk_hbox_new=
-OS_gtk_hbox_new_0=cast=(gboolean)
-OS_gtk_hbox_new_1=cast=(gint)
-
-OS_gtk_hscale_new=
-OS_gtk_hscale_new_0=cast=(GtkAdjustment *)
-
-OS_gtk_hscrollbar_new=
-OS_gtk_hscrollbar_new_0=cast=(GtkAdjustment *)
-
-OS_gtk_hseparator_new=
-
-OS_gtk_icon_factory_lookup_default=
-OS_gtk_icon_factory_lookup_default_0=
-
-OS_gtk_icon_set_render_icon=
-OS_gtk_icon_set_render_icon_0=cast=(GtkIconSet *)
-OS_gtk_icon_set_render_icon_1=cast=(GtkStyle *)
-OS_gtk_icon_set_render_icon_2=cast=GtkTextDirection)
-OS_gtk_icon_set_render_icon_3=cast=(GtkStateType)
-OS_gtk_icon_set_render_icon_4=cast=(GtkIconSize)
-OS_gtk_icon_set_render_icon_5=cast=(GtkWidget *)
-OS_gtk_icon_set_render_icon_6=cast=(const char *)
-
-OS_gtk_im_context_filter_keypress=
-OS_gtk_im_context_filter_keypress_0=cast=(GtkIMContext *)
-OS_gtk_im_context_filter_keypress_1=cast=(GdkEventKey *)
-
-OS_gtk_im_context_focus_in=
-OS_gtk_im_context_focus_in_0=cast=(GtkIMContext *)
-
-OS_gtk_im_context_focus_out=
-OS_gtk_im_context_focus_out_0=cast=(GtkIMContext *)
-
-OS_gtk_im_context_get_preedit_string=
-OS_gtk_im_context_get_preedit_string_0=cast=(GtkIMContext *)
-OS_gtk_im_context_get_preedit_string_1=cast=(gchar **)
-OS_gtk_im_context_get_preedit_string_2=cast=(PangoAttrList **)
-OS_gtk_im_context_get_preedit_string_3=cast=(gint *)
-
-OS_gtk_im_context_get_type=
-
-OS_gtk_im_context_reset=
-OS_gtk_im_context_reset_0=cast=(GtkIMContext *)
-
-OS_gtk_im_context_set_client_window=
-OS_gtk_im_context_set_client_window_0=cast=(GtkIMContext *)
-OS_gtk_im_context_set_client_window_1=cast=(GdkWindow *)
-
-OS_gtk_im_context_set_cursor_location=
-OS_gtk_im_context_set_cursor_location_0=cast=(GtkIMContext *)
-OS_gtk_im_context_set_cursor_location_1=cast=(GdkRectangle *)
-
-OS_gtk_im_multicontext_append_menuitems=
-OS_gtk_im_multicontext_append_menuitems_0=cast=(GtkIMMulticontext *)
-OS_gtk_im_multicontext_append_menuitems_1=cast=(GtkMenuShell *)
-
-OS_gtk_im_multicontext_new=
-
-OS_gtk_image_menu_item_new_with_label=
-OS_gtk_image_menu_item_new_with_label_0=
-
-OS_gtk_image_menu_item_set_image=
-OS_gtk_image_menu_item_set_image_0=cast=(GtkImageMenuItem *)
-OS_gtk_image_menu_item_set_image_1=cast=(GtkWidget *)
-
-OS_gtk_image_new=
-
-OS_gtk_image_new_from_pixmap=
-OS_gtk_image_new_from_pixmap_0=cast=(GdkPixmap *)
-OS_gtk_image_new_from_pixmap_1=cast=(GdkBitmap *)
-
-OS_gtk_image_set_from_pixmap=
-OS_gtk_image_set_from_pixmap_0=cast=(GtkImage *)
-OS_gtk_image_set_from_pixmap_1=cast=(GdkBitmap *)
-OS_gtk_image_set_from_pixmap_2=cast=(GdkBitmap *)
-
-OS_gtk_init_check=
-OS_gtk_init_check_0=cast=(int *)
-OS_gtk_init_check_1=cast=(char ***)
-
-OS_gtk_label_get_mnemonic_keyval=
-OS_gtk_label_get_mnemonic_keyval_0=cast=GtkLabel *
-
-OS_gtk_label_new=
-OS_gtk_label_new_0=cast=(const gchar *)
-
-OS_gtk_label_new_with_mnemonic=
-OS_gtk_label_new_with_mnemonic_0=cast=(const gchar *)
-
-OS_gtk_label_set_attributes=
-OS_gtk_label_set_attributes_0=cast=(GtkLabel *)
-OS_gtk_label_set_attributes_1=cast=(PangoAttrList *)
-
-OS_gtk_label_set_justify=
-OS_gtk_label_set_justify_0=cast=(GtkLabel *)
-OS_gtk_label_set_justify_1=cast=(GtkJustification)
-
-OS_gtk_label_set_line_wrap=
-OS_gtk_label_set_line_wrap_0=cast=(GtkLabel *)
-OS_gtk_label_set_line_wrap_1=cast=(gboolean)
-
-OS_gtk_label_set_text=
-OS_gtk_label_set_text_0=cast=(GtkLabel *)
-OS_gtk_label_set_text_1=cast=(const gchar *)
-
-OS_gtk_label_set_text_with_mnemonic=
-OS_gtk_label_set_text_with_mnemonic_0=cast=(GtkLabel *)
-OS_gtk_label_set_text_with_mnemonic_1=cast=(const gchar *)
-
-OS_gtk_list_store_append=
-OS_gtk_list_store_append_0=cast=(GtkListStore *)
-OS_gtk_list_store_append_1=cast=(GtkTreeIter *)
-
-OS_gtk_list_store_clear=
-OS_gtk_list_store_clear_0=cast=(GtkListStore *)
-
-OS_gtk_list_store_insert=
-OS_gtk_list_store_insert_0=cast=(GtkListStore *)
-OS_gtk_list_store_insert_1=cast=(GtkTreeIter *)
-OS_gtk_list_store_insert_2=cast=(gint)
-
-OS_gtk_list_store_newv=
-OS_gtk_list_store_newv_0=cast=(gint)
-OS_gtk_list_store_newv_1=cast=(GType *)
-
-OS_gtk_list_store_remove=
-OS_gtk_list_store_remove_0=cast=(GtkListStore *)
-OS_gtk_list_store_remove_1=cast=(GtkTreeIter *)
-
-OS_gtk_1list_1store_1set__IIIII=
-OS_gtk_1list_1store_1set__IIIII_0=cast=(GtkListStore *)
-OS_gtk_1list_1store_1set__IIIII_1=cast=(GtkTreeIter *)
-OS_gtk_1list_1store_1set__IIIII_2=
-OS_gtk_1list_1store_1set__IIIII_3=
-OS_gtk_1list_1store_1set__IIIII_4=
-
-OS_gtk_1list_1store_1set__IIIJI=
-OS_gtk_1list_1store_1set__IIIJI_0=cast=(GtkListStore *)
-OS_gtk_1list_1store_1set__IIIJI_1=cast=(GtkTreeIter *)
-OS_gtk_1list_1store_1set__IIIJI_2=
-OS_gtk_1list_1store_1set__IIIJI_3=
-OS_gtk_1list_1store_1set__IIIJI_4=
-
-OS_gtk_1list_1store_1set__IIILorg_eclipse_swt_internal_gtk_GdkColor_2I=
-OS_gtk_1list_1store_1set__IIILorg_eclipse_swt_internal_gtk_GdkColor_2I_0=cast=(GtkListStore *)
-OS_gtk_1list_1store_1set__IIILorg_eclipse_swt_internal_gtk_GdkColor_2I_1=cast=(GtkTreeIter *)
-OS_gtk_1list_1store_1set__IIILorg_eclipse_swt_internal_gtk_GdkColor_2I_2=
-OS_gtk_1list_1store_1set__IIILorg_eclipse_swt_internal_gtk_GdkColor_2I_3=
-OS_gtk_1list_1store_1set__IIILorg_eclipse_swt_internal_gtk_GdkColor_2I_4=
-
-OS_gtk_1list_1store_1set__IIIZI=
-OS_gtk_1list_1store_1set__IIIZI_0=cast=(GtkListStore *)
-OS_gtk_1list_1store_1set__IIIZI_1=cast=(GtkTreeIter *)
-OS_gtk_1list_1store_1set__IIIZI_2=
-OS_gtk_1list_1store_1set__IIIZI_3=
-OS_gtk_1list_1store_1set__IIIZI_4=
-
-OS_gtk_1list_1store_1set__III_3BI=
-OS_gtk_1list_1store_1set__III_3BI_0=cast=(GtkListStore *)
-OS_gtk_1list_1store_1set__III_3BI_1=cast=(GtkTreeIter *)
-OS_gtk_1list_1store_1set__III_3BI_2=
-OS_gtk_1list_1store_1set__III_3BI_3=
-OS_gtk_1list_1store_1set__III_3BI_4=
-
-OS_gtk_main=
-
-OS_gtk_main_do_event=
-OS_gtk_main_do_event_0=cast=(GdkEvent *)
-
-OS_gtk_main_iteration=
-
-OS_gtk_major_version=flags=const
-
-OS_gtk_menu_bar_new=
-
-OS_gtk_menu_item_remove_submenu=
-OS_gtk_menu_item_remove_submenu_0=cast=(GtkMenuItem *)
-
-OS_gtk_menu_item_set_submenu=
-OS_gtk_menu_item_set_submenu_0=cast=(GtkMenuItem *)
-OS_gtk_menu_item_set_submenu_1=cast=(GtkWidget *)
-
-OS_gtk_menu_new=
-
-OS_gtk_menu_popdown=
-OS_gtk_menu_popdown_0=cast=(GtkMenu *)
-
-OS_gtk_menu_popup=
-OS_gtk_menu_popup_0=cast=(GtkMenu *)
-OS_gtk_menu_popup_1=cast=(GtkWidget *)
-OS_gtk_menu_popup_2=cast=(GtkWidget *)
-OS_gtk_menu_popup_3=cast=(GtkMenuPositionFunc)
-OS_gtk_menu_popup_4=cast=(gpointer)
-OS_gtk_menu_popup_5=cast=(guint)
-OS_gtk_menu_popup_6=cast=(guint32)
-
-OS_gtk_menu_shell_deactivate=
-OS_gtk_menu_shell_deactivate_0=cast=(GtkMenuShell *)
-
-OS_gtk_menu_shell_insert=
-OS_gtk_menu_shell_insert_0=cast=(GtkMenuShell *)
-OS_gtk_menu_shell_insert_1=cast=(GtkWidget *)
-OS_gtk_menu_shell_insert_2=cast=(gint)
-
-OS_gtk_menu_shell_select_item=
-OS_gtk_menu_shell_select_item_0=cast=(GtkMenuShell *)
-OS_gtk_menu_shell_select_item_1=cast=(GtkWidget *)
-
-OS_gtk_message_dialog_new=
-OS_gtk_message_dialog_new_0=cast=(GtkWindow *)
-OS_gtk_message_dialog_new_1=cast=(GtkDialogFlags)
-OS_gtk_message_dialog_new_2=cast=(GtkMessageType)
-OS_gtk_message_dialog_new_3=cast=(GtkButtonsType)
-OS_gtk_message_dialog_new_4=cast=(const gchar *)
-
-OS_gtk_micro_version=flags=const
-
-OS_gtk_minor_version=flags=const
-
-OS_gtk_misc_set_alignment=
-OS_gtk_misc_set_alignment_0=cast=(GtkMisc *)
-OS_gtk_misc_set_alignment_1=cast=(gfloat)
-OS_gtk_misc_set_alignment_2=cast=(gfloat)
-
-OS_gtk_notebook_get_current_page=
-OS_gtk_notebook_get_current_page_0=cast=(GtkNotebook *)
-
-OS_gtk_notebook_get_scrollable=
-OS_gtk_notebook_get_scrollable_0=cast=(GtkNotebook *)
-
-OS_gtk_notebook_insert_page=
-OS_gtk_notebook_insert_page_0=cast=(GtkNotebook *)
-OS_gtk_notebook_insert_page_1=cast=(GtkWidget *)
-OS_gtk_notebook_insert_page_2=cast=(GtkWidget *)
-OS_gtk_notebook_insert_page_3=cast=(gint)
-
-OS_gtk_notebook_new=
-
-OS_gtk_notebook_remove_page=
-OS_gtk_notebook_remove_page_0=cast=(GtkNotebook *)
-OS_gtk_notebook_remove_page_1=cast=(gint)
-
-OS_gtk_notebook_set_current_page=
-OS_gtk_notebook_set_current_page_0=cast=(GtkNotebook *)
-OS_gtk_notebook_set_current_page_1=cast=(gint)
-
-OS_gtk_notebook_set_scrollable=
-OS_gtk_notebook_set_scrollable_0=cast=(GtkNotebook *)
-OS_gtk_notebook_set_scrollable_1=cast=(gboolean)
-
-OS_gtk_notebook_set_show_tabs=
-OS_gtk_notebook_set_show_tabs_0=cast=(GtkNotebook *)
-OS_gtk_notebook_set_show_tabs_1=cast=(gboolean)
-
-OS_gtk_notebook_set_tab_pos=
-OS_gtk_notebook_set_tab_pos_0=cast=(GtkNotebook *)
-OS_gtk_notebook_set_tab_pos_1=cast=(GtkPositionType)
-
-OS_gtk_object_sink=
-OS_gtk_object_sink_0=cast=(GtkObject *)
-
-OS_gtk_paint_handle=
-OS_gtk_paint_handle_0=cast=GtkStyle *
-OS_gtk_paint_handle_1=cast=GdkWindow *
-OS_gtk_paint_handle_2=
-OS_gtk_paint_handle_3=
-OS_gtk_paint_handle_4=
-OS_gtk_paint_handle_5=cast=GtkWidget *
-OS_gtk_paint_handle_6=
-OS_gtk_paint_handle_7=
-OS_gtk_paint_handle_8=
-OS_gtk_paint_handle_9=
-OS_gtk_paint_handle_10=
-OS_gtk_paint_handle_11=
-
-OS_gtk_plug_get_id=
-OS_gtk_plug_get_id_0=cast=(GtkPlug *)
-
-OS_gtk_plug_new=
-OS_gtk_plug_new_0=
-
-OS_gtk_progress_bar_new=
-
-OS_gtk_progress_bar_pulse=
-OS_gtk_progress_bar_pulse_0=cast=(GtkProgressBar *)
-
-OS_gtk_progress_bar_set_fraction=
-OS_gtk_progress_bar_set_fraction_0=cast=(GtkProgressBar *)
-OS_gtk_progress_bar_set_fraction_1=cast=(gdouble)
-
-OS_gtk_progress_bar_set_orientation=
-OS_gtk_progress_bar_set_orientation_0=cast=(GtkProgressBar *)
-OS_gtk_progress_bar_set_orientation_1=cast=(GtkProgressBarOrientation)
-
-OS_gtk_radio_button_get_group=
-OS_gtk_radio_button_get_group_0=cast=(GtkRadioButton *)
-
-OS_gtk_radio_button_new=
-OS_gtk_radio_button_new_0=cast=(GSList *)
-
-OS_gtk_radio_menu_item_get_group=
-OS_gtk_radio_menu_item_get_group_0=cast=GtkRadioMenuItem *
-
-OS_gtk_radio_menu_item_new=
-OS_gtk_radio_menu_item_new_0=cast=(GSList *)
-
-OS_gtk_radio_menu_item_new_with_label=
-OS_gtk_radio_menu_item_new_with_label_0=cast=(GSList *)
-OS_gtk_radio_menu_item_new_with_label_1=cast=(const gchar *)
-
-OS_gtk_range_get_adjustment=
-OS_gtk_range_get_adjustment_0=cast=(GtkRange *)
-
-OS_gtk_range_set_increments=
-OS_gtk_range_set_increments_0=cast=(GtkRange *)
-OS_gtk_range_set_increments_1=
-OS_gtk_range_set_increments_2=
-
-OS_gtk_range_set_range=
-OS_gtk_range_set_range_0=cast=(GtkRange *)
-OS_gtk_range_set_range_1=
-OS_gtk_range_set_range_2=
-
-OS_gtk_range_set_value=
-OS_gtk_range_set_value_0=cast=(GtkRange *)
-OS_gtk_range_set_value_1=
-
-OS_gtk_rc_parse_string=
-OS_gtk_rc_parse_string_0=
-
-OS_gtk_rc_style_get_bg_pixmap_name=
-OS_gtk_rc_style_get_bg_pixmap_name_0=cast=(GtkRcStyle *)
-OS_gtk_rc_style_get_bg_pixmap_name_1=
-
-OS_gtk_rc_style_get_color_flags=
-OS_gtk_rc_style_get_color_flags_0=cast=(GtkRcStyle *)
-OS_gtk_rc_style_get_color_flags_1=
-
-OS_gtk_rc_style_set_bg=
-OS_gtk_rc_style_set_bg_0=cast=(GtkRcStyle *)
-OS_gtk_rc_style_set_bg_1=
-OS_gtk_rc_style_set_bg_2=flags=no_out
-
-OS_gtk_rc_style_set_bg_pixmap_name=
-OS_gtk_rc_style_set_bg_pixmap_name_0=cast=(GtkRcStyle *)
-OS_gtk_rc_style_set_bg_pixmap_name_1=
-OS_gtk_rc_style_set_bg_pixmap_name_2=cast=(char *)
-
-OS_gtk_rc_style_set_color_flags=
-OS_gtk_rc_style_set_color_flags_0=cast=(GtkRcStyle *)
-OS_gtk_rc_style_set_color_flags_1=
-OS_gtk_rc_style_set_color_flags_2=
-
-OS_gtk_scale_set_digits=
-OS_gtk_scale_set_digits_0=cast=(GtkScale *)
-OS_gtk_scale_set_digits_1=cast=(gint)
-
-OS_gtk_scale_set_draw_value=
-OS_gtk_scale_set_draw_value_0=cast=(GtkScale *)
-OS_gtk_scale_set_draw_value_1=cast=(gboolean)
-
-OS_gtk_scrolled_window_get_hadjustment=
-OS_gtk_scrolled_window_get_hadjustment_0=cast=(GtkScrolledWindow *)
-
-OS_gtk_scrolled_window_get_policy=
-OS_gtk_scrolled_window_get_policy_0=cast=(GtkScrolledWindow *)
-OS_gtk_scrolled_window_get_policy_1=cast=(GtkPolicyType *)
-OS_gtk_scrolled_window_get_policy_2=cast=(GtkPolicyType *)
-
-OS_gtk_scrolled_window_get_shadow_type=
-OS_gtk_scrolled_window_get_shadow_type_0=cast=(GtkScrolledWindow *)
-
-OS_gtk_scrolled_window_get_vadjustment=
-OS_gtk_scrolled_window_get_vadjustment_0=cast=(GtkScrolledWindow *)
-
-OS_gtk_scrolled_window_new=
-OS_gtk_scrolled_window_new_0=cast=(GtkAdjustment *)
-OS_gtk_scrolled_window_new_1=cast=(GtkAdjustment *)
-
-OS_gtk_scrolled_window_set_placement=
-OS_gtk_scrolled_window_set_placement_0=cast=(GtkScrolledWindow *)
-OS_gtk_scrolled_window_set_placement_1=cast=(GtkCornerType)
-
-OS_gtk_scrolled_window_set_policy=
-OS_gtk_scrolled_window_set_policy_0=cast=(GtkScrolledWindow *)
-OS_gtk_scrolled_window_set_policy_1=cast=(GtkPolicyType)
-OS_gtk_scrolled_window_set_policy_2=cast=(GtkPolicyType)
-
-OS_gtk_scrolled_window_set_shadow_type=
-OS_gtk_scrolled_window_set_shadow_type_0=cast=(GtkScrolledWindow *)
-OS_gtk_scrolled_window_set_shadow_type_1=cast=(GtkShadowType)
-
-OS_gtk_selection_data_free=
-OS_gtk_selection_data_free_0=cast=(GtkSelectionData *)
-
-OS_gtk_selection_data_set=
-OS_gtk_selection_data_set_0=cast=(GtkSelectionData *)
-OS_gtk_selection_data_set_1=cast=(GdkAtom)
-OS_gtk_selection_data_set_2=cast=(gint)
-OS_gtk_selection_data_set_3=cast=(const guchar *)
-OS_gtk_selection_data_set_4=cast=(gint)
-
-OS_gtk_separator_menu_item_new=
-
-OS_gtk_set_locale=
-
-OS_gtk_settings_get_default=
-
-OS_gtk_socket_get_id=
-OS_gtk_socket_get_id_0=cast=GtkSocket *
-
-OS_gtk_socket_new=
-
-OS_gtk_style_get_base=
-OS_gtk_style_get_base_0=cast=(GtkStyle *)
-OS_gtk_style_get_base_1=
-OS_gtk_style_get_base_2=flags=no_in
-
-OS_gtk_style_get_bg=
-OS_gtk_style_get_bg_0=cast=(GtkStyle *)
-OS_gtk_style_get_bg_1=
-OS_gtk_style_get_bg_2=flags=no_in
-
-OS_gtk_style_get_black=
-OS_gtk_style_get_black_0=cast=(GtkStyle *)
-OS_gtk_style_get_black_1=flags=no_in
-
-OS_gtk_style_get_dark=
-OS_gtk_style_get_dark_0=cast=(GtkStyle *)
-OS_gtk_style_get_dark_1=
-OS_gtk_style_get_dark_2=flags=no_in
-
-OS_gtk_style_get_fg=
-OS_gtk_style_get_fg_0=cast=(GtkStyle *)
-OS_gtk_style_get_fg_1=
-OS_gtk_style_get_fg_2=flags=no_in
-
-OS_gtk_style_get_font_desc=
-OS_gtk_style_get_font_desc_0=cast=(GtkStyle *)
-
-OS_gtk_style_get_light=
-OS_gtk_style_get_light_0=cast=(GtkStyle *)
-OS_gtk_style_get_light_1=
-OS_gtk_style_get_light_2=flags=no_in
-
-OS_gtk_style_get_text=
-OS_gtk_style_get_text_0=cast=(GtkStyle *)
-OS_gtk_style_get_text_1=
-OS_gtk_style_get_text_2=flags=no_in
-
-OS_gtk_style_get_xthickness=
-OS_gtk_style_get_xthickness_0=cast=(GtkStyle *)
-
-OS_gtk_style_get_ythickness=
-OS_gtk_style_get_ythickness_0=cast=(GtkStyle *)
-
-OS_gtk_target_list_new=
-OS_gtk_target_list_new_0=cast=(const GtkTargetEntry *)
-OS_gtk_target_list_new_1=cast=(guint)
-
-OS_gtk_target_list_unref=
-OS_gtk_target_list_unref_0=cast=(GtkTargetList *)
-
-OS_gtk_text_buffer_copy_clipboard=
-OS_gtk_text_buffer_copy_clipboard_0=cast=(GtkTextBuffer *)
-OS_gtk_text_buffer_copy_clipboard_1=cast=(GtkClipboard *)
-
-OS_gtk_text_buffer_cut_clipboard=
-OS_gtk_text_buffer_cut_clipboard_0=cast=(GtkTextBuffer *)
-OS_gtk_text_buffer_cut_clipboard_1=cast=(GtkClipboard *)
-OS_gtk_text_buffer_cut_clipboard_2=cast=(gboolean)
-
-OS_gtk_text_buffer_delete=
-OS_gtk_text_buffer_delete_0=cast=(GtkTextBuffer *)
-OS_gtk_text_buffer_delete_1=cast=(GtkTextIter *)
-OS_gtk_text_buffer_delete_2=cast=(GtkTextIter *)
-
-OS_gtk_text_buffer_get_bounds=
-OS_gtk_text_buffer_get_bounds_0=cast=(GtkTextBuffer *)
-OS_gtk_text_buffer_get_bounds_1=cast=(GtkTextIter *)
-OS_gtk_text_buffer_get_bounds_2=cast=(GtkTextIter *)
-
-OS_gtk_text_buffer_get_char_count=
-OS_gtk_text_buffer_get_char_count_0=cast=(GtkTextBuffer *)
-
-OS_gtk_text_buffer_get_end_iter=
-OS_gtk_text_buffer_get_end_iter_0=cast=(GtkTextBuffer *)
-OS_gtk_text_buffer_get_end_iter_1=cast=(GtkTextIter *)
-
-OS_gtk_text_buffer_get_insert=
-OS_gtk_text_buffer_get_insert_0=cast=(GtkTextBuffer *)
-
-OS_gtk_text_buffer_get_iter_at_line=
-OS_gtk_text_buffer_get_iter_at_line_0=cast=(GtkTextBuffer *)
-OS_gtk_text_buffer_get_iter_at_line_1=cast=(GtkTextIter *)
-OS_gtk_text_buffer_get_iter_at_line_2=cast=(gint)
-
-OS_gtk_text_buffer_get_iter_at_mark=
-OS_gtk_text_buffer_get_iter_at_mark_0=cast=(GtkTextBuffer *)
-OS_gtk_text_buffer_get_iter_at_mark_1=cast=(GtkTextIter *)
-OS_gtk_text_buffer_get_iter_at_mark_2=cast=(GtkTextMark *)
-
-OS_gtk_text_buffer_get_iter_at_offset=
-OS_gtk_text_buffer_get_iter_at_offset_0=cast=(GtkTextBuffer *)
-OS_gtk_text_buffer_get_iter_at_offset_1=cast=(GtkTextIter *)
-OS_gtk_text_buffer_get_iter_at_offset_2=cast=(gint)
-
-OS_gtk_text_buffer_get_line_count=
-OS_gtk_text_buffer_get_line_count_0=cast=(GtkTextBuffer *)
-
-OS_gtk_text_buffer_get_selection_bound=
-OS_gtk_text_buffer_get_selection_bound_0=cast=(GtkTextBuffer *)
-
-OS_gtk_text_buffer_get_selection_bounds=
-OS_gtk_text_buffer_get_selection_bounds_0=cast=(GtkTextBuffer *)
-OS_gtk_text_buffer_get_selection_bounds_1=cast=(GtkTextIter *)
-OS_gtk_text_buffer_get_selection_bounds_2=cast=(GtkTextIter *)
-
-OS_gtk_text_buffer_get_text=
-OS_gtk_text_buffer_get_text_0=cast=(GtkTextBuffer *)
-OS_gtk_text_buffer_get_text_1=cast=(GtkTextIter *)
-OS_gtk_text_buffer_get_text_2=cast=(GtkTextIter *)
-OS_gtk_text_buffer_get_text_3=cast=(gboolean)
-
-OS_gtk_1text_1buffer_1insert__II_3BI=
-OS_gtk_1text_1buffer_1insert__II_3BI_0=cast=(GtkTextBuffer *)
-OS_gtk_1text_1buffer_1insert__II_3BI_1=cast=(GtkTextIter *)
-OS_gtk_1text_1buffer_1insert__II_3BI_2=cast=(const gchar *)
-OS_gtk_1text_1buffer_1insert__II_3BI_3=cast=(gint)
-
-OS_gtk_1text_1buffer_1insert__I_3B_3BI=
-OS_gtk_1text_1buffer_1insert__I_3B_3BI_0=cast=(GtkTextBuffer *)
-OS_gtk_1text_1buffer_1insert__I_3B_3BI_1=cast=(GtkTextIter *)
-OS_gtk_1text_1buffer_1insert__I_3B_3BI_2=cast=(const gchar *)
-OS_gtk_1text_1buffer_1insert__I_3B_3BI_3=cast=(gint)
-
-OS_gtk_text_buffer_move_mark=
-OS_gtk_text_buffer_move_mark_0=cast=(GtkTextBuffer *)
-OS_gtk_text_buffer_move_mark_1=cast=(GtkTextMark *)
-OS_gtk_text_buffer_move_mark_2=cast=(const GtkTextIter *)
-
-OS_gtk_text_buffer_paste_clipboard=
-OS_gtk_text_buffer_paste_clipboard_0=cast=(GtkTextBuffer *)
-OS_gtk_text_buffer_paste_clipboard_1=cast=(GtkClipboard *)
-OS_gtk_text_buffer_paste_clipboard_2=cast=(GtkTextIter *)
-OS_gtk_text_buffer_paste_clipboard_3=cast=(gboolean)
-
-OS_gtk_text_buffer_place_cursor=
-OS_gtk_text_buffer_place_cursor_0=cast=(GtkTextBuffer *)
-OS_gtk_text_buffer_place_cursor_1=cast=(const GtkTextIter *)
-
-OS_gtk_text_buffer_set_text=
-OS_gtk_text_buffer_set_text_0=cast=(GtkTextBuffer *)
-OS_gtk_text_buffer_set_text_1=cast=(const gchar *)
-OS_gtk_text_buffer_set_text_2=cast=(gint)
-
-OS_gtk_text_iter_get_line=
-OS_gtk_text_iter_get_line_0=cast=(const GtkTextIter *)
-
-OS_gtk_text_iter_get_offset=
-OS_gtk_text_iter_get_offset_0=cast=(const GtkTextIter *)
-
-OS_gtk_text_view_buffer_to_window_coords=
-OS_gtk_text_view_buffer_to_window_coords_0=cast=(GtkTextView *)
-OS_gtk_text_view_buffer_to_window_coords_1=cast=(GtkTextWindowType)
-OS_gtk_text_view_buffer_to_window_coords_2=cast=(gint)
-OS_gtk_text_view_buffer_to_window_coords_3=cast=(gint)
-OS_gtk_text_view_buffer_to_window_coords_4=cast=(gint *)
-OS_gtk_text_view_buffer_to_window_coords_5=cast=(gint *)
-
-OS_gtk_text_view_get_buffer=
-OS_gtk_text_view_get_buffer_0=cast=(GtkTextView *)
-
-OS_gtk_text_view_get_editable=
-OS_gtk_text_view_get_editable_0=cast=(GtkTextView *)
-
-OS_gtk_text_view_get_iter_location=
-OS_gtk_text_view_get_iter_location_0=cast=(GtkTextView *)
-OS_gtk_text_view_get_iter_location_1=cast=(const GtkTextIter *)
-OS_gtk_text_view_get_iter_location_2=cast=(GdkRectangle *)
-
-OS_gtk_text_view_get_line_at_y=
-OS_gtk_text_view_get_line_at_y_0=cast=(GtkTextView *)
-OS_gtk_text_view_get_line_at_y_1=cast=(GtkTextIter *)
-OS_gtk_text_view_get_line_at_y_2=cast=(gint)
-OS_gtk_text_view_get_line_at_y_3=cast=(gint *)
-
-OS_gtk_text_view_get_visible_rect=
-OS_gtk_text_view_get_visible_rect_0=cast=(GtkTextView *)
-OS_gtk_text_view_get_visible_rect_1=cast=(GdkRectangle *)
-
-OS_gtk_text_view_get_window=
-OS_gtk_text_view_get_window_0=cast=(GtkTextView *)
-OS_gtk_text_view_get_window_1=cast=(GtkTextWindowType)
-
-OS_gtk_text_view_new=
-
-OS_gtk_text_view_scroll_mark_onscreen=
-OS_gtk_text_view_scroll_mark_onscreen_0=cast=(GtkTextView *)
-OS_gtk_text_view_scroll_mark_onscreen_1=cast=(GtkTextMark *)
-
-OS_gtk_text_view_scroll_to_iter=
-OS_gtk_text_view_scroll_to_iter_0=cast=(GtkTextView *)
-OS_gtk_text_view_scroll_to_iter_1=cast=(GtkTextIter *)
-OS_gtk_text_view_scroll_to_iter_2=cast=(gdouble)
-OS_gtk_text_view_scroll_to_iter_3=cast=(gboolean)
-OS_gtk_text_view_scroll_to_iter_4=cast=(gdouble)
-OS_gtk_text_view_scroll_to_iter_5=cast=(gdouble)
-
-OS_gtk_text_view_set_editable=
-OS_gtk_text_view_set_editable_0=cast=(GtkTextView *)
-OS_gtk_text_view_set_editable_1=cast=(gboolean)
-
-OS_gtk_text_view_set_justification=
-OS_gtk_text_view_set_justification_0=cast=(GtkTextView *)
-OS_gtk_text_view_set_justification_1=
-
-OS_gtk_text_view_set_tabs=
-OS_gtk_text_view_set_tabs_0=cast=(GtkTextView *)
-OS_gtk_text_view_set_tabs_1=cast=(PangoTabArray *)
-
-OS_gtk_text_view_set_wrap_mode=
-OS_gtk_text_view_set_wrap_mode_0=cast=(GtkTextView *)
-OS_gtk_text_view_set_wrap_mode_1=
-
-OS_gtk_timeout_add=
-OS_gtk_timeout_add_0=cast=(guint32)
-OS_gtk_timeout_add_1=cast=(GtkFunction)
-OS_gtk_timeout_add_2=cast=(gpointer)
-
-OS_gtk_timeout_remove=
-OS_gtk_timeout_remove_0=cast=(guint)
-
-OS_gtk_toggle_button_get_active=
-OS_gtk_toggle_button_get_active_0=cast=(GtkToggleButton *)
-
-OS_gtk_toggle_button_new=
-
-OS_gtk_toggle_button_set_active=
-OS_gtk_toggle_button_set_active_0=cast=(GtkToggleButton *)
-OS_gtk_toggle_button_set_active_1=cast=(gboolean)
-
-OS_gtk_toggle_button_set_mode=
-OS_gtk_toggle_button_set_mode_0=cast=(GtkToggleButton *)
-OS_gtk_toggle_button_set_mode_1=cast=(gboolean)
-
-OS_gtk_toolbar_insert_widget=
-OS_gtk_toolbar_insert_widget_0=cast=(GtkToolbar *)
-OS_gtk_toolbar_insert_widget_1=cast=(GtkWidget *)
-OS_gtk_toolbar_insert_widget_2=cast=(const char *)
-OS_gtk_toolbar_insert_widget_3=cast=(const char *)
-OS_gtk_toolbar_insert_widget_4=cast=(gint)
-
-OS_gtk_toolbar_new=
-
-OS_gtk_toolbar_set_orientation=
-OS_gtk_toolbar_set_orientation_0=cast=(GtkToolbar *)
-OS_gtk_toolbar_set_orientation_1=cast=(GtkOrientation)
-
-OS_gtk_tooltips_disable=
-OS_gtk_tooltips_disable_0=cast=(GtkTooltips *)
-
-OS_gtk_tooltips_enable=
-OS_gtk_tooltips_enable_0=cast=(GtkTooltips *)
-
-OS_gtk_tooltips_new=
-
-OS_gtk_tooltips_set_tip=
-OS_gtk_tooltips_set_tip_0=cast=(GtkTooltips *)
-OS_gtk_tooltips_set_tip_1=cast=(GtkWidget *)
-OS_gtk_tooltips_set_tip_2=cast=(const gchar *)
-OS_gtk_tooltips_set_tip_3=cast=(const gchar *)
-
-OS_gtk_1tree_1model_1get__III_3II=
-OS_gtk_1tree_1model_1get__III_3II_0=cast=(GtkTreeModel *)
-OS_gtk_1tree_1model_1get__III_3II_1=cast=(GtkTreeIter *)
-OS_gtk_1tree_1model_1get__III_3II_2=
-OS_gtk_1tree_1model_1get__III_3II_3=
-OS_gtk_1tree_1model_1get__III_3II_4=
-
-OS_gtk_1tree_1model_1get__III_3JI=
-OS_gtk_1tree_1model_1get__III_3JI_0=cast=(GtkTreeModel *)
-OS_gtk_1tree_1model_1get__III_3JI_1=cast=(GtkTreeIter *)
-OS_gtk_1tree_1model_1get__III_3JI_2=
-OS_gtk_1tree_1model_1get__III_3JI_3=
-OS_gtk_1tree_1model_1get__III_3JI_4=
-
-OS_gtk_tree_model_get_iter=
-OS_gtk_tree_model_get_iter_0=cast=(GtkTreeModel *)
-OS_gtk_tree_model_get_iter_1=cast=(GtkTreeIter *)
-OS_gtk_tree_model_get_iter_2=cast=(GtkTreePath *)
-
-OS_gtk_tree_model_get_iter_first=
-OS_gtk_tree_model_get_iter_first_0=cast=(GtkTreeModel *)
-OS_gtk_tree_model_get_iter_first_1=cast=(GtkTreeIter *)
-
-OS_gtk_tree_model_get_n_columns=
-OS_gtk_tree_model_get_n_columns_0=cast=(GtkTreeModel *)
-
-OS_gtk_tree_model_get_path=
-OS_gtk_tree_model_get_path_0=cast=(GtkTreeModel *)
-OS_gtk_tree_model_get_path_1=cast=(GtkTreeIter *)
-
-OS_gtk_tree_model_get_type=
-
-OS_gtk_tree_model_iter_children=
-OS_gtk_tree_model_iter_children_0=cast=(GtkTreeModel *)
-OS_gtk_tree_model_iter_children_1=cast=(GtkTreeIter *)
-OS_gtk_tree_model_iter_children_2=cast=(GtkTreeIter *)
-
-OS_gtk_tree_model_iter_n_children=
-OS_gtk_tree_model_iter_n_children_0=cast=(GtkTreeModel *)
-OS_gtk_tree_model_iter_n_children_1=cast=(GtkTreeIter *)
-
-OS_gtk_tree_model_iter_next=
-OS_gtk_tree_model_iter_next_0=cast=(GtkTreeModel *)
-OS_gtk_tree_model_iter_next_1=cast=(GtkTreeIter *)
-
-OS_gtk_tree_model_iter_nth_child=
-OS_gtk_tree_model_iter_nth_child_0=cast=(GtkTreeModel *)
-OS_gtk_tree_model_iter_nth_child_1=cast=(GtkTreeIter *)
-OS_gtk_tree_model_iter_nth_child_2=cast=(GtkTreeIter *)
-OS_gtk_tree_model_iter_nth_child_3=
-
-OS_gtk_tree_path_append_index=
-OS_gtk_tree_path_append_index_0=cast=(GtkTreePath *)
-OS_gtk_tree_path_append_index_1=
-
-OS_gtk_tree_path_free=
-OS_gtk_tree_path_free_0=cast=(GtkTreePath *)
-
-OS_gtk_tree_path_get_depth=
-OS_gtk_tree_path_get_depth_0=cast=(GtkTreePath *)
-
-OS_gtk_tree_path_get_indices=
-OS_gtk_tree_path_get_indices_0=cast=(GtkTreePath *)
-
-OS_gtk_tree_path_new=
-
-OS_gtk_tree_path_new_first=
-
-OS_gtk_1tree_1path_1new_1from_1string__I=
-OS_gtk_1tree_1path_1new_1from_1string__I_0=cast=(const gchar *)
-
-OS_gtk_1tree_1path_1new_1from_1string___3B=
-OS_gtk_1tree_1path_1new_1from_1string___3B_0=cast=(const gchar *)
-
-OS_gtk_tree_path_up=
-OS_gtk_tree_path_up_0=cast=(GtkTreePath *)
-
-OS_gtk_tree_selection_get_selected=
-OS_gtk_tree_selection_get_selected_0=cast=(GtkTreeSelection *)
-OS_gtk_tree_selection_get_selected_1=cast=(GtkTreeModel **)
-OS_gtk_tree_selection_get_selected_2=cast=(GtkTreeIter *)
-
-OS_gtk_tree_selection_get_selected_rows=flags=dynamic
-OS_gtk_tree_selection_get_selected_rows_0=cast=(GtkTreeSelection *)
-OS_gtk_tree_selection_get_selected_rows_1=cast=(GtkTreeModel **)
-
-OS_gtk_tree_selection_path_is_selected=
-OS_gtk_tree_selection_path_is_selected_0=cast=(GtkTreeSelection *)
-OS_gtk_tree_selection_path_is_selected_1=cast=(GtkTreePath *)
-
-OS_gtk_tree_selection_select_all=
-OS_gtk_tree_selection_select_all_0=cast=(GtkTreeSelection *)
-
-OS_gtk_tree_selection_select_iter=
-OS_gtk_tree_selection_select_iter_0=cast=(GtkTreeSelection *)
-OS_gtk_tree_selection_select_iter_1=cast=(GtkTreeIter *)
-
-OS_gtk_tree_selection_selected_foreach=
-OS_gtk_tree_selection_selected_foreach_0=cast=(GtkTreeSelection *)
-OS_gtk_tree_selection_selected_foreach_1=cast=(GtkTreeSelectionForeachFunc)
-OS_gtk_tree_selection_selected_foreach_2=cast=(gpointer)
-
-OS_gtk_tree_selection_set_mode=
-OS_gtk_tree_selection_set_mode_0=cast=(GtkTreeSelection *)
-OS_gtk_tree_selection_set_mode_1=cast=(GtkSelectionMode)
-
-OS_gtk_tree_selection_unselect_all=
-OS_gtk_tree_selection_unselect_all_0=cast=(GtkTreeSelection *)
-
-OS_gtk_tree_selection_unselect_iter=
-OS_gtk_tree_selection_unselect_iter_0=cast=(GtkTreeSelection *)
-OS_gtk_tree_selection_unselect_iter_1=cast=(GtkTreeIter *)
-
-OS_gtk_tree_store_append=
-OS_gtk_tree_store_append_0=cast=(GtkTreeStore *)
-OS_gtk_tree_store_append_1=cast=(GtkTreeIter *)
-OS_gtk_tree_store_append_2=cast=(GtkTreeIter *)
-
-OS_gtk_tree_store_clear=
-OS_gtk_tree_store_clear_0=cast=(GtkTreeStore *)
-
-OS_gtk_tree_store_insert=
-OS_gtk_tree_store_insert_0=cast=(GtkTreeStore *)
-OS_gtk_tree_store_insert_1=cast=(GtkTreeIter *)
-OS_gtk_tree_store_insert_2=cast=(GtkTreeIter *)
-OS_gtk_tree_store_insert_3=cast=(gint)
-
-OS_gtk_tree_store_newv=
-OS_gtk_tree_store_newv_0=
-OS_gtk_tree_store_newv_1=cast=(GType *)
-
-OS_gtk_tree_store_remove=
-OS_gtk_tree_store_remove_0=cast=(GtkTreeStore *)
-OS_gtk_tree_store_remove_1=cast=(GtkTreeIter *)
-
-OS_gtk_1tree_1store_1set__IIIII=
-OS_gtk_1tree_1store_1set__IIIII_0=cast=(GtkTreeStore *)
-OS_gtk_1tree_1store_1set__IIIII_1=cast=(GtkTreeIter *)
-OS_gtk_1tree_1store_1set__IIIII_2=
-OS_gtk_1tree_1store_1set__IIIII_3=
-OS_gtk_1tree_1store_1set__IIIII_4=
-
-OS_gtk_1tree_1store_1set__IIIJI=
-OS_gtk_1tree_1store_1set__IIIJI_0=cast=(GtkTreeStore *)
-OS_gtk_1tree_1store_1set__IIIJI_1=cast=(GtkTreeIter *)
-OS_gtk_1tree_1store_1set__IIIJI_2=
-OS_gtk_1tree_1store_1set__IIIJI_3=
-OS_gtk_1tree_1store_1set__IIIJI_4=
-
-OS_gtk_1tree_1store_1set__IIILorg_eclipse_swt_internal_gtk_GdkColor_2I=
-OS_gtk_1tree_1store_1set__IIILorg_eclipse_swt_internal_gtk_GdkColor_2I_0=cast=(GtkTreeStore *)
-OS_gtk_1tree_1store_1set__IIILorg_eclipse_swt_internal_gtk_GdkColor_2I_1=cast=(GtkTreeIter *)
-OS_gtk_1tree_1store_1set__IIILorg_eclipse_swt_internal_gtk_GdkColor_2I_2=
-OS_gtk_1tree_1store_1set__IIILorg_eclipse_swt_internal_gtk_GdkColor_2I_3=
-OS_gtk_1tree_1store_1set__IIILorg_eclipse_swt_internal_gtk_GdkColor_2I_4=
-
-OS_gtk_1tree_1store_1set__IIIZI=
-OS_gtk_1tree_1store_1set__IIIZI_0=cast=(GtkTreeStore *)
-OS_gtk_1tree_1store_1set__IIIZI_1=cast=(GtkTreeIter *)
-OS_gtk_1tree_1store_1set__IIIZI_2=
-OS_gtk_1tree_1store_1set__IIIZI_3=
-OS_gtk_1tree_1store_1set__IIIZI_4=
-
-OS_gtk_1tree_1store_1set__III_3BI=
-OS_gtk_1tree_1store_1set__III_3BI_0=cast=(GtkTreeStore *)
-OS_gtk_1tree_1store_1set__III_3BI_1=cast=(GtkTreeIter *)
-OS_gtk_1tree_1store_1set__III_3BI_2=
-OS_gtk_1tree_1store_1set__III_3BI_3=
-OS_gtk_1tree_1store_1set__III_3BI_4=
-
-OS_gtk_tree_view_collapse_row=
-OS_gtk_tree_view_collapse_row_0=cast=(GtkTreeView *)
-OS_gtk_tree_view_collapse_row_1=cast=(GtkTreePath *)
-
-OS_gtk_tree_view_column_add_attribute=
-OS_gtk_tree_view_column_add_attribute_0=cast=(GtkTreeViewColumn *)
-OS_gtk_tree_view_column_add_attribute_1=cast=(GtkCellRenderer *)
-OS_gtk_tree_view_column_add_attribute_2=cast=(const gchar *)
-OS_gtk_tree_view_column_add_attribute_3=cast=(gint)
-
-OS_gtk_tree_view_column_cell_get_position=flags=dynamic
-OS_gtk_tree_view_column_cell_get_position_0=cast=(GtkTreeViewColumn *)
-OS_gtk_tree_view_column_cell_get_position_1=cast=(GtkCellRenderer *)
-OS_gtk_tree_view_column_cell_get_position_2=cast=(gint *)
-OS_gtk_tree_view_column_cell_get_position_3=cast=(gint *)
-
-OS_gtk_tree_view_column_cell_get_size=
-OS_gtk_tree_view_column_cell_get_size_0=cast=(GtkTreeViewColumn *)
-OS_gtk_tree_view_column_cell_get_size_1=cast=(GdkRectangle *)
-OS_gtk_tree_view_column_cell_get_size_2=cast=(gint *)
-OS_gtk_tree_view_column_cell_get_size_3=cast=(gint *)
-OS_gtk_tree_view_column_cell_get_size_4=cast=(gint *)
-OS_gtk_tree_view_column_cell_get_size_5=cast=(gint *)
-
-OS_gtk_tree_view_column_cell_set_cell_data=
-OS_gtk_tree_view_column_cell_set_cell_data_0=cast=GtkTreeViewColumn *
-OS_gtk_tree_view_column_cell_set_cell_data_1=cast=GtkTreeModel *
-OS_gtk_tree_view_column_cell_set_cell_data_2=cast=GtkTreeIter *
-OS_gtk_tree_view_column_cell_set_cell_data_3=
-OS_gtk_tree_view_column_cell_set_cell_data_4=
-
-OS_gtk_tree_view_column_clear=
-OS_gtk_tree_view_column_clear_0=cast=(GtkTreeViewColumn *)
-
-OS_gtk_tree_view_column_get_cell_renderers=
-OS_gtk_tree_view_column_get_cell_renderers_0=cast=(GtkTreeViewColumn *)
-
-OS_gtk_tree_view_column_get_resizable=
-OS_gtk_tree_view_column_get_resizable_0=cast=(GtkTreeViewColumn *)
-
-OS_gtk_tree_view_column_get_spacing=
-OS_gtk_tree_view_column_get_spacing_0=cast=(GtkTreeViewColumn *)
-
-OS_gtk_tree_view_column_get_visible=
-OS_gtk_tree_view_column_get_visible_0=cast=(GtkTreeViewColumn *)
-
-OS_gtk_tree_view_column_get_width=
-OS_gtk_tree_view_column_get_width_0=cast=(GtkTreeViewColumn *)
-
-OS_gtk_tree_view_column_new=
-
-OS_gtk_tree_view_column_pack_end=
-OS_gtk_tree_view_column_pack_end_0=cast=(GtkTreeViewColumn *)
-OS_gtk_tree_view_column_pack_end_1=cast=(GtkCellRenderer *)
-OS_gtk_tree_view_column_pack_end_2=cast=(gboolean)
-
-OS_gtk_tree_view_column_pack_start=
-OS_gtk_tree_view_column_pack_start_0=cast=(GtkTreeViewColumn *)
-OS_gtk_tree_view_column_pack_start_1=cast=(GtkCellRenderer *)
-OS_gtk_tree_view_column_pack_start_2=cast=(gboolean)
-
-OS_gtk_tree_view_column_set_alignment=
-OS_gtk_tree_view_column_set_alignment_0=cast=(GtkTreeViewColumn *)
-OS_gtk_tree_view_column_set_alignment_1=
-
-OS_gtk_tree_view_column_set_cell_data_func=
-OS_gtk_tree_view_column_set_cell_data_func_0=cast=GtkTreeViewColumn *
-OS_gtk_tree_view_column_set_cell_data_func_1=cast=GtkCellRenderer *
-OS_gtk_tree_view_column_set_cell_data_func_2=cast=(GtkTreeCellDataFunc)
-OS_gtk_tree_view_column_set_cell_data_func_3=cast=(gpointer)
-OS_gtk_tree_view_column_set_cell_data_func_4=cast=GtkDestroyNotify
-
-OS_gtk_tree_view_column_set_clickable=
-OS_gtk_tree_view_column_set_clickable_0=cast=(GtkTreeViewColumn *)
-OS_gtk_tree_view_column_set_clickable_1=cast=(gboolean)
-
-OS_gtk_tree_view_column_set_fixed_width=
-OS_gtk_tree_view_column_set_fixed_width_0=cast=(GtkTreeViewColumn *)
-OS_gtk_tree_view_column_set_fixed_width_1=cast=(gint)
-
-OS_gtk_tree_view_column_set_resizable=
-OS_gtk_tree_view_column_set_resizable_0=cast=(GtkTreeViewColumn *)
-OS_gtk_tree_view_column_set_resizable_1=cast=(gboolean)
-
-OS_gtk_tree_view_column_set_sizing=
-OS_gtk_tree_view_column_set_sizing_0=cast=(GtkTreeViewColumn *)
-OS_gtk_tree_view_column_set_sizing_1=cast=(GtkTreeViewColumnSizing)
-
-OS_gtk_tree_view_column_set_title=
-OS_gtk_tree_view_column_set_title_0=cast=(GtkTreeViewColumn *)
-OS_gtk_tree_view_column_set_title_1=cast=(const gchar *)
-
-OS_gtk_tree_view_column_set_visible=
-OS_gtk_tree_view_column_set_visible_0=cast=(GtkTreeViewColumn *)
-OS_gtk_tree_view_column_set_visible_1=
-
-OS_gtk_tree_view_column_set_widget=
-OS_gtk_tree_view_column_set_widget_0=cast=(GtkTreeViewColumn *)
-OS_gtk_tree_view_column_set_widget_1=cast=(GtkWidget *)
-
-OS_gtk_tree_view_expand_row=
-OS_gtk_tree_view_expand_row_0=cast=(GtkTreeView *)
-OS_gtk_tree_view_expand_row_1=cast=(GtkTreePath *)
-OS_gtk_tree_view_expand_row_2=cast=(gboolean)
-
-OS_gtk_tree_view_get_bin_window=
-OS_gtk_tree_view_get_bin_window_0=cast=(GtkTreeView *)
-
-OS_gtk_tree_view_get_cell_area=
-OS_gtk_tree_view_get_cell_area_0=cast=(GtkTreeView *)
-OS_gtk_tree_view_get_cell_area_1=cast=(GtkTreePath *)
-OS_gtk_tree_view_get_cell_area_2=cast=(GtkTreeViewColumn *)
-OS_gtk_tree_view_get_cell_area_3=cast=(GdkRectangle *)
-
-OS_gtk_tree_view_get_column=
-OS_gtk_tree_view_get_column_0=cast=(GtkTreeView *)
-OS_gtk_tree_view_get_column_1=cast=(gint)
-
-OS_gtk_tree_view_get_cursor=
-OS_gtk_tree_view_get_cursor_0=cast=(GtkTreeView *)
-OS_gtk_tree_view_get_cursor_1=cast=(GtkTreePath **)
-OS_gtk_tree_view_get_cursor_2=cast=(GtkTreeViewColumn **)
-
-OS_gtk_tree_view_get_expander_column=
-OS_gtk_tree_view_get_expander_column_0=cast=(GtkTreeView *)
-
-OS_gtk_tree_view_get_headers_visible=
-OS_gtk_tree_view_get_headers_visible_0=cast=(GtkTreeView *)
-
-OS_gtk_tree_view_get_path_at_pos=
-OS_gtk_tree_view_get_path_at_pos_0=cast=(GtkTreeView *)
-OS_gtk_tree_view_get_path_at_pos_1=cast=(gint)
-OS_gtk_tree_view_get_path_at_pos_2=cast=(gint)
-OS_gtk_tree_view_get_path_at_pos_3=cast=(GtkTreePath **)
-OS_gtk_tree_view_get_path_at_pos_4=cast=(GtkTreeViewColumn **)
-OS_gtk_tree_view_get_path_at_pos_5=cast=(gint *)
-OS_gtk_tree_view_get_path_at_pos_6=cast=(gint *)
-
-OS_gtk_tree_view_get_rules_hint=
-OS_gtk_tree_view_get_rules_hint_0=cast=(GtkTreeView *)
-
-OS_gtk_tree_view_get_selection=
-OS_gtk_tree_view_get_selection_0=cast=(GtkTreeView *)
-
-OS_gtk_tree_view_get_visible_rect=
-OS_gtk_tree_view_get_visible_rect_0=cast=(GtkTreeView *)
-OS_gtk_tree_view_get_visible_rect_1=
-
-OS_gtk_tree_view_insert_column=
-OS_gtk_tree_view_insert_column_0=cast=(GtkTreeView *)
-OS_gtk_tree_view_insert_column_1=cast=(GtkTreeViewColumn *)
-OS_gtk_tree_view_insert_column_2=cast=(gint)
-
-OS_gtk_tree_view_new_with_model=
-OS_gtk_tree_view_new_with_model_0=cast=(GtkTreeModel *)
-
-OS_gtk_tree_view_remove_column=
-OS_gtk_tree_view_remove_column_0=cast=(GtkTreeView *)
-OS_gtk_tree_view_remove_column_1=cast=(GtkTreeViewColumn *)
-
-OS_gtk_tree_view_row_expanded=
-OS_gtk_tree_view_row_expanded_0=cast=(GtkTreeView *)
-OS_gtk_tree_view_row_expanded_1=cast=(GtkTreePath *)
-
-OS_gtk_tree_view_scroll_to_cell=
-OS_gtk_tree_view_scroll_to_cell_0=cast=(GtkTreeView *)
-OS_gtk_tree_view_scroll_to_cell_1=cast=(GtkTreePath *)
-OS_gtk_tree_view_scroll_to_cell_2=cast=(GtkTreeViewColumn *)
-OS_gtk_tree_view_scroll_to_cell_3=cast=(gboolean)
-OS_gtk_tree_view_scroll_to_cell_4=cast=(gfloat)
-OS_gtk_tree_view_scroll_to_cell_5=cast=(gfloat)
-
-OS_gtk_tree_view_scroll_to_point=
-OS_gtk_tree_view_scroll_to_point_0=cast=GtkTreeView *
-OS_gtk_tree_view_scroll_to_point_1=cast=(gint)
-OS_gtk_tree_view_scroll_to_point_2=cast=(gint)
-
-OS_gtk_tree_view_set_cursor=
-OS_gtk_tree_view_set_cursor_0=cast=(GtkTreeView *)
-OS_gtk_tree_view_set_cursor_1=cast=(GtkTreePath *)
-OS_gtk_tree_view_set_cursor_2=cast=(GtkTreeViewColumn *)
-OS_gtk_tree_view_set_cursor_3=
-
-OS_gtk_tree_view_set_drag_dest_row=
-OS_gtk_tree_view_set_drag_dest_row_0=cast=(GtkTreeView *)
-OS_gtk_tree_view_set_drag_dest_row_1=cast=(GtkTreePath *)
-OS_gtk_tree_view_set_drag_dest_row_2=
-
-OS_gtk_tree_view_set_headers_visible=
-OS_gtk_tree_view_set_headers_visible_0=cast=(GtkTreeView *)
-OS_gtk_tree_view_set_headers_visible_1=cast=(gboolean)
-
-OS_gtk_tree_view_set_model=
-OS_gtk_tree_view_set_model_0=cast=(GtkTreeView *)
-OS_gtk_tree_view_set_model_1=cast=(GtkTreeModel *)
-
-OS_gtk_tree_view_set_rules_hint=
-OS_gtk_tree_view_set_rules_hint_0=cast=(GtkTreeView *)
-OS_gtk_tree_view_set_rules_hint_1=
-
-OS_gtk_tree_view_tree_to_widget_coords=
-OS_gtk_tree_view_tree_to_widget_coords_0=cast=(GtkTreeView *)
-OS_gtk_tree_view_tree_to_widget_coords_1=cast=(gint)
-OS_gtk_tree_view_tree_to_widget_coords_2=cast=gint
-OS_gtk_tree_view_tree_to_widget_coords_3=cast=gint *
-OS_gtk_tree_view_tree_to_widget_coords_4=cast=gint *
-
-OS_gtk_tree_view_unset_rows_drag_dest=
-OS_gtk_tree_view_unset_rows_drag_dest_0=cast=(GtkTreeView *)
-
-OS_gtk_tree_view_widget_to_tree_coords=
-OS_gtk_tree_view_widget_to_tree_coords_0=cast=(GtkTreeView *)
-OS_gtk_tree_view_widget_to_tree_coords_1=
-OS_gtk_tree_view_widget_to_tree_coords_2=
-OS_gtk_tree_view_widget_to_tree_coords_3=
-OS_gtk_tree_view_widget_to_tree_coords_4=
-
-OS_gtk_vbox_new=
-OS_gtk_vbox_new_0=cast=(gboolean)
-OS_gtk_vbox_new_1=cast=(gint)
-
-OS_gtk_vscale_new=
-OS_gtk_vscale_new_0=cast=(GtkAdjustment *)
-
-OS_gtk_vscrollbar_new=
-OS_gtk_vscrollbar_new_0=cast=(GtkAdjustment *)
-
-OS_gtk_vseparator_new=
-
-OS_gtk_widget_add_accelerator=
-OS_gtk_widget_add_accelerator_0=cast=(GtkWidget *)
-OS_gtk_widget_add_accelerator_1=cast=(const gchar *)
-OS_gtk_widget_add_accelerator_2=cast=(GtkAccelGroup *)
-OS_gtk_widget_add_accelerator_3=cast=(guint)
-OS_gtk_widget_add_accelerator_4=cast=(GdkModifierType)
-OS_gtk_widget_add_accelerator_5=
-
-OS_gtk_widget_add_events=
-OS_gtk_widget_add_events_0=cast=(GtkWidget *)
-OS_gtk_widget_add_events_1=cast=(gint)
-
-OS_gtk_widget_child_focus=
-OS_gtk_widget_child_focus_0=cast=(GtkWidget *)
-OS_gtk_widget_child_focus_1=
-
-OS_gtk_1widget_1create_1pango_1layout__II=
-OS_gtk_1widget_1create_1pango_1layout__II_0=cast=(GtkWidget *)
-OS_gtk_1widget_1create_1pango_1layout__II_1=cast=(const gchar *)
-
-OS_gtk_1widget_1create_1pango_1layout__I_3B=
-OS_gtk_1widget_1create_1pango_1layout__I_3B_0=cast=(GtkWidget *)
-OS_gtk_1widget_1create_1pango_1layout__I_3B_1=cast=(const gchar *)
-
-OS_gtk_widget_destroy=
-OS_gtk_widget_destroy_0=cast=(GtkWidget *)
-
-OS_gtk_widget_event=
-OS_gtk_widget_event_0=cast=GtkWidget *
-OS_gtk_widget_event_1=cast=GdkEvent *
-
-OS_gtk_widget_get_child_visible=
-OS_gtk_widget_get_child_visible_0=cast=(GtkWidget *)
-
-OS_gtk_widget_get_default_direction=
-
-OS_gtk_widget_get_default_style=
-
-OS_gtk_widget_get_direction=
-OS_gtk_widget_get_direction_0=cast=(GtkWidget *)
-
-OS_gtk_widget_get_events=
-OS_gtk_widget_get_events_0=cast=GtkWidget *
-
-OS_gtk_widget_get_modifier_style=
-OS_gtk_widget_get_modifier_style_0=cast=(GtkWidget *)
-
-OS_gtk_widget_get_pango_context=
-OS_gtk_widget_get_pango_context_0=cast=(GtkWidget *)
-
-OS_gtk_widget_get_parent=
-OS_gtk_widget_get_parent_0=cast=(GtkWidget *)
-
-OS_gtk_widget_get_style=
-OS_gtk_widget_get_style_0=cast=(GtkWidget *)
-
-OS_gtk_widget_get_toplevel=
-OS_gtk_widget_get_toplevel_0=cast=(GtkWidget *)
-
-OS_gtk_widget_grab_focus=
-OS_gtk_widget_grab_focus_0=cast=(GtkWidget *)
-
-OS_gtk_widget_hide=
-OS_gtk_widget_hide_0=cast=(GtkWidget *)
-
-OS_gtk_widget_is_focus=
-OS_gtk_widget_is_focus_0=cast=(GtkWidget *)
-
-OS_gtk_widget_map=
-OS_gtk_widget_map_0=cast=(GtkWidget *)
-
-OS_gtk_widget_mnemonic_activate=
-OS_gtk_widget_mnemonic_activate_0=cast=(GtkWidget *)
-OS_gtk_widget_mnemonic_activate_1=cast=gboolean
-
-OS_gtk_widget_modify_base=
-OS_gtk_widget_modify_base_0=cast=(GtkWidget *)
-OS_gtk_widget_modify_base_1=cast=(GtkStateType)
-OS_gtk_widget_modify_base_2=cast=(GdkColor *)
-
-OS_gtk_widget_modify_bg=
-OS_gtk_widget_modify_bg_0=cast=(GtkWidget *)
-OS_gtk_widget_modify_bg_1=cast=(GtkStateType)
-OS_gtk_widget_modify_bg_2=cast=(GdkColor *)
-
-OS_gtk_widget_modify_fg=
-OS_gtk_widget_modify_fg_0=cast=(GtkWidget *)
-OS_gtk_widget_modify_fg_1=cast=(GtkStateType)
-OS_gtk_widget_modify_fg_2=cast=(GdkColor *)
-
-OS_gtk_widget_modify_font=
-OS_gtk_widget_modify_font_0=cast=(GtkWidget *)
-OS_gtk_widget_modify_font_1=cast=(PangoFontDescription *)
-
-OS_gtk_widget_modify_style=
-OS_gtk_widget_modify_style_0=cast=(GtkWidget *)
-OS_gtk_widget_modify_style_1=cast=(GtkRcStyle *)
-
-OS_gtk_widget_modify_text=
-OS_gtk_widget_modify_text_0=cast=(GtkWidget *)
-OS_gtk_widget_modify_text_1=cast=(GtkStateType)
-OS_gtk_widget_modify_text_2=cast=(GdkColor *)
-
-OS_gtk_widget_realize=
-OS_gtk_widget_realize_0=cast=(GtkWidget *)
-
-OS_gtk_widget_remove_accelerator=
-OS_gtk_widget_remove_accelerator_0=cast=(GtkWidget *)
-OS_gtk_widget_remove_accelerator_1=cast=(GtkAccelGroup *)
-OS_gtk_widget_remove_accelerator_2=cast=(guint)
-OS_gtk_widget_remove_accelerator_3=cast=(GdkModifierType)
-
-OS_gtk_widget_reparent=
-OS_gtk_widget_reparent_0=cast=(GtkWidget *)
-OS_gtk_widget_reparent_1=cast=(GtkWidget *)
-
-OS_gtk_widget_set_default_direction=
-OS_gtk_widget_set_default_direction_0=cast=(GtkTextDirection)
-
-OS_gtk_widget_set_direction=
-OS_gtk_widget_set_direction_0=cast=(GtkWidget *)
-OS_gtk_widget_set_direction_1=cast=(GtkTextDirection)
-
-OS_gtk_widget_set_double_buffered=
-OS_gtk_widget_set_double_buffered_0=cast=(GtkWidget *)
-OS_gtk_widget_set_double_buffered_1=cast=(gboolean)
-
-OS_gtk_widget_set_name=
-OS_gtk_widget_set_name_0=cast=(GtkWidget *)
-OS_gtk_widget_set_name_1=cast=(const char *)
-
-OS_gtk_widget_set_redraw_on_allocate=
-OS_gtk_widget_set_redraw_on_allocate_0=cast=(GtkWidget *)
-OS_gtk_widget_set_redraw_on_allocate_1=cast=(gboolean)
-
-OS_gtk_widget_set_sensitive=
-OS_gtk_widget_set_sensitive_0=cast=(GtkWidget *)
-OS_gtk_widget_set_sensitive_1=cast=(gboolean)
-
-OS_gtk_widget_set_size_request=
-OS_gtk_widget_set_size_request_0=cast=(GtkWidget *)
-OS_gtk_widget_set_size_request_1=cast=(gint)
-OS_gtk_widget_set_size_request_2=cast=(gint)
-
-OS_gtk_widget_set_state=
-OS_gtk_widget_set_state_0=cast=(GtkWidget *)
-OS_gtk_widget_set_state_1=cast=(GtkStateType)
-
-OS_gtk_widget_shape_combine_mask=
-OS_gtk_widget_shape_combine_mask_0=cast=(GtkWidget *)
-OS_gtk_widget_shape_combine_mask_1=cast=(GdkBitmap *)
-OS_gtk_widget_shape_combine_mask_2=cast=gint
-OS_gtk_widget_shape_combine_mask_3=cast=gint
-
-OS_gtk_widget_show=
-OS_gtk_widget_show_0=cast=(GtkWidget *)
-
-OS_gtk_widget_show_now=
-OS_gtk_widget_show_now_0=cast=(GtkWidget *)
-
-OS_gtk_widget_size_allocate=
-OS_gtk_widget_size_allocate_0=cast=(GtkWidget *)
-OS_gtk_widget_size_allocate_1=cast=(GtkAllocation *)
-
-OS_gtk_widget_size_request=
-OS_gtk_widget_size_request_0=cast=(GtkWidget *)
-OS_gtk_widget_size_request_1=cast=(GtkRequisition *)
-
-OS_gtk_1widget_1style_1get__I_3B_3II=
-OS_gtk_1widget_1style_1get__I_3B_3II_0=cast=(GtkWidget *)
-OS_gtk_1widget_1style_1get__I_3B_3II_1=cast=(const gchar *)
-OS_gtk_1widget_1style_1get__I_3B_3II_2=
-OS_gtk_1widget_1style_1get__I_3B_3II_3=
-
-OS_gtk_1widget_1style_1get__I_3B_3JI=
-OS_gtk_1widget_1style_1get__I_3B_3JI_0=cast=(GtkWidget *)
-OS_gtk_1widget_1style_1get__I_3B_3JI_1=cast=(const gchar *)
-OS_gtk_1widget_1style_1get__I_3B_3JI_2=
-OS_gtk_1widget_1style_1get__I_3B_3JI_3=
-
-OS_gtk_widget_unrealize=
-OS_gtk_widget_unrealize_0=cast=(GtkWidget *)
-
-OS_gtk_window_activate_default=
-OS_gtk_window_activate_default_0=cast=(GtkWindow *)
-
-OS_gtk_window_add_accel_group=
-OS_gtk_window_add_accel_group_0=cast=(GtkWindow *)
-OS_gtk_window_add_accel_group_1=cast=(GtkAccelGroup *)
-
-OS_gtk_window_deiconify=
-OS_gtk_window_deiconify_0=cast=(GtkWindow *)
-
-OS_gtk_window_get_focus=
-OS_gtk_window_get_focus_0=cast=(GtkWindow *)
-
-OS_gtk_window_get_mnemonic_modifier=
-OS_gtk_window_get_mnemonic_modifier_0=cast=(GtkWindow *)
-
-OS_gtk_window_get_position=
-OS_gtk_window_get_position_0=cast=(GtkWindow *)
-OS_gtk_window_get_position_1=cast=(gint *)
-OS_gtk_window_get_position_2=cast=(gint *)
-
-OS_gtk_window_get_size=
-OS_gtk_window_get_size_0=cast=(GtkWindow *)
-OS_gtk_window_get_size_1=cast=(gint *)
-OS_gtk_window_get_size_2=cast=(gint *)
-
-OS_gtk_window_iconify=
-OS_gtk_window_iconify_0=cast=(GtkWindow *)
-
-OS_gtk_window_maximize=
-OS_gtk_window_maximize_0=cast=(GtkWindow *)
-
-OS_gtk_window_move=
-OS_gtk_window_move_0=cast=(GtkWindow *)
-OS_gtk_window_move_1=cast=(gint)
-OS_gtk_window_move_2=cast=(gint)
-
-OS_gtk_window_new=
-OS_gtk_window_new_0=cast=(GtkWindowType)
-
-OS_gtk_window_present=
-OS_gtk_window_present_0=cast=(GtkWindow *)
-
-OS_gtk_window_remove_accel_group=
-OS_gtk_window_remove_accel_group_0=cast=(GtkWindow *)
-OS_gtk_window_remove_accel_group_1=cast=(GtkAccelGroup *)
-
-OS_gtk_window_resize=
-OS_gtk_window_resize_0=cast=(GtkWindow *)
-OS_gtk_window_resize_1=cast=(gint)
-OS_gtk_window_resize_2=cast=(gint)
-
-OS_gtk_window_set_default=
-OS_gtk_window_set_default_0=cast=(GtkWindow *)
-OS_gtk_window_set_default_1=cast=(GtkWidget *)
-
-OS_gtk_window_set_destroy_with_parent=
-OS_gtk_window_set_destroy_with_parent_0=cast=(GtkWindow *)
-OS_gtk_window_set_destroy_with_parent_1=cast=(gboolean)
-
-OS_gtk_window_set_geometry_hints=
-OS_gtk_window_set_geometry_hints_0=cast=GtkWindow *
-OS_gtk_window_set_geometry_hints_1=cast=(GtkWidget *)
-OS_gtk_window_set_geometry_hints_2=
-OS_gtk_window_set_geometry_hints_3=
-
-OS_gtk_window_set_modal=
-OS_gtk_window_set_modal_0=cast=(GtkWindow *)
-OS_gtk_window_set_modal_1=cast=(gboolean)
-
-OS_gtk_window_set_resizable=
-OS_gtk_window_set_resizable_0=cast=(GtkWindow *)
-OS_gtk_window_set_resizable_1=cast=(gboolean)
-
-OS_gtk_window_set_title=
-OS_gtk_window_set_title_0=cast=(GtkWindow *)
-OS_gtk_window_set_title_1=cast=(const gchar *)
-
-OS_gtk_window_set_transient_for=
-OS_gtk_window_set_transient_for_0=cast=(GtkWindow *)
-OS_gtk_window_set_transient_for_1=cast=(GtkWindow *)
-
-OS_gtk_window_set_type_hint=
-OS_gtk_window_set_type_hint_0=cast=(GtkWindow *)
-OS_gtk_window_set_type_hint_1=
-
-OS_gtk_window_unmaximize=
-OS_gtk_window_unmaximize_0=cast=(GtkWindow *)
-
-OS_memmove__ILorg_eclipse_swt_internal_gtk_GInterfaceInfo_2I=
-OS_memmove__ILorg_eclipse_swt_internal_gtk_GInterfaceInfo_2I_0=cast=(void *)
-OS_memmove__ILorg_eclipse_swt_internal_gtk_GInterfaceInfo_2I_1=cast=(const void *),flags=no_out
-OS_memmove__ILorg_eclipse_swt_internal_gtk_GInterfaceInfo_2I_2=cast=(size_t)
-
-OS_memmove__ILorg_eclipse_swt_internal_gtk_GObjectClass_2=
-OS_memmove__ILorg_eclipse_swt_internal_gtk_GObjectClass_2_0=cast=(void *),flags=no_in
-OS_memmove__ILorg_eclipse_swt_internal_gtk_GObjectClass_2_1=cast=(const void *),flags=no_out
-
-OS_memmove__ILorg_eclipse_swt_internal_gtk_GTypeInfo_2I=
-OS_memmove__ILorg_eclipse_swt_internal_gtk_GTypeInfo_2I_0=cast=(void *)
-OS_memmove__ILorg_eclipse_swt_internal_gtk_GTypeInfo_2I_1=cast=(const void *),flags=no_out
-OS_memmove__ILorg_eclipse_swt_internal_gtk_GTypeInfo_2I_2=cast=(size_t)
-
-OS_memmove__ILorg_eclipse_swt_internal_gtk_GdkEventButton_2I=
-OS_memmove__ILorg_eclipse_swt_internal_gtk_GdkEventButton_2I_0=cast=(void *)
-OS_memmove__ILorg_eclipse_swt_internal_gtk_GdkEventButton_2I_1=cast=(const void *),flags=no_out
-OS_memmove__ILorg_eclipse_swt_internal_gtk_GdkEventButton_2I_2=cast=(size_t)
-
-OS_memmove__ILorg_eclipse_swt_internal_gtk_GtkAdjustment_2=
-OS_memmove__ILorg_eclipse_swt_internal_gtk_GtkAdjustment_2_0=cast=(void *)
-OS_memmove__ILorg_eclipse_swt_internal_gtk_GtkAdjustment_2_1=cast=(const void *),flags=no_out
-
-OS_memmove__ILorg_eclipse_swt_internal_gtk_GtkFixed_2=
-OS_memmove__ILorg_eclipse_swt_internal_gtk_GtkFixed_2_0=cast=(void *),flags=no_in
-OS_memmove__ILorg_eclipse_swt_internal_gtk_GtkFixed_2_1=cast=(const void *),flags=no_out
-
-OS_memmove__ILorg_eclipse_swt_internal_gtk_GtkTargetEntry_2I=
-OS_memmove__ILorg_eclipse_swt_internal_gtk_GtkTargetEntry_2I_0=cast=(void *)
-OS_memmove__ILorg_eclipse_swt_internal_gtk_GtkTargetEntry_2I_1=cast=(const void *),flags=no_out
-OS_memmove__ILorg_eclipse_swt_internal_gtk_GtkTargetEntry_2I_2=cast=(size_t)
-
-OS_memmove__ILorg_eclipse_swt_internal_gtk_GtkWidgetClass_2=
-OS_memmove__ILorg_eclipse_swt_internal_gtk_GtkWidgetClass_2_0=
-OS_memmove__ILorg_eclipse_swt_internal_gtk_GtkWidgetClass_2_1=
-
-OS_memmove__ILorg_eclipse_swt_internal_gtk_PangoAttribute_2I=
-OS_memmove__ILorg_eclipse_swt_internal_gtk_PangoAttribute_2I_0=cast=(void *)
-OS_memmove__ILorg_eclipse_swt_internal_gtk_PangoAttribute_2I_1=cast=(const void *),flags=no_out
-OS_memmove__ILorg_eclipse_swt_internal_gtk_PangoAttribute_2I_2=cast=(size_t)
-
-OS_memmove__ILorg_eclipse_swt_internal_gtk_XClientMessageEvent_2I=
-OS_memmove__ILorg_eclipse_swt_internal_gtk_XClientMessageEvent_2I_0=cast=(void *)
-OS_memmove__ILorg_eclipse_swt_internal_gtk_XClientMessageEvent_2I_1=cast=(const void *),flags=no_out
-OS_memmove__ILorg_eclipse_swt_internal_gtk_XClientMessageEvent_2I_2=cast=(size_t)
-
-OS_memmove__ILorg_eclipse_swt_internal_gtk_XCrossingEvent_2I=
-OS_memmove__ILorg_eclipse_swt_internal_gtk_XCrossingEvent_2I_0=cast=(void *)
-OS_memmove__ILorg_eclipse_swt_internal_gtk_XCrossingEvent_2I_1=cast=(const void *),flags=no_out
-OS_memmove__ILorg_eclipse_swt_internal_gtk_XCrossingEvent_2I_2=cast=(size_t)
-
-OS_memmove__ILorg_eclipse_swt_internal_gtk_XExposeEvent_2I=
-OS_memmove__ILorg_eclipse_swt_internal_gtk_XExposeEvent_2I_0=cast=(void *)
-OS_memmove__ILorg_eclipse_swt_internal_gtk_XExposeEvent_2I_1=cast=(const void *),flags=no_out
-OS_memmove__ILorg_eclipse_swt_internal_gtk_XExposeEvent_2I_2=cast=(size_t)
-
-OS_memmove__ILorg_eclipse_swt_internal_gtk_XFocusChangeEvent_2I=
-OS_memmove__ILorg_eclipse_swt_internal_gtk_XFocusChangeEvent_2I_0=cast=(void *)
-OS_memmove__ILorg_eclipse_swt_internal_gtk_XFocusChangeEvent_2I_1=cast=(const void *),flags=no_out
-OS_memmove__ILorg_eclipse_swt_internal_gtk_XFocusChangeEvent_2I_2=cast=(size_t)
-
-OS_memmove__I_3BI=
-OS_memmove__I_3BI_0=cast=(void *)
-OS_memmove__I_3BI_1=cast=(const void *),flags=no_out critical
-OS_memmove__I_3BI_2=cast=(size_t)
-
-OS_memmove__I_3II=
-OS_memmove__I_3II_0=cast=(void *)
-OS_memmove__I_3II_1=cast=(const void *),flags=no_out critical
-OS_memmove__I_3II_2=cast=(size_t)
-
-OS_memmove__Lorg_eclipse_swt_internal_gtk_GObjectClass_2I=
-OS_memmove__Lorg_eclipse_swt_internal_gtk_GObjectClass_2I_0=cast=(void *),flags=no_in
-OS_memmove__Lorg_eclipse_swt_internal_gtk_GObjectClass_2I_1=cast=(const void *)
-
-OS_memmove__Lorg_eclipse_swt_internal_gtk_GTypeQuery_2II=
-OS_memmove__Lorg_eclipse_swt_internal_gtk_GTypeQuery_2II_0=cast=(void *),flags=no_in
-OS_memmove__Lorg_eclipse_swt_internal_gtk_GTypeQuery_2II_1=cast=(const void *)
-OS_memmove__Lorg_eclipse_swt_internal_gtk_GTypeQuery_2II_2=cast=(size_t)
-
-OS_memmove__Lorg_eclipse_swt_internal_gtk_GdkColor_2II=
-OS_memmove__Lorg_eclipse_swt_internal_gtk_GdkColor_2II_0=cast=(void *),flags=no_in
-OS_memmove__Lorg_eclipse_swt_internal_gtk_GdkColor_2II_1=cast=(const void *)
-OS_memmove__Lorg_eclipse_swt_internal_gtk_GdkColor_2II_2=cast=(size_t)
-
-OS_memmove__Lorg_eclipse_swt_internal_gtk_GdkDragContext_2II=
-OS_memmove__Lorg_eclipse_swt_internal_gtk_GdkDragContext_2II_0=cast=(void *),flags=no_in
-OS_memmove__Lorg_eclipse_swt_internal_gtk_GdkDragContext_2II_1=cast=(const void *)
-OS_memmove__Lorg_eclipse_swt_internal_gtk_GdkDragContext_2II_2=cast=(size_t)
-
-OS_memmove__Lorg_eclipse_swt_internal_gtk_GdkEventButton_2II=
-OS_memmove__Lorg_eclipse_swt_internal_gtk_GdkEventButton_2II_0=cast=(void *),flags=no_in
-OS_memmove__Lorg_eclipse_swt_internal_gtk_GdkEventButton_2II_1=cast=(const void *)
-OS_memmove__Lorg_eclipse_swt_internal_gtk_GdkEventButton_2II_2=cast=(size_t)
-
-OS_memmove__Lorg_eclipse_swt_internal_gtk_GdkEventCrossing_2II=
-OS_memmove__Lorg_eclipse_swt_internal_gtk_GdkEventCrossing_2II_0=cast=(void *),flags=no_in
-OS_memmove__Lorg_eclipse_swt_internal_gtk_GdkEventCrossing_2II_1=cast=(const void *)
-OS_memmove__Lorg_eclipse_swt_internal_gtk_GdkEventCrossing_2II_2=cast=(size_t)
-
-OS_memmove__Lorg_eclipse_swt_internal_gtk_GdkEventExpose_2II=
-OS_memmove__Lorg_eclipse_swt_internal_gtk_GdkEventExpose_2II_0=cast=(void *),flags=no_in
-OS_memmove__Lorg_eclipse_swt_internal_gtk_GdkEventExpose_2II_1=cast=(const void *)
-OS_memmove__Lorg_eclipse_swt_internal_gtk_GdkEventExpose_2II_2=cast=(size_t)
-
-OS_memmove__Lorg_eclipse_swt_internal_gtk_GdkEventFocus_2II=
-OS_memmove__Lorg_eclipse_swt_internal_gtk_GdkEventFocus_2II_0=cast=(void *),flags=no_in
-OS_memmove__Lorg_eclipse_swt_internal_gtk_GdkEventFocus_2II_1=cast=(const void *)
-OS_memmove__Lorg_eclipse_swt_internal_gtk_GdkEventFocus_2II_2=cast=(size_t)
-
-OS_memmove__Lorg_eclipse_swt_internal_gtk_GdkEventKey_2II=
-OS_memmove__Lorg_eclipse_swt_internal_gtk_GdkEventKey_2II_0=cast=(void *),flags=no_in
-OS_memmove__Lorg_eclipse_swt_internal_gtk_GdkEventKey_2II_1=cast=(const void *)
-OS_memmove__Lorg_eclipse_swt_internal_gtk_GdkEventKey_2II_2=cast=(size_t)
-
-OS_memmove__Lorg_eclipse_swt_internal_gtk_GdkEventMotion_2II=
-OS_memmove__Lorg_eclipse_swt_internal_gtk_GdkEventMotion_2II_0=cast=(void *),flags=no_in
-OS_memmove__Lorg_eclipse_swt_internal_gtk_GdkEventMotion_2II_1=cast=(const void *)
-OS_memmove__Lorg_eclipse_swt_internal_gtk_GdkEventMotion_2II_2=cast=(size_t)
-
-OS_memmove__Lorg_eclipse_swt_internal_gtk_GdkEventVisibility_2II=
-OS_memmove__Lorg_eclipse_swt_internal_gtk_GdkEventVisibility_2II_0=cast=(void *),flags=no_in
-OS_memmove__Lorg_eclipse_swt_internal_gtk_GdkEventVisibility_2II_1=cast=(const void *)
-OS_memmove__Lorg_eclipse_swt_internal_gtk_GdkEventVisibility_2II_2=cast=(size_t)
-
-OS_memmove__Lorg_eclipse_swt_internal_gtk_GdkEventWindowState_2II=
-OS_memmove__Lorg_eclipse_swt_internal_gtk_GdkEventWindowState_2II_0=cast=(void *),flags=no_in
-OS_memmove__Lorg_eclipse_swt_internal_gtk_GdkEventWindowState_2II_1=cast=(const void *)
-OS_memmove__Lorg_eclipse_swt_internal_gtk_GdkEventWindowState_2II_2=cast=(size_t)
-
-OS_memmove__Lorg_eclipse_swt_internal_gtk_GdkEvent_2II=
-OS_memmove__Lorg_eclipse_swt_internal_gtk_GdkEvent_2II_0=cast=(void *),flags=no_in
-OS_memmove__Lorg_eclipse_swt_internal_gtk_GdkEvent_2II_1=cast=(const void *)
-OS_memmove__Lorg_eclipse_swt_internal_gtk_GdkEvent_2II_2=cast=(size_t)
-
-OS_memmove__Lorg_eclipse_swt_internal_gtk_GdkImage_2I=
-OS_memmove__Lorg_eclipse_swt_internal_gtk_GdkImage_2I_0=cast=(void *),flags=no_in
-OS_memmove__Lorg_eclipse_swt_internal_gtk_GdkImage_2I_1=cast=(const void *)
-
-OS_memmove__Lorg_eclipse_swt_internal_gtk_GdkRectangle_2II=
-OS_memmove__Lorg_eclipse_swt_internal_gtk_GdkRectangle_2II_0=cast=(void *),flags=no_in
-OS_memmove__Lorg_eclipse_swt_internal_gtk_GdkRectangle_2II_1=cast=(const void *)
-OS_memmove__Lorg_eclipse_swt_internal_gtk_GdkRectangle_2II_2=cast=(size_t)
-
-OS_memmove__Lorg_eclipse_swt_internal_gtk_GdkVisual_2I=
-OS_memmove__Lorg_eclipse_swt_internal_gtk_GdkVisual_2I_0=cast=(void *),flags=no_in
-OS_memmove__Lorg_eclipse_swt_internal_gtk_GdkVisual_2I_1=cast=(const void *)
-
-OS_memmove__Lorg_eclipse_swt_internal_gtk_GtkAdjustment_2I=
-OS_memmove__Lorg_eclipse_swt_internal_gtk_GtkAdjustment_2I_0=cast=(void *),flags=no_in
-OS_memmove__Lorg_eclipse_swt_internal_gtk_GtkAdjustment_2I_1=cast=(const void *)
-
-OS_memmove__Lorg_eclipse_swt_internal_gtk_GtkBorder_2II=
-OS_memmove__Lorg_eclipse_swt_internal_gtk_GtkBorder_2II_0=cast=(void *),flags=no_in
-OS_memmove__Lorg_eclipse_swt_internal_gtk_GtkBorder_2II_1=cast=(const void *)
-OS_memmove__Lorg_eclipse_swt_internal_gtk_GtkBorder_2II_2=cast=(size_t)
-
-OS_memmove__Lorg_eclipse_swt_internal_gtk_GtkColorSelectionDialog_2I=
-OS_memmove__Lorg_eclipse_swt_internal_gtk_GtkColorSelectionDialog_2I_0=cast=(void *),flags=no_in
-OS_memmove__Lorg_eclipse_swt_internal_gtk_GtkColorSelectionDialog_2I_1=cast=(const void *)
-
-OS_memmove__Lorg_eclipse_swt_internal_gtk_GtkCombo_2I=
-OS_memmove__Lorg_eclipse_swt_internal_gtk_GtkCombo_2I_0=cast=(void *),flags=no_in
-OS_memmove__Lorg_eclipse_swt_internal_gtk_GtkCombo_2I_1=cast=(const void *)
-
-OS_memmove__Lorg_eclipse_swt_internal_gtk_GtkFileSelection_2I=
-OS_memmove__Lorg_eclipse_swt_internal_gtk_GtkFileSelection_2I_0=cast=(void *)
-OS_memmove__Lorg_eclipse_swt_internal_gtk_GtkFileSelection_2I_1=cast=(const void *)
-
-OS_memmove__Lorg_eclipse_swt_internal_gtk_GtkFixed_2I=
-OS_memmove__Lorg_eclipse_swt_internal_gtk_GtkFixed_2I_0=cast=(void *),flags=no_in
-OS_memmove__Lorg_eclipse_swt_internal_gtk_GtkFixed_2I_1=cast=(const void *)
-
-OS_memmove__Lorg_eclipse_swt_internal_gtk_GtkSelectionData_2II=
-OS_memmove__Lorg_eclipse_swt_internal_gtk_GtkSelectionData_2II_0=cast=(void *),flags=no_in
-OS_memmove__Lorg_eclipse_swt_internal_gtk_GtkSelectionData_2II_1=cast=(const void *)
-OS_memmove__Lorg_eclipse_swt_internal_gtk_GtkSelectionData_2II_2=cast=(size_t)
-
-OS_memmove__Lorg_eclipse_swt_internal_gtk_GtkTargetPair_2II=
-OS_memmove__Lorg_eclipse_swt_internal_gtk_GtkTargetPair_2II_0=cast=(void *),flags=no_in
-OS_memmove__Lorg_eclipse_swt_internal_gtk_GtkTargetPair_2II_1=cast=(const void *)
-OS_memmove__Lorg_eclipse_swt_internal_gtk_GtkTargetPair_2II_2=cast=(size_t)
-
-OS_memmove__Lorg_eclipse_swt_internal_gtk_GtkWidgetClass_2I=
-OS_memmove__Lorg_eclipse_swt_internal_gtk_GtkWidgetClass_2I_0=
-OS_memmove__Lorg_eclipse_swt_internal_gtk_GtkWidgetClass_2I_1=
-
-OS_memmove__Lorg_eclipse_swt_internal_gtk_PangoAttribute_2II=
-OS_memmove__Lorg_eclipse_swt_internal_gtk_PangoAttribute_2II_0=cast=(void *),flags=no_in
-OS_memmove__Lorg_eclipse_swt_internal_gtk_PangoAttribute_2II_1=cast=(const void *)
-OS_memmove__Lorg_eclipse_swt_internal_gtk_PangoAttribute_2II_2=cast=(size_t)
-
-OS_memmove__Lorg_eclipse_swt_internal_gtk_PangoItem_2II=
-OS_memmove__Lorg_eclipse_swt_internal_gtk_PangoItem_2II_0=cast=(void *),flags=no_in
-OS_memmove__Lorg_eclipse_swt_internal_gtk_PangoItem_2II_1=cast=(const void *)
-OS_memmove__Lorg_eclipse_swt_internal_gtk_PangoItem_2II_2=cast=(size_t)
-
-OS_memmove__Lorg_eclipse_swt_internal_gtk_PangoLayoutLine_2II=
-OS_memmove__Lorg_eclipse_swt_internal_gtk_PangoLayoutLine_2II_0=cast=(void *),flags=no_in
-OS_memmove__Lorg_eclipse_swt_internal_gtk_PangoLayoutLine_2II_1=cast=(const void *)
-OS_memmove__Lorg_eclipse_swt_internal_gtk_PangoLayoutLine_2II_2=cast=(size_t)
-
-OS_memmove__Lorg_eclipse_swt_internal_gtk_PangoLayoutRun_2II=
-OS_memmove__Lorg_eclipse_swt_internal_gtk_PangoLayoutRun_2II_0=cast=(void *),flags=no_in
-OS_memmove__Lorg_eclipse_swt_internal_gtk_PangoLayoutRun_2II_1=cast=(const void *)
-OS_memmove__Lorg_eclipse_swt_internal_gtk_PangoLayoutRun_2II_2=cast=(size_t)
-
-OS_memmove__Lorg_eclipse_swt_internal_gtk_PangoLogAttr_2II=
-OS_memmove__Lorg_eclipse_swt_internal_gtk_PangoLogAttr_2II_0=cast=(void *),flags=no_in
-OS_memmove__Lorg_eclipse_swt_internal_gtk_PangoLogAttr_2II_1=cast=(const void *)
-OS_memmove__Lorg_eclipse_swt_internal_gtk_PangoLogAttr_2II_2=cast=(size_t)
-
-OS_memmove__Lorg_eclipse_swt_internal_gtk_XCrossingEvent_2II=
-OS_memmove__Lorg_eclipse_swt_internal_gtk_XCrossingEvent_2II_0=cast=(void *),flags=no_in
-OS_memmove__Lorg_eclipse_swt_internal_gtk_XCrossingEvent_2II_1=cast=(const void *)
-OS_memmove__Lorg_eclipse_swt_internal_gtk_XCrossingEvent_2II_2=cast=(size_t)
-
-OS_memmove__Lorg_eclipse_swt_internal_gtk_XExposeEvent_2II=
-OS_memmove__Lorg_eclipse_swt_internal_gtk_XExposeEvent_2II_0=cast=(void *),flags=no_in
-OS_memmove__Lorg_eclipse_swt_internal_gtk_XExposeEvent_2II_1=cast=(const void *)
-OS_memmove__Lorg_eclipse_swt_internal_gtk_XExposeEvent_2II_2=cast=(size_t)
-
-OS_memmove__Lorg_eclipse_swt_internal_gtk_XFocusChangeEvent_2II=
-OS_memmove__Lorg_eclipse_swt_internal_gtk_XFocusChangeEvent_2II_0=cast=(void *),flags=no_in
-OS_memmove__Lorg_eclipse_swt_internal_gtk_XFocusChangeEvent_2II_1=cast=(const void *)
-OS_memmove__Lorg_eclipse_swt_internal_gtk_XFocusChangeEvent_2II_2=cast=(size_t)
-
-OS_memmove__Lorg_eclipse_swt_internal_gtk_XVisibilityEvent_2II=
-OS_memmove__Lorg_eclipse_swt_internal_gtk_XVisibilityEvent_2II_0=cast=(void *),flags=no_in
-OS_memmove__Lorg_eclipse_swt_internal_gtk_XVisibilityEvent_2II_1=cast=(const void *)
-OS_memmove__Lorg_eclipse_swt_internal_gtk_XVisibilityEvent_2II_2=cast=(size_t)
-
-OS_memmove___3BII=
-OS_memmove___3BII_0=cast=(void *),flags=no_in critical
-OS_memmove___3BII_1=cast=(const void *)
-OS_memmove___3BII_2=cast=(size_t)
-
-OS_memmove___3CII=
-OS_memmove___3CII_0=cast=(void *),flags=no_in critical
-OS_memmove___3CII_1=cast=(const void *)
-OS_memmove___3CII_2=cast=(size_t)
-
-OS_memmove___3III=
-OS_memmove___3III_0=cast=(void *),flags=no_in critical
-OS_memmove___3III_1=cast=(const void *)
-OS_memmove___3III_2=cast=(size_t)
-
-OS_memmove___3I_3BI=
-OS_memmove___3I_3BI_0=cast=(void *),flags=no_in critical
-OS_memmove___3I_3BI_1=cast=(const void *)
-OS_memmove___3I_3BI_2=cast=(size_t)
-
-OS_memmove___3JII=
-OS_memmove___3JII_0=cast=(void *),flags=no_in critical
-OS_memmove___3JII_1=cast=const void *,flags=no_out critical
-OS_memmove___3JII_2=cast=(size_t)
-
-OS_memset=
-OS_memset_0=cast=(void *)
-OS_memset_1=cast=(char)
-OS_memset_2=cast=(size_t)
-
-OS_pango_attr_background_new=
-OS_pango_attr_background_new_0=
-OS_pango_attr_background_new_1=
-OS_pango_attr_background_new_2=
-
-OS_pango_attr_font_desc_new=
-OS_pango_attr_font_desc_new_0=cast=const PangoFontDescription *
-
-OS_pango_attr_foreground_new=
-OS_pango_attr_foreground_new_0=
-OS_pango_attr_foreground_new_1=
-OS_pango_attr_foreground_new_2=
-
-OS_pango_attr_list_change=
-OS_pango_attr_list_change_0=cast=PangoAttrList *
-OS_pango_attr_list_change_1=cast=PangoAttribute *
-
-OS_pango_attr_list_insert=
-OS_pango_attr_list_insert_0=cast=PangoAttrList *
-OS_pango_attr_list_insert_1=cast=PangoAttribute *
-
-OS_pango_attr_list_new=
-
-OS_pango_attr_list_unref=
-OS_pango_attr_list_unref_0=cast=(PangoAttrList *)
-
-OS_pango_attr_shape_new=
-OS_pango_attr_shape_new_0=
-OS_pango_attr_shape_new_1=
-
-OS_pango_attr_strikethrough_new=
-OS_pango_attr_strikethrough_new_0=
-
-OS_pango_attr_underline_new=
-OS_pango_attr_underline_new_0=
-
-OS_pango_attr_weight_new=
-OS_pango_attr_weight_new_0=
-
-OS_pango_context_get_base_dir=
-OS_pango_context_get_base_dir_0=cast=(PangoContext *)
-
-OS_pango_context_get_language=
-OS_pango_context_get_language_0=cast=(PangoContext *)
-
-OS_pango_context_get_metrics=
-OS_pango_context_get_metrics_0=cast=(PangoContext *)
-OS_pango_context_get_metrics_1=cast=(const PangoFontDescription *)
-OS_pango_context_get_metrics_2=cast=(PangoLanguage *)
-
-OS_pango_context_list_families=
-OS_pango_context_list_families_0=cast=(PangoContext *)
-OS_pango_context_list_families_1=cast=(PangoFontFamily ***)
-OS_pango_context_list_families_2=cast=(int *)
-
-OS_pango_context_set_base_dir=
-OS_pango_context_set_base_dir_0=cast=(PangoContext *)
-OS_pango_context_set_base_dir_1=
-
-OS_pango_context_set_language=
-OS_pango_context_set_language_0=cast=(PangoContext *)
-OS_pango_context_set_language_1=cast=(PangoLanguage *)
-
-OS_pango_font_description_copy=
-OS_pango_font_description_copy_0=cast=(PangoFontDescription *)
-
-OS_pango_font_description_free=
-OS_pango_font_description_free_0=cast=(PangoFontDescription *)
-
-OS_pango_font_description_from_string=
-OS_pango_font_description_from_string_0=cast=(const char *),flags=no_out critical
-
-OS_pango_font_description_get_family=
-OS_pango_font_description_get_family_0=cast=(PangoFontDescription *)
-
-OS_pango_font_description_get_size=
-OS_pango_font_description_get_size_0=cast=(PangoFontDescription *)
-
-OS_pango_font_description_get_style=
-OS_pango_font_description_get_style_0=cast=(PangoFontDescription *)
-
-OS_pango_font_description_get_weight=
-OS_pango_font_description_get_weight_0=cast=(PangoFontDescription *)
-
-OS_pango_font_description_new=
-
-OS_pango_font_description_set_family=
-OS_pango_font_description_set_family_0=cast=(PangoFontDescription *)
-OS_pango_font_description_set_family_1=cast=(const char *),flags=no_out critical
-
-OS_pango_font_description_set_size=
-OS_pango_font_description_set_size_0=cast=(PangoFontDescription *)
-OS_pango_font_description_set_size_1=cast=(gint)
-
-OS_pango_font_description_set_stretch=
-OS_pango_font_description_set_stretch_0=cast=(PangoFontDescription *)
-OS_pango_font_description_set_stretch_1=cast=(PangoStretch)
-
-OS_pango_font_description_set_style=
-OS_pango_font_description_set_style_0=cast=(PangoFontDescription *)
-OS_pango_font_description_set_style_1=cast=(PangoStyle)
-
-OS_pango_font_description_set_weight=
-OS_pango_font_description_set_weight_0=cast=(PangoFontDescription *)
-OS_pango_font_description_set_weight_1=cast=(PangoWeight)
-
-OS_pango_font_description_to_string=
-OS_pango_font_description_to_string_0=cast=(PangoFontDescription *)
-
-OS_pango_font_face_describe=
-OS_pango_font_face_describe_0=cast=(PangoFontFace *)
-
-OS_pango_font_family_get_name=
-OS_pango_font_family_get_name_0=cast=(PangoFontFamily *)
-
-OS_pango_font_family_list_faces=
-OS_pango_font_family_list_faces_0=cast=(PangoFontFamily *)
-OS_pango_font_family_list_faces_1=cast=(PangoFontFace ***)
-OS_pango_font_family_list_faces_2=cast=(int *)
-
-OS_pango_font_get_metrics=
-OS_pango_font_get_metrics_0=cast=PangoFont *
-OS_pango_font_get_metrics_1=cast=PangoLanguage *
-
-OS_pango_font_metrics_get_approximate_char_width=
-OS_pango_font_metrics_get_approximate_char_width_0=cast=(PangoFontMetrics *)
-
-OS_pango_font_metrics_get_ascent=
-OS_pango_font_metrics_get_ascent_0=cast=(PangoFontMetrics *)
-
-OS_pango_font_metrics_get_descent=
-OS_pango_font_metrics_get_descent_0=cast=(PangoFontMetrics *)
-
-OS_pango_font_metrics_unref=
-OS_pango_font_metrics_unref_0=cast=(PangoFontMetrics *)
-
-OS_pango_language_from_string=
-OS_pango_language_from_string_0=cast=(const char *),flags=no_out
-
-OS_pango_layout_context_changed=
-OS_pango_layout_context_changed_0=cast=PangoLayout *
-
-OS_pango_layout_get_alignment=
-OS_pango_layout_get_alignment_0=cast=PangoLayout*
-
-OS_pango_layout_get_attributes=
-OS_pango_layout_get_attributes_0=cast=PangoLayout *
-
-OS_pango_layout_get_iter=
-OS_pango_layout_get_iter_0=cast=PangoLayout*
-
-OS_pango_layout_get_line=
-OS_pango_layout_get_line_0=cast=PangoLayout *
-OS_pango_layout_get_line_1=
-
-OS_pango_layout_get_line_count=
-OS_pango_layout_get_line_count_0=cast=PangoLayout*
-
-OS_pango_layout_get_log_attrs=
-OS_pango_layout_get_log_attrs_0=cast=PangoLayout*
-OS_pango_layout_get_log_attrs_1=cast=PangoLogAttr **
-OS_pango_layout_get_log_attrs_2=cast=(int *)
-
-OS_pango_layout_get_size=
-OS_pango_layout_get_size_0=cast=(PangoLayout *)
-OS_pango_layout_get_size_1=cast=(int *)
-OS_pango_layout_get_size_2=cast=(int *)
-
-OS_pango_layout_get_spacing=
-OS_pango_layout_get_spacing_0=cast=PangoLayout*
-
-OS_pango_layout_get_tabs=
-OS_pango_layout_get_tabs_0=cast=PangoLayout*
-
-OS_pango_layout_get_text=
-OS_pango_layout_get_text_0=cast=PangoLayout *
-
-OS_pango_layout_get_width=
-OS_pango_layout_get_width_0=cast=PangoLayout *
-
-OS_pango_layout_index_to_pos=
-OS_pango_layout_index_to_pos_0=cast=(PangoLayout*)
-OS_pango_layout_index_to_pos_1=
-OS_pango_layout_index_to_pos_2=
-
-OS_pango_layout_iter_free=
-OS_pango_layout_iter_free_0=cast=PangoLayoutIter*
-
-OS_pango_layout_iter_get_index=
-OS_pango_layout_iter_get_index_0=cast=(PangoLayoutIter*)
-
-OS_pango_layout_iter_get_line_extents=
-OS_pango_layout_iter_get_line_extents_0=cast=(PangoLayoutIter*)
-OS_pango_layout_iter_get_line_extents_1=
-OS_pango_layout_iter_get_line_extents_2=
-
-OS_pango_layout_iter_get_run=
-OS_pango_layout_iter_get_run_0=cast=PangoLayoutIter*
-
-OS_pango_layout_iter_next_line=
-OS_pango_layout_iter_next_line_0=cast=PangoLayoutIter*
-
-OS_pango_layout_iter_next_run=
-OS_pango_layout_iter_next_run_0=cast=PangoLayoutIter*
-
-OS_pango_layout_line_get_extents=
-OS_pango_layout_line_get_extents_0=cast=PangoLayoutLine*
-OS_pango_layout_line_get_extents_1=cast=PangoRectangle *
-OS_pango_layout_line_get_extents_2=cast=PangoRectangle *
-
-OS_pango_layout_line_x_to_index=
-OS_pango_layout_line_x_to_index_0=cast=PangoLayoutLine*
-OS_pango_layout_line_x_to_index_1=
-OS_pango_layout_line_x_to_index_2=cast=int *
-OS_pango_layout_line_x_to_index_3=cast=int *
-
-OS_pango_layout_new=
-OS_pango_layout_new_0=cast=(PangoContext *)
-
-OS_pango_layout_set_alignment=
-OS_pango_layout_set_alignment_0=cast=(PangoLayout *)
-OS_pango_layout_set_alignment_1=
-
-OS_pango_layout_set_attributes=
-OS_pango_layout_set_attributes_0=cast=(PangoLayout *)
-OS_pango_layout_set_attributes_1=cast=PangoAttrList *
-
-OS_pango_layout_set_font_description=
-OS_pango_layout_set_font_description_0=cast=(PangoLayout *)
-OS_pango_layout_set_font_description_1=cast=(PangoFontDescription *)
-
-OS_pango_layout_set_single_paragraph_mode=
-OS_pango_layout_set_single_paragraph_mode_0=cast=PangoLayout *
-OS_pango_layout_set_single_paragraph_mode_1=cast=gboolean
-
-OS_pango_layout_set_spacing=
-OS_pango_layout_set_spacing_0=cast=(PangoLayout *)
-OS_pango_layout_set_spacing_1=
-
-OS_pango_layout_set_tabs=
-OS_pango_layout_set_tabs_0=cast=PangoLayout *
-OS_pango_layout_set_tabs_1=cast=(PangoTabArray *)
-
-OS_pango_layout_set_text=
-OS_pango_layout_set_text_0=cast=(PangoLayout *)
-OS_pango_layout_set_text_1=cast=(const char *),flags=no_out critical
-OS_pango_layout_set_text_2=cast=(int)
-
-OS_pango_layout_set_width=
-OS_pango_layout_set_width_0=cast=(PangoLayout *)
-OS_pango_layout_set_width_1=
-
-OS_pango_layout_set_wrap=
-OS_pango_layout_set_wrap_0=cast=PangoLayout *
-OS_pango_layout_set_wrap_1=
-
-OS_pango_layout_xy_to_index=
-OS_pango_layout_xy_to_index_0=cast=PangoLayout *
-OS_pango_layout_xy_to_index_1=
-OS_pango_layout_xy_to_index_2=
-OS_pango_layout_xy_to_index_3=cast=int *
-OS_pango_layout_xy_to_index_4=cast=int *
-
-OS_pango_tab_array_free=
-OS_pango_tab_array_free_0=cast=(PangoTabArray *)
-
-OS_pango_tab_array_get_size=
-OS_pango_tab_array_get_size_0=cast=(PangoTabArray *)
-
-OS_pango_tab_array_get_tabs=
-OS_pango_tab_array_get_tabs_0=cast=(PangoTabArray *)
-OS_pango_tab_array_get_tabs_1=cast=(PangoTabAlign **)
-OS_pango_tab_array_get_tabs_2=cast=(int **)
-
-OS_pango_tab_array_new=
-OS_pango_tab_array_new_0=cast=(gint)
-OS_pango_tab_array_new_1=cast=(gboolean)
-
-OS_pango_tab_array_set_tab=
-OS_pango_tab_array_set_tab_0=cast=(PangoTabArray *)
-OS_pango_tab_array_set_tab_1=cast=(gint)
-OS_pango_tab_array_set_tab_2=cast=(PangoTabAlign)
-OS_pango_tab_array_set_tab_3=cast=(gint)
-
-OS_strlen=
-OS_strlen_0=cast=(const char *)
-
-
-org_eclipse_swt_internal_gtk_PangoAttribute=
-PangoAttribute_klass=cast=const PangoAttrClass *
-PangoAttribute_start_index=
-PangoAttribute_end_index=
-
-org_eclipse_swt_internal_gtk_PangoItem=
-PangoItem_offset=
-PangoItem_length=
-PangoItem_num_chars=
-PangoItem_analysis_shape_engine=accessor=analysis.shape_engine,cast=(PangoEngineShape *)
-PangoItem_analysis_lang_engine=accessor=analysis.lang_engine,cast=PangoEngineLang *
-PangoItem_analysis_font=accessor=analysis.font,cast=PangoFont *
-PangoItem_analysis_level=accessor=analysis.level
-PangoItem_analysis_language=accessor=analysis.language,cast=(PangoLanguage *)
-PangoItem_analysis_extra_attrs=accessor=analysis.extra_attrs,cast=GSList *
-
-org_eclipse_swt_internal_gtk_PangoLayoutLine=
-PangoLayoutLine_layout=cast=PangoLayout *
-PangoLayoutLine_start_index=
-PangoLayoutLine_length=
-PangoLayoutLine_runs=cast=GSList *
-
-org_eclipse_swt_internal_gtk_PangoLayoutRun=
-PangoLayoutRun_item=cast=PangoItem *
-PangoLayoutRun_glyphs=cast=PangoGlyphString *
-
-org_eclipse_swt_internal_gtk_PangoLogAttr=
-PangoLogAttr_is_line_break=
-PangoLogAttr_is_mandatory_break=
-PangoLogAttr_is_char_break=
-PangoLogAttr_is_white=
-PangoLogAttr_is_cursor_position=
-PangoLogAttr_is_word_start=
-PangoLogAttr_is_word_end=
-PangoLogAttr_is_sentence_boundary=
-PangoLogAttr_is_sentence_start=
-PangoLogAttr_is_sentence_end=
-
-org_eclipse_swt_internal_gtk_PangoRectangle=
-PangoRectangle_x=
-PangoRectangle_y=
-PangoRectangle_width=
-PangoRectangle_height=
-
-org_eclipse_swt_internal_gtk_XAnyEvent=
-XAnyEvent_serial=
-XAnyEvent_send_event=
-XAnyEvent_display=cast=Display *
-XAnyEvent_window=cast=Window
-
-org_eclipse_swt_internal_gtk_XClientMessageEvent=
-XClientMessageEvent_type=
-XClientMessageEvent_serial=
-XClientMessageEvent_send_event=
-XClientMessageEvent_display=cast=(Display *)
-XClientMessageEvent_window=cast=(Window)
-XClientMessageEvent_message_type=cast=(Atom)
-XClientMessageEvent_format=
-XClientMessageEvent_data=accessor=data.l,cast=(long *)
-
-org_eclipse_swt_internal_gtk_XCrossingEvent=
-XCrossingEvent_root=cast=(Window)
-XCrossingEvent_subwindow=cast=(Window)
-XCrossingEvent_time=cast=Time
-XCrossingEvent_x=
-XCrossingEvent_y=
-XCrossingEvent_x_root=
-XCrossingEvent_y_root=
-XCrossingEvent_mode=
-XCrossingEvent_detail=
-XCrossingEvent_same_screen=cast=Bool
-XCrossingEvent_focus=cast=Bool
-XCrossingEvent_state=cast=unsigned int
-
-org_eclipse_swt_internal_gtk_XEvent=
-XEvent_type=
-
-org_eclipse_swt_internal_gtk_XExposeEvent=
-XExposeEvent_x=
-XExposeEvent_y=
-XExposeEvent_width=
-XExposeEvent_height=
-XExposeEvent_count=
-
-org_eclipse_swt_internal_gtk_XFocusChangeEvent=
-XFocusChangeEvent_mode=
-XFocusChangeEvent_detail=
-
-org_eclipse_swt_internal_gtk_XVisibilityEvent=
-XVisibilityEvent_state=
-
-org_eclipse_swt_internal_gtk_XWindowChanges=
-XWindowChanges_x=
-XWindowChanges_y=
-XWindowChanges_width=
-XWindowChanges_height=
-XWindowChanges_border_width=
-XWindowChanges_sibling=
-XWindowChanges_stack_mode=
-
diff --git a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.gtk.properties b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.gtk.properties
deleted file mode 100644
index d39c9f4722..0000000000
--- a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.gtk.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-###############################################################################
-# Copyright (c) 2004 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Common Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/cpl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-swt_copyright=/*******************************************************************************\n\
- * Copyright (c) 2000, 2004 IBM Corporation and others. All rights reserved.\n\
- * The contents of this file are made available under the terms\n\
- * of the GNU Lesser General Public License (LGPL) Version 2.1 that\n\
- * accompanies this distribution (lgpl-v21.txt). The LGPL is also\n\
- * available at http://www.gnu.org/licenses/lgpl.html. If the version\n\
- * of the LGPL at http://www.gnu.org is different to the version of\n\
- * the LGPL accompanying this distribution and there is any conflict\n\
- * between the two license versions, the terms of the LGPL accompanying\n\
- * this distribution shall govern.\n\
- * \n\
- * Contributors:\n\
- * IBM Corporation - initial API and implementation\n\
- *******************************************************************************/\n
- \ No newline at end of file
diff --git a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.kde.KDE.properties b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.kde.KDE.properties
deleted file mode 100644
index 8f3d00c796..0000000000
--- a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.kde.KDE.properties
+++ /dev/null
@@ -1,146 +0,0 @@
-###############################################################################
-# Copyright (c) 2004 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Common Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/cpl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-org_eclipse_swt_internal_kde_KDE=flags=cpp
-KDE_KApplication_new=flags=new
-KDE_KApplication_new_0=
-KDE_KApplication_new_1=cast=(char **)
-KDE_KApplication_new_2=cast=(QCString *),flags=struct
-KDE_KApplication_new_3=cast=(bool)
-KDE_KApplication_new_4=cast=(bool)
-
-KDE_KGlobal_iconLoader=accessor=KGlobal::iconLoader
-
-KDE_KIconLoader_iconPath=accessor=iconPath,copy=QString,flags=cpp
-KDE_KIconLoader_iconPath_0=cast=(KIconLoader *)
-KDE_KIconLoader_iconPath_1=cast=(QString *),flags=struct
-KDE_KIconLoader_iconPath_2=
-KDE_KIconLoader_iconPath_3=cast=bool
-
-KDE_KMimeTypeListIterator_delete=flags=delete
-KDE_KMimeTypeListIterator_delete_0=cast=(QValueListIterator<KMimeType::Ptr> *)
-
-KDE_KMimeTypeListIterator_dereference=copy=KSharedPtr<KMimeType>
-KDE_KMimeTypeListIterator_dereference_0=
-
-KDE_KMimeTypeListIterator_equals=
-KDE_KMimeTypeListIterator_equals_0=
-KDE_KMimeTypeListIterator_equals_1=
-
-KDE_KMimeTypeListIterator_increment=
-KDE_KMimeTypeListIterator_increment_0=
-
-KDE_KMimeTypeList_begin=copy=QValueListIterator<KMimeType::Ptr>,flags=cpp
-KDE_KMimeTypeList_begin_0=cast=(KMimeType::List *)
-
-KDE_KMimeTypeList_delete=flags=delete
-KDE_KMimeTypeList_delete_0=cast=(KMimeType::List *)
-
-KDE_KMimeTypeList_end=copy=QValueListIterator<KMimeType::Ptr>,flags=cpp
-KDE_KMimeTypeList_end_0=cast=(KMimeType::List *)
-
-KDE_KMimeType_allMimeTypes=accessor=KMimeType::allMimeTypes,copy=KMimeType::List
-
-KDE_KMimeType_delete=flags=delete
-KDE_KMimeType_delete_0=cast=(KSharedPtr<KMimeType> *)
-
-KDE_KMimeType_icon=copy=QString,flags=cpp
-KDE_KMimeType_icon_0=cast=(KSharedPtr<KMimeType> *),flags=struct
-KDE_KMimeType_icon_1=cast=(const QString&)
-KDE_KMimeType_icon_2=cast=bool
-
-KDE_KMimeType_mimeType=accessor=KMimeType::mimeType,copy=KSharedPtr<KMimeType>
-KDE_KMimeType_mimeType_0=cast=(QString *),flags=struct
-
-KDE_KMimeType_name=copy=QString,flags=cpp
-KDE_KMimeType_name_0=cast=(KSharedPtr<KMimeType> *),flags=struct
-
-KDE_KMimeType_offers=accessor=KMimeType::offers,copy=KService::List
-KDE_KMimeType_offers_0=cast=(QString *),flags=struct
-
-KDE_KMimeType_patterns=copy=QStringList,flags=cpp
-KDE_KMimeType_patterns_0=cast=(KSharedPtr<KMimeType> *),flags=struct
-
-KDE_KRun_runURL=accessor=KRun::runURL
-KDE_KRun_runURL_0=cast=(KURL *),flags=struct
-KDE_KRun_runURL_1=cast=(QString *),flags=struct
-
-KDE_KServiceList_delete=flags=delete
-KDE_KServiceList_delete_0=cast=(KService::List*)
-
-KDE_KURL_delete=flags=delete
-KDE_KURL_delete_0=cast=(KURL*)
-
-KDE_KURL_new=flags=new
-KDE_KURL_new_0=cast=(QString *),flags=struct
-
-KDE_QCString_data=accessor=data,flags=cpp
-KDE_QCString_data_0=cast=(QCString *)
-
-KDE_QCString_delete=flags=delete
-KDE_QCString_delete_0=cast=(QCString *)
-
-KDE_QCString_new=flags=new
-KDE_QCString_new_0=cast=(char *)
-
-KDE_QStringListIterator_delete=flags=delete
-KDE_QStringListIterator_delete_0=cast=(QValueListIterator<QString> *)
-
-KDE_QStringListIterator_dereference=copy=QString
-KDE_QStringListIterator_dereference_0=
-
-KDE_QStringListIterator_equals=
-KDE_QStringListIterator_equals_0=
-KDE_QStringListIterator_equals_1=
-
-KDE_QStringListIterator_increment=
-KDE_QStringListIterator_increment_0=
-
-KDE_QStringList_begin=copy=QValueListIterator<QString>,flags=cpp
-KDE_QStringList_begin_0=cast=(QStringList *)
-
-KDE_QStringList_delete=flags=delete
-KDE_QStringList_delete_0=cast=(QStringList*)
-
-KDE_QStringList_end=copy=QValueListIterator<QString>,flags=cpp
-KDE_QStringList_end_0=cast=(QStringList *)
-
-KDE_QString_delete=flags=delete
-KDE_QString_delete_0=cast=(QString *)
-
-KDE_QString_equals=
-KDE_QString_equals_0=
-KDE_QString_equals_1=
-
-KDE_QString_new=flags=new
-KDE_QString_new_0=cast=(char *)
-
-KDE_QString_utf8=copy=QCString,flags=cpp
-KDE_QString_utf8_0=cast=(QString *)
-
-KDE_XFreePixmap=
-KDE_XFreePixmap_0=cast=Display *
-KDE_XFreePixmap_1=cast=Pixmap
-
-KDE_XpmReadFileToPixmap=flags=dynamic
-KDE_XpmReadFileToPixmap_0=cast=Display *
-KDE_XpmReadFileToPixmap_1=cast=Window
-KDE_XpmReadFileToPixmap_2=cast=char *
-KDE_XpmReadFileToPixmap_3=cast=Pixmap *
-KDE_XpmReadFileToPixmap_4=cast=Pixmap *
-KDE_XpmReadFileToPixmap_5=cast=(XpmAttributes *)
-
-KDE_free=
-KDE_free_0=cast=void *
-
-KDE_malloc=
-KDE_malloc_0=
-
-
diff --git a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.motif.OS.properties b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.motif.OS.properties
deleted file mode 100644
index ffca58a612..0000000000
--- a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.motif.OS.properties
+++ /dev/null
@@ -1,2585 +0,0 @@
-###############################################################################
-# Copyright (c) 2004 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Common Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/cpl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-org_eclipse_swt_internal_motif_OS=
-OS_CODESET=flags=const
-
-OS_Call=
-OS_Call_0=
-OS_Call_1=
-OS_Call_2=
-
-OS_ConnectionNumber=
-OS_ConnectionNumber_0=
-
-OS_FD_ISSET=
-OS_FD_ISSET_0=
-OS_FD_ISSET_1=cast=(fd_set *)
-
-OS_FD_SET=
-OS_FD_SET_0=
-OS_FD_SET_1=cast=(fd_set *)
-
-OS_FD_ZERO=
-OS_FD_ZERO_0=cast=(fd_set *)
-
-OS_LC_CTYPE=flags=const
-
-OS_MB_CUR_MAX=flags=const
-
-OS_XAllocColor=
-OS_XAllocColor_0=cast=(Display *)
-OS_XAllocColor_1=
-OS_XAllocColor_2=
-
-OS_XBell=
-OS_XBell_0=cast=(Display *)
-OS_XBell_1=
-
-OS_XBlackPixel=
-OS_XBlackPixel_0=cast=(Display *)
-OS_XBlackPixel_1=
-
-OS_XChangeActivePointerGrab=
-OS_XChangeActivePointerGrab_0=cast=(Display *)
-OS_XChangeActivePointerGrab_1=
-OS_XChangeActivePointerGrab_2=cast=(Cursor)
-OS_XChangeActivePointerGrab_3=cast=(Time)
-
-OS_XChangeProperty=
-OS_XChangeProperty_0=cast=Display *
-OS_XChangeProperty_1=cast=Window
-OS_XChangeProperty_2=cast=Atom
-OS_XChangeProperty_3=cast=Atom
-OS_XChangeProperty_4=
-OS_XChangeProperty_5=
-OS_XChangeProperty_6=cast=unsigned char *
-OS_XChangeProperty_7=
-
-OS_XChangeWindowAttributes=
-OS_XChangeWindowAttributes_0=cast=(Display *)
-OS_XChangeWindowAttributes_1=
-OS_XChangeWindowAttributes_2=
-OS_XChangeWindowAttributes_3=
-
-OS_XCheckIfEvent=
-OS_XCheckIfEvent_0=cast=(Display *)
-OS_XCheckIfEvent_1=cast=(XEvent *)
-OS_XCheckIfEvent_2=cast=(Bool (*)())
-OS_XCheckIfEvent_3=cast=(XPointer)
-
-OS_XCheckMaskEvent=
-OS_XCheckMaskEvent_0=cast=(Display *)
-OS_XCheckMaskEvent_1=
-OS_XCheckMaskEvent_2=cast=(XEvent *)
-
-OS_XCheckWindowEvent=
-OS_XCheckWindowEvent_0=cast=(Display *)
-OS_XCheckWindowEvent_1=cast=(Window)
-OS_XCheckWindowEvent_2=
-OS_XCheckWindowEvent_3=cast=(XEvent *)
-
-OS_XClearArea=
-OS_XClearArea_0=cast=(Display *)
-OS_XClearArea_1=
-OS_XClearArea_2=
-OS_XClearArea_3=
-OS_XClearArea_4=
-OS_XClearArea_5=
-OS_XClearArea_6=
-
-OS_XClipBox=
-OS_XClipBox_0=cast=(Region)
-OS_XClipBox_1=cast=(XRectangle *)
-
-OS_XCloseDisplay=
-OS_XCloseDisplay_0=cast=(Display *)
-
-OS_XCopyArea=
-OS_XCopyArea_0=cast=(Display *)
-OS_XCopyArea_1=
-OS_XCopyArea_2=
-OS_XCopyArea_3=cast=(GC)
-OS_XCopyArea_4=
-OS_XCopyArea_5=
-OS_XCopyArea_6=
-OS_XCopyArea_7=
-OS_XCopyArea_8=
-OS_XCopyArea_9=
-
-OS_XCopyPlane=
-OS_XCopyPlane_0=cast=(Display *)
-OS_XCopyPlane_1=
-OS_XCopyPlane_2=
-OS_XCopyPlane_3=cast=(GC)
-OS_XCopyPlane_4=
-OS_XCopyPlane_5=
-OS_XCopyPlane_6=
-OS_XCopyPlane_7=
-OS_XCopyPlane_8=
-OS_XCopyPlane_9=
-OS_XCopyPlane_10=
-
-OS_XCreateBitmapFromData=
-OS_XCreateBitmapFromData_0=cast=(Display *)
-OS_XCreateBitmapFromData_1=
-OS_XCreateBitmapFromData_2=cast=(char *)
-OS_XCreateBitmapFromData_3=
-OS_XCreateBitmapFromData_4=
-
-OS_XCreateFontCursor=
-OS_XCreateFontCursor_0=cast=(Display *)
-OS_XCreateFontCursor_1=
-
-OS_XCreateGC=
-OS_XCreateGC_0=cast=(Display *)
-OS_XCreateGC_1=
-OS_XCreateGC_2=
-OS_XCreateGC_3=
-
-OS_XCreateImage=
-OS_XCreateImage_0=cast=(Display *)
-OS_XCreateImage_1=cast=(Visual *)
-OS_XCreateImage_2=
-OS_XCreateImage_3=
-OS_XCreateImage_4=
-OS_XCreateImage_5=cast=(char *)
-OS_XCreateImage_6=
-OS_XCreateImage_7=
-OS_XCreateImage_8=
-OS_XCreateImage_9=
-
-OS_XCreatePixmap=
-OS_XCreatePixmap_0=cast=(Display *)
-OS_XCreatePixmap_1=
-OS_XCreatePixmap_2=
-OS_XCreatePixmap_3=
-OS_XCreatePixmap_4=
-
-OS_XCreatePixmapCursor=
-OS_XCreatePixmapCursor_0=cast=(Display *)
-OS_XCreatePixmapCursor_1=cast=(Pixmap)
-OS_XCreatePixmapCursor_2=cast=(Pixmap)
-OS_XCreatePixmapCursor_3=
-OS_XCreatePixmapCursor_4=
-OS_XCreatePixmapCursor_5=
-OS_XCreatePixmapCursor_6=
-
-OS_XCreateRegion=
-
-OS_XCreateWindow=
-OS_XCreateWindow_0=cast=(Display *)
-OS_XCreateWindow_1=cast=(Window)
-OS_XCreateWindow_2=
-OS_XCreateWindow_3=
-OS_XCreateWindow_4=
-OS_XCreateWindow_5=
-OS_XCreateWindow_6=
-OS_XCreateWindow_7=
-OS_XCreateWindow_8=
-OS_XCreateWindow_9=cast=(Visual *)
-OS_XCreateWindow_10=
-OS_XCreateWindow_11=cast=(XSetWindowAttributes *)
-
-OS_XDefaultColormap=
-OS_XDefaultColormap_0=cast=(Display *)
-OS_XDefaultColormap_1=
-
-OS_XDefaultColormapOfScreen=
-OS_XDefaultColormapOfScreen_0=cast=(Screen *)
-
-OS_XDefaultDepthOfScreen=
-OS_XDefaultDepthOfScreen_0=cast=(Screen *)
-
-OS_XDefaultGCOfScreen=
-OS_XDefaultGCOfScreen_0=cast=(Screen *)
-
-OS_XDefaultRootWindow=
-OS_XDefaultRootWindow_0=cast=(Display *)
-
-OS_XDefaultScreen=
-OS_XDefaultScreen_0=cast=(Display *)
-
-OS_XDefaultScreenOfDisplay=
-OS_XDefaultScreenOfDisplay_0=cast=(Display *)
-
-OS_XDefaultVisual=
-OS_XDefaultVisual_0=cast=(Display *)
-OS_XDefaultVisual_1=
-
-OS_XDefineCursor=
-OS_XDefineCursor_0=cast=(Display *)
-OS_XDefineCursor_1=
-OS_XDefineCursor_2=
-
-OS_XDestroyImage=
-OS_XDestroyImage_0=cast=(XImage *)
-
-OS_XDestroyRegion=
-OS_XDestroyRegion_0=cast=(Region)
-
-OS_XDestroyWindow=
-OS_XDestroyWindow_0=cast=(Display *)
-OS_XDestroyWindow_1=cast=(Window)
-
-OS_XDisplayHeight=
-OS_XDisplayHeight_0=cast=(Display *)
-OS_XDisplayHeight_1=
-
-OS_XDisplayHeightMM=
-OS_XDisplayHeightMM_0=cast=(Display *)
-OS_XDisplayHeightMM_1=
-
-OS_XDisplayWidth=
-OS_XDisplayWidth_0=cast=(Display *)
-OS_XDisplayWidth_1=
-
-OS_XDisplayWidthMM=
-OS_XDisplayWidthMM_0=cast=(Display *)
-OS_XDisplayWidthMM_1=
-
-OS_XDrawArc=
-OS_XDrawArc_0=cast=(Display *)
-OS_XDrawArc_1=cast=(Drawable)
-OS_XDrawArc_2=cast=(GC)
-OS_XDrawArc_3=
-OS_XDrawArc_4=
-OS_XDrawArc_5=
-OS_XDrawArc_6=
-OS_XDrawArc_7=
-OS_XDrawArc_8=
-
-OS_XDrawLine=
-OS_XDrawLine_0=cast=(Display *)
-OS_XDrawLine_1=cast=(Drawable)
-OS_XDrawLine_2=cast=(GC)
-OS_XDrawLine_3=
-OS_XDrawLine_4=
-OS_XDrawLine_5=
-OS_XDrawLine_6=
-
-OS_XDrawLines=
-OS_XDrawLines_0=cast=(Display *)
-OS_XDrawLines_1=cast=(Drawable)
-OS_XDrawLines_2=cast=(GC)
-OS_XDrawLines_3=cast=(XPoint *)
-OS_XDrawLines_4=
-OS_XDrawLines_5=
-
-OS_XDrawPoint=
-OS_XDrawPoint_0=cast=(Display *)
-OS_XDrawPoint_1=cast=Drawable
-OS_XDrawPoint_2=cast=GC
-OS_XDrawPoint_3=
-OS_XDrawPoint_4=
-
-OS_XDrawRectangle=
-OS_XDrawRectangle_0=cast=(Display *)
-OS_XDrawRectangle_1=cast=(Drawable)
-OS_XDrawRectangle_2=cast=(GC)
-OS_XDrawRectangle_3=
-OS_XDrawRectangle_4=
-OS_XDrawRectangle_5=
-OS_XDrawRectangle_6=
-
-OS_XEmptyRegion=
-OS_XEmptyRegion_0=cast=(Region)
-
-OS_XEventsQueued=
-OS_XEventsQueued_0=cast=(Display *)
-OS_XEventsQueued_1=
-
-OS_XFillArc=
-OS_XFillArc_0=cast=(Display *)
-OS_XFillArc_1=cast=(Drawable)
-OS_XFillArc_2=cast=(GC)
-OS_XFillArc_3=
-OS_XFillArc_4=
-OS_XFillArc_5=
-OS_XFillArc_6=
-OS_XFillArc_7=
-OS_XFillArc_8=
-
-OS_XFillPolygon=
-OS_XFillPolygon_0=cast=(Display *)
-OS_XFillPolygon_1=cast=(Drawable)
-OS_XFillPolygon_2=cast=(GC)
-OS_XFillPolygon_3=cast=(XPoint *)
-OS_XFillPolygon_4=
-OS_XFillPolygon_5=
-OS_XFillPolygon_6=
-
-OS_XFillRectangle=
-OS_XFillRectangle_0=cast=(Display *)
-OS_XFillRectangle_1=cast=(Drawable)
-OS_XFillRectangle_2=cast=(GC)
-OS_XFillRectangle_3=
-OS_XFillRectangle_4=
-OS_XFillRectangle_5=
-OS_XFillRectangle_6=
-
-OS_XFilterEvent=
-OS_XFilterEvent_0=cast=(XEvent *)
-OS_XFilterEvent_1=cast=(Window)
-
-OS_XFlush=
-OS_XFlush_0=cast=(Display *)
-
-OS_XFontsOfFontSet=
-OS_XFontsOfFontSet_0=cast=(XFontSet)
-OS_XFontsOfFontSet_1=cast=(XFontStruct ***)
-OS_XFontsOfFontSet_2=cast=(char ***)
-
-OS_XFree=
-OS_XFree_0=cast=(char *)
-
-OS_XFreeColors=
-OS_XFreeColors_0=cast=(Display *)
-OS_XFreeColors_1=
-OS_XFreeColors_2=cast=(unsigned long *)
-OS_XFreeColors_3=
-OS_XFreeColors_4=
-
-OS_XFreeCursor=
-OS_XFreeCursor_0=cast=(Display *)
-OS_XFreeCursor_1=cast=(Cursor)
-
-OS_XFreeFont=
-OS_XFreeFont_0=cast=(Display *)
-OS_XFreeFont_1=cast=(XFontStruct *)
-
-OS_XFreeFontNames=
-OS_XFreeFontNames_0=cast=(char **)
-
-OS_XFreeGC=
-OS_XFreeGC_0=cast=(Display *)
-OS_XFreeGC_1=cast=(GC)
-
-OS_XFreePixmap=
-OS_XFreePixmap_0=cast=(Display *)
-OS_XFreePixmap_1=cast=(Pixmap)
-
-OS_XFreeStringList=
-OS_XFreeStringList_0=cast=(char **)
-
-OS_XGetGCValues=
-OS_XGetGCValues_0=cast=(Display *)
-OS_XGetGCValues_1=cast=(GC)
-OS_XGetGCValues_2=
-OS_XGetGCValues_3=
-
-OS_XGetGeometry=
-OS_XGetGeometry_0=cast=(Display *)
-OS_XGetGeometry_1=cast=(Drawable)
-OS_XGetGeometry_2=cast=(Window *)
-OS_XGetGeometry_3=cast=(int *)
-OS_XGetGeometry_4=cast=(int *)
-OS_XGetGeometry_5=cast=(unsigned int *)
-OS_XGetGeometry_6=cast=(unsigned int *)
-OS_XGetGeometry_7=cast=(unsigned int *)
-OS_XGetGeometry_8=cast=(unsigned int *)
-
-OS_XGetIconSizes=
-OS_XGetIconSizes_0=cast=Display *
-OS_XGetIconSizes_1=cast=Window
-OS_XGetIconSizes_2=cast=XIconSize **
-OS_XGetIconSizes_3=cast=int *
-
-OS_XGetImage=
-OS_XGetImage_0=cast=(Display *)
-OS_XGetImage_1=cast=(Drawable)
-OS_XGetImage_2=
-OS_XGetImage_3=
-OS_XGetImage_4=
-OS_XGetImage_5=
-OS_XGetImage_6=
-OS_XGetImage_7=
-
-OS_XGetInputFocus=
-OS_XGetInputFocus_0=cast=(Display *)
-OS_XGetInputFocus_1=cast=(Window *)
-OS_XGetInputFocus_2=cast=(int *)
-
-OS_XGetModifierMapping=
-OS_XGetModifierMapping_0=cast=(Display *)
-
-OS_XGetWindowAttributes=
-OS_XGetWindowAttributes_0=cast=(Display *)
-OS_XGetWindowAttributes_1=
-OS_XGetWindowAttributes_2=
-
-OS_XGetWindowProperty=
-OS_XGetWindowProperty_0=cast=Display *
-OS_XGetWindowProperty_1=cast=Window
-OS_XGetWindowProperty_2=cast=Atom
-OS_XGetWindowProperty_3=
-OS_XGetWindowProperty_4=
-OS_XGetWindowProperty_5=cast=Bool
-OS_XGetWindowProperty_6=cast=Atom
-OS_XGetWindowProperty_7=cast=Atom *
-OS_XGetWindowProperty_8=cast=int *
-OS_XGetWindowProperty_9=cast=unsigned long *
-OS_XGetWindowProperty_10=cast=unsigned long *
-OS_XGetWindowProperty_11=cast=unsigned char **
-
-OS_XGrabKeyboard=
-OS_XGrabKeyboard_0=cast=(Display *)
-OS_XGrabKeyboard_1=
-OS_XGrabKeyboard_2=
-OS_XGrabKeyboard_3=
-OS_XGrabKeyboard_4=
-OS_XGrabKeyboard_5=
-
-OS_XGrabPointer=
-OS_XGrabPointer_0=cast=(Display *)
-OS_XGrabPointer_1=
-OS_XGrabPointer_2=
-OS_XGrabPointer_3=
-OS_XGrabPointer_4=
-OS_XGrabPointer_5=
-OS_XGrabPointer_6=
-OS_XGrabPointer_7=
-OS_XGrabPointer_8=
-
-OS_XInitThreads=
-
-OS_XInternAtom=
-OS_XInternAtom_0=cast=(Display *)
-OS_XInternAtom_1=cast=(char *)
-OS_XInternAtom_2=
-
-OS_XIntersectRegion=
-OS_XIntersectRegion_0=cast=(Region)
-OS_XIntersectRegion_1=cast=(Region)
-OS_XIntersectRegion_2=cast=(Region)
-
-OS_XKeysymToKeycode=
-OS_XKeysymToKeycode_0=cast=(Display *)
-OS_XKeysymToKeycode_1=cast=(KeySym)
-
-OS_XKeysymToString=
-OS_XKeysymToString_0=
-
-OS_XListFonts=
-OS_XListFonts_0=cast=(Display *)
-OS_XListFonts_1=cast=(char *)
-OS_XListFonts_2=
-OS_XListFonts_3=cast=(int *)
-
-OS_XListProperties=
-OS_XListProperties_0=cast=(Display *)
-OS_XListProperties_1=cast=(Window)
-OS_XListProperties_2=cast=(int *)
-
-OS_XLocaleOfFontSet=
-OS_XLocaleOfFontSet_0=cast=(XFontSet)
-
-OS_XLookupString=
-OS_XLookupString_0=cast=(XKeyEvent *)
-OS_XLookupString_1=cast=(char *)
-OS_XLookupString_2=
-OS_XLookupString_3=cast=(KeySym *)
-OS_XLookupString_4=cast=(XComposeStatus *)
-
-OS_XLowerWindow=
-OS_XLowerWindow_0=cast=(Display *)
-OS_XLowerWindow_1=cast=(Window)
-
-OS_XMapWindow=
-OS_XMapWindow_0=cast=Display *
-OS_XMapWindow_1=cast=Window
-
-OS_XMoveResizeWindow=
-OS_XMoveResizeWindow_0=cast=Display *
-OS_XMoveResizeWindow_1=cast=Window
-OS_XMoveResizeWindow_2=
-OS_XMoveResizeWindow_3=
-OS_XMoveResizeWindow_4=
-OS_XMoveResizeWindow_5=
-
-OS_XOpenDisplay=
-OS_XOpenDisplay_0=cast=(char *)
-
-OS_XPointInRegion=
-OS_XPointInRegion_0=cast=(Region)
-OS_XPointInRegion_1=
-OS_XPointInRegion_2=
-
-OS_XPolygonRegion=
-OS_XPolygonRegion_0=cast=(XPoint *)
-OS_XPolygonRegion_1=
-OS_XPolygonRegion_2=
-
-OS_XPutImage=
-OS_XPutImage_0=cast=(Display *)
-OS_XPutImage_1=cast=(Drawable)
-OS_XPutImage_2=cast=(GC)
-OS_XPutImage_3=cast=(XImage *)
-OS_XPutImage_4=
-OS_XPutImage_5=
-OS_XPutImage_6=
-OS_XPutImage_7=
-OS_XPutImage_8=
-OS_XPutImage_9=
-
-OS_XQueryBestCursor=
-OS_XQueryBestCursor_0=cast=Display *
-OS_XQueryBestCursor_1=
-OS_XQueryBestCursor_2=
-OS_XQueryBestCursor_3=
-OS_XQueryBestCursor_4=cast=(unsigned int *)
-OS_XQueryBestCursor_5=cast=(unsigned int *)
-
-OS_XQueryColor=
-OS_XQueryColor_0=cast=(Display *)
-OS_XQueryColor_1=
-OS_XQueryColor_2=
-
-OS_XQueryPointer=
-OS_XQueryPointer_0=cast=(Display *)
-OS_XQueryPointer_1=cast=(Window)
-OS_XQueryPointer_2=cast=(Window *)
-OS_XQueryPointer_3=cast=(Window *)
-OS_XQueryPointer_4=cast=(int *)
-OS_XQueryPointer_5=cast=(int *)
-OS_XQueryPointer_6=cast=(int *)
-OS_XQueryPointer_7=cast=(int *)
-OS_XQueryPointer_8=cast=(unsigned int *)
-
-OS_XQueryTree=
-OS_XQueryTree_0=cast=(Display *)
-OS_XQueryTree_1=cast=(Window)
-OS_XQueryTree_2=cast=(Window *)
-OS_XQueryTree_3=cast=(Window *)
-OS_XQueryTree_4=cast=(Window **)
-OS_XQueryTree_5=cast=(unsigned int *)
-
-OS_XRaiseWindow=
-OS_XRaiseWindow_0=cast=(Display *)
-OS_XRaiseWindow_1=cast=(Window)
-
-OS_XReconfigureWMWindow=
-OS_XReconfigureWMWindow_0=cast=(Display *)
-OS_XReconfigureWMWindow_1=cast=(Window)
-OS_XReconfigureWMWindow_2=
-OS_XReconfigureWMWindow_3=
-OS_XReconfigureWMWindow_4=
-
-OS_XRectInRegion=
-OS_XRectInRegion_0=cast=(Region)
-OS_XRectInRegion_1=
-OS_XRectInRegion_2=
-OS_XRectInRegion_3=
-OS_XRectInRegion_4=
-
-OS_XReparentWindow=
-OS_XReparentWindow_0=cast=(Display *)
-OS_XReparentWindow_1=cast=(Window)
-OS_XReparentWindow_2=cast=(Window)
-OS_XReparentWindow_3=
-OS_XReparentWindow_4=
-
-OS_XResizeWindow=
-OS_XResizeWindow_0=cast=Display *
-OS_XResizeWindow_1=cast=Window
-OS_XResizeWindow_2=
-OS_XResizeWindow_3=
-
-OS_XRootWindowOfScreen=
-OS_XRootWindowOfScreen_0=cast=(Screen *)
-
-OS_XSelectInput=
-OS_XSelectInput_0=cast=Display *
-OS_XSelectInput_1=cast=Window
-OS_XSelectInput_2=
-
-OS_XSendEvent=
-OS_XSendEvent_0=cast=Display *
-OS_XSendEvent_1=cast=Window
-OS_XSendEvent_2=cast=Bool
-OS_XSendEvent_3=cast=long
-OS_XSendEvent_4=cast=XEvent *
-
-OS_XSetBackground=
-OS_XSetBackground_0=cast=(Display *)
-OS_XSetBackground_1=cast=(GC)
-OS_XSetBackground_2=
-
-OS_XSetClipMask=
-OS_XSetClipMask_0=cast=(Display *)
-OS_XSetClipMask_1=cast=(GC)
-OS_XSetClipMask_2=cast=(Pixmap)
-
-OS_XSetClipRectangles=
-OS_XSetClipRectangles_0=cast=(Display *)
-OS_XSetClipRectangles_1=cast=(GC)
-OS_XSetClipRectangles_2=
-OS_XSetClipRectangles_3=
-OS_XSetClipRectangles_4=cast=(XRectangle *)
-OS_XSetClipRectangles_5=
-OS_XSetClipRectangles_6=
-
-OS_XSetDashes=
-OS_XSetDashes_0=cast=(Display *)
-OS_XSetDashes_1=cast=(GC)
-OS_XSetDashes_2=
-OS_XSetDashes_3=cast=(char *)
-OS_XSetDashes_4=
-
-OS_XSetErrorHandler=
-OS_XSetErrorHandler_0=cast=(XErrorHandler)
-
-OS_XSetFillStyle=
-OS_XSetFillStyle_0=cast=(Display *)
-OS_XSetFillStyle_1=cast=(GC)
-OS_XSetFillStyle_2=
-
-OS_XSetForeground=
-OS_XSetForeground_0=cast=(Display *)
-OS_XSetForeground_1=cast=(GC)
-OS_XSetForeground_2=
-
-OS_XSetFunction=
-OS_XSetFunction_0=cast=(Display *)
-OS_XSetFunction_1=cast=(GC)
-OS_XSetFunction_2=
-
-OS_XSetGraphicsExposures=
-OS_XSetGraphicsExposures_0=cast=(Display *)
-OS_XSetGraphicsExposures_1=cast=(GC)
-OS_XSetGraphicsExposures_2=cast=(Bool)
-
-OS_XSetIOErrorHandler=
-OS_XSetIOErrorHandler_0=cast=(XIOErrorHandler)
-
-OS_XSetInputFocus=
-OS_XSetInputFocus_0=cast=(Display *)
-OS_XSetInputFocus_1=cast=(Window)
-OS_XSetInputFocus_2=
-OS_XSetInputFocus_3=
-
-OS_XSetLineAttributes=
-OS_XSetLineAttributes_0=cast=(Display *)
-OS_XSetLineAttributes_1=cast=(GC)
-OS_XSetLineAttributes_2=
-OS_XSetLineAttributes_3=
-OS_XSetLineAttributes_4=
-OS_XSetLineAttributes_5=
-
-OS_XSetRegion=
-OS_XSetRegion_0=cast=(Display *)
-OS_XSetRegion_1=cast=(GC)
-OS_XSetRegion_2=cast=(Region)
-
-OS_XSetStipple=
-OS_XSetStipple_0=cast=(Display *)
-OS_XSetStipple_1=cast=(GC)
-OS_XSetStipple_2=cast=(Pixmap)
-
-OS_XSetSubwindowMode=
-OS_XSetSubwindowMode_0=cast=(Display *)
-OS_XSetSubwindowMode_1=cast=(GC)
-OS_XSetSubwindowMode_2=
-
-OS_XSetWMNormalHints=
-OS_XSetWMNormalHints_0=cast=Display *
-OS_XSetWMNormalHints_1=cast=Window
-OS_XSetWMNormalHints_2=
-
-OS_XShapeCombineMask=
-OS_XShapeCombineMask_0=cast=Display *
-OS_XShapeCombineMask_1=cast=(Window)
-OS_XShapeCombineMask_2=
-OS_XShapeCombineMask_3=
-OS_XShapeCombineMask_4=
-OS_XShapeCombineMask_5=cast=Pixmap
-OS_XShapeCombineMask_6=
-
-OS_XShapeCombineRegion=
-OS_XShapeCombineRegion_0=cast=(Display *)
-OS_XShapeCombineRegion_1=cast=(Window)
-OS_XShapeCombineRegion_2=
-OS_XShapeCombineRegion_3=
-OS_XShapeCombineRegion_4=
-OS_XShapeCombineRegion_5=cast=(Region)
-OS_XShapeCombineRegion_6=
-
-OS_XSubtractRegion=
-OS_XSubtractRegion_0=cast=(Region)
-OS_XSubtractRegion_1=cast=(Region)
-OS_XSubtractRegion_2=cast=(Region)
-
-OS_XSync=
-OS_XSync_0=cast=(Display *)
-OS_XSync_1=cast=(Bool)
-
-OS_XSynchronize=
-OS_XSynchronize_0=cast=(Display *)
-OS_XSynchronize_1=cast=(Bool)
-
-OS_XTestFakeButtonEvent=
-OS_XTestFakeButtonEvent_0=cast=Display *
-OS_XTestFakeButtonEvent_1=
-OS_XTestFakeButtonEvent_2=cast=Bool
-OS_XTestFakeButtonEvent_3=cast=unsigned long
-
-OS_XTestFakeKeyEvent=
-OS_XTestFakeKeyEvent_0=cast=Display *
-OS_XTestFakeKeyEvent_1=
-OS_XTestFakeKeyEvent_2=cast=Bool
-OS_XTestFakeKeyEvent_3=cast=unsigned long
-
-OS_XTestFakeMotionEvent=
-OS_XTestFakeMotionEvent_0=cast=Display *
-OS_XTestFakeMotionEvent_1=
-OS_XTestFakeMotionEvent_2=
-OS_XTestFakeMotionEvent_3=
-OS_XTestFakeMotionEvent_4=cast=unsigned long
-
-OS_XTranslateCoordinates=
-OS_XTranslateCoordinates_0=cast=Display *
-OS_XTranslateCoordinates_1=cast=Window
-OS_XTranslateCoordinates_2=cast=Window
-OS_XTranslateCoordinates_3=
-OS_XTranslateCoordinates_4=
-OS_XTranslateCoordinates_5=
-OS_XTranslateCoordinates_6=
-OS_XTranslateCoordinates_7=cast=Window *
-
-OS_XUndefineCursor=
-OS_XUndefineCursor_0=cast=(Display *)
-OS_XUndefineCursor_1=cast=(Window)
-
-OS_XUngrabKeyboard=
-OS_XUngrabKeyboard_0=cast=(Display *)
-OS_XUngrabKeyboard_1=
-
-OS_XUngrabPointer=
-OS_XUngrabPointer_0=cast=(Display *)
-OS_XUngrabPointer_1=
-
-OS_XUnionRectWithRegion=
-OS_XUnionRectWithRegion_0=cast=(XRectangle *)
-OS_XUnionRectWithRegion_1=cast=(Region)
-OS_XUnionRectWithRegion_2=cast=(Region)
-
-OS_XUnionRegion=
-OS_XUnionRegion_0=cast=(Region)
-OS_XUnionRegion_1=cast=(Region)
-OS_XUnionRegion_2=cast=(Region)
-
-OS_XUnmapWindow=
-OS_XUnmapWindow_0=cast=Display *
-OS_XUnmapWindow_1=cast=Window
-
-OS_XWarpPointer=
-OS_XWarpPointer_0=cast=(Display *)
-OS_XWarpPointer_1=
-OS_XWarpPointer_2=
-OS_XWarpPointer_3=
-OS_XWarpPointer_4=
-OS_XWarpPointer_5=
-OS_XWarpPointer_6=
-OS_XWarpPointer_7=
-OS_XWarpPointer_8=
-
-OS_XWhitePixel=
-OS_XWhitePixel_0=cast=(Display *)
-OS_XWhitePixel_1=
-
-OS_XWithdrawWindow=
-OS_XWithdrawWindow_0=cast=(Display *)
-OS_XWithdrawWindow_1=cast=(Window)
-OS_XWithdrawWindow_2=
-
-OS_XineramaIsActive=
-OS_XineramaIsActive_0=cast=(Display *)
-
-OS_XineramaQueryScreens=
-OS_XineramaQueryScreens_0=cast=(Display *)
-OS_XineramaQueryScreens_1=
-
-OS_XmAddWMProtocolCallback=
-OS_XmAddWMProtocolCallback_0=cast=(Widget)
-OS_XmAddWMProtocolCallback_1=cast=(Atom)
-OS_XmAddWMProtocolCallback_2=cast=(XtCallbackProc)
-OS_XmAddWMProtocolCallback_3=cast=(XtPointer)
-
-OS_XmChangeColor=
-OS_XmChangeColor_0=cast=(Widget)
-OS_XmChangeColor_1=
-
-OS_XmClipboardCopy=
-OS_XmClipboardCopy_0=cast=(Display *)
-OS_XmClipboardCopy_1=cast=(Window)
-OS_XmClipboardCopy_2=
-OS_XmClipboardCopy_3=cast=(char *)
-OS_XmClipboardCopy_4=cast=(char *)
-OS_XmClipboardCopy_5=
-OS_XmClipboardCopy_6=
-OS_XmClipboardCopy_7=cast=(void *)
-
-OS_XmClipboardEndCopy=
-OS_XmClipboardEndCopy_0=cast=(Display *)
-OS_XmClipboardEndCopy_1=cast=(Window)
-OS_XmClipboardEndCopy_2=
-
-OS_XmClipboardEndRetrieve=
-OS_XmClipboardEndRetrieve_0=cast=(Display *)
-OS_XmClipboardEndRetrieve_1=cast=(Window)
-
-OS_XmClipboardInquireCount=
-OS_XmClipboardInquireCount_0=cast=(Display *)
-OS_XmClipboardInquireCount_1=cast=(Window)
-OS_XmClipboardInquireCount_2=cast=(int *)
-OS_XmClipboardInquireCount_3=cast=(unsigned long *)
-
-OS_XmClipboardInquireFormat=
-OS_XmClipboardInquireFormat_0=cast=(Display *)
-OS_XmClipboardInquireFormat_1=cast=(Window)
-OS_XmClipboardInquireFormat_2=
-OS_XmClipboardInquireFormat_3=cast=(char *)
-OS_XmClipboardInquireFormat_4=
-OS_XmClipboardInquireFormat_5=cast=(unsigned long *)
-
-OS_XmClipboardInquireLength=
-OS_XmClipboardInquireLength_0=cast=(Display *)
-OS_XmClipboardInquireLength_1=cast=(Window)
-OS_XmClipboardInquireLength_2=cast=(char *)
-OS_XmClipboardInquireLength_3=cast=(unsigned long *)
-
-OS_XmClipboardRetrieve=
-OS_XmClipboardRetrieve_0=cast=(Display *)
-OS_XmClipboardRetrieve_1=cast=(Window)
-OS_XmClipboardRetrieve_2=cast=(char *)
-OS_XmClipboardRetrieve_3=cast=(char *)
-OS_XmClipboardRetrieve_4=
-OS_XmClipboardRetrieve_5=cast=(unsigned long *)
-OS_XmClipboardRetrieve_6=cast=(long *)
-
-OS_XmClipboardStartCopy=
-OS_XmClipboardStartCopy_0=cast=(Display *)
-OS_XmClipboardStartCopy_1=cast=(Window)
-OS_XmClipboardStartCopy_2=cast=(XmString)
-OS_XmClipboardStartCopy_3=
-OS_XmClipboardStartCopy_4=cast=(Widget)
-OS_XmClipboardStartCopy_5=cast=(XmCutPasteProc)
-OS_XmClipboardStartCopy_6=cast=(long *)
-
-OS_XmClipboardStartRetrieve=
-OS_XmClipboardStartRetrieve_0=cast=(Display *)
-OS_XmClipboardStartRetrieve_1=cast=(Window)
-OS_XmClipboardStartRetrieve_2=
-
-OS_XmComboBoxAddItem=
-OS_XmComboBoxAddItem_0=cast=(Widget)
-OS_XmComboBoxAddItem_1=cast=(XmString)
-OS_XmComboBoxAddItem_2=
-OS_XmComboBoxAddItem_3=
-
-OS_XmComboBoxDeletePos=
-OS_XmComboBoxDeletePos_0=cast=(Widget)
-OS_XmComboBoxDeletePos_1=
-
-OS_XmComboBoxSelectItem=
-OS_XmComboBoxSelectItem_0=cast=(Widget)
-OS_XmComboBoxSelectItem_1=cast=(XmString)
-
-OS_XmCreateArrowButton=
-OS_XmCreateArrowButton_0=cast=(Widget)
-OS_XmCreateArrowButton_1=cast=(String)
-OS_XmCreateArrowButton_2=cast=(ArgList)
-OS_XmCreateArrowButton_3=
-
-OS_XmCreateCascadeButtonGadget=
-OS_XmCreateCascadeButtonGadget_0=cast=(Widget)
-OS_XmCreateCascadeButtonGadget_1=cast=(String)
-OS_XmCreateCascadeButtonGadget_2=cast=(ArgList)
-OS_XmCreateCascadeButtonGadget_3=
-
-OS_XmCreateComboBox=
-OS_XmCreateComboBox_0=cast=(Widget)
-OS_XmCreateComboBox_1=cast=(String)
-OS_XmCreateComboBox_2=cast=(ArgList)
-OS_XmCreateComboBox_3=
-
-OS_XmCreateDialogShell=
-OS_XmCreateDialogShell_0=cast=(Widget)
-OS_XmCreateDialogShell_1=cast=(String)
-OS_XmCreateDialogShell_2=cast=(ArgList)
-OS_XmCreateDialogShell_3=
-
-OS_XmCreateDrawingArea=
-OS_XmCreateDrawingArea_0=cast=(Widget)
-OS_XmCreateDrawingArea_1=cast=(String)
-OS_XmCreateDrawingArea_2=cast=(ArgList)
-OS_XmCreateDrawingArea_3=
-
-OS_XmCreateDrawnButton=
-OS_XmCreateDrawnButton_0=cast=(Widget)
-OS_XmCreateDrawnButton_1=cast=(String)
-OS_XmCreateDrawnButton_2=cast=(ArgList)
-OS_XmCreateDrawnButton_3=
-
-OS_XmCreateErrorDialog=
-OS_XmCreateErrorDialog_0=cast=(Widget)
-OS_XmCreateErrorDialog_1=cast=(String)
-OS_XmCreateErrorDialog_2=cast=(ArgList)
-OS_XmCreateErrorDialog_3=
-
-OS_XmCreateFileSelectionDialog=
-OS_XmCreateFileSelectionDialog_0=cast=(Widget)
-OS_XmCreateFileSelectionDialog_1=cast=(String)
-OS_XmCreateFileSelectionDialog_2=cast=(ArgList)
-OS_XmCreateFileSelectionDialog_3=
-
-OS_XmCreateForm=
-OS_XmCreateForm_0=cast=(Widget)
-OS_XmCreateForm_1=cast=(String)
-OS_XmCreateForm_2=cast=(ArgList)
-OS_XmCreateForm_3=
-
-OS_XmCreateFrame=
-OS_XmCreateFrame_0=cast=(Widget)
-OS_XmCreateFrame_1=cast=(String)
-OS_XmCreateFrame_2=cast=(ArgList)
-OS_XmCreateFrame_3=
-
-OS_XmCreateInformationDialog=
-OS_XmCreateInformationDialog_0=cast=(Widget)
-OS_XmCreateInformationDialog_1=cast=(String)
-OS_XmCreateInformationDialog_2=cast=(ArgList)
-OS_XmCreateInformationDialog_3=
-
-OS_XmCreateLabel=
-OS_XmCreateLabel_0=cast=(Widget)
-OS_XmCreateLabel_1=cast=(String)
-OS_XmCreateLabel_2=cast=(ArgList)
-OS_XmCreateLabel_3=
-
-OS_XmCreateList=
-OS_XmCreateList_0=cast=(Widget)
-OS_XmCreateList_1=cast=(String)
-OS_XmCreateList_2=cast=(ArgList)
-OS_XmCreateList_3=
-
-OS_XmCreateMainWindow=
-OS_XmCreateMainWindow_0=cast=(Widget)
-OS_XmCreateMainWindow_1=cast=(String)
-OS_XmCreateMainWindow_2=cast=(ArgList)
-OS_XmCreateMainWindow_3=
-
-OS_XmCreateMenuBar=
-OS_XmCreateMenuBar_0=cast=(Widget)
-OS_XmCreateMenuBar_1=cast=(String)
-OS_XmCreateMenuBar_2=cast=(ArgList)
-OS_XmCreateMenuBar_3=
-
-OS_XmCreateMessageDialog=
-OS_XmCreateMessageDialog_0=cast=(Widget)
-OS_XmCreateMessageDialog_1=cast=(String)
-OS_XmCreateMessageDialog_2=cast=(ArgList)
-OS_XmCreateMessageDialog_3=
-
-OS_XmCreatePopupMenu=
-OS_XmCreatePopupMenu_0=cast=(Widget)
-OS_XmCreatePopupMenu_1=cast=(String)
-OS_XmCreatePopupMenu_2=cast=(ArgList)
-OS_XmCreatePopupMenu_3=
-
-OS_XmCreatePulldownMenu=
-OS_XmCreatePulldownMenu_0=cast=(Widget)
-OS_XmCreatePulldownMenu_1=cast=(String)
-OS_XmCreatePulldownMenu_2=cast=(ArgList)
-OS_XmCreatePulldownMenu_3=
-
-OS_XmCreatePushButton=
-OS_XmCreatePushButton_0=cast=(Widget)
-OS_XmCreatePushButton_1=cast=(String)
-OS_XmCreatePushButton_2=cast=(ArgList)
-OS_XmCreatePushButton_3=
-
-OS_XmCreatePushButtonGadget=
-OS_XmCreatePushButtonGadget_0=cast=(Widget)
-OS_XmCreatePushButtonGadget_1=cast=(String)
-OS_XmCreatePushButtonGadget_2=cast=(ArgList)
-OS_XmCreatePushButtonGadget_3=
-
-OS_XmCreateQuestionDialog=
-OS_XmCreateQuestionDialog_0=cast=(Widget)
-OS_XmCreateQuestionDialog_1=cast=(String)
-OS_XmCreateQuestionDialog_2=cast=(ArgList)
-OS_XmCreateQuestionDialog_3=
-
-OS_XmCreateScale=
-OS_XmCreateScale_0=cast=(Widget)
-OS_XmCreateScale_1=cast=(String)
-OS_XmCreateScale_2=cast=(ArgList)
-OS_XmCreateScale_3=
-
-OS_XmCreateScrollBar=
-OS_XmCreateScrollBar_0=cast=(Widget)
-OS_XmCreateScrollBar_1=cast=(String)
-OS_XmCreateScrollBar_2=cast=(ArgList)
-OS_XmCreateScrollBar_3=
-
-OS_XmCreateScrolledList=
-OS_XmCreateScrolledList_0=cast=(Widget)
-OS_XmCreateScrolledList_1=cast=(String)
-OS_XmCreateScrolledList_2=cast=(ArgList)
-OS_XmCreateScrolledList_3=
-
-OS_XmCreateScrolledText=
-OS_XmCreateScrolledText_0=cast=(Widget)
-OS_XmCreateScrolledText_1=cast=(String)
-OS_XmCreateScrolledText_2=cast=(ArgList)
-OS_XmCreateScrolledText_3=
-
-OS_XmCreateSeparator=
-OS_XmCreateSeparator_0=cast=(Widget)
-OS_XmCreateSeparator_1=cast=(String)
-OS_XmCreateSeparator_2=cast=(ArgList)
-OS_XmCreateSeparator_3=
-
-OS_XmCreateSeparatorGadget=
-OS_XmCreateSeparatorGadget_0=cast=(Widget)
-OS_XmCreateSeparatorGadget_1=cast=(String)
-OS_XmCreateSeparatorGadget_2=cast=(ArgList)
-OS_XmCreateSeparatorGadget_3=
-
-OS_XmCreateTextField=
-OS_XmCreateTextField_0=cast=(Widget)
-OS_XmCreateTextField_1=cast=(String)
-OS_XmCreateTextField_2=cast=(ArgList)
-OS_XmCreateTextField_3=
-
-OS_XmCreateToggleButton=
-OS_XmCreateToggleButton_0=cast=(Widget)
-OS_XmCreateToggleButton_1=cast=(String)
-OS_XmCreateToggleButton_2=cast=(ArgList)
-OS_XmCreateToggleButton_3=
-
-OS_XmCreateToggleButtonGadget=
-OS_XmCreateToggleButtonGadget_0=cast=(Widget)
-OS_XmCreateToggleButtonGadget_1=cast=(String)
-OS_XmCreateToggleButtonGadget_2=cast=(ArgList)
-OS_XmCreateToggleButtonGadget_3=
-
-OS_XmCreateWarningDialog=
-OS_XmCreateWarningDialog_0=cast=(Widget)
-OS_XmCreateWarningDialog_1=cast=(String)
-OS_XmCreateWarningDialog_2=cast=(ArgList)
-OS_XmCreateWarningDialog_3=
-
-OS_XmCreateWorkingDialog=
-OS_XmCreateWorkingDialog_0=cast=(Widget)
-OS_XmCreateWorkingDialog_1=cast=(String)
-OS_XmCreateWorkingDialog_2=cast=(ArgList)
-OS_XmCreateWorkingDialog_3=
-
-OS_XmDestroyPixmap=
-OS_XmDestroyPixmap_0=cast=(Screen *)
-OS_XmDestroyPixmap_1=cast=(Pixmap)
-
-OS_XmDragCancel=
-OS_XmDragCancel_0=cast=(Widget)
-
-OS_XmDragStart=
-OS_XmDragStart_0=cast=(Widget)
-OS_XmDragStart_1=cast=(XEvent *)
-OS_XmDragStart_2=cast=(ArgList)
-OS_XmDragStart_3=cast=(Cardinal)
-
-OS_XmDropSiteRegister=
-OS_XmDropSiteRegister_0=cast=(Widget)
-OS_XmDropSiteRegister_1=cast=(ArgList)
-OS_XmDropSiteRegister_2=cast=(Cardinal)
-
-OS_XmDropSiteUnregister=
-OS_XmDropSiteUnregister_0=cast=(Widget)
-
-OS_XmDropSiteUpdate=
-OS_XmDropSiteUpdate_0=cast=(Widget)
-OS_XmDropSiteUpdate_1=cast=(ArgList)
-OS_XmDropSiteUpdate_2=cast=(Cardinal)
-
-OS_XmDropTransferAdd=
-OS_XmDropTransferAdd_0=cast=(Widget)
-OS_XmDropTransferAdd_1=cast=(XmDropTransferEntryRec *)
-OS_XmDropTransferAdd_2=cast=(Cardinal)
-
-OS_XmDropTransferStart=
-OS_XmDropTransferStart_0=cast=(Widget)
-OS_XmDropTransferStart_1=cast=(ArgList)
-OS_XmDropTransferStart_2=cast=(Cardinal)
-
-OS_XmFileSelectionBoxGetChild=
-OS_XmFileSelectionBoxGetChild_0=cast=(Widget)
-OS_XmFileSelectionBoxGetChild_1=
-
-OS_XmFontListAppendEntry=
-OS_XmFontListAppendEntry_0=cast=(XmFontList)
-OS_XmFontListAppendEntry_1=cast=(XmFontListEntry)
-
-OS_XmFontListCopy=
-OS_XmFontListCopy_0=cast=(XmFontList)
-
-OS_XmFontListEntryFree=
-OS_XmFontListEntryFree_0=cast=(XmFontListEntry *)
-
-OS_XmFontListEntryGetFont=
-OS_XmFontListEntryGetFont_0=cast=(XmFontListEntry)
-OS_XmFontListEntryGetFont_1=cast=(XmFontType *)
-
-OS_XmFontListEntryLoad=
-OS_XmFontListEntryLoad_0=cast=(Display *)
-OS_XmFontListEntryLoad_1=cast=(char *)
-OS_XmFontListEntryLoad_2=
-OS_XmFontListEntryLoad_3=cast=(char *)
-
-OS_XmFontListFree=
-OS_XmFontListFree_0=cast=(XmFontList)
-
-OS_XmFontListFreeFontContext=
-OS_XmFontListFreeFontContext_0=cast=(XmFontContext)
-
-OS_XmFontListInitFontContext=
-OS_XmFontListInitFontContext_0=cast=(XmFontContext *)
-OS_XmFontListInitFontContext_1=cast=(XmFontList)
-
-OS_XmFontListNextEntry=
-OS_XmFontListNextEntry_0=cast=(XmFontContext)
-
-OS_XmGetAtomName=
-OS_XmGetAtomName_0=cast=(Display *)
-OS_XmGetAtomName_1=cast=(Atom)
-
-OS_XmGetDragContext=
-OS_XmGetDragContext_0=cast=(Widget)
-OS_XmGetDragContext_1=cast=(Time)
-
-OS_XmGetFocusWidget=
-OS_XmGetFocusWidget_0=cast=(Widget)
-
-OS_XmGetPixmap=
-OS_XmGetPixmap_0=cast=(Screen *)
-OS_XmGetPixmap_1=cast=(char *)
-OS_XmGetPixmap_2=cast=(Pixel)
-OS_XmGetPixmap_3=cast=(Pixel)
-
-OS_XmGetPixmapByDepth=
-OS_XmGetPixmapByDepth_0=cast=(Screen *)
-OS_XmGetPixmapByDepth_1=cast=(char *)
-OS_XmGetPixmapByDepth_2=
-OS_XmGetPixmapByDepth_3=
-OS_XmGetPixmapByDepth_4=
-
-OS_XmGetXmDisplay=
-OS_XmGetXmDisplay_0=cast=(Display *)
-
-OS_XmImMbLookupString=
-OS_XmImMbLookupString_0=cast=(Widget)
-OS_XmImMbLookupString_1=cast=(XKeyPressedEvent *)
-OS_XmImMbLookupString_2=cast=(char *)
-OS_XmImMbLookupString_3=
-OS_XmImMbLookupString_4=cast=(KeySym *)
-OS_XmImMbLookupString_5=cast=(int *)
-
-OS_XmImRegister=
-OS_XmImRegister_0=cast=(Widget)
-OS_XmImRegister_1=
-
-OS_XmImSetFocusValues=
-OS_XmImSetFocusValues_0=cast=(Widget)
-OS_XmImSetFocusValues_1=cast=(ArgList)
-OS_XmImSetFocusValues_2=
-
-OS_XmImSetValues=
-OS_XmImSetValues_0=cast=(Widget)
-OS_XmImSetValues_1=cast=(ArgList)
-OS_XmImSetValues_2=
-
-OS_XmImUnregister=
-OS_XmImUnregister_0=cast=(Widget)
-
-OS_XmImUnsetFocus=
-OS_XmImUnsetFocus_0=cast=(Widget)
-
-OS_XmInternAtom=
-OS_XmInternAtom_0=cast=(Display *)
-OS_XmInternAtom_1=cast=(String)
-OS_XmInternAtom_2=
-
-OS_XmListAddItemUnselected=
-OS_XmListAddItemUnselected_0=cast=(Widget)
-OS_XmListAddItemUnselected_1=cast=(XmString)
-OS_XmListAddItemUnselected_2=
-
-OS_XmListDeleteAllItems=
-OS_XmListDeleteAllItems_0=cast=(Widget)
-
-OS_XmListDeleteItemsPos=
-OS_XmListDeleteItemsPos_0=cast=(Widget)
-OS_XmListDeleteItemsPos_1=
-OS_XmListDeleteItemsPos_2=
-
-OS_XmListDeletePos=
-OS_XmListDeletePos_0=cast=(Widget)
-OS_XmListDeletePos_1=
-
-OS_XmListDeletePositions=
-OS_XmListDeletePositions_0=cast=(Widget)
-OS_XmListDeletePositions_1=cast=(int *)
-OS_XmListDeletePositions_2=
-
-OS_XmListDeselectAllItems=
-OS_XmListDeselectAllItems_0=cast=(Widget)
-
-OS_XmListDeselectPos=
-OS_XmListDeselectPos_0=cast=(Widget)
-OS_XmListDeselectPos_1=
-
-OS_XmListGetKbdItemPos=
-OS_XmListGetKbdItemPos_0=cast=(Widget)
-
-OS_XmListGetSelectedPos=
-OS_XmListGetSelectedPos_0=cast=(Widget)
-OS_XmListGetSelectedPos_1=cast=(int **)
-OS_XmListGetSelectedPos_2=cast=(int *)
-
-OS_XmListItemPos=
-OS_XmListItemPos_0=cast=(Widget)
-OS_XmListItemPos_1=cast=(XmString)
-
-OS_XmListPosSelected=
-OS_XmListPosSelected_0=cast=(Widget)
-OS_XmListPosSelected_1=
-
-OS_XmListReplaceItemsPosUnselected=
-OS_XmListReplaceItemsPosUnselected_0=cast=(Widget)
-OS_XmListReplaceItemsPosUnselected_1=cast=(XmString *)
-OS_XmListReplaceItemsPosUnselected_2=
-OS_XmListReplaceItemsPosUnselected_3=
-
-OS_XmListSelectPos=
-OS_XmListSelectPos_0=cast=(Widget)
-OS_XmListSelectPos_1=
-OS_XmListSelectPos_2=
-
-OS_XmListSetKbdItemPos=
-OS_XmListSetKbdItemPos_0=cast=(Widget)
-OS_XmListSetKbdItemPos_1=
-
-OS_XmListSetPos=
-OS_XmListSetPos_0=cast=(Widget)
-OS_XmListSetPos_1=
-
-OS_XmListUpdateSelectedList=
-OS_XmListUpdateSelectedList_0=cast=(Widget)
-
-OS_XmMainWindowSetAreas=
-OS_XmMainWindowSetAreas_0=cast=(Widget)
-OS_XmMainWindowSetAreas_1=cast=(Widget)
-OS_XmMainWindowSetAreas_2=cast=(Widget)
-OS_XmMainWindowSetAreas_3=cast=(Widget)
-OS_XmMainWindowSetAreas_4=cast=(Widget)
-OS_XmMainWindowSetAreas_5=cast=(Widget)
-
-OS_XmMessageBoxGetChild=
-OS_XmMessageBoxGetChild_0=cast=(Widget)
-OS_XmMessageBoxGetChild_1=
-
-OS_XmParseMappingCreate=
-OS_XmParseMappingCreate_0=cast=(ArgList)
-OS_XmParseMappingCreate_1=
-
-OS_XmParseMappingFree=
-OS_XmParseMappingFree_0=cast=(XmParseMapping)
-
-OS_XmProcessTraversal=
-OS_XmProcessTraversal_0=cast=(Widget)
-OS_XmProcessTraversal_1=
-
-OS_XmRenderTableAddRenditions=
-OS_XmRenderTableAddRenditions_0=cast=(XmRenderTable)
-OS_XmRenderTableAddRenditions_1=cast=(XmRendition *)
-OS_XmRenderTableAddRenditions_2=
-OS_XmRenderTableAddRenditions_3=
-
-OS_XmRenderTableFree=
-OS_XmRenderTableFree_0=cast=(XmRenderTable)
-
-OS_XmRenditionCreate=
-OS_XmRenditionCreate_0=cast=(Widget)
-OS_XmRenditionCreate_1=cast=(XmStringTag)
-OS_XmRenditionCreate_2=cast=(ArgList)
-OS_XmRenditionCreate_3=
-
-OS_XmRenditionFree=
-OS_XmRenditionFree_0=cast=(XmRendition)
-
-OS_XmStringBaseline=
-OS_XmStringBaseline_0=cast=XmRenderTable
-OS_XmStringBaseline_1=cast=XmString
-
-OS_XmStringCompare=
-OS_XmStringCompare_0=cast=(XmString)
-OS_XmStringCompare_1=cast=(XmString)
-
-OS_XmStringComponentCreate=
-OS_XmStringComponentCreate_0=
-OS_XmStringComponentCreate_1=
-OS_XmStringComponentCreate_2=cast=(XtPointer)
-
-OS_XmStringConcat=
-OS_XmStringConcat_0=cast=(XmString)
-OS_XmStringConcat_1=cast=(XmString)
-
-OS_XmStringCreate=
-OS_XmStringCreate_0=cast=(char *)
-OS_XmStringCreate_1=cast=(char *)
-
-OS_XmStringCreateLocalized=
-OS_XmStringCreateLocalized_0=cast=(char *)
-
-OS_XmStringDraw=
-OS_XmStringDraw_0=cast=(Display *)
-OS_XmStringDraw_1=cast=(Window)
-OS_XmStringDraw_2=cast=(XmFontList)
-OS_XmStringDraw_3=cast=(XmString)
-OS_XmStringDraw_4=cast=(GC)
-OS_XmStringDraw_5=
-OS_XmStringDraw_6=
-OS_XmStringDraw_7=
-OS_XmStringDraw_8=
-OS_XmStringDraw_9=
-OS_XmStringDraw_10=
-
-OS_XmStringDrawImage=
-OS_XmStringDrawImage_0=cast=(Display *)
-OS_XmStringDrawImage_1=cast=(Window)
-OS_XmStringDrawImage_2=cast=(XmFontList)
-OS_XmStringDrawImage_3=cast=(XmString)
-OS_XmStringDrawImage_4=cast=(GC)
-OS_XmStringDrawImage_5=
-OS_XmStringDrawImage_6=
-OS_XmStringDrawImage_7=
-OS_XmStringDrawImage_8=
-OS_XmStringDrawImage_9=
-OS_XmStringDrawImage_10=
-
-OS_XmStringDrawUnderline=
-OS_XmStringDrawUnderline_0=cast=(Display *)
-OS_XmStringDrawUnderline_1=cast=(Window)
-OS_XmStringDrawUnderline_2=cast=(XmFontList)
-OS_XmStringDrawUnderline_3=cast=(XmString)
-OS_XmStringDrawUnderline_4=cast=(GC)
-OS_XmStringDrawUnderline_5=
-OS_XmStringDrawUnderline_6=
-OS_XmStringDrawUnderline_7=
-OS_XmStringDrawUnderline_8=
-OS_XmStringDrawUnderline_9=
-OS_XmStringDrawUnderline_10=
-OS_XmStringDrawUnderline_11=cast=(XmString)
-
-OS_XmStringEmpty=
-OS_XmStringEmpty_0=cast=(XmString)
-
-OS_XmStringExtent=
-OS_XmStringExtent_0=cast=XmRenderTable
-OS_XmStringExtent_1=cast=XmString
-OS_XmStringExtent_2=cast=Dimension *
-OS_XmStringExtent_3=cast=Dimension *
-
-OS_XmStringFree=
-OS_XmStringFree_0=cast=(XmString)
-
-OS_XmStringGenerate=
-OS_XmStringGenerate_0=cast=(XtPointer)
-OS_XmStringGenerate_1=cast=(XmStringTag)
-OS_XmStringGenerate_2=
-OS_XmStringGenerate_3=cast=(XmStringTag)
-
-OS_XmStringHeight=
-OS_XmStringHeight_0=cast=(XmFontList)
-OS_XmStringHeight_1=cast=(XmString)
-
-OS_XmStringParseText=
-OS_XmStringParseText_0=cast=(XtPointer)
-OS_XmStringParseText_1=cast=(XtPointer *)
-OS_XmStringParseText_2=cast=(XmStringTag)
-OS_XmStringParseText_3=
-OS_XmStringParseText_4=cast=(XmParseTable)
-OS_XmStringParseText_5=
-OS_XmStringParseText_6=cast=(XtPointer)
-
-OS_XmStringUnparse=
-OS_XmStringUnparse_0=cast=(XmString)
-OS_XmStringUnparse_1=cast=(XmStringTag)
-OS_XmStringUnparse_2=
-OS_XmStringUnparse_3=
-OS_XmStringUnparse_4=cast=(XmParseTable)
-OS_XmStringUnparse_5=
-OS_XmStringUnparse_6=
-
-OS_XmStringWidth=
-OS_XmStringWidth_0=cast=(XmFontList)
-OS_XmStringWidth_1=cast=(XmString)
-
-OS_XmTabCreate=
-OS_XmTabCreate_0=
-OS_XmTabCreate_1=
-OS_XmTabCreate_2=
-OS_XmTabCreate_3=
-OS_XmTabCreate_4=cast=(char *)
-
-OS_XmTabFree=
-OS_XmTabFree_0=cast=(XmTab)
-
-OS_XmTabListFree=
-OS_XmTabListFree_0=cast=(XmTabList)
-
-OS_XmTabListInsertTabs=
-OS_XmTabListInsertTabs_0=cast=(XmTabList)
-OS_XmTabListInsertTabs_1=cast=(XmTab *)
-OS_XmTabListInsertTabs_2=
-OS_XmTabListInsertTabs_3=
-
-OS_XmTextClearSelection=
-OS_XmTextClearSelection_0=cast=(Widget)
-OS_XmTextClearSelection_1=
-
-OS_XmTextCopy=
-OS_XmTextCopy_0=cast=(Widget)
-OS_XmTextCopy_1=
-
-OS_XmTextCut=
-OS_XmTextCut_0=cast=(Widget)
-OS_XmTextCut_1=
-
-OS_XmTextDisableRedisplay=
-OS_XmTextDisableRedisplay_0=cast=(Widget)
-
-OS_XmTextEnableRedisplay=
-OS_XmTextEnableRedisplay_0=cast=(Widget)
-
-OS_XmTextFieldPaste=
-OS_XmTextFieldPaste_0=cast=(Widget)
-
-OS_XmTextGetInsertionPosition=
-OS_XmTextGetInsertionPosition_0=cast=(Widget)
-
-OS_XmTextGetLastPosition=
-OS_XmTextGetLastPosition_0=cast=(Widget)
-
-OS_XmTextGetMaxLength=
-OS_XmTextGetMaxLength_0=cast=(Widget)
-
-OS_XmTextGetSelection=
-OS_XmTextGetSelection_0=cast=(Widget)
-
-OS_XmTextGetSelectionPosition=
-OS_XmTextGetSelectionPosition_0=cast=(Widget)
-OS_XmTextGetSelectionPosition_1=cast=(XmTextPosition *)
-OS_XmTextGetSelectionPosition_2=cast=(XmTextPosition *)
-
-OS_XmTextGetString=
-OS_XmTextGetString_0=cast=(Widget)
-
-OS_XmTextGetSubstring=
-OS_XmTextGetSubstring_0=cast=(Widget)
-OS_XmTextGetSubstring_1=
-OS_XmTextGetSubstring_2=
-OS_XmTextGetSubstring_3=
-OS_XmTextGetSubstring_4=cast=(char *)
-
-OS_XmTextGetSubstringWcs=
-OS_XmTextGetSubstringWcs_0=cast=(Widget)
-OS_XmTextGetSubstringWcs_1=cast=(XmTextPosition)
-OS_XmTextGetSubstringWcs_2=
-OS_XmTextGetSubstringWcs_3=
-OS_XmTextGetSubstringWcs_4=cast=(wchar_t *)
-
-OS_XmTextInsert=
-OS_XmTextInsert_0=cast=(Widget)
-OS_XmTextInsert_1=
-OS_XmTextInsert_2=cast=(char *)
-
-OS_XmTextPaste=
-OS_XmTextPaste_0=cast=(Widget)
-
-OS_XmTextPosToXY=
-OS_XmTextPosToXY_0=cast=(Widget)
-OS_XmTextPosToXY_1=cast=(XmTextPosition)
-OS_XmTextPosToXY_2=cast=(Position *)
-OS_XmTextPosToXY_3=cast=(Position *)
-
-OS_XmTextReplace=
-OS_XmTextReplace_0=cast=(Widget)
-OS_XmTextReplace_1=
-OS_XmTextReplace_2=
-OS_XmTextReplace_3=cast=(char *)
-
-OS_XmTextScroll=
-OS_XmTextScroll_0=cast=(Widget)
-OS_XmTextScroll_1=
-
-OS_XmTextSetEditable=
-OS_XmTextSetEditable_0=cast=(Widget)
-OS_XmTextSetEditable_1=
-
-OS_XmTextSetHighlight=
-OS_XmTextSetHighlight_0=cast=(Widget)
-OS_XmTextSetHighlight_1=
-OS_XmTextSetHighlight_2=
-OS_XmTextSetHighlight_3=
-
-OS_XmTextSetInsertionPosition=
-OS_XmTextSetInsertionPosition_0=cast=(Widget)
-OS_XmTextSetInsertionPosition_1=
-
-OS_XmTextSetMaxLength=
-OS_XmTextSetMaxLength_0=cast=(Widget)
-OS_XmTextSetMaxLength_1=
-
-OS_XmTextSetSelection=
-OS_XmTextSetSelection_0=cast=(Widget)
-OS_XmTextSetSelection_1=
-OS_XmTextSetSelection_2=
-OS_XmTextSetSelection_3=
-
-OS_XmTextSetString=
-OS_XmTextSetString_0=cast=(Widget)
-OS_XmTextSetString_1=cast=(char *)
-
-OS_XmTextShowPosition=
-OS_XmTextShowPosition_0=cast=(Widget)
-OS_XmTextShowPosition_1=
-
-OS_XmUpdateDisplay=
-OS_XmUpdateDisplay_0=cast=(Widget)
-
-OS_XmWidgetGetDisplayRect=
-OS_XmWidgetGetDisplayRect_0=cast=(Widget)
-OS_XmWidgetGetDisplayRect_1=cast=(XRectangle *)
-
-OS_XmbTextListToTextProperty=
-OS_XmbTextListToTextProperty_0=cast=(Display *)
-OS_XmbTextListToTextProperty_1=cast=(char **)
-OS_XmbTextListToTextProperty_2=
-OS_XmbTextListToTextProperty_3=cast=(XICCEncodingStyle)
-OS_XmbTextListToTextProperty_4=
-
-OS_XmbTextPropertyToTextList=
-OS_XmbTextPropertyToTextList_0=cast=(Display *)
-OS_XmbTextPropertyToTextList_1=
-OS_XmbTextPropertyToTextList_2=cast=(char ***)
-OS_XmbTextPropertyToTextList_3=cast=(int *)
-
-OS_XpCancelJob=
-OS_XpCancelJob_0=cast=(Display *)
-OS_XpCancelJob_1=
-
-OS_XpCreateContext=
-OS_XpCreateContext_0=cast=(Display *)
-OS_XpCreateContext_1=cast=(char *)
-
-OS_XpDestroyContext=
-OS_XpDestroyContext_0=cast=(Display *)
-OS_XpDestroyContext_1=cast=(XPContext)
-
-OS_XpEndJob=
-OS_XpEndJob_0=cast=(Display *)
-
-OS_XpEndPage=
-OS_XpEndPage_0=cast=(Display *)
-
-OS_XpFreePrinterList=
-OS_XpFreePrinterList_0=cast=(XPPrinterList)
-
-OS_XpGetOneAttribute=
-OS_XpGetOneAttribute_0=cast=(Display *)
-OS_XpGetOneAttribute_1=cast=(XPContext)
-OS_XpGetOneAttribute_2=cast=(XPAttributes)
-OS_XpGetOneAttribute_3=cast=(char *)
-
-OS_XpGetPageDimensions=
-OS_XpGetPageDimensions_0=cast=(Display *)
-OS_XpGetPageDimensions_1=cast=(XPContext)
-OS_XpGetPageDimensions_2=cast=(unsigned short *)
-OS_XpGetPageDimensions_3=cast=(unsigned short *)
-OS_XpGetPageDimensions_4=cast=(XRectangle *)
-
-OS_XpGetPrinterList=
-OS_XpGetPrinterList_0=cast=(Display *)
-OS_XpGetPrinterList_1=cast=(char *)
-OS_XpGetPrinterList_2=cast=(int *)
-
-OS_XpGetScreenOfContext=
-OS_XpGetScreenOfContext_0=cast=(Display *)
-OS_XpGetScreenOfContext_1=cast=(XPContext)
-
-OS_XpSetAttributes=
-OS_XpSetAttributes_0=cast=(Display *)
-OS_XpSetAttributes_1=cast=(XPContext)
-OS_XpSetAttributes_2=cast=(XPAttributes)
-OS_XpSetAttributes_3=cast=(char *)
-OS_XpSetAttributes_4=cast=(XPAttrReplacement)
-
-OS_XpSetContext=
-OS_XpSetContext_0=cast=(Display *)
-OS_XpSetContext_1=cast=(XPContext)
-
-OS_XpStartJob=
-OS_XpStartJob_0=cast=(Display *)
-OS_XpStartJob_1=cast=(XPSaveData)
-
-OS_XpStartPage=
-OS_XpStartPage_0=cast=(Display *)
-OS_XpStartPage_1=cast=(Window)
-
-OS_XtAddCallback=
-OS_XtAddCallback_0=cast=(Widget)
-OS_XtAddCallback_1=cast=(String)
-OS_XtAddCallback_2=cast=(XtCallbackProc)
-OS_XtAddCallback_3=cast=(XtPointer)
-
-OS_XtAddEventHandler=
-OS_XtAddEventHandler_0=cast=(Widget)
-OS_XtAddEventHandler_1=
-OS_XtAddEventHandler_2=
-OS_XtAddEventHandler_3=cast=(XtEventHandler)
-OS_XtAddEventHandler_4=cast=(XtPointer)
-
-OS_XtAddExposureToRegion=
-OS_XtAddExposureToRegion_0=cast=(XEvent *)
-OS_XtAddExposureToRegion_1=cast=(Region)
-
-OS_XtAppAddInput=
-OS_XtAppAddInput_0=cast=(XtAppContext)
-OS_XtAppAddInput_1=
-OS_XtAppAddInput_2=cast=(XtPointer)
-OS_XtAppAddInput_3=cast=(XtInputCallbackProc)
-OS_XtAppAddInput_4=cast=(XtPointer)
-
-OS_XtAppAddTimeOut=
-OS_XtAppAddTimeOut_0=cast=(XtAppContext)
-OS_XtAppAddTimeOut_1=
-OS_XtAppAddTimeOut_2=cast=(XtTimerCallbackProc)
-OS_XtAppAddTimeOut_3=cast=(XtPointer)
-
-OS_XtAppCreateShell=
-OS_XtAppCreateShell_0=cast=(String)
-OS_XtAppCreateShell_1=cast=(String)
-OS_XtAppCreateShell_2=cast=(WidgetClass)
-OS_XtAppCreateShell_3=cast=(Display *)
-OS_XtAppCreateShell_4=cast=(ArgList)
-OS_XtAppCreateShell_5=
-
-OS_XtAppGetSelectionTimeout=
-OS_XtAppGetSelectionTimeout_0=cast=(XtAppContext)
-
-OS_XtAppNextEvent=
-OS_XtAppNextEvent_0=cast=(XtAppContext)
-OS_XtAppNextEvent_1=cast=(XEvent *)
-
-OS_XtAppPeekEvent=
-OS_XtAppPeekEvent_0=cast=(XtAppContext)
-OS_XtAppPeekEvent_1=cast=(XEvent *)
-
-OS_XtAppPending=
-OS_XtAppPending_0=cast=(XtAppContext)
-
-OS_XtAppProcessEvent=
-OS_XtAppProcessEvent_0=cast=(XtAppContext)
-OS_XtAppProcessEvent_1=
-
-OS_XtAppSetErrorHandler=
-OS_XtAppSetErrorHandler_0=cast=(XtAppContext)
-OS_XtAppSetErrorHandler_1=cast=(XtErrorHandler)
-
-OS_XtAppSetFallbackResources=
-OS_XtAppSetFallbackResources_0=cast=(XtAppContext)
-OS_XtAppSetFallbackResources_1=cast=(String *)
-
-OS_XtAppSetSelectionTimeout=
-OS_XtAppSetSelectionTimeout_0=cast=(XtAppContext)
-OS_XtAppSetSelectionTimeout_1=
-
-OS_XtAppSetWarningHandler=
-OS_XtAppSetWarningHandler_0=cast=(XtAppContext)
-OS_XtAppSetWarningHandler_1=cast=(XtErrorHandler)
-
-OS_XtBuildEventMask=
-OS_XtBuildEventMask_0=cast=(Widget)
-
-OS_XtCallActionProc=
-OS_XtCallActionProc_0=cast=(Widget)
-OS_XtCallActionProc_1=cast=(String)
-OS_XtCallActionProc_2=cast=(XEvent *)
-OS_XtCallActionProc_3=cast=(String *)
-OS_XtCallActionProc_4=
-
-OS_XtClass=
-OS_XtClass_0=cast=(Widget)
-
-OS_XtConfigureWidget=
-OS_XtConfigureWidget_0=cast=(Widget)
-OS_XtConfigureWidget_1=
-OS_XtConfigureWidget_2=
-OS_XtConfigureWidget_3=
-OS_XtConfigureWidget_4=
-OS_XtConfigureWidget_5=
-
-OS_XtCreateApplicationContext=
-
-OS_XtCreatePopupShell=
-OS_XtCreatePopupShell_0=cast=(String)
-OS_XtCreatePopupShell_1=cast=(WidgetClass)
-OS_XtCreatePopupShell_2=cast=(Widget)
-OS_XtCreatePopupShell_3=cast=(ArgList)
-OS_XtCreatePopupShell_4=
-
-OS_XtDestroyApplicationContext=
-OS_XtDestroyApplicationContext_0=cast=(XtAppContext)
-
-OS_XtDestroyWidget=
-OS_XtDestroyWidget_0=cast=(Widget)
-
-OS_XtDispatchEvent=
-OS_XtDispatchEvent_0=cast=(XEvent *)
-
-OS_XtDisplay=
-OS_XtDisplay_0=cast=(Widget)
-
-OS_XtDisplayToApplicationContext=
-OS_XtDisplayToApplicationContext_0=cast=(Display *)
-
-OS_XtFree=
-OS_XtFree_0=cast=(char *)
-
-OS_XtGetMultiClickTime=
-OS_XtGetMultiClickTime_0=cast=(Display *)
-
-OS_XtGetValues=flags=no_gen
-OS_XtGetValues_0=cast=(Widget)
-OS_XtGetValues_1=cast=(ArgList)
-OS_XtGetValues_2=
-
-OS_XtInsertEventHandler=
-OS_XtInsertEventHandler_0=cast=(Widget)
-OS_XtInsertEventHandler_1=cast=(EventMask)
-OS_XtInsertEventHandler_2=cast=(Boolean)
-OS_XtInsertEventHandler_3=cast=(XtEventHandler)
-OS_XtInsertEventHandler_4=cast=(XtPointer)
-OS_XtInsertEventHandler_5=cast=(XtListPosition)
-
-OS_XtIsManaged=
-OS_XtIsManaged_0=cast=(Widget)
-
-OS_XtIsRealized=
-OS_XtIsRealized_0=cast=(Widget)
-
-OS_XtIsSubclass=
-OS_XtIsSubclass_0=cast=(Widget)
-OS_XtIsSubclass_1=cast=(WidgetClass)
-
-OS_XtIsTopLevelShell=
-OS_XtIsTopLevelShell_0=cast=(Widget)
-
-OS_XtLastTimestampProcessed=
-OS_XtLastTimestampProcessed_0=cast=(Display *)
-
-OS_XtMalloc=
-OS_XtMalloc_0=
-
-OS_XtManageChild=
-OS_XtManageChild_0=cast=(Widget)
-
-OS_XtMapWidget=
-OS_XtMapWidget_0=cast=(Widget)
-
-OS_XtMoveWidget=
-OS_XtMoveWidget_0=cast=(Widget)
-OS_XtMoveWidget_1=
-OS_XtMoveWidget_2=
-
-OS_XtNameToWidget=
-OS_XtNameToWidget_0=cast=(Widget)
-OS_XtNameToWidget_1=cast=(String)
-
-OS_XtOpenDisplay=
-OS_XtOpenDisplay_0=cast=(XtAppContext)
-OS_XtOpenDisplay_1=cast=(String)
-OS_XtOpenDisplay_2=cast=(String)
-OS_XtOpenDisplay_3=cast=(String)
-OS_XtOpenDisplay_4=cast=(XrmOptionDescRec *)
-OS_XtOpenDisplay_5=
-OS_XtOpenDisplay_6=cast=(int *)
-OS_XtOpenDisplay_7=cast=(char **)
-
-OS_XtOverrideTranslations=
-OS_XtOverrideTranslations_0=cast=(Widget)
-OS_XtOverrideTranslations_1=cast=(XtTranslations)
-
-OS_XtParent=
-OS_XtParent_0=cast=(Widget)
-
-OS_XtParseTranslationTable=
-OS_XtParseTranslationTable_0=cast=(String)
-
-OS_XtPopdown=
-OS_XtPopdown_0=cast=(Widget)
-
-OS_XtPopup=
-OS_XtPopup_0=cast=(Widget)
-OS_XtPopup_1=
-
-OS_XtQueryGeometry=
-OS_XtQueryGeometry_0=cast=(Widget)
-OS_XtQueryGeometry_1=cast=(XtWidgetGeometry *)
-OS_XtQueryGeometry_2=cast=(XtWidgetGeometry *)
-
-OS_XtRealizeWidget=
-OS_XtRealizeWidget_0=cast=(Widget)
-
-OS_XtRegisterDrawable=
-OS_XtRegisterDrawable_0=cast=Display *
-OS_XtRegisterDrawable_1=cast=Drawable
-OS_XtRegisterDrawable_2=cast=Widget
-
-OS_XtRemoveEventHandler=
-OS_XtRemoveEventHandler_0=cast=Widget
-OS_XtRemoveEventHandler_1=
-OS_XtRemoveEventHandler_2=
-OS_XtRemoveEventHandler_3=cast=XtEventHandler
-OS_XtRemoveEventHandler_4=cast=XtPointer
-
-OS_XtRemoveInput=
-OS_XtRemoveInput_0=cast=(XtInputId)
-
-OS_XtRemoveTimeOut=
-OS_XtRemoveTimeOut_0=
-
-OS_XtResizeWidget=
-OS_XtResizeWidget_0=cast=(Widget)
-OS_XtResizeWidget_1=
-OS_XtResizeWidget_2=
-OS_XtResizeWidget_3=
-
-OS_XtResizeWindow=
-OS_XtResizeWindow_0=cast=(Widget)
-
-OS_XtSetLanguageProc=
-OS_XtSetLanguageProc_0=cast=(XtAppContext)
-OS_XtSetLanguageProc_1=cast=(XtLanguageProc)
-OS_XtSetLanguageProc_2=cast=(XtPointer)
-
-OS_XtSetMappedWhenManaged=
-OS_XtSetMappedWhenManaged_0=cast=(Widget)
-OS_XtSetMappedWhenManaged_1=
-
-OS_XtSetValues=
-OS_XtSetValues_0=cast=(Widget)
-OS_XtSetValues_1=cast=(ArgList)
-OS_XtSetValues_2=
-
-OS_XtToolkitInitialize=
-
-OS_XtToolkitThreadInitialize=
-
-OS_XtTranslateCoords=
-OS_XtTranslateCoords_0=cast=(Widget)
-OS_XtTranslateCoords_1=
-OS_XtTranslateCoords_2=
-OS_XtTranslateCoords_3=
-OS_XtTranslateCoords_4=
-
-OS_XtUnmanageChild=
-OS_XtUnmanageChild_0=cast=(Widget)
-
-OS_XtUnmapWidget=
-OS_XtUnmapWidget_0=cast=(Widget)
-
-OS_XtUnregisterDrawable=
-OS_XtUnregisterDrawable_0=cast=Display *
-OS_XtUnregisterDrawable_1=cast=Drawable
-
-OS_XtWindow=
-OS_XtWindow_0=cast=(Widget)
-
-OS_XtWindowToWidget=
-OS_XtWindowToWidget_0=cast=(Display *)
-OS_XtWindowToWidget_1=cast=(Window)
-
-OS__XmSetMenuTraversal=
-OS__XmSetMenuTraversal_0=cast=(Widget)
-OS__XmSetMenuTraversal_1=
-
-OS_close=
-OS_close_0=
-
-OS_fd_set_sizeof=
-
-OS_getenv=
-OS_getenv_0=cast=(const char *)
-
-OS_iconv=
-OS_iconv_0=cast=(iconv_t)
-OS_iconv_1=cast=(void *)
-OS_iconv_2=cast=(size_t *)
-OS_iconv_3=cast=(char **)
-OS_iconv_4=cast=(size_t *)
-
-OS_iconv_close=
-OS_iconv_close_0=cast=(iconv_t)
-
-OS_iconv_open=
-OS_iconv_open_0=cast=(const char *)
-OS_iconv_open_1=cast=(const char *)
-
-OS_memmove__ILorg_eclipse_swt_internal_motif_XButtonEvent_2I=
-OS_memmove__ILorg_eclipse_swt_internal_motif_XButtonEvent_2I_0=cast=(void *)
-OS_memmove__ILorg_eclipse_swt_internal_motif_XButtonEvent_2I_1=cast=(const void *),flags=no_out
-OS_memmove__ILorg_eclipse_swt_internal_motif_XButtonEvent_2I_2=cast=(size_t)
-
-OS_memmove__ILorg_eclipse_swt_internal_motif_XClientMessageEvent_2I=
-OS_memmove__ILorg_eclipse_swt_internal_motif_XClientMessageEvent_2I_0=cast=(void *)
-OS_memmove__ILorg_eclipse_swt_internal_motif_XClientMessageEvent_2I_1=cast=(const void *),flags=no_out
-OS_memmove__ILorg_eclipse_swt_internal_motif_XClientMessageEvent_2I_2=cast=(size_t)
-
-OS_memmove__ILorg_eclipse_swt_internal_motif_XConfigureEvent_2I=
-OS_memmove__ILorg_eclipse_swt_internal_motif_XConfigureEvent_2I_0=cast=void *
-OS_memmove__ILorg_eclipse_swt_internal_motif_XConfigureEvent_2I_1=cast=(const void *),flags=no_out
-OS_memmove__ILorg_eclipse_swt_internal_motif_XConfigureEvent_2I_2=cast=(size_t)
-
-OS_memmove__ILorg_eclipse_swt_internal_motif_XExposeEvent_2I=
-OS_memmove__ILorg_eclipse_swt_internal_motif_XExposeEvent_2I_0=cast=(void *)
-OS_memmove__ILorg_eclipse_swt_internal_motif_XExposeEvent_2I_1=cast=(const void *),flags=no_out
-OS_memmove__ILorg_eclipse_swt_internal_motif_XExposeEvent_2I_2=cast=(size_t)
-
-OS_memmove__ILorg_eclipse_swt_internal_motif_XImage_2I=
-OS_memmove__ILorg_eclipse_swt_internal_motif_XImage_2I_0=cast=(void *)
-OS_memmove__ILorg_eclipse_swt_internal_motif_XImage_2I_1=cast=(const void *),flags=no_out
-OS_memmove__ILorg_eclipse_swt_internal_motif_XImage_2I_2=cast=(size_t)
-
-OS_memmove__ILorg_eclipse_swt_internal_motif_XKeyEvent_2I=
-OS_memmove__ILorg_eclipse_swt_internal_motif_XKeyEvent_2I_0=cast=void *
-OS_memmove__ILorg_eclipse_swt_internal_motif_XKeyEvent_2I_1=cast=const void *,flags=no_out
-OS_memmove__ILorg_eclipse_swt_internal_motif_XKeyEvent_2I_2=cast=size_t
-
-OS_memmove__ILorg_eclipse_swt_internal_motif_XmDragProcCallbackStruct_2I=
-OS_memmove__ILorg_eclipse_swt_internal_motif_XmDragProcCallbackStruct_2I_0=cast=(void *)
-OS_memmove__ILorg_eclipse_swt_internal_motif_XmDragProcCallbackStruct_2I_1=cast=(const void *),flags=no_out
-OS_memmove__ILorg_eclipse_swt_internal_motif_XmDragProcCallbackStruct_2I_2=cast=(size_t)
-
-OS_memmove__ILorg_eclipse_swt_internal_motif_XmTextBlockRec_2I=
-OS_memmove__ILorg_eclipse_swt_internal_motif_XmTextBlockRec_2I_0=cast=(void *)
-OS_memmove__ILorg_eclipse_swt_internal_motif_XmTextBlockRec_2I_1=cast=(const void *),flags=no_out
-OS_memmove__ILorg_eclipse_swt_internal_motif_XmTextBlockRec_2I_2=cast=(size_t)
-
-OS_memmove__ILorg_eclipse_swt_internal_motif_XmTextVerifyCallbackStruct_2I=
-OS_memmove__ILorg_eclipse_swt_internal_motif_XmTextVerifyCallbackStruct_2I_0=cast=(void *)
-OS_memmove__ILorg_eclipse_swt_internal_motif_XmTextVerifyCallbackStruct_2I_1=cast=(const void *),flags=no_out
-OS_memmove__ILorg_eclipse_swt_internal_motif_XmTextVerifyCallbackStruct_2I_2=cast=(size_t)
-
-OS_memmove__I_3BI=
-OS_memmove__I_3BI_0=cast=(void *)
-OS_memmove__I_3BI_1=cast=(const void *),flags=no_out
-OS_memmove__I_3BI_2=cast=(size_t)
-
-OS_memmove__I_3CI=
-OS_memmove__I_3CI_0=cast=(void *)
-OS_memmove__I_3CI_1=cast=(const void *),flags=no_out
-OS_memmove__I_3CI_2=cast=(size_t)
-
-OS_memmove__I_3II=
-OS_memmove__I_3II_0=cast=(void *)
-OS_memmove__I_3II_1=cast=(const void *),flags=no_out
-OS_memmove__I_3II_2=cast=(size_t)
-
-OS_memmove__I_3SI=
-OS_memmove__I_3SI_0=cast=(void *)
-OS_memmove__I_3SI_1=cast=(const void *),flags=no_out
-OS_memmove__I_3SI_2=cast=(size_t)
-
-OS_memmove__Lorg_eclipse_swt_internal_motif_Visual_2II=
-OS_memmove__Lorg_eclipse_swt_internal_motif_Visual_2II_0=cast=(void *),flags=no_in
-OS_memmove__Lorg_eclipse_swt_internal_motif_Visual_2II_1=cast=(const void *)
-OS_memmove__Lorg_eclipse_swt_internal_motif_Visual_2II_2=cast=(size_t)
-
-OS_memmove__Lorg_eclipse_swt_internal_motif_XButtonEvent_2II=
-OS_memmove__Lorg_eclipse_swt_internal_motif_XButtonEvent_2II_0=cast=(void *),flags=no_in
-OS_memmove__Lorg_eclipse_swt_internal_motif_XButtonEvent_2II_1=cast=(const void *)
-OS_memmove__Lorg_eclipse_swt_internal_motif_XButtonEvent_2II_2=cast=(size_t)
-
-OS_memmove__Lorg_eclipse_swt_internal_motif_XCharStruct_2II=
-OS_memmove__Lorg_eclipse_swt_internal_motif_XCharStruct_2II_0=cast=(void *),flags=no_in
-OS_memmove__Lorg_eclipse_swt_internal_motif_XCharStruct_2II_1=cast=(const void *)
-OS_memmove__Lorg_eclipse_swt_internal_motif_XCharStruct_2II_2=cast=(size_t)
-
-OS_memmove__Lorg_eclipse_swt_internal_motif_XClientMessageEvent_2II=
-OS_memmove__Lorg_eclipse_swt_internal_motif_XClientMessageEvent_2II_0=cast=(void *),flags=no_in
-OS_memmove__Lorg_eclipse_swt_internal_motif_XClientMessageEvent_2II_1=cast=(const void *)
-OS_memmove__Lorg_eclipse_swt_internal_motif_XClientMessageEvent_2II_2=cast=(size_t)
-
-OS_memmove__Lorg_eclipse_swt_internal_motif_XConfigureEvent_2II=
-OS_memmove__Lorg_eclipse_swt_internal_motif_XConfigureEvent_2II_0=cast=(void *),flags=no_in
-OS_memmove__Lorg_eclipse_swt_internal_motif_XConfigureEvent_2II_1=cast=(const void *)
-OS_memmove__Lorg_eclipse_swt_internal_motif_XConfigureEvent_2II_2=cast=(size_t)
-
-OS_memmove__Lorg_eclipse_swt_internal_motif_XCreateWindowEvent_2II=
-OS_memmove__Lorg_eclipse_swt_internal_motif_XCreateWindowEvent_2II_0=cast=(void *),flags=no_in
-OS_memmove__Lorg_eclipse_swt_internal_motif_XCreateWindowEvent_2II_1=cast=(const void *)
-OS_memmove__Lorg_eclipse_swt_internal_motif_XCreateWindowEvent_2II_2=cast=(size_t)
-
-OS_memmove__Lorg_eclipse_swt_internal_motif_XCrossingEvent_2II=
-OS_memmove__Lorg_eclipse_swt_internal_motif_XCrossingEvent_2II_0=cast=(void *),flags=no_in
-OS_memmove__Lorg_eclipse_swt_internal_motif_XCrossingEvent_2II_1=cast=(const void *)
-OS_memmove__Lorg_eclipse_swt_internal_motif_XCrossingEvent_2II_2=cast=(size_t)
-
-OS_memmove__Lorg_eclipse_swt_internal_motif_XDestroyWindowEvent_2II=
-OS_memmove__Lorg_eclipse_swt_internal_motif_XDestroyWindowEvent_2II_0=cast=void *,flags=no_in
-OS_memmove__Lorg_eclipse_swt_internal_motif_XDestroyWindowEvent_2II_1=cast=const void *
-OS_memmove__Lorg_eclipse_swt_internal_motif_XDestroyWindowEvent_2II_2=cast=size_t
-
-OS_memmove__Lorg_eclipse_swt_internal_motif_XEvent_2II=
-OS_memmove__Lorg_eclipse_swt_internal_motif_XEvent_2II_0=cast=void *
-OS_memmove__Lorg_eclipse_swt_internal_motif_XEvent_2II_1=cast=const void *
-OS_memmove__Lorg_eclipse_swt_internal_motif_XEvent_2II_2=cast=size_t
-
-OS_memmove__Lorg_eclipse_swt_internal_motif_XExposeEvent_2II=
-OS_memmove__Lorg_eclipse_swt_internal_motif_XExposeEvent_2II_0=cast=(void *),flags=no_in
-OS_memmove__Lorg_eclipse_swt_internal_motif_XExposeEvent_2II_1=cast=(const void *)
-OS_memmove__Lorg_eclipse_swt_internal_motif_XExposeEvent_2II_2=cast=(size_t)
-
-OS_memmove__Lorg_eclipse_swt_internal_motif_XFocusChangeEvent_2II=
-OS_memmove__Lorg_eclipse_swt_internal_motif_XFocusChangeEvent_2II_0=cast=(void *),flags=no_in
-OS_memmove__Lorg_eclipse_swt_internal_motif_XFocusChangeEvent_2II_1=cast=(const void *)
-OS_memmove__Lorg_eclipse_swt_internal_motif_XFocusChangeEvent_2II_2=cast=(size_t)
-
-OS_memmove__Lorg_eclipse_swt_internal_motif_XFontStruct_2II=
-OS_memmove__Lorg_eclipse_swt_internal_motif_XFontStruct_2II_0=cast=(void *),flags=no_in
-OS_memmove__Lorg_eclipse_swt_internal_motif_XFontStruct_2II_1=cast=(const void *)
-OS_memmove__Lorg_eclipse_swt_internal_motif_XFontStruct_2II_2=cast=(size_t)
-
-OS_memmove__Lorg_eclipse_swt_internal_motif_XIconSize_2II=
-OS_memmove__Lorg_eclipse_swt_internal_motif_XIconSize_2II_0=cast=void *,flags=no_in
-OS_memmove__Lorg_eclipse_swt_internal_motif_XIconSize_2II_1=cast=(const void *)
-OS_memmove__Lorg_eclipse_swt_internal_motif_XIconSize_2II_2=cast=size_t
-
-OS_memmove__Lorg_eclipse_swt_internal_motif_XImage_2II=
-OS_memmove__Lorg_eclipse_swt_internal_motif_XImage_2II_0=cast=(void *),flags=no_in
-OS_memmove__Lorg_eclipse_swt_internal_motif_XImage_2II_1=cast=(const void *)
-OS_memmove__Lorg_eclipse_swt_internal_motif_XImage_2II_2=cast=(size_t)
-
-OS_memmove__Lorg_eclipse_swt_internal_motif_XKeyEvent_2II=
-OS_memmove__Lorg_eclipse_swt_internal_motif_XKeyEvent_2II_0=cast=(void *),flags=no_in
-OS_memmove__Lorg_eclipse_swt_internal_motif_XKeyEvent_2II_1=cast=(const void *)
-OS_memmove__Lorg_eclipse_swt_internal_motif_XKeyEvent_2II_2=cast=(size_t)
-
-OS_memmove__Lorg_eclipse_swt_internal_motif_XModifierKeymap_2II=
-OS_memmove__Lorg_eclipse_swt_internal_motif_XModifierKeymap_2II_0=cast=(void *),flags=no_in
-OS_memmove__Lorg_eclipse_swt_internal_motif_XModifierKeymap_2II_1=cast=(const void *)
-OS_memmove__Lorg_eclipse_swt_internal_motif_XModifierKeymap_2II_2=cast=(size_t)
-
-OS_memmove__Lorg_eclipse_swt_internal_motif_XMotionEvent_2II=
-OS_memmove__Lorg_eclipse_swt_internal_motif_XMotionEvent_2II_0=cast=(void *),flags=no_in
-OS_memmove__Lorg_eclipse_swt_internal_motif_XMotionEvent_2II_1=cast=(const void *)
-OS_memmove__Lorg_eclipse_swt_internal_motif_XMotionEvent_2II_2=cast=(size_t)
-
-OS_memmove__Lorg_eclipse_swt_internal_motif_XPropertyEvent_2II=
-OS_memmove__Lorg_eclipse_swt_internal_motif_XPropertyEvent_2II_0=cast=void *,flags=no_in
-OS_memmove__Lorg_eclipse_swt_internal_motif_XPropertyEvent_2II_1=cast=const void *
-OS_memmove__Lorg_eclipse_swt_internal_motif_XPropertyEvent_2II_2=cast=size_t
-
-OS_memmove__Lorg_eclipse_swt_internal_motif_XReparentEvent_2II=
-OS_memmove__Lorg_eclipse_swt_internal_motif_XReparentEvent_2II_0=cast=(void *),flags=no_in
-OS_memmove__Lorg_eclipse_swt_internal_motif_XReparentEvent_2II_1=cast=(const void *)
-OS_memmove__Lorg_eclipse_swt_internal_motif_XReparentEvent_2II_2=cast=(size_t)
-
-OS_memmove__Lorg_eclipse_swt_internal_motif_XineramaScreenInfo_2II=
-OS_memmove__Lorg_eclipse_swt_internal_motif_XineramaScreenInfo_2II_0=cast=(void *),flags=no_in
-OS_memmove__Lorg_eclipse_swt_internal_motif_XineramaScreenInfo_2II_1=cast=(const void *)
-OS_memmove__Lorg_eclipse_swt_internal_motif_XineramaScreenInfo_2II_2=cast=(size_t)
-
-OS_memmove__Lorg_eclipse_swt_internal_motif_XmAnyCallbackStruct_2II=
-OS_memmove__Lorg_eclipse_swt_internal_motif_XmAnyCallbackStruct_2II_0=cast=(void *),flags=no_in
-OS_memmove__Lorg_eclipse_swt_internal_motif_XmAnyCallbackStruct_2II_1=cast=(const void *)
-OS_memmove__Lorg_eclipse_swt_internal_motif_XmAnyCallbackStruct_2II_2=cast=(size_t)
-
-OS_memmove__Lorg_eclipse_swt_internal_motif_XmDragProcCallbackStruct_2II=
-OS_memmove__Lorg_eclipse_swt_internal_motif_XmDragProcCallbackStruct_2II_0=cast=(void *),flags=no_in
-OS_memmove__Lorg_eclipse_swt_internal_motif_XmDragProcCallbackStruct_2II_1=cast=(const void *)
-OS_memmove__Lorg_eclipse_swt_internal_motif_XmDragProcCallbackStruct_2II_2=cast=(size_t)
-
-OS_memmove__Lorg_eclipse_swt_internal_motif_XmDropFinishCallbackStruct_2II=
-OS_memmove__Lorg_eclipse_swt_internal_motif_XmDropFinishCallbackStruct_2II_0=cast=(void *),flags=no_in
-OS_memmove__Lorg_eclipse_swt_internal_motif_XmDropFinishCallbackStruct_2II_1=cast=(const void *)
-OS_memmove__Lorg_eclipse_swt_internal_motif_XmDropFinishCallbackStruct_2II_2=cast=(size_t)
-
-OS_memmove__Lorg_eclipse_swt_internal_motif_XmDropProcCallbackStruct_2II=
-OS_memmove__Lorg_eclipse_swt_internal_motif_XmDropProcCallbackStruct_2II_0=cast=(void *),flags=no_in
-OS_memmove__Lorg_eclipse_swt_internal_motif_XmDropProcCallbackStruct_2II_1=cast=(const void *)
-OS_memmove__Lorg_eclipse_swt_internal_motif_XmDropProcCallbackStruct_2II_2=cast=(size_t)
-
-OS_memmove__Lorg_eclipse_swt_internal_motif_XmTextBlockRec_2II=
-OS_memmove__Lorg_eclipse_swt_internal_motif_XmTextBlockRec_2II_0=cast=(void *),flags=no_in
-OS_memmove__Lorg_eclipse_swt_internal_motif_XmTextBlockRec_2II_1=cast=(const void *)
-OS_memmove__Lorg_eclipse_swt_internal_motif_XmTextBlockRec_2II_2=cast=(size_t)
-
-OS_memmove__Lorg_eclipse_swt_internal_motif_XmTextVerifyCallbackStruct_2II=
-OS_memmove__Lorg_eclipse_swt_internal_motif_XmTextVerifyCallbackStruct_2II_0=cast=(void *),flags=no_in
-OS_memmove__Lorg_eclipse_swt_internal_motif_XmTextVerifyCallbackStruct_2II_1=cast=(const void *)
-OS_memmove__Lorg_eclipse_swt_internal_motif_XmTextVerifyCallbackStruct_2II_2=cast=(size_t)
-
-OS_memmove___3BII=
-OS_memmove___3BII_0=cast=(void *),flags=no_in
-OS_memmove___3BII_1=cast=(const void *)
-OS_memmove___3BII_2=cast=(size_t)
-
-OS_memmove___3CII=
-OS_memmove___3CII_0=cast=(void *),flags=no_in
-OS_memmove___3CII_1=cast=(const void *)
-OS_memmove___3CII_2=cast=(size_t)
-
-OS_memmove___3III=
-OS_memmove___3III_0=cast=(void *),flags=no_in
-OS_memmove___3III_1=cast=(const void *)
-OS_memmove___3III_2=cast=(size_t)
-
-OS_nl_langinfo=
-OS_nl_langinfo_0=
-
-OS_overrideShellWidgetClass=flags=const
-
-OS_pipe=
-OS_pipe_0=cast=(int *)
-
-OS_read=
-OS_read_0=
-OS_read_1=cast=(char *)
-OS_read_2=
-
-OS_select=
-OS_select_0=
-OS_select_1=cast=(fd_set *)
-OS_select_2=cast=(fd_set *)
-OS_select_3=cast=(fd_set *)
-OS_select_4=cast=(struct timeval *)
-
-OS_setResourceMem=flags=no_gen
-OS_setResourceMem_0=
-OS_setResourceMem_1=
-
-OS_setlocale=
-OS_setlocale_0=
-OS_setlocale_1=cast=(char *)
-
-OS_shellWidgetClass=flags=const
-
-OS_strlen=
-OS_strlen_0=cast=(char *)
-
-OS_topLevelShellWidgetClass=flags=const
-
-OS_transientShellWidgetClass=flags=const
-
-OS_write=
-OS_write_0=
-OS_write_1=cast=(char *)
-OS_write_2=
-
-OS_xmMenuShellWidgetClass=flags=const
-
-
-org_eclipse_swt_internal_motif_Visual=
-Visual_ext_data=cast=(XExtData *)
-Visual_visualid=
-Visual_c_class=accessor=class
-Visual_red_mask=
-Visual_green_mask=
-Visual_blue_mask=
-Visual_bits_per_rgb=
-Visual_map_entries=
-
-org_eclipse_swt_internal_motif_XAnyEvent=
-XAnyEvent_serial=
-XAnyEvent_send_event=
-XAnyEvent_display=cast=(Display *)
-XAnyEvent_window=
-
-org_eclipse_swt_internal_motif_XButtonEvent=
-XButtonEvent_root=
-XButtonEvent_subwindow=
-XButtonEvent_time=
-XButtonEvent_x=
-XButtonEvent_y=
-XButtonEvent_x_root=
-XButtonEvent_y_root=
-XButtonEvent_state=
-XButtonEvent_button=
-XButtonEvent_same_screen=
-
-org_eclipse_swt_internal_motif_XCharStruct=
-XCharStruct_lbearing=
-XCharStruct_rbearing=
-XCharStruct_width=
-XCharStruct_ascent=
-XCharStruct_descent=
-XCharStruct_attributes=
-
-org_eclipse_swt_internal_motif_XClientMessageEvent=
-XClientMessageEvent_message_type=cast=Atom
-XClientMessageEvent_format=
-XClientMessageEvent_data=accessor=data.l,cast=long *
-
-org_eclipse_swt_internal_motif_XColor=
-XColor_pixel=
-XColor_red=
-XColor_green=
-XColor_blue=
-XColor_flags=
-XColor_pad=
-
-org_eclipse_swt_internal_motif_XConfigureEvent=
-XConfigureEvent_serial=
-XConfigureEvent_send_event=
-XConfigureEvent_display=cast=Display *
-XConfigureEvent_event=cast=Window
-XConfigureEvent_window=cast=Window
-XConfigureEvent_x=
-XConfigureEvent_y=
-XConfigureEvent_width=
-XConfigureEvent_height=
-XConfigureEvent_border_width=
-XConfigureEvent_above=cast=Window
-XConfigureEvent_override_redirect=
-
-org_eclipse_swt_internal_motif_XCreateWindowEvent=
-XCreateWindowEvent_serial=
-XCreateWindowEvent_send_event=
-XCreateWindowEvent_display=cast=(Display *)
-XCreateWindowEvent_parent=cast=Window
-XCreateWindowEvent_window=cast=Window
-XCreateWindowEvent_x=
-XCreateWindowEvent_y=
-XCreateWindowEvent_width=
-XCreateWindowEvent_height=
-XCreateWindowEvent_border_width=
-XCreateWindowEvent_override_redirect=
-
-org_eclipse_swt_internal_motif_XCrossingEvent=
-XCrossingEvent_root=
-XCrossingEvent_subwindow=
-XCrossingEvent_time=
-XCrossingEvent_x=
-XCrossingEvent_y=
-XCrossingEvent_x_root=
-XCrossingEvent_y_root=
-XCrossingEvent_mode=
-XCrossingEvent_detail=
-XCrossingEvent_same_screen=
-XCrossingEvent_focus=
-XCrossingEvent_state=
-
-org_eclipse_swt_internal_motif_XDestroyWindowEvent=
-XDestroyWindowEvent_serial=
-XDestroyWindowEvent_send_event=
-XDestroyWindowEvent_display=cast=Display *
-XDestroyWindowEvent_event=cast=Window
-XDestroyWindowEvent_window=cast=Window
-
-org_eclipse_swt_internal_motif_XEvent=
-XEvent_type=
-
-org_eclipse_swt_internal_motif_XExposeEvent=
-XExposeEvent_x=
-XExposeEvent_y=
-XExposeEvent_width=
-XExposeEvent_height=
-XExposeEvent_count=
-
-org_eclipse_swt_internal_motif_XFocusChangeEvent=
-XFocusChangeEvent_mode=
-XFocusChangeEvent_detail=
-
-org_eclipse_swt_internal_motif_XFontStruct=
-XFontStruct_ext_data=cast=(XExtData *)
-XFontStruct_fid=
-XFontStruct_direction=
-XFontStruct_min_char_or_byte2=
-XFontStruct_max_char_or_byte2=
-XFontStruct_min_byte1=
-XFontStruct_max_byte1=
-XFontStruct_all_chars_exist=
-XFontStruct_default_char=
-XFontStruct_n_properties=
-XFontStruct_properties=cast=(XFontProp *)
-XFontStruct_min_bounds_lbearing=accessor=min_bounds.lbearing
-XFontStruct_min_bounds_rbearing=accessor=min_bounds.rbearing
-XFontStruct_min_bounds_width=accessor=min_bounds.width
-XFontStruct_min_bounds_ascent=accessor=min_bounds.ascent
-XFontStruct_min_bounds_descent=accessor=min_bounds.descent
-XFontStruct_min_bounds_attributes=accessor=min_bounds.attributes
-XFontStruct_max_bounds_lbearing=accessor=max_bounds.lbearing
-XFontStruct_max_bounds_rbearing=accessor=max_bounds.rbearing
-XFontStruct_max_bounds_width=accessor=max_bounds.width
-XFontStruct_max_bounds_ascent=accessor=max_bounds.ascent
-XFontStruct_max_bounds_descent=accessor=max_bounds.descent
-XFontStruct_max_bounds_attributes=accessor=max_bounds.attributes
-XFontStruct_per_char=cast=(XCharStruct *)
-XFontStruct_ascent=
-XFontStruct_descent=
-
-org_eclipse_swt_internal_motif_XGCValues=
-XGCValues_function=
-XGCValues_plane_mask=
-XGCValues_foreground=
-XGCValues_background=
-XGCValues_line_width=
-XGCValues_line_style=
-XGCValues_cap_style=
-XGCValues_join_style=
-XGCValues_fill_style=
-XGCValues_fill_rule=
-XGCValues_arc_mode=
-XGCValues_tile=
-XGCValues_stipple=
-XGCValues_ts_x_origin=
-XGCValues_ts_y_origin=
-XGCValues_font=
-XGCValues_subwindow_mode=
-XGCValues_graphics_exposures=
-XGCValues_clip_x_origin=
-XGCValues_clip_y_origin=
-XGCValues_clip_mask=
-XGCValues_dash_offset=
-XGCValues_dashes=
-
-org_eclipse_swt_internal_motif_XIconSize=
-XIconSize_min_width=
-XIconSize_min_height=
-XIconSize_max_width=
-XIconSize_max_height=
-XIconSize_width_inc=
-XIconSize_height_inc=
-
-org_eclipse_swt_internal_motif_XImage=
-XImage_width=
-XImage_height=
-XImage_xoffset=
-XImage_format=
-XImage_data=cast=(char *)
-XImage_byte_order=
-XImage_bitmap_unit=
-XImage_bitmap_bit_order=
-XImage_bitmap_pad=
-XImage_depth=
-XImage_bytes_per_line=
-XImage_bits_per_pixel=
-XImage_red_mask=
-XImage_green_mask=
-XImage_blue_mask=
-XImage_obdata=cast=(XPointer)
-XImage_create_image=accessor=f.create_image,cast=(XImage *(*)())
-XImage_destroy_image=accessor=f.destroy_image,cast=(int(*)())
-XImage_get_pixel=accessor=f.get_pixel,cast=(unsigned long(*)())
-XImage_put_pixel=accessor=f.put_pixel,cast=(int(*)())
-XImage_sub_image=accessor=f.sub_image,cast=(XImage *(*)())
-XImage_add_pixel=accessor=f.add_pixel,cast=(int(*)())
-
-org_eclipse_swt_internal_motif_XKeyEvent=
-XKeyEvent_root=
-XKeyEvent_subwindow=
-XKeyEvent_time=
-XKeyEvent_x=
-XKeyEvent_y=
-XKeyEvent_x_root=
-XKeyEvent_y_root=
-XKeyEvent_state=
-XKeyEvent_keycode=
-XKeyEvent_same_screen=
-
-org_eclipse_swt_internal_motif_XModifierKeymap=
-XModifierKeymap_max_keypermod=
-XModifierKeymap_modifiermap=cast=(KeyCode *)
-
-org_eclipse_swt_internal_motif_XMotionEvent=
-XMotionEvent_root=
-XMotionEvent_subwindow=
-XMotionEvent_time=
-XMotionEvent_x=
-XMotionEvent_y=
-XMotionEvent_x_root=
-XMotionEvent_y_root=
-XMotionEvent_state=
-XMotionEvent_is_hint=
-XMotionEvent_same_screen=
-
-org_eclipse_swt_internal_motif_XPropertyEvent=
-XPropertyEvent_atom=
-XPropertyEvent_time=
-XPropertyEvent_state=
-
-org_eclipse_swt_internal_motif_XRectangle=
-XRectangle_x=
-XRectangle_y=
-XRectangle_width=
-XRectangle_height=
-
-org_eclipse_swt_internal_motif_XReparentEvent=
-XReparentEvent_serial=
-XReparentEvent_send_event=
-XReparentEvent_display=cast=Display *
-XReparentEvent_event=cast=Window
-XReparentEvent_window=cast=Window
-XReparentEvent_parent=cast=Window
-XReparentEvent_x=
-XReparentEvent_y=
-XReparentEvent_override_redirect=
-
-org_eclipse_swt_internal_motif_XSetWindowAttributes=
-XSetWindowAttributes_background_pixmap=
-XSetWindowAttributes_background_pixel=
-XSetWindowAttributes_border_pixmap=
-XSetWindowAttributes_border_pixel=
-XSetWindowAttributes_bit_gravity=
-XSetWindowAttributes_win_gravity=
-XSetWindowAttributes_backing_store=
-XSetWindowAttributes_backing_planes=
-XSetWindowAttributes_backing_pixel=
-XSetWindowAttributes_save_under=
-XSetWindowAttributes_event_mask=
-XSetWindowAttributes_do_not_propagate_mask=
-XSetWindowAttributes_override_redirect=
-XSetWindowAttributes_colormap=
-XSetWindowAttributes_cursor=
-
-org_eclipse_swt_internal_motif_XSizeHints=
-XSizeHints_flags=
-XSizeHints_x=
-XSizeHints_y=
-XSizeHints_width=
-XSizeHints_height=
-XSizeHints_min_width=
-XSizeHints_min_height=
-XSizeHints_max_width=
-XSizeHints_max_height=
-XSizeHints_width_inc=
-XSizeHints_height_inc=
-XSizeHints_aspect_x=accessor=min_aspect.x
-XSizeHints_aspect_y=accessor=min_aspect.y
-XSizeHints_base_width=
-XSizeHints_base_height=
-XSizeHints_win_gravity=
-
-org_eclipse_swt_internal_motif_XTextProperty=
-XTextProperty_value=cast=(unsigned char *)
-XTextProperty_encoding=
-XTextProperty_format=
-XTextProperty_nitems=
-
-org_eclipse_swt_internal_motif_XWindowAttributes=
-XWindowAttributes_x=
-XWindowAttributes_y=
-XWindowAttributes_width=
-XWindowAttributes_height=
-XWindowAttributes_border_width=
-XWindowAttributes_depth=
-XWindowAttributes_visual=cast=(Visual *)
-XWindowAttributes_root=
-XWindowAttributes_c_class=accessor=class
-XWindowAttributes_bit_gravity=
-XWindowAttributes_win_gravity=
-XWindowAttributes_backing_store=
-XWindowAttributes_backing_planes=
-XWindowAttributes_backing_pixel=
-XWindowAttributes_save_under=
-XWindowAttributes_colormap=
-XWindowAttributes_map_installed=
-XWindowAttributes_map_state=
-XWindowAttributes_all_event_masks=
-XWindowAttributes_your_event_mask=
-XWindowAttributes_do_not_propagate_mask=
-XWindowAttributes_override_redirect=
-XWindowAttributes_screen=cast=(Screen *)
-
-org_eclipse_swt_internal_motif_XWindowChanges=
-XWindowChanges_x=
-XWindowChanges_y=
-XWindowChanges_width=
-XWindowChanges_height=
-XWindowChanges_border_width=
-XWindowChanges_sibling=
-XWindowChanges_stack_mode=
-
-org_eclipse_swt_internal_motif_XineramaScreenInfo=
-XineramaScreenInfo_screen_number=
-XineramaScreenInfo_x_org=
-XineramaScreenInfo_y_org=
-XineramaScreenInfo_width=
-XineramaScreenInfo_height=
-
-org_eclipse_swt_internal_motif_XmAnyCallbackStruct=
-XmAnyCallbackStruct_reason=
-XmAnyCallbackStruct_event=cast=(XEvent *)
-
-org_eclipse_swt_internal_motif_XmDragProcCallbackStruct=
-XmDragProcCallbackStruct_timeStamp=
-XmDragProcCallbackStruct_dragContext=cast=(Widget)
-XmDragProcCallbackStruct_x=
-XmDragProcCallbackStruct_y=
-XmDragProcCallbackStruct_dropSiteStatus=
-XmDragProcCallbackStruct_operation=
-XmDragProcCallbackStruct_operations=
-XmDragProcCallbackStruct_animate=
-
-org_eclipse_swt_internal_motif_XmDropFinishCallbackStruct=
-XmDropFinishCallbackStruct_timeStamp=
-XmDropFinishCallbackStruct_operation=
-XmDropFinishCallbackStruct_operations=
-XmDropFinishCallbackStruct_dropSiteStatus=
-XmDropFinishCallbackStruct_dropAction=
-XmDropFinishCallbackStruct_completionStatus=
-
-org_eclipse_swt_internal_motif_XmDropProcCallbackStruct=
-XmDropProcCallbackStruct_timeStamp=
-XmDropProcCallbackStruct_dragContext=cast=(Widget)
-XmDropProcCallbackStruct_x=
-XmDropProcCallbackStruct_y=
-XmDropProcCallbackStruct_dropSiteStatus=
-XmDropProcCallbackStruct_operation=
-XmDropProcCallbackStruct_operations=
-XmDropProcCallbackStruct_dropAction=
-
-org_eclipse_swt_internal_motif_XmTextBlockRec=
-XmTextBlockRec_ptr=cast=(char *)
-XmTextBlockRec_length=
-XmTextBlockRec_format=cast=(XmTextFormat)
-
-org_eclipse_swt_internal_motif_XmTextVerifyCallbackStruct=
-XmTextVerifyCallbackStruct_doit=
-XmTextVerifyCallbackStruct_currInsert=
-XmTextVerifyCallbackStruct_newInsert=
-XmTextVerifyCallbackStruct_startPos=
-XmTextVerifyCallbackStruct_endPos=
-XmTextVerifyCallbackStruct_text=cast=(XmTextBlock)
-
-org_eclipse_swt_internal_motif_XtWidgetGeometry=
-XtWidgetGeometry_request_mode=
-XtWidgetGeometry_x=
-XtWidgetGeometry_y=
-XtWidgetGeometry_width=
-XtWidgetGeometry_height=
-XtWidgetGeometry_border_width=
-XtWidgetGeometry_sibling=cast=(Widget)
-XtWidgetGeometry_stack_mode=
-
diff --git a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.mozilla.XPCOM.properties b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.mozilla.XPCOM.properties
deleted file mode 100644
index b842123622..0000000000
--- a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.mozilla.XPCOM.properties
+++ /dev/null
@@ -1,1213 +0,0 @@
-###############################################################################
-# Copyright (c) 2004 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Common Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/cpl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-org_eclipse_swt_internal_mozilla_GRE=flags=no_gen
-
-org_eclipse_swt_internal_mozilla_XPCOM=flags=cpp
-XPCOM_Call=
-XPCOM_Call_0=cast=(nsWriteSegmentFun)
-XPCOM_Call_1=cast=(nsIInputStream *)
-XPCOM_Call_2=cast=(void *)
-XPCOM_Call_3=cast=(const char *)
-XPCOM_Call_4=
-XPCOM_Call_5=
-XPCOM_Call_6=cast=(PRUint32 *)
-
-XPCOM_NS_GetComponentManager=
-XPCOM_NS_GetComponentManager_0=cast=(nsIComponentManager**)
-
-XPCOM_NS_GetServiceManager=
-XPCOM_NS_GetServiceManager_0=cast=(nsIServiceManager**)
-
-XPCOM_NS_InitEmbedding=
-XPCOM_NS_InitEmbedding_0=cast=(nsILocalFile *)
-XPCOM_NS_InitEmbedding_1=cast=(nsIDirectoryServiceProvider *)
-
-XPCOM_NS_NewLocalFile=
-XPCOM_NS_NewLocalFile_0=cast=(nsAString *),flags=struct
-XPCOM_NS_NewLocalFile_1=
-XPCOM_NS_NewLocalFile_2=cast=(nsILocalFile**)
-
-XPCOM_NS_TermEmbedding=
-
-XPCOM_PR_Free=
-XPCOM_PR_Free_0=cast=(void *)
-
-XPCOM_PR_GetEnv=
-XPCOM_PR_GetEnv_0=cast=(const char *)
-
-XPCOM_PR_Malloc=
-XPCOM_PR_Malloc_0=
-
-XPCOM_VtblCall__II=
-XPCOM_VtblCall__II_0=
-XPCOM_VtblCall__II_1=
-
-XPCOM_VtblCall__IID=
-XPCOM_VtblCall__IID_0=
-XPCOM_VtblCall__IID_1=
-XPCOM_VtblCall__IID_2=
-
-XPCOM_VtblCall__IIF=
-XPCOM_VtblCall__IIF_0=
-XPCOM_VtblCall__IIF_1=
-XPCOM_VtblCall__IIF_2=
-
-XPCOM_VtblCall__III=
-XPCOM_VtblCall__III_0=
-XPCOM_VtblCall__III_1=
-XPCOM_VtblCall__III_2=
-
-XPCOM_VtblCall__IIII=
-XPCOM_VtblCall__IIII_0=
-XPCOM_VtblCall__IIII_1=
-XPCOM_VtblCall__IIII_2=
-XPCOM_VtblCall__IIII_3=
-
-XPCOM_VtblCall__IIIII=
-XPCOM_VtblCall__IIIII_0=
-XPCOM_VtblCall__IIIII_1=
-XPCOM_VtblCall__IIIII_2=
-XPCOM_VtblCall__IIIII_3=
-XPCOM_VtblCall__IIIII_4=
-
-XPCOM_VtblCall__IIIIII=
-XPCOM_VtblCall__IIIIII_0=
-XPCOM_VtblCall__IIIIII_1=
-XPCOM_VtblCall__IIIIII_2=
-XPCOM_VtblCall__IIIIII_3=
-XPCOM_VtblCall__IIIIII_4=
-XPCOM_VtblCall__IIIIII_5=
-
-XPCOM_VtblCall__IIIIIII=
-XPCOM_VtblCall__IIIIIII_0=
-XPCOM_VtblCall__IIIIIII_1=
-XPCOM_VtblCall__IIIIIII_2=
-XPCOM_VtblCall__IIIIIII_3=
-XPCOM_VtblCall__IIIIIII_4=
-XPCOM_VtblCall__IIIIIII_5=
-XPCOM_VtblCall__IIIIIII_6=
-
-XPCOM_VtblCall__IIIIIIII=
-XPCOM_VtblCall__IIIIIIII_0=
-XPCOM_VtblCall__IIIIIIII_1=
-XPCOM_VtblCall__IIIIIIII_2=
-XPCOM_VtblCall__IIIIIIII_3=
-XPCOM_VtblCall__IIIIIIII_4=
-XPCOM_VtblCall__IIIIIIII_5=
-XPCOM_VtblCall__IIIIIIII_6=
-XPCOM_VtblCall__IIIIIIII_7=
-
-XPCOM_VtblCall__IIIIIIIII=
-XPCOM_VtblCall__IIIIIIIII_0=
-XPCOM_VtblCall__IIIIIIIII_1=
-XPCOM_VtblCall__IIIIIIIII_2=
-XPCOM_VtblCall__IIIIIIIII_3=
-XPCOM_VtblCall__IIIIIIIII_4=
-XPCOM_VtblCall__IIIIIIIII_5=
-XPCOM_VtblCall__IIIIIIIII_6=
-XPCOM_VtblCall__IIIIIIIII_7=
-XPCOM_VtblCall__IIIIIIIII_8=
-
-XPCOM_VtblCall__IIIIIIZ=
-XPCOM_VtblCall__IIIIIIZ_0=
-XPCOM_VtblCall__IIIIIIZ_1=
-XPCOM_VtblCall__IIIIIIZ_2=
-XPCOM_VtblCall__IIIIIIZ_3=
-XPCOM_VtblCall__IIIIIIZ_4=
-XPCOM_VtblCall__IIIIIIZ_5=
-XPCOM_VtblCall__IIIIIIZ_6=
-
-XPCOM_VtblCall__IIIIII_3I=
-XPCOM_VtblCall__IIIIII_3I_0=
-XPCOM_VtblCall__IIIIII_3I_1=
-XPCOM_VtblCall__IIIIII_3I_2=
-XPCOM_VtblCall__IIIIII_3I_3=
-XPCOM_VtblCall__IIIIII_3I_4=
-XPCOM_VtblCall__IIIIII_3I_5=
-XPCOM_VtblCall__IIIIII_3I_6=
-
-XPCOM_VtblCall__IIIIIZ=
-XPCOM_VtblCall__IIIIIZ_0=
-XPCOM_VtblCall__IIIIIZ_1=
-XPCOM_VtblCall__IIIIIZ_2=
-XPCOM_VtblCall__IIIIIZ_3=
-XPCOM_VtblCall__IIIIIZ_4=
-XPCOM_VtblCall__IIIIIZ_5=
-
-XPCOM_VtblCall__IIIIIZ_3I=
-XPCOM_VtblCall__IIIIIZ_3I_0=
-XPCOM_VtblCall__IIIIIZ_3I_1=
-XPCOM_VtblCall__IIIIIZ_3I_2=
-XPCOM_VtblCall__IIIIIZ_3I_3=
-XPCOM_VtblCall__IIIIIZ_3I_4=
-XPCOM_VtblCall__IIIIIZ_3I_5=
-XPCOM_VtblCall__IIIIIZ_3I_6=
-
-XPCOM_VtblCall__IIIIIZ_3Z=
-XPCOM_VtblCall__IIIIIZ_3Z_0=
-XPCOM_VtblCall__IIIIIZ_3Z_1=
-XPCOM_VtblCall__IIIIIZ_3Z_2=
-XPCOM_VtblCall__IIIIIZ_3Z_3=
-XPCOM_VtblCall__IIIIIZ_3Z_4=
-XPCOM_VtblCall__IIIIIZ_3Z_5=
-XPCOM_VtblCall__IIIIIZ_3Z_6=
-
-XPCOM_VtblCall__IIIII_3C=
-XPCOM_VtblCall__IIIII_3C_0=
-XPCOM_VtblCall__IIIII_3C_1=
-XPCOM_VtblCall__IIIII_3C_2=
-XPCOM_VtblCall__IIIII_3C_3=
-XPCOM_VtblCall__IIIII_3C_4=
-XPCOM_VtblCall__IIIII_3C_5=
-
-XPCOM_VtblCall__IIIII_3I=
-XPCOM_VtblCall__IIIII_3I_0=
-XPCOM_VtblCall__IIIII_3I_1=
-XPCOM_VtblCall__IIIII_3I_2=
-XPCOM_VtblCall__IIIII_3I_3=
-XPCOM_VtblCall__IIIII_3I_4=
-XPCOM_VtblCall__IIIII_3I_5=
-
-XPCOM_VtblCall__IIIII_3Z=
-XPCOM_VtblCall__IIIII_3Z_0=
-XPCOM_VtblCall__IIIII_3Z_1=
-XPCOM_VtblCall__IIIII_3Z_2=
-XPCOM_VtblCall__IIIII_3Z_3=
-XPCOM_VtblCall__IIIII_3Z_4=
-XPCOM_VtblCall__IIIII_3Z_5=
-
-XPCOM_VtblCall__IIIIZ=
-XPCOM_VtblCall__IIIIZ_0=
-XPCOM_VtblCall__IIIIZ_1=
-XPCOM_VtblCall__IIIIZ_2=
-XPCOM_VtblCall__IIIIZ_3=
-XPCOM_VtblCall__IIIIZ_4=
-
-XPCOM_VtblCall__IIIIZI=
-XPCOM_VtblCall__IIIIZI_0=
-XPCOM_VtblCall__IIIIZI_1=
-XPCOM_VtblCall__IIIIZI_2=
-XPCOM_VtblCall__IIIIZI_3=
-XPCOM_VtblCall__IIIIZI_4=
-XPCOM_VtblCall__IIIIZI_5=
-
-XPCOM_VtblCall__IIIIZ_3I=
-XPCOM_VtblCall__IIIIZ_3I_0=
-XPCOM_VtblCall__IIIIZ_3I_1=
-XPCOM_VtblCall__IIIIZ_3I_2=
-XPCOM_VtblCall__IIIIZ_3I_3=
-XPCOM_VtblCall__IIIIZ_3I_4=
-XPCOM_VtblCall__IIIIZ_3I_5=
-
-XPCOM_VtblCall__IIII_3B_3I=
-XPCOM_VtblCall__IIII_3B_3I_0=
-XPCOM_VtblCall__IIII_3B_3I_1=
-XPCOM_VtblCall__IIII_3B_3I_2=
-XPCOM_VtblCall__IIII_3B_3I_3=
-XPCOM_VtblCall__IIII_3B_3I_4=
-XPCOM_VtblCall__IIII_3B_3I_5=
-
-XPCOM_VtblCall__IIII_3C=
-XPCOM_VtblCall__IIII_3C_0=
-XPCOM_VtblCall__IIII_3C_1=
-XPCOM_VtblCall__IIII_3C_2=
-XPCOM_VtblCall__IIII_3C_3=
-XPCOM_VtblCall__IIII_3C_4=
-
-XPCOM_VtblCall__IIII_3I=
-XPCOM_VtblCall__IIII_3I_0=
-XPCOM_VtblCall__IIII_3I_1=
-XPCOM_VtblCall__IIII_3I_2=
-XPCOM_VtblCall__IIII_3I_3=
-XPCOM_VtblCall__IIII_3I_4=
-
-XPCOM_VtblCall__IIII_3S=
-XPCOM_VtblCall__IIII_3S_0=
-XPCOM_VtblCall__IIII_3S_1=
-XPCOM_VtblCall__IIII_3S_2=
-XPCOM_VtblCall__IIII_3S_3=
-XPCOM_VtblCall__IIII_3S_4=
-
-XPCOM_VtblCall__IIII_3Z=
-XPCOM_VtblCall__IIII_3Z_0=
-XPCOM_VtblCall__IIII_3Z_1=
-XPCOM_VtblCall__IIII_3Z_2=
-XPCOM_VtblCall__IIII_3Z_3=
-XPCOM_VtblCall__IIII_3Z_4=
-
-XPCOM_VtblCall__IIILorg_eclipse_swt_internal_mozilla_nsID_2=
-XPCOM_VtblCall__IIILorg_eclipse_swt_internal_mozilla_nsID_2_0=
-XPCOM_VtblCall__IIILorg_eclipse_swt_internal_mozilla_nsID_2_1=
-XPCOM_VtblCall__IIILorg_eclipse_swt_internal_mozilla_nsID_2_2=
-XPCOM_VtblCall__IIILorg_eclipse_swt_internal_mozilla_nsID_2_3=
-
-XPCOM_VtblCall__IIILorg_eclipse_swt_internal_mozilla_nsID_2Z=
-XPCOM_VtblCall__IIILorg_eclipse_swt_internal_mozilla_nsID_2Z_0=
-XPCOM_VtblCall__IIILorg_eclipse_swt_internal_mozilla_nsID_2Z_1=
-XPCOM_VtblCall__IIILorg_eclipse_swt_internal_mozilla_nsID_2Z_2=
-XPCOM_VtblCall__IIILorg_eclipse_swt_internal_mozilla_nsID_2Z_3=
-XPCOM_VtblCall__IIILorg_eclipse_swt_internal_mozilla_nsID_2Z_4=
-
-XPCOM_VtblCall__IIILorg_eclipse_swt_internal_mozilla_nsID_2_3I=
-XPCOM_VtblCall__IIILorg_eclipse_swt_internal_mozilla_nsID_2_3I_0=
-XPCOM_VtblCall__IIILorg_eclipse_swt_internal_mozilla_nsID_2_3I_1=
-XPCOM_VtblCall__IIILorg_eclipse_swt_internal_mozilla_nsID_2_3I_2=
-XPCOM_VtblCall__IIILorg_eclipse_swt_internal_mozilla_nsID_2_3I_3=
-XPCOM_VtblCall__IIILorg_eclipse_swt_internal_mozilla_nsID_2_3I_4=
-
-XPCOM_VtblCall__IIISSS_3Z=
-XPCOM_VtblCall__IIISSS_3Z_0=
-XPCOM_VtblCall__IIISSS_3Z_1=
-XPCOM_VtblCall__IIISSS_3Z_2=
-XPCOM_VtblCall__IIISSS_3Z_3=
-XPCOM_VtblCall__IIISSS_3Z_4=
-XPCOM_VtblCall__IIISSS_3Z_5=
-XPCOM_VtblCall__IIISSS_3Z_6=
-
-XPCOM_VtblCall__IIIZ=
-XPCOM_VtblCall__IIIZ_0=
-XPCOM_VtblCall__IIIZ_1=
-XPCOM_VtblCall__IIIZ_2=
-XPCOM_VtblCall__IIIZ_3=
-
-XPCOM_VtblCall__IIIZI_3Z=
-XPCOM_VtblCall__IIIZI_3Z_0=
-XPCOM_VtblCall__IIIZI_3Z_1=
-XPCOM_VtblCall__IIIZI_3Z_2=
-XPCOM_VtblCall__IIIZI_3Z_3=
-XPCOM_VtblCall__IIIZI_3Z_4=
-XPCOM_VtblCall__IIIZI_3Z_5=
-
-XPCOM_VtblCall__IIIZZ=
-XPCOM_VtblCall__IIIZZ_0=
-XPCOM_VtblCall__IIIZZ_1=
-XPCOM_VtblCall__IIIZZ_2=
-XPCOM_VtblCall__IIIZZ_3=
-XPCOM_VtblCall__IIIZZ_4=
-
-XPCOM_VtblCall__IIIZZII=
-XPCOM_VtblCall__IIIZZII_0=
-XPCOM_VtblCall__IIIZZII_1=
-XPCOM_VtblCall__IIIZZII_2=
-XPCOM_VtblCall__IIIZZII_3=
-XPCOM_VtblCall__IIIZZII_4=
-XPCOM_VtblCall__IIIZZII_5=
-XPCOM_VtblCall__IIIZZII_6=
-
-XPCOM_VtblCall__IIIZZIIIIIIZZZZSI=
-XPCOM_VtblCall__IIIZZIIIIIIZZZZSI_0=
-XPCOM_VtblCall__IIIZZIIIIIIZZZZSI_1=
-XPCOM_VtblCall__IIIZZIIIIIIZZZZSI_2=
-XPCOM_VtblCall__IIIZZIIIIIIZZZZSI_3=
-XPCOM_VtblCall__IIIZZIIIIIIZZZZSI_4=
-XPCOM_VtblCall__IIIZZIIIIIIZZZZSI_5=
-XPCOM_VtblCall__IIIZZIIIIIIZZZZSI_6=
-XPCOM_VtblCall__IIIZZIIIIIIZZZZSI_7=
-XPCOM_VtblCall__IIIZZIIIIIIZZZZSI_8=
-XPCOM_VtblCall__IIIZZIIIIIIZZZZSI_9=
-XPCOM_VtblCall__IIIZZIIIIIIZZZZSI_10=
-XPCOM_VtblCall__IIIZZIIIIIIZZZZSI_11=
-XPCOM_VtblCall__IIIZZIIIIIIZZZZSI_12=
-XPCOM_VtblCall__IIIZZIIIIIIZZZZSI_13=
-XPCOM_VtblCall__IIIZZIIIIIIZZZZSI_14=
-XPCOM_VtblCall__IIIZZIIIIIIZZZZSI_15=
-XPCOM_VtblCall__IIIZZIIIIIIZZZZSI_16=
-
-XPCOM_VtblCall__IIIZZIIIIS=
-XPCOM_VtblCall__IIIZZIIIIS_0=
-XPCOM_VtblCall__IIIZZIIIIS_1=
-XPCOM_VtblCall__IIIZZIIIIS_2=
-XPCOM_VtblCall__IIIZZIIIIS_3=
-XPCOM_VtblCall__IIIZZIIIIS_4=
-XPCOM_VtblCall__IIIZZIIIIS_5=
-XPCOM_VtblCall__IIIZZIIIIS_6=
-XPCOM_VtblCall__IIIZZIIIIS_7=
-XPCOM_VtblCall__IIIZZIIIIS_8=
-XPCOM_VtblCall__IIIZZIIIIS_9=
-
-XPCOM_VtblCall__IIIZZIZZZZII=
-XPCOM_VtblCall__IIIZZIZZZZII_0=
-XPCOM_VtblCall__IIIZZIZZZZII_1=
-XPCOM_VtblCall__IIIZZIZZZZII_2=
-XPCOM_VtblCall__IIIZZIZZZZII_3=
-XPCOM_VtblCall__IIIZZIZZZZII_4=
-XPCOM_VtblCall__IIIZZIZZZZII_5=
-XPCOM_VtblCall__IIIZZIZZZZII_6=
-XPCOM_VtblCall__IIIZZIZZZZII_7=
-XPCOM_VtblCall__IIIZZIZZZZII_8=
-XPCOM_VtblCall__IIIZZIZZZZII_9=
-XPCOM_VtblCall__IIIZZIZZZZII_10=
-XPCOM_VtblCall__IIIZZIZZZZII_11=
-
-XPCOM_VtblCall__IIIZZZZZZ_3Z=
-XPCOM_VtblCall__IIIZZZZZZ_3Z_0=
-XPCOM_VtblCall__IIIZZZZZZ_3Z_1=
-XPCOM_VtblCall__IIIZZZZZZ_3Z_2=
-XPCOM_VtblCall__IIIZZZZZZ_3Z_3=
-XPCOM_VtblCall__IIIZZZZZZ_3Z_4=
-XPCOM_VtblCall__IIIZZZZZZ_3Z_5=
-XPCOM_VtblCall__IIIZZZZZZ_3Z_6=
-XPCOM_VtblCall__IIIZZZZZZ_3Z_7=
-XPCOM_VtblCall__IIIZZZZZZ_3Z_8=
-XPCOM_VtblCall__IIIZZZZZZ_3Z_9=
-
-XPCOM_VtblCall__IIIZ_3C=
-XPCOM_VtblCall__IIIZ_3C_0=
-XPCOM_VtblCall__IIIZ_3C_1=
-XPCOM_VtblCall__IIIZ_3C_2=
-XPCOM_VtblCall__IIIZ_3C_3=
-XPCOM_VtblCall__IIIZ_3C_4=
-
-XPCOM_VtblCall__IIIZ_3I=
-XPCOM_VtblCall__IIIZ_3I_0=
-XPCOM_VtblCall__IIIZ_3I_1=
-XPCOM_VtblCall__IIIZ_3I_2=
-XPCOM_VtblCall__IIIZ_3I_3=
-XPCOM_VtblCall__IIIZ_3I_4=
-
-XPCOM_VtblCall__IIIZ_3Z=
-XPCOM_VtblCall__IIIZ_3Z_0=
-XPCOM_VtblCall__IIIZ_3Z_1=
-XPCOM_VtblCall__IIIZ_3Z_2=
-XPCOM_VtblCall__IIIZ_3Z_3=
-XPCOM_VtblCall__IIIZ_3Z_4=
-
-XPCOM_VtblCall__III_3B=
-XPCOM_VtblCall__III_3B_0=
-XPCOM_VtblCall__III_3B_1=
-XPCOM_VtblCall__III_3B_2=
-XPCOM_VtblCall__III_3B_3=
-
-XPCOM_VtblCall__III_3BI=
-XPCOM_VtblCall__III_3BI_0=
-XPCOM_VtblCall__III_3BI_1=
-XPCOM_VtblCall__III_3BI_2=
-XPCOM_VtblCall__III_3BI_3=
-XPCOM_VtblCall__III_3BI_4=
-
-XPCOM_VtblCall__III_3BI_3I=
-XPCOM_VtblCall__III_3BI_3I_0=
-XPCOM_VtblCall__III_3BI_3I_1=
-XPCOM_VtblCall__III_3BI_3I_2=
-XPCOM_VtblCall__III_3BI_3I_3=
-XPCOM_VtblCall__III_3BI_3I_4=
-XPCOM_VtblCall__III_3BI_3I_5=
-
-XPCOM_VtblCall__III_3BZ=
-XPCOM_VtblCall__III_3BZ_0=
-XPCOM_VtblCall__III_3BZ_1=
-XPCOM_VtblCall__III_3BZ_2=
-XPCOM_VtblCall__III_3BZ_3=
-XPCOM_VtblCall__III_3BZ_4=
-
-XPCOM_VtblCall__III_3B_3C=
-XPCOM_VtblCall__III_3B_3C_0=
-XPCOM_VtblCall__III_3B_3C_1=
-XPCOM_VtblCall__III_3B_3C_2=
-XPCOM_VtblCall__III_3B_3C_3=
-XPCOM_VtblCall__III_3B_3C_4=
-
-XPCOM_VtblCall__III_3C=
-XPCOM_VtblCall__III_3C_0=
-XPCOM_VtblCall__III_3C_1=
-XPCOM_VtblCall__III_3C_2=
-XPCOM_VtblCall__III_3C_3=
-
-XPCOM_VtblCall__III_3CI_3C_3I=
-XPCOM_VtblCall__III_3CI_3C_3I_0=
-XPCOM_VtblCall__III_3CI_3C_3I_1=
-XPCOM_VtblCall__III_3CI_3C_3I_2=
-XPCOM_VtblCall__III_3CI_3C_3I_3=
-XPCOM_VtblCall__III_3CI_3C_3I_4=
-XPCOM_VtblCall__III_3CI_3C_3I_5=
-XPCOM_VtblCall__III_3CI_3C_3I_6=
-
-XPCOM_VtblCall__III_3CZ=
-XPCOM_VtblCall__III_3CZ_0=
-XPCOM_VtblCall__III_3CZ_1=
-XPCOM_VtblCall__III_3CZ_2=
-XPCOM_VtblCall__III_3CZ_3=
-XPCOM_VtblCall__III_3CZ_4=
-
-XPCOM_VtblCall__III_3C_3C=
-XPCOM_VtblCall__III_3C_3C_0=
-XPCOM_VtblCall__III_3C_3C_1=
-XPCOM_VtblCall__III_3C_3C_2=
-XPCOM_VtblCall__III_3C_3C_3=
-XPCOM_VtblCall__III_3C_3C_4=
-
-XPCOM_VtblCall__III_3C_3C_3I=
-XPCOM_VtblCall__III_3C_3C_3I_0=
-XPCOM_VtblCall__III_3C_3C_3I_1=
-XPCOM_VtblCall__III_3C_3C_3I_2=
-XPCOM_VtblCall__III_3C_3C_3I_3=
-XPCOM_VtblCall__III_3C_3C_3I_4=
-XPCOM_VtblCall__III_3C_3C_3I_5=
-
-XPCOM_VtblCall__III_3C_3I=
-XPCOM_VtblCall__III_3C_3I_0=
-XPCOM_VtblCall__III_3C_3I_1=
-XPCOM_VtblCall__III_3C_3I_2=
-XPCOM_VtblCall__III_3C_3I_3=
-XPCOM_VtblCall__III_3C_3I_4=
-
-XPCOM_VtblCall__III_3C_3Z=
-XPCOM_VtblCall__III_3C_3Z_0=
-XPCOM_VtblCall__III_3C_3Z_1=
-XPCOM_VtblCall__III_3C_3Z_2=
-XPCOM_VtblCall__III_3C_3Z_3=
-XPCOM_VtblCall__III_3C_3Z_4=
-
-XPCOM_VtblCall__III_3I=
-XPCOM_VtblCall__III_3I_0=
-XPCOM_VtblCall__III_3I_1=
-XPCOM_VtblCall__III_3I_2=
-XPCOM_VtblCall__III_3I_3=
-
-XPCOM_VtblCall__III_3I_3I_3I_3I=
-XPCOM_VtblCall__III_3I_3I_3I_3I_0=
-XPCOM_VtblCall__III_3I_3I_3I_3I_1=
-XPCOM_VtblCall__III_3I_3I_3I_3I_2=
-XPCOM_VtblCall__III_3I_3I_3I_3I_3=
-XPCOM_VtblCall__III_3I_3I_3I_3I_4=
-XPCOM_VtblCall__III_3I_3I_3I_3I_5=
-XPCOM_VtblCall__III_3I_3I_3I_3I_6=
-
-XPCOM_VtblCall__III_3S=
-XPCOM_VtblCall__III_3S_0=
-XPCOM_VtblCall__III_3S_1=
-XPCOM_VtblCall__III_3S_2=
-XPCOM_VtblCall__III_3S_3=
-
-XPCOM_VtblCall__III_3Z=
-XPCOM_VtblCall__III_3Z_0=
-XPCOM_VtblCall__III_3Z_1=
-XPCOM_VtblCall__III_3Z_2=
-XPCOM_VtblCall__III_3Z_3=
-
-XPCOM_VtblCall__IIJ=
-XPCOM_VtblCall__IIJ_0=
-XPCOM_VtblCall__IIJ_1=
-XPCOM_VtblCall__IIJ_2=
-
-XPCOM_VtblCall__IILorg_eclipse_swt_internal_mozilla_nsID_2=
-XPCOM_VtblCall__IILorg_eclipse_swt_internal_mozilla_nsID_2_0=
-XPCOM_VtblCall__IILorg_eclipse_swt_internal_mozilla_nsID_2_1=
-XPCOM_VtblCall__IILorg_eclipse_swt_internal_mozilla_nsID_2_2=
-
-XPCOM_VtblCall__IILorg_eclipse_swt_internal_mozilla_nsID_2ILorg_eclipse_swt_internal_mozilla_nsID_2_3I=
-XPCOM_VtblCall__IILorg_eclipse_swt_internal_mozilla_nsID_2ILorg_eclipse_swt_internal_mozilla_nsID_2_3I_0=
-XPCOM_VtblCall__IILorg_eclipse_swt_internal_mozilla_nsID_2ILorg_eclipse_swt_internal_mozilla_nsID_2_3I_1=
-XPCOM_VtblCall__IILorg_eclipse_swt_internal_mozilla_nsID_2ILorg_eclipse_swt_internal_mozilla_nsID_2_3I_2=
-XPCOM_VtblCall__IILorg_eclipse_swt_internal_mozilla_nsID_2ILorg_eclipse_swt_internal_mozilla_nsID_2_3I_3=
-XPCOM_VtblCall__IILorg_eclipse_swt_internal_mozilla_nsID_2ILorg_eclipse_swt_internal_mozilla_nsID_2_3I_4=
-XPCOM_VtblCall__IILorg_eclipse_swt_internal_mozilla_nsID_2ILorg_eclipse_swt_internal_mozilla_nsID_2_3I_5=
-
-XPCOM_VtblCall__IILorg_eclipse_swt_internal_mozilla_nsID_2Lorg_eclipse_swt_internal_mozilla_nsID_2_3I=
-XPCOM_VtblCall__IILorg_eclipse_swt_internal_mozilla_nsID_2Lorg_eclipse_swt_internal_mozilla_nsID_2_3I_0=
-XPCOM_VtblCall__IILorg_eclipse_swt_internal_mozilla_nsID_2Lorg_eclipse_swt_internal_mozilla_nsID_2_3I_1=
-XPCOM_VtblCall__IILorg_eclipse_swt_internal_mozilla_nsID_2Lorg_eclipse_swt_internal_mozilla_nsID_2_3I_2=
-XPCOM_VtblCall__IILorg_eclipse_swt_internal_mozilla_nsID_2Lorg_eclipse_swt_internal_mozilla_nsID_2_3I_3=
-XPCOM_VtblCall__IILorg_eclipse_swt_internal_mozilla_nsID_2Lorg_eclipse_swt_internal_mozilla_nsID_2_3I_4=
-
-XPCOM_VtblCall__IILorg_eclipse_swt_internal_mozilla_nsID_2Lorg_eclipse_swt_internal_mozilla_nsID_2_3Z=
-XPCOM_VtblCall__IILorg_eclipse_swt_internal_mozilla_nsID_2Lorg_eclipse_swt_internal_mozilla_nsID_2_3Z_0=
-XPCOM_VtblCall__IILorg_eclipse_swt_internal_mozilla_nsID_2Lorg_eclipse_swt_internal_mozilla_nsID_2_3Z_1=
-XPCOM_VtblCall__IILorg_eclipse_swt_internal_mozilla_nsID_2Lorg_eclipse_swt_internal_mozilla_nsID_2_3Z_2=
-XPCOM_VtblCall__IILorg_eclipse_swt_internal_mozilla_nsID_2Lorg_eclipse_swt_internal_mozilla_nsID_2_3Z_3=
-XPCOM_VtblCall__IILorg_eclipse_swt_internal_mozilla_nsID_2Lorg_eclipse_swt_internal_mozilla_nsID_2_3Z_4=
-
-XPCOM_VtblCall__IILorg_eclipse_swt_internal_mozilla_nsID_2_3B_3BI=
-XPCOM_VtblCall__IILorg_eclipse_swt_internal_mozilla_nsID_2_3B_3BI_0=
-XPCOM_VtblCall__IILorg_eclipse_swt_internal_mozilla_nsID_2_3B_3BI_1=
-XPCOM_VtblCall__IILorg_eclipse_swt_internal_mozilla_nsID_2_3B_3BI_2=
-XPCOM_VtblCall__IILorg_eclipse_swt_internal_mozilla_nsID_2_3B_3BI_3=
-XPCOM_VtblCall__IILorg_eclipse_swt_internal_mozilla_nsID_2_3B_3BI_4=
-XPCOM_VtblCall__IILorg_eclipse_swt_internal_mozilla_nsID_2_3B_3BI_5=
-
-XPCOM_VtblCall__IILorg_eclipse_swt_internal_mozilla_nsID_2_3I=
-XPCOM_VtblCall__IILorg_eclipse_swt_internal_mozilla_nsID_2_3I_0=
-XPCOM_VtblCall__IILorg_eclipse_swt_internal_mozilla_nsID_2_3I_1=
-XPCOM_VtblCall__IILorg_eclipse_swt_internal_mozilla_nsID_2_3I_2=
-XPCOM_VtblCall__IILorg_eclipse_swt_internal_mozilla_nsID_2_3I_3=
-
-XPCOM_VtblCall__IISF=
-XPCOM_VtblCall__IISF_0=
-XPCOM_VtblCall__IISF_1=
-XPCOM_VtblCall__IISF_2=
-XPCOM_VtblCall__IISF_3=
-
-XPCOM_VtblCall__IISI=
-XPCOM_VtblCall__IISI_0=
-XPCOM_VtblCall__IISI_1=
-XPCOM_VtblCall__IISI_2=
-XPCOM_VtblCall__IISI_3=
-
-XPCOM_VtblCall__IIS_3F=
-XPCOM_VtblCall__IIS_3F_0=
-XPCOM_VtblCall__IIS_3F_1=
-XPCOM_VtblCall__IIS_3F_2=
-XPCOM_VtblCall__IIS_3F_3=
-
-XPCOM_VtblCall__IIZ=
-XPCOM_VtblCall__IIZ_0=
-XPCOM_VtblCall__IIZ_1=
-XPCOM_VtblCall__IIZ_2=
-
-XPCOM_VtblCall__IIZI_3Z=
-XPCOM_VtblCall__IIZI_3Z_0=
-XPCOM_VtblCall__IIZI_3Z_1=
-XPCOM_VtblCall__IIZI_3Z_2=
-XPCOM_VtblCall__IIZI_3Z_3=
-XPCOM_VtblCall__IIZI_3Z_4=
-
-XPCOM_VtblCall__IIZSSS_3Z=
-XPCOM_VtblCall__IIZSSS_3Z_0=
-XPCOM_VtblCall__IIZSSS_3Z_1=
-XPCOM_VtblCall__IIZSSS_3Z_2=
-XPCOM_VtblCall__IIZSSS_3Z_3=
-XPCOM_VtblCall__IIZSSS_3Z_4=
-XPCOM_VtblCall__IIZSSS_3Z_5=
-XPCOM_VtblCall__IIZSSS_3Z_6=
-
-XPCOM_VtblCall__IIZZ=
-XPCOM_VtblCall__IIZZ_0=
-XPCOM_VtblCall__IIZZ_1=
-XPCOM_VtblCall__IIZZ_2=
-XPCOM_VtblCall__IIZZ_3=
-
-XPCOM_VtblCall__IIZZZ=
-XPCOM_VtblCall__IIZZZ_0=
-XPCOM_VtblCall__IIZZZ_1=
-XPCOM_VtblCall__IIZZZ_2=
-XPCOM_VtblCall__IIZZZ_3=
-XPCOM_VtblCall__IIZZZ_4=
-
-XPCOM_VtblCall__IIZ_3I=
-XPCOM_VtblCall__IIZ_3I_0=
-XPCOM_VtblCall__IIZ_3I_1=
-XPCOM_VtblCall__IIZ_3I_2=
-XPCOM_VtblCall__IIZ_3I_3=
-
-XPCOM_VtblCall__IIZ_3I_3I=
-XPCOM_VtblCall__IIZ_3I_3I_0=
-XPCOM_VtblCall__IIZ_3I_3I_1=
-XPCOM_VtblCall__IIZ_3I_3I_2=
-XPCOM_VtblCall__IIZ_3I_3I_3=
-XPCOM_VtblCall__IIZ_3I_3I_4=
-
-XPCOM_VtblCall__II_3B=
-XPCOM_VtblCall__II_3B_0=
-XPCOM_VtblCall__II_3B_1=
-XPCOM_VtblCall__II_3B_2=
-
-XPCOM_VtblCall__II_3BI=
-XPCOM_VtblCall__II_3BI_0=
-XPCOM_VtblCall__II_3BI_1=
-XPCOM_VtblCall__II_3BI_2=
-XPCOM_VtblCall__II_3BI_3=
-
-XPCOM_VtblCall__II_3BII=
-XPCOM_VtblCall__II_3BII_0=
-XPCOM_VtblCall__II_3BII_1=
-XPCOM_VtblCall__II_3BII_2=
-XPCOM_VtblCall__II_3BII_3=
-XPCOM_VtblCall__II_3BII_4=
-
-XPCOM_VtblCall__II_3BII_3BII_3I_3I=
-XPCOM_VtblCall__II_3BII_3BII_3I_3I_0=
-XPCOM_VtblCall__II_3BII_3BII_3I_3I_1=
-XPCOM_VtblCall__II_3BII_3BII_3I_3I_2=
-XPCOM_VtblCall__II_3BII_3BII_3I_3I_3=
-XPCOM_VtblCall__II_3BII_3BII_3I_3I_4=
-XPCOM_VtblCall__II_3BII_3BII_3I_3I_5=
-XPCOM_VtblCall__II_3BII_3BII_3I_3I_6=
-XPCOM_VtblCall__II_3BII_3BII_3I_3I_7=
-XPCOM_VtblCall__II_3BII_3BII_3I_3I_8=
-XPCOM_VtblCall__II_3BII_3BII_3I_3I_9=
-
-XPCOM_VtblCall__II_3BILorg_eclipse_swt_internal_mozilla_nsID_2_3I=
-XPCOM_VtblCall__II_3BILorg_eclipse_swt_internal_mozilla_nsID_2_3I_0=
-XPCOM_VtblCall__II_3BILorg_eclipse_swt_internal_mozilla_nsID_2_3I_1=
-XPCOM_VtblCall__II_3BILorg_eclipse_swt_internal_mozilla_nsID_2_3I_2=
-XPCOM_VtblCall__II_3BILorg_eclipse_swt_internal_mozilla_nsID_2_3I_3=
-XPCOM_VtblCall__II_3BILorg_eclipse_swt_internal_mozilla_nsID_2_3I_4=
-XPCOM_VtblCall__II_3BILorg_eclipse_swt_internal_mozilla_nsID_2_3I_5=
-
-XPCOM_VtblCall__II_3BIZ=
-XPCOM_VtblCall__II_3BIZ_0=
-XPCOM_VtblCall__II_3BIZ_1=
-XPCOM_VtblCall__II_3BIZ_2=
-XPCOM_VtblCall__II_3BIZ_3=
-XPCOM_VtblCall__II_3BIZ_4=
-
-XPCOM_VtblCall__II_3BLorg_eclipse_swt_internal_mozilla_nsID_2I=
-XPCOM_VtblCall__II_3BLorg_eclipse_swt_internal_mozilla_nsID_2I_0=
-XPCOM_VtblCall__II_3BLorg_eclipse_swt_internal_mozilla_nsID_2I_1=
-XPCOM_VtblCall__II_3BLorg_eclipse_swt_internal_mozilla_nsID_2I_2=
-XPCOM_VtblCall__II_3BLorg_eclipse_swt_internal_mozilla_nsID_2I_3=
-XPCOM_VtblCall__II_3BLorg_eclipse_swt_internal_mozilla_nsID_2I_4=
-
-XPCOM_VtblCall__II_3BLorg_eclipse_swt_internal_mozilla_nsID_2_3I=
-XPCOM_VtblCall__II_3BLorg_eclipse_swt_internal_mozilla_nsID_2_3I_0=
-XPCOM_VtblCall__II_3BLorg_eclipse_swt_internal_mozilla_nsID_2_3I_1=
-XPCOM_VtblCall__II_3BLorg_eclipse_swt_internal_mozilla_nsID_2_3I_2=
-XPCOM_VtblCall__II_3BLorg_eclipse_swt_internal_mozilla_nsID_2_3I_3=
-XPCOM_VtblCall__II_3BLorg_eclipse_swt_internal_mozilla_nsID_2_3I_4=
-
-XPCOM_VtblCall__II_3BLorg_eclipse_swt_internal_mozilla_nsID_2_3Z=
-XPCOM_VtblCall__II_3BLorg_eclipse_swt_internal_mozilla_nsID_2_3Z_0=
-XPCOM_VtblCall__II_3BLorg_eclipse_swt_internal_mozilla_nsID_2_3Z_1=
-XPCOM_VtblCall__II_3BLorg_eclipse_swt_internal_mozilla_nsID_2_3Z_2=
-XPCOM_VtblCall__II_3BLorg_eclipse_swt_internal_mozilla_nsID_2_3Z_3=
-XPCOM_VtblCall__II_3BLorg_eclipse_swt_internal_mozilla_nsID_2_3Z_4=
-
-XPCOM_VtblCall__II_3BZ=
-XPCOM_VtblCall__II_3BZ_0=
-XPCOM_VtblCall__II_3BZ_1=
-XPCOM_VtblCall__II_3BZ_2=
-XPCOM_VtblCall__II_3BZ_3=
-
-XPCOM_VtblCall__II_3B_3B=
-XPCOM_VtblCall__II_3B_3B_0=
-XPCOM_VtblCall__II_3B_3B_1=
-XPCOM_VtblCall__II_3B_3B_2=
-XPCOM_VtblCall__II_3B_3B_3=
-
-XPCOM_VtblCall__II_3B_3B_3I=
-XPCOM_VtblCall__II_3B_3B_3I_0=
-XPCOM_VtblCall__II_3B_3B_3I_1=
-XPCOM_VtblCall__II_3B_3B_3I_2=
-XPCOM_VtblCall__II_3B_3B_3I_3=
-XPCOM_VtblCall__II_3B_3B_3I_4=
-
-XPCOM_VtblCall__II_3B_3C=
-XPCOM_VtblCall__II_3B_3C_0=
-XPCOM_VtblCall__II_3B_3C_1=
-XPCOM_VtblCall__II_3B_3C_2=
-XPCOM_VtblCall__II_3B_3C_3=
-
-XPCOM_VtblCall__II_3B_3I=
-XPCOM_VtblCall__II_3B_3I_0=
-XPCOM_VtblCall__II_3B_3I_1=
-XPCOM_VtblCall__II_3B_3I_2=
-XPCOM_VtblCall__II_3B_3I_3=
-
-XPCOM_VtblCall__II_3B_3Z=
-XPCOM_VtblCall__II_3B_3Z_0=
-XPCOM_VtblCall__II_3B_3Z_1=
-XPCOM_VtblCall__II_3B_3Z_2=
-XPCOM_VtblCall__II_3B_3Z_3=
-
-XPCOM_VtblCall__II_3C=
-XPCOM_VtblCall__II_3C_0=
-XPCOM_VtblCall__II_3C_1=
-XPCOM_VtblCall__II_3C_2=
-
-XPCOM_VtblCall__II_3CI=
-XPCOM_VtblCall__II_3CI_0=
-XPCOM_VtblCall__II_3CI_1=
-XPCOM_VtblCall__II_3CI_2=
-XPCOM_VtblCall__II_3CI_3=
-
-XPCOM_VtblCall__II_3CII=
-XPCOM_VtblCall__II_3CII_0=
-XPCOM_VtblCall__II_3CII_1=
-XPCOM_VtblCall__II_3CII_2=
-XPCOM_VtblCall__II_3CII_3=
-XPCOM_VtblCall__II_3CII_4=
-
-XPCOM_VtblCall__II_3CIIII=
-XPCOM_VtblCall__II_3CIIII_0=
-XPCOM_VtblCall__II_3CIIII_1=
-XPCOM_VtblCall__II_3CIIII_2=
-XPCOM_VtblCall__II_3CIIII_3=
-XPCOM_VtblCall__II_3CIIII_4=
-XPCOM_VtblCall__II_3CIIII_5=
-XPCOM_VtblCall__II_3CIIII_6=
-
-XPCOM_VtblCall__II_3CIZ=
-XPCOM_VtblCall__II_3CIZ_0=
-XPCOM_VtblCall__II_3CIZ_1=
-XPCOM_VtblCall__II_3CIZ_2=
-XPCOM_VtblCall__II_3CIZ_3=
-XPCOM_VtblCall__II_3CIZ_4=
-
-XPCOM_VtblCall__II_3CI_3C=
-XPCOM_VtblCall__II_3CI_3C_0=
-XPCOM_VtblCall__II_3CI_3C_1=
-XPCOM_VtblCall__II_3CI_3C_2=
-XPCOM_VtblCall__II_3CI_3C_3=
-XPCOM_VtblCall__II_3CI_3C_4=
-
-XPCOM_VtblCall__II_3CI_3I=
-XPCOM_VtblCall__II_3CI_3I_0=
-XPCOM_VtblCall__II_3CI_3I_1=
-XPCOM_VtblCall__II_3CI_3I_2=
-XPCOM_VtblCall__II_3CI_3I_3=
-XPCOM_VtblCall__II_3CI_3I_4=
-
-XPCOM_VtblCall__II_3CLorg_eclipse_swt_internal_mozilla_nsID_2I=
-XPCOM_VtblCall__II_3CLorg_eclipse_swt_internal_mozilla_nsID_2I_0=
-XPCOM_VtblCall__II_3CLorg_eclipse_swt_internal_mozilla_nsID_2I_1=
-XPCOM_VtblCall__II_3CLorg_eclipse_swt_internal_mozilla_nsID_2I_2=
-XPCOM_VtblCall__II_3CLorg_eclipse_swt_internal_mozilla_nsID_2I_3=
-XPCOM_VtblCall__II_3CLorg_eclipse_swt_internal_mozilla_nsID_2I_4=
-
-XPCOM_VtblCall__II_3CLorg_eclipse_swt_internal_mozilla_nsID_2_3I=
-XPCOM_VtblCall__II_3CLorg_eclipse_swt_internal_mozilla_nsID_2_3I_0=
-XPCOM_VtblCall__II_3CLorg_eclipse_swt_internal_mozilla_nsID_2_3I_1=
-XPCOM_VtblCall__II_3CLorg_eclipse_swt_internal_mozilla_nsID_2_3I_2=
-XPCOM_VtblCall__II_3CLorg_eclipse_swt_internal_mozilla_nsID_2_3I_3=
-XPCOM_VtblCall__II_3CLorg_eclipse_swt_internal_mozilla_nsID_2_3I_4=
-
-XPCOM_VtblCall__II_3CZ=
-XPCOM_VtblCall__II_3CZ_0=
-XPCOM_VtblCall__II_3CZ_1=
-XPCOM_VtblCall__II_3CZ_2=
-XPCOM_VtblCall__II_3CZ_3=
-
-XPCOM_VtblCall__II_3C_3C=
-XPCOM_VtblCall__II_3C_3C_0=
-XPCOM_VtblCall__II_3C_3C_1=
-XPCOM_VtblCall__II_3C_3C_2=
-XPCOM_VtblCall__II_3C_3C_3=
-
-XPCOM_VtblCall__II_3C_3CI_3C_3C_3C_3C_3Z_3I=
-XPCOM_VtblCall__II_3C_3CI_3C_3C_3C_3C_3Z_3I_0=
-XPCOM_VtblCall__II_3C_3CI_3C_3C_3C_3C_3Z_3I_1=
-XPCOM_VtblCall__II_3C_3CI_3C_3C_3C_3C_3Z_3I_2=
-XPCOM_VtblCall__II_3C_3CI_3C_3C_3C_3C_3Z_3I_3=
-XPCOM_VtblCall__II_3C_3CI_3C_3C_3C_3C_3Z_3I_4=
-XPCOM_VtblCall__II_3C_3CI_3C_3C_3C_3C_3Z_3I_5=
-XPCOM_VtblCall__II_3C_3CI_3C_3C_3C_3C_3Z_3I_6=
-XPCOM_VtblCall__II_3C_3CI_3C_3C_3C_3C_3Z_3I_7=
-XPCOM_VtblCall__II_3C_3CI_3C_3C_3C_3C_3Z_3I_8=
-XPCOM_VtblCall__II_3C_3CI_3C_3C_3C_3C_3Z_3I_9=
-XPCOM_VtblCall__II_3C_3CI_3C_3C_3C_3C_3Z_3I_10=
-
-XPCOM_VtblCall__II_3C_3CI_3C_3I_3Z=
-XPCOM_VtblCall__II_3C_3CI_3C_3I_3Z_0=
-XPCOM_VtblCall__II_3C_3CI_3C_3I_3Z_1=
-XPCOM_VtblCall__II_3C_3CI_3C_3I_3Z_2=
-XPCOM_VtblCall__II_3C_3CI_3C_3I_3Z_3=
-XPCOM_VtblCall__II_3C_3CI_3C_3I_3Z_4=
-XPCOM_VtblCall__II_3C_3CI_3C_3I_3Z_5=
-XPCOM_VtblCall__II_3C_3CI_3C_3I_3Z_6=
-XPCOM_VtblCall__II_3C_3CI_3C_3I_3Z_7=
-
-XPCOM_VtblCall__II_3C_3C_3C=
-XPCOM_VtblCall__II_3C_3C_3C_0=
-XPCOM_VtblCall__II_3C_3C_3C_1=
-XPCOM_VtblCall__II_3C_3C_3C_2=
-XPCOM_VtblCall__II_3C_3C_3C_3=
-XPCOM_VtblCall__II_3C_3C_3C_4=
-
-XPCOM_VtblCall__II_3C_3C_3CI_3I=
-XPCOM_VtblCall__II_3C_3C_3CI_3I_0=
-XPCOM_VtblCall__II_3C_3C_3CI_3I_1=
-XPCOM_VtblCall__II_3C_3C_3CI_3I_2=
-XPCOM_VtblCall__II_3C_3C_3CI_3I_3=
-XPCOM_VtblCall__II_3C_3C_3CI_3I_4=
-XPCOM_VtblCall__II_3C_3C_3CI_3I_5=
-XPCOM_VtblCall__II_3C_3C_3CI_3I_6=
-
-XPCOM_VtblCall__II_3C_3C_3CZ=
-XPCOM_VtblCall__II_3C_3C_3CZ_0=
-XPCOM_VtblCall__II_3C_3C_3CZ_1=
-XPCOM_VtblCall__II_3C_3C_3CZ_2=
-XPCOM_VtblCall__II_3C_3C_3CZ_3=
-XPCOM_VtblCall__II_3C_3C_3CZ_4=
-XPCOM_VtblCall__II_3C_3C_3CZ_5=
-
-XPCOM_VtblCall__II_3C_3C_3C_3C=
-XPCOM_VtblCall__II_3C_3C_3C_3C_0=
-XPCOM_VtblCall__II_3C_3C_3C_3C_1=
-XPCOM_VtblCall__II_3C_3C_3C_3C_2=
-XPCOM_VtblCall__II_3C_3C_3C_3C_3=
-XPCOM_VtblCall__II_3C_3C_3C_3C_4=
-XPCOM_VtblCall__II_3C_3C_3C_3C_5=
-
-XPCOM_VtblCall__II_3C_3C_3C_3I=
-XPCOM_VtblCall__II_3C_3C_3C_3I_0=
-XPCOM_VtblCall__II_3C_3C_3C_3I_1=
-XPCOM_VtblCall__II_3C_3C_3C_3I_2=
-XPCOM_VtblCall__II_3C_3C_3C_3I_3=
-XPCOM_VtblCall__II_3C_3C_3C_3I_4=
-XPCOM_VtblCall__II_3C_3C_3C_3I_5=
-
-XPCOM_VtblCall__II_3C_3C_3C_3Z=
-XPCOM_VtblCall__II_3C_3C_3C_3Z_0=
-XPCOM_VtblCall__II_3C_3C_3C_3Z_1=
-XPCOM_VtblCall__II_3C_3C_3C_3Z_2=
-XPCOM_VtblCall__II_3C_3C_3C_3Z_3=
-XPCOM_VtblCall__II_3C_3C_3C_3Z_4=
-XPCOM_VtblCall__II_3C_3C_3C_3Z_5=
-
-XPCOM_VtblCall__II_3C_3C_3C_3Z_3Z=
-XPCOM_VtblCall__II_3C_3C_3C_3Z_3Z_0=
-XPCOM_VtblCall__II_3C_3C_3C_3Z_3Z_1=
-XPCOM_VtblCall__II_3C_3C_3C_3Z_3Z_2=
-XPCOM_VtblCall__II_3C_3C_3C_3Z_3Z_3=
-XPCOM_VtblCall__II_3C_3C_3C_3Z_3Z_4=
-XPCOM_VtblCall__II_3C_3C_3C_3Z_3Z_5=
-XPCOM_VtblCall__II_3C_3C_3C_3Z_3Z_6=
-
-XPCOM_VtblCall__II_3C_3C_3I=
-XPCOM_VtblCall__II_3C_3C_3I_0=
-XPCOM_VtblCall__II_3C_3C_3I_1=
-XPCOM_VtblCall__II_3C_3C_3I_2=
-XPCOM_VtblCall__II_3C_3C_3I_3=
-XPCOM_VtblCall__II_3C_3C_3I_4=
-
-XPCOM_VtblCall__II_3C_3C_3Z=
-XPCOM_VtblCall__II_3C_3C_3Z_0=
-XPCOM_VtblCall__II_3C_3C_3Z_1=
-XPCOM_VtblCall__II_3C_3C_3Z_2=
-XPCOM_VtblCall__II_3C_3C_3Z_3=
-XPCOM_VtblCall__II_3C_3C_3Z_4=
-
-XPCOM_VtblCall__II_3C_3I=
-XPCOM_VtblCall__II_3C_3I_0=
-XPCOM_VtblCall__II_3C_3I_1=
-XPCOM_VtblCall__II_3C_3I_2=
-XPCOM_VtblCall__II_3C_3I_3=
-
-XPCOM_VtblCall__II_3C_3I_3I=
-XPCOM_VtblCall__II_3C_3I_3I_0=
-XPCOM_VtblCall__II_3C_3I_3I_1=
-XPCOM_VtblCall__II_3C_3I_3I_2=
-XPCOM_VtblCall__II_3C_3I_3I_3=
-XPCOM_VtblCall__II_3C_3I_3I_4=
-
-XPCOM_VtblCall__II_3C_3Z=
-XPCOM_VtblCall__II_3C_3Z_0=
-XPCOM_VtblCall__II_3C_3Z_1=
-XPCOM_VtblCall__II_3C_3Z_2=
-XPCOM_VtblCall__II_3C_3Z_3=
-
-XPCOM_VtblCall__II_3C_3Z_3I=
-XPCOM_VtblCall__II_3C_3Z_3I_0=
-XPCOM_VtblCall__II_3C_3Z_3I_1=
-XPCOM_VtblCall__II_3C_3Z_3I_2=
-XPCOM_VtblCall__II_3C_3Z_3I_3=
-XPCOM_VtblCall__II_3C_3Z_3I_4=
-
-XPCOM_VtblCall__II_3D=
-XPCOM_VtblCall__II_3D_0=
-XPCOM_VtblCall__II_3D_1=
-XPCOM_VtblCall__II_3D_2=
-
-XPCOM_VtblCall__II_3F=
-XPCOM_VtblCall__II_3F_0=
-XPCOM_VtblCall__II_3F_1=
-XPCOM_VtblCall__II_3F_2=
-
-XPCOM_VtblCall__II_3I=
-XPCOM_VtblCall__II_3I_0=
-XPCOM_VtblCall__II_3I_1=
-XPCOM_VtblCall__II_3I_2=
-
-XPCOM_VtblCall__II_3II=
-XPCOM_VtblCall__II_3II_0=
-XPCOM_VtblCall__II_3II_1=
-XPCOM_VtblCall__II_3II_2=
-XPCOM_VtblCall__II_3II_3=
-
-XPCOM_VtblCall__II_3I_3I=
-XPCOM_VtblCall__II_3I_3I_0=
-XPCOM_VtblCall__II_3I_3I_1=
-XPCOM_VtblCall__II_3I_3I_2=
-XPCOM_VtblCall__II_3I_3I_3=
-
-XPCOM_VtblCall__II_3I_3I_3I_3I=
-XPCOM_VtblCall__II_3I_3I_3I_3I_0=
-XPCOM_VtblCall__II_3I_3I_3I_3I_1=
-XPCOM_VtblCall__II_3I_3I_3I_3I_2=
-XPCOM_VtblCall__II_3I_3I_3I_3I_3=
-XPCOM_VtblCall__II_3I_3I_3I_3I_4=
-XPCOM_VtblCall__II_3I_3I_3I_3I_5=
-
-XPCOM_VtblCall__II_3J=
-XPCOM_VtblCall__II_3J_0=
-XPCOM_VtblCall__II_3J_1=
-XPCOM_VtblCall__II_3J_2=
-
-XPCOM_VtblCall__II_3S=
-XPCOM_VtblCall__II_3S_0=
-XPCOM_VtblCall__II_3S_1=
-XPCOM_VtblCall__II_3S_2=
-
-XPCOM_VtblCall__II_3Z=
-XPCOM_VtblCall__II_3Z_0=
-XPCOM_VtblCall__II_3Z_1=
-XPCOM_VtblCall__II_3Z_2=
-
-XPCOM_VtblCall__II_3Z_3Z_3Z=
-XPCOM_VtblCall__II_3Z_3Z_3Z_0=
-XPCOM_VtblCall__II_3Z_3Z_3Z_1=
-XPCOM_VtblCall__II_3Z_3Z_3Z_2=
-XPCOM_VtblCall__II_3Z_3Z_3Z_3=
-XPCOM_VtblCall__II_3Z_3Z_3Z_4=
-
-XPCOM_VtblCallNoRet__III=
-XPCOM_VtblCallNoRet__III_0=
-XPCOM_VtblCallNoRet__III_1=
-XPCOM_VtblCallNoRet__III_2=
-
-XPCOM_VtblCallNoRet__IIII=
-XPCOM_VtblCallNoRet__IIII_0=
-XPCOM_VtblCallNoRet__IIII_1=
-XPCOM_VtblCallNoRet__IIII_2=
-XPCOM_VtblCallNoRet__IIII_3=
-
-XPCOM_VtblCallNoRet__II_3I_3I=
-XPCOM_VtblCallNoRet__II_3I_3I_0=
-XPCOM_VtblCallNoRet__II_3I_3I_1=
-XPCOM_VtblCallNoRet__II_3I_3I_2=
-XPCOM_VtblCallNoRet__II_3I_3I_3=
-
-XPCOM_memmove__ILorg_eclipse_swt_internal_mozilla_nsID_2I=
-XPCOM_memmove__ILorg_eclipse_swt_internal_mozilla_nsID_2I_0=cast=(void *)
-XPCOM_memmove__ILorg_eclipse_swt_internal_mozilla_nsID_2I_1=cast=(const void *)
-XPCOM_memmove__ILorg_eclipse_swt_internal_mozilla_nsID_2I_2=cast=(size_t)
-
-XPCOM_memmove__I_3BI=
-XPCOM_memmove__I_3BI_0=cast=(void *)
-XPCOM_memmove__I_3BI_1=cast=(const void *)
-XPCOM_memmove__I_3BI_2=cast=(size_t)
-
-XPCOM_memmove__I_3CI=
-XPCOM_memmove__I_3CI_0=cast=(void *)
-XPCOM_memmove__I_3CI_1=cast=(const void *)
-XPCOM_memmove__I_3CI_2=cast=(size_t)
-
-XPCOM_memmove__I_3II=
-XPCOM_memmove__I_3II_0=cast=(void *)
-XPCOM_memmove__I_3II_1=cast=(const void *)
-XPCOM_memmove__I_3II_2=cast=(size_t)
-
-XPCOM_memmove__Lorg_eclipse_swt_internal_mozilla_nsID_2II=
-XPCOM_memmove__Lorg_eclipse_swt_internal_mozilla_nsID_2II_0=cast=(void *)
-XPCOM_memmove__Lorg_eclipse_swt_internal_mozilla_nsID_2II_1=cast=(const void *)
-XPCOM_memmove__Lorg_eclipse_swt_internal_mozilla_nsID_2II_2=cast=(size_t)
-
-XPCOM_memmove___3BII=
-XPCOM_memmove___3BII_0=cast=(void *)
-XPCOM_memmove___3BII_1=cast=(const void *)
-XPCOM_memmove___3BII_2=cast=(size_t)
-
-XPCOM_memmove___3B_3CI=
-XPCOM_memmove___3B_3CI_0=cast=(void *)
-XPCOM_memmove___3B_3CI_1=cast=(const void *)
-XPCOM_memmove___3B_3CI_2=cast=(size_t)
-
-XPCOM_memmove___3CII=
-XPCOM_memmove___3CII_0=cast=(void *)
-XPCOM_memmove___3CII_1=cast=(const void *)
-XPCOM_memmove___3CII_2=cast=(size_t)
-
-XPCOM_memmove___3III=
-XPCOM_memmove___3III_0=cast=(void *)
-XPCOM_memmove___3III_1=cast=(const void *)
-XPCOM_memmove___3III_2=cast=(size_t)
-
-XPCOM_nsEmbedCString_Length=flags=cpp
-XPCOM_nsEmbedCString_Length_0=cast=(nsEmbedCString *)
-
-XPCOM_nsEmbedCString_delete=flags=delete
-XPCOM_nsEmbedCString_delete_0=cast=(nsEmbedCString *)
-
-XPCOM_nsEmbedCString_get=flags=cpp
-XPCOM_nsEmbedCString_get_0=cast=(nsEmbedCString *)
-
-XPCOM_nsEmbedCString_1new__=flags=new
-
-XPCOM_nsEmbedCString_1new___3BI=flags=new
-XPCOM_nsEmbedCString_1new___3BI_0=cast=(const char *)
-XPCOM_nsEmbedCString_1new___3BI_1=
-
-XPCOM_nsEmbedString_Equals=flags=cpp
-XPCOM_nsEmbedString_Equals_0=cast=(nsEmbedString *)
-XPCOM_nsEmbedString_Equals_1=cast=(nsEmbedString *),flags=struct
-
-XPCOM_nsEmbedString_Length=flags=cpp
-XPCOM_nsEmbedString_Length_0=cast=(nsEmbedString *)
-
-XPCOM_nsEmbedString_delete=flags=delete
-XPCOM_nsEmbedString_delete_0=cast=(nsEmbedString *)
-
-XPCOM_nsEmbedString_get=flags=cpp
-XPCOM_nsEmbedString_get_0=cast=(nsEmbedString *)
-
-XPCOM_nsEmbedString_1new__=flags=new
-
-XPCOM_nsEmbedString_1new___3C=flags=new
-XPCOM_nsEmbedString_1new___3C_0=
-
-XPCOM_nsID_Equals=flags=cpp
-XPCOM_nsID_Equals_0=cast=(nsID *)
-XPCOM_nsID_Equals_1=cast=(nsID *),flags=struct
-
-XPCOM_nsID_Parse=flags=cpp
-XPCOM_nsID_Parse_0=cast=(nsID *)
-XPCOM_nsID_Parse_1=cast=(const char *)
-
-XPCOM_nsID_delete=flags=delete
-XPCOM_nsID_delete_0=cast=(nsID *)
-
-XPCOM_nsID_new=flags=new
-
-XPCOM_strlen=
-XPCOM_strlen_0=cast=(char *)
-
-XPCOM_strlen_PRUnichar=flags=no_gen
-XPCOM_strlen_PRUnichar_0=
-
-
-org_eclipse_swt_internal_mozilla_XPCOMObject=
-
-org_eclipse_swt_internal_mozilla_nsEmbedString=
-
-org_eclipse_swt_internal_mozilla_nsIAppShell=
-
-org_eclipse_swt_internal_mozilla_nsIBaseWindow=
-
-org_eclipse_swt_internal_mozilla_nsICategoryManager=
-
-org_eclipse_swt_internal_mozilla_nsIChannel=
-
-org_eclipse_swt_internal_mozilla_nsIComponentManager=
-
-org_eclipse_swt_internal_mozilla_nsIComponentRegistrar=
-
-org_eclipse_swt_internal_mozilla_nsIContentViewer=
-
-org_eclipse_swt_internal_mozilla_nsIContentViewerContainer=
-
-org_eclipse_swt_internal_mozilla_nsIContextMenuListener=
-
-org_eclipse_swt_internal_mozilla_nsIController=
-
-org_eclipse_swt_internal_mozilla_nsIControllers=
-
-org_eclipse_swt_internal_mozilla_nsID=flags=cpp
-nsID_m0=
-nsID_m1=
-nsID_m2=
-nsID_m3=
-
-org_eclipse_swt_internal_mozilla_nsIDOMEvent=
-
-org_eclipse_swt_internal_mozilla_nsIDOMLocation=
-
-org_eclipse_swt_internal_mozilla_nsIDOMMouseEvent=
-
-org_eclipse_swt_internal_mozilla_nsIDOMUIEvent=
-
-org_eclipse_swt_internal_mozilla_nsIDOMWindow=
-
-org_eclipse_swt_internal_mozilla_nsIDirectoryService=
-
-org_eclipse_swt_internal_mozilla_nsIDirectoryServiceProvider=
-
-org_eclipse_swt_internal_mozilla_nsIDirectoryServiceProvider2=
-
-org_eclipse_swt_internal_mozilla_nsIDocShell=
-
-org_eclipse_swt_internal_mozilla_nsIDocShellTreeItem=
-
-org_eclipse_swt_internal_mozilla_nsIDocumentLoaderFactory=
-
-org_eclipse_swt_internal_mozilla_nsIDownload=
-
-org_eclipse_swt_internal_mozilla_nsIEmbeddingSiteWindow=
-
-org_eclipse_swt_internal_mozilla_nsIEventSink=
-
-org_eclipse_swt_internal_mozilla_nsIFactory=
-
-org_eclipse_swt_internal_mozilla_nsIFile=
-
-org_eclipse_swt_internal_mozilla_nsIHelperAppLauncher=
-
-org_eclipse_swt_internal_mozilla_nsIHelperAppLauncherDialog=
-
-org_eclipse_swt_internal_mozilla_nsIIOService=
-
-org_eclipse_swt_internal_mozilla_nsIInputStream=
-
-org_eclipse_swt_internal_mozilla_nsIInputStreamChannel=
-
-org_eclipse_swt_internal_mozilla_nsIInterfaceRequestor=
-
-org_eclipse_swt_internal_mozilla_nsILoadGroup=
-
-org_eclipse_swt_internal_mozilla_nsILocalFile=
-
-org_eclipse_swt_internal_mozilla_nsIMemory=
-
-org_eclipse_swt_internal_mozilla_nsIObserver=
-
-org_eclipse_swt_internal_mozilla_nsIObserverService=
-
-org_eclipse_swt_internal_mozilla_nsIPref=
-
-org_eclipse_swt_internal_mozilla_nsIProfile=
-
-org_eclipse_swt_internal_mozilla_nsIProfileChangeStatus=
-
-org_eclipse_swt_internal_mozilla_nsIProgressDialog=
-
-org_eclipse_swt_internal_mozilla_nsIPromptService=
-
-org_eclipse_swt_internal_mozilla_nsIProperties=
-
-org_eclipse_swt_internal_mozilla_nsIRequest=
-
-org_eclipse_swt_internal_mozilla_nsIRequestObserver=
-
-org_eclipse_swt_internal_mozilla_nsIServiceManager=
-
-org_eclipse_swt_internal_mozilla_nsIStreamListener=
-
-org_eclipse_swt_internal_mozilla_nsISupports=
-
-org_eclipse_swt_internal_mozilla_nsISupportsWeakReference=
-
-org_eclipse_swt_internal_mozilla_nsITooltipListener=
-
-org_eclipse_swt_internal_mozilla_nsIURI=
-
-org_eclipse_swt_internal_mozilla_nsIURIContentListener=
-
-org_eclipse_swt_internal_mozilla_nsIWeakReference=
-
-org_eclipse_swt_internal_mozilla_nsIWebBrowser=
-
-org_eclipse_swt_internal_mozilla_nsIWebBrowserChrome=
-
-org_eclipse_swt_internal_mozilla_nsIWebBrowserChromeFocus=
-
-org_eclipse_swt_internal_mozilla_nsIWebBrowserFocus=
-
-org_eclipse_swt_internal_mozilla_nsIWebNavigation=
-
-org_eclipse_swt_internal_mozilla_nsIWebProgress=
-
-org_eclipse_swt_internal_mozilla_nsIWebProgressListener=
-
-org_eclipse_swt_internal_mozilla_nsIWidget=
-
-org_eclipse_swt_internal_mozilla_nsIWindowCreator=
-
-org_eclipse_swt_internal_mozilla_nsIWindowWatcher=
-
diff --git a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.mozilla.properties b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.mozilla.properties
deleted file mode 100644
index 7f0f1dc5aa..0000000000
--- a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.mozilla.properties
+++ /dev/null
@@ -1,37 +0,0 @@
-###############################################################################
-# Copyright (c) 2004 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Common Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/cpl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-swt_copyright=/* ***** BEGIN LICENSE BLOCK *****\n\
- * Version: MPL 1.1\n\
- *\n\
- * The contents of this file are subject to the Mozilla Public License Version\n\
- * 1.1 (the "License"); you may not use this file except in compliance with\n\
- * the License. You may obtain a copy of the License at\n\
- * http://www.mozilla.org/MPL/\n\
- *\n\
- * Software distributed under the License is distributed on an "AS IS" basis,\n\
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License\n\
- * for the specific language governing rights and limitations under the\n\
- * License.\n\
- *\n\
- * The Original Code is Mozilla Communicator client code, released March 31, 1998.\n\
- *\n\
- * The Initial Developer of the Original Code is\n\
- * Netscape Communications Corporation.\n\
- * Portions created by Netscape are Copyright (C) 1998-1999\n\
- * Netscape Communications Corporation. All Rights Reserved.\n\
- *\n\
- * Contributor(s):\n\
- *\n\
- * IBM\n\
- * - Binding to permit interfacing between Mozilla and SWT\n\
- * - Copyright (C) 2003, 2004 IBM Corp. All Rights Reserved.\n\
- *\n\
- * ***** END LICENSE BLOCK ***** */\n
diff --git a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.ole.win32.COM.properties b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.ole.win32.COM.properties
deleted file mode 100644
index e63e9342f2..0000000000
--- a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.ole.win32.COM.properties
+++ /dev/null
@@ -1,802 +0,0 @@
-###############################################################################
-# Copyright (c) 2004 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Common Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/cpl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-org_eclipse_swt_internal_ole_win32_CAUUID=
-CAUUID_cElems=
-CAUUID_pElems=cast=(GUID FAR *)
-
-org_eclipse_swt_internal_ole_win32_COM=
-COM_CLSIDFromProgID=
-COM_CLSIDFromProgID_0=cast=LPCOLESTR
-COM_CLSIDFromProgID_1=
-
-COM_CLSIDFromString=
-COM_CLSIDFromString_0=cast=LPOLESTR
-COM_CLSIDFromString_1=
-
-COM_CoCreateInstance=
-COM_CoCreateInstance_0=
-COM_CoCreateInstance_1=cast=LPUNKNOWN
-COM_CoCreateInstance_2=
-COM_CoCreateInstance_3=
-COM_CoCreateInstance_4=cast=LPVOID *
-
-COM_CoFreeUnusedLibraries=
-
-COM_CoGetClassObject=
-COM_CoGetClassObject_0=
-COM_CoGetClassObject_1=
-COM_CoGetClassObject_2=cast=(COSERVERINFO *
-COM_CoGetClassObject_3=
-COM_CoGetClassObject_4=cast=LPVOID *
-
-COM_CoLockObjectExternal=
-COM_CoLockObjectExternal_0=cast=(IUnknown *)
-COM_CoLockObjectExternal_1=cast=(BOOL)
-COM_CoLockObjectExternal_2=cast=(BOOL)
-
-COM_CoTaskMemAlloc=
-COM_CoTaskMemAlloc_0=cast=(ULONG)
-
-COM_CoTaskMemFree=
-COM_CoTaskMemFree_0=cast=(LPVOID)
-
-COM_CreateStdAccessibleObject=flags=dynamic
-COM_CreateStdAccessibleObject_0=cast=(HWND)
-COM_CreateStdAccessibleObject_1=
-COM_CreateStdAccessibleObject_2=
-COM_CreateStdAccessibleObject_3=cast=(LPVOID *)
-
-COM_DoDragDrop=
-COM_DoDragDrop_0=cast=(IDataObject *)
-COM_DoDragDrop_1=cast=IDropSource *
-COM_DoDragDrop_2=
-COM_DoDragDrop_3=
-
-COM_GetClassFile=
-COM_GetClassFile_0=cast=LPCWSTR
-COM_GetClassFile_1=
-
-COM_IIDFromString=
-COM_IIDFromString_0=cast=LPOLESTR
-COM_IIDFromString_1=
-
-COM_IsEqualGUID=
-COM_IsEqualGUID_0=
-COM_IsEqualGUID_1=
-
-COM_LresultFromObject=flags=dynamic
-COM_LresultFromObject_0=
-COM_LresultFromObject_1=
-COM_LresultFromObject_2=cast=(LPUNKNOWN)
-
-COM_MoveMemory__ILorg_eclipse_swt_internal_ole_win32_FORMATETC_2I=
-COM_MoveMemory__ILorg_eclipse_swt_internal_ole_win32_FORMATETC_2I_0=cast=(PVOID)
-COM_MoveMemory__ILorg_eclipse_swt_internal_ole_win32_FORMATETC_2I_1=cast=(CONST VOID *),flags=no_out
-COM_MoveMemory__ILorg_eclipse_swt_internal_ole_win32_FORMATETC_2I_2=
-
-COM_MoveMemory__ILorg_eclipse_swt_internal_ole_win32_GUID_2I=
-COM_MoveMemory__ILorg_eclipse_swt_internal_ole_win32_GUID_2I_0=cast=(PVOID)
-COM_MoveMemory__ILorg_eclipse_swt_internal_ole_win32_GUID_2I_1=cast=(CONST VOID *),flags=no_out
-COM_MoveMemory__ILorg_eclipse_swt_internal_ole_win32_GUID_2I_2=
-
-COM_MoveMemory__ILorg_eclipse_swt_internal_ole_win32_OLEINPLACEFRAMEINFO_2I=
-COM_MoveMemory__ILorg_eclipse_swt_internal_ole_win32_OLEINPLACEFRAMEINFO_2I_0=cast=(PVOID)
-COM_MoveMemory__ILorg_eclipse_swt_internal_ole_win32_OLEINPLACEFRAMEINFO_2I_1=cast=(CONST VOID *),flags=no_out
-COM_MoveMemory__ILorg_eclipse_swt_internal_ole_win32_OLEINPLACEFRAMEINFO_2I_2=
-
-COM_MoveMemory__ILorg_eclipse_swt_internal_ole_win32_STATSTG_2I=
-COM_MoveMemory__ILorg_eclipse_swt_internal_ole_win32_STATSTG_2I_0=cast=(PVOID)
-COM_MoveMemory__ILorg_eclipse_swt_internal_ole_win32_STATSTG_2I_1=cast=(CONST VOID *),flags=no_out
-COM_MoveMemory__ILorg_eclipse_swt_internal_ole_win32_STATSTG_2I_2=
-
-COM_MoveMemory__ILorg_eclipse_swt_internal_ole_win32_STGMEDIUM_2I=
-COM_MoveMemory__ILorg_eclipse_swt_internal_ole_win32_STGMEDIUM_2I_0=cast=(PVOID)
-COM_MoveMemory__ILorg_eclipse_swt_internal_ole_win32_STGMEDIUM_2I_1=cast=(CONST VOID *),flags=no_out
-COM_MoveMemory__ILorg_eclipse_swt_internal_ole_win32_STGMEDIUM_2I_2=
-
-COM_MoveMemory__Lorg_eclipse_swt_internal_ole_win32_DISPPARAMS_2II=
-COM_MoveMemory__Lorg_eclipse_swt_internal_ole_win32_DISPPARAMS_2II_0=cast=(PVOID),flags=no_in
-COM_MoveMemory__Lorg_eclipse_swt_internal_ole_win32_DISPPARAMS_2II_1=cast=(CONST VOID *)
-COM_MoveMemory__Lorg_eclipse_swt_internal_ole_win32_DISPPARAMS_2II_2=
-
-COM_MoveMemory__Lorg_eclipse_swt_internal_ole_win32_FORMATETC_2II=
-COM_MoveMemory__Lorg_eclipse_swt_internal_ole_win32_FORMATETC_2II_0=cast=(PVOID),flags=no_in
-COM_MoveMemory__Lorg_eclipse_swt_internal_ole_win32_FORMATETC_2II_1=cast=(CONST VOID *)
-COM_MoveMemory__Lorg_eclipse_swt_internal_ole_win32_FORMATETC_2II_2=
-
-COM_MoveMemory__Lorg_eclipse_swt_internal_ole_win32_FUNCDESC_2II=
-COM_MoveMemory__Lorg_eclipse_swt_internal_ole_win32_FUNCDESC_2II_0=cast=(PVOID),flags=no_in
-COM_MoveMemory__Lorg_eclipse_swt_internal_ole_win32_FUNCDESC_2II_1=cast=(CONST VOID *)
-COM_MoveMemory__Lorg_eclipse_swt_internal_ole_win32_FUNCDESC_2II_2=
-
-COM_MoveMemory__Lorg_eclipse_swt_internal_ole_win32_GUID_2II=
-COM_MoveMemory__Lorg_eclipse_swt_internal_ole_win32_GUID_2II_0=cast=(PVOID),flags=no_in
-COM_MoveMemory__Lorg_eclipse_swt_internal_ole_win32_GUID_2II_1=cast=(CONST VOID *)
-COM_MoveMemory__Lorg_eclipse_swt_internal_ole_win32_GUID_2II_2=
-
-COM_MoveMemory__Lorg_eclipse_swt_internal_ole_win32_STATSTG_2II=
-COM_MoveMemory__Lorg_eclipse_swt_internal_ole_win32_STATSTG_2II_0=cast=(PVOID),flags=no_in
-COM_MoveMemory__Lorg_eclipse_swt_internal_ole_win32_STATSTG_2II_1=cast=(CONST VOID *)
-COM_MoveMemory__Lorg_eclipse_swt_internal_ole_win32_STATSTG_2II_2=
-
-COM_MoveMemory__Lorg_eclipse_swt_internal_ole_win32_STGMEDIUM_2II=
-COM_MoveMemory__Lorg_eclipse_swt_internal_ole_win32_STGMEDIUM_2II_0=cast=(PVOID),flags=no_in
-COM_MoveMemory__Lorg_eclipse_swt_internal_ole_win32_STGMEDIUM_2II_1=cast=(CONST VOID *)
-COM_MoveMemory__Lorg_eclipse_swt_internal_ole_win32_STGMEDIUM_2II_2=
-
-COM_MoveMemory__Lorg_eclipse_swt_internal_ole_win32_TYPEATTR_2II=
-COM_MoveMemory__Lorg_eclipse_swt_internal_ole_win32_TYPEATTR_2II_0=cast=(PVOID),flags=no_in
-COM_MoveMemory__Lorg_eclipse_swt_internal_ole_win32_TYPEATTR_2II_1=cast=(CONST VOID *)
-COM_MoveMemory__Lorg_eclipse_swt_internal_ole_win32_TYPEATTR_2II_2=
-
-COM_MoveMemory__Lorg_eclipse_swt_internal_ole_win32_VARDESC_2II=
-COM_MoveMemory__Lorg_eclipse_swt_internal_ole_win32_VARDESC_2II_0=cast=(PVOID),flags=no_in
-COM_MoveMemory__Lorg_eclipse_swt_internal_ole_win32_VARDESC_2II_1=cast=(CONST VOID *)
-COM_MoveMemory__Lorg_eclipse_swt_internal_ole_win32_VARDESC_2II_2=
-
-COM_MoveMemory__Lorg_eclipse_swt_internal_win32_RECT_2II=
-COM_MoveMemory__Lorg_eclipse_swt_internal_win32_RECT_2II_0=cast=(PVOID),flags=no_in
-COM_MoveMemory__Lorg_eclipse_swt_internal_win32_RECT_2II_1=cast=(CONST VOID *)
-COM_MoveMemory__Lorg_eclipse_swt_internal_win32_RECT_2II_2=
-
-COM_OleCreate=
-COM_OleCreate_0=
-COM_OleCreate_1=
-COM_OleCreate_2=
-COM_OleCreate_3=
-COM_OleCreate_4=cast=IOleClientSite *
-COM_OleCreate_5=cast=IStorage *
-COM_OleCreate_6=cast=void **
-
-COM_OleCreateFromFile=
-COM_OleCreateFromFile_0=
-COM_OleCreateFromFile_1=cast=LPCOLESTR
-COM_OleCreateFromFile_2=
-COM_OleCreateFromFile_3=
-COM_OleCreateFromFile_4=
-COM_OleCreateFromFile_5=cast=(LPOLECLIENTSITE)
-COM_OleCreateFromFile_6=cast=(LPSTORAGE)
-COM_OleCreateFromFile_7=cast=LPVOID *
-
-COM_OleCreatePropertyFrame=
-COM_OleCreatePropertyFrame_0=cast=(HWND)
-COM_OleCreatePropertyFrame_1=
-COM_OleCreatePropertyFrame_2=
-COM_OleCreatePropertyFrame_3=cast=LPCOLESTR
-COM_OleCreatePropertyFrame_4=
-COM_OleCreatePropertyFrame_5=cast=(LPUNKNOWN FAR*)
-COM_OleCreatePropertyFrame_6=
-COM_OleCreatePropertyFrame_7=cast=(LPCLSID)
-COM_OleCreatePropertyFrame_8=cast=(LCID)
-COM_OleCreatePropertyFrame_9=
-COM_OleCreatePropertyFrame_10=cast=(LPVOID)
-
-COM_OleDraw=
-COM_OleDraw_0=cast=(LPUNKNOWN)
-COM_OleDraw_1=cast=(DWORD)
-COM_OleDraw_2=cast=(HDC)
-COM_OleDraw_3=cast=(LPRECT)
-
-COM_OleFlushClipboard=
-
-COM_OleGetClipboard=
-COM_OleGetClipboard_0=cast=(IDataObject **)
-
-COM_OleIsCurrentClipboard=
-COM_OleIsCurrentClipboard_0=cast=(IDataObject *)
-
-COM_OleIsRunning=
-COM_OleIsRunning_0=cast=(LPOLEOBJECT)
-
-COM_OleLoad=
-COM_OleLoad_0=cast=(IStorage *)
-COM_OleLoad_1=
-COM_OleLoad_2=cast=(IOleClientSite *)
-COM_OleLoad_3=cast=LPVOID *
-
-COM_OleRun=
-COM_OleRun_0=cast=(LPUNKNOWN)
-
-COM_OleSave=
-COM_OleSave_0=cast=(IPersistStorage *)
-COM_OleSave_1=cast=(IStorage *)
-COM_OleSave_2=
-
-COM_OleSetClipboard=
-COM_OleSetClipboard_0=cast=(IDataObject *)
-
-COM_OleSetContainedObject=
-COM_OleSetContainedObject_0=cast=(LPUNKNOWN)
-COM_OleSetContainedObject_1=
-
-COM_OleSetMenuDescriptor=
-COM_OleSetMenuDescriptor_0=cast=(HOLEMENU)
-COM_OleSetMenuDescriptor_1=cast=(HWND)
-COM_OleSetMenuDescriptor_2=cast=(HWND)
-COM_OleSetMenuDescriptor_3=cast=(LPOLEINPLACEFRAME)
-COM_OleSetMenuDescriptor_4=cast=(LPOLEINPLACEACTIVEOBJECT)
-
-COM_OleTranslateColor=
-COM_OleTranslateColor_0=cast=(OLE_COLOR)
-COM_OleTranslateColor_1=cast=(HPALETTE)
-COM_OleTranslateColor_2=cast=(COLORREF *)
-
-COM_ProgIDFromCLSID=
-COM_ProgIDFromCLSID_0=
-COM_ProgIDFromCLSID_1=cast=LPOLESTR *
-
-COM_RegisterDragDrop=
-COM_RegisterDragDrop_0=cast=(HWND)
-COM_RegisterDragDrop_1=cast=(IDropTarget *)
-
-COM_ReleaseStgMedium=
-COM_ReleaseStgMedium_0=cast=(STGMEDIUM *)
-
-COM_RevokeDragDrop=
-COM_RevokeDragDrop_0=cast=(HWND)
-
-COM_StgCreateDocfile=
-COM_StgCreateDocfile_0=
-COM_StgCreateDocfile_1=
-COM_StgCreateDocfile_2=
-COM_StgCreateDocfile_3=cast=IStorage **
-
-COM_StgIsStorageFile=
-COM_StgIsStorageFile_0=cast=(const WCHAR *)
-
-COM_StgOpenStorage=
-COM_StgOpenStorage_0=cast=const WCHAR *
-COM_StgOpenStorage_1=cast=(IStorage *)
-COM_StgOpenStorage_2=
-COM_StgOpenStorage_3=cast=(SNB)
-COM_StgOpenStorage_4=
-COM_StgOpenStorage_5=cast=IStorage **
-
-COM_StringFromCLSID=
-COM_StringFromCLSID_0=
-COM_StringFromCLSID_1=cast=LPOLESTR *
-
-COM_SysAllocString=
-COM_SysAllocString_0=cast=(OLECHAR *)
-
-COM_SysFreeString=
-COM_SysFreeString_0=cast=(BSTR)
-
-COM_SysStringByteLen=
-COM_SysStringByteLen_0=cast=(BSTR)
-
-COM_VariantChangeType=
-COM_VariantChangeType_0=cast=(VARIANTARG FAR* )
-COM_VariantChangeType_1=cast=(VARIANTARG FAR* )
-COM_VariantChangeType_2=
-COM_VariantChangeType_3=cast=(VARTYPE)
-
-COM_VariantClear=
-COM_VariantClear_0=cast=(VARIANTARG FAR* )
-
-COM_VariantInit=
-COM_VariantInit_0=cast=(VARIANTARG FAR* )
-
-COM_VtblCall__IIII=
-COM_VtblCall__IIII_0=
-COM_VtblCall__IIII_1=
-COM_VtblCall__IIII_2=
-COM_VtblCall__IIII_3=
-
-COM_VtblCall__IIIII=
-COM_VtblCall__IIIII_0=
-COM_VtblCall__IIIII_1=
-COM_VtblCall__IIIII_2=
-COM_VtblCall__IIIII_3=
-COM_VtblCall__IIIII_4=
-
-COM_VtblCall__IIIIII=
-COM_VtblCall__IIIIII_0=
-COM_VtblCall__IIIIII_1=
-COM_VtblCall__IIIIII_2=
-COM_VtblCall__IIIIII_3=
-COM_VtblCall__IIIIII_4=
-COM_VtblCall__IIIIII_5=
-
-COM_VtblCall__IIIIIII=
-COM_VtblCall__IIIIIII_0=
-COM_VtblCall__IIIIIII_1=
-COM_VtblCall__IIIIIII_2=
-COM_VtblCall__IIIIIII_3=
-COM_VtblCall__IIIIIII_4=
-COM_VtblCall__IIIIIII_5=
-COM_VtblCall__IIIIIII_6=
-
-COM_VtblCall__IIIIIIII=
-COM_VtblCall__IIIIIIII_0=
-COM_VtblCall__IIIIIIII_1=
-COM_VtblCall__IIIIIIII_2=
-COM_VtblCall__IIIIIIII_3=
-COM_VtblCall__IIIIIIII_4=
-COM_VtblCall__IIIIIIII_5=
-COM_VtblCall__IIIIIIII_6=
-COM_VtblCall__IIIIIIII_7=
-
-COM_VtblCall__IIIIIIIIII=
-COM_VtblCall__IIIIIIIIII_0=
-COM_VtblCall__IIIIIIIIII_1=
-COM_VtblCall__IIIIIIIIII_2=
-COM_VtblCall__IIIIIIIIII_3=
-COM_VtblCall__IIIIIIIIII_4=
-COM_VtblCall__IIIIIIIIII_5=
-COM_VtblCall__IIIIIIIIII_6=
-COM_VtblCall__IIIIIIIIII_7=
-COM_VtblCall__IIIIIIIIII_8=
-COM_VtblCall__IIIIIIIIII_9=
-
-COM_VtblCall__IIIILorg_eclipse_swt_internal_ole_win32_DVTARGETDEVICE_2Lorg_eclipse_swt_internal_win32_SIZE_2=
-COM_VtblCall__IIIILorg_eclipse_swt_internal_ole_win32_DVTARGETDEVICE_2Lorg_eclipse_swt_internal_win32_SIZE_2_0=
-COM_VtblCall__IIIILorg_eclipse_swt_internal_ole_win32_DVTARGETDEVICE_2Lorg_eclipse_swt_internal_win32_SIZE_2_1=
-COM_VtblCall__IIIILorg_eclipse_swt_internal_ole_win32_DVTARGETDEVICE_2Lorg_eclipse_swt_internal_win32_SIZE_2_2=
-COM_VtblCall__IIIILorg_eclipse_swt_internal_ole_win32_DVTARGETDEVICE_2Lorg_eclipse_swt_internal_win32_SIZE_2_3=
-COM_VtblCall__IIIILorg_eclipse_swt_internal_ole_win32_DVTARGETDEVICE_2Lorg_eclipse_swt_internal_win32_SIZE_2_4=
-COM_VtblCall__IIIILorg_eclipse_swt_internal_ole_win32_DVTARGETDEVICE_2Lorg_eclipse_swt_internal_win32_SIZE_2_5=
-
-COM_VtblCall__IIIILorg_eclipse_swt_internal_ole_win32_GUID_2I_3I=
-COM_VtblCall__IIIILorg_eclipse_swt_internal_ole_win32_GUID_2I_3I_0=
-COM_VtblCall__IIIILorg_eclipse_swt_internal_ole_win32_GUID_2I_3I_1=
-COM_VtblCall__IIIILorg_eclipse_swt_internal_ole_win32_GUID_2I_3I_2=
-COM_VtblCall__IIIILorg_eclipse_swt_internal_ole_win32_GUID_2I_3I_3=
-COM_VtblCall__IIIILorg_eclipse_swt_internal_ole_win32_GUID_2I_3I_4=
-COM_VtblCall__IIIILorg_eclipse_swt_internal_ole_win32_GUID_2I_3I_5=
-COM_VtblCall__IIIILorg_eclipse_swt_internal_ole_win32_GUID_2I_3I_6=
-
-COM_VtblCall__IIII_3I=
-COM_VtblCall__IIII_3I_0=
-COM_VtblCall__IIII_3I_1=
-COM_VtblCall__IIII_3I_2=
-COM_VtblCall__IIII_3I_3=
-COM_VtblCall__IIII_3I_4=
-
-COM_VtblCall__IIILorg_eclipse_swt_internal_ole_win32_FORMATETC_2_3I=
-COM_VtblCall__IIILorg_eclipse_swt_internal_ole_win32_FORMATETC_2_3I_0=
-COM_VtblCall__IIILorg_eclipse_swt_internal_ole_win32_FORMATETC_2_3I_1=
-COM_VtblCall__IIILorg_eclipse_swt_internal_ole_win32_FORMATETC_2_3I_2=
-COM_VtblCall__IIILorg_eclipse_swt_internal_ole_win32_FORMATETC_2_3I_3=
-COM_VtblCall__IIILorg_eclipse_swt_internal_ole_win32_FORMATETC_2_3I_4=
-
-COM_VtblCall__IIILorg_eclipse_swt_internal_ole_win32_GUID_2=
-COM_VtblCall__IIILorg_eclipse_swt_internal_ole_win32_GUID_2_0=
-COM_VtblCall__IIILorg_eclipse_swt_internal_ole_win32_GUID_2_1=
-COM_VtblCall__IIILorg_eclipse_swt_internal_ole_win32_GUID_2_2=
-COM_VtblCall__IIILorg_eclipse_swt_internal_ole_win32_GUID_2_3=
-
-COM_VtblCall__IIILorg_eclipse_swt_internal_ole_win32_GUID_2II=
-COM_VtblCall__IIILorg_eclipse_swt_internal_ole_win32_GUID_2II_0=
-COM_VtblCall__IIILorg_eclipse_swt_internal_ole_win32_GUID_2II_1=
-COM_VtblCall__IIILorg_eclipse_swt_internal_ole_win32_GUID_2II_2=
-COM_VtblCall__IIILorg_eclipse_swt_internal_ole_win32_GUID_2II_3=
-COM_VtblCall__IIILorg_eclipse_swt_internal_ole_win32_GUID_2II_4=
-COM_VtblCall__IIILorg_eclipse_swt_internal_ole_win32_GUID_2II_5=
-
-COM_VtblCall__IIILorg_eclipse_swt_internal_ole_win32_GUID_2IILorg_eclipse_swt_internal_ole_win32_DISPPARAMS_2ILorg_eclipse_swt_internal_ole_win32_EXCEPINFO_2_3I=
-COM_VtblCall__IIILorg_eclipse_swt_internal_ole_win32_GUID_2IILorg_eclipse_swt_internal_ole_win32_DISPPARAMS_2ILorg_eclipse_swt_internal_ole_win32_EXCEPINFO_2_3I_0=
-COM_VtblCall__IIILorg_eclipse_swt_internal_ole_win32_GUID_2IILorg_eclipse_swt_internal_ole_win32_DISPPARAMS_2ILorg_eclipse_swt_internal_ole_win32_EXCEPINFO_2_3I_1=
-COM_VtblCall__IIILorg_eclipse_swt_internal_ole_win32_GUID_2IILorg_eclipse_swt_internal_ole_win32_DISPPARAMS_2ILorg_eclipse_swt_internal_ole_win32_EXCEPINFO_2_3I_2=
-COM_VtblCall__IIILorg_eclipse_swt_internal_ole_win32_GUID_2IILorg_eclipse_swt_internal_ole_win32_DISPPARAMS_2ILorg_eclipse_swt_internal_ole_win32_EXCEPINFO_2_3I_3=
-COM_VtblCall__IIILorg_eclipse_swt_internal_ole_win32_GUID_2IILorg_eclipse_swt_internal_ole_win32_DISPPARAMS_2ILorg_eclipse_swt_internal_ole_win32_EXCEPINFO_2_3I_4=
-COM_VtblCall__IIILorg_eclipse_swt_internal_ole_win32_GUID_2IILorg_eclipse_swt_internal_ole_win32_DISPPARAMS_2ILorg_eclipse_swt_internal_ole_win32_EXCEPINFO_2_3I_5=
-COM_VtblCall__IIILorg_eclipse_swt_internal_ole_win32_GUID_2IILorg_eclipse_swt_internal_ole_win32_DISPPARAMS_2ILorg_eclipse_swt_internal_ole_win32_EXCEPINFO_2_3I_6=
-COM_VtblCall__IIILorg_eclipse_swt_internal_ole_win32_GUID_2IILorg_eclipse_swt_internal_ole_win32_DISPPARAMS_2ILorg_eclipse_swt_internal_ole_win32_EXCEPINFO_2_3I_7=
-COM_VtblCall__IIILorg_eclipse_swt_internal_ole_win32_GUID_2IILorg_eclipse_swt_internal_ole_win32_DISPPARAMS_2ILorg_eclipse_swt_internal_ole_win32_EXCEPINFO_2_3I_8=
-COM_VtblCall__IIILorg_eclipse_swt_internal_ole_win32_GUID_2IILorg_eclipse_swt_internal_ole_win32_DISPPARAMS_2ILorg_eclipse_swt_internal_ole_win32_EXCEPINFO_2_3I_9=
-
-COM_VtblCall__IIILorg_eclipse_swt_internal_ole_win32_STATSTG_2_3I=
-COM_VtblCall__IIILorg_eclipse_swt_internal_ole_win32_STATSTG_2_3I_0=
-COM_VtblCall__IIILorg_eclipse_swt_internal_ole_win32_STATSTG_2_3I_1=
-COM_VtblCall__IIILorg_eclipse_swt_internal_ole_win32_STATSTG_2_3I_2=
-COM_VtblCall__IIILorg_eclipse_swt_internal_ole_win32_STATSTG_2_3I_3=
-COM_VtblCall__IIILorg_eclipse_swt_internal_ole_win32_STATSTG_2_3I_4=
-
-COM_VtblCall__IIILorg_eclipse_swt_internal_win32_MSG_2IIILorg_eclipse_swt_internal_win32_RECT_2=
-COM_VtblCall__IIILorg_eclipse_swt_internal_win32_MSG_2IIILorg_eclipse_swt_internal_win32_RECT_2_0=
-COM_VtblCall__IIILorg_eclipse_swt_internal_win32_MSG_2IIILorg_eclipse_swt_internal_win32_RECT_2_1=
-COM_VtblCall__IIILorg_eclipse_swt_internal_win32_MSG_2IIILorg_eclipse_swt_internal_win32_RECT_2_2=
-COM_VtblCall__IIILorg_eclipse_swt_internal_win32_MSG_2IIILorg_eclipse_swt_internal_win32_RECT_2_3=
-COM_VtblCall__IIILorg_eclipse_swt_internal_win32_MSG_2IIILorg_eclipse_swt_internal_win32_RECT_2_4=
-COM_VtblCall__IIILorg_eclipse_swt_internal_win32_MSG_2IIILorg_eclipse_swt_internal_win32_RECT_2_5=
-COM_VtblCall__IIILorg_eclipse_swt_internal_win32_MSG_2IIILorg_eclipse_swt_internal_win32_RECT_2_6=
-COM_VtblCall__IIILorg_eclipse_swt_internal_win32_MSG_2IIILorg_eclipse_swt_internal_win32_RECT_2_7=
-
-COM_VtblCall__IIILorg_eclipse_swt_internal_win32_SIZE_2=
-COM_VtblCall__IIILorg_eclipse_swt_internal_win32_SIZE_2_0=
-COM_VtblCall__IIILorg_eclipse_swt_internal_win32_SIZE_2_1=
-COM_VtblCall__IIILorg_eclipse_swt_internal_win32_SIZE_2_2=
-COM_VtblCall__IIILorg_eclipse_swt_internal_win32_SIZE_2_3=
-
-COM_VtblCall__IIIZ=
-COM_VtblCall__IIIZ_0=
-COM_VtblCall__IIIZ_1=
-COM_VtblCall__IIIZ_2=
-COM_VtblCall__IIIZ_3=
-
-COM_VtblCall__III_3I=
-COM_VtblCall__III_3I_0=
-COM_VtblCall__III_3I_1=
-COM_VtblCall__III_3I_2=
-COM_VtblCall__III_3I_3=
-
-COM_VtblCall__III_3II_3I=
-COM_VtblCall__III_3II_3I_0=
-COM_VtblCall__III_3II_3I_1=
-COM_VtblCall__III_3II_3I_2=
-COM_VtblCall__III_3II_3I_3=
-COM_VtblCall__III_3II_3I_4=
-COM_VtblCall__III_3II_3I_5=
-
-COM_VtblCall__III_3I_3I_3I_3I=
-COM_VtblCall__III_3I_3I_3I_3I_0=
-COM_VtblCall__III_3I_3I_3I_3I_1=
-COM_VtblCall__III_3I_3I_3I_3I_2=
-COM_VtblCall__III_3I_3I_3I_3I_3=
-COM_VtblCall__III_3I_3I_3I_3I_4=
-COM_VtblCall__III_3I_3I_3I_3I_5=
-COM_VtblCall__III_3I_3I_3I_3I_6=
-
-COM_VtblCall__IILorg_eclipse_swt_internal_ole_win32_CAUUID_2=
-COM_VtblCall__IILorg_eclipse_swt_internal_ole_win32_CAUUID_2_0=
-COM_VtblCall__IILorg_eclipse_swt_internal_ole_win32_CAUUID_2_1=
-COM_VtblCall__IILorg_eclipse_swt_internal_ole_win32_CAUUID_2_2=
-
-COM_VtblCall__IILorg_eclipse_swt_internal_ole_win32_CONTROLINFO_2=
-COM_VtblCall__IILorg_eclipse_swt_internal_ole_win32_CONTROLINFO_2_0=
-COM_VtblCall__IILorg_eclipse_swt_internal_ole_win32_CONTROLINFO_2_1=
-COM_VtblCall__IILorg_eclipse_swt_internal_ole_win32_CONTROLINFO_2_2=
-
-COM_VtblCall__IILorg_eclipse_swt_internal_ole_win32_FORMATETC_2=
-COM_VtblCall__IILorg_eclipse_swt_internal_ole_win32_FORMATETC_2_0=
-COM_VtblCall__IILorg_eclipse_swt_internal_ole_win32_FORMATETC_2_1=
-COM_VtblCall__IILorg_eclipse_swt_internal_ole_win32_FORMATETC_2_2=
-
-COM_VtblCall__IILorg_eclipse_swt_internal_ole_win32_FORMATETC_2Lorg_eclipse_swt_internal_ole_win32_STGMEDIUM_2=
-COM_VtblCall__IILorg_eclipse_swt_internal_ole_win32_FORMATETC_2Lorg_eclipse_swt_internal_ole_win32_STGMEDIUM_2_0=
-COM_VtblCall__IILorg_eclipse_swt_internal_ole_win32_FORMATETC_2Lorg_eclipse_swt_internal_ole_win32_STGMEDIUM_2_1=
-COM_VtblCall__IILorg_eclipse_swt_internal_ole_win32_FORMATETC_2Lorg_eclipse_swt_internal_ole_win32_STGMEDIUM_2_2=
-COM_VtblCall__IILorg_eclipse_swt_internal_ole_win32_FORMATETC_2Lorg_eclipse_swt_internal_ole_win32_STGMEDIUM_2_3=
-
-COM_VtblCall__IILorg_eclipse_swt_internal_ole_win32_FORMATETC_2Lorg_eclipse_swt_internal_ole_win32_STGMEDIUM_2Z=
-COM_VtblCall__IILorg_eclipse_swt_internal_ole_win32_FORMATETC_2Lorg_eclipse_swt_internal_ole_win32_STGMEDIUM_2Z_0=
-COM_VtblCall__IILorg_eclipse_swt_internal_ole_win32_FORMATETC_2Lorg_eclipse_swt_internal_ole_win32_STGMEDIUM_2Z_1=
-COM_VtblCall__IILorg_eclipse_swt_internal_ole_win32_FORMATETC_2Lorg_eclipse_swt_internal_ole_win32_STGMEDIUM_2Z_2=
-COM_VtblCall__IILorg_eclipse_swt_internal_ole_win32_FORMATETC_2Lorg_eclipse_swt_internal_ole_win32_STGMEDIUM_2Z_3=
-COM_VtblCall__IILorg_eclipse_swt_internal_ole_win32_FORMATETC_2Lorg_eclipse_swt_internal_ole_win32_STGMEDIUM_2Z_4=
-
-COM_VtblCall__IILorg_eclipse_swt_internal_ole_win32_GUID_2=
-COM_VtblCall__IILorg_eclipse_swt_internal_ole_win32_GUID_2_0=
-COM_VtblCall__IILorg_eclipse_swt_internal_ole_win32_GUID_2_1=
-COM_VtblCall__IILorg_eclipse_swt_internal_ole_win32_GUID_2_2=
-
-COM_VtblCall__IILorg_eclipse_swt_internal_ole_win32_GUID_2IIII=
-COM_VtblCall__IILorg_eclipse_swt_internal_ole_win32_GUID_2IIII_0=
-COM_VtblCall__IILorg_eclipse_swt_internal_ole_win32_GUID_2IIII_1=
-COM_VtblCall__IILorg_eclipse_swt_internal_ole_win32_GUID_2IIII_2=
-COM_VtblCall__IILorg_eclipse_swt_internal_ole_win32_GUID_2IIII_3=
-COM_VtblCall__IILorg_eclipse_swt_internal_ole_win32_GUID_2IIII_4=
-COM_VtblCall__IILorg_eclipse_swt_internal_ole_win32_GUID_2IIII_5=
-COM_VtblCall__IILorg_eclipse_swt_internal_ole_win32_GUID_2IIII_6=
-
-COM_VtblCall__IILorg_eclipse_swt_internal_ole_win32_GUID_2III_3I=
-COM_VtblCall__IILorg_eclipse_swt_internal_ole_win32_GUID_2III_3I_0=
-COM_VtblCall__IILorg_eclipse_swt_internal_ole_win32_GUID_2III_3I_1=
-COM_VtblCall__IILorg_eclipse_swt_internal_ole_win32_GUID_2III_3I_2=
-COM_VtblCall__IILorg_eclipse_swt_internal_ole_win32_GUID_2III_3I_3=
-COM_VtblCall__IILorg_eclipse_swt_internal_ole_win32_GUID_2III_3I_4=
-COM_VtblCall__IILorg_eclipse_swt_internal_ole_win32_GUID_2III_3I_5=
-COM_VtblCall__IILorg_eclipse_swt_internal_ole_win32_GUID_2III_3I_6=
-
-COM_VtblCall__IILorg_eclipse_swt_internal_ole_win32_GUID_2ILorg_eclipse_swt_internal_ole_win32_OLECMD_2Lorg_eclipse_swt_internal_ole_win32_OLECMDTEXT_2=
-COM_VtblCall__IILorg_eclipse_swt_internal_ole_win32_GUID_2ILorg_eclipse_swt_internal_ole_win32_OLECMD_2Lorg_eclipse_swt_internal_ole_win32_OLECMDTEXT_2_0=
-COM_VtblCall__IILorg_eclipse_swt_internal_ole_win32_GUID_2ILorg_eclipse_swt_internal_ole_win32_OLECMD_2Lorg_eclipse_swt_internal_ole_win32_OLECMDTEXT_2_1=
-COM_VtblCall__IILorg_eclipse_swt_internal_ole_win32_GUID_2ILorg_eclipse_swt_internal_ole_win32_OLECMD_2Lorg_eclipse_swt_internal_ole_win32_OLECMDTEXT_2_2=
-COM_VtblCall__IILorg_eclipse_swt_internal_ole_win32_GUID_2ILorg_eclipse_swt_internal_ole_win32_OLECMD_2Lorg_eclipse_swt_internal_ole_win32_OLECMDTEXT_2_3=
-COM_VtblCall__IILorg_eclipse_swt_internal_ole_win32_GUID_2ILorg_eclipse_swt_internal_ole_win32_OLECMD_2Lorg_eclipse_swt_internal_ole_win32_OLECMDTEXT_2_4=
-COM_VtblCall__IILorg_eclipse_swt_internal_ole_win32_GUID_2ILorg_eclipse_swt_internal_ole_win32_OLECMD_2Lorg_eclipse_swt_internal_ole_win32_OLECMDTEXT_2_5=
-
-COM_VtblCall__IILorg_eclipse_swt_internal_ole_win32_GUID_2_3I=
-COM_VtblCall__IILorg_eclipse_swt_internal_ole_win32_GUID_2_3I_0=
-COM_VtblCall__IILorg_eclipse_swt_internal_ole_win32_GUID_2_3I_1=
-COM_VtblCall__IILorg_eclipse_swt_internal_ole_win32_GUID_2_3I_2=
-COM_VtblCall__IILorg_eclipse_swt_internal_ole_win32_GUID_2_3I_3=
-
-COM_VtblCall__IILorg_eclipse_swt_internal_ole_win32_LICINFO_2=
-COM_VtblCall__IILorg_eclipse_swt_internal_ole_win32_LICINFO_2_0=
-COM_VtblCall__IILorg_eclipse_swt_internal_ole_win32_LICINFO_2_1=
-COM_VtblCall__IILorg_eclipse_swt_internal_ole_win32_LICINFO_2_2=
-
-COM_VtblCall__IILorg_eclipse_swt_internal_win32_MSG_2=
-COM_VtblCall__IILorg_eclipse_swt_internal_win32_MSG_2_0=
-COM_VtblCall__IILorg_eclipse_swt_internal_win32_MSG_2_1=
-COM_VtblCall__IILorg_eclipse_swt_internal_win32_MSG_2_2=
-
-COM_VtblCall__IILorg_eclipse_swt_internal_win32_RECT_2=
-COM_VtblCall__IILorg_eclipse_swt_internal_win32_RECT_2_0=
-COM_VtblCall__IILorg_eclipse_swt_internal_win32_RECT_2_1=
-COM_VtblCall__IILorg_eclipse_swt_internal_win32_RECT_2_2=
-
-COM_VtblCall__IILorg_eclipse_swt_internal_win32_RECT_2IZ=
-COM_VtblCall__IILorg_eclipse_swt_internal_win32_RECT_2IZ_0=
-COM_VtblCall__IILorg_eclipse_swt_internal_win32_RECT_2IZ_1=
-COM_VtblCall__IILorg_eclipse_swt_internal_win32_RECT_2IZ_2=
-COM_VtblCall__IILorg_eclipse_swt_internal_win32_RECT_2IZ_3=
-COM_VtblCall__IILorg_eclipse_swt_internal_win32_RECT_2IZ_4=
-
-COM_VtblCall__IILorg_eclipse_swt_internal_win32_RECT_2Lorg_eclipse_swt_internal_win32_RECT_2=
-COM_VtblCall__IILorg_eclipse_swt_internal_win32_RECT_2Lorg_eclipse_swt_internal_win32_RECT_2_0=
-COM_VtblCall__IILorg_eclipse_swt_internal_win32_RECT_2Lorg_eclipse_swt_internal_win32_RECT_2_1=
-COM_VtblCall__IILorg_eclipse_swt_internal_win32_RECT_2Lorg_eclipse_swt_internal_win32_RECT_2_2=
-COM_VtblCall__IILorg_eclipse_swt_internal_win32_RECT_2Lorg_eclipse_swt_internal_win32_RECT_2_3=
-
-COM_VtblCall__II_3C=
-COM_VtblCall__II_3C_0=
-COM_VtblCall__II_3C_1=
-COM_VtblCall__II_3C_2=
-
-COM_VtblCall__II_3CI=
-COM_VtblCall__II_3CI_0=
-COM_VtblCall__II_3CI_1=
-COM_VtblCall__II_3CI_2=
-COM_VtblCall__II_3CI_3=
-
-COM_VtblCall__II_3CIIII_3I=
-COM_VtblCall__II_3CIIII_3I_0=
-COM_VtblCall__II_3CIIII_3I_1=
-COM_VtblCall__II_3CIIII_3I_2=
-COM_VtblCall__II_3CIIII_3I_3=
-COM_VtblCall__II_3CIIII_3I_4=
-COM_VtblCall__II_3CIIII_3I_5=
-COM_VtblCall__II_3CIIII_3I_6=
-COM_VtblCall__II_3CIIII_3I_7=
-
-COM_VtblCall__II_3CIII_3I=
-COM_VtblCall__II_3CIII_3I_0=
-COM_VtblCall__II_3CIII_3I_1=
-COM_VtblCall__II_3CIII_3I_2=
-COM_VtblCall__II_3CIII_3I_3=
-COM_VtblCall__II_3CIII_3I_4=
-COM_VtblCall__II_3CIII_3I_5=
-COM_VtblCall__II_3CIII_3I_6=
-
-COM_VtblCall__II_3C_3C=
-COM_VtblCall__II_3C_3C_0=
-COM_VtblCall__II_3C_3C_1=
-COM_VtblCall__II_3C_3C_2=
-COM_VtblCall__II_3C_3C_3=
-
-COM_VtblCall__II_3I=
-COM_VtblCall__II_3I_0=
-COM_VtblCall__II_3I_1=
-COM_VtblCall__II_3I_2=
-
-COM_WriteClassStg=
-COM_WriteClassStg_0=cast=(IStorage *)
-COM_WriteClassStg_1=
-
-
-org_eclipse_swt_internal_ole_win32_COMObject=flags=no_gen
-
-org_eclipse_swt_internal_ole_win32_CONTROLINFO=
-CONTROLINFO_cb=
-CONTROLINFO_hAccel=cast=(HACCEL)
-CONTROLINFO_cAccel=
-CONTROLINFO_dwFlags=
-
-org_eclipse_swt_internal_ole_win32_COSERVERINFO=
-COSERVERINFO_dwReserved1=
-COSERVERINFO_pwszName=cast=(LPWSTR)
-COSERVERINFO_pAuthInfo=cast=(COAUTHINFO *)
-COSERVERINFO_dwReserved2=
-
-org_eclipse_swt_internal_ole_win32_DISPPARAMS=
-DISPPARAMS_rgvarg=cast=(VARIANTARG FAR *)
-DISPPARAMS_rgdispidNamedArgs=cast=(DISPID FAR *)
-DISPPARAMS_cArgs=
-DISPPARAMS_cNamedArgs=
-
-org_eclipse_swt_internal_ole_win32_DVTARGETDEVICE=
-DVTARGETDEVICE_tdSize=
-DVTARGETDEVICE_tdDriverNameOffset=
-DVTARGETDEVICE_tdDeviceNameOffset=
-DVTARGETDEVICE_tdPortNameOffset=
-DVTARGETDEVICE_tdExtDevmodeOffset=
-DVTARGETDEVICE_tdData=accessor=tdData[0]
-
-org_eclipse_swt_internal_ole_win32_EXCEPINFO=
-EXCEPINFO_wCode=
-EXCEPINFO_wReserved=
-EXCEPINFO_bstrSource=cast=(BSTR)
-EXCEPINFO_bstrDescription=cast=(BSTR)
-EXCEPINFO_bstrHelpFile=cast=(BSTR)
-EXCEPINFO_dwHelpContext=
-EXCEPINFO_pvReserved=cast=(void FAR *)
-EXCEPINFO_pfnDeferredFillIn=cast=(HRESULT (STDAPICALLTYPE FAR* )(struct tagEXCEPINFO FAR*))
-EXCEPINFO_scode=
-
-org_eclipse_swt_internal_ole_win32_FORMATETC=
-FORMATETC_cfFormat=cast=(CLIPFORMAT)
-FORMATETC_ptd=cast=(DVTARGETDEVICE *)
-FORMATETC_dwAspect=
-FORMATETC_lindex=
-FORMATETC_tymed=
-
-org_eclipse_swt_internal_ole_win32_FUNCDESC=
-FUNCDESC_memid=cast=MEMBERID
-FUNCDESC_lprgscode=cast=SCODE FAR *
-FUNCDESC_lprgelemdescParam=cast=ELEMDESC FAR *
-FUNCDESC_funckind=cast=FUNCKIND
-FUNCDESC_invkind=cast=INVOKEKIND
-FUNCDESC_callconv=cast=CALLCONV
-FUNCDESC_cParams=
-FUNCDESC_cParamsOpt=
-FUNCDESC_oVft=
-FUNCDESC_cScodes=
-FUNCDESC_elemdescFunc_tdesc_union=accessor=elemdescFunc.tdesc.lptdesc,cast=(struct FARSTRUCT tagTYPEDESC FAR* )
-FUNCDESC_elemdescFunc_tdesc_vt=accessor=elemdescFunc.tdesc.vt
-FUNCDESC_elemdescFunc_paramdesc_pparamdescex=accessor=elemdescFunc.paramdesc.pparamdescex,cast=(LPPARAMDESCEX)
-FUNCDESC_elemdescFunc_paramdesc_wParamFlags=accessor=elemdescFunc.paramdesc.wParamFlags
-FUNCDESC_wFuncFlags=
-
-org_eclipse_swt_internal_ole_win32_GUID=
-GUID_Data1=
-GUID_Data2=
-GUID_Data3=
-GUID_Data4=
-
-org_eclipse_swt_internal_ole_win32_IAccessible=flags=no_gen
-
-org_eclipse_swt_internal_ole_win32_IClassFactory2=flags=no_gen
-
-org_eclipse_swt_internal_ole_win32_IConnectionPoint=flags=no_gen
-
-org_eclipse_swt_internal_ole_win32_IConnectionPointContainer=flags=no_gen
-
-org_eclipse_swt_internal_ole_win32_IDataObject=flags=no_gen
-
-org_eclipse_swt_internal_ole_win32_IDispatch=flags=no_gen
-
-org_eclipse_swt_internal_ole_win32_IEnum=flags=no_gen
-
-org_eclipse_swt_internal_ole_win32_IEnumFORMATETC=flags=no_gen
-
-org_eclipse_swt_internal_ole_win32_IEnumSTATSTG=flags=no_gen
-
-org_eclipse_swt_internal_ole_win32_IEnumVARIANT=flags=no_gen
-
-org_eclipse_swt_internal_ole_win32_IFont=flags=no_gen
-
-org_eclipse_swt_internal_ole_win32_IMoniker=flags=no_gen
-
-org_eclipse_swt_internal_ole_win32_IOleCommandTarget=flags=no_gen
-
-org_eclipse_swt_internal_ole_win32_IOleControl=flags=no_gen
-
-org_eclipse_swt_internal_ole_win32_IOleDocument=flags=no_gen
-
-org_eclipse_swt_internal_ole_win32_IOleDocumentView=flags=no_gen
-
-org_eclipse_swt_internal_ole_win32_IOleInPlaceActiveObject=flags=no_gen
-
-org_eclipse_swt_internal_ole_win32_IOleInPlaceObject=flags=no_gen
-
-org_eclipse_swt_internal_ole_win32_IOleLink=flags=no_gen
-
-org_eclipse_swt_internal_ole_win32_IOleObject=flags=no_gen
-
-org_eclipse_swt_internal_ole_win32_IOleWindow=flags=no_gen
-
-org_eclipse_swt_internal_ole_win32_IPersist=flags=no_gen
-
-org_eclipse_swt_internal_ole_win32_IPersistStorage=flags=no_gen
-
-org_eclipse_swt_internal_ole_win32_IPersistStreamInit=flags=no_gen
-
-org_eclipse_swt_internal_ole_win32_IProvideClassInfo=flags=no_gen
-
-org_eclipse_swt_internal_ole_win32_IProvideClassInfo2=flags=no_gen
-
-org_eclipse_swt_internal_ole_win32_ISpecifyPropertyPages=flags=no_gen
-
-org_eclipse_swt_internal_ole_win32_IStorage=flags=no_gen
-
-org_eclipse_swt_internal_ole_win32_IStream=flags=no_gen
-
-org_eclipse_swt_internal_ole_win32_ITypeInfo=flags=no_gen
-
-org_eclipse_swt_internal_ole_win32_IUnknown=flags=no_gen
-
-org_eclipse_swt_internal_ole_win32_IViewObject2=flags=no_gen
-
-org_eclipse_swt_internal_ole_win32_LICINFO=
-LICINFO_cbLicInfo=
-LICINFO_fRuntimeKeyAvail=
-LICINFO_fLicVerified=
-
-org_eclipse_swt_internal_ole_win32_OLECMD=
-OLECMD_cmdID=
-OLECMD_cmdf=
-
-org_eclipse_swt_internal_ole_win32_OLECMDTEXT=
-OLECMDTEXT_cmdtextf=
-OLECMDTEXT_cwActual=
-OLECMDTEXT_cwBuf=
-OLECMDTEXT_rgwz=accessor=rgwz[0]
-
-org_eclipse_swt_internal_ole_win32_OLEINPLACEFRAMEINFO=
-OLEINPLACEFRAMEINFO_cb=
-OLEINPLACEFRAMEINFO_fMDIApp=
-OLEINPLACEFRAMEINFO_hwndFrame=cast=(HWND)
-OLEINPLACEFRAMEINFO_haccel=cast=(HACCEL)
-OLEINPLACEFRAMEINFO_cAccelEntries=
-
-org_eclipse_swt_internal_ole_win32_STATSTG=
-STATSTG_pwcsName=cast=(LPWSTR)
-STATSTG_type=
-STATSTG_cbSize=accessor=cbSize.QuadPart
-STATSTG_mtime_dwLowDateTime=accessor=mtime.dwLowDateTime
-STATSTG_mtime_dwHighDateTime=accessor=mtime.dwHighDateTime
-STATSTG_ctime_dwLowDateTime=accessor=ctime.dwLowDateTime
-STATSTG_ctime_dwHighDateTime=accessor=ctime.dwHighDateTime
-STATSTG_atime_dwLowDateTime=accessor=atime.dwLowDateTime
-STATSTG_atime_dwHighDateTime=accessor=atime.dwHighDateTime
-STATSTG_grfMode=
-STATSTG_grfLocksSupported=
-STATSTG_clsid_Data1=accessor=clsid.Data1
-STATSTG_clsid_Data2=accessor=clsid.Data2
-STATSTG_clsid_Data3=accessor=clsid.Data3
-STATSTG_clsid_Data4=accessor=clsid.Data4
-STATSTG_grfStateBits=
-STATSTG_reserved=
-
-org_eclipse_swt_internal_ole_win32_STGMEDIUM=
-STGMEDIUM_tymed=
-STGMEDIUM_unionField=accessor=hGlobal,cast=(HGLOBAL)
-STGMEDIUM_pUnkForRelease=cast=(IUnknown *)
-
-org_eclipse_swt_internal_ole_win32_TYPEATTR=
-TYPEATTR_guid_Data1=accessor=guid.Data1
-TYPEATTR_guid_Data2=accessor=guid.Data2
-TYPEATTR_guid_Data3=accessor=guid.Data3
-TYPEATTR_guid_Data4=accessor=guid.Data4
-TYPEATTR_lcid=
-TYPEATTR_dwReserved=
-TYPEATTR_memidConstructor=
-TYPEATTR_memidDestructor=
-TYPEATTR_lpstrSchema=cast=(OLECHAR FAR *)
-TYPEATTR_cbSizeInstance=
-TYPEATTR_typekind=
-TYPEATTR_cFuncs=
-TYPEATTR_cVars=
-TYPEATTR_cImplTypes=
-TYPEATTR_cbSizeVft=
-TYPEATTR_cbAlignment=
-TYPEATTR_wTypeFlags=
-TYPEATTR_wMajorVerNum=
-TYPEATTR_wMinorVerNum=
-TYPEATTR_tdescAlias_unionField=accessor=tdescAlias.lptdesc,cast=(struct FARSTRUCT tagTYPEDESC FAR *)
-TYPEATTR_tdescAlias_vt=accessor=tdescAlias.vt
-TYPEATTR_idldescType_dwReserved=accessor=idldescType.dwReserved
-TYPEATTR_idldescType_wIDLFlags=accessor=idldescType.wIDLFlags
-
-org_eclipse_swt_internal_ole_win32_VARDESC=
-VARDESC_memid=
-VARDESC_lpstrSchema=cast=(OLECHAR FAR *)
-VARDESC_oInst=
-VARDESC_elemdescVar_tdesc_union=accessor=elemdescVar.tdesc.lptdesc,cast=(struct FARSTRUCT tagTYPEDESC FAR *)
-VARDESC_elemdescVar_tdesc_vt=accessor=elemdescVar.tdesc.vt
-VARDESC_elemdescVar_paramdesc_pparamdescex=accessor=elemdescVar.paramdesc.pparamdescex,cast=(LPPARAMDESCEX)
-VARDESC_elemdescVar_paramdesc_wParamFlags=accessor=elemdescVar.paramdesc.wParamFlags
-VARDESC_wVarFlags=
-VARDESC_varkind=
-
diff --git a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.photon.OS.properties b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.photon.OS.properties
deleted file mode 100644
index a661c4d0ee..0000000000
--- a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.photon.OS.properties
+++ /dev/null
@@ -1,1533 +0,0 @@
-###############################################################################
-# Copyright (c) 2004 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Common Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/cpl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-org_eclipse_swt_internal_photon_FontDetails=
-FontDetails_desc=cast=(FontDescription)
-FontDetails_stem=cast=(FontName)
-FontDetails_losize=
-FontDetails_hisize=
-FontDetails_flags=
-
-org_eclipse_swt_internal_photon_FontQueryInfo=
-FontQueryInfo_font=cast=(FontName)
-FontQueryInfo_desc=cast=(FontDescription)
-FontQueryInfo_size=
-FontQueryInfo_style=
-FontQueryInfo_ascender=
-FontQueryInfo_descender=
-FontQueryInfo_width=
-FontQueryInfo_lochar=
-FontQueryInfo_hichar=
-
-org_eclipse_swt_internal_photon_OS=
-OS_PfDecomposeStemToID=
-OS_PfDecomposeStemToID_0=
-
-OS_PfExtentText__Lorg_eclipse_swt_internal_photon_PhRect_1t_2Lorg_eclipse_swt_internal_photon_PhPoint_1t_2III=
-OS_PfExtentText__Lorg_eclipse_swt_internal_photon_PhRect_1t_2Lorg_eclipse_swt_internal_photon_PhPoint_1t_2III_0=
-OS_PfExtentText__Lorg_eclipse_swt_internal_photon_PhRect_1t_2Lorg_eclipse_swt_internal_photon_PhPoint_1t_2III_1=
-OS_PfExtentText__Lorg_eclipse_swt_internal_photon_PhRect_1t_2Lorg_eclipse_swt_internal_photon_PhPoint_1t_2III_2=cast=(const char *)
-OS_PfExtentText__Lorg_eclipse_swt_internal_photon_PhRect_1t_2Lorg_eclipse_swt_internal_photon_PhPoint_1t_2III_3=cast=(const char *)
-OS_PfExtentText__Lorg_eclipse_swt_internal_photon_PhRect_1t_2Lorg_eclipse_swt_internal_photon_PhPoint_1t_2III_4=
-
-OS_PfExtentText__Lorg_eclipse_swt_internal_photon_PhRect_1t_2Lorg_eclipse_swt_internal_photon_PhPoint_1t_2_3B_3BI=
-OS_PfExtentText__Lorg_eclipse_swt_internal_photon_PhRect_1t_2Lorg_eclipse_swt_internal_photon_PhPoint_1t_2_3B_3BI_0=
-OS_PfExtentText__Lorg_eclipse_swt_internal_photon_PhRect_1t_2Lorg_eclipse_swt_internal_photon_PhPoint_1t_2_3B_3BI_1=
-OS_PfExtentText__Lorg_eclipse_swt_internal_photon_PhRect_1t_2Lorg_eclipse_swt_internal_photon_PhPoint_1t_2_3B_3BI_2=cast=(const char *)
-OS_PfExtentText__Lorg_eclipse_swt_internal_photon_PhRect_1t_2Lorg_eclipse_swt_internal_photon_PhPoint_1t_2_3B_3BI_3=cast=(const char *)
-OS_PfExtentText__Lorg_eclipse_swt_internal_photon_PhRect_1t_2Lorg_eclipse_swt_internal_photon_PhPoint_1t_2_3B_3BI_4=
-
-OS_PfExtentWideText=
-OS_PfExtentWideText_0=
-OS_PfExtentWideText_1=
-OS_PfExtentWideText_2=cast=(const char *)
-OS_PfExtentWideText_3=cast=(const uint16_t *)
-OS_PfExtentWideText_4=
-
-OS_PfFontDescription=
-OS_PfFontDescription_0=cast=(FontID *)
-
-OS_PfFontFlags=
-OS_PfFontFlags_0=cast=(FontID *)
-
-OS_PfFontSize=
-OS_PfFontSize_0=cast=(FontID *)
-
-OS_PfFreeFont=
-OS_PfFreeFont_0=cast=(FontID *)
-
-OS_PfGenerateFontName=
-OS_PfGenerateFontName_0=cast=(char const *)
-OS_PfGenerateFontName_1=
-OS_PfGenerateFontName_2=
-OS_PfGenerateFontName_3=cast=(char *)
-
-OS_PfLoadMetrics=
-OS_PfLoadMetrics_0=cast=(const char *)
-
-OS_PfQueryFontInfo=
-OS_PfQueryFontInfo_0=cast=(const char *)
-OS_PfQueryFontInfo_1=cast=(FontQueryInfo *)
-
-OS_PfQueryFonts=
-OS_PfQueryFonts_0=
-OS_PfQueryFonts_1=
-OS_PfQueryFonts_2=cast=(FontDetails *)
-OS_PfQueryFonts_3=
-
-OS_PgAlphaOff=
-
-OS_PgAlphaOn=
-
-OS_PgCreateGC=
-OS_PgCreateGC_0=
-
-OS_PgDestroyGC=
-OS_PgDestroyGC_0=cast=(PhGC_t *)
-
-OS_PgDrawArc=
-OS_PgDrawArc_0=
-OS_PgDrawArc_1=
-OS_PgDrawArc_2=
-OS_PgDrawArc_3=
-OS_PgDrawArc_4=
-
-OS_PgDrawArrow=
-OS_PgDrawArrow_0=
-OS_PgDrawArrow_1=
-OS_PgDrawArrow_2=cast=(PgColor_t)
-OS_PgDrawArrow_3=
-
-OS_PgDrawBitmap=
-OS_PgDrawBitmap_0=cast=(void const *)
-OS_PgDrawBitmap_1=cast=(int)
-OS_PgDrawBitmap_2=cast=(PhPoint_t *)
-OS_PgDrawBitmap_3=cast=(PhPoint_t *)
-OS_PgDrawBitmap_4=cast=(int)
-OS_PgDrawBitmap_5=cast=(long)
-
-OS_PgDrawEllipse=
-OS_PgDrawEllipse_0=
-OS_PgDrawEllipse_1=
-OS_PgDrawEllipse_2=
-
-OS_PgDrawGradient=
-OS_PgDrawGradient_0=
-OS_PgDrawGradient_1=
-OS_PgDrawGradient_2=
-OS_PgDrawGradient_3=
-OS_PgDrawGradient_4=
-OS_PgDrawGradient_5=cast=(PgColor_t)
-OS_PgDrawGradient_6=cast=(PgColor_t)
-OS_PgDrawGradient_7=cast=(PgColor_t)
-OS_PgDrawGradient_8=cast=(PgColor_t)
-OS_PgDrawGradient_9=
-OS_PgDrawGradient_10=cast=(unsigned char *)
-
-OS_PgDrawILine=
-OS_PgDrawILine_0=
-OS_PgDrawILine_1=
-OS_PgDrawILine_2=
-OS_PgDrawILine_3=
-
-OS_PgDrawIPixel=
-OS_PgDrawIPixel_0=
-OS_PgDrawIPixel_1=
-
-OS_PgDrawIRect=
-OS_PgDrawIRect_0=
-OS_PgDrawIRect_1=
-OS_PgDrawIRect_2=
-OS_PgDrawIRect_3=
-OS_PgDrawIRect_4=
-
-OS_PgDrawImage=
-OS_PgDrawImage_0=cast=(void const *)
-OS_PgDrawImage_1=
-OS_PgDrawImage_2=
-OS_PgDrawImage_3=
-OS_PgDrawImage_4=
-OS_PgDrawImage_5=
-
-OS_PgDrawMultiTextArea=
-OS_PgDrawMultiTextArea_0=cast=(char *)
-OS_PgDrawMultiTextArea_1=
-OS_PgDrawMultiTextArea_2=
-OS_PgDrawMultiTextArea_3=
-OS_PgDrawMultiTextArea_4=
-OS_PgDrawMultiTextArea_5=
-
-OS_PgDrawPhImageRectmx=
-OS_PgDrawPhImageRectmx_0=
-OS_PgDrawPhImageRectmx_1=cast=(PhImage_t const *)
-OS_PgDrawPhImageRectmx_2=
-OS_PgDrawPhImageRectmx_3=
-
-OS_PgDrawPolygon=
-OS_PgDrawPolygon_0=cast=(PhPoint_t const *)
-OS_PgDrawPolygon_1=
-OS_PgDrawPolygon_2=cast=(PhPoint_t const *)
-OS_PgDrawPolygon_3=
-
-OS_PgDrawRoundRect=
-OS_PgDrawRoundRect_0=cast=(PhRect_t const *)
-OS_PgDrawRoundRect_1=cast=(PhPoint_t const *)
-OS_PgDrawRoundRect_2=
-
-OS_PgDrawTImage=
-OS_PgDrawTImage_0=cast=(void const *)
-OS_PgDrawTImage_1=
-OS_PgDrawTImage_2=cast=(PhPoint_t const *)
-OS_PgDrawTImage_3=cast=(PhDim_t const *)
-OS_PgDrawTImage_4=
-OS_PgDrawTImage_5=
-OS_PgDrawTImage_6=cast=(void const *)
-OS_PgDrawTImage_7=
-
-OS_PgDrawText=
-OS_PgDrawText_0=cast=(char const *)
-OS_PgDrawText_1=
-OS_PgDrawText_2=cast=(PhPoint_t *)
-OS_PgDrawText_3=
-
-OS_PgExtentMultiText=
-OS_PgExtentMultiText_0=cast=(PhRect_t *)
-OS_PgExtentMultiText_1=cast=(PhPoint_t *)
-OS_PgExtentMultiText_2=cast=(char *)
-OS_PgExtentMultiText_3=cast=(char *)
-OS_PgExtentMultiText_4=
-OS_PgExtentMultiText_5=
-
-OS_PgFlush=
-
-OS_PgGetVideoMode=
-OS_PgGetVideoMode_0=cast=(PgDisplaySettings_t *),flags=init
-
-OS_PgGetVideoModeInfo=
-OS_PgGetVideoModeInfo_0=
-OS_PgGetVideoModeInfo_1=cast=(PgVideoModeInfo_t *)
-
-OS_PgReadScreen=
-OS_PgReadScreen_0=cast=(PhRect_t *)
-OS_PgReadScreen_1=cast=(void *)
-
-OS_PgReadScreenSize=
-OS_PgReadScreenSize_0=cast=(PhRect_t *)
-
-OS_PgSetAlpha=
-OS_PgSetAlpha_0=
-OS_PgSetAlpha_1=cast=(PgMap_t const *)
-OS_PgSetAlpha_2=cast=(PgGradient_t const *)
-OS_PgSetAlpha_3=
-OS_PgSetAlpha_4=
-
-OS_PgSetClipping=
-OS_PgSetClipping_0=
-OS_PgSetClipping_1=cast=(PhRect_t const *)
-
-OS_PgSetDrawBufferSize=
-OS_PgSetDrawBufferSize_0=
-
-OS_PgSetDrawMode=
-OS_PgSetDrawMode_0=
-
-OS_PgSetFillColor=
-OS_PgSetFillColor_0=cast=(PgColor_t)
-
-OS_PgSetFillTransPat=
-OS_PgSetFillTransPat_0=cast=(PgPattern_t)
-
-OS_PgSetFont=
-OS_PgSetFont_0=cast=(char const *)
-
-OS_PgSetGC=
-OS_PgSetGC_0=cast=(PhGC_t *)
-
-OS_PgSetMultiClip=
-OS_PgSetMultiClip_0=
-OS_PgSetMultiClip_1=cast=(PhRect_t const *)
-
-OS_PgSetPalette=
-OS_PgSetPalette_0=cast=(PgColor_t const *)
-OS_PgSetPalette_1=
-OS_PgSetPalette_2=
-OS_PgSetPalette_3=
-OS_PgSetPalette_4=
-OS_PgSetPalette_5=
-
-OS_PgSetRegion=
-OS_PgSetRegion_0=cast=(PhRid_t)
-
-OS_PgSetStrokeCap=
-OS_PgSetStrokeCap_0=
-
-OS_PgSetStrokeColor=
-OS_PgSetStrokeColor_0=cast=(PgColor_t)
-
-OS_PgSetStrokeDash=
-OS_PgSetStrokeDash_0=cast=(unsigned char const *)
-OS_PgSetStrokeDash_1=
-OS_PgSetStrokeDash_2=
-
-OS_PgSetStrokeWidth=
-OS_PgSetStrokeWidth_0=
-
-OS_PgSetTextColor=
-OS_PgSetTextColor_0=cast=(PgColor_t)
-
-OS_PgSetTextXORColor=
-OS_PgSetTextXORColor_0=cast=(PgColor_t)
-OS_PgSetTextXORColor_1=cast=(PgColor_t)
-
-OS_PgSetUserClip=
-OS_PgSetUserClip_0=cast=(PhRect_t const *)
-
-OS_PgShmemCreate=
-OS_PgShmemCreate_0=
-OS_PgShmemCreate_1=cast=(char const *)
-
-OS_PgShmemDestroy=
-OS_PgShmemDestroy_0=cast=(void *)
-
-OS_PhAddMergeTiles=
-OS_PhAddMergeTiles_0=cast=(PhTile_t *)
-OS_PhAddMergeTiles_1=cast=(PhTile_t *)
-OS_PhAddMergeTiles_2=cast=(int *)
-
-OS_PhAreaToRect=
-OS_PhAreaToRect_0=cast=(PhArea_t const *)
-OS_PhAreaToRect_1=cast=(PhRect_t *)
-
-OS_PhBlit=
-OS_PhBlit_0=cast=(PhRid_t)
-OS_PhBlit_1=cast=(const PhRect_t *)
-OS_PhBlit_2=cast=(const PhPoint_t *)
-
-OS_PhClipTilings=
-OS_PhClipTilings_0=cast=(PhTile_t *)
-OS_PhClipTilings_1=cast=(PhTile_t *)
-OS_PhClipTilings_2=cast=(PhTile_t **)
-
-OS_PhClipboardCopy=
-OS_PhClipboardCopy_0=
-OS_PhClipboardCopy_1=
-OS_PhClipboardCopy_2=cast=(PhClipHeader const *)
-
-OS_PhClipboardCopyString=
-OS_PhClipboardCopyString_0=
-OS_PhClipboardCopyString_1=cast=(const char *)
-
-OS_PhClipboardPasteFinish=
-OS_PhClipboardPasteFinish_0=cast=(void *)
-
-OS_PhClipboardPasteStart=
-OS_PhClipboardPasteStart_0=
-
-OS_PhClipboardPasteString=
-OS_PhClipboardPasteString_0=
-
-OS_PhClipboardPasteType=
-OS_PhClipboardPasteType_0=cast=(void *)
-OS_PhClipboardPasteType_1=
-
-OS_PhClipboardPasteTypeN=
-OS_PhClipboardPasteTypeN_0=cast=(void *)
-OS_PhClipboardPasteTypeN_1=
-
-OS_PhCoalesceTiles=
-OS_PhCoalesceTiles_0=cast=(PhTile_t *)
-
-OS_PhCopyTiles=
-OS_PhCopyTiles_0=cast=(PhTile_t *)
-
-OS_PhCreateImage=
-OS_PhCreateImage_0=cast=(PhImage_t *)
-OS_PhCreateImage_1=
-OS_PhCreateImage_2=
-OS_PhCreateImage_3=
-OS_PhCreateImage_4=cast=(PgColor_t const *)
-OS_PhCreateImage_5=
-OS_PhCreateImage_6=
-
-OS_PhDCSetCurrent=
-OS_PhDCSetCurrent_0=cast=(void *)
-
-OS_PhDeTranslateTiles=
-OS_PhDeTranslateTiles_0=cast=(PhTile_t *)
-OS_PhDeTranslateTiles_1=cast=(PhPoint_t const *)
-
-OS_PhEventNext=
-OS_PhEventNext_0=cast=(void *)
-OS_PhEventNext_1=
-
-OS_PhEventPeek=
-OS_PhEventPeek_0=cast=(void *)
-OS_PhEventPeek_1=
-
-OS_PhFreeTiles=
-OS_PhFreeTiles_0=cast=(PhTile_t *)
-
-OS_PhGetData=
-OS_PhGetData_0=cast=(PhEvent_t *)
-
-OS_PhGetMsgSize=
-OS_PhGetMsgSize_0=cast=(PhEvent_t const *)
-
-OS_PhGetRects=
-OS_PhGetRects_0=cast=(PhEvent_t *)
-
-OS_PhGetTile=flags=no_gen
-
-OS_PhInitDrag=
-OS_PhInitDrag_0=cast=(PhRid_t)
-OS_PhInitDrag_1=
-OS_PhInitDrag_2=cast=(const PhRect_t *)
-OS_PhInitDrag_3=cast=(const PhRect_t *)
-OS_PhInitDrag_4=
-OS_PhInitDrag_5=cast=(PhDim_t *)
-OS_PhInitDrag_6=cast=(PhDim_t *)
-OS_PhInitDrag_7=cast=(PhDim_t *)
-OS_PhInitDrag_8=cast=(PhPoint_t *)
-OS_PhInitDrag_9=cast=(PhCursorDescription_t *)
-
-OS_PhInputGroup=
-OS_PhInputGroup_0=cast=(PhEvent_t *)
-
-OS_PhIntersectTilings=
-OS_PhIntersectTilings_0=cast=(PhTile_t const *)
-OS_PhIntersectTilings_1=cast=(PhTile_t const *)
-OS_PhIntersectTilings_2=
-
-OS_PhKeyToMb=
-OS_PhKeyToMb_0=cast=char *
-OS_PhKeyToMb_1=
-
-OS_PhMakeGhostBitmap=
-OS_PhMakeGhostBitmap_0=cast=(PhImage_t *)
-
-OS_PhMakeTransBitmap=
-OS_PhMakeTransBitmap_0=cast=(PhImage_t *)
-OS_PhMakeTransBitmap_1=cast=(PgColor_t)
-
-OS_PhMergeTiles=
-OS_PhMergeTiles_0=cast=(PhTile_t *)
-
-OS_PhMoveCursorAbs=
-OS_PhMoveCursorAbs_0=
-OS_PhMoveCursorAbs_1=
-OS_PhMoveCursorAbs_2=
-
-OS_PhQueryCursor=
-OS_PhQueryCursor_0=
-OS_PhQueryCursor_1=cast=(PhCursorInfo_t *)
-
-OS_PhQueryRids=
-OS_PhQueryRids_0=
-OS_PhQueryRids_1=cast=(PhRid_t)
-OS_PhQueryRids_2=
-OS_PhQueryRids_3=
-OS_PhQueryRids_4=
-OS_PhQueryRids_5=cast=(PhRid_t)
-OS_PhQueryRids_6=cast=(const PhRect_t *)
-OS_PhQueryRids_7=cast=(PhRid_t *)
-OS_PhQueryRids_8=
-
-OS_PhRectIntersect=
-OS_PhRectIntersect_0=cast=(PhRect_t *)
-OS_PhRectIntersect_1=cast=(PhRect_t const *)
-
-OS_PhRectUnion__II=
-OS_PhRectUnion__II_0=cast=(PhRect_t *)
-OS_PhRectUnion__II_1=cast=(PhRect_t const *)
-
-OS_PhRectUnion__Lorg_eclipse_swt_internal_photon_PhRect_1t_2Lorg_eclipse_swt_internal_photon_PhRect_1t_2=
-OS_PhRectUnion__Lorg_eclipse_swt_internal_photon_PhRect_1t_2Lorg_eclipse_swt_internal_photon_PhRect_1t_2_0=cast=(PhRect_t *)
-OS_PhRectUnion__Lorg_eclipse_swt_internal_photon_PhRect_1t_2Lorg_eclipse_swt_internal_photon_PhRect_1t_2_1=cast=(PhRect_t const *)
-
-OS_PhRectsToTiles=
-OS_PhRectsToTiles_0=cast=(PhRect_t *)
-OS_PhRectsToTiles_1=
-
-OS_PhRegionQuery=
-OS_PhRegionQuery_0=cast=(PhRid_t)
-OS_PhRegionQuery_1=cast=(PhRegion_t *)
-OS_PhRegionQuery_2=cast=(PhRect_t *)
-OS_PhRegionQuery_3=cast=(void *)
-OS_PhRegionQuery_4=
-
-OS_PhReleaseImage=
-OS_PhReleaseImage_0=cast=(PhImage_t *)
-
-OS_PhSortTiles=
-OS_PhSortTiles_0=cast=(PhTile_t *)
-
-OS_PhTilesToRects=
-OS_PhTilesToRects_0=cast=(PhTile_t *)
-OS_PhTilesToRects_1=cast=(int *)
-
-OS_PhTranslateTiles=
-OS_PhTranslateTiles_0=cast=(PhTile_t *)
-OS_PhTranslateTiles_1=cast=(PhPoint_t const *)
-
-OS_PhWindowQueryVisible=
-OS_PhWindowQueryVisible_0=
-OS_PhWindowQueryVisible_1=cast=(PhRid_t)
-OS_PhWindowQueryVisible_2=
-OS_PhWindowQueryVisible_3=cast=(PhRect_t *)
-
-OS_PiCropImage=
-OS_PiCropImage_0=cast=(PhImage_t *)
-OS_PiCropImage_1=cast=(PhRect_t const *)
-OS_PiCropImage_2=
-
-OS_PiDuplicateImage=
-OS_PiDuplicateImage_0=cast=(PhImage_t *)
-OS_PiDuplicateImage_1=
-
-OS_PmMemCreateMC=
-OS_PmMemCreateMC_0=cast=(PhImage_t *)
-OS_PmMemCreateMC_1=cast=(PhDim_t *)
-OS_PmMemCreateMC_2=cast=(PhPoint_t *)
-
-OS_PmMemFlush=
-OS_PmMemFlush_0=cast=(PmMemoryContext_t *)
-OS_PmMemFlush_1=cast=(PhImage_t *)
-
-OS_PmMemReleaseMC=
-OS_PmMemReleaseMC_0=cast=(PmMemoryContext_t *)
-
-OS_PmMemStart=
-OS_PmMemStart_0=cast=(PmMemoryContext_t *)
-
-OS_PmMemStop=
-OS_PmMemStop_0=cast=(PmMemoryContext_t *)
-
-OS_PtAddCallback=
-OS_PtAddCallback_0=cast=(PtWidget_t *)
-OS_PtAddCallback_1=
-OS_PtAddCallback_2=cast=(PtCallbackF_t *)
-OS_PtAddCallback_3=cast=(void *)
-
-OS_PtAddEventHandler=
-OS_PtAddEventHandler_0=cast=(PtWidget_t *)
-OS_PtAddEventHandler_1=
-OS_PtAddEventHandler_2=cast=(PtCallbackF_t *)
-OS_PtAddEventHandler_3=cast=(void *)
-
-OS_PtAddFilterCallback=
-OS_PtAddFilterCallback_0=cast=(PtWidget_t *)
-OS_PtAddFilterCallback_1=
-OS_PtAddFilterCallback_2=cast=(PtCallbackF_t *)
-OS_PtAddFilterCallback_3=cast=(void *)
-
-OS_PtAddHotkeyHandler=
-OS_PtAddHotkeyHandler_0=cast=(PtWidget_t *)
-OS_PtAddHotkeyHandler_1=
-OS_PtAddHotkeyHandler_2=
-OS_PtAddHotkeyHandler_3=
-OS_PtAddHotkeyHandler_4=cast=(void *)
-OS_PtAddHotkeyHandler_5=cast=(PtCallbackF_t *)
-
-OS_PtAlert=
-OS_PtAlert_0=cast=(PtWidget_t *)
-OS_PtAlert_1=cast=(PhPoint_t const *)
-OS_PtAlert_2=cast=(char const *)
-OS_PtAlert_3=cast=(PhImage_t const *)
-OS_PtAlert_4=cast=(char const *)
-OS_PtAlert_5=cast=(char const *)
-OS_PtAlert_6=
-OS_PtAlert_7=cast=(char const **)
-OS_PtAlert_8=cast=(char const **)
-OS_PtAlert_9=
-OS_PtAlert_10=
-OS_PtAlert_11=
-
-OS_PtAppAddInput=
-OS_PtAppAddInput_0=cast=(PtAppContext_t)
-OS_PtAppAddInput_1=cast=(pid_t)
-OS_PtAppAddInput_2=cast=(PtInputCallbackProc_t)
-OS_PtAppAddInput_3=cast=(void *)
-
-OS_PtAppAddWorkProc=
-OS_PtAppAddWorkProc_0=cast=(PtAppContext_t)
-OS_PtAppAddWorkProc_1=cast=(PtWorkProc_t)
-OS_PtAppAddWorkProc_2=cast=(void *)
-
-OS_PtAppCreatePulse=
-OS_PtAppCreatePulse_0=cast=(PtAppContext_t)
-OS_PtAppCreatePulse_1=
-
-OS_PtAppDeletePulse=
-OS_PtAppDeletePulse_0=cast=(PtAppContext_t)
-OS_PtAppDeletePulse_1=cast=(pid_t)
-
-OS_PtAppProcessEvent=
-OS_PtAppProcessEvent_0=cast=(PtAppContext_t)
-
-OS_PtAppPulseTrigger=
-OS_PtAppPulseTrigger_0=cast=(PtAppContext_t)
-OS_PtAppPulseTrigger_1=cast=(pid_t)
-
-OS_PtAppRemoveInput=
-OS_PtAppRemoveInput_0=cast=(PtAppContext_t)
-OS_PtAppRemoveInput_1=cast=(PtInputId_t *)
-
-OS_PtAppRemoveWorkProc=
-OS_PtAppRemoveWorkProc_0=cast=(PtAppContext_t)
-OS_PtAppRemoveWorkProc_1=cast=(PtWorkProcId_t *)
-
-OS_PtBeep=
-
-OS_PtBlit=
-OS_PtBlit_0=cast=(PtWidget_t const *)
-OS_PtBlit_1=cast=(PhRect_t const *)
-OS_PtBlit_2=cast=(PhPoint_t const *)
-
-OS_PtBlockAllWindows=
-OS_PtBlockAllWindows_0=cast=(PtWidget_t *)
-OS_PtBlockAllWindows_1=
-OS_PtBlockAllWindows_2=cast=(PgColor_t)
-
-OS_PtBlockWindow=
-OS_PtBlockWindow_0=cast=(PtWidget_t *)
-OS_PtBlockWindow_1=
-OS_PtBlockWindow_2=cast=(PgColor_t)
-
-OS_PtButton=flags=const
-
-OS_PtCalcBorder=
-OS_PtCalcBorder_0=cast=(PtWidget_t *)
-OS_PtCalcBorder_1=
-
-OS_PtCalcCanvas=
-OS_PtCalcCanvas_0=cast=(PtWidget_t *)
-OS_PtCalcCanvas_1=cast=(PhRect_t *)
-
-OS_PtClippedBlit=
-OS_PtClippedBlit_0=cast=(PtWidget_t const *)
-OS_PtClippedBlit_1=cast=(PhTile_t const *)
-OS_PtClippedBlit_2=cast=(PhPoint_t const *)
-OS_PtClippedBlit_3=cast=(PhTile_t const *)
-
-OS_PtColorSelect=
-OS_PtColorSelect_0=cast=(PtWidget_t *)
-OS_PtColorSelect_1=cast=(char *)
-OS_PtColorSelect_2=
-
-OS_PtComboBox=flags=const
-
-OS_PtContainer=flags=const
-
-OS_PtContainerFindFocus=
-OS_PtContainerFindFocus_0=cast=(PtWidget_t *)
-
-OS_PtContainerFocusNext=
-OS_PtContainerFocusNext_0=cast=(PtWidget_t *)
-OS_PtContainerFocusNext_1=cast=(PhEvent_t *)
-
-OS_PtContainerFocusPrev=
-OS_PtContainerFocusPrev_0=cast=(PtWidget_t *)
-OS_PtContainerFocusPrev_1=cast=(PhEvent_t *)
-
-OS_PtContainerGiveFocus=
-OS_PtContainerGiveFocus_0=cast=(PtWidget_t *)
-OS_PtContainerGiveFocus_1=cast=(PhEvent_t *)
-
-OS_PtContainerHold=
-OS_PtContainerHold_0=cast=(PtWidget_t *)
-
-OS_PtContainerRelease=
-OS_PtContainerRelease_0=cast=(PtWidget_t *)
-
-OS_PtCreateAppContext=
-
-OS_PtCreateWidget=
-OS_PtCreateWidget_0=cast=(PtWidgetClassRef_t *)
-OS_PtCreateWidget_1=cast=(PtWidget_t *)
-OS_PtCreateWidget_2=
-OS_PtCreateWidget_3=cast=(PtArg_t const *)
-
-OS_PtCreateWidgetClass=
-OS_PtCreateWidgetClass_0=cast=(PtWidgetClassRef_t *)
-OS_PtCreateWidgetClass_1=
-OS_PtCreateWidgetClass_2=
-OS_PtCreateWidgetClass_3=cast=(PtArg_t const *)
-
-OS_PtDamageExtent=
-OS_PtDamageExtent_0=cast=(PtWidget_t *)
-OS_PtDamageExtent_1=cast=(PhRect_t const *)
-
-OS_PtDamageWidget=
-OS_PtDamageWidget_0=cast=(PtWidget_t *)
-
-OS_PtDestroyWidget=
-OS_PtDestroyWidget_0=cast=(PtWidget_t *)
-
-OS_PtDisjoint=flags=const
-
-OS_PtEnter=
-OS_PtEnter_0=
-
-OS_PtEventHandler=
-OS_PtEventHandler_0=cast=(PhEvent_t *)
-
-OS_PtExtentWidget=
-OS_PtExtentWidget_0=cast=(PtWidget_t *)
-
-OS_PtExtentWidgetFamily=
-OS_PtExtentWidgetFamily_0=cast=(PtWidget_t *)
-
-OS_PtFileSelection=
-OS_PtFileSelection_0=cast=(PtWidget_t *)
-OS_PtFileSelection_1=cast=(PhPoint_t const *)
-OS_PtFileSelection_2=cast=(char const *)
-OS_PtFileSelection_3=cast=(char const *)
-OS_PtFileSelection_4=cast=(char const *)
-OS_PtFileSelection_5=cast=(char const *)
-OS_PtFileSelection_6=cast=(char const *)
-OS_PtFileSelection_7=cast=(char const *)
-OS_PtFileSelection_8=cast=(PtFileSelectionInfo_t *),flags=init
-OS_PtFileSelection_9=
-
-OS_PtFindDisjoint=
-OS_PtFindDisjoint_0=cast=(PtWidget_t *)
-
-OS_PtFlush=
-
-OS_PtFontSelection=
-OS_PtFontSelection_0=cast=(PtWidget_t *)
-OS_PtFontSelection_1=cast=(const PhPoint_t *)
-OS_PtFontSelection_2=cast=(const char *)
-OS_PtFontSelection_3=cast=(const char *)
-OS_PtFontSelection_4=
-OS_PtFontSelection_5=
-OS_PtFontSelection_6=cast=(const char *)
-
-OS_PtForwardWindowEvent=
-OS_PtForwardWindowEvent_0=cast=(PhWindowEvent_t const *)
-
-OS_PtFrameSize=
-OS_PtFrameSize_0=
-OS_PtFrameSize_1=
-OS_PtFrameSize_2=
-OS_PtFrameSize_3=
-OS_PtFrameSize_4=
-OS_PtFrameSize_5=
-
-OS_PtGetAbsPosition=
-OS_PtGetAbsPosition_0=cast=(PtWidget_t *)
-OS_PtGetAbsPosition_1=
-OS_PtGetAbsPosition_2=
-
-OS_PtGetResources=
-OS_PtGetResources_0=cast=(PtWidget_t *)
-OS_PtGetResources_1=
-OS_PtGetResources_2=cast=(PtArg_t *)
-
-OS_PtGlobalFocusNext=
-OS_PtGlobalFocusNext_0=cast=(PtWidget_t *)
-OS_PtGlobalFocusNext_1=cast=(PhEvent_t *)
-
-OS_PtGlobalFocusNextContainer=
-OS_PtGlobalFocusNextContainer_0=cast=(PtWidget_t *)
-OS_PtGlobalFocusNextContainer_1=cast=(PhEvent_t *)
-
-OS_PtGlobalFocusPrev=
-OS_PtGlobalFocusPrev_0=cast=(PtWidget_t *)
-OS_PtGlobalFocusPrev_1=cast=(PhEvent_t *)
-
-OS_PtGlobalFocusPrevContainer=
-OS_PtGlobalFocusPrevContainer_0=cast=(PtWidget_t *)
-OS_PtGlobalFocusPrevContainer_1=cast=(PhEvent_t *)
-
-OS_PtGroup=flags=const
-
-OS_PtHit=
-OS_PtHit_0=cast=( PtWidget_t *)
-OS_PtHit_1=
-OS_PtHit_2=cast=(PhRect_t const *)
-
-OS_PtHold=
-
-OS_PtInflateBalloon=
-OS_PtInflateBalloon_0=cast=(PtWidget_t *)
-OS_PtInflateBalloon_1=cast=(PtWidget_t *)
-OS_PtInflateBalloon_2=
-OS_PtInflateBalloon_3=cast=(char const *)
-OS_PtInflateBalloon_4=cast=(char const *)
-OS_PtInflateBalloon_5=cast=(PgColor_t)
-OS_PtInflateBalloon_6=cast=(PgColor_t)
-
-OS_PtInit=
-OS_PtInit_0=cast=(char const *)
-
-OS_PtIsFocused=
-OS_PtIsFocused_0=cast=(PtWidget_t *)
-
-OS_PtLabel=flags=const
-
-OS_PtLeave=
-OS_PtLeave_0=
-
-OS_PtList=flags=const
-
-OS_PtListAddItems=
-OS_PtListAddItems_0=cast=(PtWidget_t *)
-OS_PtListAddItems_1=cast=(const char **)
-OS_PtListAddItems_2=
-OS_PtListAddItems_3=
-
-OS_PtListDeleteAllItems=
-OS_PtListDeleteAllItems_0=cast=(PtWidget_t *)
-
-OS_PtListDeleteItemPos=
-OS_PtListDeleteItemPos_0=cast=(PtWidget_t *)
-OS_PtListDeleteItemPos_1=
-OS_PtListDeleteItemPos_2=
-
-OS_PtListGotoPos=
-OS_PtListGotoPos_0=cast=(PtWidget_t *)
-OS_PtListGotoPos_1=
-
-OS_PtListItemPos=
-OS_PtListItemPos_0=cast=(PtWidget_t *)
-OS_PtListItemPos_1=cast=(const char *)
-
-OS_PtListReplaceItemPos=
-OS_PtListReplaceItemPos_0=cast=(PtWidget_t *)
-OS_PtListReplaceItemPos_1=cast=(const char **)
-OS_PtListReplaceItemPos_2=
-OS_PtListReplaceItemPos_3=
-
-OS_PtListSelectPos=
-OS_PtListSelectPos_0=cast=(PtWidget_t *)
-OS_PtListSelectPos_1=
-
-OS_PtListUnselectPos=
-OS_PtListUnselectPos_0=cast=(PtWidget_t *)
-OS_PtListUnselectPos_1=
-
-OS_PtMainLoop=
-
-OS_PtMenu=flags=const
-
-OS_PtMenuBar=flags=const
-
-OS_PtMenuButton=flags=const
-
-OS_PtMultiText=flags=const
-
-OS_PtNextTopLevelWidget=
-OS_PtNextTopLevelWidget_0=cast=(PtWidget_t *)
-
-OS_PtPane=flags=const
-
-OS_PtPanelGroup=flags=const
-
-OS_PtPositionMenu=
-OS_PtPositionMenu_0=cast=(PtWidget_t *)
-OS_PtPositionMenu_1=cast=(PhEvent_t *)
-
-OS_PtProgress=flags=const
-
-OS_PtReParentWidget=
-OS_PtReParentWidget_0=cast=(PtWidget_t *)
-OS_PtReParentWidget_1=cast=(PtWidget_t *)
-
-OS_PtRealizeWidget=
-OS_PtRealizeWidget_0=cast=(PtWidget_t *)
-
-OS_PtRegion=flags=const
-
-OS_PtRelease=
-
-OS_PtRemoveCallback=
-OS_PtRemoveCallback_0=cast=(PtWidget_t *)
-OS_PtRemoveCallback_1=
-OS_PtRemoveCallback_2=cast=(PtCallbackF_t *)
-OS_PtRemoveCallback_3=cast=(void *)
-
-OS_PtRemoveHotkeyHandler=
-OS_PtRemoveHotkeyHandler_0=cast=(PtWidget_t *)
-OS_PtRemoveHotkeyHandler_1=
-OS_PtRemoveHotkeyHandler_2=
-OS_PtRemoveHotkeyHandler_3=
-OS_PtRemoveHotkeyHandler_4=cast=(void *)
-OS_PtRemoveHotkeyHandler_5=cast=(PtCallbackF_t *)
-
-OS_PtScrollArea=flags=const
-
-OS_PtScrollContainer=flags=const
-
-OS_PtScrollbar=flags=const
-
-OS_PtSendEventToWidget=
-OS_PtSendEventToWidget_0=cast=(PtWidget_t *)
-OS_PtSendEventToWidget_1=cast=(PhEvent_t *)
-
-OS_PtSeparator=flags=const
-
-OS_PtSetAreaFromWidgetCanvas=
-OS_PtSetAreaFromWidgetCanvas_0=cast=(PtWidget_t *)
-OS_PtSetAreaFromWidgetCanvas_1=
-OS_PtSetAreaFromWidgetCanvas_2=
-
-OS_PtSetParentWidget=
-OS_PtSetParentWidget_0=cast=(PtWidget_t *)
-
-OS_PtSetResource=
-OS_PtSetResource_0=cast=(PtWidget_t *)
-OS_PtSetResource_1=
-OS_PtSetResource_2=
-OS_PtSetResource_3=
-
-OS_PtSetResources=
-OS_PtSetResources_0=cast=(PtWidget_t *)
-OS_PtSetResources_1=
-OS_PtSetResources_2=cast=(PtArg_t *)
-
-OS_PtSlider=flags=const
-
-OS_PtSuperClassDraw=
-OS_PtSuperClassDraw_0=cast=(PtWidgetClassRef_t *)
-OS_PtSuperClassDraw_1=cast=(PtWidget_t *)
-OS_PtSuperClassDraw_2=cast=(PhTile_t const *)
-
-OS_PtSyncWidget=
-OS_PtSyncWidget_0=cast=(PtWidget_t *)
-
-OS_PtText=flags=const
-
-OS_PtTextGetSelection=
-OS_PtTextGetSelection_0=cast=(PtWidget_t *)
-OS_PtTextGetSelection_1=
-OS_PtTextGetSelection_2=
-
-OS_PtTextModifyText__IIIIII=
-OS_PtTextModifyText__IIIIII_0=cast=(PtWidget_t *)
-OS_PtTextModifyText__IIIIII_1=
-OS_PtTextModifyText__IIIIII_2=
-OS_PtTextModifyText__IIIIII_3=
-OS_PtTextModifyText__IIIIII_4=cast=(char const *)
-OS_PtTextModifyText__IIIIII_5=
-
-OS_PtTextModifyText__IIII_3BI=
-OS_PtTextModifyText__IIII_3BI_0=cast=(PtWidget_t *)
-OS_PtTextModifyText__IIII_3BI_1=
-OS_PtTextModifyText__IIII_3BI_2=
-OS_PtTextModifyText__IIII_3BI_3=
-OS_PtTextModifyText__IIII_3BI_4=cast=(char const *)
-OS_PtTextModifyText__IIII_3BI_5=
-
-OS_PtTextSetSelection=
-OS_PtTextSetSelection_0=cast=(PtWidget_t *)
-OS_PtTextSetSelection_1=
-OS_PtTextSetSelection_2=
-
-OS_PtTimer=flags=const
-
-OS_PtToggleButton=flags=const
-
-OS_PtToolbar=flags=const
-
-OS_PtUnblockWindows=
-OS_PtUnblockWindows_0=cast=(PtBlockedList_t *)
-
-OS_PtUnrealizeWidget=
-OS_PtUnrealizeWidget_0=cast=(PtWidget_t *)
-
-OS_PtValidParent=
-OS_PtValidParent_0=cast=(PtWidget_t *)
-OS_PtValidParent_1=cast=(PtWidgetClassRef_t *)
-
-OS_PtWebClient=flags=const
-
-OS_PtWidgetArea=
-OS_PtWidgetArea_0=cast=(PtWidget_t *)
-OS_PtWidgetArea_1=cast=(PhArea_t *)
-
-OS_PtWidgetBrotherBehind=
-OS_PtWidgetBrotherBehind_0=cast=(PtWidget_t *)
-
-OS_PtWidgetBrotherInFront=
-OS_PtWidgetBrotherInFront_0=cast=(PtWidget_t *)
-
-OS_PtWidgetCanvas__II=
-OS_PtWidgetCanvas__II_0=cast=(PtWidget_t *)
-OS_PtWidgetCanvas__II_1=cast=(PhRect_t *)
-
-OS_PtWidgetCanvas__ILorg_eclipse_swt_internal_photon_PhRect_1t_2=
-OS_PtWidgetCanvas__ILorg_eclipse_swt_internal_photon_PhRect_1t_2_0=cast=(PtWidget_t *)
-OS_PtWidgetCanvas__ILorg_eclipse_swt_internal_photon_PhRect_1t_2_1=
-
-OS_PtWidgetChildBack=
-OS_PtWidgetChildBack_0=cast=(PtWidget_t *)
-
-OS_PtWidgetChildFront=
-OS_PtWidgetChildFront_0=cast=(PtWidget_t *)
-
-OS_PtWidgetClass=
-OS_PtWidgetClass_0=cast=(PtWidget_t *)
-
-OS_PtWidgetExtent__II=
-OS_PtWidgetExtent__II_0=cast=(PtWidget_t *)
-OS_PtWidgetExtent__II_1=
-
-OS_PtWidgetExtent__ILorg_eclipse_swt_internal_photon_PhRect_1t_2=
-OS_PtWidgetExtent__ILorg_eclipse_swt_internal_photon_PhRect_1t_2_0=cast=(PtWidget_t *)
-OS_PtWidgetExtent__ILorg_eclipse_swt_internal_photon_PhRect_1t_2_1=
-
-OS_PtWidgetFlags=
-OS_PtWidgetFlags_0=cast=(PtWidget_t *)
-
-OS_PtWidgetInsert=
-OS_PtWidgetInsert_0=cast=(PtWidget_t *)
-OS_PtWidgetInsert_1=cast=(PtWidget_t *)
-OS_PtWidgetInsert_2=
-
-OS_PtWidgetIsClassMember=
-OS_PtWidgetIsClassMember_0=cast=(PtWidget_t *)
-OS_PtWidgetIsClassMember_1=cast=(PtWidgetClassRef_t *)
-
-OS_PtWidgetIsRealized=
-OS_PtWidgetIsRealized_0=cast=(PtWidget_t *)
-
-OS_PtWidgetOffset=
-OS_PtWidgetOffset_0=cast=(PtWidget_t *)
-OS_PtWidgetOffset_1=cast=(PhPoint_t *)
-
-OS_PtWidgetParent=
-OS_PtWidgetParent_0=cast=(PtWidget_t *)
-
-OS_PtWidgetPreferredSize=
-OS_PtWidgetPreferredSize_0=cast=(PtWidget_t *)
-OS_PtWidgetPreferredSize_1=cast=(PhDim_t *)
-
-OS_PtWidgetRid=
-OS_PtWidgetRid_0=cast=(PtWidget_t *)
-
-OS_PtWidgetToBack=
-OS_PtWidgetToBack_0=cast=(PtWidget_t *)
-
-OS_PtWidgetToFront=
-OS_PtWidgetToFront_0=cast=(PtWidget_t *)
-
-OS_PtWindow=flags=const
-
-OS_PtWindowFocus=
-OS_PtWindowFocus_0=cast=(PtWidget_t *)
-
-OS_PtWindowGetState=
-OS_PtWindowGetState_0=cast=(PtWidget_t *)
-
-OS_PtWindowToBack=
-OS_PtWindowToBack_0=cast=(PtWidget_t *)
-
-OS_PtWindowToFront=
-OS_PtWindowToFront_0=cast=(PtWidget_t *)
-
-OS_free=
-OS_free_0=cast=(void *)
-
-OS_getenv=
-OS_getenv_0=cast=(const char *)
-
-OS_malloc=
-OS_malloc_0=cast=(size_t)
-
-OS_memmove__III=
-OS_memmove__III_0=cast=(void *)
-OS_memmove__III_1=cast=(const void *)
-OS_memmove__III_2=
-
-OS_memmove__ILorg_eclipse_swt_internal_photon_PgAlpha_1t_2I=
-OS_memmove__ILorg_eclipse_swt_internal_photon_PgAlpha_1t_2I_0=cast=(void *)
-OS_memmove__ILorg_eclipse_swt_internal_photon_PgAlpha_1t_2I_1=cast=(const void *),flags=no_out init
-OS_memmove__ILorg_eclipse_swt_internal_photon_PgAlpha_1t_2I_2=
-
-OS_memmove__ILorg_eclipse_swt_internal_photon_PhArea_1t_2I=
-OS_memmove__ILorg_eclipse_swt_internal_photon_PhArea_1t_2I_0=cast=(void *)
-OS_memmove__ILorg_eclipse_swt_internal_photon_PhArea_1t_2I_1=cast=(const void *),flags=no_out
-OS_memmove__ILorg_eclipse_swt_internal_photon_PhArea_1t_2I_2=
-
-OS_memmove__ILorg_eclipse_swt_internal_photon_PhCursorDef_1t_2I=
-OS_memmove__ILorg_eclipse_swt_internal_photon_PhCursorDef_1t_2I_0=cast=(void *)
-OS_memmove__ILorg_eclipse_swt_internal_photon_PhCursorDef_1t_2I_1=cast=(const void *),flags=no_out
-OS_memmove__ILorg_eclipse_swt_internal_photon_PhCursorDef_1t_2I_2=
-
-OS_memmove__ILorg_eclipse_swt_internal_photon_PhEvent_1t_2I=
-OS_memmove__ILorg_eclipse_swt_internal_photon_PhEvent_1t_2I_0=cast=(void *)
-OS_memmove__ILorg_eclipse_swt_internal_photon_PhEvent_1t_2I_1=cast=(const void *),flags=no_out
-OS_memmove__ILorg_eclipse_swt_internal_photon_PhEvent_1t_2I_2=
-
-OS_memmove__ILorg_eclipse_swt_internal_photon_PhImage_1t_2I=
-OS_memmove__ILorg_eclipse_swt_internal_photon_PhImage_1t_2I_0=cast=(void *)
-OS_memmove__ILorg_eclipse_swt_internal_photon_PhImage_1t_2I_1=cast=(const void *),flags=no_out
-OS_memmove__ILorg_eclipse_swt_internal_photon_PhImage_1t_2I_2=
-
-OS_memmove__ILorg_eclipse_swt_internal_photon_PhPoint_1t_2I=
-OS_memmove__ILorg_eclipse_swt_internal_photon_PhPoint_1t_2I_0=cast=(void *)
-OS_memmove__ILorg_eclipse_swt_internal_photon_PhPoint_1t_2I_1=cast=(const void *),flags=no_out
-OS_memmove__ILorg_eclipse_swt_internal_photon_PhPoint_1t_2I_2=
-
-OS_memmove__ILorg_eclipse_swt_internal_photon_PhPointerEvent_1t_2I=
-OS_memmove__ILorg_eclipse_swt_internal_photon_PhPointerEvent_1t_2I_0=cast=(void *)
-OS_memmove__ILorg_eclipse_swt_internal_photon_PhPointerEvent_1t_2I_1=cast=(const void *),flags=no_out
-OS_memmove__ILorg_eclipse_swt_internal_photon_PhPointerEvent_1t_2I_2=
-
-OS_memmove__ILorg_eclipse_swt_internal_photon_PhRect_1t_2I=
-OS_memmove__ILorg_eclipse_swt_internal_photon_PhRect_1t_2I_0=cast=(void *)
-OS_memmove__ILorg_eclipse_swt_internal_photon_PhRect_1t_2I_1=cast=(const void *),flags=no_out
-OS_memmove__ILorg_eclipse_swt_internal_photon_PhRect_1t_2I_2=
-
-OS_memmove__ILorg_eclipse_swt_internal_photon_PhTile_1t_2I=
-OS_memmove__ILorg_eclipse_swt_internal_photon_PhTile_1t_2I_0=cast=(void *)
-OS_memmove__ILorg_eclipse_swt_internal_photon_PhTile_1t_2I_1=cast=(const void *),flags=no_out
-OS_memmove__ILorg_eclipse_swt_internal_photon_PhTile_1t_2I_2=
-
-OS_memmove__ILorg_eclipse_swt_internal_photon_PtTextCallback_1t_2I=
-OS_memmove__ILorg_eclipse_swt_internal_photon_PtTextCallback_1t_2I_0=cast=(void *)
-OS_memmove__ILorg_eclipse_swt_internal_photon_PtTextCallback_1t_2I_1=cast=(const void *),flags=no_out
-OS_memmove__ILorg_eclipse_swt_internal_photon_PtTextCallback_1t_2I_2=
-
-OS_memmove__ILorg_eclipse_swt_internal_photon_PtWebClientData_1t_2I=
-OS_memmove__ILorg_eclipse_swt_internal_photon_PtWebClientData_1t_2I_0=cast=(void *)
-OS_memmove__ILorg_eclipse_swt_internal_photon_PtWebClientData_1t_2I_1=cast=const void *,flags=no_out
-OS_memmove__ILorg_eclipse_swt_internal_photon_PtWebClientData_1t_2I_2=cast=size_t
-
-OS_memmove__I_3BI=
-OS_memmove__I_3BI_0=cast=(void *)
-OS_memmove__I_3BI_1=cast=(const void *),flags=no_out
-OS_memmove__I_3BI_2=
-
-OS_memmove__I_3II=
-OS_memmove__I_3II_0=cast=(void *)
-OS_memmove__I_3II_1=cast=(const void *),flags=no_out
-OS_memmove__I_3II_2=
-
-OS_memmove__Lorg_eclipse_swt_internal_photon_FontDetails_2II=
-OS_memmove__Lorg_eclipse_swt_internal_photon_FontDetails_2II_0=cast=(void *),flags=no_in
-OS_memmove__Lorg_eclipse_swt_internal_photon_FontDetails_2II_1=cast=(const void *)
-OS_memmove__Lorg_eclipse_swt_internal_photon_FontDetails_2II_2=
-
-OS_memmove__Lorg_eclipse_swt_internal_photon_PgAlpha_1t_2II=
-OS_memmove__Lorg_eclipse_swt_internal_photon_PgAlpha_1t_2II_0=cast=(void *),flags=no_in init
-OS_memmove__Lorg_eclipse_swt_internal_photon_PgAlpha_1t_2II_1=cast=(const void *)
-OS_memmove__Lorg_eclipse_swt_internal_photon_PgAlpha_1t_2II_2=
-
-OS_memmove__Lorg_eclipse_swt_internal_photon_PgMap_1t_2II=
-OS_memmove__Lorg_eclipse_swt_internal_photon_PgMap_1t_2II_0=cast=(void *),flags=no_in
-OS_memmove__Lorg_eclipse_swt_internal_photon_PgMap_1t_2II_1=cast=(const void *)
-OS_memmove__Lorg_eclipse_swt_internal_photon_PgMap_1t_2II_2=
-
-OS_memmove__Lorg_eclipse_swt_internal_photon_PhClipHeader_2II=
-OS_memmove__Lorg_eclipse_swt_internal_photon_PhClipHeader_2II_0=cast=(void *),flags=no_in
-OS_memmove__Lorg_eclipse_swt_internal_photon_PhClipHeader_2II_1=cast=(const void *)
-OS_memmove__Lorg_eclipse_swt_internal_photon_PhClipHeader_2II_2=
-
-OS_memmove__Lorg_eclipse_swt_internal_photon_PhEvent_1t_2II=
-OS_memmove__Lorg_eclipse_swt_internal_photon_PhEvent_1t_2II_0=cast=(void *),flags=no_in
-OS_memmove__Lorg_eclipse_swt_internal_photon_PhEvent_1t_2II_1=cast=(const void *)
-OS_memmove__Lorg_eclipse_swt_internal_photon_PhEvent_1t_2II_2=
-
-OS_memmove__Lorg_eclipse_swt_internal_photon_PhImage_1t_2II=
-OS_memmove__Lorg_eclipse_swt_internal_photon_PhImage_1t_2II_0=cast=(void *),flags=no_in
-OS_memmove__Lorg_eclipse_swt_internal_photon_PhImage_1t_2II_1=cast=(const void *)
-OS_memmove__Lorg_eclipse_swt_internal_photon_PhImage_1t_2II_2=
-
-OS_memmove__Lorg_eclipse_swt_internal_photon_PhKeyEvent_1t_2II=
-OS_memmove__Lorg_eclipse_swt_internal_photon_PhKeyEvent_1t_2II_0=cast=(void *),flags=no_in
-OS_memmove__Lorg_eclipse_swt_internal_photon_PhKeyEvent_1t_2II_1=cast=(const void *)
-OS_memmove__Lorg_eclipse_swt_internal_photon_PhKeyEvent_1t_2II_2=
-
-OS_memmove__Lorg_eclipse_swt_internal_photon_PhPointerEvent_1t_2II=
-OS_memmove__Lorg_eclipse_swt_internal_photon_PhPointerEvent_1t_2II_0=cast=(void *),flags=no_in
-OS_memmove__Lorg_eclipse_swt_internal_photon_PhPointerEvent_1t_2II_1=cast=(const void *)
-OS_memmove__Lorg_eclipse_swt_internal_photon_PhPointerEvent_1t_2II_2=
-
-OS_memmove__Lorg_eclipse_swt_internal_photon_PhRect_1t_2II=
-OS_memmove__Lorg_eclipse_swt_internal_photon_PhRect_1t_2II_0=cast=(void *),flags=no_in
-OS_memmove__Lorg_eclipse_swt_internal_photon_PhRect_1t_2II_1=cast=(const void *)
-OS_memmove__Lorg_eclipse_swt_internal_photon_PhRect_1t_2II_2=
-
-OS_memmove__Lorg_eclipse_swt_internal_photon_PhTile_1t_2II=
-OS_memmove__Lorg_eclipse_swt_internal_photon_PhTile_1t_2II_0=cast=(void *),flags=no_in
-OS_memmove__Lorg_eclipse_swt_internal_photon_PhTile_1t_2II_1=cast=(const void *)
-OS_memmove__Lorg_eclipse_swt_internal_photon_PhTile_1t_2II_2=
-
-OS_memmove__Lorg_eclipse_swt_internal_photon_PhWindowEvent_1t_2II=
-OS_memmove__Lorg_eclipse_swt_internal_photon_PhWindowEvent_1t_2II_0=cast=(void *),flags=no_in
-OS_memmove__Lorg_eclipse_swt_internal_photon_PhWindowEvent_1t_2II_1=cast=(const void *)
-OS_memmove__Lorg_eclipse_swt_internal_photon_PhWindowEvent_1t_2II_2=
-
-OS_memmove__Lorg_eclipse_swt_internal_photon_PtCallbackInfo_1t_2II=
-OS_memmove__Lorg_eclipse_swt_internal_photon_PtCallbackInfo_1t_2II_0=cast=(void *),flags=no_in
-OS_memmove__Lorg_eclipse_swt_internal_photon_PtCallbackInfo_1t_2II_1=cast=(const void *)
-OS_memmove__Lorg_eclipse_swt_internal_photon_PtCallbackInfo_1t_2II_2=
-
-OS_memmove__Lorg_eclipse_swt_internal_photon_PtScrollbarCallback_1t_2II=
-OS_memmove__Lorg_eclipse_swt_internal_photon_PtScrollbarCallback_1t_2II_0=cast=(void *),flags=no_in
-OS_memmove__Lorg_eclipse_swt_internal_photon_PtScrollbarCallback_1t_2II_1=cast=(const void *)
-OS_memmove__Lorg_eclipse_swt_internal_photon_PtScrollbarCallback_1t_2II_2=
-
-OS_memmove__Lorg_eclipse_swt_internal_photon_PtTextCallback_1t_2II=
-OS_memmove__Lorg_eclipse_swt_internal_photon_PtTextCallback_1t_2II_0=cast=(void *),flags=no_in
-OS_memmove__Lorg_eclipse_swt_internal_photon_PtTextCallback_1t_2II_1=cast=(const void *)
-OS_memmove__Lorg_eclipse_swt_internal_photon_PtTextCallback_1t_2II_2=
-
-OS_memmove__Lorg_eclipse_swt_internal_photon_PtWebDataReqCallback_1t_2II=
-OS_memmove__Lorg_eclipse_swt_internal_photon_PtWebDataReqCallback_1t_2II_0=cast=void *
-OS_memmove__Lorg_eclipse_swt_internal_photon_PtWebDataReqCallback_1t_2II_1=cast=const void *
-OS_memmove__Lorg_eclipse_swt_internal_photon_PtWebDataReqCallback_1t_2II_2=
-
-OS_memmove__Lorg_eclipse_swt_internal_photon_PtWebMetaDataCallback_1t_2II=
-OS_memmove__Lorg_eclipse_swt_internal_photon_PtWebMetaDataCallback_1t_2II_0=cast=void *
-OS_memmove__Lorg_eclipse_swt_internal_photon_PtWebMetaDataCallback_1t_2II_1=cast=const void *
-OS_memmove__Lorg_eclipse_swt_internal_photon_PtWebMetaDataCallback_1t_2II_2=
-
-OS_memmove__Lorg_eclipse_swt_internal_photon_PtWebStatusCallback_1t_2II=
-OS_memmove__Lorg_eclipse_swt_internal_photon_PtWebStatusCallback_1t_2II_0=cast=void *
-OS_memmove__Lorg_eclipse_swt_internal_photon_PtWebStatusCallback_1t_2II_1=cast=const void *
-OS_memmove__Lorg_eclipse_swt_internal_photon_PtWebStatusCallback_1t_2II_2=
-
-OS_memmove__Lorg_eclipse_swt_internal_photon_PtWebWindowCallback_1t_2II=
-OS_memmove__Lorg_eclipse_swt_internal_photon_PtWebWindowCallback_1t_2II_0=cast=void *
-OS_memmove__Lorg_eclipse_swt_internal_photon_PtWebWindowCallback_1t_2II_1=cast=const void *
-OS_memmove__Lorg_eclipse_swt_internal_photon_PtWebWindowCallback_1t_2II_2=
-
-OS_memmove___3BII=
-OS_memmove___3BII_0=cast=(void *),flags=no_in
-OS_memmove___3BII_1=cast=(const void *)
-OS_memmove___3BII_2=cast=(size_t)
-
-OS_memmove___3BLorg_eclipse_swt_internal_photon_PhClipHeader_2I=
-OS_memmove___3BLorg_eclipse_swt_internal_photon_PhClipHeader_2I_0=cast=(void *),flags=no_in
-OS_memmove___3BLorg_eclipse_swt_internal_photon_PhClipHeader_2I_1=cast=(const void *)
-OS_memmove___3BLorg_eclipse_swt_internal_photon_PhClipHeader_2I_2=
-
-OS_memmove___3III=
-OS_memmove___3III_0=cast=(void *),flags=no_in
-OS_memmove___3III_1=cast=(const void *)
-OS_memmove___3III_2=
-
-OS_memmove___3SII=
-OS_memmove___3SII_0=cast=(void *),flags=no_in
-OS_memmove___3SII_1=cast=(const void *)
-OS_memmove___3SII_2=cast=(size_t)
-
-OS_memset=
-OS_memset_0=cast=void *
-OS_memset_1=
-OS_memset_2=cast=size_t
-
-OS_strdup=
-OS_strdup_0=cast=(const char *)
-
-OS_strlen=
-OS_strlen_0=cast=(const char*)
-
-OS_uname=
-OS_uname_0=cast=(utsname *)
-
-
-org_eclipse_swt_internal_photon_PgAlpha_1t=
-PgAlpha_t_alpha_op=
-PgAlpha_t_src_alpha_map_dim_w=accessor=src_alpha_map.dim.w
-PgAlpha_t_src_alpha_map_dim_h=accessor=src_alpha_map.dim.h
-PgAlpha_t_src_alpha_map_bpl=accessor=src_alpha_map.bpl
-PgAlpha_t_src_alpha_map_bpp=accessor=src_alpha_map.bpp
-PgAlpha_t_src_alpha_map_map=accessor=src_alpha_map.map,cast=(char *)
-PgAlpha_t_src_global_alpha=
-PgAlpha_t_dest_global_alpha=
-
-org_eclipse_swt_internal_photon_PgDisplaySettings_1t=
-PgDisplaySettings_t_mode=
-PgDisplaySettings_t_xres=
-PgDisplaySettings_t_yres=
-PgDisplaySettings_t_refresh=
-PgDisplaySettings_t_flags=
-PgDisplaySettings_t_reserved=cast=(long *)
-
-org_eclipse_swt_internal_photon_PgMap_1t=
-PgMap_t_dim_w=accessor=dim.w
-PgMap_t_dim_h=accessor=dim.h
-PgMap_t_bpl=
-PgMap_t_bpp=
-PgMap_t_map=cast=(char *)
-
-org_eclipse_swt_internal_photon_PgVideoModeInfo_1t=
-PgVideoModeInfo_t_width=
-PgVideoModeInfo_t_height=
-PgVideoModeInfo_t_bits_per_pixel=
-PgVideoModeInfo_t_bytes_per_scanline=
-PgVideoModeInfo_t_type=
-PgVideoModeInfo_t_mode_capabilities1=
-PgVideoModeInfo_t_mode_capabilities2=
-PgVideoModeInfo_t_mode_capabilities3=
-PgVideoModeInfo_t_mode_capabilities4=
-PgVideoModeInfo_t_mode_capabilities5=
-PgVideoModeInfo_t_mode_capabilities6=
-PgVideoModeInfo_t_refresh_rates=cast=(char *)
-
-org_eclipse_swt_internal_photon_PhArea_1t=
-PhArea_t_pos_x=accessor=pos.x
-PhArea_t_pos_y=accessor=pos.y
-PhArea_t_size_w=accessor=size.w
-PhArea_t_size_h=accessor=size.h
-
-org_eclipse_swt_internal_photon_PhClipHeader=
-PhClipHeader_type=cast=(PhClipHeader)
-PhClipHeader_length=
-PhClipHeader_zero=
-PhClipHeader_data=cast=(void *)
-
-org_eclipse_swt_internal_photon_PhCursorDef_1t=
-PhCursorDef_t_hdr_len=accessor=hdr.len
-PhCursorDef_t_hdr_type=accessor=hdr.type
-PhCursorDef_t_size1_x=accessor=size1.x
-PhCursorDef_t_size1_y=accessor=size1.y
-PhCursorDef_t_offset1_x=accessor=offset1.x
-PhCursorDef_t_offset1_y=accessor=offset1.y
-PhCursorDef_t_color1=
-PhCursorDef_t_bytesperline1=
-PhCursorDef_t_size2_x=accessor=size2.x
-PhCursorDef_t_size2_y=accessor=size2.y
-PhCursorDef_t_offset2_x=accessor=offset2.x
-PhCursorDef_t_offset2_y=accessor=offset2.y
-PhCursorDef_t_color2=
-PhCursorDef_t_bytesperline2=
-
-org_eclipse_swt_internal_photon_PhCursorInfo_1t=
-PhCursorInfo_t_pos_x=accessor=pos.x
-PhCursorInfo_t_pos_y=accessor=pos.y
-PhCursorInfo_t_region=
-PhCursorInfo_t_ig_region=
-PhCursorInfo_t_color=
-PhCursorInfo_t_last_press_x=accessor=last_press.x
-PhCursorInfo_t_last_press_y=accessor=last_press.y
-PhCursorInfo_t_msec=
-PhCursorInfo_t_steady_x=accessor=steady.x
-PhCursorInfo_t_steady_y=accessor=steady.y
-PhCursorInfo_t_dragger=
-PhCursorInfo_t_drag_boundary_ul_x=accessor=drag_boundary.ul.x
-PhCursorInfo_t_drag_boundary_ul_y=accessor=drag_boundary.ul.y
-PhCursorInfo_t_drag_boundary_lr_x=accessor=drag_boundary.lr.x
-PhCursorInfo_t_drag_boundary_lr_y=accessor=drag_boundary.lr.y
-PhCursorInfo_t_phantom_rid=
-PhCursorInfo_t_type=
-PhCursorInfo_t_ig=
-PhCursorInfo_t_button_state=
-PhCursorInfo_t_click_count=
-PhCursorInfo_t_zero1=
-PhCursorInfo_t_key_mods=
-PhCursorInfo_t_zero2=
-
-org_eclipse_swt_internal_photon_PhDim_1t=
-PhDim_t_w=
-PhDim_t_h=
-
-org_eclipse_swt_internal_photon_PhEvent_1t=
-PhEvent_t_type=
-PhEvent_t_subtype=
-PhEvent_t_processing_flags=
-PhEvent_t_emitter_rid=accessor=emitter.rid
-PhEvent_t_emitter_handle=accessor=emitter.handle
-PhEvent_t_collector_rid=accessor=collector.rid
-PhEvent_t_collector_handle=accessor=collector.handle
-PhEvent_t_input_group=
-PhEvent_t_flags=
-PhEvent_t_timestamp=
-PhEvent_t_translation_x=accessor=translation.x
-PhEvent_t_translation_y=accessor=translation.y
-PhEvent_t_num_rects=
-PhEvent_t_data_len=
-
-org_eclipse_swt_internal_photon_PhImage_1t=
-PhImage_t_type=
-PhImage_t_image_tag=
-PhImage_t_bpl=
-PhImage_t_size_w=accessor=size.w
-PhImage_t_size_h=accessor=size.h
-PhImage_t_palette_tag=
-PhImage_t_colors=
-PhImage_t_alpha=cast=(PgAlpha_t *)
-PhImage_t_transparent=
-PhImage_t_format=
-PhImage_t_flags=
-PhImage_t_ghost_bpl=
-PhImage_t_spare1=
-PhImage_t_ghost_bitmap=cast=(char *)
-PhImage_t_mask_bpl=
-PhImage_t_mask_bm=cast=(char *)
-PhImage_t_palette=cast=(PgColor_t *)
-PhImage_t_image=cast=(char *)
-
-org_eclipse_swt_internal_photon_PhKeyEvent_1t=
-PhKeyEvent_t_key_mods=
-PhKeyEvent_t_key_flags=
-PhKeyEvent_t_key_cap=
-PhKeyEvent_t_key_sym=
-PhKeyEvent_t_key_scan=
-PhKeyEvent_t_key_zero=
-PhKeyEvent_t_pos_x=accessor=pos.x
-PhKeyEvent_t_pos_y=accessor=pos.y
-PhKeyEvent_t_button_state=
-
-org_eclipse_swt_internal_photon_PhPoint_1t=
-PhPoint_t_x=
-PhPoint_t_y=
-
-org_eclipse_swt_internal_photon_PhPointerEvent_1t=
-PhPointerEvent_t_pos_x=accessor=pos.x
-PhPointerEvent_t_pos_y=accessor=pos.y
-PhPointerEvent_t_buttons=
-PhPointerEvent_t_button_state=
-PhPointerEvent_t_click_count=
-PhPointerEvent_t_flags=
-PhPointerEvent_t_z=
-PhPointerEvent_t_key_mods=
-PhPointerEvent_t_zero=
-
-org_eclipse_swt_internal_photon_PhRect_1t=
-PhRect_t_ul_x=accessor=ul.x
-PhRect_t_ul_y=accessor=ul.y
-PhRect_t_lr_x=accessor=lr.x
-PhRect_t_lr_y=accessor=lr.y
-
-org_eclipse_swt_internal_photon_PhRegion_1t=
-PhRegion_t_rid=
-PhRegion_t_handle=
-PhRegion_t_owner=
-PhRegion_t_flags=
-PhRegion_t_state=
-PhRegion_t_events_sense=
-PhRegion_t_events_opaque=
-PhRegion_t_origin_x=accessor=origin.x
-PhRegion_t_origin_y=accessor=origin.y
-PhRegion_t_parent=
-PhRegion_t_child=
-PhRegion_t_bro_in_front=
-PhRegion_t_bro_behind=
-PhRegion_t_cursor_color=
-PhRegion_t_input_group=
-PhRegion_t_data_len=
-PhRegion_t_cursor_type=
-
-org_eclipse_swt_internal_photon_PhTile_1t=
-PhTile_t_rect_ul_x=accessor=rect.ul.x
-PhTile_t_rect_ul_y=accessor=rect.ul.y
-PhTile_t_rect_lr_x=accessor=rect.lr.x
-PhTile_t_rect_lr_y=accessor=rect.lr.y
-PhTile_t_next=cast=(PhTile_t *)
-
-org_eclipse_swt_internal_photon_PhWindowEvent_1t=
-PhWindowEvent_t_event_f=
-PhWindowEvent_t_state_f=
-PhWindowEvent_t_rid=
-PhWindowEvent_t_pos_x=accessor=pos.x
-PhWindowEvent_t_pos_y=accessor=pos.y
-PhWindowEvent_t_size_w=accessor=size.w
-PhWindowEvent_t_size_h=accessor=size.h
-PhWindowEvent_t_event_state=
-PhWindowEvent_t_input_group=
-PhWindowEvent_t_rsvd0=accessor=rsvd[0]
-PhWindowEvent_t_rsvd1=accessor=rsvd[1]
-PhWindowEvent_t_rsvd2=accessor=rsvd[2]
-PhWindowEvent_t_rsvd3=accessor=rsvd[3]
-
-org_eclipse_swt_internal_photon_PtCallbackInfo_1t=
-PtCallbackInfo_t_reason=
-PtCallbackInfo_t_reason_subtype=
-PtCallbackInfo_t_event=cast=(PhEvent_t *)
-PtCallbackInfo_t_cbdata=cast=(void *)
-
-org_eclipse_swt_internal_photon_PtColorSelectInfo_1t=
-PtColorSelectInfo_t_flags=
-PtColorSelectInfo_t_nselectors=
-PtColorSelectInfo_t_ncolor_models=
-PtColorSelectInfo_t_color_models=cast=(PgColorModel_t **)
-PtColorSelectInfo_t_selectors=cast=(PtColorSelectorSpec_t *)
-PtColorSelectInfo_t_pos_x=accessor=pos.x
-PtColorSelectInfo_t_pos_y=accessor=pos.y
-PtColorSelectInfo_t_size_w=accessor=size.w
-PtColorSelectInfo_t_size_h=accessor=size.h
-PtColorSelectInfo_t_palette=accessor=palette.instance,cast=(void *)
-PtColorSelectInfo_t_accept_text=cast=(char *)
-PtColorSelectInfo_t_dismiss_text=cast=(char *)
-PtColorSelectInfo_t_accept_dismiss_text=cast=(char *)
-PtColorSelectInfo_t_apply_f=cast=(void *)
-PtColorSelectInfo_t_data=cast=(void *)
-PtColorSelectInfo_t_rgb=
-PtColorSelectInfo_t_dialog=cast=(PtWidget_t *)
-
-org_eclipse_swt_internal_photon_PtFileSelectionInfo_1t=
-PtFileSelectionInfo_t_ret=
-PtFileSelectionInfo_t_path=
-PtFileSelectionInfo_t_dim=
-PtFileSelectionInfo_t_pos=
-PtFileSelectionInfo_t_format=
-PtFileSelectionInfo_t_fspec=
-PtFileSelectionInfo_t_user_data=cast=(void *)
-PtFileSelectionInfo_t_confirm_display=cast=(void *)
-PtFileSelectionInfo_t_confirm_selection=cast=(void *)
-PtFileSelectionInfo_t_new_directory=cast=(void *)
-PtFileSelectionInfo_t_btn1=cast=(char *)
-PtFileSelectionInfo_t_btn2=cast=(char *)
-PtFileSelectionInfo_t_num_args=
-PtFileSelectionInfo_t_args=cast=(void *)
-PtFileSelectionInfo_t_minfo=cast=(PtFileSelectorInfo_t *)
-PtFileSelectionInfo_t_spare=cast=(long *)
-
-org_eclipse_swt_internal_photon_PtScrollbarCallback_1t=
-PtScrollbarCallback_t_action=
-PtScrollbarCallback_t_position=
-
-org_eclipse_swt_internal_photon_PtTextCallback_1t=
-PtTextCallback_t_start_pos=
-PtTextCallback_t_end_pos=
-PtTextCallback_t_cur_insert=
-PtTextCallback_t_new_insert=
-PtTextCallback_t_length=
-PtTextCallback_t_reserved=
-PtTextCallback_t_text=cast=(char *)
-PtTextCallback_t_doit=
-
-org_eclipse_swt_internal_photon_PtWebClientData_1t=
-PtWebClientData_t_type=
-PtWebClientData_t_url=
-PtWebClientData_t_length=
-PtWebClientData_t_data=cast=char *
-
-org_eclipse_swt_internal_photon_PtWebDataReqCallback_1t=
-PtWebDataReqCallback_t_type=
-PtWebDataReqCallback_t_length=
-PtWebDataReqCallback_t_url=
-
-org_eclipse_swt_internal_photon_PtWebMetaDataCallback_1t=
-PtWebMetaDataCallback_t_name=
-PtWebMetaDataCallback_t_value=
-
-org_eclipse_swt_internal_photon_PtWebStatusCallback_1t=
-PtWebStatusCallback_t_desc=
-PtWebStatusCallback_t_type=
-PtWebStatusCallback_t_url=
-
-org_eclipse_swt_internal_photon_PtWebWindowCallback_1t=
-PtWebWindowCallback_t_size_w=accessor=size.w
-PtWebWindowCallback_t_size_h=accessor=size.h
-PtWebWindowCallback_t_flags=
-
-org_eclipse_swt_internal_photon_utsname=
-utsname_sysname=
-utsname_nodename=
-utsname_release=
-utsname_version=
-utsname_machine=
-
diff --git a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.properties b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.properties
deleted file mode 100644
index e5a321f1c2..0000000000
--- a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.properties
+++ /dev/null
@@ -1,43 +0,0 @@
-###############################################################################
-# Copyright (c) 2004 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Common Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/cpl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-swt_copyright=/*******************************************************************************\n\
- * Copyright (c) 2000, 2004 IBM Corporation and others.\n\
- * All rights reserved. This program and the accompanying materials\n\
- * are made available under the terms of the Common Public License v1.0\n\
- * which accompanies this distribution, and is available at\n\
- * http://www.eclipse.org/legal/cpl-v10.html\n\
- * \n\
- * Contributors:\n\
- * IBM Corporation - initial API and implementation\n\
- *******************************************************************************/\n
-swt_properties_copyright=###############################################################################\n\
-# Copyright (c) 2004 IBM Corporation and others.\n\
-# All rights reserved. This program and the accompanying materials\n\
-# are made available under the terms of the Common Public License v1.0\n\
-# which accompanies this distribution, and is available at\n\
-# http://www.eclipse.org/legal/cpl-v10.html\n\
-# \n\
-# Contributors:\n\
-# IBM Corporation - initial API and implementation\n\
-###############################################################################
-swt_main_classes=\
-org.eclipse.swt.internal.accessibility.gtk.ATK,../org.eclipse.swt/Eclipse SWT PI/gtk/library/,\
-org.eclipse.swt.internal.carbon.OS,../org.eclipse.swt/Eclipse SWT PI/carbon/library/,\
-org.eclipse.swt.internal.cde.CDE,../org.eclipse.swt/Eclipse SWT Program/cde/library/,\
-org.eclipse.swt.internal.gnome.GNOME,../org.eclipse.swt/Eclipse SWT Program/gnome/library/,\
-org.eclipse.swt.internal.gtk.GTK,../org.eclipse.swt/Eclipse SWT PI/motif_gtk/library/,\
-org.eclipse.swt.internal.gtk.OS,../org.eclipse.swt/Eclipse SWT PI/gtk/library/,\
-org.eclipse.swt.internal.kde.KDE,../org.eclipse.swt/Eclipse SWT Program/kde/library/,\
-org.eclipse.swt.internal.motif.OS,../org.eclipse.swt/Eclipse SWT PI/motif/library/,\
-org.eclipse.swt.internal.mozilla.XPCOM,../org.eclipse.swt/Eclipse SWT Mozilla/common/library/,\
-org.eclipse.swt.internal.ole.win32.COM,../org.eclipse.swt/Eclipse SWT PI/win32/library/,\
-org.eclipse.swt.internal.photon.OS,../org.eclipse.swt/Eclipse SWT PI/photon/library/,\
-org.eclipse.swt.internal.win32.OS,../org.eclipse.swt/Eclipse SWT PI/win32/library/
diff --git a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.win32.OS.properties b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.win32.OS.properties
deleted file mode 100644
index d6eb6bc01d..0000000000
--- a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.win32.OS.properties
+++ /dev/null
@@ -1,3841 +0,0 @@
-###############################################################################
-# Copyright (c) 2004 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Common Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/cpl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-org_eclipse_swt_internal_win32_ACCEL=
-ACCEL_fVirt=
-ACCEL_key=
-ACCEL_cmd=
-
-org_eclipse_swt_internal_win32_BITMAP=
-BITMAP_bmType=
-BITMAP_bmWidth=
-BITMAP_bmHeight=
-BITMAP_bmWidthBytes=
-BITMAP_bmPlanes=
-BITMAP_bmBitsPixel=
-BITMAP_bmBits=cast=(LPVOID)
-
-org_eclipse_swt_internal_win32_BITMAPINFOHEADER=
-BITMAPINFOHEADER_biSize=
-BITMAPINFOHEADER_biWidth=
-BITMAPINFOHEADER_biHeight=
-BITMAPINFOHEADER_biPlanes=
-BITMAPINFOHEADER_biBitCount=
-BITMAPINFOHEADER_biCompression=
-BITMAPINFOHEADER_biSizeImage=
-BITMAPINFOHEADER_biXPelsPerMeter=
-BITMAPINFOHEADER_biYPelsPerMeter=
-BITMAPINFOHEADER_biClrUsed=
-BITMAPINFOHEADER_biClrImportant=
-
-org_eclipse_swt_internal_win32_BROWSEINFO=
-BROWSEINFO_hwndOwner=cast=(HWND)
-BROWSEINFO_pidlRoot=cast=(LPCITEMIDLIST)
-BROWSEINFO_pszDisplayName=cast=(LPTSTR)
-BROWSEINFO_lpszTitle=cast=(LPCTSTR)
-BROWSEINFO_ulFlags=
-BROWSEINFO_lpfn=cast=(BFFCALLBACK)
-BROWSEINFO_lParam=
-BROWSEINFO_iImage=
-
-org_eclipse_swt_internal_win32_CHOOSECOLOR=
-CHOOSECOLOR_lStructSize=
-CHOOSECOLOR_hwndOwner=cast=(HWND)
-CHOOSECOLOR_hInstance=cast=(HANDLE)
-CHOOSECOLOR_rgbResult=
-CHOOSECOLOR_lpCustColors=cast=(COLORREF *)
-CHOOSECOLOR_Flags=
-CHOOSECOLOR_lCustData=
-CHOOSECOLOR_lpfnHook=cast=(LPCCHOOKPROC)
-CHOOSECOLOR_lpTemplateName=cast=(LPCTSTR)
-
-org_eclipse_swt_internal_win32_CHOOSEFONT=
-CHOOSEFONT_lStructSize=
-CHOOSEFONT_hwndOwner=cast=(HWND)
-CHOOSEFONT_hDC=cast=(HDC)
-CHOOSEFONT_lpLogFont=cast=(LPLOGFONT)
-CHOOSEFONT_iPointSize=
-CHOOSEFONT_Flags=
-CHOOSEFONT_rgbColors=
-CHOOSEFONT_lCustData=
-CHOOSEFONT_lpfnHook=cast=(LPCFHOOKPROC)
-CHOOSEFONT_lpTemplateName=cast=(LPCTSTR)
-CHOOSEFONT_hInstance=cast=(HINSTANCE)
-CHOOSEFONT_lpszStyle=cast=(LPTSTR)
-CHOOSEFONT_nFontType=
-CHOOSEFONT_nSizeMin=
-CHOOSEFONT_nSizeMax=
-
-org_eclipse_swt_internal_win32_COMBOBOXINFO=
-COMBOBOXINFO_cbSize=
-COMBOBOXINFO_itemLeft=accessor=rcItem.left
-COMBOBOXINFO_itemTop=accessor=rcItem.top
-COMBOBOXINFO_itemRight=accessor=rcItem.right
-COMBOBOXINFO_itemBottom=accessor=rcItem.bottom
-COMBOBOXINFO_buttonLeft=accessor=rcButton.left
-COMBOBOXINFO_buttonTop=accessor=rcButton.top
-COMBOBOXINFO_buttonRight=accessor=rcButton.right
-COMBOBOXINFO_buttonBottom=accessor=rcButton.bottom
-COMBOBOXINFO_stateButton=
-COMBOBOXINFO_hwndCombo=cast=HWND
-COMBOBOXINFO_hwndItem=cast=HWND
-COMBOBOXINFO_hwndList=cast=HWND
-
-org_eclipse_swt_internal_win32_COMPOSITIONFORM=
-COMPOSITIONFORM_dwStyle=
-COMPOSITIONFORM_x=accessor=ptCurrentPos.x
-COMPOSITIONFORM_y=accessor=ptCurrentPos.y
-COMPOSITIONFORM_left=accessor=rcArea.left
-COMPOSITIONFORM_top=accessor=rcArea.top
-COMPOSITIONFORM_right=accessor=rcArea.right
-COMPOSITIONFORM_bottom=accessor=rcArea.bottom
-
-org_eclipse_swt_internal_win32_CREATESTRUCT=
-CREATESTRUCT_lpCreateParams=cast=(LPVOID)
-CREATESTRUCT_hInstance=cast=(HINSTANCE)
-CREATESTRUCT_hMenu=cast=(HMENU)
-CREATESTRUCT_hwndParent=cast=(HWND)
-CREATESTRUCT_cy=
-CREATESTRUCT_cx=
-CREATESTRUCT_y=
-CREATESTRUCT_x=
-CREATESTRUCT_style=
-CREATESTRUCT_lpszName=cast=(LPCTSTR)
-CREATESTRUCT_lpszClass=cast=(LPCTSTR)
-CREATESTRUCT_dwExStyle=
-
-org_eclipse_swt_internal_win32_DIBSECTION=
-DIBSECTION_biSize=accessor=dsBmih.biSize
-DIBSECTION_biWidth=accessor=dsBmih.biWidth
-DIBSECTION_biHeight=accessor=dsBmih.biHeight
-DIBSECTION_biPlanes=accessor=dsBmih.biPlanes
-DIBSECTION_biBitCount=accessor=dsBmih.biBitCount
-DIBSECTION_biCompression=accessor=dsBmih.biCompression
-DIBSECTION_biSizeImage=accessor=dsBmih.biSizeImage
-DIBSECTION_biXPelsPerMeter=accessor=dsBmih.biXPelsPerMeter
-DIBSECTION_biYPelsPerMeter=accessor=dsBmih.biYPelsPerMeter
-DIBSECTION_biClrUsed=accessor=dsBmih.biClrUsed
-DIBSECTION_biClrImportant=accessor=dsBmih.biClrImportant
-DIBSECTION_dsBitfields0=accessor=dsBitfields[0]
-DIBSECTION_dsBitfields1=accessor=dsBitfields[1]
-DIBSECTION_dsBitfields2=accessor=dsBitfields[2]
-DIBSECTION_dshSection=cast=(HANDLE)
-DIBSECTION_dsOffset=
-
-org_eclipse_swt_internal_win32_DLLVERSIONINFO=
-DLLVERSIONINFO_cbSize=
-DLLVERSIONINFO_dwMajorVersion=
-DLLVERSIONINFO_dwMinorVersion=
-DLLVERSIONINFO_dwBuildNumber=
-DLLVERSIONINFO_dwPlatformID=
-
-org_eclipse_swt_internal_win32_DOCINFO=
-DOCINFO_cbSize=
-DOCINFO_lpszDocName=cast=(LPCTSTR)
-DOCINFO_lpszOutput=cast=(LPCTSTR)
-DOCINFO_lpszDatatype=cast=(LPCTSTR)
-DOCINFO_fwType=
-
-org_eclipse_swt_internal_win32_DRAWITEMSTRUCT=
-DRAWITEMSTRUCT_CtlType=
-DRAWITEMSTRUCT_CtlID=
-DRAWITEMSTRUCT_itemID=
-DRAWITEMSTRUCT_itemAction=
-DRAWITEMSTRUCT_itemState=
-DRAWITEMSTRUCT_hwndItem=cast=(HWND)
-DRAWITEMSTRUCT_hDC=cast=(HDC)
-DRAWITEMSTRUCT_left=accessor=rcItem.left
-DRAWITEMSTRUCT_top=accessor=rcItem.top
-DRAWITEMSTRUCT_bottom=accessor=rcItem.bottom
-DRAWITEMSTRUCT_right=accessor=rcItem.right
-DRAWITEMSTRUCT_itemData=
-
-org_eclipse_swt_internal_win32_DROPFILES=
-DROPFILES_pFiles=
-DROPFILES_pt_x=accessor=pt.x
-DROPFILES_pt_y=accessor=pt.y
-DROPFILES_fNC=
-DROPFILES_fWide=
-
-org_eclipse_swt_internal_win32_FILETIME=
-FILETIME_dwLowDateTime=
-FILETIME_dwHighDateTime=
-
-org_eclipse_swt_internal_win32_GCP_1RESULTS=
-GCP_RESULTS_lStructSize=
-GCP_RESULTS_lpOutString=cast=(LPTSTR)
-GCP_RESULTS_lpOrder=cast=(UINT *)
-GCP_RESULTS_lpDx=cast=(int *)
-GCP_RESULTS_lpCaretPos=cast=(int *)
-GCP_RESULTS_lpClass=cast=(LPSTR)
-GCP_RESULTS_lpGlyphs=cast=(LPWSTR)
-GCP_RESULTS_nGlyphs=
-GCP_RESULTS_nMaxFit=
-
-org_eclipse_swt_internal_win32_GRADIENT_1RECT=
-GRADIENT_RECT_UpperLeft=
-GRADIENT_RECT_LowerRight=
-
-org_eclipse_swt_internal_win32_GUITHREADINFO=
-GUITHREADINFO_cbSize=cast=(DWORD)
-GUITHREADINFO_flags=cast=(DWORD)
-GUITHREADINFO_hwndActive=cast=(HWND)
-GUITHREADINFO_hwndFocus=cast=(HWND)
-GUITHREADINFO_hwndCapture=cast=(HWND)
-GUITHREADINFO_hwndMenuOwner=cast=(HWND)
-GUITHREADINFO_hwndMoveSize=cast=(HWND)
-GUITHREADINFO_hwndCaret=cast=(HWND)
-GUITHREADINFO_left=accessor=rcCaret.left
-GUITHREADINFO_top=accessor=rcCaret.top
-GUITHREADINFO_right=accessor=rcCaret.right
-GUITHREADINFO_bottom=accessor=rcCaret.bottom
-
-org_eclipse_swt_internal_win32_HDITEM=
-HDITEM_mask=
-HDITEM_cxy=
-HDITEM_pszText=cast=(LPTSTR)
-HDITEM_hbm=cast=(HBITMAP)
-HDITEM_cchTextMax=
-HDITEM_fmt=
-HDITEM_lParam=
-HDITEM_iImage=
-HDITEM_iOrder=
-
-org_eclipse_swt_internal_win32_HELPINFO=
-HELPINFO_cbSize=
-HELPINFO_iContextType=
-HELPINFO_iCtrlId=
-HELPINFO_hItemHandle=cast=(HANDLE)
-HELPINFO_dwContextId=
-HELPINFO_x=accessor=MousePos.x
-HELPINFO_y=accessor=MousePos.y
-
-org_eclipse_swt_internal_win32_HIGHCONTRAST=
-HIGHCONTRAST_cbSize=
-HIGHCONTRAST_dwFlags=
-HIGHCONTRAST_lpszDefaultScheme=cast=LPTSTR
-
-org_eclipse_swt_internal_win32_ICONINFO=
-ICONINFO_fIcon=
-ICONINFO_xHotspot=
-ICONINFO_yHotspot=
-ICONINFO_hbmMask=cast=(HBITMAP)
-ICONINFO_hbmColor=cast=(HBITMAP)
-
-org_eclipse_swt_internal_win32_INITCOMMONCONTROLSEX=
-INITCOMMONCONTROLSEX_dwSize=
-INITCOMMONCONTROLSEX_dwICC=
-
-org_eclipse_swt_internal_win32_INPUT=
-INPUT_type=
-
-org_eclipse_swt_internal_win32_KEYBDINPUT=
-KEYBDINPUT_wVk=
-KEYBDINPUT_wScan=
-KEYBDINPUT_dwFlags=
-KEYBDINPUT_time=
-KEYBDINPUT_dwExtraInfo=
-
-org_eclipse_swt_internal_win32_LOGBRUSH=
-LOGBRUSH_lbStyle=
-LOGBRUSH_lbColor=
-LOGBRUSH_lbHatch=
-
-org_eclipse_swt_internal_win32_LOGFONT=
-LOGFONT_lfHeight=
-LOGFONT_lfWidth=
-LOGFONT_lfEscapement=
-LOGFONT_lfOrientation=
-LOGFONT_lfWeight=
-LOGFONT_lfItalic=
-LOGFONT_lfUnderline=
-LOGFONT_lfStrikeOut=
-LOGFONT_lfCharSet=
-LOGFONT_lfOutPrecision=
-LOGFONT_lfClipPrecision=
-LOGFONT_lfQuality=
-LOGFONT_lfPitchAndFamily=
-
-org_eclipse_swt_internal_win32_LOGFONTA=
-LOGFONTA_lfFaceName=
-
-org_eclipse_swt_internal_win32_LOGFONTW=
-LOGFONTW_lfFaceName=
-
-org_eclipse_swt_internal_win32_LOGPEN=
-LOGPEN_lopnStyle=
-LOGPEN_x=accessor=lopnWidth.x
-LOGPEN_y=accessor=lopnWidth.y
-LOGPEN_lopnColor=
-
-org_eclipse_swt_internal_win32_LRESULT=flags=no_gen
-LRESULT_value=
-
-org_eclipse_swt_internal_win32_LVCOLUMN=
-LVCOLUMN_mask=
-LVCOLUMN_fmt=
-LVCOLUMN_cx=
-LVCOLUMN_pszText=cast=(LPTSTR)
-LVCOLUMN_cchTextMax=
-LVCOLUMN_iSubItem=
-LVCOLUMN_iImage=
-LVCOLUMN_iOrder=
-
-org_eclipse_swt_internal_win32_LVHITTESTINFO=
-LVHITTESTINFO_x=accessor=pt.x
-LVHITTESTINFO_y=accessor=pt.y
-LVHITTESTINFO_flags=
-LVHITTESTINFO_iItem=
-LVHITTESTINFO_iSubItem=
-
-org_eclipse_swt_internal_win32_LVITEM=
-LVITEM_mask=
-LVITEM_iItem=
-LVITEM_iSubItem=
-LVITEM_state=
-LVITEM_stateMask=
-LVITEM_pszText=cast=(LPTSTR)
-LVITEM_cchTextMax=
-LVITEM_iImage=
-LVITEM_lParam=
-LVITEM_iIndent=
-
-org_eclipse_swt_internal_win32_MARGINS=
-MARGINS_cxLeftWidth=
-MARGINS_cxRightWidth=
-MARGINS_cyTopHeight=
-MARGINS_cyBottomHeight=
-
-org_eclipse_swt_internal_win32_MEASUREITEMSTRUCT=
-MEASUREITEMSTRUCT_CtlType=
-MEASUREITEMSTRUCT_CtlID=
-MEASUREITEMSTRUCT_itemID=
-MEASUREITEMSTRUCT_itemWidth=
-MEASUREITEMSTRUCT_itemHeight=
-MEASUREITEMSTRUCT_itemData=
-
-org_eclipse_swt_internal_win32_MENUBARINFO=
-MENUBARINFO_cbSize=
-MENUBARINFO_left=accessor=rcBar.left
-MENUBARINFO_top=accessor=rcBar.top
-MENUBARINFO_right=accessor=rcBar.right
-MENUBARINFO_bottom=accessor=rcBar.bottom
-MENUBARINFO_hMenu=cast=(HMENU)
-MENUBARINFO_hwndMenu=cast=(HWND)
-MENUBARINFO_fBarFocused=
-MENUBARINFO_fFocused=
-
-org_eclipse_swt_internal_win32_MENUINFO=
-MENUINFO_cbSize=
-MENUINFO_fMask=
-MENUINFO_dwStyle=
-MENUINFO_cyMax=
-MENUINFO_hbrBack=cast=(HBRUSH)
-MENUINFO_dwContextHelpID=
-MENUINFO_dwMenuData=
-
-org_eclipse_swt_internal_win32_MENUITEMINFO=
-MENUITEMINFO_cbSize=
-MENUITEMINFO_fMask=
-MENUITEMINFO_fType=
-MENUITEMINFO_fState=
-MENUITEMINFO_wID=
-MENUITEMINFO_hSubMenu=cast=(HMENU)
-MENUITEMINFO_hbmpChecked=cast=(HBITMAP)
-MENUITEMINFO_hbmpUnchecked=cast=(HBITMAP)
-MENUITEMINFO_dwItemData=
-MENUITEMINFO_dwTypeData=cast=(LPTSTR)
-MENUITEMINFO_cch=
-MENUITEMINFO_hbmpItem=cast=(HBITMAP),flags=no_wince
-
-org_eclipse_swt_internal_win32_MINMAXINFO=
-MINMAXINFO_ptReserved_x=accessor=ptReserved.x
-MINMAXINFO_ptReserved_y=accessor=ptReserved.y
-MINMAXINFO_ptMaxSize_x=accessor=ptMaxSize.x
-MINMAXINFO_ptMaxSize_y=accessor=ptMaxSize.y
-MINMAXINFO_ptMaxPosition_x=accessor=ptMaxPosition.x
-MINMAXINFO_ptMaxPosition_y=accessor=ptMaxPosition.y
-MINMAXINFO_ptMinTrackSize_x=accessor=ptMinTrackSize.x
-MINMAXINFO_ptMinTrackSize_y=accessor=ptMinTrackSize.y
-MINMAXINFO_ptMaxTrackSize_x=accessor=ptMaxTrackSize.x
-MINMAXINFO_ptMaxTrackSize_y=accessor=ptMaxTrackSize.y
-
-org_eclipse_swt_internal_win32_MONITORINFO=
-MONITORINFO_cbSize=
-MONITORINFO_rcMonitor_left=accessor=rcMonitor.left
-MONITORINFO_rcMonitor_top=accessor=rcMonitor.top
-MONITORINFO_rcMonitor_right=accessor=rcMonitor.right
-MONITORINFO_rcMonitor_bottom=accessor=rcMonitor.bottom
-MONITORINFO_rcWork_left=accessor=rcWork.left
-MONITORINFO_rcWork_top=accessor=rcWork.top
-MONITORINFO_rcWork_right=accessor=rcWork.right
-MONITORINFO_rcWork_bottom=accessor=rcWork.bottom
-MONITORINFO_dwFlags=
-
-org_eclipse_swt_internal_win32_MOUSEINPUT=
-MOUSEINPUT_dx=
-MOUSEINPUT_dy=
-MOUSEINPUT_mouseData=
-MOUSEINPUT_dwFlags=
-MOUSEINPUT_time=
-MOUSEINPUT_dwExtraInfo=
-
-org_eclipse_swt_internal_win32_MSG=
-MSG_hwnd=cast=(HWND)
-MSG_message=
-MSG_wParam=
-MSG_lParam=
-MSG_time=
-MSG_x=accessor=pt.x
-MSG_y=accessor=pt.y
-
-org_eclipse_swt_internal_win32_NMCUSTOMDRAW=
-NMCUSTOMDRAW_dwDrawStage=
-NMCUSTOMDRAW_hdc=cast=(HDC)
-NMCUSTOMDRAW_left=accessor=rc.left
-NMCUSTOMDRAW_top=accessor=rc.top
-NMCUSTOMDRAW_right=accessor=rc.right
-NMCUSTOMDRAW_bottom=accessor=rc.bottom
-NMCUSTOMDRAW_dwItemSpec=
-NMCUSTOMDRAW_uItemState=
-NMCUSTOMDRAW_lItemlParam=
-
-org_eclipse_swt_internal_win32_NMHDR=
-NMHDR_hwndFrom=cast=(HWND)
-NMHDR_idFrom=
-NMHDR_code=
-
-org_eclipse_swt_internal_win32_NMHEADER=
-NMHEADER_iItem=
-NMHEADER_iButton=
-NMHEADER_pitem=cast=(HDITEM FAR *)
-
-org_eclipse_swt_internal_win32_NMLISTVIEW=
-NMLISTVIEW_iItem=
-NMLISTVIEW_iSubItem=
-NMLISTVIEW_uNewState=
-NMLISTVIEW_uOldState=
-NMLISTVIEW_uChanged=
-NMLISTVIEW_x=accessor=ptAction.x
-NMLISTVIEW_y=accessor=ptAction.y
-NMLISTVIEW_lParam=
-
-org_eclipse_swt_internal_win32_NMLVCUSTOMDRAW=
-NMLVCUSTOMDRAW_clrText=
-NMLVCUSTOMDRAW_clrTextBk=
-NMLVCUSTOMDRAW_iSubItem=
-
-org_eclipse_swt_internal_win32_NMLVDISPINFO=
-NMLVDISPINFO_mask=accessor=item.mask
-NMLVDISPINFO_iItem=accessor=item.iItem
-NMLVDISPINFO_iSubItem=accessor=item.iSubItem
-NMLVDISPINFO_state=accessor=item.state
-NMLVDISPINFO_stateMask=accessor=item.stateMask
-NMLVDISPINFO_pszText=accessor=item.pszText,cast=LPTSTR
-NMLVDISPINFO_cchTextMax=accessor=item.cchTextMax
-NMLVDISPINFO_iImage=accessor=item.iImage
-NMLVDISPINFO_lParam=accessor=item.lParam
-NMLVDISPINFO_iIndent=accessor=item.iIndent
-
-org_eclipse_swt_internal_win32_NMLVFINDITEM=
-NMLVFINDITEM_iStart=
-NMLVFINDITEM_flags=accessor=lvfi.flags
-NMLVFINDITEM_psz=accessor=lvfi.psz,cast=LPCTSTR
-NMLVFINDITEM_lParam=accessor=lvfi.lParam
-NMLVFINDITEM_x=accessor=lvfi.pt.x
-NMLVFINDITEM_y=accessor=lvfi.pt.y
-NMLVFINDITEM_vkDirection=accessor=lvfi.vkDirection
-
-org_eclipse_swt_internal_win32_NMREBARCHEVRON=
-NMREBARCHEVRON_uBand=
-NMREBARCHEVRON_wID=
-NMREBARCHEVRON_lParam=
-NMREBARCHEVRON_left=accessor=rc.left
-NMREBARCHEVRON_top=accessor=rc.top
-NMREBARCHEVRON_right=accessor=rc.right
-NMREBARCHEVRON_bottom=accessor=rc.bottom
-NMREBARCHEVRON_lParamNM=
-
-org_eclipse_swt_internal_win32_NMRGINFO=
-NMRGINFO_x=accessor=ptAction.x
-NMRGINFO_y=accessor=ptAction.y
-NMRGINFO_dwItemSpec=
-
-org_eclipse_swt_internal_win32_NMTOOLBAR=
-NMTOOLBAR_iItem=
-NMTOOLBAR_iBitmap=accessor=tbButton.iBitmap
-NMTOOLBAR_idCommand=accessor=tbButton.idCommand
-NMTOOLBAR_fsState=accessor=tbButton.fsState
-NMTOOLBAR_fsStyle=accessor=tbButton.fsStyle
-NMTOOLBAR_dwData=accessor=tbButton.dwData
-NMTOOLBAR_iString=accessor=tbButton.iString
-NMTOOLBAR_cchText=
-NMTOOLBAR_pszText=cast=(LPTSTR)
-NMTOOLBAR_left=accessor=rcButton.left,flags=no_wince
-NMTOOLBAR_top=accessor=rcButton.top,flags=no_wince
-NMTOOLBAR_right=accessor=rcButton.right,flags=no_wince
-NMTOOLBAR_bottom=accessor=rcButton.bottom,flags=no_wince
-
-org_eclipse_swt_internal_win32_NMTTDISPINFO=
-NMTTDISPINFO_lpszText=cast=(void *)
-NMTTDISPINFO_hinst=cast=(HINSTANCE)
-NMTTDISPINFO_uFlags=
-NMTTDISPINFO_lParam=
-
-org_eclipse_swt_internal_win32_NMTTDISPINFOA=
-NMTTDISPINFOA_szText=
-
-org_eclipse_swt_internal_win32_NMTTDISPINFOW=
-NMTTDISPINFOW_szText=
-
-org_eclipse_swt_internal_win32_NMTVCUSTOMDRAW=
-NMTVCUSTOMDRAW_clrText=
-NMTVCUSTOMDRAW_clrTextBk=
-NMTVCUSTOMDRAW_iLevel=flags=no_wince
-
-org_eclipse_swt_internal_win32_NONCLIENTMETRICS=
-NONCLIENTMETRICS_cbSize=
-NONCLIENTMETRICS_iBorderWidth=
-NONCLIENTMETRICS_iScrollWidth=
-NONCLIENTMETRICS_iScrollHeight=
-NONCLIENTMETRICS_iCaptionWidth=
-NONCLIENTMETRICS_iCaptionHeight=
-NONCLIENTMETRICS_iSmCaptionWidth=
-NONCLIENTMETRICS_iSmCaptionHeight=
-NONCLIENTMETRICS_iMenuWidth=
-NONCLIENTMETRICS_iMenuHeight=
-
-org_eclipse_swt_internal_win32_NONCLIENTMETRICSA=
-NONCLIENTMETRICSA_lfCaptionFont=
-NONCLIENTMETRICSA_lfSmCaptionFont=
-NONCLIENTMETRICSA_lfMenuFont=
-NONCLIENTMETRICSA_lfStatusFont=
-NONCLIENTMETRICSA_lfMessageFont=
-
-org_eclipse_swt_internal_win32_NONCLIENTMETRICSW=
-NONCLIENTMETRICSW_lfCaptionFont=
-NONCLIENTMETRICSW_lfSmCaptionFont=
-NONCLIENTMETRICSW_lfMenuFont=
-NONCLIENTMETRICSW_lfStatusFont=
-NONCLIENTMETRICSW_lfMessageFont=
-
-org_eclipse_swt_internal_win32_NOTIFYICONDATA=
-NOTIFYICONDATA_cbSize=
-NOTIFYICONDATA_hWnd=cast=(HWND)
-NOTIFYICONDATA_uID=
-NOTIFYICONDATA_uFlags=
-NOTIFYICONDATA_uCallbackMessage=
-NOTIFYICONDATA_hIcon=cast=(HICON)
-NOTIFYICONDATA_dwState=flags=no_wince
-NOTIFYICONDATA_dwStateMask=flags=no_wince
-NOTIFYICONDATA_uVersion=flags=no_wince
-NOTIFYICONDATA_dwInfoFlags=flags=no_wince
-
-org_eclipse_swt_internal_win32_NOTIFYICONDATAA=
-NOTIFYICONDATAA_szTip=cast=(TCHAR)
-NOTIFYICONDATAA_szInfo=cast=(TCHAR),flags=no_wince
-NOTIFYICONDATAA_szInfoTitle=cast=(TCHAR),flags=no_wince
-
-org_eclipse_swt_internal_win32_NOTIFYICONDATAW=
-NOTIFYICONDATAW_szTip=cast=(TCHAR)
-NOTIFYICONDATAW_szInfo=cast=(TCHAR),flags=no_wince
-NOTIFYICONDATAW_szInfoTitle=cast=(TCHAR),flags=no_wince
-
-org_eclipse_swt_internal_win32_OPENFILENAME=
-OPENFILENAME_lStructSize=
-OPENFILENAME_hwndOwner=cast=(HWND)
-OPENFILENAME_hInstance=cast=(HINSTANCE)
-OPENFILENAME_lpstrFilter=cast=(LPCTSTR)
-OPENFILENAME_lpstrCustomFilter=cast=(LPTSTR)
-OPENFILENAME_nMaxCustFilter=
-OPENFILENAME_nFilterIndex=
-OPENFILENAME_lpstrFile=cast=(LPTSTR)
-OPENFILENAME_nMaxFile=
-OPENFILENAME_lpstrFileTitle=cast=(LPTSTR)
-OPENFILENAME_nMaxFileTitle=
-OPENFILENAME_lpstrInitialDir=cast=(LPCTSTR)
-OPENFILENAME_lpstrTitle=cast=(LPCTSTR)
-OPENFILENAME_Flags=
-OPENFILENAME_nFileOffset=
-OPENFILENAME_nFileExtension=
-OPENFILENAME_lpstrDefExt=cast=(LPCTSTR)
-OPENFILENAME_lCustData=
-OPENFILENAME_lpfnHook=cast=(LPOFNHOOKPROC)
-OPENFILENAME_lpTemplateName=cast=(LPCTSTR)
-
-org_eclipse_swt_internal_win32_OS=
-OS_AbortDoc=
-OS_AbortDoc_0=cast=(HDC)
-
-OS_ActivateKeyboardLayout=
-OS_ActivateKeyboardLayout_0=cast=(HKL)
-OS_ActivateKeyboardLayout_1=
-
-OS_AdjustWindowRectEx=
-OS_AdjustWindowRectEx_0=
-OS_AdjustWindowRectEx_1=
-OS_AdjustWindowRectEx_2=
-OS_AdjustWindowRectEx_3=
-
-OS_Arc=
-OS_Arc_0=cast=(HDC)
-OS_Arc_1=
-OS_Arc_2=
-OS_Arc_3=
-OS_Arc_4=
-OS_Arc_5=
-OS_Arc_6=
-OS_Arc_7=
-OS_Arc_8=
-
-OS_BeginDeferWindowPos=
-OS_BeginDeferWindowPos_0=
-
-OS_BeginPaint=
-OS_BeginPaint_0=cast=(HWND)
-OS_BeginPaint_1=
-
-OS_BitBlt=
-OS_BitBlt_0=cast=(HDC)
-OS_BitBlt_1=
-OS_BitBlt_2=
-OS_BitBlt_3=
-OS_BitBlt_4=
-OS_BitBlt_5=cast=(HDC)
-OS_BitBlt_6=
-OS_BitBlt_7=
-OS_BitBlt_8=
-
-OS_BringWindowToTop=
-OS_BringWindowToTop_0=cast=(HWND)
-
-OS_Call=
-OS_Call_0=cast=(DLLGETVERSIONPROC)
-OS_Call_1=
-
-OS_CallNextHookEx=
-OS_CallNextHookEx_0=cast=(HHOOK)
-OS_CallNextHookEx_1=
-OS_CallNextHookEx_2=cast=(WPARAM)
-OS_CallNextHookEx_3=cast=(LPARAM)
-
-OS_CallWindowProcA=
-OS_CallWindowProcA_0=cast=(WNDPROC)
-OS_CallWindowProcA_1=cast=(HWND)
-OS_CallWindowProcA_2=
-OS_CallWindowProcA_3=
-OS_CallWindowProcA_4=
-
-OS_CallWindowProcW=
-OS_CallWindowProcW_0=cast=(WNDPROC)
-OS_CallWindowProcW_1=cast=(HWND)
-OS_CallWindowProcW_2=
-OS_CallWindowProcW_3=
-OS_CallWindowProcW_4=
-
-OS_CharLowerA=
-OS_CharLowerA_0=cast=(LPSTR)
-
-OS_CharLowerW=
-OS_CharLowerW_0=cast=(LPWSTR)
-
-OS_CharUpperA=
-OS_CharUpperA_0=cast=(LPSTR)
-
-OS_CharUpperW=
-OS_CharUpperW_0=cast=(LPWSTR)
-
-OS_CheckMenuItem=
-OS_CheckMenuItem_0=cast=(HMENU)
-OS_CheckMenuItem_1=cast=(UINT)
-OS_CheckMenuItem_2=cast=(UINT)
-
-OS_ChooseColorA=
-OS_ChooseColorA_0=
-
-OS_ChooseColorW=
-OS_ChooseColorW_0=cast=(LPCHOOSECOLORW)
-
-OS_ChooseFontA=
-OS_ChooseFontA_0=
-
-OS_ChooseFontW=
-OS_ChooseFontW_0=cast=(LPCHOOSEFONTW)
-
-OS_ClientToScreen=
-OS_ClientToScreen_0=cast=(HWND)
-OS_ClientToScreen_1=
-
-OS_CloseClipboard=
-
-OS_CoCreateInstance=
-OS_CoCreateInstance_0=cast=REFCLSID
-OS_CoCreateInstance_1=cast=LPUNKNOWN
-OS_CoCreateInstance_2=
-OS_CoCreateInstance_3=cast=REFIID
-OS_CoCreateInstance_4=cast=LPVOID *
-
-OS_CombineRgn=
-OS_CombineRgn_0=cast=(HRGN)
-OS_CombineRgn_1=cast=(HRGN)
-OS_CombineRgn_2=cast=(HRGN)
-OS_CombineRgn_3=
-
-OS_CommDlgExtendedError=
-
-OS_CommandBar_AddAdornments=
-OS_CommandBar_AddAdornments_0=cast=(HWND)
-OS_CommandBar_AddAdornments_1=
-OS_CommandBar_AddAdornments_2=
-
-OS_CommandBar_Create=
-OS_CommandBar_Create_0=cast=(HINSTANCE)
-OS_CommandBar_Create_1=cast=(HWND)
-OS_CommandBar_Create_2=
-
-OS_CommandBar_Destroy=
-OS_CommandBar_Destroy_0=cast=(HWND)
-
-OS_CommandBar_DrawMenuBar=
-OS_CommandBar_DrawMenuBar_0=cast=(HWND)
-OS_CommandBar_DrawMenuBar_1=cast=(WORD)
-
-OS_CommandBar_Height=
-OS_CommandBar_Height_0=cast=(HWND)
-
-OS_CommandBar_InsertMenubarEx=
-OS_CommandBar_InsertMenubarEx_0=cast=(HWND)
-OS_CommandBar_InsertMenubarEx_1=cast=(HINSTANCE)
-OS_CommandBar_InsertMenubarEx_2=cast=(LPTSTR)
-OS_CommandBar_InsertMenubarEx_3=cast=(WORD)
-
-OS_CommandBar_Show=
-OS_CommandBar_Show_0=cast=(HWND)
-OS_CommandBar_Show_1=cast=(BOOL)
-
-OS_CopyImage=
-OS_CopyImage_0=cast=(HANDLE)
-OS_CopyImage_1=
-OS_CopyImage_2=
-OS_CopyImage_3=
-OS_CopyImage_4=
-
-OS_CreateAcceleratorTableA=
-OS_CreateAcceleratorTableA_0=cast=(LPACCEL)
-OS_CreateAcceleratorTableA_1=
-
-OS_CreateAcceleratorTableW=
-OS_CreateAcceleratorTableW_0=cast=(LPACCEL)
-OS_CreateAcceleratorTableW_1=
-
-OS_CreateBitmap=
-OS_CreateBitmap_0=
-OS_CreateBitmap_1=
-OS_CreateBitmap_2=
-OS_CreateBitmap_3=
-OS_CreateBitmap_4=cast=(CONST VOID *),flags=no_out critical
-
-OS_CreateCaret=
-OS_CreateCaret_0=cast=(HWND)
-OS_CreateCaret_1=cast=(HBITMAP)
-OS_CreateCaret_2=
-OS_CreateCaret_3=
-
-OS_CreateCompatibleBitmap=
-OS_CreateCompatibleBitmap_0=cast=(HDC)
-OS_CreateCompatibleBitmap_1=
-OS_CreateCompatibleBitmap_2=
-
-OS_CreateCompatibleDC=
-OS_CreateCompatibleDC_0=cast=(HDC)
-
-OS_CreateCursor=
-OS_CreateCursor_0=cast=(HINSTANCE)
-OS_CreateCursor_1=
-OS_CreateCursor_2=
-OS_CreateCursor_3=
-OS_CreateCursor_4=
-OS_CreateCursor_5=cast=(CONST VOID *),flags=no_out critical
-OS_CreateCursor_6=cast=(CONST VOID *),flags=no_out critical
-
-OS_CreateDCA=
-OS_CreateDCA_0=cast=(LPSTR)
-OS_CreateDCA_1=cast=(LPSTR)
-OS_CreateDCA_2=cast=(LPSTR)
-OS_CreateDCA_3=cast=(CONST DEVMODE *)
-
-OS_CreateDCW=
-OS_CreateDCW_0=cast=(LPWSTR)
-OS_CreateDCW_1=cast=(LPWSTR)
-OS_CreateDCW_2=cast=(LPWSTR)
-OS_CreateDCW_3=cast=(CONST DEVMODEW *)
-
-OS_CreateDIBSection=
-OS_CreateDIBSection_0=cast=(HDC)
-OS_CreateDIBSection_1=cast=(BITMAPINFO *),flags=no_out critical
-OS_CreateDIBSection_2=
-OS_CreateDIBSection_3=cast=(VOID **),flags=no_in critical
-OS_CreateDIBSection_4=cast=(HANDLE)
-OS_CreateDIBSection_5=
-
-OS_CreateFontIndirectA__I=
-OS_CreateFontIndirectA__I_0=cast=(LPLOGFONTA)
-
-OS_CreateFontIndirectA__Lorg_eclipse_swt_internal_win32_LOGFONTA_2=
-OS_CreateFontIndirectA__Lorg_eclipse_swt_internal_win32_LOGFONTA_2_0=flags=no_out
-
-OS_CreateFontIndirectW__I=
-OS_CreateFontIndirectW__I_0=cast=(LPLOGFONTW)
-
-OS_CreateFontIndirectW__Lorg_eclipse_swt_internal_win32_LOGFONTW_2=
-OS_CreateFontIndirectW__Lorg_eclipse_swt_internal_win32_LOGFONTW_2_0=flags=no_out
-
-OS_CreateIconIndirect=
-OS_CreateIconIndirect_0=flags=no_out
-
-OS_CreateMenu=
-
-OS_CreatePalette=
-OS_CreatePalette_0=cast=(LOGPALETTE *),flags=no_out critical
-
-OS_CreatePatternBrush=
-OS_CreatePatternBrush_0=cast=(HBITMAP)
-
-OS_CreatePen=
-OS_CreatePen_0=
-OS_CreatePen_1=
-OS_CreatePen_2=cast=(COLORREF)
-
-OS_CreatePolygonRgn=
-OS_CreatePolygonRgn_0=cast=(CONST POINT *)
-OS_CreatePolygonRgn_1=
-OS_CreatePolygonRgn_2=
-
-OS_CreatePopupMenu=
-
-OS_CreateRectRgn=
-OS_CreateRectRgn_0=
-OS_CreateRectRgn_1=
-OS_CreateRectRgn_2=
-OS_CreateRectRgn_3=
-
-OS_CreateSolidBrush=
-OS_CreateSolidBrush_0=cast=(COLORREF)
-
-OS_CreateStreamOnHGlobal=
-OS_CreateStreamOnHGlobal_0=cast=HGLOBAL
-OS_CreateStreamOnHGlobal_1=cast=BOOL
-OS_CreateStreamOnHGlobal_2=cast=LPSTREAM *
-
-OS_CreateWindowExA=
-OS_CreateWindowExA_0=
-OS_CreateWindowExA_1=cast=(LPSTR)
-OS_CreateWindowExA_2=
-OS_CreateWindowExA_3=
-OS_CreateWindowExA_4=
-OS_CreateWindowExA_5=
-OS_CreateWindowExA_6=
-OS_CreateWindowExA_7=
-OS_CreateWindowExA_8=cast=(HWND)
-OS_CreateWindowExA_9=cast=(HMENU)
-OS_CreateWindowExA_10=cast=(HINSTANCE)
-OS_CreateWindowExA_11=
-
-OS_CreateWindowExW=
-OS_CreateWindowExW_0=
-OS_CreateWindowExW_1=cast=(LPWSTR)
-OS_CreateWindowExW_2=cast=(LPWSTR)
-OS_CreateWindowExW_3=
-OS_CreateWindowExW_4=
-OS_CreateWindowExW_5=
-OS_CreateWindowExW_6=
-OS_CreateWindowExW_7=
-OS_CreateWindowExW_8=cast=(HWND)
-OS_CreateWindowExW_9=cast=(HMENU)
-OS_CreateWindowExW_10=cast=(HINSTANCE)
-OS_CreateWindowExW_11=
-
-OS_DefFrameProcA=
-OS_DefFrameProcA_0=cast=(HWND)
-OS_DefFrameProcA_1=cast=(HWND)
-OS_DefFrameProcA_2=
-OS_DefFrameProcA_3=cast=(WPARAM)
-OS_DefFrameProcA_4=cast=(LPARAM)
-
-OS_DefFrameProcW=
-OS_DefFrameProcW_0=cast=(HWND)
-OS_DefFrameProcW_1=cast=(HWND)
-OS_DefFrameProcW_2=
-OS_DefFrameProcW_3=cast=(WPARAM)
-OS_DefFrameProcW_4=cast=(LPARAM)
-
-OS_DefMDIChildProcA=
-OS_DefMDIChildProcA_0=cast=(HWND)
-OS_DefMDIChildProcA_1=
-OS_DefMDIChildProcA_2=cast=(WPARAM)
-OS_DefMDIChildProcA_3=cast=(LPARAM)
-
-OS_DefMDIChildProcW=
-OS_DefMDIChildProcW_0=cast=(HWND)
-OS_DefMDIChildProcW_1=
-OS_DefMDIChildProcW_2=cast=(WPARAM)
-OS_DefMDIChildProcW_3=cast=(LPARAM)
-
-OS_DefWindowProcA=
-OS_DefWindowProcA_0=cast=(HWND)
-OS_DefWindowProcA_1=
-OS_DefWindowProcA_2=cast=(WPARAM)
-OS_DefWindowProcA_3=cast=(LPARAM)
-
-OS_DefWindowProcW=
-OS_DefWindowProcW_0=cast=(HWND)
-OS_DefWindowProcW_1=
-OS_DefWindowProcW_2=cast=(WPARAM)
-OS_DefWindowProcW_3=cast=(LPARAM)
-
-OS_DeferWindowPos=
-OS_DeferWindowPos_0=cast=(HDWP)
-OS_DeferWindowPos_1=cast=(HWND)
-OS_DeferWindowPos_2=cast=(HWND)
-OS_DeferWindowPos_3=
-OS_DeferWindowPos_4=
-OS_DeferWindowPos_5=
-OS_DeferWindowPos_6=
-OS_DeferWindowPos_7=
-
-OS_DeleteDC=
-OS_DeleteDC_0=cast=(HDC)
-
-OS_DeleteMenu=
-OS_DeleteMenu_0=cast=(HMENU)
-OS_DeleteMenu_1=
-OS_DeleteMenu_2=
-
-OS_DeleteObject=
-OS_DeleteObject_0=cast=(HGDIOBJ)
-
-OS_DestroyAcceleratorTable=
-OS_DestroyAcceleratorTable_0=cast=(HACCEL)
-
-OS_DestroyCaret=
-
-OS_DestroyCursor=
-OS_DestroyCursor_0=cast=(HCURSOR)
-
-OS_DestroyIcon=
-OS_DestroyIcon_0=cast=(HICON)
-
-OS_DestroyMenu=
-OS_DestroyMenu_0=cast=(HMENU)
-
-OS_DestroyWindow=
-OS_DestroyWindow_0=cast=(HWND)
-
-OS_DispatchMessageA=
-OS_DispatchMessageA_0=
-
-OS_DispatchMessageW=
-OS_DispatchMessageW_0=
-
-OS_DragDetect=
-OS_DragDetect_0=cast=(HWND)
-OS_DragDetect_1=flags=struct
-
-OS_DragFinish=
-OS_DragFinish_0=cast=(HDROP)
-
-OS_DragQueryFileA=
-OS_DragQueryFileA_0=cast=(HDROP)
-OS_DragQueryFileA_1=
-OS_DragQueryFileA_2=cast=(LPTSTR)
-OS_DragQueryFileA_3=
-
-OS_DragQueryFileW=
-OS_DragQueryFileW_0=cast=(HDROP)
-OS_DragQueryFileW_1=
-OS_DragQueryFileW_2=cast=(LPWSTR)
-OS_DragQueryFileW_3=
-
-OS_DrawEdge=
-OS_DrawEdge_0=cast=(HDC)
-OS_DrawEdge_1=
-OS_DrawEdge_2=
-OS_DrawEdge_3=
-
-OS_DrawFocusRect=
-OS_DrawFocusRect_0=cast=(HDC)
-OS_DrawFocusRect_1=
-
-OS_DrawFrameControl=
-OS_DrawFrameControl_0=cast=(HDC)
-OS_DrawFrameControl_1=
-OS_DrawFrameControl_2=
-OS_DrawFrameControl_3=
-
-OS_DrawIconEx=
-OS_DrawIconEx_0=cast=(HDC)
-OS_DrawIconEx_1=
-OS_DrawIconEx_2=
-OS_DrawIconEx_3=cast=(HICON)
-OS_DrawIconEx_4=
-OS_DrawIconEx_5=
-OS_DrawIconEx_6=
-OS_DrawIconEx_7=cast=(HBRUSH)
-OS_DrawIconEx_8=
-
-OS_DrawMenuBar=
-OS_DrawMenuBar_0=cast=(HWND)
-
-OS_DrawStateA=
-OS_DrawStateA_0=cast=(HDC)
-OS_DrawStateA_1=cast=(HBRUSH)
-OS_DrawStateA_2=cast=(DRAWSTATEPROC)
-OS_DrawStateA_3=cast=(LPARAM)
-OS_DrawStateA_4=cast=(WPARAM)
-OS_DrawStateA_5=
-OS_DrawStateA_6=
-OS_DrawStateA_7=
-OS_DrawStateA_8=
-OS_DrawStateA_9=
-
-OS_DrawStateW=
-OS_DrawStateW_0=cast=(HDC)
-OS_DrawStateW_1=cast=(HBRUSH)
-OS_DrawStateW_2=cast=(DRAWSTATEPROC)
-OS_DrawStateW_3=cast=(LPARAM)
-OS_DrawStateW_4=cast=(WPARAM)
-OS_DrawStateW_5=
-OS_DrawStateW_6=
-OS_DrawStateW_7=
-OS_DrawStateW_8=
-OS_DrawStateW_9=
-
-OS_DrawTextA=
-OS_DrawTextA_0=cast=(HDC)
-OS_DrawTextA_1=cast=(LPSTR),flags=no_out critical
-OS_DrawTextA_2=
-OS_DrawTextA_3=
-OS_DrawTextA_4=
-
-OS_DrawTextW=
-OS_DrawTextW_0=cast=(HDC)
-OS_DrawTextW_1=cast=(LPWSTR),flags=no_out critical
-OS_DrawTextW_2=
-OS_DrawTextW_3=
-OS_DrawTextW_4=
-
-OS_Ellipse=
-OS_Ellipse_0=cast=(HDC)
-OS_Ellipse_1=
-OS_Ellipse_2=
-OS_Ellipse_3=
-OS_Ellipse_4=
-
-OS_EnableMenuItem=
-OS_EnableMenuItem_0=cast=(HMENU)
-OS_EnableMenuItem_1=
-OS_EnableMenuItem_2=
-
-OS_EnableScrollBar=
-OS_EnableScrollBar_0=cast=(HWND)
-OS_EnableScrollBar_1=
-OS_EnableScrollBar_2=
-
-OS_EnableWindow=
-OS_EnableWindow_0=cast=(HWND)
-OS_EnableWindow_1=
-
-OS_EndDeferWindowPos=
-OS_EndDeferWindowPos_0=cast=(HDWP)
-
-OS_EndDoc=
-OS_EndDoc_0=cast=(HDC)
-
-OS_EndPage=
-OS_EndPage_0=cast=(HDC)
-
-OS_EndPaint=
-OS_EndPaint_0=cast=(HWND)
-OS_EndPaint_1=
-
-OS_EnumDisplayMonitors=flags=dynamic
-OS_EnumDisplayMonitors_0=cast=(HDC)
-OS_EnumDisplayMonitors_1=cast=(LPCRECT)
-OS_EnumDisplayMonitors_2=cast=(MONITORENUMPROC)
-OS_EnumDisplayMonitors_3=cast=(LPARAM)
-
-OS_EnumFontFamiliesA=
-OS_EnumFontFamiliesA_0=cast=(HDC)
-OS_EnumFontFamiliesA_1=cast=(LPSTR)
-OS_EnumFontFamiliesA_2=cast=(FONTENUMPROC)
-OS_EnumFontFamiliesA_3=cast=(LPARAM)
-
-OS_EnumFontFamiliesExA=
-OS_EnumFontFamiliesExA_0=cast=HDC
-OS_EnumFontFamiliesExA_1=cast=LPLOGFONTA
-OS_EnumFontFamiliesExA_2=cast=(FONTENUMPROCA)
-OS_EnumFontFamiliesExA_3=cast=(LPARAM)
-OS_EnumFontFamiliesExA_4=
-
-OS_EnumFontFamiliesExW=
-OS_EnumFontFamiliesExW_0=cast=HDC
-OS_EnumFontFamiliesExW_1=cast=LPLOGFONTW
-OS_EnumFontFamiliesExW_2=cast=FONTENUMPROCW
-OS_EnumFontFamiliesExW_3=cast=LPARAM
-OS_EnumFontFamiliesExW_4=
-
-OS_EnumFontFamiliesW=
-OS_EnumFontFamiliesW_0=cast=(HDC)
-OS_EnumFontFamiliesW_1=cast=(LPCWSTR)
-OS_EnumFontFamiliesW_2=cast=(FONTENUMPROCW)
-OS_EnumFontFamiliesW_3=cast=(LPARAM)
-
-OS_EnumSystemLanguageGroupsA=flags=dynamic
-OS_EnumSystemLanguageGroupsA_0=cast=(LANGUAGEGROUP_ENUMPROCA)
-OS_EnumSystemLanguageGroupsA_1=
-OS_EnumSystemLanguageGroupsA_2=cast=(LONG_PTR)
-
-OS_EnumSystemLanguageGroupsW=flags=dynamic
-OS_EnumSystemLanguageGroupsW_0=cast=(LANGUAGEGROUP_ENUMPROCW)
-OS_EnumSystemLanguageGroupsW_1=
-OS_EnumSystemLanguageGroupsW_2=cast=(LONG_PTR)
-
-OS_EnumSystemLocalesA=
-OS_EnumSystemLocalesA_0=cast=(LOCALE_ENUMPROCA)
-OS_EnumSystemLocalesA_1=
-
-OS_EnumSystemLocalesW=
-OS_EnumSystemLocalesW_0=cast=(LOCALE_ENUMPROCW)
-OS_EnumSystemLocalesW_1=
-
-OS_EqualRect=
-OS_EqualRect_0=cast=(CONST RECT *),flags=no_out
-OS_EqualRect_1=cast=(CONST RECT *),flags=no_out
-
-OS_EqualRgn=
-OS_EqualRgn_0=cast=(HRGN)
-OS_EqualRgn_1=cast=(HRGN)
-
-OS_ExpandEnvironmentStringsA=
-OS_ExpandEnvironmentStringsA_0=
-OS_ExpandEnvironmentStringsA_1=
-OS_ExpandEnvironmentStringsA_2=
-
-OS_ExpandEnvironmentStringsW=
-OS_ExpandEnvironmentStringsW_0=
-OS_ExpandEnvironmentStringsW_1=
-OS_ExpandEnvironmentStringsW_2=
-
-OS_ExtTextOutA=
-OS_ExtTextOutA_0=cast=(HDC)
-OS_ExtTextOutA_1=
-OS_ExtTextOutA_2=
-OS_ExtTextOutA_3=
-OS_ExtTextOutA_4=flags=no_out
-OS_ExtTextOutA_5=cast=(LPSTR),flags=no_out critical
-OS_ExtTextOutA_6=
-OS_ExtTextOutA_7=cast=(CONST INT *),flags=no_out critical
-
-OS_ExtTextOutW=
-OS_ExtTextOutW_0=cast=(HDC)
-OS_ExtTextOutW_1=
-OS_ExtTextOutW_2=
-OS_ExtTextOutW_3=
-OS_ExtTextOutW_4=flags=no_out
-OS_ExtTextOutW_5=cast=(LPWSTR),flags=no_out critical
-OS_ExtTextOutW_6=
-OS_ExtTextOutW_7=cast=(CONST INT *),flags=no_out critical
-
-OS_ExtractIconExA=
-OS_ExtractIconExA_0=cast=(LPSTR)
-OS_ExtractIconExA_1=
-OS_ExtractIconExA_2=cast=(HICON FAR *)
-OS_ExtractIconExA_3=cast=(HICON FAR *)
-OS_ExtractIconExA_4=
-
-OS_ExtractIconExW=
-OS_ExtractIconExW_0=cast=(LPWSTR)
-OS_ExtractIconExW_1=
-OS_ExtractIconExW_2=cast=(HICON FAR *)
-OS_ExtractIconExW_3=cast=(HICON FAR *)
-OS_ExtractIconExW_4=
-
-OS_FillRect=
-OS_FillRect_0=cast=(HDC)
-OS_FillRect_1=flags=no_out
-OS_FillRect_2=cast=(HBRUSH)
-
-OS_FindWindowA=
-OS_FindWindowA_0=cast=(LPSTR)
-OS_FindWindowA_1=cast=(LPSTR)
-
-OS_FindWindowW=
-OS_FindWindowW_0=cast=(LPWSTR)
-OS_FindWindowW_1=cast=(LPWSTR)
-
-OS_FormatMessageA=
-OS_FormatMessageA_0=
-OS_FormatMessageA_1=cast=LPCVOID
-OS_FormatMessageA_2=
-OS_FormatMessageA_3=
-OS_FormatMessageA_4=cast=LPSTR
-OS_FormatMessageA_5=
-OS_FormatMessageA_6=cast=va_list*
-
-OS_FormatMessageW=
-OS_FormatMessageW_0=
-OS_FormatMessageW_1=cast=LPCVOID
-OS_FormatMessageW_2=
-OS_FormatMessageW_3=
-OS_FormatMessageW_4=cast=LPWSTR
-OS_FormatMessageW_5=
-OS_FormatMessageW_6=cast=va_list*
-
-OS_FreeLibrary=
-OS_FreeLibrary_0=cast=(HMODULE)
-
-OS_GdiSetBatchLimit=
-OS_GdiSetBatchLimit_0=cast=DWORD
-
-OS_GetACP=
-
-OS_GetActiveWindow=
-
-OS_GetBkColor=
-OS_GetBkColor_0=cast=(HDC)
-
-OS_GetCapture=
-
-OS_GetCaretPos=
-OS_GetCaretPos_0=
-
-OS_GetCharABCWidthsA=
-OS_GetCharABCWidthsA_0=cast=(HDC)
-OS_GetCharABCWidthsA_1=
-OS_GetCharABCWidthsA_2=
-OS_GetCharABCWidthsA_3=cast=(LPABC),flags=no_in critical
-
-OS_GetCharABCWidthsW=
-OS_GetCharABCWidthsW_0=cast=(HDC)
-OS_GetCharABCWidthsW_1=
-OS_GetCharABCWidthsW_2=
-OS_GetCharABCWidthsW_3=cast=(LPABC),flags=no_in critical
-
-OS_GetCharWidthA=
-OS_GetCharWidthA_0=cast=(HDC)
-OS_GetCharWidthA_1=
-OS_GetCharWidthA_2=
-OS_GetCharWidthA_3=cast=(LPINT),flags=no_in critical
-
-OS_GetCharWidthW=
-OS_GetCharWidthW_0=cast=(HDC)
-OS_GetCharWidthW_1=
-OS_GetCharWidthW_2=
-OS_GetCharWidthW_3=cast=(LPINT),flags=no_in critical
-
-OS_GetCharacterPlacementA=
-OS_GetCharacterPlacementA_0=cast=(HDC)
-OS_GetCharacterPlacementA_1=cast=(LPSTR),flags=no_out critical
-OS_GetCharacterPlacementA_2=
-OS_GetCharacterPlacementA_3=
-OS_GetCharacterPlacementA_4=
-OS_GetCharacterPlacementA_5=
-
-OS_GetCharacterPlacementW=
-OS_GetCharacterPlacementW_0=cast=(HDC)
-OS_GetCharacterPlacementW_1=cast=(LPWSTR),flags=no_out critical
-OS_GetCharacterPlacementW_2=
-OS_GetCharacterPlacementW_3=
-OS_GetCharacterPlacementW_4=cast=(LPGCP_RESULTSW)
-OS_GetCharacterPlacementW_5=
-
-OS_GetClassInfoA=
-OS_GetClassInfoA_0=cast=(HINSTANCE)
-OS_GetClassInfoA_1=cast=(LPSTR)
-OS_GetClassInfoA_2=
-
-OS_GetClassInfoW=
-OS_GetClassInfoW_0=cast=(HINSTANCE)
-OS_GetClassInfoW_1=cast=(LPWSTR)
-OS_GetClassInfoW_2=cast=(LPWNDCLASSW)
-
-OS_GetClientRect=
-OS_GetClientRect_0=cast=(HWND)
-OS_GetClientRect_1=
-
-OS_GetClipBox=
-OS_GetClipBox_0=cast=(HDC)
-OS_GetClipBox_1=
-
-OS_GetClipRgn=
-OS_GetClipRgn_0=cast=(HDC)
-OS_GetClipRgn_1=cast=(HRGN)
-
-OS_GetClipboardData=
-OS_GetClipboardData_0=
-
-OS_GetClipboardFormatNameA=
-OS_GetClipboardFormatNameA_0=
-OS_GetClipboardFormatNameA_1=
-OS_GetClipboardFormatNameA_2=
-
-OS_GetClipboardFormatNameW=
-OS_GetClipboardFormatNameW_0=
-OS_GetClipboardFormatNameW_1=cast=(LPWSTR)
-OS_GetClipboardFormatNameW_2=
-
-OS_GetComboBoxInfo=flags=dynamic
-OS_GetComboBoxInfo_0=cast=(HWND)
-OS_GetComboBoxInfo_1=
-
-OS_GetCurrentObject=
-OS_GetCurrentObject_0=cast=(HDC)
-OS_GetCurrentObject_1=
-
-OS_GetCurrentProcessId=
-
-OS_GetCurrentThreadId=
-
-OS_GetCursor=
-
-OS_GetCursorPos=
-OS_GetCursorPos_0=
-
-OS_GetDC=
-OS_GetDC_0=cast=(HWND)
-
-OS_GetDCEx=
-OS_GetDCEx_0=cast=(HWND)
-OS_GetDCEx_1=cast=(HRGN)
-OS_GetDCEx_2=
-
-OS_GetDIBColorTable=
-OS_GetDIBColorTable_0=cast=(HDC)
-OS_GetDIBColorTable_1=
-OS_GetDIBColorTable_2=
-OS_GetDIBColorTable_3=cast=(RGBQUAD *),flags=no_in critical
-
-OS_GetDIBits=
-OS_GetDIBits_0=cast=(HDC)
-OS_GetDIBits_1=cast=(HBITMAP)
-OS_GetDIBits_2=
-OS_GetDIBits_3=
-OS_GetDIBits_4=cast=(LPVOID)
-OS_GetDIBits_5=cast=(LPBITMAPINFO),flags=critical
-OS_GetDIBits_6=
-
-OS_GetDesktopWindow=
-
-OS_GetDeviceCaps=
-OS_GetDeviceCaps_0=cast=(HDC)
-OS_GetDeviceCaps_1=
-
-OS_GetDialogBaseUnits=
-
-OS_GetDlgItem=
-OS_GetDlgItem_0=cast=(HWND)
-OS_GetDlgItem_1=
-
-OS_GetDoubleClickTime=
-
-OS_GetFocus=
-
-OS_GetFontLanguageInfo=
-OS_GetFontLanguageInfo_0=cast=(HDC)
-
-OS_GetGUIThreadInfo=
-OS_GetGUIThreadInfo_0=cast=(DWORD)
-OS_GetGUIThreadInfo_1=cast=(LPGUITHREADINFO)
-
-OS_GetIconInfo=
-OS_GetIconInfo_0=cast=(HICON)
-OS_GetIconInfo_1=flags=no_in
-
-OS_GetKeyNameTextA=
-OS_GetKeyNameTextA_0=
-OS_GetKeyNameTextA_1=cast=(LPSTR)
-OS_GetKeyNameTextA_2=
-
-OS_GetKeyNameTextW=
-OS_GetKeyNameTextW_0=
-OS_GetKeyNameTextW_1=cast=(LPWSTR)
-OS_GetKeyNameTextW_2=
-
-OS_GetKeyState=
-OS_GetKeyState_0=
-
-OS_GetKeyboardLayout=
-OS_GetKeyboardLayout_0=
-
-OS_GetKeyboardLayoutList=
-OS_GetKeyboardLayoutList_0=
-OS_GetKeyboardLayoutList_1=cast=(HKL FAR *)
-
-OS_GetKeyboardState=
-OS_GetKeyboardState_0=cast=(PBYTE)
-
-OS_GetLastActivePopup=
-OS_GetLastActivePopup_0=cast=(HWND)
-
-OS_GetLastError=
-
-OS_GetLayout=flags=dynamic
-OS_GetLayout_0=cast=(HDC)
-
-OS_GetLibraryHandle=flags=no_gen
-
-OS_GetLocaleInfoA=
-OS_GetLocaleInfoA_0=
-OS_GetLocaleInfoA_1=
-OS_GetLocaleInfoA_2=cast=(LPSTR)
-OS_GetLocaleInfoA_3=
-
-OS_GetLocaleInfoW=
-OS_GetLocaleInfoW_0=
-OS_GetLocaleInfoW_1=
-OS_GetLocaleInfoW_2=cast=(LPWSTR)
-OS_GetLocaleInfoW_3=
-
-OS_GetMenu=
-OS_GetMenu_0=cast=(HWND)
-
-OS_GetMenuBarInfo=flags=dynamic
-OS_GetMenuBarInfo_0=
-OS_GetMenuBarInfo_1=
-OS_GetMenuBarInfo_2=
-OS_GetMenuBarInfo_3=
-
-OS_GetMenuDefaultItem=
-OS_GetMenuDefaultItem_0=cast=(HMENU)
-OS_GetMenuDefaultItem_1=
-OS_GetMenuDefaultItem_2=
-
-OS_GetMenuInfo=flags=dynamic
-OS_GetMenuInfo_0=cast=(HMENU)
-OS_GetMenuInfo_1=
-
-OS_GetMenuItemCount=
-OS_GetMenuItemCount_0=cast=(HMENU)
-
-OS_GetMenuItemInfoA=
-OS_GetMenuItemInfoA_0=cast=(HMENU)
-OS_GetMenuItemInfoA_1=
-OS_GetMenuItemInfoA_2=
-OS_GetMenuItemInfoA_3=
-
-OS_GetMenuItemInfoW=
-OS_GetMenuItemInfoW_0=cast=(HMENU)
-OS_GetMenuItemInfoW_1=
-OS_GetMenuItemInfoW_2=
-OS_GetMenuItemInfoW_3=cast=(LPMENUITEMINFOW)
-
-OS_GetMenuItemRect=
-OS_GetMenuItemRect_0=cast=(HWND)
-OS_GetMenuItemRect_1=cast=(HMENU)
-OS_GetMenuItemRect_2=
-OS_GetMenuItemRect_3=
-
-OS_GetMessageA=
-OS_GetMessageA_0=
-OS_GetMessageA_1=cast=(HWND)
-OS_GetMessageA_2=
-OS_GetMessageA_3=
-
-OS_GetMessagePos=
-
-OS_GetMessageTime=
-
-OS_GetMessageW=
-OS_GetMessageW_0=
-OS_GetMessageW_1=cast=(HWND)
-OS_GetMessageW_2=
-OS_GetMessageW_3=
-
-OS_GetModuleHandleA=
-OS_GetModuleHandleA_0=cast=(LPSTR)
-
-OS_GetModuleHandleW=
-OS_GetModuleHandleW_0=cast=(LPWSTR)
-
-OS_GetMonitorInfoA=flags=dynamic
-OS_GetMonitorInfoA_0=cast=(HMONITOR)
-OS_GetMonitorInfoA_1=cast=(LPMONITORINFO)
-
-OS_GetMonitorInfoW=flags=dynamic
-OS_GetMonitorInfoW_0=cast=(HMONITOR)
-OS_GetMonitorInfoW_1=cast=(LPMONITORINFO)
-
-OS_GetNearestPaletteIndex=
-OS_GetNearestPaletteIndex_0=cast=(HPALETTE)
-OS_GetNearestPaletteIndex_1=cast=(COLORREF)
-
-OS_GetObjectA__IILorg_eclipse_swt_internal_win32_BITMAP_2=
-OS_GetObjectA__IILorg_eclipse_swt_internal_win32_BITMAP_2_0=cast=(HGDIOBJ)
-OS_GetObjectA__IILorg_eclipse_swt_internal_win32_BITMAP_2_1=
-OS_GetObjectA__IILorg_eclipse_swt_internal_win32_BITMAP_2_2=flags=no_in
-
-OS_GetObjectA__IILorg_eclipse_swt_internal_win32_DIBSECTION_2=
-OS_GetObjectA__IILorg_eclipse_swt_internal_win32_DIBSECTION_2_0=cast=(HGDIOBJ)
-OS_GetObjectA__IILorg_eclipse_swt_internal_win32_DIBSECTION_2_1=
-OS_GetObjectA__IILorg_eclipse_swt_internal_win32_DIBSECTION_2_2=flags=no_in
-
-OS_GetObjectA__IILorg_eclipse_swt_internal_win32_LOGBRUSH_2=
-OS_GetObjectA__IILorg_eclipse_swt_internal_win32_LOGBRUSH_2_0=cast=(HGDIOBJ)
-OS_GetObjectA__IILorg_eclipse_swt_internal_win32_LOGBRUSH_2_1=
-OS_GetObjectA__IILorg_eclipse_swt_internal_win32_LOGBRUSH_2_2=flags=no_in
-
-OS_GetObjectA__IILorg_eclipse_swt_internal_win32_LOGFONTA_2=
-OS_GetObjectA__IILorg_eclipse_swt_internal_win32_LOGFONTA_2_0=cast=(HGDIOBJ)
-OS_GetObjectA__IILorg_eclipse_swt_internal_win32_LOGFONTA_2_1=
-OS_GetObjectA__IILorg_eclipse_swt_internal_win32_LOGFONTA_2_2=flags=no_in
-
-OS_GetObjectA__IILorg_eclipse_swt_internal_win32_LOGPEN_2=
-OS_GetObjectA__IILorg_eclipse_swt_internal_win32_LOGPEN_2_0=cast=(HGDIOBJ)
-OS_GetObjectA__IILorg_eclipse_swt_internal_win32_LOGPEN_2_1=
-OS_GetObjectA__IILorg_eclipse_swt_internal_win32_LOGPEN_2_2=flags=no_in
-
-OS_GetObjectW__IILorg_eclipse_swt_internal_win32_BITMAP_2=
-OS_GetObjectW__IILorg_eclipse_swt_internal_win32_BITMAP_2_0=cast=(HGDIOBJ)
-OS_GetObjectW__IILorg_eclipse_swt_internal_win32_BITMAP_2_1=
-OS_GetObjectW__IILorg_eclipse_swt_internal_win32_BITMAP_2_2=flags=no_in
-
-OS_GetObjectW__IILorg_eclipse_swt_internal_win32_DIBSECTION_2=
-OS_GetObjectW__IILorg_eclipse_swt_internal_win32_DIBSECTION_2_0=cast=(HGDIOBJ)
-OS_GetObjectW__IILorg_eclipse_swt_internal_win32_DIBSECTION_2_1=
-OS_GetObjectW__IILorg_eclipse_swt_internal_win32_DIBSECTION_2_2=flags=no_in
-
-OS_GetObjectW__IILorg_eclipse_swt_internal_win32_LOGBRUSH_2=
-OS_GetObjectW__IILorg_eclipse_swt_internal_win32_LOGBRUSH_2_0=cast=(HGDIOBJ)
-OS_GetObjectW__IILorg_eclipse_swt_internal_win32_LOGBRUSH_2_1=
-OS_GetObjectW__IILorg_eclipse_swt_internal_win32_LOGBRUSH_2_2=flags=no_in
-
-OS_GetObjectW__IILorg_eclipse_swt_internal_win32_LOGFONTW_2=
-OS_GetObjectW__IILorg_eclipse_swt_internal_win32_LOGFONTW_2_0=cast=(HGDIOBJ)
-OS_GetObjectW__IILorg_eclipse_swt_internal_win32_LOGFONTW_2_1=
-OS_GetObjectW__IILorg_eclipse_swt_internal_win32_LOGFONTW_2_2=flags=no_in
-
-OS_GetObjectW__IILorg_eclipse_swt_internal_win32_LOGPEN_2=
-OS_GetObjectW__IILorg_eclipse_swt_internal_win32_LOGPEN_2_0=cast=(HGDIOBJ)
-OS_GetObjectW__IILorg_eclipse_swt_internal_win32_LOGPEN_2_1=
-OS_GetObjectW__IILorg_eclipse_swt_internal_win32_LOGPEN_2_2=flags=no_in
-
-OS_GetOpenFileNameA=
-OS_GetOpenFileNameA_0=
-
-OS_GetOpenFileNameW=
-OS_GetOpenFileNameW_0=cast=(LPOPENFILENAMEW)
-
-OS_GetPaletteEntries=
-OS_GetPaletteEntries_0=cast=(HPALETTE)
-OS_GetPaletteEntries_1=
-OS_GetPaletteEntries_2=
-OS_GetPaletteEntries_3=cast=(LPPALETTEENTRY),flags=no_in critical
-
-OS_GetParent=
-OS_GetParent_0=cast=(HWND)
-
-OS_GetPixel=
-OS_GetPixel_0=cast=(HDC)
-OS_GetPixel_1=
-OS_GetPixel_2=
-
-OS_GetProcAddress=
-OS_GetProcAddress_0=cast=(HMODULE)
-OS_GetProcAddress_1=cast=(LPCTSTR)
-
-OS_GetProcessHeap=
-
-OS_GetProfileStringA=
-OS_GetProfileStringA_0=cast=(LPSTR)
-OS_GetProfileStringA_1=cast=(LPSTR)
-OS_GetProfileStringA_2=cast=(LPSTR)
-OS_GetProfileStringA_3=cast=(LPSTR)
-OS_GetProfileStringA_4=
-
-OS_GetProfileStringW=
-OS_GetProfileStringW_0=cast=(LPWSTR)
-OS_GetProfileStringW_1=cast=(LPWSTR)
-OS_GetProfileStringW_2=cast=(LPWSTR)
-OS_GetProfileStringW_3=cast=(LPWSTR)
-OS_GetProfileStringW_4=
-
-OS_GetROP2=
-OS_GetROP2_0=cast=(HDC)
-
-OS_GetRandomRgn=
-OS_GetRandomRgn_0=cast=HDC
-OS_GetRandomRgn_1=cast=HRGN
-OS_GetRandomRgn_2=
-
-OS_GetRegionData=
-OS_GetRegionData_0=cast=(HRGN)
-OS_GetRegionData_1=
-OS_GetRegionData_2=cast=(RGNDATA *),flags=no_in critical
-
-OS_GetRgnBox=
-OS_GetRgnBox_0=cast=(HRGN)
-OS_GetRgnBox_1=flags=no_in
-
-OS_GetSaveFileNameA=
-OS_GetSaveFileNameA_0=
-
-OS_GetSaveFileNameW=
-OS_GetSaveFileNameW_0=cast=(LPOPENFILENAMEW)
-
-OS_GetScrollInfo=
-OS_GetScrollInfo_0=cast=(HWND)
-OS_GetScrollInfo_1=
-OS_GetScrollInfo_2=
-
-OS_GetStockObject=
-OS_GetStockObject_0=
-
-OS_GetSysColor=
-OS_GetSysColor_0=
-
-OS_GetSysColorBrush=
-OS_GetSysColorBrush_0=
-
-OS_GetSystemMenu=
-OS_GetSystemMenu_0=cast=(HWND)
-OS_GetSystemMenu_1=
-
-OS_GetSystemMetrics=
-OS_GetSystemMetrics_0=
-
-OS_GetSystemPaletteEntries=
-OS_GetSystemPaletteEntries_0=cast=(HDC)
-OS_GetSystemPaletteEntries_1=cast=(UINT)
-OS_GetSystemPaletteEntries_2=cast=(UINT)
-OS_GetSystemPaletteEntries_3=cast=(LPPALETTEENTRY),flags=no_in critical
-
-OS_GetTextCharset=
-OS_GetTextCharset_0=cast=(HDC)
-
-OS_GetTextColor=
-OS_GetTextColor_0=cast=(HDC)
-
-OS_GetTextExtentPoint32A=
-OS_GetTextExtentPoint32A_0=cast=(HDC)
-OS_GetTextExtentPoint32A_1=cast=(LPSTR),flags=no_out critical
-OS_GetTextExtentPoint32A_2=
-OS_GetTextExtentPoint32A_3=flags=no_in
-
-OS_GetTextExtentPoint32W=
-OS_GetTextExtentPoint32W_0=cast=(HDC)
-OS_GetTextExtentPoint32W_1=cast=(LPWSTR),flags=no_out critical
-OS_GetTextExtentPoint32W_2=
-OS_GetTextExtentPoint32W_3=flags=no_in
-
-OS_GetTextMetricsA=
-OS_GetTextMetricsA_0=cast=(HDC)
-OS_GetTextMetricsA_1=flags=no_in
-
-OS_GetTextMetricsW=
-OS_GetTextMetricsW_0=cast=(HDC)
-OS_GetTextMetricsW_1=flags=no_in
-
-OS_GetTickCount=
-
-OS_GetUpdateRect=
-OS_GetUpdateRect_0=cast=(HWND)
-OS_GetUpdateRect_1=cast=(LPRECT)
-OS_GetUpdateRect_2=cast=(BOOL)
-
-OS_GetUpdateRgn=
-OS_GetUpdateRgn_0=cast=(HWND)
-OS_GetUpdateRgn_1=cast=(HRGN)
-OS_GetUpdateRgn_2=
-
-OS_GetVersionExA=
-OS_GetVersionExA_0=
-
-OS_GetVersionExW=
-OS_GetVersionExW_0=
-
-OS_GetWindow=
-OS_GetWindow_0=cast=(HWND)
-OS_GetWindow_1=
-
-OS_GetWindowLongA=
-OS_GetWindowLongA_0=cast=(HWND)
-OS_GetWindowLongA_1=
-
-OS_GetWindowLongW=
-OS_GetWindowLongW_0=cast=(HWND)
-OS_GetWindowLongW_1=
-
-OS_GetWindowPlacement=
-OS_GetWindowPlacement_0=cast=(HWND)
-OS_GetWindowPlacement_1=
-
-OS_GetWindowRect=
-OS_GetWindowRect_0=cast=(HWND)
-OS_GetWindowRect_1=
-
-OS_GetWindowRgn=
-OS_GetWindowRgn_0=cast=(HWND)
-OS_GetWindowRgn_1=cast=(HRGN)
-
-OS_GetWindowTextA=
-OS_GetWindowTextA_0=cast=(HWND)
-OS_GetWindowTextA_1=cast=(LPSTR)
-OS_GetWindowTextA_2=
-
-OS_GetWindowTextLengthA=
-OS_GetWindowTextLengthA_0=cast=(HWND)
-
-OS_GetWindowTextLengthW=
-OS_GetWindowTextLengthW_0=cast=(HWND)
-
-OS_GetWindowTextW=
-OS_GetWindowTextW_0=cast=(HWND)
-OS_GetWindowTextW_1=cast=(LPWSTR)
-OS_GetWindowTextW_2=
-
-OS_GetWindowThreadProcessId=
-OS_GetWindowThreadProcessId_0=cast=(HWND)
-OS_GetWindowThreadProcessId_1=cast=(LPDWORD)
-
-OS_GlobalAlloc=
-OS_GlobalAlloc_0=
-OS_GlobalAlloc_1=
-
-OS_GlobalFree=
-OS_GlobalFree_0=cast=(HANDLE)
-
-OS_GlobalLock=
-OS_GlobalLock_0=cast=(HANDLE)
-
-OS_GlobalSize=
-OS_GlobalSize_0=cast=(HANDLE)
-
-OS_GlobalUnlock=
-OS_GlobalUnlock_0=cast=(HANDLE)
-
-OS_GradientFill=flags=dynamic
-OS_GradientFill_0=cast=(HDC)
-OS_GradientFill_1=cast=(PTRIVERTEX)
-OS_GradientFill_2=cast=(ULONG)
-OS_GradientFill_3=cast=(PVOID)
-OS_GradientFill_4=cast=(ULONG)
-OS_GradientFill_5=cast=(ULONG)
-
-OS_HeapAlloc=
-OS_HeapAlloc_0=cast=(HANDLE)
-OS_HeapAlloc_1=
-OS_HeapAlloc_2=
-
-OS_HeapFree=
-OS_HeapFree_0=cast=(HANDLE)
-OS_HeapFree_1=
-OS_HeapFree_2=cast=(LPVOID)
-
-OS_HideCaret=
-OS_HideCaret_0=cast=(HWND)
-
-OS_IIDFromString=
-OS_IIDFromString_0=cast=LPOLESTR
-OS_IIDFromString_1=cast=LPIID
-
-OS_ImageList_Add=
-OS_ImageList_Add_0=cast=(HIMAGELIST)
-OS_ImageList_Add_1=cast=(HBITMAP)
-OS_ImageList_Add_2=cast=(HBITMAP)
-
-OS_ImageList_AddMasked=
-OS_ImageList_AddMasked_0=cast=(HIMAGELIST)
-OS_ImageList_AddMasked_1=cast=(HBITMAP)
-OS_ImageList_AddMasked_2=cast=(COLORREF)
-
-OS_ImageList_Create=
-OS_ImageList_Create_0=
-OS_ImageList_Create_1=
-OS_ImageList_Create_2=
-OS_ImageList_Create_3=
-OS_ImageList_Create_4=
-
-OS_ImageList_Destroy=
-OS_ImageList_Destroy_0=cast=(HIMAGELIST)
-
-OS_ImageList_GetIcon=
-OS_ImageList_GetIcon_0=cast=(HIMAGELIST)
-OS_ImageList_GetIcon_1=
-OS_ImageList_GetIcon_2=
-
-OS_ImageList_GetIconSize=
-OS_ImageList_GetIconSize_0=cast=(HIMAGELIST)
-OS_ImageList_GetIconSize_1=
-OS_ImageList_GetIconSize_2=
-
-OS_ImageList_GetImageCount=
-OS_ImageList_GetImageCount_0=cast=(HIMAGELIST)
-
-OS_ImageList_Remove=
-OS_ImageList_Remove_0=cast=(HIMAGELIST)
-OS_ImageList_Remove_1=
-
-OS_ImageList_Replace=
-OS_ImageList_Replace_0=cast=(HIMAGELIST)
-OS_ImageList_Replace_1=
-OS_ImageList_Replace_2=cast=(HBITMAP)
-OS_ImageList_Replace_3=cast=(HBITMAP)
-
-OS_ImageList_ReplaceIcon=
-OS_ImageList_ReplaceIcon_0=cast=(HIMAGELIST)
-OS_ImageList_ReplaceIcon_1=
-OS_ImageList_ReplaceIcon_2=cast=(HICON)
-
-OS_ImageList_SetIconSize=
-OS_ImageList_SetIconSize_0=cast=(HIMAGELIST)
-OS_ImageList_SetIconSize_1=
-OS_ImageList_SetIconSize_2=
-
-OS_ImmAssociateContext=
-OS_ImmAssociateContext_0=cast=(HWND)
-OS_ImmAssociateContext_1=cast=(HIMC)
-
-OS_ImmCreateContext=
-
-OS_ImmDestroyContext=
-OS_ImmDestroyContext_0=cast=(HIMC)
-
-OS_ImmGetCompositionFontA=
-OS_ImmGetCompositionFontA_0=cast=(HIMC)
-OS_ImmGetCompositionFontA_1=
-
-OS_ImmGetCompositionFontW=
-OS_ImmGetCompositionFontW_0=cast=(HIMC)
-OS_ImmGetCompositionFontW_1=
-
-OS_ImmGetCompositionStringA=
-OS_ImmGetCompositionStringA_0=cast=(HIMC)
-OS_ImmGetCompositionStringA_1=
-OS_ImmGetCompositionStringA_2=cast=(LPSTR)
-OS_ImmGetCompositionStringA_3=
-
-OS_ImmGetCompositionStringW=
-OS_ImmGetCompositionStringW_0=cast=(HIMC)
-OS_ImmGetCompositionStringW_1=
-OS_ImmGetCompositionStringW_2=cast=(LPWSTR)
-OS_ImmGetCompositionStringW_3=
-
-OS_ImmGetContext=
-OS_ImmGetContext_0=cast=(HWND)
-
-OS_ImmGetConversionStatus=
-OS_ImmGetConversionStatus_0=cast=(HIMC)
-OS_ImmGetConversionStatus_1=
-OS_ImmGetConversionStatus_2=
-
-OS_ImmGetDefaultIMEWnd=
-OS_ImmGetDefaultIMEWnd_0=cast=(HWND)
-
-OS_ImmGetOpenStatus=
-OS_ImmGetOpenStatus_0=cast=(HIMC)
-
-OS_ImmReleaseContext=
-OS_ImmReleaseContext_0=cast=(HWND)
-OS_ImmReleaseContext_1=cast=(HIMC)
-
-OS_ImmSetCompositionFontA=
-OS_ImmSetCompositionFontA_0=cast=(HIMC)
-OS_ImmSetCompositionFontA_1=
-
-OS_ImmSetCompositionFontW=
-OS_ImmSetCompositionFontW_0=cast=(HIMC)
-OS_ImmSetCompositionFontW_1=
-
-OS_ImmSetCompositionWindow=
-OS_ImmSetCompositionWindow_0=cast=(HIMC)
-OS_ImmSetCompositionWindow_1=
-
-OS_ImmSetConversionStatus=
-OS_ImmSetConversionStatus_0=cast=(HIMC)
-OS_ImmSetConversionStatus_1=
-OS_ImmSetConversionStatus_2=
-
-OS_ImmSetOpenStatus=
-OS_ImmSetOpenStatus_0=cast=(HIMC)
-OS_ImmSetOpenStatus_1=
-
-OS_InitCommonControls=
-
-OS_InitCommonControlsEx=
-OS_InitCommonControlsEx_0=
-
-OS_InsertMenuA=
-OS_InsertMenuA_0=cast=(HMENU)
-OS_InsertMenuA_1=
-OS_InsertMenuA_2=
-OS_InsertMenuA_3=
-OS_InsertMenuA_4=
-
-OS_InsertMenuItemA=
-OS_InsertMenuItemA_0=cast=(HMENU)
-OS_InsertMenuItemA_1=
-OS_InsertMenuItemA_2=
-OS_InsertMenuItemA_3=
-
-OS_InsertMenuItemW=
-OS_InsertMenuItemW_0=cast=(HMENU)
-OS_InsertMenuItemW_1=
-OS_InsertMenuItemW_2=
-OS_InsertMenuItemW_3=cast=(LPMENUITEMINFOW)
-
-OS_InsertMenuW=
-OS_InsertMenuW_0=cast=(HMENU)
-OS_InsertMenuW_1=
-OS_InsertMenuW_2=
-OS_InsertMenuW_3=
-OS_InsertMenuW_4=
-
-OS_IntersectRect=
-OS_IntersectRect_0=flags=no_in
-OS_IntersectRect_1=flags=no_out
-OS_IntersectRect_2=flags=no_out
-
-OS_InvalidateRect=
-OS_InvalidateRect_0=cast=(HWND)
-OS_InvalidateRect_1=
-OS_InvalidateRect_2=
-
-OS_InvalidateRgn=
-OS_InvalidateRgn_0=cast=(HWND)
-OS_InvalidateRgn_1=cast=(HRGN)
-OS_InvalidateRgn_2=
-
-OS_IsDBCSLeadByte=
-OS_IsDBCSLeadByte_0=
-
-OS_IsIconic=
-OS_IsIconic_0=cast=(HWND)
-
-OS_IsPPC=flags=no_gen
-
-OS_IsSP=flags=no_gen
-
-OS_IsWindowEnabled=
-OS_IsWindowEnabled_0=cast=(HWND)
-
-OS_IsWindowVisible=
-OS_IsWindowVisible_0=cast=(HWND)
-
-OS_IsZoomed=
-OS_IsZoomed_0=cast=(HWND)
-
-OS_KillTimer=
-OS_KillTimer_0=cast=(HWND)
-OS_KillTimer_1=
-
-OS_LineTo=
-OS_LineTo_0=cast=(HDC)
-OS_LineTo_1=
-OS_LineTo_2=
-
-OS_LoadBitmapA=
-OS_LoadBitmapA_0=cast=(HINSTANCE)
-OS_LoadBitmapA_1=cast=(LPSTR)
-
-OS_LoadBitmapW=
-OS_LoadBitmapW_0=cast=(HINSTANCE)
-OS_LoadBitmapW_1=cast=(LPWSTR)
-
-OS_LoadCursorA=
-OS_LoadCursorA_0=cast=(HINSTANCE)
-OS_LoadCursorA_1=cast=(LPSTR)
-
-OS_LoadCursorW=
-OS_LoadCursorW_0=cast=(HINSTANCE)
-OS_LoadCursorW_1=cast=(LPWSTR)
-
-OS_LoadIconA=
-OS_LoadIconA_0=cast=(HINSTANCE)
-OS_LoadIconA_1=cast=(LPSTR)
-
-OS_LoadIconW=
-OS_LoadIconW_0=cast=(HINSTANCE)
-OS_LoadIconW_1=cast=(LPWSTR)
-
-OS_LoadImageA__IIIIII=
-OS_LoadImageA__IIIIII_0=cast=(HINSTANCE)
-OS_LoadImageA__IIIIII_1=cast=(LPSTR)
-OS_LoadImageA__IIIIII_2=
-OS_LoadImageA__IIIIII_3=
-OS_LoadImageA__IIIIII_4=
-OS_LoadImageA__IIIIII_5=
-
-OS_LoadImageA__I_3BIIII=
-OS_LoadImageA__I_3BIIII_0=cast=(HINSTANCE)
-OS_LoadImageA__I_3BIIII_1=cast=(LPSTR)
-OS_LoadImageA__I_3BIIII_2=
-OS_LoadImageA__I_3BIIII_3=
-OS_LoadImageA__I_3BIIII_4=
-OS_LoadImageA__I_3BIIII_5=
-
-OS_LoadImageW__IIIIII=
-OS_LoadImageW__IIIIII_0=cast=(HINSTANCE)
-OS_LoadImageW__IIIIII_1=cast=(LPWSTR)
-OS_LoadImageW__IIIIII_2=
-OS_LoadImageW__IIIIII_3=
-OS_LoadImageW__IIIIII_4=
-OS_LoadImageW__IIIIII_5=
-
-OS_LoadImageW__I_3CIIII=
-OS_LoadImageW__I_3CIIII_0=cast=(HINSTANCE)
-OS_LoadImageW__I_3CIIII_1=cast=(LPWSTR)
-OS_LoadImageW__I_3CIIII_2=
-OS_LoadImageW__I_3CIIII_3=
-OS_LoadImageW__I_3CIIII_4=
-OS_LoadImageW__I_3CIIII_5=
-
-OS_LoadLibraryA=
-OS_LoadLibraryA_0=cast=(LPSTR)
-
-OS_LoadLibraryW=
-OS_LoadLibraryW_0=cast=(LPWSTR)
-
-OS_LoadStringA=
-OS_LoadStringA_0=cast=HINSTANCE
-OS_LoadStringA_1=
-OS_LoadStringA_2=cast=LPSTR
-OS_LoadStringA_3=
-
-OS_LoadStringW=
-OS_LoadStringW_0=cast=HINSTANCE
-OS_LoadStringW_1=
-OS_LoadStringW_2=cast=LPWSTR
-OS_LoadStringW_3=
-
-OS_LocalFree=
-OS_LocalFree_0=cast=HLOCAL
-
-OS_MapVirtualKeyA=
-OS_MapVirtualKeyA_0=
-OS_MapVirtualKeyA_1=
-
-OS_MapVirtualKeyW=
-OS_MapVirtualKeyW_0=
-OS_MapVirtualKeyW_1=
-
-OS_MapWindowPoints__IILorg_eclipse_swt_internal_win32_POINT_2I=
-OS_MapWindowPoints__IILorg_eclipse_swt_internal_win32_POINT_2I_0=cast=(HWND)
-OS_MapWindowPoints__IILorg_eclipse_swt_internal_win32_POINT_2I_1=cast=(HWND)
-OS_MapWindowPoints__IILorg_eclipse_swt_internal_win32_POINT_2I_2=cast=(LPPOINT)
-OS_MapWindowPoints__IILorg_eclipse_swt_internal_win32_POINT_2I_3=
-
-OS_MapWindowPoints__IILorg_eclipse_swt_internal_win32_RECT_2I=
-OS_MapWindowPoints__IILorg_eclipse_swt_internal_win32_RECT_2I_0=cast=(HWND)
-OS_MapWindowPoints__IILorg_eclipse_swt_internal_win32_RECT_2I_1=cast=(HWND)
-OS_MapWindowPoints__IILorg_eclipse_swt_internal_win32_RECT_2I_2=cast=(LPPOINT)
-OS_MapWindowPoints__IILorg_eclipse_swt_internal_win32_RECT_2I_3=
-
-OS_MessageBeep=
-OS_MessageBeep_0=
-
-OS_MessageBoxA=
-OS_MessageBoxA_0=cast=(HWND)
-OS_MessageBoxA_1=cast=(LPSTR)
-OS_MessageBoxA_2=cast=(LPSTR)
-OS_MessageBoxA_3=
-
-OS_MessageBoxW=
-OS_MessageBoxW_0=cast=(HWND)
-OS_MessageBoxW_1=cast=(LPWSTR)
-OS_MessageBoxW_2=cast=(LPWSTR)
-OS_MessageBoxW_3=
-
-OS_MonitorFromWindow=flags=dynamic
-OS_MonitorFromWindow_0=
-OS_MonitorFromWindow_1=
-
-OS_MoveMemory__ILorg_eclipse_swt_internal_win32_DROPFILES_2I=
-OS_MoveMemory__ILorg_eclipse_swt_internal_win32_DROPFILES_2I_0=cast=(PVOID)
-OS_MoveMemory__ILorg_eclipse_swt_internal_win32_DROPFILES_2I_1=cast=(CONST VOID *),flags=no_out
-OS_MoveMemory__ILorg_eclipse_swt_internal_win32_DROPFILES_2I_2=
-
-OS_MoveMemory__ILorg_eclipse_swt_internal_win32_GRADIENT_1RECT_2I=
-OS_MoveMemory__ILorg_eclipse_swt_internal_win32_GRADIENT_1RECT_2I_0=cast=(PVOID)
-OS_MoveMemory__ILorg_eclipse_swt_internal_win32_GRADIENT_1RECT_2I_1=cast=(CONST VOID *),flags=no_out
-OS_MoveMemory__ILorg_eclipse_swt_internal_win32_GRADIENT_1RECT_2I_2=
-
-OS_MoveMemory__ILorg_eclipse_swt_internal_win32_KEYBDINPUT_2I=
-OS_MoveMemory__ILorg_eclipse_swt_internal_win32_KEYBDINPUT_2I_0=cast=PVOID
-OS_MoveMemory__ILorg_eclipse_swt_internal_win32_KEYBDINPUT_2I_1=cast=CONST VOID *,flags=no_out
-OS_MoveMemory__ILorg_eclipse_swt_internal_win32_KEYBDINPUT_2I_2=
-
-OS_MoveMemory__ILorg_eclipse_swt_internal_win32_LOGFONTA_2I=
-OS_MoveMemory__ILorg_eclipse_swt_internal_win32_LOGFONTA_2I_0=cast=(PVOID)
-OS_MoveMemory__ILorg_eclipse_swt_internal_win32_LOGFONTA_2I_1=cast=(CONST VOID *),flags=no_out
-OS_MoveMemory__ILorg_eclipse_swt_internal_win32_LOGFONTA_2I_2=
-
-OS_MoveMemory__ILorg_eclipse_swt_internal_win32_LOGFONTW_2I=
-OS_MoveMemory__ILorg_eclipse_swt_internal_win32_LOGFONTW_2I_0=cast=(PVOID)
-OS_MoveMemory__ILorg_eclipse_swt_internal_win32_LOGFONTW_2I_1=cast=(CONST VOID *),flags=no_out
-OS_MoveMemory__ILorg_eclipse_swt_internal_win32_LOGFONTW_2I_2=
-
-OS_MoveMemory__ILorg_eclipse_swt_internal_win32_MEASUREITEMSTRUCT_2I=
-OS_MoveMemory__ILorg_eclipse_swt_internal_win32_MEASUREITEMSTRUCT_2I_0=cast=(PVOID)
-OS_MoveMemory__ILorg_eclipse_swt_internal_win32_MEASUREITEMSTRUCT_2I_1=cast=(CONST VOID *),flags=no_out
-OS_MoveMemory__ILorg_eclipse_swt_internal_win32_MEASUREITEMSTRUCT_2I_2=
-
-OS_MoveMemory__ILorg_eclipse_swt_internal_win32_MINMAXINFO_2I=
-OS_MoveMemory__ILorg_eclipse_swt_internal_win32_MINMAXINFO_2I_0=cast=PVOID
-OS_MoveMemory__ILorg_eclipse_swt_internal_win32_MINMAXINFO_2I_1=cast=(CONST VOID *),flags=no_out
-OS_MoveMemory__ILorg_eclipse_swt_internal_win32_MINMAXINFO_2I_2=
-
-OS_MoveMemory__ILorg_eclipse_swt_internal_win32_MOUSEINPUT_2I=
-OS_MoveMemory__ILorg_eclipse_swt_internal_win32_MOUSEINPUT_2I_0=cast=PVOID
-OS_MoveMemory__ILorg_eclipse_swt_internal_win32_MOUSEINPUT_2I_1=cast=(CONST VOID *),flags=no_out
-OS_MoveMemory__ILorg_eclipse_swt_internal_win32_MOUSEINPUT_2I_2=
-
-OS_MoveMemory__ILorg_eclipse_swt_internal_win32_MSG_2I=
-OS_MoveMemory__ILorg_eclipse_swt_internal_win32_MSG_2I_0=cast=(PVOID)
-OS_MoveMemory__ILorg_eclipse_swt_internal_win32_MSG_2I_1=cast=(CONST VOID *),flags=no_out
-OS_MoveMemory__ILorg_eclipse_swt_internal_win32_MSG_2I_2=
-
-OS_MoveMemory__ILorg_eclipse_swt_internal_win32_NMLVCUSTOMDRAW_2I=
-OS_MoveMemory__ILorg_eclipse_swt_internal_win32_NMLVCUSTOMDRAW_2I_0=cast=(PVOID)
-OS_MoveMemory__ILorg_eclipse_swt_internal_win32_NMLVCUSTOMDRAW_2I_1=cast=(CONST VOID *),flags=no_out
-OS_MoveMemory__ILorg_eclipse_swt_internal_win32_NMLVCUSTOMDRAW_2I_2=
-
-OS_MoveMemory__ILorg_eclipse_swt_internal_win32_NMLVDISPINFO_2I=
-OS_MoveMemory__ILorg_eclipse_swt_internal_win32_NMLVDISPINFO_2I_0=cast=(PVOID)
-OS_MoveMemory__ILorg_eclipse_swt_internal_win32_NMLVDISPINFO_2I_1=cast=(CONST VOID *),flags=no_out
-OS_MoveMemory__ILorg_eclipse_swt_internal_win32_NMLVDISPINFO_2I_2=
-
-OS_MoveMemory__ILorg_eclipse_swt_internal_win32_NMTTDISPINFOA_2I=
-OS_MoveMemory__ILorg_eclipse_swt_internal_win32_NMTTDISPINFOA_2I_0=cast=(PVOID)
-OS_MoveMemory__ILorg_eclipse_swt_internal_win32_NMTTDISPINFOA_2I_1=cast=(CONST VOID *),flags=no_out
-OS_MoveMemory__ILorg_eclipse_swt_internal_win32_NMTTDISPINFOA_2I_2=
-
-OS_MoveMemory__ILorg_eclipse_swt_internal_win32_NMTTDISPINFOW_2I=
-OS_MoveMemory__ILorg_eclipse_swt_internal_win32_NMTTDISPINFOW_2I_0=cast=(PVOID)
-OS_MoveMemory__ILorg_eclipse_swt_internal_win32_NMTTDISPINFOW_2I_1=cast=(CONST VOID *),flags=no_out
-OS_MoveMemory__ILorg_eclipse_swt_internal_win32_NMTTDISPINFOW_2I_2=
-
-OS_MoveMemory__ILorg_eclipse_swt_internal_win32_NMTVCUSTOMDRAW_2I=
-OS_MoveMemory__ILorg_eclipse_swt_internal_win32_NMTVCUSTOMDRAW_2I_0=cast=(PVOID)
-OS_MoveMemory__ILorg_eclipse_swt_internal_win32_NMTVCUSTOMDRAW_2I_1=cast=(CONST VOID *),flags=no_out
-OS_MoveMemory__ILorg_eclipse_swt_internal_win32_NMTVCUSTOMDRAW_2I_2=
-
-OS_MoveMemory__ILorg_eclipse_swt_internal_win32_RECT_2I=
-OS_MoveMemory__ILorg_eclipse_swt_internal_win32_RECT_2I_0=cast=(PVOID)
-OS_MoveMemory__ILorg_eclipse_swt_internal_win32_RECT_2I_1=cast=(CONST VOID *),flags=no_out
-OS_MoveMemory__ILorg_eclipse_swt_internal_win32_RECT_2I_2=
-
-OS_MoveMemory__ILorg_eclipse_swt_internal_win32_TRIVERTEX_2I=
-OS_MoveMemory__ILorg_eclipse_swt_internal_win32_TRIVERTEX_2I_0=cast=(PVOID)
-OS_MoveMemory__ILorg_eclipse_swt_internal_win32_TRIVERTEX_2I_1=cast=(CONST VOID *),flags=no_out
-OS_MoveMemory__ILorg_eclipse_swt_internal_win32_TRIVERTEX_2I_2=
-
-OS_MoveMemory__ILorg_eclipse_swt_internal_win32_WINDOWPOS_2I=
-OS_MoveMemory__ILorg_eclipse_swt_internal_win32_WINDOWPOS_2I_0=cast=(PVOID)
-OS_MoveMemory__ILorg_eclipse_swt_internal_win32_WINDOWPOS_2I_1=cast=(CONST VOID *),flags=no_out
-OS_MoveMemory__ILorg_eclipse_swt_internal_win32_WINDOWPOS_2I_2=
-
-OS_MoveMemory__I_3BI=
-OS_MoveMemory__I_3BI_0=cast=(PVOID)
-OS_MoveMemory__I_3BI_1=cast=(CONST VOID *),flags=no_out critical
-OS_MoveMemory__I_3BI_2=
-
-OS_MoveMemory__I_3CI=
-OS_MoveMemory__I_3CI_0=cast=(PVOID)
-OS_MoveMemory__I_3CI_1=cast=(CONST VOID *),flags=no_out critical
-OS_MoveMemory__I_3CI_2=
-
-OS_MoveMemory__I_3DI=
-OS_MoveMemory__I_3DI_0=cast=(PVOID)
-OS_MoveMemory__I_3DI_1=cast=(CONST VOID *),flags=no_out critical
-OS_MoveMemory__I_3DI_2=
-
-OS_MoveMemory__I_3FI=
-OS_MoveMemory__I_3FI_0=cast=(PVOID)
-OS_MoveMemory__I_3FI_1=cast=(CONST VOID *),flags=no_out critical
-OS_MoveMemory__I_3FI_2=
-
-OS_MoveMemory__I_3II=
-OS_MoveMemory__I_3II_0=cast=(PVOID)
-OS_MoveMemory__I_3II_1=cast=(CONST VOID *),flags=no_out critical
-OS_MoveMemory__I_3II_2=
-
-OS_MoveMemory__I_3SI=
-OS_MoveMemory__I_3SI_0=cast=(PVOID)
-OS_MoveMemory__I_3SI_1=cast=(CONST VOID *),flags=no_out critical
-OS_MoveMemory__I_3SI_2=
-
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_BITMAPINFOHEADER_2_3BI=
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_BITMAPINFOHEADER_2_3BI_0=cast=(PVOID),flags=no_in
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_BITMAPINFOHEADER_2_3BI_1=cast=(CONST VOID *),flags=no_out critical
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_BITMAPINFOHEADER_2_3BI_2=
-
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_DRAWITEMSTRUCT_2II=
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_DRAWITEMSTRUCT_2II_0=cast=(PVOID),flags=no_in
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_DRAWITEMSTRUCT_2II_1=cast=(CONST VOID *)
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_DRAWITEMSTRUCT_2II_2=
-
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_HDITEM_2II=
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_HDITEM_2II_0=cast=(PVOID),flags=no_in
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_HDITEM_2II_1=cast=(CONST VOID *)
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_HDITEM_2II_2=
-
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_HELPINFO_2II=
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_HELPINFO_2II_0=cast=(PVOID),flags=no_in
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_HELPINFO_2II_1=cast=(CONST VOID *)
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_HELPINFO_2II_2=
-
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_LOGFONTA_2II=
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_LOGFONTA_2II_0=cast=(PVOID),flags=no_in
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_LOGFONTA_2II_1=cast=(CONST VOID *)
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_LOGFONTA_2II_2=
-
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_LOGFONTW_2II=
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_LOGFONTW_2II_0=cast=(PVOID),flags=no_in
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_LOGFONTW_2II_1=cast=(CONST VOID *)
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_LOGFONTW_2II_2=
-
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_MEASUREITEMSTRUCT_2II=
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_MEASUREITEMSTRUCT_2II_0=cast=(PVOID),flags=no_in
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_MEASUREITEMSTRUCT_2II_1=cast=(CONST VOID *)
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_MEASUREITEMSTRUCT_2II_2=
-
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_MINMAXINFO_2II=
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_MINMAXINFO_2II_0=cast=(PVOID),flags=no_in
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_MINMAXINFO_2II_1=cast=(CONST VOID *)
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_MINMAXINFO_2II_2=
-
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_MSG_2II=
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_MSG_2II_0=cast=(PVOID),flags=no_in
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_MSG_2II_1=cast=(CONST VOID *)
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_MSG_2II_2=
-
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_NMCUSTOMDRAW_2II=
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_NMCUSTOMDRAW_2II_0=cast=(PVOID),flags=no_in
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_NMCUSTOMDRAW_2II_1=cast=(CONST VOID *)
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_NMCUSTOMDRAW_2II_2=
-
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_NMHDR_2II=
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_NMHDR_2II_0=cast=(PVOID),flags=no_in
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_NMHDR_2II_1=cast=(CONST VOID *)
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_NMHDR_2II_2=
-
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_NMHEADER_2II=
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_NMHEADER_2II_0=cast=(PVOID),flags=no_in
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_NMHEADER_2II_1=cast=(CONST VOID *)
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_NMHEADER_2II_2=
-
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_NMLISTVIEW_2II=
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_NMLISTVIEW_2II_0=cast=(PVOID),flags=no_in
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_NMLISTVIEW_2II_1=cast=(CONST VOID *)
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_NMLISTVIEW_2II_2=
-
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_NMLVCUSTOMDRAW_2II=
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_NMLVCUSTOMDRAW_2II_0=cast=(PVOID),flags=no_in
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_NMLVCUSTOMDRAW_2II_1=cast=(CONST VOID *)
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_NMLVCUSTOMDRAW_2II_2=
-
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_NMLVDISPINFO_2II=
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_NMLVDISPINFO_2II_0=cast=(PVOID,flags=no_in
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_NMLVDISPINFO_2II_1=cast=(CONST VOID *
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_NMLVDISPINFO_2II_2=
-
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_NMLVFINDITEM_2II=
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_NMLVFINDITEM_2II_0=cast=PVOID,flags=no_in
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_NMLVFINDITEM_2II_1=cast=CONST VOID *
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_NMLVFINDITEM_2II_2=
-
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_NMREBARCHEVRON_2II=
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_NMREBARCHEVRON_2II_0=cast=(PVOID),flags=no_in
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_NMREBARCHEVRON_2II_1=cast=(CONST VOID *)
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_NMREBARCHEVRON_2II_2=
-
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_NMRGINFO_2II=
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_NMRGINFO_2II_0=cast=PVOID,flags=no_in
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_NMRGINFO_2II_1=cast=CONST VOID *
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_NMRGINFO_2II_2=
-
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_NMTOOLBAR_2II=
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_NMTOOLBAR_2II_0=cast=(PVOID),flags=no_in
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_NMTOOLBAR_2II_1=cast=(CONST VOID *)
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_NMTOOLBAR_2II_2=
-
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_NMTTDISPINFOA_2II=
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_NMTTDISPINFOA_2II_0=cast=(PVOID),flags=no_in
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_NMTTDISPINFOA_2II_1=cast=(CONST VOID *)
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_NMTTDISPINFOA_2II_2=
-
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_NMTTDISPINFOW_2II=
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_NMTTDISPINFOW_2II_0=cast=(PVOID),flags=no_in
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_NMTTDISPINFOW_2II_1=cast=(CONST VOID *)
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_NMTTDISPINFOW_2II_2=
-
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_NMTVCUSTOMDRAW_2II=
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_NMTVCUSTOMDRAW_2II_0=cast=(PVOID),flags=no_in
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_NMTVCUSTOMDRAW_2II_1=cast=(CONST VOID *)
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_NMTVCUSTOMDRAW_2II_2=
-
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_POINT_2II=
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_POINT_2II_0=cast=PVOID,flags=no_in
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_POINT_2II_1=cast=CONST VOID *
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_POINT_2II_2=
-
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_SCRIPT_1ITEM_2II=
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_SCRIPT_1ITEM_2II_0=cast=(PVOID),flags=no_in
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_SCRIPT_1ITEM_2II_1=cast=(CONST VOID *)
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_SCRIPT_1ITEM_2II_2=
-
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_SCRIPT_1LOGATTR_2II=
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_SCRIPT_1LOGATTR_2II_0=cast=(PVOID),flags=no_in
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_SCRIPT_1LOGATTR_2II_1=cast=(CONST VOID *)
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_SCRIPT_1LOGATTR_2II_2=
-
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_SCRIPT_1PROPERTIES_2II=
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_SCRIPT_1PROPERTIES_2II_0=cast=(PVOID),flags=no_in
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_SCRIPT_1PROPERTIES_2II_1=cast=(CONST VOID *)
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_SCRIPT_1PROPERTIES_2II_2=
-
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_TVITEM_2II=
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_TVITEM_2II_0=cast=(PVOID),flags=no_in
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_TVITEM_2II_1=cast=(CONST VOID *)
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_TVITEM_2II_2=
-
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_WINDOWPOS_2II=
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_WINDOWPOS_2II_0=cast=(PVOID),flags=no_in
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_WINDOWPOS_2II_1=cast=(CONST VOID *)
-OS_MoveMemory__Lorg_eclipse_swt_internal_win32_WINDOWPOS_2II_2=
-
-OS_MoveMemory___3BII=
-OS_MoveMemory___3BII_0=cast=(PVOID),flags=no_in critical
-OS_MoveMemory___3BII_1=cast=(CONST VOID *)
-OS_MoveMemory___3BII_2=
-
-OS_MoveMemory___3BLorg_eclipse_swt_internal_win32_ACCEL_2I=
-OS_MoveMemory___3BLorg_eclipse_swt_internal_win32_ACCEL_2I_0=cast=(PVOID),flags=no_in critical
-OS_MoveMemory___3BLorg_eclipse_swt_internal_win32_ACCEL_2I_1=cast=(CONST VOID *),flags=no_out
-OS_MoveMemory___3BLorg_eclipse_swt_internal_win32_ACCEL_2I_2=
-
-OS_MoveMemory___3BLorg_eclipse_swt_internal_win32_BITMAPINFOHEADER_2I=
-OS_MoveMemory___3BLorg_eclipse_swt_internal_win32_BITMAPINFOHEADER_2I_0=cast=(PVOID),flags=no_in critical
-OS_MoveMemory___3BLorg_eclipse_swt_internal_win32_BITMAPINFOHEADER_2I_1=cast=(CONST VOID *),flags=no_out
-OS_MoveMemory___3BLorg_eclipse_swt_internal_win32_BITMAPINFOHEADER_2I_2=
-
-OS_MoveMemory___3CII=
-OS_MoveMemory___3CII_0=cast=(PVOID),flags=no_in critical
-OS_MoveMemory___3CII_1=cast=(CONST VOID *)
-OS_MoveMemory___3CII_2=
-
-OS_MoveMemory___3DII=
-OS_MoveMemory___3DII_0=cast=(PVOID),flags=no_in critical
-OS_MoveMemory___3DII_1=cast=(CONST VOID *)
-OS_MoveMemory___3DII_2=
-
-OS_MoveMemory___3FII=
-OS_MoveMemory___3FII_0=cast=(PVOID),flags=no_in critical
-OS_MoveMemory___3FII_1=cast=(CONST VOID *)
-OS_MoveMemory___3FII_2=
-
-OS_MoveMemory___3III=
-OS_MoveMemory___3III_0=cast=(PVOID),flags=no_in critical
-OS_MoveMemory___3III_1=cast=(CONST VOID *)
-OS_MoveMemory___3III_2=
-
-OS_MoveMemory___3SII=
-OS_MoveMemory___3SII_0=cast=(PVOID),flags=no_in critical
-OS_MoveMemory___3SII_1=cast=(CONST VOID *)
-OS_MoveMemory___3SII_2=
-
-OS_MoveToEx=
-OS_MoveToEx_0=cast=(HDC)
-OS_MoveToEx_1=
-OS_MoveToEx_2=
-OS_MoveToEx_3=cast=(LPPOINT)
-
-OS_MsgWaitForMultipleObjectsEx=
-OS_MsgWaitForMultipleObjectsEx_0=cast=(DWORD)
-OS_MsgWaitForMultipleObjectsEx_1=cast=(LPHANDLE)
-OS_MsgWaitForMultipleObjectsEx_2=cast=(DWORD)
-OS_MsgWaitForMultipleObjectsEx_3=cast=(DWORD)
-OS_MsgWaitForMultipleObjectsEx_4=cast=(DWORD)
-
-OS_MultiByteToWideChar__IIII_3CI=
-OS_MultiByteToWideChar__IIII_3CI_0=
-OS_MultiByteToWideChar__IIII_3CI_1=
-OS_MultiByteToWideChar__IIII_3CI_2=cast=(LPCSTR)
-OS_MultiByteToWideChar__IIII_3CI_3=
-OS_MultiByteToWideChar__IIII_3CI_4=cast=(LPWSTR),flags=no_in critical
-OS_MultiByteToWideChar__IIII_3CI_5=
-
-OS_MultiByteToWideChar__II_3BI_3CI=
-OS_MultiByteToWideChar__II_3BI_3CI_0=
-OS_MultiByteToWideChar__II_3BI_3CI_1=
-OS_MultiByteToWideChar__II_3BI_3CI_2=cast=(LPCSTR),flags=no_out critical
-OS_MultiByteToWideChar__II_3BI_3CI_3=
-OS_MultiByteToWideChar__II_3BI_3CI_4=cast=(LPWSTR),flags=no_in critical
-OS_MultiByteToWideChar__II_3BI_3CI_5=
-
-OS_NotifyWinEvent=flags=dynamic
-OS_NotifyWinEvent_0=cast=DWORD
-OS_NotifyWinEvent_1=cast=HWND
-OS_NotifyWinEvent_2=cast=LONG
-OS_NotifyWinEvent_3=cast=LONG
-
-OS_OffsetRgn=
-OS_OffsetRgn_0=cast=HRGN
-OS_OffsetRgn_1=
-OS_OffsetRgn_2=
-
-OS_OleInitialize=
-OS_OleInitialize_0=cast=(LPVOID)
-
-OS_OleUninitialize=
-
-OS_OpenClipboard=
-OS_OpenClipboard_0=cast=(HWND)
-
-OS_PatBlt=
-OS_PatBlt_0=cast=(HDC)
-OS_PatBlt_1=
-OS_PatBlt_2=
-OS_PatBlt_3=
-OS_PatBlt_4=
-OS_PatBlt_5=
-
-OS_PeekMessageA=
-OS_PeekMessageA_0=
-OS_PeekMessageA_1=cast=(HWND)
-OS_PeekMessageA_2=
-OS_PeekMessageA_3=
-OS_PeekMessageA_4=
-
-OS_PeekMessageW=
-OS_PeekMessageW_0=
-OS_PeekMessageW_1=cast=(HWND)
-OS_PeekMessageW_2=
-OS_PeekMessageW_3=
-OS_PeekMessageW_4=
-
-OS_Pie=
-OS_Pie_0=cast=(HDC)
-OS_Pie_1=
-OS_Pie_2=
-OS_Pie_3=
-OS_Pie_4=
-OS_Pie_5=
-OS_Pie_6=
-OS_Pie_7=
-OS_Pie_8=
-
-OS_Polygon=
-OS_Polygon_0=cast=(HDC)
-OS_Polygon_1=cast=(CONST POINT *),flags=no_out critical
-OS_Polygon_2=
-
-OS_Polyline=
-OS_Polyline_0=cast=(HDC)
-OS_Polyline_1=cast=(CONST POINT *),flags=no_out critical
-OS_Polyline_2=
-
-OS_PostMessageA=
-OS_PostMessageA_0=cast=(HWND)
-OS_PostMessageA_1=
-OS_PostMessageA_2=cast=(WPARAM)
-OS_PostMessageA_3=cast=(LPARAM)
-
-OS_PostMessageW=
-OS_PostMessageW_0=cast=(HWND)
-OS_PostMessageW_1=
-OS_PostMessageW_2=cast=(WPARAM)
-OS_PostMessageW_3=cast=(LPARAM)
-
-OS_PostThreadMessageA=
-OS_PostThreadMessageA_0=
-OS_PostThreadMessageA_1=
-OS_PostThreadMessageA_2=cast=(WPARAM)
-OS_PostThreadMessageA_3=cast=(LPARAM)
-
-OS_PostThreadMessageW=
-OS_PostThreadMessageW_0=
-OS_PostThreadMessageW_1=
-OS_PostThreadMessageW_2=cast=(WPARAM)
-OS_PostThreadMessageW_3=cast=(LPARAM)
-
-OS_PrintDlgA=
-OS_PrintDlgA_0=
-
-OS_PrintDlgW=
-OS_PrintDlgW_0=cast=(LPPRINTDLGW)
-
-OS_PtInRect=
-OS_PtInRect_0=flags=no_out
-OS_PtInRect_1=flags=no_out struct
-
-OS_PtInRegion=
-OS_PtInRegion_0=cast=(HRGN)
-OS_PtInRegion_1=
-OS_PtInRegion_2=
-
-OS_RealizePalette=
-OS_RealizePalette_0=cast=(HDC)
-
-OS_RectInRegion=
-OS_RectInRegion_0=cast=(HRGN)
-OS_RectInRegion_1=flags=no_out
-
-OS_Rectangle=
-OS_Rectangle_0=cast=(HDC)
-OS_Rectangle_1=
-OS_Rectangle_2=
-OS_Rectangle_3=
-OS_Rectangle_4=
-
-OS_RedrawWindow=
-OS_RedrawWindow_0=cast=(HWND)
-OS_RedrawWindow_1=
-OS_RedrawWindow_2=cast=(HRGN)
-OS_RedrawWindow_3=
-
-OS_RegCloseKey=
-OS_RegCloseKey_0=cast=(HKEY)
-
-OS_RegEnumKeyExA=
-OS_RegEnumKeyExA_0=cast=(HKEY)
-OS_RegEnumKeyExA_1=
-OS_RegEnumKeyExA_2=cast=(LPSTR)
-OS_RegEnumKeyExA_3=
-OS_RegEnumKeyExA_4=
-OS_RegEnumKeyExA_5=cast=(LPSTR)
-OS_RegEnumKeyExA_6=
-OS_RegEnumKeyExA_7=
-
-OS_RegEnumKeyExW=
-OS_RegEnumKeyExW_0=cast=(HKEY)
-OS_RegEnumKeyExW_1=
-OS_RegEnumKeyExW_2=cast=(LPWSTR)
-OS_RegEnumKeyExW_3=
-OS_RegEnumKeyExW_4=
-OS_RegEnumKeyExW_5=cast=(LPWSTR)
-OS_RegEnumKeyExW_6=
-OS_RegEnumKeyExW_7=
-
-OS_RegOpenKeyExA=
-OS_RegOpenKeyExA_0=cast=(HKEY)
-OS_RegOpenKeyExA_1=cast=(LPSTR)
-OS_RegOpenKeyExA_2=
-OS_RegOpenKeyExA_3=
-OS_RegOpenKeyExA_4=cast=(PHKEY)
-
-OS_RegOpenKeyExW=
-OS_RegOpenKeyExW_0=cast=(HKEY)
-OS_RegOpenKeyExW_1=cast=(LPWSTR)
-OS_RegOpenKeyExW_2=
-OS_RegOpenKeyExW_3=
-OS_RegOpenKeyExW_4=cast=(PHKEY)
-
-OS_RegQueryInfoKeyA=
-OS_RegQueryInfoKeyA_0=cast=(HKEY)
-OS_RegQueryInfoKeyA_1=cast=(LPSTR)
-OS_RegQueryInfoKeyA_2=
-OS_RegQueryInfoKeyA_3=cast=(LPDWORD)
-OS_RegQueryInfoKeyA_4=
-OS_RegQueryInfoKeyA_5=
-OS_RegQueryInfoKeyA_6=
-OS_RegQueryInfoKeyA_7=
-OS_RegQueryInfoKeyA_8=
-OS_RegQueryInfoKeyA_9=
-OS_RegQueryInfoKeyA_10=
-OS_RegQueryInfoKeyA_11=cast=(PFILETIME)
-
-OS_RegQueryInfoKeyW=
-OS_RegQueryInfoKeyW_0=cast=(HKEY)
-OS_RegQueryInfoKeyW_1=cast=(LPWSTR)
-OS_RegQueryInfoKeyW_2=
-OS_RegQueryInfoKeyW_3=cast=(LPDWORD)
-OS_RegQueryInfoKeyW_4=
-OS_RegQueryInfoKeyW_5=
-OS_RegQueryInfoKeyW_6=
-OS_RegQueryInfoKeyW_7=
-OS_RegQueryInfoKeyW_8=
-OS_RegQueryInfoKeyW_9=
-OS_RegQueryInfoKeyW_10=
-OS_RegQueryInfoKeyW_11=cast=(PFILETIME)
-
-OS_RegQueryValueExA=
-OS_RegQueryValueExA_0=cast=(HKEY)
-OS_RegQueryValueExA_1=cast=(LPSTR)
-OS_RegQueryValueExA_2=cast=(LPDWORD)
-OS_RegQueryValueExA_3=
-OS_RegQueryValueExA_4=cast=(LPBYTE)
-OS_RegQueryValueExA_5=
-
-OS_RegQueryValueExW=
-OS_RegQueryValueExW_0=cast=(HKEY)
-OS_RegQueryValueExW_1=cast=(LPWSTR)
-OS_RegQueryValueExW_2=cast=(LPDWORD)
-OS_RegQueryValueExW_3=
-OS_RegQueryValueExW_4=cast=(LPBYTE)
-OS_RegQueryValueExW_5=
-
-OS_RegisterClassA=
-OS_RegisterClassA_0=
-
-OS_RegisterClassW=
-OS_RegisterClassW_0=cast=(LPWNDCLASSW)
-
-OS_RegisterClipboardFormatA=
-OS_RegisterClipboardFormatA_0=cast=(LPTSTR)
-
-OS_RegisterClipboardFormatW=
-OS_RegisterClipboardFormatW_0=cast=(LPWSTR)
-
-OS_RegisterWindowMessageA=
-OS_RegisterWindowMessageA_0=cast=(LPTSTR)
-
-OS_RegisterWindowMessageW=
-OS_RegisterWindowMessageW_0=cast=(LPWSTR)
-
-OS_ReleaseCapture=
-
-OS_ReleaseDC=
-OS_ReleaseDC_0=cast=(HWND)
-OS_ReleaseDC_1=cast=(HDC)
-
-OS_RemoveMenu=
-OS_RemoveMenu_0=cast=(HMENU)
-OS_RemoveMenu_1=
-OS_RemoveMenu_2=
-
-OS_RestoreDC=
-OS_RestoreDC_0=cast=(HDC)
-OS_RestoreDC_1=cast=(int)
-
-OS_RoundRect=
-OS_RoundRect_0=cast=(HDC)
-OS_RoundRect_1=
-OS_RoundRect_2=
-OS_RoundRect_3=
-OS_RoundRect_4=
-OS_RoundRect_5=
-OS_RoundRect_6=
-
-OS_SHBrowseForFolderA=
-OS_SHBrowseForFolderA_0=
-
-OS_SHBrowseForFolderW=
-OS_SHBrowseForFolderW_0=cast=(LPBROWSEINFOW)
-
-OS_SHCreateMenuBar=
-OS_SHCreateMenuBar_0=cast=(PSHMENUBARINFO)
-
-OS_SHGetMalloc=
-OS_SHGetMalloc_0=cast=(LPMALLOC *)
-
-OS_SHGetPathFromIDListA=
-OS_SHGetPathFromIDListA_0=cast=(LPCITEMIDLIST)
-OS_SHGetPathFromIDListA_1=cast=(LPSTR)
-
-OS_SHGetPathFromIDListW=
-OS_SHGetPathFromIDListW_0=cast=(LPCITEMIDLIST)
-OS_SHGetPathFromIDListW_1=cast=(LPWSTR)
-
-OS_SHHandleWMSettingChange=
-OS_SHHandleWMSettingChange_0=cast=(HWND)
-OS_SHHandleWMSettingChange_1=
-OS_SHHandleWMSettingChange_2=
-OS_SHHandleWMSettingChange_3=
-
-OS_SHRecognizeGesture=
-OS_SHRecognizeGesture_0=
-
-OS_SHSendBackToFocusWindow=
-OS_SHSendBackToFocusWindow_0=
-OS_SHSendBackToFocusWindow_1=
-OS_SHSendBackToFocusWindow_2=
-
-OS_SHSetAppKeyWndAssoc=
-OS_SHSetAppKeyWndAssoc_0=cast=(BYTE)
-OS_SHSetAppKeyWndAssoc_1=cast=(HWND)
-
-OS_SHSipPreference=
-OS_SHSipPreference_0=cast=(HWND)
-OS_SHSipPreference_1=
-
-OS_SaveDC=
-OS_SaveDC_0=cast=(HDC)
-
-OS_ScreenToClient=
-OS_ScreenToClient_0=cast=(HWND)
-OS_ScreenToClient_1=
-
-OS_ScriptBreak=
-OS_ScriptBreak_0=cast=const WCHAR *
-OS_ScriptBreak_1=
-OS_ScriptBreak_2=cast=const SCRIPT_ANALYSIS *
-OS_ScriptBreak_3=cast=SCRIPT_LOGATTR *
-
-OS_ScriptCPtoX=
-OS_ScriptCPtoX_0=
-OS_ScriptCPtoX_1=
-OS_ScriptCPtoX_2=
-OS_ScriptCPtoX_3=
-OS_ScriptCPtoX_4=cast=const WORD *
-OS_ScriptCPtoX_5=cast=const SCRIPT_VISATTR *
-OS_ScriptCPtoX_6=cast=const int *
-OS_ScriptCPtoX_7=cast=const SCRIPT_ANALYSIS *
-OS_ScriptCPtoX_8=cast=int *
-
-OS_ScriptCacheGetHeight=
-OS_ScriptCacheGetHeight_0=cast=HDC
-OS_ScriptCacheGetHeight_1=cast=(SCRIPT_CACHE *)
-OS_ScriptCacheGetHeight_2=cast=long *
-
-OS_ScriptFreeCache=
-OS_ScriptFreeCache_0=cast=(SCRIPT_CACHE *)
-
-OS_ScriptGetFontProperties=
-OS_ScriptGetFontProperties_0=cast=HDC
-OS_ScriptGetFontProperties_1=cast=SCRIPT_CACHE *
-OS_ScriptGetFontProperties_2=cast=SCRIPT_FONTPROPERTIES *
-
-OS_ScriptGetLogicalWidths=
-OS_ScriptGetLogicalWidths_0=cast=const SCRIPT_ANALYSIS *
-OS_ScriptGetLogicalWidths_1=
-OS_ScriptGetLogicalWidths_2=
-OS_ScriptGetLogicalWidths_3=cast=const int *
-OS_ScriptGetLogicalWidths_4=cast=const WORD *
-OS_ScriptGetLogicalWidths_5=cast=(const SCRIPT_VISATTR *)
-OS_ScriptGetLogicalWidths_6=cast=(int *)
-
-OS_ScriptGetProperties=
-OS_ScriptGetProperties_0=cast=const SCRIPT_PROPERTIES ***
-OS_ScriptGetProperties_1=cast=int *
-
-OS_ScriptItemize=
-OS_ScriptItemize_0=cast=const WCHAR *
-OS_ScriptItemize_1=
-OS_ScriptItemize_2=
-OS_ScriptItemize_3=cast=const SCRIPT_CONTROL *
-OS_ScriptItemize_4=cast=const SCRIPT_STATE *
-OS_ScriptItemize_5=cast=SCRIPT_ITEM *
-OS_ScriptItemize_6=cast=int *
-
-OS_ScriptLayout=
-OS_ScriptLayout_0=
-OS_ScriptLayout_1=cast=const BYTE *
-OS_ScriptLayout_2=cast=int *
-OS_ScriptLayout_3=cast=int *
-
-OS_ScriptPlace=
-OS_ScriptPlace_0=cast=HDC
-OS_ScriptPlace_1=cast=SCRIPT_CACHE *
-OS_ScriptPlace_2=cast=const WORD *
-OS_ScriptPlace_3=
-OS_ScriptPlace_4=cast=const SCRIPT_VISATTR *
-OS_ScriptPlace_5=cast=SCRIPT_ANALYSIS *
-OS_ScriptPlace_6=cast=int *
-OS_ScriptPlace_7=cast=GOFFSET *
-OS_ScriptPlace_8=cast=ABC *
-
-OS_ScriptShape=
-OS_ScriptShape_0=cast=HDC
-OS_ScriptShape_1=cast=SCRIPT_CACHE *
-OS_ScriptShape_2=cast=const WCHAR *
-OS_ScriptShape_3=
-OS_ScriptShape_4=
-OS_ScriptShape_5=cast=(SCRIPT_ANALYSIS *)
-OS_ScriptShape_6=cast=WORD *
-OS_ScriptShape_7=cast=WORD *
-OS_ScriptShape_8=cast=SCRIPT_VISATTR *
-OS_ScriptShape_9=cast=int *
-
-OS_ScriptTextOut=
-OS_ScriptTextOut_0=cast=const HDC
-OS_ScriptTextOut_1=cast=SCRIPT_CACHE *
-OS_ScriptTextOut_2=
-OS_ScriptTextOut_3=
-OS_ScriptTextOut_4=
-OS_ScriptTextOut_5=cast=const RECT *
-OS_ScriptTextOut_6=cast=const SCRIPT_ANALYSIS *
-OS_ScriptTextOut_7=cast=const WCHAR *
-OS_ScriptTextOut_8=
-OS_ScriptTextOut_9=cast=const WORD *
-OS_ScriptTextOut_10=
-OS_ScriptTextOut_11=cast=const int *
-OS_ScriptTextOut_12=cast=const int *
-OS_ScriptTextOut_13=cast=const GOFFSET *
-
-OS_ScriptXtoCP=
-OS_ScriptXtoCP_0=
-OS_ScriptXtoCP_1=
-OS_ScriptXtoCP_2=
-OS_ScriptXtoCP_3=cast=(const WORD *)
-OS_ScriptXtoCP_4=cast=const SCRIPT_VISATTR *
-OS_ScriptXtoCP_5=cast=const int *
-OS_ScriptXtoCP_6=cast=const SCRIPT_ANALYSIS *
-OS_ScriptXtoCP_7=cast=int *
-OS_ScriptXtoCP_8=cast=int *
-
-OS_ScrollWindowEx=
-OS_ScrollWindowEx_0=cast=(HWND)
-OS_ScrollWindowEx_1=
-OS_ScrollWindowEx_2=
-OS_ScrollWindowEx_3=
-OS_ScrollWindowEx_4=
-OS_ScrollWindowEx_5=cast=(HRGN)
-OS_ScrollWindowEx_6=
-OS_ScrollWindowEx_7=
-
-OS_SelectClipRgn=
-OS_SelectClipRgn_0=cast=(HDC)
-OS_SelectClipRgn_1=cast=(HRGN)
-
-OS_SelectObject=
-OS_SelectObject_0=cast=(HDC)
-OS_SelectObject_1=cast=(HGDIOBJ)
-
-OS_SelectPalette=
-OS_SelectPalette_0=cast=(HDC)
-OS_SelectPalette_1=cast=(HPALETTE)
-OS_SelectPalette_2=
-
-OS_SendInput=
-OS_SendInput_0=
-OS_SendInput_1=cast=LPINPUT
-OS_SendInput_2=
-
-OS_SendMessageA__IIII=
-OS_SendMessageA__IIII_0=cast=(HWND)
-OS_SendMessageA__IIII_1=
-OS_SendMessageA__IIII_2=cast=(WPARAM)
-OS_SendMessageA__IIII_3=cast=(LPARAM)
-
-OS_SendMessageA__IIILorg_eclipse_swt_internal_win32_LVCOLUMN_2=
-OS_SendMessageA__IIILorg_eclipse_swt_internal_win32_LVCOLUMN_2_0=cast=(HWND)
-OS_SendMessageA__IIILorg_eclipse_swt_internal_win32_LVCOLUMN_2_1=
-OS_SendMessageA__IIILorg_eclipse_swt_internal_win32_LVCOLUMN_2_2=cast=(WPARAM)
-OS_SendMessageA__IIILorg_eclipse_swt_internal_win32_LVCOLUMN_2_3=cast=(LPARAM)
-
-OS_SendMessageA__IIILorg_eclipse_swt_internal_win32_LVHITTESTINFO_2=
-OS_SendMessageA__IIILorg_eclipse_swt_internal_win32_LVHITTESTINFO_2_0=cast=(HWND)
-OS_SendMessageA__IIILorg_eclipse_swt_internal_win32_LVHITTESTINFO_2_1=
-OS_SendMessageA__IIILorg_eclipse_swt_internal_win32_LVHITTESTINFO_2_2=cast=(WPARAM)
-OS_SendMessageA__IIILorg_eclipse_swt_internal_win32_LVHITTESTINFO_2_3=cast=(LPARAM)
-
-OS_SendMessageA__IIILorg_eclipse_swt_internal_win32_LVITEM_2=
-OS_SendMessageA__IIILorg_eclipse_swt_internal_win32_LVITEM_2_0=cast=(HWND)
-OS_SendMessageA__IIILorg_eclipse_swt_internal_win32_LVITEM_2_1=
-OS_SendMessageA__IIILorg_eclipse_swt_internal_win32_LVITEM_2_2=cast=(WPARAM)
-OS_SendMessageA__IIILorg_eclipse_swt_internal_win32_LVITEM_2_3=cast=(LPARAM)
-
-OS_SendMessageA__IIILorg_eclipse_swt_internal_win32_MARGINS_2=
-OS_SendMessageA__IIILorg_eclipse_swt_internal_win32_MARGINS_2_0=cast=(HWND)
-OS_SendMessageA__IIILorg_eclipse_swt_internal_win32_MARGINS_2_1=
-OS_SendMessageA__IIILorg_eclipse_swt_internal_win32_MARGINS_2_2=cast=(WPARAM)
-OS_SendMessageA__IIILorg_eclipse_swt_internal_win32_MARGINS_2_3=cast=(LPARAM)
-
-OS_SendMessageA__IIILorg_eclipse_swt_internal_win32_REBARBANDINFO_2=
-OS_SendMessageA__IIILorg_eclipse_swt_internal_win32_REBARBANDINFO_2_0=cast=(HWND)
-OS_SendMessageA__IIILorg_eclipse_swt_internal_win32_REBARBANDINFO_2_1=
-OS_SendMessageA__IIILorg_eclipse_swt_internal_win32_REBARBANDINFO_2_2=cast=(WPARAM)
-OS_SendMessageA__IIILorg_eclipse_swt_internal_win32_REBARBANDINFO_2_3=cast=(LPARAM)
-
-OS_SendMessageA__IIILorg_eclipse_swt_internal_win32_RECT_2=
-OS_SendMessageA__IIILorg_eclipse_swt_internal_win32_RECT_2_0=cast=(HWND)
-OS_SendMessageA__IIILorg_eclipse_swt_internal_win32_RECT_2_1=
-OS_SendMessageA__IIILorg_eclipse_swt_internal_win32_RECT_2_2=cast=(WPARAM)
-OS_SendMessageA__IIILorg_eclipse_swt_internal_win32_RECT_2_3=cast=(LPARAM)
-
-OS_SendMessageA__IIILorg_eclipse_swt_internal_win32_TBBUTTONINFO_2=
-OS_SendMessageA__IIILorg_eclipse_swt_internal_win32_TBBUTTONINFO_2_0=cast=(HWND)
-OS_SendMessageA__IIILorg_eclipse_swt_internal_win32_TBBUTTONINFO_2_1=
-OS_SendMessageA__IIILorg_eclipse_swt_internal_win32_TBBUTTONINFO_2_2=cast=(WPARAM)
-OS_SendMessageA__IIILorg_eclipse_swt_internal_win32_TBBUTTONINFO_2_3=cast=(LPARAM)
-
-OS_SendMessageA__IIILorg_eclipse_swt_internal_win32_TBBUTTON_2=
-OS_SendMessageA__IIILorg_eclipse_swt_internal_win32_TBBUTTON_2_0=cast=(HWND)
-OS_SendMessageA__IIILorg_eclipse_swt_internal_win32_TBBUTTON_2_1=
-OS_SendMessageA__IIILorg_eclipse_swt_internal_win32_TBBUTTON_2_2=cast=(WPARAM)
-OS_SendMessageA__IIILorg_eclipse_swt_internal_win32_TBBUTTON_2_3=cast=(LPARAM)
-
-OS_SendMessageA__IIILorg_eclipse_swt_internal_win32_TCITEM_2=
-OS_SendMessageA__IIILorg_eclipse_swt_internal_win32_TCITEM_2_0=cast=(HWND)
-OS_SendMessageA__IIILorg_eclipse_swt_internal_win32_TCITEM_2_1=
-OS_SendMessageA__IIILorg_eclipse_swt_internal_win32_TCITEM_2_2=cast=(WPARAM)
-OS_SendMessageA__IIILorg_eclipse_swt_internal_win32_TCITEM_2_3=cast=(LPARAM)
-
-OS_SendMessageA__IIILorg_eclipse_swt_internal_win32_TOOLINFO_2=
-OS_SendMessageA__IIILorg_eclipse_swt_internal_win32_TOOLINFO_2_0=cast=(HWND)
-OS_SendMessageA__IIILorg_eclipse_swt_internal_win32_TOOLINFO_2_1=
-OS_SendMessageA__IIILorg_eclipse_swt_internal_win32_TOOLINFO_2_2=cast=(WPARAM)
-OS_SendMessageA__IIILorg_eclipse_swt_internal_win32_TOOLINFO_2_3=cast=(LPARAM)
-
-OS_SendMessageA__IIILorg_eclipse_swt_internal_win32_TVHITTESTINFO_2=
-OS_SendMessageA__IIILorg_eclipse_swt_internal_win32_TVHITTESTINFO_2_0=cast=(HWND)
-OS_SendMessageA__IIILorg_eclipse_swt_internal_win32_TVHITTESTINFO_2_1=
-OS_SendMessageA__IIILorg_eclipse_swt_internal_win32_TVHITTESTINFO_2_2=cast=(WPARAM)
-OS_SendMessageA__IIILorg_eclipse_swt_internal_win32_TVHITTESTINFO_2_3=cast=(LPARAM)
-
-OS_SendMessageA__IIILorg_eclipse_swt_internal_win32_TVINSERTSTRUCT_2=
-OS_SendMessageA__IIILorg_eclipse_swt_internal_win32_TVINSERTSTRUCT_2_0=cast=(HWND)
-OS_SendMessageA__IIILorg_eclipse_swt_internal_win32_TVINSERTSTRUCT_2_1=
-OS_SendMessageA__IIILorg_eclipse_swt_internal_win32_TVINSERTSTRUCT_2_2=cast=(WPARAM)
-OS_SendMessageA__IIILorg_eclipse_swt_internal_win32_TVINSERTSTRUCT_2_3=cast=(LPARAM)
-
-OS_SendMessageA__IIILorg_eclipse_swt_internal_win32_TVITEM_2=
-OS_SendMessageA__IIILorg_eclipse_swt_internal_win32_TVITEM_2_0=cast=(HWND)
-OS_SendMessageA__IIILorg_eclipse_swt_internal_win32_TVITEM_2_1=
-OS_SendMessageA__IIILorg_eclipse_swt_internal_win32_TVITEM_2_2=cast=(WPARAM)
-OS_SendMessageA__IIILorg_eclipse_swt_internal_win32_TVITEM_2_3=cast=(LPARAM)
-
-OS_SendMessageA__III_3B=
-OS_SendMessageA__III_3B_0=cast=(HWND)
-OS_SendMessageA__III_3B_1=
-OS_SendMessageA__III_3B_2=cast=(WPARAM)
-OS_SendMessageA__III_3B_3=cast=(LPARAM)
-
-OS_SendMessageA__III_3I=
-OS_SendMessageA__III_3I_0=cast=(HWND)
-OS_SendMessageA__III_3I_1=
-OS_SendMessageA__III_3I_2=cast=(WPARAM)
-OS_SendMessageA__III_3I_3=cast=(LPARAM)
-
-OS_SendMessageA__III_3S=
-OS_SendMessageA__III_3S_0=cast=(HWND)
-OS_SendMessageA__III_3S_1=
-OS_SendMessageA__III_3S_2=cast=(WPARAM)
-OS_SendMessageA__III_3S_3=cast=(LPARAM)
-
-OS_SendMessageA__II_3II=
-OS_SendMessageA__II_3II_0=cast=(HWND)
-OS_SendMessageA__II_3II_1=
-OS_SendMessageA__II_3II_2=cast=(WPARAM)
-OS_SendMessageA__II_3II_3=cast=(LPARAM)
-
-OS_SendMessageA__II_3I_3I=
-OS_SendMessageA__II_3I_3I_0=cast=(HWND)
-OS_SendMessageA__II_3I_3I_1=
-OS_SendMessageA__II_3I_3I_2=cast=(WPARAM)
-OS_SendMessageA__II_3I_3I_3=cast=(LPARAM)
-
-OS_SendMessageW__IIII=
-OS_SendMessageW__IIII_0=cast=(HWND)
-OS_SendMessageW__IIII_1=
-OS_SendMessageW__IIII_2=cast=(WPARAM)
-OS_SendMessageW__IIII_3=cast=(LPARAM)
-
-OS_SendMessageW__IIILorg_eclipse_swt_internal_win32_LVCOLUMN_2=
-OS_SendMessageW__IIILorg_eclipse_swt_internal_win32_LVCOLUMN_2_0=cast=(HWND)
-OS_SendMessageW__IIILorg_eclipse_swt_internal_win32_LVCOLUMN_2_1=
-OS_SendMessageW__IIILorg_eclipse_swt_internal_win32_LVCOLUMN_2_2=cast=(WPARAM)
-OS_SendMessageW__IIILorg_eclipse_swt_internal_win32_LVCOLUMN_2_3=cast=(LPARAM)
-
-OS_SendMessageW__IIILorg_eclipse_swt_internal_win32_LVHITTESTINFO_2=
-OS_SendMessageW__IIILorg_eclipse_swt_internal_win32_LVHITTESTINFO_2_0=cast=(HWND)
-OS_SendMessageW__IIILorg_eclipse_swt_internal_win32_LVHITTESTINFO_2_1=
-OS_SendMessageW__IIILorg_eclipse_swt_internal_win32_LVHITTESTINFO_2_2=cast=(WPARAM)
-OS_SendMessageW__IIILorg_eclipse_swt_internal_win32_LVHITTESTINFO_2_3=cast=(LPARAM)
-
-OS_SendMessageW__IIILorg_eclipse_swt_internal_win32_LVITEM_2=
-OS_SendMessageW__IIILorg_eclipse_swt_internal_win32_LVITEM_2_0=cast=(HWND)
-OS_SendMessageW__IIILorg_eclipse_swt_internal_win32_LVITEM_2_1=
-OS_SendMessageW__IIILorg_eclipse_swt_internal_win32_LVITEM_2_2=cast=(WPARAM)
-OS_SendMessageW__IIILorg_eclipse_swt_internal_win32_LVITEM_2_3=cast=(LPARAM)
-
-OS_SendMessageW__IIILorg_eclipse_swt_internal_win32_MARGINS_2=
-OS_SendMessageW__IIILorg_eclipse_swt_internal_win32_MARGINS_2_0=cast=(HWND)
-OS_SendMessageW__IIILorg_eclipse_swt_internal_win32_MARGINS_2_1=
-OS_SendMessageW__IIILorg_eclipse_swt_internal_win32_MARGINS_2_2=cast=(WPARAM)
-OS_SendMessageW__IIILorg_eclipse_swt_internal_win32_MARGINS_2_3=cast=(LPARAM)
-
-OS_SendMessageW__IIILorg_eclipse_swt_internal_win32_REBARBANDINFO_2=
-OS_SendMessageW__IIILorg_eclipse_swt_internal_win32_REBARBANDINFO_2_0=cast=(HWND)
-OS_SendMessageW__IIILorg_eclipse_swt_internal_win32_REBARBANDINFO_2_1=
-OS_SendMessageW__IIILorg_eclipse_swt_internal_win32_REBARBANDINFO_2_2=cast=(WPARAM)
-OS_SendMessageW__IIILorg_eclipse_swt_internal_win32_REBARBANDINFO_2_3=cast=(LPARAM)
-
-OS_SendMessageW__IIILorg_eclipse_swt_internal_win32_RECT_2=
-OS_SendMessageW__IIILorg_eclipse_swt_internal_win32_RECT_2_0=cast=(HWND)
-OS_SendMessageW__IIILorg_eclipse_swt_internal_win32_RECT_2_1=
-OS_SendMessageW__IIILorg_eclipse_swt_internal_win32_RECT_2_2=cast=(WPARAM)
-OS_SendMessageW__IIILorg_eclipse_swt_internal_win32_RECT_2_3=cast=(LPARAM)
-
-OS_SendMessageW__IIILorg_eclipse_swt_internal_win32_TBBUTTONINFO_2=
-OS_SendMessageW__IIILorg_eclipse_swt_internal_win32_TBBUTTONINFO_2_0=cast=(HWND)
-OS_SendMessageW__IIILorg_eclipse_swt_internal_win32_TBBUTTONINFO_2_1=
-OS_SendMessageW__IIILorg_eclipse_swt_internal_win32_TBBUTTONINFO_2_2=cast=(WPARAM)
-OS_SendMessageW__IIILorg_eclipse_swt_internal_win32_TBBUTTONINFO_2_3=cast=(LPARAM)
-
-OS_SendMessageW__IIILorg_eclipse_swt_internal_win32_TBBUTTON_2=
-OS_SendMessageW__IIILorg_eclipse_swt_internal_win32_TBBUTTON_2_0=cast=(HWND)
-OS_SendMessageW__IIILorg_eclipse_swt_internal_win32_TBBUTTON_2_1=
-OS_SendMessageW__IIILorg_eclipse_swt_internal_win32_TBBUTTON_2_2=cast=(WPARAM)
-OS_SendMessageW__IIILorg_eclipse_swt_internal_win32_TBBUTTON_2_3=cast=(LPARAM)
-
-OS_SendMessageW__IIILorg_eclipse_swt_internal_win32_TCITEM_2=
-OS_SendMessageW__IIILorg_eclipse_swt_internal_win32_TCITEM_2_0=cast=(HWND)
-OS_SendMessageW__IIILorg_eclipse_swt_internal_win32_TCITEM_2_1=
-OS_SendMessageW__IIILorg_eclipse_swt_internal_win32_TCITEM_2_2=cast=(WPARAM)
-OS_SendMessageW__IIILorg_eclipse_swt_internal_win32_TCITEM_2_3=cast=(LPARAM)
-
-OS_SendMessageW__IIILorg_eclipse_swt_internal_win32_TOOLINFO_2=
-OS_SendMessageW__IIILorg_eclipse_swt_internal_win32_TOOLINFO_2_0=cast=(HWND)
-OS_SendMessageW__IIILorg_eclipse_swt_internal_win32_TOOLINFO_2_1=
-OS_SendMessageW__IIILorg_eclipse_swt_internal_win32_TOOLINFO_2_2=cast=(WPARAM)
-OS_SendMessageW__IIILorg_eclipse_swt_internal_win32_TOOLINFO_2_3=cast=(LPARAM)
-
-OS_SendMessageW__IIILorg_eclipse_swt_internal_win32_TVHITTESTINFO_2=
-OS_SendMessageW__IIILorg_eclipse_swt_internal_win32_TVHITTESTINFO_2_0=cast=(HWND)
-OS_SendMessageW__IIILorg_eclipse_swt_internal_win32_TVHITTESTINFO_2_1=
-OS_SendMessageW__IIILorg_eclipse_swt_internal_win32_TVHITTESTINFO_2_2=cast=(WPARAM)
-OS_SendMessageW__IIILorg_eclipse_swt_internal_win32_TVHITTESTINFO_2_3=cast=(LPARAM)
-
-OS_SendMessageW__IIILorg_eclipse_swt_internal_win32_TVINSERTSTRUCT_2=
-OS_SendMessageW__IIILorg_eclipse_swt_internal_win32_TVINSERTSTRUCT_2_0=cast=(HWND)
-OS_SendMessageW__IIILorg_eclipse_swt_internal_win32_TVINSERTSTRUCT_2_1=
-OS_SendMessageW__IIILorg_eclipse_swt_internal_win32_TVINSERTSTRUCT_2_2=cast=(WPARAM)
-OS_SendMessageW__IIILorg_eclipse_swt_internal_win32_TVINSERTSTRUCT_2_3=cast=(LPARAM)
-
-OS_SendMessageW__IIILorg_eclipse_swt_internal_win32_TVITEM_2=
-OS_SendMessageW__IIILorg_eclipse_swt_internal_win32_TVITEM_2_0=cast=(HWND)
-OS_SendMessageW__IIILorg_eclipse_swt_internal_win32_TVITEM_2_1=
-OS_SendMessageW__IIILorg_eclipse_swt_internal_win32_TVITEM_2_2=cast=(WPARAM)
-OS_SendMessageW__IIILorg_eclipse_swt_internal_win32_TVITEM_2_3=cast=(LPARAM)
-
-OS_SendMessageW__III_3C=
-OS_SendMessageW__III_3C_0=cast=(HWND)
-OS_SendMessageW__III_3C_1=
-OS_SendMessageW__III_3C_2=cast=(WPARAM)
-OS_SendMessageW__III_3C_3=cast=(LPARAM)
-
-OS_SendMessageW__III_3I=
-OS_SendMessageW__III_3I_0=cast=(HWND)
-OS_SendMessageW__III_3I_1=
-OS_SendMessageW__III_3I_2=cast=(WPARAM)
-OS_SendMessageW__III_3I_3=cast=(LPARAM)
-
-OS_SendMessageW__III_3S=
-OS_SendMessageW__III_3S_0=cast=(HWND)
-OS_SendMessageW__III_3S_1=
-OS_SendMessageW__III_3S_2=cast=(WPARAM)
-OS_SendMessageW__III_3S_3=cast=(LPARAM)
-
-OS_SendMessageW__II_3II=
-OS_SendMessageW__II_3II_0=cast=(HWND)
-OS_SendMessageW__II_3II_1=
-OS_SendMessageW__II_3II_2=cast=(WPARAM)
-OS_SendMessageW__II_3II_3=cast=(LPARAM)
-
-OS_SendMessageW__II_3I_3I=flags=no_gen
-OS_SendMessageW__II_3I_3I_0=cast=(HWND)
-OS_SendMessageW__II_3I_3I_1=
-OS_SendMessageW__II_3I_3I_2=cast=(WPARAM)
-OS_SendMessageW__II_3I_3I_3=cast=(LPARAM)
-
-OS_SetActiveWindow=
-OS_SetActiveWindow_0=cast=(HWND)
-
-OS_SetBkColor=
-OS_SetBkColor_0=cast=(HDC)
-OS_SetBkColor_1=cast=(COLORREF)
-
-OS_SetBkMode=
-OS_SetBkMode_0=cast=(HDC)
-OS_SetBkMode_1=
-
-OS_SetCapture=
-OS_SetCapture_0=cast=(HWND)
-
-OS_SetCaretPos=
-OS_SetCaretPos_0=
-OS_SetCaretPos_1=
-
-OS_SetClipboardData=
-OS_SetClipboardData_0=
-OS_SetClipboardData_1=cast=(HANDLE)
-
-OS_SetCursor=
-OS_SetCursor_0=cast=(HCURSOR)
-
-OS_SetCursorPos=
-OS_SetCursorPos_0=
-OS_SetCursorPos_1=
-
-OS_SetDIBColorTable=
-OS_SetDIBColorTable_0=cast=(HDC)
-OS_SetDIBColorTable_1=
-OS_SetDIBColorTable_2=
-OS_SetDIBColorTable_3=cast=(RGBQUAD *),flags=no_out critical
-
-OS_SetErrorMode=
-OS_SetErrorMode_0=
-
-OS_SetFocus=
-OS_SetFocus_0=cast=(HWND)
-
-OS_SetForegroundWindow=
-OS_SetForegroundWindow_0=cast=(HWND)
-
-OS_SetLayout=flags=dynamic
-OS_SetLayout_0=cast=(HDC)
-OS_SetLayout_1=cast=(DWORD)
-
-OS_SetMenu=
-OS_SetMenu_0=cast=(HWND)
-OS_SetMenu_1=cast=(HMENU)
-
-OS_SetMenuDefaultItem=
-OS_SetMenuDefaultItem_0=cast=(HMENU)
-OS_SetMenuDefaultItem_1=
-OS_SetMenuDefaultItem_2=
-
-OS_SetMenuInfo=flags=dynamic
-OS_SetMenuInfo_0=cast=(HMENU)
-OS_SetMenuInfo_1=
-
-OS_SetMenuItemInfoA=
-OS_SetMenuItemInfoA_0=cast=(HMENU)
-OS_SetMenuItemInfoA_1=
-OS_SetMenuItemInfoA_2=
-OS_SetMenuItemInfoA_3=
-
-OS_SetMenuItemInfoW=
-OS_SetMenuItemInfoW_0=cast=(HMENU)
-OS_SetMenuItemInfoW_1=
-OS_SetMenuItemInfoW_2=
-OS_SetMenuItemInfoW_3=cast=(LPMENUITEMINFOW)
-
-OS_SetPaletteEntries=
-OS_SetPaletteEntries_0=cast=(HPALETTE)
-OS_SetPaletteEntries_1=
-OS_SetPaletteEntries_2=
-OS_SetPaletteEntries_3=cast=(PALETTEENTRY *),flags=no_out critical
-
-OS_SetParent=
-OS_SetParent_0=cast=(HWND)
-OS_SetParent_1=cast=(HWND)
-
-OS_SetPixel=
-OS_SetPixel_0=cast=(HDC)
-OS_SetPixel_1=
-OS_SetPixel_2=
-OS_SetPixel_3=
-
-OS_SetROP2=
-OS_SetROP2_0=cast=(HDC)
-OS_SetROP2_1=
-
-OS_SetRect=
-OS_SetRect_0=flags=no_in
-OS_SetRect_1=
-OS_SetRect_2=
-OS_SetRect_3=
-OS_SetRect_4=
-
-OS_SetRectRgn=
-OS_SetRectRgn_0=cast=(HRGN)
-OS_SetRectRgn_1=
-OS_SetRectRgn_2=
-OS_SetRectRgn_3=
-OS_SetRectRgn_4=
-
-OS_SetScrollInfo=
-OS_SetScrollInfo_0=cast=(HWND)
-OS_SetScrollInfo_1=
-OS_SetScrollInfo_2=
-OS_SetScrollInfo_3=
-
-OS_SetStretchBltMode=
-OS_SetStretchBltMode_0=cast=(HDC)
-OS_SetStretchBltMode_1=
-
-OS_SetTextAlign=
-OS_SetTextAlign_0=cast=(HDC)
-OS_SetTextAlign_1=
-
-OS_SetTextColor=
-OS_SetTextColor_0=cast=(HDC)
-OS_SetTextColor_1=cast=(COLORREF)
-
-OS_SetTimer=
-OS_SetTimer_0=cast=(HWND)
-OS_SetTimer_1=
-OS_SetTimer_2=
-OS_SetTimer_3=cast=(TIMERPROC)
-
-OS_SetWindowLongA=
-OS_SetWindowLongA_0=cast=(HWND)
-OS_SetWindowLongA_1=
-OS_SetWindowLongA_2=
-
-OS_SetWindowLongW=
-OS_SetWindowLongW_0=cast=(HWND)
-OS_SetWindowLongW_1=
-OS_SetWindowLongW_2=
-
-OS_SetWindowPlacement=
-OS_SetWindowPlacement_0=cast=(HWND)
-OS_SetWindowPlacement_1=
-
-OS_SetWindowPos=
-OS_SetWindowPos_0=cast=(HWND)
-OS_SetWindowPos_1=cast=(HWND)
-OS_SetWindowPos_2=
-OS_SetWindowPos_3=
-OS_SetWindowPos_4=
-OS_SetWindowPos_5=
-OS_SetWindowPos_6=
-
-OS_SetWindowRgn=
-OS_SetWindowRgn_0=cast=HWND
-OS_SetWindowRgn_1=cast=HRGN
-OS_SetWindowRgn_2=
-
-OS_SetWindowTextA=
-OS_SetWindowTextA_0=cast=(HWND)
-OS_SetWindowTextA_1=cast=(LPSTR)
-
-OS_SetWindowTextW=
-OS_SetWindowTextW_0=cast=(HWND)
-OS_SetWindowTextW_1=cast=(LPWSTR)
-
-OS_SetWindowsHookExA=
-OS_SetWindowsHookExA_0=
-OS_SetWindowsHookExA_1=cast=(HOOKPROC)
-OS_SetWindowsHookExA_2=cast=(HINSTANCE)
-OS_SetWindowsHookExA_3=
-
-OS_SetWindowsHookExW=
-OS_SetWindowsHookExW_0=
-OS_SetWindowsHookExW_1=cast=(HOOKPROC)
-OS_SetWindowsHookExW_2=cast=(HINSTANCE)
-OS_SetWindowsHookExW_3=
-
-OS_ShellExecuteExA=
-OS_ShellExecuteExA_0=
-
-OS_ShellExecuteExW=
-OS_ShellExecuteExW_0=cast=(LPSHELLEXECUTEINFOW)
-
-OS_Shell_NotifyIconA=
-OS_Shell_NotifyIconA_0=
-OS_Shell_NotifyIconA_1=
-
-OS_Shell_NotifyIconW=
-OS_Shell_NotifyIconW_0=
-OS_Shell_NotifyIconW_1=
-
-OS_ShowCaret=
-OS_ShowCaret_0=cast=(HWND)
-
-OS_ShowOwnedPopups=
-OS_ShowOwnedPopups_0=cast=(HWND)
-OS_ShowOwnedPopups_1=
-
-OS_ShowScrollBar=
-OS_ShowScrollBar_0=cast=(HWND)
-OS_ShowScrollBar_1=
-OS_ShowScrollBar_2=
-
-OS_ShowWindow=
-OS_ShowWindow_0=cast=(HWND)
-OS_ShowWindow_1=
-
-OS_SipGetInfo=
-OS_SipGetInfo_0=
-
-OS_StartDocA=
-OS_StartDocA_0=cast=(HDC)
-OS_StartDocA_1=
-
-OS_StartDocW=
-OS_StartDocW_0=cast=(HDC)
-OS_StartDocW_1=cast=(LPDOCINFOW)
-
-OS_StartPage=
-OS_StartPage_0=cast=(HDC)
-
-OS_StretchBlt=
-OS_StretchBlt_0=cast=(HDC)
-OS_StretchBlt_1=
-OS_StretchBlt_2=
-OS_StretchBlt_3=
-OS_StretchBlt_4=
-OS_StretchBlt_5=cast=(HDC)
-OS_StretchBlt_6=
-OS_StretchBlt_7=
-OS_StretchBlt_8=
-OS_StretchBlt_9=
-OS_StretchBlt_10=
-
-OS_SystemParametersInfoA__IILorg_eclipse_swt_internal_win32_HIGHCONTRAST_2I=
-OS_SystemParametersInfoA__IILorg_eclipse_swt_internal_win32_HIGHCONTRAST_2I_0=
-OS_SystemParametersInfoA__IILorg_eclipse_swt_internal_win32_HIGHCONTRAST_2I_1=
-OS_SystemParametersInfoA__IILorg_eclipse_swt_internal_win32_HIGHCONTRAST_2I_2=
-OS_SystemParametersInfoA__IILorg_eclipse_swt_internal_win32_HIGHCONTRAST_2I_3=
-
-OS_SystemParametersInfoA__IILorg_eclipse_swt_internal_win32_NONCLIENTMETRICSA_2I=
-OS_SystemParametersInfoA__IILorg_eclipse_swt_internal_win32_NONCLIENTMETRICSA_2I_0=
-OS_SystemParametersInfoA__IILorg_eclipse_swt_internal_win32_NONCLIENTMETRICSA_2I_1=
-OS_SystemParametersInfoA__IILorg_eclipse_swt_internal_win32_NONCLIENTMETRICSA_2I_2=
-OS_SystemParametersInfoA__IILorg_eclipse_swt_internal_win32_NONCLIENTMETRICSA_2I_3=
-
-OS_SystemParametersInfoA__IILorg_eclipse_swt_internal_win32_RECT_2I=
-OS_SystemParametersInfoA__IILorg_eclipse_swt_internal_win32_RECT_2I_0=
-OS_SystemParametersInfoA__IILorg_eclipse_swt_internal_win32_RECT_2I_1=
-OS_SystemParametersInfoA__IILorg_eclipse_swt_internal_win32_RECT_2I_2=
-OS_SystemParametersInfoA__IILorg_eclipse_swt_internal_win32_RECT_2I_3=
-
-OS_SystemParametersInfoA__II_3II=
-OS_SystemParametersInfoA__II_3II_0=
-OS_SystemParametersInfoA__II_3II_1=
-OS_SystemParametersInfoA__II_3II_2=
-OS_SystemParametersInfoA__II_3II_3=
-
-OS_SystemParametersInfoW__IILorg_eclipse_swt_internal_win32_HIGHCONTRAST_2I=
-OS_SystemParametersInfoW__IILorg_eclipse_swt_internal_win32_HIGHCONTRAST_2I_0=
-OS_SystemParametersInfoW__IILorg_eclipse_swt_internal_win32_HIGHCONTRAST_2I_1=
-OS_SystemParametersInfoW__IILorg_eclipse_swt_internal_win32_HIGHCONTRAST_2I_2=
-OS_SystemParametersInfoW__IILorg_eclipse_swt_internal_win32_HIGHCONTRAST_2I_3=
-
-OS_SystemParametersInfoW__IILorg_eclipse_swt_internal_win32_NONCLIENTMETRICSW_2I=
-OS_SystemParametersInfoW__IILorg_eclipse_swt_internal_win32_NONCLIENTMETRICSW_2I_0=
-OS_SystemParametersInfoW__IILorg_eclipse_swt_internal_win32_NONCLIENTMETRICSW_2I_1=
-OS_SystemParametersInfoW__IILorg_eclipse_swt_internal_win32_NONCLIENTMETRICSW_2I_2=
-OS_SystemParametersInfoW__IILorg_eclipse_swt_internal_win32_NONCLIENTMETRICSW_2I_3=
-
-OS_SystemParametersInfoW__IILorg_eclipse_swt_internal_win32_RECT_2I=
-OS_SystemParametersInfoW__IILorg_eclipse_swt_internal_win32_RECT_2I_0=
-OS_SystemParametersInfoW__IILorg_eclipse_swt_internal_win32_RECT_2I_1=
-OS_SystemParametersInfoW__IILorg_eclipse_swt_internal_win32_RECT_2I_2=
-OS_SystemParametersInfoW__IILorg_eclipse_swt_internal_win32_RECT_2I_3=
-
-OS_SystemParametersInfoW__II_3II=
-OS_SystemParametersInfoW__II_3II_0=
-OS_SystemParametersInfoW__II_3II_1=
-OS_SystemParametersInfoW__II_3II_2=
-OS_SystemParametersInfoW__II_3II_3=
-
-OS_ToAscii=
-OS_ToAscii_0=
-OS_ToAscii_1=
-OS_ToAscii_2=cast=(PBYTE)
-OS_ToAscii_3=cast=(LPWORD)
-OS_ToAscii_4=
-
-OS_ToUnicode=
-OS_ToUnicode_0=
-OS_ToUnicode_1=
-OS_ToUnicode_2=cast=(PBYTE)
-OS_ToUnicode_3=cast=(LPWSTR)
-OS_ToUnicode_4=
-OS_ToUnicode_5=
-
-OS_TrackMouseEvent=
-OS_TrackMouseEvent_0=
-
-OS_TrackPopupMenu=
-OS_TrackPopupMenu_0=cast=(HMENU)
-OS_TrackPopupMenu_1=
-OS_TrackPopupMenu_2=
-OS_TrackPopupMenu_3=
-OS_TrackPopupMenu_4=
-OS_TrackPopupMenu_5=cast=(HWND)
-OS_TrackPopupMenu_6=
-
-OS_TranslateAcceleratorA=
-OS_TranslateAcceleratorA_0=cast=(HWND)
-OS_TranslateAcceleratorA_1=cast=(HACCEL)
-OS_TranslateAcceleratorA_2=
-
-OS_TranslateAcceleratorW=
-OS_TranslateAcceleratorW_0=cast=(HWND)
-OS_TranslateAcceleratorW_1=cast=(HACCEL)
-OS_TranslateAcceleratorW_2=
-
-OS_TranslateCharsetInfo=
-OS_TranslateCharsetInfo_0=cast=(DWORD *)
-OS_TranslateCharsetInfo_1=cast=(LPCHARSETINFO)
-OS_TranslateCharsetInfo_2=
-
-OS_TranslateMDISysAccel=
-OS_TranslateMDISysAccel_0=cast=(HWND)
-OS_TranslateMDISysAccel_1=cast=(LPMSG)
-
-OS_TranslateMessage=
-OS_TranslateMessage_0=
-
-OS_TransparentImage=
-OS_TransparentImage_0=cast=(HDC)
-OS_TransparentImage_1=
-OS_TransparentImage_2=
-OS_TransparentImage_3=
-OS_TransparentImage_4=
-OS_TransparentImage_5=cast=(HANDLE)
-OS_TransparentImage_6=
-OS_TransparentImage_7=
-OS_TransparentImage_8=
-OS_TransparentImage_9=
-OS_TransparentImage_10=cast=(COLORREF)
-
-OS_UnhookWindowsHookEx=
-OS_UnhookWindowsHookEx_0=cast=(HHOOK)
-
-OS_UnregisterClassA=
-OS_UnregisterClassA_0=cast=(LPSTR)
-OS_UnregisterClassA_1=cast=(HINSTANCE)
-
-OS_UnregisterClassW=
-OS_UnregisterClassW_0=cast=(LPWSTR)
-OS_UnregisterClassW_1=cast=(HINSTANCE)
-
-OS_UpdateWindow=
-OS_UpdateWindow_0=cast=(HWND)
-
-OS_ValidateRect=
-OS_ValidateRect_0=cast=(HWND)
-OS_ValidateRect_1=
-
-OS_VkKeyScanA=
-OS_VkKeyScanA_0=cast=(TCHAR)
-
-OS_VkKeyScanW=
-OS_VkKeyScanW_0=cast=(WCHAR)
-
-OS_VtblCall__II=
-OS_VtblCall__II_0=
-OS_VtblCall__II_1=
-
-OS_VtblCall__III=
-OS_VtblCall__III_0=
-OS_VtblCall__III_1=
-OS_VtblCall__III_2=
-
-OS_VtblCall__IIIII_3I=
-OS_VtblCall__IIIII_3I_0=
-OS_VtblCall__IIIII_3I_1=
-OS_VtblCall__IIIII_3I_2=
-OS_VtblCall__IIIII_3I_3=
-OS_VtblCall__IIIII_3I_4=
-OS_VtblCall__IIIII_3I_5=
-
-OS_VtblCall__II_3CII_3I_3I=
-OS_VtblCall__II_3CII_3I_3I_0=
-OS_VtblCall__II_3CII_3I_3I_1=
-OS_VtblCall__II_3CII_3I_3I_2=
-OS_VtblCall__II_3CII_3I_3I_3=
-OS_VtblCall__II_3CII_3I_3I_4=
-OS_VtblCall__II_3CII_3I_3I_5=
-OS_VtblCall__II_3CII_3I_3I_6=
-
-OS_WaitMessage=
-
-OS_WideCharToMultiByte__II_3CIII_3B_3Z=
-OS_WideCharToMultiByte__II_3CIII_3B_3Z_0=
-OS_WideCharToMultiByte__II_3CIII_3B_3Z_1=
-OS_WideCharToMultiByte__II_3CIII_3B_3Z_2=cast=(LPCWSTR),flags=no_out critical
-OS_WideCharToMultiByte__II_3CIII_3B_3Z_3=
-OS_WideCharToMultiByte__II_3CIII_3B_3Z_4=cast=(LPSTR)
-OS_WideCharToMultiByte__II_3CIII_3B_3Z_5=
-OS_WideCharToMultiByte__II_3CIII_3B_3Z_6=cast=(LPCSTR)
-OS_WideCharToMultiByte__II_3CIII_3B_3Z_7=cast=(LPBOOL)
-
-OS_WideCharToMultiByte__II_3CI_3BI_3B_3Z=
-OS_WideCharToMultiByte__II_3CI_3BI_3B_3Z_0=
-OS_WideCharToMultiByte__II_3CI_3BI_3B_3Z_1=
-OS_WideCharToMultiByte__II_3CI_3BI_3B_3Z_2=cast=(LPCWSTR),flags=no_out critical
-OS_WideCharToMultiByte__II_3CI_3BI_3B_3Z_3=
-OS_WideCharToMultiByte__II_3CI_3BI_3B_3Z_4=cast=(LPSTR),flags=no_in critical
-OS_WideCharToMultiByte__II_3CI_3BI_3B_3Z_5=
-OS_WideCharToMultiByte__II_3CI_3BI_3B_3Z_6=cast=(LPCSTR)
-OS_WideCharToMultiByte__II_3CI_3BI_3B_3Z_7=cast=(LPBOOL)
-
-OS_WindowFromDC=
-OS_WindowFromDC_0=cast=(HDC)
-
-OS_WindowFromPoint=
-OS_WindowFromPoint_0=flags=struct
-
-OS_wcslen=
-OS_wcslen_0=cast=const wchar_t *
-
-
-org_eclipse_swt_internal_win32_OSVERSIONINFO=
-OSVERSIONINFO_dwOSVersionInfoSize=
-OSVERSIONINFO_dwMajorVersion=
-OSVERSIONINFO_dwMinorVersion=
-OSVERSIONINFO_dwBuildNumber=
-OSVERSIONINFO_dwPlatformId=
-
-org_eclipse_swt_internal_win32_OSVERSIONINFOA=
-OSVERSIONINFOA_szCSDVersion=
-
-org_eclipse_swt_internal_win32_OSVERSIONINFOW=
-OSVERSIONINFOW_szCSDVersion=
-
-org_eclipse_swt_internal_win32_PAINTSTRUCT=
-PAINTSTRUCT_hdc=cast=(HDC)
-PAINTSTRUCT_fErase=
-PAINTSTRUCT_left=accessor=rcPaint.left
-PAINTSTRUCT_top=accessor=rcPaint.top
-PAINTSTRUCT_right=accessor=rcPaint.right
-PAINTSTRUCT_bottom=accessor=rcPaint.bottom
-PAINTSTRUCT_fRestore=
-PAINTSTRUCT_fIncUpdate=
-PAINTSTRUCT_rgbReserved=
-
-org_eclipse_swt_internal_win32_POINT=
-POINT_x=
-POINT_y=
-
-org_eclipse_swt_internal_win32_PRINTDLG=
-PRINTDLG_lStructSize=
-PRINTDLG_hwndOwner=cast=(HWND)
-PRINTDLG_hDevMode=cast=(HGLOBAL)
-PRINTDLG_hDevNames=cast=(HGLOBAL)
-PRINTDLG_hDC=cast=(HDC)
-PRINTDLG_Flags=
-PRINTDLG_nFromPage=
-PRINTDLG_nToPage=
-PRINTDLG_nMinPage=
-PRINTDLG_nMaxPage=
-PRINTDLG_nCopies=
-PRINTDLG_hInstance=cast=(HINSTANCE)
-PRINTDLG_lCustData=
-PRINTDLG_lpfnPrintHook=cast=(LPPRINTHOOKPROC)
-PRINTDLG_lpfnSetupHook=cast=(LPPRINTHOOKPROC)
-PRINTDLG_lpPrintTemplateName=cast=(LPCTSTR)
-PRINTDLG_lpSetupTemplateName=cast=(LPCTSTR)
-PRINTDLG_hPrintTemplate=cast=(HGLOBAL)
-PRINTDLG_hSetupTemplate=cast=(HGLOBAL)
-
-org_eclipse_swt_internal_win32_REBARBANDINFO=
-REBARBANDINFO_cbSize=
-REBARBANDINFO_fMask=
-REBARBANDINFO_fStyle=
-REBARBANDINFO_clrFore=
-REBARBANDINFO_clrBack=
-REBARBANDINFO_lpText=cast=(LPTSTR)
-REBARBANDINFO_cch=
-REBARBANDINFO_iImage=
-REBARBANDINFO_hwndChild=cast=(HWND)
-REBARBANDINFO_cxMinChild=
-REBARBANDINFO_cyMinChild=
-REBARBANDINFO_cx=
-REBARBANDINFO_hbmBack=cast=(HBITMAP)
-REBARBANDINFO_wID=
-REBARBANDINFO_cyChild=
-REBARBANDINFO_cyMaxChild=
-REBARBANDINFO_cyIntegral=
-REBARBANDINFO_cxIdeal=
-REBARBANDINFO_lParam=
-REBARBANDINFO_cxHeader=flags=no_wince
-
-org_eclipse_swt_internal_win32_RECT=
-RECT_left=
-RECT_top=
-RECT_right=
-RECT_bottom=
-
-org_eclipse_swt_internal_win32_SCRIPT_1ANALYSIS=
-SCRIPT_ANALYSIS_eScript=
-SCRIPT_ANALYSIS_fRTL=
-SCRIPT_ANALYSIS_fLayoutRTL=
-SCRIPT_ANALYSIS_fLinkBefore=
-SCRIPT_ANALYSIS_fLinkAfter=
-SCRIPT_ANALYSIS_fLogicalOrder=
-SCRIPT_ANALYSIS_fNoGlyphIndex=
-SCRIPT_ANALYSIS_s=
-
-org_eclipse_swt_internal_win32_SCRIPT_1CONTROL=
-SCRIPT_CONTROL_uDefaultLanguage=
-SCRIPT_CONTROL_fContextDigits=
-SCRIPT_CONTROL_fInvertPreBoundDir=
-SCRIPT_CONTROL_fInvertPostBoundDir=
-SCRIPT_CONTROL_fLinkStringBefore=
-SCRIPT_CONTROL_fLinkStringAfter=
-SCRIPT_CONTROL_fNeutralOverride=
-SCRIPT_CONTROL_fNumericOverride=
-SCRIPT_CONTROL_fLegacyBidiClass=
-SCRIPT_CONTROL_fReserved=
-
-org_eclipse_swt_internal_win32_SCRIPT_1FONTPROPERTIES=
-SCRIPT_FONTPROPERTIES_cBytes=
-SCRIPT_FONTPROPERTIES_wgBlank=
-SCRIPT_FONTPROPERTIES_wgDefault=
-SCRIPT_FONTPROPERTIES_wgInvalid=
-SCRIPT_FONTPROPERTIES_wgKashida=
-SCRIPT_FONTPROPERTIES_iKashidaWidth=
-
-org_eclipse_swt_internal_win32_SCRIPT_1ITEM=
-SCRIPT_ITEM_iCharPos=
-SCRIPT_ITEM_a=
-
-org_eclipse_swt_internal_win32_SCRIPT_1LOGATTR=
-SCRIPT_LOGATTR_fSoftBreak=
-SCRIPT_LOGATTR_fWhiteSpace=
-SCRIPT_LOGATTR_fCharStop=
-SCRIPT_LOGATTR_fWordStop=
-SCRIPT_LOGATTR_fInvalid=
-SCRIPT_LOGATTR_fReserved=
-
-org_eclipse_swt_internal_win32_SCRIPT_1PROPERTIES=
-SCRIPT_PROPERTIES_langid=
-SCRIPT_PROPERTIES_fNumeric=
-SCRIPT_PROPERTIES_fComplex=
-SCRIPT_PROPERTIES_fNeedsWordBreaking=
-SCRIPT_PROPERTIES_fNeedsCaretInfo=
-SCRIPT_PROPERTIES_bCharSet=
-SCRIPT_PROPERTIES_fControl=
-SCRIPT_PROPERTIES_fPrivateUseArea=
-SCRIPT_PROPERTIES_fNeedsCharacterJustify=
-SCRIPT_PROPERTIES_fInvalidGlyph=
-SCRIPT_PROPERTIES_fInvalidLogAttr=
-SCRIPT_PROPERTIES_fCDM=
-SCRIPT_PROPERTIES_fAmbiguousCharSet=
-SCRIPT_PROPERTIES_fClusterSizeVaries=
-SCRIPT_PROPERTIES_fRejectInvalid=
-
-org_eclipse_swt_internal_win32_SCRIPT_1STATE=
-SCRIPT_STATE_uBidiLevel=
-SCRIPT_STATE_fOverrideDirection=
-SCRIPT_STATE_fInhibitSymSwap=
-SCRIPT_STATE_fCharShape=
-SCRIPT_STATE_fDigitSubstitute=
-SCRIPT_STATE_fInhibitLigate=
-SCRIPT_STATE_fDisplayZWG=
-SCRIPT_STATE_fArabicNumContext=
-SCRIPT_STATE_fGcpClusters=
-SCRIPT_STATE_fReserved=
-SCRIPT_STATE_fEngineReserved=
-
-org_eclipse_swt_internal_win32_SCROLLINFO=
-SCROLLINFO_cbSize=
-SCROLLINFO_fMask=
-SCROLLINFO_nMin=
-SCROLLINFO_nMax=
-SCROLLINFO_nPage=
-SCROLLINFO_nPos=
-SCROLLINFO_nTrackPos=
-
-org_eclipse_swt_internal_win32_SHACTIVATEINFO=
-SHACTIVATEINFO_cbSize=
-SHACTIVATEINFO_hwndLastFocus=cast=(HWND)
-SHACTIVATEINFO_fSipUp=
-SHACTIVATEINFO_fSipOnDeactivation=
-SHACTIVATEINFO_fActive=
-SHACTIVATEINFO_fReserved=
-
-org_eclipse_swt_internal_win32_SHELLEXECUTEINFO=
-SHELLEXECUTEINFO_cbSize=
-SHELLEXECUTEINFO_fMask=
-SHELLEXECUTEINFO_hwnd=cast=(HWND)
-SHELLEXECUTEINFO_lpVerb=cast=(LPCTSTR)
-SHELLEXECUTEINFO_lpFile=cast=(LPCTSTR)
-SHELLEXECUTEINFO_lpParameters=cast=(LPCTSTR)
-SHELLEXECUTEINFO_lpDirectory=cast=(LPCTSTR)
-SHELLEXECUTEINFO_nShow=
-SHELLEXECUTEINFO_hInstApp=cast=(HINSTANCE)
-SHELLEXECUTEINFO_lpIDList=cast=(LPVOID)
-SHELLEXECUTEINFO_lpClass=cast=(LPCTSTR)
-SHELLEXECUTEINFO_hkeyClass=cast=(HKEY)
-SHELLEXECUTEINFO_dwHotKey=
-SHELLEXECUTEINFO_hIcon=cast=(HANDLE)
-SHELLEXECUTEINFO_hProcess=cast=(HANDLE)
-
-org_eclipse_swt_internal_win32_SHMENUBARINFO=
-SHMENUBARINFO_cbSize=
-SHMENUBARINFO_hwndParent=cast=(HWND)
-SHMENUBARINFO_dwFlags=
-SHMENUBARINFO_nToolBarId=
-SHMENUBARINFO_hInstRes=cast=(HINSTANCE)
-SHMENUBARINFO_nBmpId=
-SHMENUBARINFO_cBmpImages=
-SHMENUBARINFO_hwndMB=cast=(HWND)
-
-org_eclipse_swt_internal_win32_SHRGINFO=
-SHRGINFO_cbSize=
-SHRGINFO_hwndClient=cast=(HWND)
-SHRGINFO_ptDown_x=accessor=ptDown.x
-SHRGINFO_ptDown_y=accessor=ptDown.y
-SHRGINFO_dwFlags=
-
-org_eclipse_swt_internal_win32_SIPINFO=
-SIPINFO_cbSize=
-SIPINFO_fdwFlags=
-SIPINFO_rcVisibleDesktop_left=accessor=rcVisibleDesktop.left
-SIPINFO_rcVisibleDesktop_top=accessor=rcVisibleDesktop.top
-SIPINFO_rcVisibleDesktop_right=accessor=rcVisibleDesktop.right
-SIPINFO_rcVisibleDesktop_bottom=accessor=rcVisibleDesktop.bottom
-SIPINFO_rcSipRect_left=accessor=rcSipRect.left
-SIPINFO_rcSipRect_top=accessor=rcSipRect.top
-SIPINFO_rcSipRect_right=accessor=rcSipRect.right
-SIPINFO_rcSipRect_bottom=accessor=rcSipRect.bottom
-SIPINFO_dwImDataSize=
-SIPINFO_pvImData=cast=(void *)
-
-org_eclipse_swt_internal_win32_SIZE=
-SIZE_cx=
-SIZE_cy=
-
-org_eclipse_swt_internal_win32_TBBUTTON=
-TBBUTTON_iBitmap=
-TBBUTTON_idCommand=
-TBBUTTON_fsState=
-TBBUTTON_fsStyle=
-TBBUTTON_dwData=
-TBBUTTON_iString=
-
-org_eclipse_swt_internal_win32_TBBUTTONINFO=
-TBBUTTONINFO_cbSize=
-TBBUTTONINFO_dwMask=
-TBBUTTONINFO_idCommand=
-TBBUTTONINFO_iImage=
-TBBUTTONINFO_fsState=
-TBBUTTONINFO_fsStyle=
-TBBUTTONINFO_cx=
-TBBUTTONINFO_lParam=
-TBBUTTONINFO_pszText=cast=(LPTSTR)
-TBBUTTONINFO_cchText=
-
-org_eclipse_swt_internal_win32_TCHAR=flags=no_gen
-TCHAR_chars=
-TCHAR_bytes=
-
-org_eclipse_swt_internal_win32_TCITEM=
-TCITEM_mask=
-TCITEM_dwState=
-TCITEM_dwStateMask=
-TCITEM_pszText=cast=(LPTSTR)
-TCITEM_cchTextMax=
-TCITEM_iImage=
-TCITEM_lParam=
-
-org_eclipse_swt_internal_win32_TEXTMETRIC=
-TEXTMETRIC_tmHeight=
-TEXTMETRIC_tmAscent=
-TEXTMETRIC_tmDescent=
-TEXTMETRIC_tmInternalLeading=
-TEXTMETRIC_tmExternalLeading=
-TEXTMETRIC_tmAveCharWidth=
-TEXTMETRIC_tmMaxCharWidth=
-TEXTMETRIC_tmWeight=
-TEXTMETRIC_tmOverhang=
-TEXTMETRIC_tmDigitizedAspectX=
-TEXTMETRIC_tmDigitizedAspectY=
-TEXTMETRIC_tmItalic=
-TEXTMETRIC_tmUnderlined=
-TEXTMETRIC_tmStruckOut=
-TEXTMETRIC_tmPitchAndFamily=
-TEXTMETRIC_tmCharSet=
-
-org_eclipse_swt_internal_win32_TEXTMETRICA=
-TEXTMETRICA_tmFirstChar=
-TEXTMETRICA_tmLastChar=
-TEXTMETRICA_tmDefaultChar=
-TEXTMETRICA_tmBreakChar=
-
-org_eclipse_swt_internal_win32_TEXTMETRICW=
-TEXTMETRICW_tmFirstChar=
-TEXTMETRICW_tmLastChar=
-TEXTMETRICW_tmDefaultChar=
-TEXTMETRICW_tmBreakChar=
-
-org_eclipse_swt_internal_win32_TOOLINFO=
-TOOLINFO_cbSize=
-TOOLINFO_uFlags=
-TOOLINFO_hwnd=cast=(HWND)
-TOOLINFO_uId=
-TOOLINFO_left=accessor=rect.left
-TOOLINFO_top=accessor=rect.top
-TOOLINFO_right=accessor=rect.right
-TOOLINFO_bottom=accessor=rect.bottom
-TOOLINFO_hinst=cast=(HINSTANCE)
-TOOLINFO_lpszText=cast=(LPTSTR)
-TOOLINFO_lParam=
-
-org_eclipse_swt_internal_win32_TRACKMOUSEEVENT=
-TRACKMOUSEEVENT_cbSize=
-TRACKMOUSEEVENT_dwFlags=
-TRACKMOUSEEVENT_hwndTrack=cast=(HWND)
-TRACKMOUSEEVENT_dwHoverTime=
-
-org_eclipse_swt_internal_win32_TRIVERTEX=
-TRIVERTEX_x=
-TRIVERTEX_y=
-TRIVERTEX_Red=
-TRIVERTEX_Green=
-TRIVERTEX_Blue=
-TRIVERTEX_Alpha=
-
-org_eclipse_swt_internal_win32_TVHITTESTINFO=
-TVHITTESTINFO_x=accessor=pt.x
-TVHITTESTINFO_y=accessor=pt.y
-TVHITTESTINFO_flags=
-TVHITTESTINFO_hItem=cast=(HTREEITEM)
-
-org_eclipse_swt_internal_win32_TVINSERTSTRUCT=
-TVINSERTSTRUCT_hParent=cast=(HTREEITEM)
-TVINSERTSTRUCT_hInsertAfter=cast=(HTREEITEM)
-TVINSERTSTRUCT_mask=accessor=item.mask
-TVINSERTSTRUCT_hItem=accessor=item.hItem,cast=(HTREEITEM)
-TVINSERTSTRUCT_state=accessor=item.state
-TVINSERTSTRUCT_stateMask=accessor=item.stateMask
-TVINSERTSTRUCT_pszText=accessor=item.pszText,cast=(LPTSTR)
-TVINSERTSTRUCT_cchTextMax=accessor=item.cchTextMax
-TVINSERTSTRUCT_iImage=accessor=item.iImage
-TVINSERTSTRUCT_iSelectedImage=accessor=item.iSelectedImage
-TVINSERTSTRUCT_cChildren=accessor=item.cChildren
-TVINSERTSTRUCT_lParam=accessor=item.lParam
-
-org_eclipse_swt_internal_win32_TVITEM=
-TVITEM_mask=
-TVITEM_hItem=cast=(HTREEITEM)
-TVITEM_state=
-TVITEM_stateMask=
-TVITEM_pszText=cast=(LPTSTR)
-TVITEM_cchTextMax=
-TVITEM_iImage=
-TVITEM_iSelectedImage=
-TVITEM_cChildren=
-TVITEM_lParam=
-
-org_eclipse_swt_internal_win32_WINDOWPLACEMENT=
-WINDOWPLACEMENT_length=
-WINDOWPLACEMENT_flags=
-WINDOWPLACEMENT_showCmd=
-WINDOWPLACEMENT_ptMinPosition_x=accessor=ptMinPosition.x
-WINDOWPLACEMENT_ptMinPosition_y=accessor=ptMinPosition.y
-WINDOWPLACEMENT_ptMaxPosition_x=accessor=ptMaxPosition.x
-WINDOWPLACEMENT_ptMaxPosition_y=accessor=ptMaxPosition.y
-WINDOWPLACEMENT_left=accessor=rcNormalPosition.left
-WINDOWPLACEMENT_top=accessor=rcNormalPosition.top
-WINDOWPLACEMENT_right=accessor=rcNormalPosition.right
-WINDOWPLACEMENT_bottom=accessor=rcNormalPosition.bottom
-
-org_eclipse_swt_internal_win32_WINDOWPOS=
-WINDOWPOS_hwnd=cast=(HWND)
-WINDOWPOS_hwndInsertAfter=cast=(HWND)
-WINDOWPOS_x=
-WINDOWPOS_y=
-WINDOWPOS_cx=
-WINDOWPOS_cy=
-WINDOWPOS_flags=
-
-org_eclipse_swt_internal_win32_WNDCLASS=
-WNDCLASS_style=
-WNDCLASS_lpfnWndProc=cast=(WNDPROC)
-WNDCLASS_cbClsExtra=
-WNDCLASS_cbWndExtra=
-WNDCLASS_hInstance=cast=(HINSTANCE)
-WNDCLASS_hIcon=cast=(HICON)
-WNDCLASS_hCursor=cast=(HCURSOR)
-WNDCLASS_hbrBackground=cast=(HBRUSH)
-WNDCLASS_lpszMenuName=cast=(LPCTSTR)
-WNDCLASS_lpszClassName=cast=(LPCTSTR)
-
diff --git a/bundles/org.eclipse.swt.tools/NativeStats/org/eclipse/swt/tools/internal/NativeStats.java b/bundles/org.eclipse.swt.tools/NativeStats/org/eclipse/swt/tools/internal/NativeStats.java
deleted file mode 100644
index e4bd56b64f..0000000000
--- a/bundles/org.eclipse.swt.tools/NativeStats/org/eclipse/swt/tools/internal/NativeStats.java
+++ /dev/null
@@ -1,202 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tools.internal;
-
-import java.io.PrintStream;
-import java.lang.reflect.Method;
-import java.util.Arrays;
-import java.util.Enumeration;
-import java.util.Hashtable;
-
-/**
- * Instructions on how to use the NativeStats tool with a standlaone SWT example:
- *
- * 1) Compile the SWT native libraries defining the NATIVE_STATS flag (i.e. uncomment line in makefile).
- * 2) Add the following code around the sections of interest to dump the
- * native calls done in that section.
- *
- * NativeStats stats = new NativeStats();
- * ...
- * <code section>
- * ...
- * stats.dumpDiff(System.out);
- *
- * 3) Or add the following code at a given point to dump a snapshot of
- * the native calls done until that point.
- *
- * new NativeStats().dumpSnapshot(System.out);
- */
-public class NativeStats {
-
- Hashtable snapshot;
-
- final static String[] classes = new String[]{"OS", "ATK", "CDE", "GNOME", "GTK", "KDE", "XPCOM", "COM"};
-
-
- public static class NativeFunction implements Comparable {
- String name;
- int callCount;
-
- public NativeFunction(String name, int callCount) {
- this.name = name;
- this.callCount = callCount;
- }
-
- void subtract(NativeFunction func) {
- this.callCount -= func.callCount;
- }
-
- public int getCallCount() {
- return callCount;
- }
-
- public String getName() {
- return name;
- }
- public int compareTo(Object func) {
- return ((NativeFunction)func).callCount - callCount;
- }
- }
-
-public NativeStats() {
- snapshot = snapshot();
-}
-
-public Hashtable diff() {
- Hashtable newSnapshot = snapshot();
- Enumeration keys = newSnapshot.keys();
- while (keys.hasMoreElements()) {
- String className = (String)keys.nextElement();
- NativeFunction[] newFuncs = (NativeFunction[])newSnapshot.get(className);
- NativeFunction[] funcs = (NativeFunction[])snapshot.get(className);
- if (funcs != null) {
- for (int i = 0; i < newFuncs.length; i++) {
- newFuncs[i].subtract(funcs[i]);
- }
- }
- }
- return newSnapshot;
-}
-
-public void dumpDiff(PrintStream ps) {
- dump(diff(), ps);
-}
-
-public void dumpSnapshot(PrintStream ps) {
- dump(snapshot(), ps);
-}
-
-public void dumpSnapshot(String className, PrintStream ps) {
- Hashtable snapshot = new Hashtable();
- snapshot(className, snapshot);
- dump(className, (NativeFunction[])snapshot.get(className), ps);
-}
-
-public void dump(Hashtable snapshot, PrintStream ps) {
- Enumeration keys = snapshot.keys();
- while (keys.hasMoreElements()) {
- String className = (String)keys.nextElement();
- dump(className, (NativeFunction[])snapshot.get(className), ps);
- }
-}
-
-void dump(String className, NativeFunction[] funcs, PrintStream ps) {
- if (funcs == null) return;
- Arrays.sort(funcs);
- int total = 0;
- for (int i = 0; i < funcs.length; i++) {
- NativeFunction func = funcs[i];
- total += func.getCallCount();
- }
- ps.print(className);
- ps.print("=");
- ps.print(total);
- ps.println();
- for (int i = 0; i < funcs.length; i++) {
- NativeFunction func = funcs[i];
- if (func.getCallCount() > 0) {
- ps.print("\t");
- ps.print(func.getName());
- ps.print("=");
- ps.print(func.getCallCount());
- ps.println();
- }
- }
-}
-
-public void reset() {
- snapshot = snapshot();
-}
-
-public Hashtable snapshot() {
- Hashtable snapshot = new Hashtable();
- for (int i = 0; i < classes.length; i++) {
- String className = classes[i];
- snapshot(className, snapshot);
- }
- return snapshot;
-}
-
-public Hashtable snapshot(String className, Hashtable snapshot) {
- try {
- Class clazz = getClass();
- Method functionCount = clazz.getMethod(className + "_GetFunctionCount", new Class[0]);
- Method functionCallCount = clazz.getMethod(className + "_GetFunctionCallCount", new Class[]{int.class});
- Method functionName = clazz.getMethod(className + "_GetFunctionName", new Class[]{int.class});
- int count = ((Integer)functionCount.invoke(clazz, new Object[0])).intValue();
- NativeFunction[] funcs = new NativeFunction[count];
- Object[] index = new Object[1];
- for (int i = 0; i < count; i++) {
- index[0] = new Integer(i);
- int callCount = ((Integer)functionCallCount.invoke(clazz, index)).intValue();
- String name = (String)functionName.invoke(clazz, index);
- funcs[i] = new NativeFunction(name, callCount);
- }
- snapshot.put(className, funcs);
- } catch (Throwable e) {
-// e.printStackTrace(System.out);
- }
- return snapshot;
-}
-
-public static final native int OS_GetFunctionCount();
-public static final native String OS_GetFunctionName(int index);
-public static final native int OS_GetFunctionCallCount(int index);
-
-public static final native int ATK_GetFunctionCount();
-public static final native String ATK_GetFunctionName(int index);
-public static final native int ATK_GetFunctionCallCount(int index);
-
-public static final native int CDE_GetFunctionCount();
-public static final native String CDE_GetFunctionName(int index);
-public static final native int CDE_GetFunctionCallCount(int index);
-
-public static final native int GNOME_GetFunctionCount();
-public static final native String GNOME_GetFunctionName(int index);
-public static final native int GNOME_GetFunctionCallCount(int index);
-
-public static final native int GTK_GetFunctionCount();
-public static final native String GTK_GetFunctionName(int index);
-public static final native int GTK_GetFunctionCallCount(int index);
-
-public static final native int KDE_GetFunctionCount();
-public static final native String KDE_GetFunctionName(int index);
-public static final native int KDE_GetFunctionCallCount(int index);
-
-public static final native int XPCOM_GetFunctionCount();
-public static final native String XPCOM_GetFunctionName(int index);
-public static final native int XPCOM_GetFunctionCallCount(int index);
-
-public static final native int COM_GetFunctionCount();
-public static final native String COM_GetFunctionName(int index);
-public static final native int COM_GetFunctionCallCount(int index);
-
-}
diff --git a/bundles/org.eclipse.swt.tools/Sleak/org/eclipse/swt/tools/internal/Sleak.java b/bundles/org.eclipse.swt.tools/Sleak/org/eclipse/swt/tools/internal/Sleak.java
deleted file mode 100644
index 8015c452f2..0000000000
--- a/bundles/org.eclipse.swt.tools/Sleak/org/eclipse/swt/tools/internal/Sleak.java
+++ /dev/null
@@ -1,294 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tools.internal;
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.widgets.*;
-import java.io.*;
-
-/**
- * Instructions on how to use the Sleak tool with a standlaone SWT example:
- *
- * Modify the main method below to launch your application.
- * Run Sleak.
- *
- */
-public class Sleak {
- Display display;
- Shell shell;
- List list;
- Canvas canvas;
- Button start, stop, check;
- Text text;
- Label label;
-
- Object [] oldObjects = new Object [0];
- Error [] oldErrors = new Error [0];
- Object [] objects = new Object [0];
- Error [] errors = new Error [0];
-
-public static void main (String [] args) {
- DeviceData data = new DeviceData();
- data.tracking = true;
- Display display = new Display (data);
- Sleak sleak = new Sleak ();
- sleak.open ();
-
- // Launch you application here
- // e.g.
-// Shell shell = new Shell(display);
-// Button button1 = new Button(shell, SWT.PUSH);
-// button1.setBounds(10, 10, 100, 50);
-// button1.setText("Hello World");
-// Image image = new Image(display, 20, 20);
-// Button button2 = new Button(shell, SWT.PUSH);
-// button2.setBounds(10, 70, 100, 50);
-// button2.setImage(image);
-// shell.open();
-
- while (!sleak.shell.isDisposed ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose ();
-}
-
-void open () {
- display = Display.getCurrent ();
- shell = new Shell (display);
- shell.setText ("S-Leak");
- list = new List (shell, SWT.BORDER | SWT.V_SCROLL);
- list.addListener (SWT.Selection, new Listener () {
- public void handleEvent (Event event) {
- refreshObject ();
- }
- });
- text = new Text (shell, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
- canvas = new Canvas (shell, SWT.BORDER);
- canvas.addListener (SWT.Paint, new Listener () {
- public void handleEvent (Event event) {
- paintCanvas (event);
- }
- });
- check = new Button (shell, SWT.CHECK);
- check.setText ("Stack");
- check.addListener (SWT.Selection, new Listener () {
- public void handleEvent (Event e) {
- toggleStackTrace ();
- }
- });
- start = new Button (shell, SWT.PUSH);
- start.setText ("Snap");
- start.addListener (SWT.Selection, new Listener () {
- public void handleEvent (Event event) {
- refreshAll ();
- }
- });
- stop = new Button (shell, SWT.PUSH);
- stop.setText ("Diff");
- stop.addListener (SWT.Selection, new Listener () {
- public void handleEvent (Event event) {
- refreshDifference ();
- }
- });
- label = new Label (shell, SWT.BORDER);
- label.setText ("0 object(s)");
- shell.addListener (SWT.Resize, new Listener () {
- public void handleEvent (Event e) {
- layout ();
- }
- });
- check.setSelection (false);
- text.setVisible (false);
- Point size = shell.getSize ();
- shell.setSize (size.x / 2, size.y / 2);
- shell.open ();
-}
-
-void refreshLabel () {
- int colors = 0, cursors = 0, fonts = 0, gcs = 0, images = 0, regions = 0;
- for (int i=0; i<objects.length; i++) {
- Object object = objects [i];
- if (object instanceof Color) colors++;
- if (object instanceof Cursor) cursors++;
- if (object instanceof Font) fonts++;
- if (object instanceof GC) gcs++;
- if (object instanceof Image) images++;
- if (object instanceof Region) regions++;
- }
- String string = "";
- if (colors != 0) string += colors + " Color(s)\n";
- if (cursors != 0) string += cursors + " Cursor(s)\n";
- if (fonts != 0) string += fonts + " Font(s)\n";
- if (gcs != 0) string += gcs + " GC(s)\n";
- if (images != 0) string += images + " Image(s)\n";
- if (regions != 0) string += regions + " Region(s)\n";
- if (string.length () != 0) {
- string = string.substring (0, string.length () - 1);
- }
- label.setText (string);
-}
-
-void refreshDifference () {
- DeviceData info = display.getDeviceData ();
- if (!info.tracking) {
- MessageBox dialog = new MessageBox (shell, SWT.ICON_WARNING | SWT.OK);
- dialog.setText (shell.getText ());
- dialog.setMessage ("Warning: Device is not tracking resource allocation");
- dialog.open ();
- }
- Object [] newObjects = info.objects;
- Error [] newErrors = info.errors;
- Object [] diffObjects = new Object [newObjects.length];
- Error [] diffErrors = new Error [newErrors.length];
- int count = 0;
- for (int i=0; i<newObjects.length; i++) {
- int index = 0;
- while (index < oldObjects.length) {
- if (newObjects [i] == oldObjects [index]) break;
- index++;
- }
- if (index == oldObjects.length) {
- diffObjects [count] = newObjects [i];
- diffErrors [count] = newErrors [i];
- count++;
- }
- }
- objects = new Object [count];
- errors = new Error [count];
- System.arraycopy (diffObjects, 0, objects, 0, count);
- System.arraycopy (diffErrors, 0, errors, 0, count);
- list.removeAll ();
- text.setText ("");
- canvas.redraw ();
- for (int i=0; i<objects.length; i++) {
- list.add (objectName (objects [i]));
- }
- refreshLabel ();
- layout ();
-}
-
-String objectName (Object object) {
- String string = object.toString ();
- int index = string.lastIndexOf ('.');
- if (index == -1) return string;
- return string.substring (index + 1, string.length ());
-}
-
-void toggleStackTrace () {
- refreshObject ();
- layout ();
-}
-
-void paintCanvas (Event event) {
- canvas.setCursor (null);
- int index = list.getSelectionIndex ();
- if (index == -1) return;
- GC gc = event.gc;
- Object object = objects [index];
- if (object instanceof Color) {
- if (((Color)object).isDisposed ()) return;
- gc.setBackground ((Color) object);
- gc.fillRectangle (canvas.getClientArea());
- return;
- }
- if (object instanceof Cursor) {
- if (((Cursor)object).isDisposed ()) return;
- canvas.setCursor ((Cursor) object);
- return;
- }
- if (object instanceof Font) {
- if (((Font)object).isDisposed ()) return;
- gc.setFont ((Font) object);
- FontData [] array = gc.getFont ().getFontData ();
- String string = "";
- String lf = text.getLineDelimiter ();
- for (int i=0; i<array.length; i++) {
- FontData data = array [i];
- String style = "NORMAL";
- int bits = data.getStyle ();
- if (bits != 0) {
- if ((bits & SWT.BOLD) != 0) style = "BOLD ";
- if ((bits & SWT.ITALIC) != 0) style += "ITALIC";
- }
- string += data.getName () + " " + data.getHeight () + " " + style + lf;
- }
- gc.drawString (string, 0, 0);
- return;
- }
- //NOTHING TO DRAW FOR GC
-// if (object instanceof GC) {
-// return;
-// }
- if (object instanceof Image) {
- if (((Image)object).isDisposed ()) return;
- gc.drawImage ((Image) object, 0, 0);
- return;
- }
- if (object instanceof Region) {
- if (((Region)object).isDisposed ()) return;
- String string = ((Region)object).getBounds().toString();
- gc.drawString (string, 0, 0);
- return;
- }
-}
-
-void refreshObject () {
- int index = list.getSelectionIndex ();
- if (index == -1) return;
- if (check.getSelection ()) {
- ByteArrayOutputStream stream = new ByteArrayOutputStream ();
- PrintStream s = new PrintStream (stream);
- errors [index].printStackTrace (s);
- text.setText (stream.toString ());
- text.setVisible (true);
- canvas.setVisible (false);
- } else {
- canvas.setVisible (true);
- text.setVisible (false);
- canvas.redraw ();
- }
-}
-
-void refreshAll () {
- oldObjects = new Object [0];
- oldErrors = new Error [0];
- refreshDifference ();
- oldObjects = objects;
- oldErrors = errors;
-}
-
-void layout () {
- Rectangle rect = shell.getClientArea ();
- int width = 0;
- String [] items = list.getItems ();
- GC gc = new GC (list);
- for (int i=0; i<objects.length; i++) {
- width = Math.max (width, gc.stringExtent (items [i]).x);
- }
- gc.dispose ();
- Point size1 = start.computeSize (SWT.DEFAULT, SWT.DEFAULT);
- Point size2 = stop.computeSize (SWT.DEFAULT, SWT.DEFAULT);
- Point size3 = check.computeSize (SWT.DEFAULT, SWT.DEFAULT);
- Point size4 = label.computeSize (SWT.DEFAULT, SWT.DEFAULT);
- width = Math.max (size1.x, Math.max (size2.x, Math.max (size3.x, width)));
- width = Math.max (64, Math.max (size4.x, list.computeSize (width, SWT.DEFAULT).x));
- start.setBounds (0, 0, width, size1.y);
- stop.setBounds (0, size1.y, width, size2.y);
- check.setBounds (0, size1.y + size2.y, width, size3.y);
- label.setBounds (0, rect.height - size4.y, width, size4.y);
- int height = size1.y + size2.y + size3.y;
- list.setBounds (0, height, width, rect.height - height - size4.y);
- text.setBounds (width, 0, rect.width - width, rect.height);
- canvas.setBounds (width, 0, rect.width - width, rect.height);
-}
-
-}
diff --git a/bundles/org.eclipse.swt.tools/about.html b/bundles/org.eclipse.swt.tools/about.html
deleted file mode 100644
index 9db411aab9..0000000000
--- a/bundles/org.eclipse.swt.tools/about.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<title>About</title>
-<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>20th June, 2002</p>
-<h3>License</h3>
-<p>Eclipse.org makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise indicated below, the Content is provided to you under the terms and conditions of the
-Common Public License Version 1.0 (&quot;CPL&quot;). A copy of the CPL is available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>.
-For purposes of the CPL, &quot;Program&quot; will mean the Content.</p>
-
-<h3>Contributions</h3>
-
-<p>If this Content is licensed to you under the terms and conditions of the CPL, any Contributions, as defined in the CPL, uploaded, submitted, or otherwise
-made available to Eclipse.org, members of Eclipse.org and/or the host of Eclipse.org web site, by you that relate to such
-Content are provided under the terms and conditions of the CPL and can be made available to others under the terms of the CPL.</p>
-
-<p>If this Content is licensed to you under license terms and conditions other than the CPL (&quot;Other License&quot;), any modifications, enhancements and/or
-other code and/or documentation (&quot;Modifications&quot;) uploaded, submitted, or otherwise made available to Eclipse.org, members of Eclipse.org and/or the
-host of Eclipse.org, by you that relate to such Content are provided under terms and conditions of the Other License and can be made available
-to others under the terms of the Other License. In addition, with regard to Modifications for which you are the copyright holder, you are also
-providing the Modifications under the terms and conditions of the CPL and such Modifications can be made available to others under the terms of
-the CPL.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/bundles/org.eclipse.swt.tools/build.properties b/bundles/org.eclipse.swt.tools/build.properties
deleted file mode 100644
index 7d965ff997..0000000000
--- a/bundles/org.eclipse.swt.tools/build.properties
+++ /dev/null
@@ -1,11 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2004 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Common Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/cpl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-source.swttools.jar=JNI Generation/
diff --git a/bundles/org.eclipse.swt.tools/plugin.properties b/bundles/org.eclipse.swt.tools/plugin.properties
deleted file mode 100644
index 9743fc54ec..0000000000
--- a/bundles/org.eclipse.swt.tools/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2004 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Common Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/cpl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-pluginName = SWT Tools
-providerName = Eclipse.org
diff --git a/bundles/org.eclipse.swt.tools/plugin.xml b/bundles/org.eclipse.swt.tools/plugin.xml
deleted file mode 100644
index edb8698ef9..0000000000
--- a/bundles/org.eclipse.swt.tools/plugin.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<plugin
- id="org.eclipse.swt.tools"
- name="%pluginName"
- version="3.1.0"
- provider-name="%providerName">
-
- <requires>
- <import plugin="org.eclipse.swt" export="true"/>
- </requires>
-
-</plugin>
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Shell.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Shell.java
index b05398109b..53af2d725f 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Shell.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Shell.java
@@ -1630,7 +1630,11 @@ int XStructureNotify (int w, int client_data, int call_data, int continue_to_dis
case OS.ReparentNotify: {
reparented = true;
adjustTrim ();
- if (OS.IsLinux) updateResizable (xEvent.width, xEvent.height);
+ if (OS.IsLinux) {
+ int [] argList = {OS.XmNwidth, 0, OS.XmNheight, 0};
+ OS.XtGetValues (shellHandle, argList, argList.length / 2);
+ updateResizable (argList [1], argList [3]);
+ }
break;
}
case OS.ConfigureNotify:
diff --git a/examples/org.eclipse.swt.examples.browser.demos/.classpath b/examples/org.eclipse.swt.examples.browser.demos/.classpath
deleted file mode 100644
index 065ac06e19..0000000000
--- a/examples/org.eclipse.swt.examples.browser.demos/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/examples/org.eclipse.swt.examples.browser.demos/.project b/examples/org.eclipse.swt.examples.browser.demos/.project
deleted file mode 100644
index db0b47df6f..0000000000
--- a/examples/org.eclipse.swt.examples.browser.demos/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.swt.examples.BrowserDemo</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/examples/org.eclipse.swt.examples.browser.demos/about.html b/examples/org.eclipse.swt.examples.browser.demos/about.html
deleted file mode 100644
index 9db411aab9..0000000000
--- a/examples/org.eclipse.swt.examples.browser.demos/about.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<title>About</title>
-<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>20th June, 2002</p>
-<h3>License</h3>
-<p>Eclipse.org makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise indicated below, the Content is provided to you under the terms and conditions of the
-Common Public License Version 1.0 (&quot;CPL&quot;). A copy of the CPL is available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>.
-For purposes of the CPL, &quot;Program&quot; will mean the Content.</p>
-
-<h3>Contributions</h3>
-
-<p>If this Content is licensed to you under the terms and conditions of the CPL, any Contributions, as defined in the CPL, uploaded, submitted, or otherwise
-made available to Eclipse.org, members of Eclipse.org and/or the host of Eclipse.org web site, by you that relate to such
-Content are provided under the terms and conditions of the CPL and can be made available to others under the terms of the CPL.</p>
-
-<p>If this Content is licensed to you under license terms and conditions other than the CPL (&quot;Other License&quot;), any modifications, enhancements and/or
-other code and/or documentation (&quot;Modifications&quot;) uploaded, submitted, or otherwise made available to Eclipse.org, members of Eclipse.org and/or the
-host of Eclipse.org, by you that relate to such Content are provided under terms and conditions of the Other License and can be made available
-to others under the terms of the Other License. In addition, with regard to Modifications for which you are the copyright holder, you are also
-providing the Modifications under the terms and conditions of the CPL and such Modifications can be made available to others under the terms of
-the CPL.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/examples/org.eclipse.swt.examples.browser.demos/build.properties b/examples/org.eclipse.swt.examples.browser.demos/build.properties
deleted file mode 100644
index bf2a825849..0000000000
--- a/examples/org.eclipse.swt.examples.browser.demos/build.properties
+++ /dev/null
@@ -1,10 +0,0 @@
-source.BrowserDemo.jar = src/
-output.BrowserDemo.jar = bin/
-bin.includes = doc-html/,\
- plugin.properties,\
- plugin.xml,\
- about.html,\
- BrowserDemo.jar,\
- css1/,\
- css2/,\
- icons/
diff --git a/examples/org.eclipse.swt.examples.browser.demos/css1/back1.jpg b/examples/org.eclipse.swt.examples.browser.demos/css1/back1.jpg
deleted file mode 100644
index bab9f33410..0000000000
--- a/examples/org.eclipse.swt.examples.browser.demos/css1/back1.jpg
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples.browser.demos/css1/back2.jpg b/examples/org.eclipse.swt.examples.browser.demos/css1/back2.jpg
deleted file mode 100644
index 83f68de754..0000000000
--- a/examples/org.eclipse.swt.examples.browser.demos/css1/back2.jpg
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples.browser.demos/css1/black.gif b/examples/org.eclipse.swt.examples.browser.demos/css1/black.gif
deleted file mode 100644
index 976c1e9377..0000000000
--- a/examples/org.eclipse.swt.examples.browser.demos/css1/black.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples.browser.demos/css1/board1.jpg b/examples/org.eclipse.swt.examples.browser.demos/css1/board1.jpg
deleted file mode 100644
index 0cc4d5e0e8..0000000000
--- a/examples/org.eclipse.swt.examples.browser.demos/css1/board1.jpg
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples.browser.demos/css1/empty.gif b/examples/org.eclipse.swt.examples.browser.demos/css1/empty.gif
deleted file mode 100644
index a6bce4dac9..0000000000
--- a/examples/org.eclipse.swt.examples.browser.demos/css1/empty.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples.browser.demos/css1/line1.gif b/examples/org.eclipse.swt.examples.browser.demos/css1/line1.gif
deleted file mode 100644
index f9a0f34ecf..0000000000
--- a/examples/org.eclipse.swt.examples.browser.demos/css1/line1.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples.browser.demos/css1/style.css b/examples/org.eclipse.swt.examples.browser.demos/css1/style.css
deleted file mode 100644
index 7b36fa934a..0000000000
--- a/examples/org.eclipse.swt.examples.browser.demos/css1/style.css
+++ /dev/null
@@ -1,30 +0,0 @@
-body {background: url(./back2.jpg) fixed; font-size: 10pt; font-family:Verdana, Arial, Helv, Helvetica, sans-serif;}
-h1 {text-align: center; font-size: 14pt; font-family: Verdana, Arial, Helv, Helvetica, sans-serif;}
-h2 {background: url(./line1.gif) no-repeat right bottom; font-size: 12pt; font-family:Verdana, Arial, Helv, Helvetica, sans-serif;}
-h3 {font-size: 10pt; font-family:Verdana, Arial, Helv, Helvetica, sans-serif;}
-
-ul {list-style: none; padding: 0; margin:0; font: 12pt Times;}
-li.white {background: url(./white.gif) no-repeat; padding: 3px 0 32px 64px; margin: 0;}
-li.black {background: url(./black.gif) no-repeat; padding: 3px 0 32px 64px; margin: 0;}
-li.wall {background: url(./wall.gif) no-repeat; padding: 3px 0 32px 64px; margin: 0;}
-
-.board {text-align: center;}
-table { border-collapse: collapse; margin: 0;}
-tr {}
-td {height: 32px; width:32px; table-layout: fixed;}
-
-.whitelink a {display: block; background: url(./empty.gif) no-repeat; width:32px; height:32px;}
-.blacklink a {display: block; background: url(./empty.gif) no-repeat; width:32px; height:32px;}
-.empty {display: block; background: url(./empty.gif) no-repeat; width:32px; height:32px;}
-
-.whitelink a:hover {display: block; background: url(./white.gif) no-repeat; width:32px; height:32px;}
-.blacklink a:hover {display: block; background: url(./black.gif) no-repeat; width:32px; height:32px;}
-.white {background: url(./white.gif) no-repeat;}
-.black {background: url(./black.gif) no-repeat;}
-.wall {background: url(./wall.gif) no-repeat;}
-
-.playerwhite {float: left; margin: 1em 1em; border: 1px solid gray; background: url(./white.gif) no-repeat; text-align: right; width:100px; height:32px;}
-.playerblack {float: right; margin: 1em 1em; border: 1px solid gray; background: url(./black.gif) no-repeat; text-align: right; width:100px; height:32px;}
-
-.winner {border: 4px solid blue; font: bold 16pt Times, serif;}
-.loser {border: 1px solid black; font: 12pt Times, serif;}
diff --git a/examples/org.eclipse.swt.examples.browser.demos/css1/wall.gif b/examples/org.eclipse.swt.examples.browser.demos/css1/wall.gif
deleted file mode 100644
index fb97fc10e8..0000000000
--- a/examples/org.eclipse.swt.examples.browser.demos/css1/wall.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples.browser.demos/css1/welcome.html b/examples/org.eclipse.swt.examples.browser.demos/css1/welcome.html
deleted file mode 100644
index 1e85ae6dc5..0000000000
--- a/examples/org.eclipse.swt.examples.browser.demos/css1/welcome.html
+++ /dev/null
@@ -1,32 +0,0 @@
-<html>
-<head>
- <title>Start a game</title>
- <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
- <link rel="stylesheet" type="text/css" href="./style.css">
-</head>
-<body>
-<h1>Pawns Game</h1>
-<div class="start">
-<a class="start" href="http://www.org.eclipse.swt.examples.browser.demos.pawns/actionstart1player">1 player</a>
-<a class="start" href="http://www.org.eclipse.swt.examples.browser.demos.pawns/actionstart2players">2 players</a>
-</div>
-<h2>How to play</h2>
-This board game is a variant of Reversi and Tic Tac Toe. Each one of the two players sets a pawn on an empty cell of the board.
-<h3>Pawns</h3>
-<ul>
-<li class="white">Player 1</li>
-<li class="black">Player 2</li>
-<li class="wall">Wall. Cannot be reversed.</li>
-</ul>
-<div class="theme">
-Different themes are supported. Theme is configured through a Cascading Style Sheet (CSS) that determines how the HTML content is rendered by the SWT Browser widget.
-<ul class="theme">
-<li><a href="http://www.org.eclipse.swt.examples.browser.demos.pawns/actiontheme/css1">Theme 1</a></li>
-<li><a href="http://www.org.eclipse.swt.examples.browser.demos.pawns/actiontheme/css2">Theme 2</a></li>
-</ul>
-
-</div>
-<h2>How to win</h2>
-The game ends when all cells are filled. The winner is the one with most pawns of their colour.
-</body>
-</html> \ No newline at end of file
diff --git a/examples/org.eclipse.swt.examples.browser.demos/css1/white.gif b/examples/org.eclipse.swt.examples.browser.demos/css1/white.gif
deleted file mode 100644
index c43fd96602..0000000000
--- a/examples/org.eclipse.swt.examples.browser.demos/css1/white.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples.browser.demos/css2/back2.png b/examples/org.eclipse.swt.examples.browser.demos/css2/back2.png
deleted file mode 100644
index 6c49d9ffdd..0000000000
--- a/examples/org.eclipse.swt.examples.browser.demos/css2/back2.png
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples.browser.demos/css2/black.png b/examples/org.eclipse.swt.examples.browser.demos/css2/black.png
deleted file mode 100644
index ad466cf198..0000000000
--- a/examples/org.eclipse.swt.examples.browser.demos/css2/black.png
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples.browser.demos/css2/empty.png b/examples/org.eclipse.swt.examples.browser.demos/css2/empty.png
deleted file mode 100644
index d6ed8e03c2..0000000000
--- a/examples/org.eclipse.swt.examples.browser.demos/css2/empty.png
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples.browser.demos/css2/line1.gif b/examples/org.eclipse.swt.examples.browser.demos/css2/line1.gif
deleted file mode 100644
index f9a0f34ecf..0000000000
--- a/examples/org.eclipse.swt.examples.browser.demos/css2/line1.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples.browser.demos/css2/style.css b/examples/org.eclipse.swt.examples.browser.demos/css2/style.css
deleted file mode 100644
index 2c63d36d6f..0000000000
--- a/examples/org.eclipse.swt.examples.browser.demos/css2/style.css
+++ /dev/null
@@ -1,30 +0,0 @@
-body {background: url(./back2.png) fixed; font-size: 10pt; font-family:Verdana, Arial, Helv, Helvetica, sans-serif;}
-h1 {text-align: center; font-size: 14pt; font-family: Verdana, Arial, Helv, Helvetica, sans-serif;}
-h2 {background: url(./line1.gif) no-repeat right bottom; font-size: 12pt; font-family:Verdana, Arial, Helv, Helvetica, sans-serif;}
-h3 {font-size: 10pt; font-family:Verdana, Arial, Helv, Helvetica, sans-serif;}
-
-ul {list-style: none; padding: 0; margin:0; font: 12pt Times;}
-li.white {background: url(./white.png) no-repeat; padding: 3px 0 32px 64px; margin: 0;}
-li.black {background: url(./black.png) no-repeat; padding: 3px 0 32px 64px; margin: 0;}
-li.wall {background: url(./wall.png) no-repeat; padding: 3px 0 32px 64px; margin: 0;}
-
-.board {text-align: left;}
-table { border-collapse: collapse; margin: 0; padding:0}
-tr {}
-td {height:48px; width:48px; table-layout: fixed;}
-
-.whitelink a {display: block; background: url(./empty.png) no-repeat; width:48px; height:48px;}
-.blacklink a {display: block; background: url(./empty.png) no-repeat; width:48px; height:48px;}
-.empty {display: block; background: url(./empty.png) no-repeat; width:48px; height:48px;}
-
-.whitelink a:hover {display: block; background: url(./white.png) no-repeat; width:48px; height:48px;}
-.blacklink a:hover {display: block; background: url(./black.png) no-repeat; width:48px; height:48px;}
-.white {background: url(./white.png) no-repeat;}
-.black {background: url(./black.png) no-repeat;}
-.wall {background: url(./wall.png) no-repeat;}
-
-.playerwhite {position: absolute; top: 50px; right:10px; margin: 1em 10px; border: 3px solid yellow; background: url(./white.png) no-repeat right; text-align: left; width:100px; height:48px; font: 36pt Times, serif;}
-.playerblack {position: absolute; top: 300px; right:10px; margin: 1em 10px; border: 3px solid yellow; background: url(./black.png) no-repeat right; text-align: left; width:100px; height:48px; font: 36pt Times, serif;}
-
-.winner {border: 4px solid blue; font: bold 16pt Times, serif;}
-.loser {border: 1px solid black; font: 12pt Times, serif;}
diff --git a/examples/org.eclipse.swt.examples.browser.demos/css2/wall.png b/examples/org.eclipse.swt.examples.browser.demos/css2/wall.png
deleted file mode 100644
index a38a12c7c4..0000000000
--- a/examples/org.eclipse.swt.examples.browser.demos/css2/wall.png
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples.browser.demos/css2/welcome.html b/examples/org.eclipse.swt.examples.browser.demos/css2/welcome.html
deleted file mode 100644
index 1e85ae6dc5..0000000000
--- a/examples/org.eclipse.swt.examples.browser.demos/css2/welcome.html
+++ /dev/null
@@ -1,32 +0,0 @@
-<html>
-<head>
- <title>Start a game</title>
- <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
- <link rel="stylesheet" type="text/css" href="./style.css">
-</head>
-<body>
-<h1>Pawns Game</h1>
-<div class="start">
-<a class="start" href="http://www.org.eclipse.swt.examples.browser.demos.pawns/actionstart1player">1 player</a>
-<a class="start" href="http://www.org.eclipse.swt.examples.browser.demos.pawns/actionstart2players">2 players</a>
-</div>
-<h2>How to play</h2>
-This board game is a variant of Reversi and Tic Tac Toe. Each one of the two players sets a pawn on an empty cell of the board.
-<h3>Pawns</h3>
-<ul>
-<li class="white">Player 1</li>
-<li class="black">Player 2</li>
-<li class="wall">Wall. Cannot be reversed.</li>
-</ul>
-<div class="theme">
-Different themes are supported. Theme is configured through a Cascading Style Sheet (CSS) that determines how the HTML content is rendered by the SWT Browser widget.
-<ul class="theme">
-<li><a href="http://www.org.eclipse.swt.examples.browser.demos.pawns/actiontheme/css1">Theme 1</a></li>
-<li><a href="http://www.org.eclipse.swt.examples.browser.demos.pawns/actiontheme/css2">Theme 2</a></li>
-</ul>
-
-</div>
-<h2>How to win</h2>
-The game ends when all cells are filled. The winner is the one with most pawns of their colour.
-</body>
-</html> \ No newline at end of file
diff --git a/examples/org.eclipse.swt.examples.browser.demos/css2/white.png b/examples/org.eclipse.swt.examples.browser.demos/css2/white.png
deleted file mode 100644
index 9d28855043..0000000000
--- a/examples/org.eclipse.swt.examples.browser.demos/css2/white.png
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples.browser.demos/doc-html/hglegal.htm b/examples/org.eclipse.swt.examples.browser.demos/doc-html/hglegal.htm
deleted file mode 100644
index 621115699c..0000000000
--- a/examples/org.eclipse.swt.examples.browser.demos/doc-html/hglegal.htm
+++ /dev/null
@@ -1,14 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <LINK REL="stylesheet" HREF="../../../book.css" CHARSET="ISO-8859-1" TYPE="text/css">
- <title>Legal Notices</title>
-</head>
-<body>
-
-<h3>
-<a NAME="Notices"></a>Notices</h3>
-(c) Copyright (c) 2000, 2004 IBM Corporation and others. All Rights Reserved.
-</body>
-</html>
diff --git a/examples/org.eclipse.swt.examples.browser.demos/doc-html/ngibmcpy.gif b/examples/org.eclipse.swt.examples.browser.demos/doc-html/ngibmcpy.gif
deleted file mode 100644
index c786e43e1f..0000000000
--- a/examples/org.eclipse.swt.examples.browser.demos/doc-html/ngibmcpy.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples.browser.demos/doc-html/swt_browser_ex.html b/examples/org.eclipse.swt.examples.browser.demos/doc-html/swt_browser_ex.html
deleted file mode 100644
index 6eb33018d7..0000000000
--- a/examples/org.eclipse.swt.examples.browser.demos/doc-html/swt_browser_ex.html
+++ /dev/null
@@ -1,41 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <title>SWT - Controls Overview</title>
-</head>
-<body>
-
-<h2>SWT example - Browser Demos</h2>
-
-<p>
-The Browser Demos demonstrate various features of the SWT Browser widget.
-<li>The Pawns Game is a board game that can be played against the computer
-or against another player. Rendering is based on HTML and CSS techniques. The
-board is a table filled with hyperlinks. Cascading Style Sheets
-provide various themes and control the table aesthetic appearance.
-The API <code>org.eclipse.swt.browser.Browser.setText(java.lang.String)</code> draws
-the board game from HTML generated in memory.
-Player moves are captured by implementing the interface <code>org.eclipse.swt.browser.LocationListener</code>.
-e.g the player clicks on a cell that may generate an hyperlink with a URL similar to
-http://www.org.eclipse.swt.examples.browser.demos/xx1yy2. That hyperlink identifies
-the position of the cell selected by the player. The move is completed by generating
-new HTML content and invoking <code>Browser.setText</code> to update the board game.
-</p>
-
-<h3>Running the example</h3>
-<p>
-Follow the <a href="../../org.eclipse.swt.examples/doc-html/swt_manual_setup.html">SWT standalone examples setup</a>
-instructions to install and run the example from your workspace.
-</p>
-<p>
-The "Main" class is <code>org.eclipse.swt.examples.browser.demos.BrowserDemoView</code>.
-</p>
-<p>
-This example can also be run using the <a href="../../org.eclipse.swt.examples.launcher/doc-html/swt_launcher_ex.html">Example Launcher</a>.
-Select the <strong>Browser Demo</strong> item from the <strong>Workbench Views</strong> category and click <strong>Run</strong>.
-</p>
-
-<p><a href="hglegal.htm"><img SRC="ngibmcpy.gif" ALT="Copyright IBM Corporation and others 2000, 2004. All Rights Reserved." BORDER=0 height=14 width=324></a></p>
-</body>
-</html>
diff --git a/examples/org.eclipse.swt.examples.browser.demos/icons/sample.gif b/examples/org.eclipse.swt.examples.browser.demos/icons/sample.gif
deleted file mode 100644
index 34fb3c9d8c..0000000000
--- a/examples/org.eclipse.swt.examples.browser.demos/icons/sample.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples.browser.demos/plugin.properties b/examples/org.eclipse.swt.examples.browser.demos/plugin.properties
deleted file mode 100644
index 99a8ef4787..0000000000
--- a/examples/org.eclipse.swt.examples.browser.demos/plugin.properties
+++ /dev/null
@@ -1,31 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2003 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Common Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/cpl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-providerName = Eclipse.org
-plugin.SWTBrowserDemos.name = SWT Browser Demos Plugin
-category.SWTExamples.name = SWT Examples
-view.BrowserDemos.name = Browser Demo
-
-launchcategory.SWTViewExamples.name = Workbench Views
-launchcategory.SWTViewExamples.description = \
- A collection of Standard Widget Toolkit examples that run as Views inside the Workbench. \
- These examples will create a new View in the current Perspective.
-
-launchitem.BrowserDemos.name = Browser Demo
-launchitem.BrowserDemos.description = \
- The example illustrates how to use the SWT Browser widget for HTML rendering.\n\n\
- The Pawns Game is a board game that can be played against the computer or against another player.\n\n\
- Rendering is based on HTML and CSS techniques. The board is a table filled with hyperlinks. Cascading Style Sheets \
- provide various themes and control the table aesthetic appearance. \n\
- The API org.eclipse.swt.browser.Browser.setText(java.lang.String) draws the board game from HTML generated in memory.\n\
- Player moves are captured by implementing the interface org.eclipse.swt.browser.LocationListener. e.g the player clicks \
- on a cell that defines an hyperlink with a URL http://www.org.eclipse.swt.examples.browser.demos/xx1yy2.\
- That hyperlink identifies the position of the cell selected by the player. The move is completed by generating \
- new HTML content and invoking Browser.setText to update the board game.
diff --git a/examples/org.eclipse.swt.examples.browser.demos/plugin.xml b/examples/org.eclipse.swt.examples.browser.demos/plugin.xml
deleted file mode 100644
index 3ef59e5655..0000000000
--- a/examples/org.eclipse.swt.examples.browser.demos/plugin.xml
+++ /dev/null
@@ -1,55 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<plugin
- id="org.eclipse.swt.examples.browser.demos"
- name="%plugin.SWTBrowserDemos.name"
- version="3.1.0"
- provider-name="%providerName"
- class="org.eclipse.swt.examples.browser.demos.BrowserDemoPlugin">
-
- <runtime>
- <library name="BrowserDemo.jar">
- <export name="*"/>
- </library>
- </runtime>
-
- <requires>
- <import plugin="org.eclipse.ui"/>
- <import plugin="org.eclipse.core.runtime"/>
- </requires>
-
- <extension
- point="org.eclipse.ui.views">
- <category
- name="%view.BrowserDemos.name"
- id="org.eclipse.swt.examples.browser.demos.BrowserDemo">
- </category>
- <view
- allowMultiple="false"
- class="org.eclipse.swt.examples.browser.demos.views.BrowserDemoView"
- icon="icons/sample.gif"
- category="org.eclipse.swt.examples.category"
- name="Browser Demo"
- id="org.eclipse.swt.examples.browser.demos.views.BrowserDemoView">
- </view>
- </extension>
-
- <extension
- point="org.eclipse.swt.examples.launcher.launchItems">
- <category
- name="%launchcategory.SWTViewExamples.name"
- description="%launchcategory.SWTViewExamples.description"
- id="org.eclipse.swt.examples.launchViewCategory">
- </category>
- <item
- name="%launchitem.BrowserDemos.name"
- icon="icons/sample.gif"
- category="org.eclipse.swt.examples.launchViewCategory"
- description="%launchitem.BrowserDemos.description"
- id="org.eclipse.swt.examples.browserdemos.viewlauncher">
- <view
- viewId="org.eclipse.swt.examples.browser.demos.views.BrowserDemoView">
- </view>
- </item>
- </extension>
-</plugin>
diff --git a/examples/org.eclipse.swt.examples.browser.demos/src/org/eclipse/swt/examples/browser/demos/BrowserDemoPlugin.java b/examples/org.eclipse.swt.examples.browser.demos/src/org/eclipse/swt/examples/browser/demos/BrowserDemoPlugin.java
deleted file mode 100644
index 5eb8805c51..0000000000
--- a/examples/org.eclipse.swt.examples.browser.demos/src/org/eclipse/swt/examples/browser/demos/BrowserDemoPlugin.java
+++ /dev/null
@@ -1,49 +0,0 @@
-package org.eclipse.swt.examples.browser.demos;
-
-import org.eclipse.ui.plugin.*;
-import org.osgi.framework.BundleContext;
-import java.util.*;
-import org.eclipse.core.runtime.*;
-
-public class BrowserDemoPlugin extends AbstractUIPlugin {
-
- public static BrowserDemoPlugin plugin;
- ResourceBundle resourceBundle;
- public static String PLUGIN_PATH = null;
-
- public BrowserDemoPlugin() {
- super();
- plugin = this;
- try {
- resourceBundle = ResourceBundle.getBundle("org.eclipse.swt.examples.browser.demos.BrowserDemoPluginResources");
- } catch (MissingResourceException x) {
- resourceBundle = null;
- }
- }
-
- public void start(BundleContext context) throws Exception {
- super.start(context);
- PLUGIN_PATH = Platform.resolve(plugin.getBundle().getEntry(".")).toString();
- }
-
- public void stop(BundleContext context) throws Exception {
- super.stop(context);
- }
-
- public static BrowserDemoPlugin getDefault() {
- return plugin;
- }
-
- public static String getResourceString(String key) {
- ResourceBundle bundle = BrowserDemoPlugin.getDefault().getResourceBundle();
- try {
- return (bundle != null) ? bundle.getString(key) : key;
- } catch (MissingResourceException e) {
- return key;
- }
- }
-
- public ResourceBundle getResourceBundle() {
- return resourceBundle;
- }
-}
diff --git a/examples/org.eclipse.swt.examples.browser.demos/src/org/eclipse/swt/examples/browser/demos/Pawns.java b/examples/org.eclipse.swt.examples.browser.demos/src/org/eclipse/swt/examples/browser/demos/Pawns.java
deleted file mode 100644
index cb08f32584..0000000000
--- a/examples/org.eclipse.swt.examples.browser.demos/src/org/eclipse/swt/examples/browser/demos/Pawns.java
+++ /dev/null
@@ -1,222 +0,0 @@
-package org.eclipse.swt.examples.browser.demos;
-
-public class Pawns {
-
- /* Current board representation in compacted form */
- byte[] game = new byte[64];
- /* Best move */
- int bestIndex = -1;
- /* Related best score */
- int bestScore = Integer.MIN_VALUE;
- /* Estimated strategic value of each cell based on proximity to walls */
- static int[] gameWallWeight = new int[64];
- Thread thread = null;
- boolean threadStop = false;
-
- final static byte EMPTY = 0;
- final static byte WHITE = 1;
- final static byte BLACK = 2;
- final static byte WALL = 3;
-
-public Pawns() {
-}
-
-/* Provide the current game and ignitiate the search of the best move for the given type
- * Must return immediately as it will be called from the UI thread.
- * The UI thread will fetch the best move any time thereafter.
- */
-public void playRequest(byte[][] game, int type) {
- threadStop = true;
- synchronized (this) {
- bestIndex = -1;
- bestScore = Integer.MIN_VALUE;
- convert(game, this.game);
- initPawnBorders(this.game, gameWallWeight);
- /* Quickly compute a legal move */
- for (int i = 0; i < this.game.length; i++) {
- if (this.game[i] == EMPTY) {
- bestIndex = i;
- break;
- }
- }
- new Thread() {
- public void run() {
- synchronized(Pawns.this) {
- threadStop = false;
- int[] result = new int[2];
- /* if long time, must check for threadStop and exit early */
- evalBest(Pawns.this.game, BLACK, 2, result);
- bestIndex = result[0];
- bestScore = result[1];
- }
- }
- }.start();
- }
-}
-
-/* Fetch best move in natural coordinates for the board previously given in
- * the call to playRequest.
- */
-public void getBestMove(int[] point) {
- convert(bestIndex, point);
- threadStop = true;
-}
-
-/* Given an expanded representation of the board, format internal compact mode */
-static void convert(byte[][] board, byte[] g) {
- for (int i = 0; i < board.length; i++) System.arraycopy(board[i], 0, g, i * 8, 8);
-}
-/* Update given compact model based on player move in natural coordinates */
-static void set(byte[] g, int x, int y, byte type) {
- g[x*8+y] = type;
-}
-/* Given an index in compact representation, return natural coordinates */
-static void convert(int index, /*out [0] x [1] y */int[] point) {
- point[0] = index / 8;
- point[1] = index % 8;
-}
-/* Given an index into the compact model and the neighbour code,
- * return the index of the corresponding neighbour index.
- * Returns -1 if there is no neighbour.
- *
- * Neighbour code for the index X
- * 0 1 2
- * 3 X 4
- * 5 6 7
- */
-static int getNeighbourIndex(byte[] g, int index, int neighbour) {
- if (index < 0 || index >= g.length) return -1;
- int result = -1;
- switch (neighbour) {
- case 0: result = index < 8 || index % 8 == 0 ? -1 : index - 9; break;
- case 1: result = index < 8 ? -1 : index - 8; break;
- case 2: result = index < 8 || index % 8 == 7 ? -1 : index - 7; break;
- case 3: result = index % 8 == 0 ? -1 : index - 1; break;
- case 4: result = index % 8 == 7 ? -1 : index + 1; break;
- case 5: result = index % 8 == 0 || index >= 56 ? -1 : index + 7; break;
- case 6: result = index >= 56 ? -1 : index + 8; break;
- case 7: result = index % 8 == 7 || index >= 56 ? -1 : index + 9; break;
- }
- return result;
-}
-/* Make the player type play at index on given compact board
- * Compute all pawns that must be reversed.
- */
-static void play(byte[] g, int index, byte type) {
- byte opponentType = type == WHITE ? BLACK : WHITE;
- for (int neighbour = 0; neighbour <= 7; neighbour++) {
- int nIndex = getNeighbourIndex(g, index, neighbour);
- int[] reversiIndeces = new int[6];
- int nReversi = 0;
- while (nIndex != -1 && nReversi < 6 && g[nIndex] == opponentType) {
- reversiIndeces[nReversi] = nIndex;
- nReversi++;
- nIndex = getNeighbourIndex(g, nIndex, neighbour);
- }
- if (nReversi > 0 && nIndex != -1 && g[nIndex] == type) {
- for (int i = 0; i < nReversi; i++) g[reversiIndeces[i]] = type;
- }
- }
- g[index] = type;
-}
-/* Evaluate the given compact model based on pawns distribution
- * High means white has advantage. Below zero means black has advantage.
- */
-static int eval(byte[] g) {
- int cntWhite = 0, cntBlack = 0, cntEmpty = 0;
- int cntWhiteWallAdvantage = 0, cntBlackWallAdvantage = 0;
- for (int i = 0; i < 64; i++) {
- if (g[i] == WHITE) {
- cntWhite++;
- cntWhiteWallAdvantage += gameWallWeight[i];
- }
- else if (g[i] == BLACK) {
- cntBlack++;
- cntBlackWallAdvantage += gameWallWeight[i];
- }
- else if (g[i] == EMPTY) cntEmpty++;
- }
- if (cntEmpty == 0) {
- if (cntWhite > cntBlack) return Integer.MAX_VALUE; /* White wins */
- if (cntWhite < cntBlack) return Integer.MIN_VALUE; /* Black wins */
- return 0; /* Stalemate */
- }
- return cntWhite + cntWhiteWallAdvantage - cntBlack - cntBlackWallAdvantage;
-}
-
-/* Recognize pawns protected by walls or borders
- * TBD - note this should be called only once for each cell and stored
- * in a separate byte[] gWallGain
- * */
-static void initPawnBorders(byte[] g, int[] gameWallWeight) {
- /* A pawn has 8 neighbours on 4 axes.
- * Strategic pawns have one side of each axis protected by a wall and the other
- * side not closed by a wall.
- * A pawn cannot be reversed when each of its 4 axes are protected by a wall on
- * one side. Pawns that have more than 4 walls are less interesting since they
- * are not open enough to the board.
- *
- * Nbr walls, nbr axis covered, estimated value
- * 0 n/a 0
- * 1 1 2
- * 2 1 1
- * 2 2 6
- * 3 2 4
- * 4 2 2
- * 3 3 9
- * 4 3 8
- * 4 4 16
- * 5 4 14
- * 6 4 9
- * 7 4 6
- * 8 4 0
- */
- int[] nTypes = new int[8];
- for (int i = 0; i < 64; i++) {
- int nWalls = 0;
- int nAxis = 0;
- for (int n = 0; n < 8; n++) {
- int nIndex = getNeighbourIndex(g, i, n);
- nTypes[n] = nIndex != -1 ? g[nIndex] : WALL;
- if (nTypes[n] == WALL) nWalls++;
- }
- int score = nWalls;
- if (nWalls > 0) {
- if (nTypes[0] == WALL || nTypes[7] == WALL) nAxis++;
- if (nTypes[1] == WALL || nTypes[6] == WALL) nAxis++;
- if (nTypes[2] == WALL || nTypes[5] == WALL) nAxis++;
- if (nTypes[4] == WALL || nTypes[3] == WALL) nAxis++;
- switch (nAxis) {
- case 4: switch (nWalls) { case 4: score = 16; break; case 5: score = 14; break; case 6: score = 9; case 7: score = 6; break; case 8: score = 0; break;}; break;
- case 3: switch (nWalls) { case 3: score = 9; break; case 4: score = 8;}; break;
- case 2: switch (nWalls) { case 2: score = 6; break; case 3: score = 4; break; case 4: score = 2; }; break;
- case 1: switch (nWalls) { case 1: score = 2; break; case 2: score = 1; break;}; break;
- };
- }
- gameWallWeight[i] = score;
- }
-}
-
-/* Evaluate the best move for player type for the given board, doing a depth 1 search */
-static void evalBest(byte[] g, byte type, int depth, /* out [0] best move, [1] minimax */int[] result) {
- byte[] tmp = new byte[64];
- byte opponentType = type == WHITE ? BLACK : WHITE;
- result[0] = -1; result[1] = Integer.MIN_VALUE;
- for (int i = 0; i < 64; i++) {
- if (g[i] == EMPTY) {
- System.arraycopy(g, 0, tmp, 0, 64);
- play(tmp, i, type);
- int score = eval(tmp);
- if (depth > 1) {
- int[] tmpResult = new int[2];
- evalBest(tmp, opponentType, depth - 1, tmpResult);
- score = tmpResult[1];
- }
- if ((type == WHITE && score > result[1]) || (type == BLACK && score < result[1]) || result[0] == -1) {
- result[0] = i;
- result[1] = score;
- }
- }
- }
-}
-} \ No newline at end of file
diff --git a/examples/org.eclipse.swt.examples.browser.demos/src/org/eclipse/swt/examples/browser/demos/views/BrowserDemoView.java b/examples/org.eclipse.swt.examples.browser.demos/src/org/eclipse/swt/examples/browser/demos/views/BrowserDemoView.java
deleted file mode 100644
index 58a73ee7a8..0000000000
--- a/examples/org.eclipse.swt.examples.browser.demos/src/org/eclipse/swt/examples/browser/demos/views/BrowserDemoView.java
+++ /dev/null
@@ -1,238 +0,0 @@
-package org.eclipse.swt.examples.browser.demos.views;
-
-import org.eclipse.ui.part.*;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.swt.*;
-import org.eclipse.swt.browser.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.examples.browser.demos.*;
-
-public class BrowserDemoView extends ViewPart {
- Browser browser = null;
- ReversiListener reversiListener;
-
- final static int TYPE_WELCOME = 1;
- final static int TYPE_START = 2;
- final static int TYPE_BOARD = 3;
- final static int TYPE_BOARD_OVER = 4;
-
- final static String URL = "http://www.org.eclipse.swt.examples.browser.demos.pawns/";
- static String PLUGIN_PATH = BrowserDemoPlugin.PLUGIN_PATH;
- static String CSS_FOLDER = "css1";
- static String URL_CSS = PLUGIN_PATH+CSS_FOLDER+"/style.css";
- static String URL_WELCOME =PLUGIN_PATH+CSS_FOLDER+"/welcome.html";
-
- final static String ACTION_START_2_PLAYERS = "actionstart2players";
- final static String ACTION_START_1_PLAYER = "actionstart1player";
- final static String ACTION_WHITE = "actionwhite";
- final static String ACTION_BLACK = "actionblack";
- final static String ACTION_THEME = "actiontheme";
-
- static byte[][] game = null;
- static boolean isWhite = true;
- static int cntWhite = 0, cntBlack = 0;
- static boolean computer = false;
- static int cx, cy;
- final static byte EMPTY = 0;
- final static byte WHITE = 1;
- final static byte BLACK = 2;
- final static byte WALL = 3;
-
- static Pawns ttr = null;
- static int[] move = new int[2];
-
- public BrowserDemoView() {
- }
- public void createPartControl(Composite parent) {
- try {
- browser = new Browser(parent, SWT.NONE);
- } catch (SWTError e) {
- e.printStackTrace();
- return;
- }
- reversiListener = new ReversiListener();
- browser.addLocationListener(reversiListener);
- browser.setUrl(URL_WELCOME);
-
- }
- private void showMessage(String message) {
- MessageDialog.openInformation(
- browser.getShell(),
- "Browser Demo",
- message);
- }
- public void setFocus() {
- browser.setFocus();
- }
-
- static String getHtml(int type) {
- String html = null;
- switch (type) {
- case TYPE_BOARD:
- case TYPE_BOARD_OVER: {
- html = "<html><header><link rel=\"stylesheet\" type=\"text/css\" href=\""+URL_CSS+"\"></header><body><div class=\"board\"><table><tbody>";
- String classPlayerWhite = "playerwhite", classPlayerBlack = "playerblack";
- if (type == TYPE_BOARD_OVER) {
- if (cntWhite > cntBlack) {
- classPlayerWhite += " winner";
- classPlayerBlack += " loser";
- } else {
- classPlayerWhite += " loser";
- classPlayerBlack += " winner";
- }
- }
- String white = "<td class=\"white\"/>";
- String black = "<td class=\"black\"/>";
- String wall = "<td class=\"wall\"/>";
- for (int i = 0; i < game.length; i++) {
- html += "<tr>";
- for (int j = 0; j < game[0].length; j++) {
- switch (game[i][j]) {
- case EMPTY: {
- String empty = "<td class=\""+(isWhite ? "whitelink" : "blacklink")+"\">"+ (isWhite || (!isWhite && !computer) ? "<a href=\""+URL+(isWhite ? ACTION_WHITE : ACTION_BLACK)+"/xx"+i+"yy"+j+"\" class=\"empty\"/>" : "<div class=\"empty\"/>")+"</td>";
- html += empty; break;
- }
- case WHITE: html += white; break;
- case BLACK: html += black; break;
- case WALL: html += wall; break;
- }
- }
- html +="</tr>";
- }
- html += "</tbody></table></div>";
- html += "<div class=\""+classPlayerWhite+"\">"+cntWhite+"</div>";
- html += "<div class=\""+classPlayerBlack+"\">"+cntBlack+"</div>";
- html += "</body></html>";
- break;
- }
- }
- return html;
- }
-
- public class ReversiListener implements LocationListener {
- public void changed(LocationEvent e) {
- }
- public void changing(LocationEvent e) {
- try {
- final Browser browser = (Browser)e.widget;
- if (e.location.indexOf(ACTION_START_1_PLAYER) != -1 || e.location.indexOf(ACTION_START_2_PLAYERS) != -1) {
- computer = e.location.indexOf(ACTION_START_1_PLAYER) != -1;
- game = new byte[8][8];
- if (computer) ttr = new Pawns();
- for (int i = 0; i < 5; i++) game[(int)(Math.random()*game.length)][(int)(Math.random()*game[0].length)] = WALL;
- e.display.asyncExec(new Runnable() {
- public void run() {
- browser.setText(getHtml(TYPE_BOARD));
- }});
- e.doit = false;
- return;
- }
- if (e.location.indexOf(ACTION_THEME) != -1) {
- int index = e.location.indexOf(ACTION_THEME) + ACTION_THEME.length() + 1;
- CSS_FOLDER = e.location.substring(index, index + 4);
- URL_CSS = PLUGIN_PATH+CSS_FOLDER+"/style.css";
- URL_WELCOME = PLUGIN_PATH+CSS_FOLDER+"/welcome.html";
- e.display.asyncExec(new Runnable() {
- public void run() {
- browser.setUrl(URL_WELCOME);
- }});
- e.doit = false;
- return;
- }
- byte player = EMPTY;
- if (e.location.indexOf(ACTION_WHITE) != -1) player = WHITE;
- else if (e.location.indexOf(ACTION_BLACK) != -1) player = BLACK;
- if (player != EMPTY) {
- int index = e.location.indexOf("xx") + 2;
- int x = Integer.parseInt(e.location.substring(index, index + 1));
- index = e.location.indexOf("yy") + 2;
- int y = Integer.parseInt(e.location.substring(index, index + 1));
- boolean hasMore = add(x, y, player);
- isWhite = player != WHITE;
- browser.setText(getHtml(hasMore ? TYPE_BOARD : TYPE_BOARD_OVER));
- if (computer && hasMore && !isWhite) play(e.display, browser, 5000);
- e.doit = false;
- }
- }catch (Exception e1 ) {
- e1.printStackTrace();
- }
- }
- }
-
- public static boolean add(int x, int y, byte color) {
- game[x][y] = color;
- int cnt = Math.min(x, y), n = 0;
- int other_color = color == WHITE ? BLACK : WHITE;
- for (int d = 1; d <= cnt; d++) {
- if (game[x-d][y-d] == other_color) n++;
- else if (game[x-d][y-d] != color) break;
- else { if (n > 0) for (d = 1; d <= n; d++) game[x-d][y-d] = color; break; }
- }
- cnt = Math.min(game.length - 1 - x, game[0].length - 1 - y); n = 0;
- for (int d = 1; d <= cnt; d++) {
- if (game[x+d][y+d] == other_color) n++;
- else if (game[x+d][y+d] != color) break;
- else { if (n > 0) for (d = 1; d <= n; d++) game[x+d][y+d] = color; break; }
- }
- cnt = Math.min(game.length - 1 - x, y); n = 0;
- for (int d = 1; d <= cnt; d++) {
- if (game[x+d][y-d] == other_color) n++;
- else if (game[x+d][y-d] != color) break;
- else { if (n > 0) for (d = 1; d <= n; d++) game[x+d][y-d] = color; break; }
- }
- cnt = Math.min(x, game[0].length - 1 - y); n = 0;
- for (int d = 1; d <= cnt; d++) {
- if (game[x-d][y+d] == other_color) n++;
- else if (game[x-d][y+d] != color) break;
- else { if (n > 0) for (d = 1; d <= n; d++) game[x-d][y+d] = color; break; }
- }
- cnt = y; n = 0;
- for (int d = 1; d <= cnt; d++) {
- if (game[x][y-d] == other_color) n++;
- else if (game[x][y-d] != color) break;
- else { if (n > 0) for (d = 1; d <= n; d++) game[x][y-d] = color; break; }
- }
- cnt = game[0].length - 1 - y; n = 0;
- for (int d = 1; d <= cnt; d++) {
- if (game[x][y+d] == other_color) n++;
- else if (game[x][y+d] != color) break;
- else { if (n > 0) for (d = 1; d <= n; d++) game[x][y+d] = color; break; }
- }
- cnt = x; n = 0;
- for (int d = 1; d <= cnt; d++) {
- if (game[x-d][y] == other_color) n++;
- else if (game[x-d][y] != color) break;
- else { if (n > 0) for (d = 1; d <= n; d++) game[x-d][y] = color; break; }
- }
- cnt = game.length - 1 - x; n = 0;
- for (int d = 1; d <= cnt; d++) {
- if (game[x+d][y] == other_color) n++;
- else if (game[x+d][y] != color) break;
- else { if (n > 0) for (d = 1; d <= n; d++) game[x+d][y] = color; break; }
- }
-
- boolean hasMore = false;
- cntWhite = 0; cntBlack = 0;
- for (int i = 0; i < game.length; i++)
- for (int j = 0; j < game[0].length; j++) {
- switch (game[i][j]) {
- case EMPTY: hasMore = true; break;
- case WHITE: cntWhite++; break;
- case BLACK: cntBlack++; break;
- }
- }
- return hasMore;
- }
-
- public static void play(final Display display, final Browser browser, int delay) {
- ttr.playRequest(game, BLACK);
- display.timerExec(3000, new Runnable() {
- public void run() {
- ttr.getBestMove(move);
- boolean hasMore = add(move[0], move[1], BLACK);
- isWhite = true;
- browser.setText(getHtml(hasMore ? TYPE_BOARD : TYPE_BOARD_OVER));
- }
- });
- }
-} \ No newline at end of file
diff --git a/examples/org.eclipse.swt.examples.browser/.classpath b/examples/org.eclipse.swt.examples.browser/.classpath
deleted file mode 100644
index 7b14e15a15..0000000000
--- a/examples/org.eclipse.swt.examples.browser/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="output" path="bin"/>
-</classpath> \ No newline at end of file
diff --git a/examples/org.eclipse.swt.examples.browser/.cvsignore b/examples/org.eclipse.swt.examples.browser/.cvsignore
deleted file mode 100644
index c5e82d7458..0000000000
--- a/examples/org.eclipse.swt.examples.browser/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin \ No newline at end of file
diff --git a/examples/org.eclipse.swt.examples.browser/.project b/examples/org.eclipse.swt.examples.browser/.project
deleted file mode 100644
index 6fd5ee59c9..0000000000
--- a/examples/org.eclipse.swt.examples.browser/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.swt.examples.browser</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/examples/org.eclipse.swt.examples.browser/about.html b/examples/org.eclipse.swt.examples.browser/about.html
deleted file mode 100644
index 9db411aab9..0000000000
--- a/examples/org.eclipse.swt.examples.browser/about.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<title>About</title>
-<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>20th June, 2002</p>
-<h3>License</h3>
-<p>Eclipse.org makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise indicated below, the Content is provided to you under the terms and conditions of the
-Common Public License Version 1.0 (&quot;CPL&quot;). A copy of the CPL is available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>.
-For purposes of the CPL, &quot;Program&quot; will mean the Content.</p>
-
-<h3>Contributions</h3>
-
-<p>If this Content is licensed to you under the terms and conditions of the CPL, any Contributions, as defined in the CPL, uploaded, submitted, or otherwise
-made available to Eclipse.org, members of Eclipse.org and/or the host of Eclipse.org web site, by you that relate to such
-Content are provided under the terms and conditions of the CPL and can be made available to others under the terms of the CPL.</p>
-
-<p>If this Content is licensed to you under license terms and conditions other than the CPL (&quot;Other License&quot;), any modifications, enhancements and/or
-other code and/or documentation (&quot;Modifications&quot;) uploaded, submitted, or otherwise made available to Eclipse.org, members of Eclipse.org and/or the
-host of Eclipse.org, by you that relate to such Content are provided under terms and conditions of the Other License and can be made available
-to others under the terms of the Other License. In addition, with regard to Modifications for which you are the copyright holder, you are also
-providing the Modifications under the terms and conditions of the CPL and such Modifications can be made available to others under the terms of
-the CPL.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/examples/org.eclipse.swt.examples.browser/build.properties b/examples/org.eclipse.swt.examples.browser/build.properties
deleted file mode 100644
index 818e48379c..0000000000
--- a/examples/org.eclipse.swt.examples.browser/build.properties
+++ /dev/null
@@ -1,20 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2003 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Common Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/cpl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-bin.includes = doc-html/,\
- icons/,\
- plugin.properties,\
- plugin.xml,\
- about.html,\
- *.jar
-
-src.includes = about.html
-
-source.browserexample.jar = src/
diff --git a/examples/org.eclipse.swt.examples.browser/doc-html/hglegal.htm b/examples/org.eclipse.swt.examples.browser/doc-html/hglegal.htm
deleted file mode 100644
index 621115699c..0000000000
--- a/examples/org.eclipse.swt.examples.browser/doc-html/hglegal.htm
+++ /dev/null
@@ -1,14 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <LINK REL="stylesheet" HREF="../../../book.css" CHARSET="ISO-8859-1" TYPE="text/css">
- <title>Legal Notices</title>
-</head>
-<body>
-
-<h3>
-<a NAME="Notices"></a>Notices</h3>
-(c) Copyright (c) 2000, 2004 IBM Corporation and others. All Rights Reserved.
-</body>
-</html>
diff --git a/examples/org.eclipse.swt.examples.browser/doc-html/ngibmcpy.gif b/examples/org.eclipse.swt.examples.browser/doc-html/ngibmcpy.gif
deleted file mode 100644
index c786e43e1f..0000000000
--- a/examples/org.eclipse.swt.examples.browser/doc-html/ngibmcpy.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples.browser/doc-html/swt_browser_ex.html b/examples/org.eclipse.swt.examples.browser/doc-html/swt_browser_ex.html
deleted file mode 100644
index af4189e3e6..0000000000
--- a/examples/org.eclipse.swt.examples.browser/doc-html/swt_browser_ex.html
+++ /dev/null
@@ -1,33 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <title>SWT - Controls Overview</title>
-</head>
-<body>
-
-<h2>SWT example - Browser</h2>
-
-<p>
-The Browser Example is a simple demonstration of the SWT Browser widget.
-It consists of a composite containing a Browser widget to render HTML and some
-additional widgets to implement actions commonly found on browsers (toolbar
-with back, forward, refresh and stop buttons, status bar etc.).
-</p>
-
-<h3>Running the example</h3>
-<p>
-Follow the <a href="../../org.eclipse.swt.examples/doc-html/swt_manual_setup.html">SWT standalone examples setup</a>
-instructions to install and run the example from your workspace.
-</p>
-<p>
-The "Main" class is <code>org.eclipse.swt.examples.browserexample.BrowserExample</code>.
-</p>
-<p>
-This example can also be run using the <a href="../../org.eclipse.swt.examples.launcher/doc-html/swt_launcher_ex.html">Example Launcher</a>.
-Select the <strong>Browser</strong> item from the <strong>Workbench Views</strong> category and click <strong>Run</strong>.
-</p>
-
-<p><a href="hglegal.htm"><img SRC="ngibmcpy.gif" ALT="Copyright IBM Corporation and others 2000, 2004. All Rights Reserved." BORDER=0 height=14 width=324></a></p>
-</body>
-</html>
diff --git a/examples/org.eclipse.swt.examples.browser/icons/browser_example.gif b/examples/org.eclipse.swt.examples.browser/icons/browser_example.gif
deleted file mode 100644
index 895e22110d..0000000000
--- a/examples/org.eclipse.swt.examples.browser/icons/browser_example.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples.browser/plugin.properties b/examples/org.eclipse.swt.examples.browser/plugin.properties
deleted file mode 100644
index 032ebc018d..0000000000
--- a/examples/org.eclipse.swt.examples.browser/plugin.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2003 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Common Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/cpl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-providerName = Eclipse.org
-plugin.SWTBrowserExample.name = SWT Browser Example Plugin
-category.SWTExamples.name = SWT Examples
-view.BrowserExample.name = Web Browser
-
-launchcategory.SWTViewExamples.name = Workbench Views
-launchcategory.SWTViewExamples.description = \
- A collection of Standard Widget Toolkit examples that run as Views inside the Workbench. \
- These examples will create a new View in the current Perspective.
-
-launchitem.BrowserExample.name = Web Browser
-launchitem.BrowserExample.description = \
- This example demonstrates how to integrate a Web Browser with the SWT Browser widget.\n\n\
- It consists of a composite containing a Browser widget to render HTML. \
- Additional widgets allow the user to perform typical browser actions (for example, navigate to a particular URL, go back, forward, refresh and stop).
-
diff --git a/examples/org.eclipse.swt.examples.browser/plugin.xml b/examples/org.eclipse.swt.examples.browser/plugin.xml
deleted file mode 100644
index ed246e65ca..0000000000
--- a/examples/org.eclipse.swt.examples.browser/plugin.xml
+++ /dev/null
@@ -1,61 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<plugin
- id="org.eclipse.swt.examples.browser"
- name="%plugin.SWTBrowserExample.name"
- version="3.1.0"
- provider-name="%providerName"
- class="org.eclipse.swt.examples.browserexample.BrowserPlugin">
-
-<!-- Runtime -->
- <runtime>
- <library name="browserexample.jar">
- <packages prefixes="org.eclipse.swt.examples.browserexample"/>
- </library>
- </runtime>
-<!-- Required plugins -->
- <requires>
- <import plugin="org.eclipse.ui.ide"/>
- <import plugin="org.eclipse.ui.views"/>
- <import plugin="org.eclipse.jface.text"/>
- <import plugin="org.eclipse.ui.workbench.texteditor"/>
- <import plugin="org.eclipse.ui.editors"/>
- <import plugin="org.eclipse.core.runtime"/>
- <import plugin="org.eclipse.ui"/>
- <import plugin="org.eclipse.swt"/>
- <import plugin="org.eclipse.swt.examples"/>
- </requires>
-
-
-<!-- Extension points -->
-<!-- Extensions -->
- <extension
- point="org.eclipse.ui.views">
- <view
- name="%view.BrowserExample.name"
- icon="icons/browser_example.gif"
- category="org.eclipse.swt.examples.category"
- class="org.eclipse.swt.examples.browserexample.BrowserView"
- id="org.eclipse.swt.examples.browserexample.view">
- </view>
- </extension>
- <extension
- point="org.eclipse.swt.examples.launcher.launchItems">
- <category
- name="%launchcategory.SWTViewExamples.name"
- description="%launchcategory.SWTViewExamples.description"
- id="org.eclipse.swt.examples.launchViewCategory">
- </category>
- <item
- name="%launchitem.BrowserExample.name"
- icon="icons/browser_example.gif"
- category="org.eclipse.swt.examples.launchViewCategory"
- description="%launchitem.BrowserExample.description"
- id="org.eclipse.swt.examples.browserexample.viewlauncher">
- <view
- viewId="org.eclipse.swt.examples.browserexample.view">
- </view>
- </item>
- </extension>
-
-</plugin>
diff --git a/examples/org.eclipse.swt.examples.browser/src/import.properties b/examples/org.eclipse.swt.examples.browser/src/import.properties
deleted file mode 100644
index 58344f0d3e..0000000000
--- a/examples/org.eclipse.swt.examples.browser/src/import.properties
+++ /dev/null
@@ -1,14 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2003 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Common Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/cpl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-# Persist project settings for later import
-natures = org.eclipse.jdt.core.javanature; org.eclipse.pde.PluginNature
-builders = org.eclipse.jdt.core.javabuilder; org.eclipse.pde.ManifestBuilder; org.eclipse.pde.SchemaBuilder
-var.ECLIPSE_PLUGINS = <<ECLIPSE_PLUGINS>>
diff --git a/examples/org.eclipse.swt.examples.browser/src/org/eclipse/swt/examples/browserexample/BrowserPlugin.java b/examples/org.eclipse.swt.examples.browser/src/org/eclipse/swt/examples/browserexample/BrowserPlugin.java
deleted file mode 100644
index cb61fa3454..0000000000
--- a/examples/org.eclipse.swt.examples.browser/src/org/eclipse/swt/examples/browserexample/BrowserPlugin.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.browserexample;
-
-
-import org.eclipse.ui.plugin.*;
-
-/**
- * The main plugin class to be used in the desktop.
- */
-public class BrowserPlugin extends AbstractUIPlugin {
- /**
- * The constructor.
- */
- public BrowserPlugin() {
- super();
- }
-}
diff --git a/examples/org.eclipse.swt.examples.browser/src/org/eclipse/swt/examples/browserexample/BrowserView.java b/examples/org.eclipse.swt.examples.browser/src/org/eclipse/swt/examples/browserexample/BrowserView.java
deleted file mode 100644
index e7d2670bbd..0000000000
--- a/examples/org.eclipse.swt.examples.browser/src/org/eclipse/swt/examples/browserexample/BrowserView.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.browserexample;
-
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.part.*;
-
-/**
- * <code>BrowserView</code> is a simple demonstration
- * of the SWT Browser widget. It consists of a workbench
- * view and tab folder where each tab in the folder allows the
- * user to interact with a control.
- *
- * @see ViewPart
- */
-public class BrowserView extends ViewPart {
- BrowserExample instance = null;
-
- /**
- * Create the example
- *
- * @see ViewPart#createPartControl
- */
- public void createPartControl(Composite frame) {
- instance = new BrowserExample(frame, true);
- }
-
- /**
- * Called when we must grab focus.
- *
- * @see org.eclipse.ui.part.ViewPart#setFocus
- */
- public void setFocus() {
- instance.focus();
- }
-
- /**
- * Called when the View is to be disposed
- */
- public void dispose() {
- instance.dispose();
- instance = null;
- super.dispose();
- }
-}
diff --git a/examples/org.eclipse.swt.examples.controls/.classpath b/examples/org.eclipse.swt.examples.controls/.classpath
deleted file mode 100755
index 065ac06e19..0000000000
--- a/examples/org.eclipse.swt.examples.controls/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/examples/org.eclipse.swt.examples.controls/.cvsignore b/examples/org.eclipse.swt.examples.controls/.cvsignore
deleted file mode 100755
index c5e82d7458..0000000000
--- a/examples/org.eclipse.swt.examples.controls/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin \ No newline at end of file
diff --git a/examples/org.eclipse.swt.examples.controls/.project b/examples/org.eclipse.swt.examples.controls/.project
deleted file mode 100644
index f8c68eb6b4..0000000000
--- a/examples/org.eclipse.swt.examples.controls/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.swt.examples.controls</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.PluginNature</nature>
- </natures>
-</projectDescription>
diff --git a/examples/org.eclipse.swt.examples.controls/about.html b/examples/org.eclipse.swt.examples.controls/about.html
deleted file mode 100644
index 9db411aab9..0000000000
--- a/examples/org.eclipse.swt.examples.controls/about.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<title>About</title>
-<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>20th June, 2002</p>
-<h3>License</h3>
-<p>Eclipse.org makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise indicated below, the Content is provided to you under the terms and conditions of the
-Common Public License Version 1.0 (&quot;CPL&quot;). A copy of the CPL is available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>.
-For purposes of the CPL, &quot;Program&quot; will mean the Content.</p>
-
-<h3>Contributions</h3>
-
-<p>If this Content is licensed to you under the terms and conditions of the CPL, any Contributions, as defined in the CPL, uploaded, submitted, or otherwise
-made available to Eclipse.org, members of Eclipse.org and/or the host of Eclipse.org web site, by you that relate to such
-Content are provided under the terms and conditions of the CPL and can be made available to others under the terms of the CPL.</p>
-
-<p>If this Content is licensed to you under license terms and conditions other than the CPL (&quot;Other License&quot;), any modifications, enhancements and/or
-other code and/or documentation (&quot;Modifications&quot;) uploaded, submitted, or otherwise made available to Eclipse.org, members of Eclipse.org and/or the
-host of Eclipse.org, by you that relate to such Content are provided under terms and conditions of the Other License and can be made available
-to others under the terms of the Other License. In addition, with regard to Modifications for which you are the copyright holder, you are also
-providing the Modifications under the terms and conditions of the CPL and such Modifications can be made available to others under the terms of
-the CPL.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/examples/org.eclipse.swt.examples.controls/build.properties b/examples/org.eclipse.swt.examples.controls/build.properties
deleted file mode 100755
index ca7f7ae865..0000000000
--- a/examples/org.eclipse.swt.examples.controls/build.properties
+++ /dev/null
@@ -1,20 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2003 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Common Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/cpl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-bin.includes = doc-html/,\
- icons/,\
- plugin.properties,\
- plugin.xml,\
- about.html,\
- *.jar
-
-src.includes = about.html
-
-source.controls.jar = src/
diff --git a/examples/org.eclipse.swt.examples.controls/doc-html/hglegal.htm b/examples/org.eclipse.swt.examples.controls/doc-html/hglegal.htm
deleted file mode 100755
index 621115699c..0000000000
--- a/examples/org.eclipse.swt.examples.controls/doc-html/hglegal.htm
+++ /dev/null
@@ -1,14 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <LINK REL="stylesheet" HREF="../../../book.css" CHARSET="ISO-8859-1" TYPE="text/css">
- <title>Legal Notices</title>
-</head>
-<body>
-
-<h3>
-<a NAME="Notices"></a>Notices</h3>
-(c) Copyright (c) 2000, 2004 IBM Corporation and others. All Rights Reserved.
-</body>
-</html>
diff --git a/examples/org.eclipse.swt.examples.controls/doc-html/ngibmcpy.gif b/examples/org.eclipse.swt.examples.controls/doc-html/ngibmcpy.gif
deleted file mode 100755
index c786e43e1f..0000000000
--- a/examples/org.eclipse.swt.examples.controls/doc-html/ngibmcpy.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples.controls/doc-html/swt_controls_ex.html b/examples/org.eclipse.swt.examples.controls/doc-html/swt_controls_ex.html
deleted file mode 100755
index 288fe2b184..0000000000
--- a/examples/org.eclipse.swt.examples.controls/doc-html/swt_controls_ex.html
+++ /dev/null
@@ -1,33 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <title>SWT - Controls Overview</title>
-</head>
-<body>
-
-<h2>SWT example - Controls</h2>
-
-<p>
-The Controls Example is a simple demonstration of common SWT controls.
-It consists of a tab folder where each tab in the folder allows the user
-to interact with a different control.
-The user can change styles and settings and view how this affects each control.
-</p>
-
-<h3>Running the example</h3>
-<p>
-Follow the <a href="../../org.eclipse.swt.examples/doc-html/swt_manual_setup.html">SWT standalone examples setup</a>
-instructions to install and run the example from your workspace.
-</p>
-<p>
-The "Main" class is <code>org.eclipse.swt.examples.controlexample.ControlExample</code>.
-</p>
-<p>
-This example can also be run using the <a href="../../org.eclipse.swt.examples.launcher/doc-html/swt_launcher_ex.html">Example Launcher</a>.
-Select the <strong>Controls</strong> item from the <strong>Workbench Views</strong> category and click <strong>Run</strong>.
-</p>
-
-<p><a href="hglegal.htm"><img SRC="ngibmcpy.gif" ALT="Copyright IBM Corporation and others 2000, 2004. All Rights Reserved." BORDER=0 height=14 width=324></a></p>
-</body>
-</html>
diff --git a/examples/org.eclipse.swt.examples.controls/doc-html/swt_customcontrols_ex.html b/examples/org.eclipse.swt.examples.controls/doc-html/swt_customcontrols_ex.html
deleted file mode 100644
index c628539af1..0000000000
--- a/examples/org.eclipse.swt.examples.controls/doc-html/swt_customcontrols_ex.html
+++ /dev/null
@@ -1,33 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <title>SWT - Controls Overview</title>
-</head>
-<body>
-
-<h2>SWT example - Custom Controls</h2>
-
-<p>
-The Custom Controls example is a simple demonstration of emulated SWT controls.
-It consists of a tab folder where each tab in the folder allows the user
-to interact with a different emulated control.
-The user can change styles and settings and view how this affects each control.
-</p>
-
-<h3>Running the example</h3>
-<p>
-Follow the <a href="../../org.eclipse.swt.examples/doc-html/swt_manual_setup.html">SWT standalone examples setup</a>
-instructions to install and run the example from your workspace.
-</p>
-<p>
-The "Main" class is <code>org.eclipse.swt.examples.controlexample.CustomControlExample</code>.
-</p>
-<p>
-This example can also be run using the <a href="../../org.eclipse.swt.examples.launcher/doc-html/swt_launcher_ex.html">Example Launcher</a>.
-Select the <strong>Custom Controls</strong> item from the <strong>Workbench Views</strong> category and click <strong>Run</strong>.
-</p>
-
-<p><a href="hglegal.htm"><img SRC="ngibmcpy.gif" ALT="Copyright IBM Corporation and others 2000, 2004. All Rights Reserved." BORDER=0 height=14 width=324></a></p>
-</body>
-</html>
diff --git a/examples/org.eclipse.swt.examples.controls/icons/controls_example.gif b/examples/org.eclipse.swt.examples.controls/icons/controls_example.gif
deleted file mode 100755
index cbdee97066..0000000000
--- a/examples/org.eclipse.swt.examples.controls/icons/controls_example.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples.controls/plugin.properties b/examples/org.eclipse.swt.examples.controls/plugin.properties
deleted file mode 100755
index ee2fea23ad..0000000000
--- a/examples/org.eclipse.swt.examples.controls/plugin.properties
+++ /dev/null
@@ -1,34 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2003 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Common Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/cpl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-providerName = Eclipse.org
-plugin.SWTControlsExample.name = SWT Controls Example Plugin
-category.SWTExamples.name = SWT Examples
-view.ControlsExample.name = SWT Controls
-view.CustomControlsExample.name = SWT Custom Controls
-
-launchcategory.SWTViewExamples.name = Workbench Views
-launchcategory.SWTViewExamples.description = \
- A collection of Standard Widget Toolkit examples that run as Views inside the Workbench. \
- These examples will create a new View in the current Perspective.
-
-launchitem.ControlsExample.name = Controls
-launchitem.ControlsExample.description = \
- This example is a simple demonstration of native SWT controls.\n\n\
- It consists of a tab folder where each tab allows the user \
- to interact with a different SWT control. \
- The user can change styles and settings and view how this affects the control.
-
-launchitem.CustomControlsExample.name = Custom Controls
-launchitem.CustomControlsExample.description = \
- This example is a simple demonstration of custom SWT controls.\n\n\
- It consists of a tab folder where each tab allows the user \
- to interact with a different SWT custom control. \
- The user can change styles and settings and view how this affects the control.
diff --git a/examples/org.eclipse.swt.examples.controls/plugin.xml b/examples/org.eclipse.swt.examples.controls/plugin.xml
deleted file mode 100755
index 1a110307c1..0000000000
--- a/examples/org.eclipse.swt.examples.controls/plugin.xml
+++ /dev/null
@@ -1,79 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<plugin
- id="org.eclipse.swt.examples.controls"
- name="%plugin.SWTControlsExample.name"
- version="3.1.0"
- provider-name="%providerName"
- class="org.eclipse.swt.examples.controls.ControlPlugin">
-
-<!-- Runtime -->
-<!-- Runtime -->
- <runtime>
- <library name="controls.jar">
- <packages prefixes="org.eclipse.swt.examples.controls"/>
- </library>
- </runtime>
-<!-- Required plugins -->
- <requires>
- <import plugin="org.eclipse.ui.ide"/>
- <import plugin="org.eclipse.ui.views"/>
- <import plugin="org.eclipse.jface.text"/>
- <import plugin="org.eclipse.ui.workbench.texteditor"/>
- <import plugin="org.eclipse.ui.editors"/>
- <import plugin="org.eclipse.core.runtime"/>
- <import plugin="org.eclipse.ui"/>
- <import plugin="org.eclipse.swt"/>
- <import plugin="org.eclipse.swt.examples"/>
- </requires>
-
-
-<!-- Extension points -->
-<!-- Extensions -->
- <extension
- point="org.eclipse.ui.views">
- <view
- name="%view.ControlsExample.name"
- icon="icons/controls_example.gif"
- category="org.eclipse.swt.examples.category"
- class="org.eclipse.swt.examples.controls.ControlView"
- id="org.eclipse.swt.examples.controls.view">
- </view>
- <view
- name="%view.CustomControlsExample.name"
- icon="icons/controls_example.gif"
- category="org.eclipse.swt.examples.category"
- class="org.eclipse.swt.examples.controls.CustomControlView"
- id="org.eclipse.swt.examples.customcontrols.view">
- </view>
- </extension>
- <extension
- point="org.eclipse.swt.examples.launcher.launchItems">
- <category
- name="%launchcategory.SWTViewExamples.name"
- description="%launchcategory.SWTViewExamples.description"
- id="org.eclipse.swt.examples.launchViewCategory">
- </category>
- <item
- name="%launchitem.ControlsExample.name"
- icon="icons/controls_example.gif"
- description="%launchitem.ControlsExample.description"
- category="org.eclipse.swt.examples.launchViewCategory"
- id="org.eclipse.swt.examples.controls.viewlauncher">
- <view
- viewId="org.eclipse.swt.examples.controls.view">
- </view>
- </item>
- <item
- name="%launchitem.CustomControlsExample.name"
- icon="icons/controls_example.gif"
- description="%launchitem.CustomControlsExample.description"
- category="org.eclipse.swt.examples.launchViewCategory"
- id="org.eclipse.swt.examples.customcontrols.viewlauncher">
- <view
- viewId="org.eclipse.swt.examples.customcontrols.view">
- </view>
- </item>
- </extension>
-
-</plugin>
diff --git a/examples/org.eclipse.swt.examples.controls/src/import.properties b/examples/org.eclipse.swt.examples.controls/src/import.properties
deleted file mode 100644
index 58344f0d3e..0000000000
--- a/examples/org.eclipse.swt.examples.controls/src/import.properties
+++ /dev/null
@@ -1,14 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2003 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Common Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/cpl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-# Persist project settings for later import
-natures = org.eclipse.jdt.core.javanature; org.eclipse.pde.PluginNature
-builders = org.eclipse.jdt.core.javabuilder; org.eclipse.pde.ManifestBuilder; org.eclipse.pde.SchemaBuilder
-var.ECLIPSE_PLUGINS = <<ECLIPSE_PLUGINS>>
diff --git a/examples/org.eclipse.swt.examples.controls/src/org/eclipse/swt/examples/controls/ControlPlugin.java b/examples/org.eclipse.swt.examples.controls/src/org/eclipse/swt/examples/controls/ControlPlugin.java
deleted file mode 100755
index d0a2a3a583..0000000000
--- a/examples/org.eclipse.swt.examples.controls/src/org/eclipse/swt/examples/controls/ControlPlugin.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.controls;
-
-
-import org.eclipse.ui.plugin.*;
-
-/**
- * The main plugin class to be used in the desktop.
- */
-public class ControlPlugin extends AbstractUIPlugin {
- /**
- * The constructor.
- */
- public ControlPlugin() {
- super();
- }
-}
diff --git a/examples/org.eclipse.swt.examples.controls/src/org/eclipse/swt/examples/controls/ControlView.java b/examples/org.eclipse.swt.examples.controls/src/org/eclipse/swt/examples/controls/ControlView.java
deleted file mode 100755
index 502464174f..0000000000
--- a/examples/org.eclipse.swt.examples.controls/src/org/eclipse/swt/examples/controls/ControlView.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.controls;
-
-
-import org.eclipse.swt.examples.controlexample.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.part.*;
-
-/**
- * <code>Controls</code> is a simple demonstration
- * of the native controls defined by SWT. It consists of a workbench
- * view and tab folder where each tab in the folder allows the
- * user to interact with a control.
- *
- * @see ViewPart
- */
-public class ControlView extends ViewPart {
- ControlExample instance = null;
-
- /**
- * Create the example
- *
- * @see ViewPart#createPartControl
- */
- public void createPartControl(Composite frame) {
- instance = new ControlExample(frame);
- }
-
- /**
- * Called when we must grab focus.
- *
- * @see org.eclipse.ui.part.ViewPart#setFocus
- */
- public void setFocus() {
- instance.setFocus();
- }
-
- /**
- * Called when the View is to be disposed
- */
- public void dispose() {
- instance.dispose();
- instance = null;
- super.dispose();
- }
-}
diff --git a/examples/org.eclipse.swt.examples.controls/src/org/eclipse/swt/examples/controls/CustomControlView.java b/examples/org.eclipse.swt.examples.controls/src/org/eclipse/swt/examples/controls/CustomControlView.java
deleted file mode 100644
index ec66fd4686..0000000000
--- a/examples/org.eclipse.swt.examples.controls/src/org/eclipse/swt/examples/controls/CustomControlView.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.controls;
-
-
-import org.eclipse.swt.examples.controlexample.*;
-import org.eclipse.swt.widgets.*;
-
-/**
- * <code>CustomControls</code> is a simple demonstration
- * of the custom controls defined by SWT. It consists of a workbench
- * view and tab folder where each tab in the folder allows the
- * user to interact with a control.
- *
- * @see ViewPart
- */
-public class CustomControlView extends ControlView {
-
- /**
- * Create the example
- *
- * @see ViewPart#createPartControl
- */
- public void createPartControl(Composite frame) {
- instance = new CustomControlExample(frame);
- }
-}
diff --git a/examples/org.eclipse.swt.examples.launcher/.classpath b/examples/org.eclipse.swt.examples.launcher/.classpath
deleted file mode 100755
index 065ac06e19..0000000000
--- a/examples/org.eclipse.swt.examples.launcher/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/examples/org.eclipse.swt.examples.launcher/.cvsignore b/examples/org.eclipse.swt.examples.launcher/.cvsignore
deleted file mode 100755
index c5e82d7458..0000000000
--- a/examples/org.eclipse.swt.examples.launcher/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin \ No newline at end of file
diff --git a/examples/org.eclipse.swt.examples.launcher/.project b/examples/org.eclipse.swt.examples.launcher/.project
deleted file mode 100644
index 08cc7ff241..0000000000
--- a/examples/org.eclipse.swt.examples.launcher/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.swt.examples.launcher</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.PluginNature</nature>
- </natures>
-</projectDescription>
diff --git a/examples/org.eclipse.swt.examples.launcher/about.html b/examples/org.eclipse.swt.examples.launcher/about.html
deleted file mode 100644
index 9db411aab9..0000000000
--- a/examples/org.eclipse.swt.examples.launcher/about.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<title>About</title>
-<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>20th June, 2002</p>
-<h3>License</h3>
-<p>Eclipse.org makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise indicated below, the Content is provided to you under the terms and conditions of the
-Common Public License Version 1.0 (&quot;CPL&quot;). A copy of the CPL is available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>.
-For purposes of the CPL, &quot;Program&quot; will mean the Content.</p>
-
-<h3>Contributions</h3>
-
-<p>If this Content is licensed to you under the terms and conditions of the CPL, any Contributions, as defined in the CPL, uploaded, submitted, or otherwise
-made available to Eclipse.org, members of Eclipse.org and/or the host of Eclipse.org web site, by you that relate to such
-Content are provided under the terms and conditions of the CPL and can be made available to others under the terms of the CPL.</p>
-
-<p>If this Content is licensed to you under license terms and conditions other than the CPL (&quot;Other License&quot;), any modifications, enhancements and/or
-other code and/or documentation (&quot;Modifications&quot;) uploaded, submitted, or otherwise made available to Eclipse.org, members of Eclipse.org and/or the
-host of Eclipse.org, by you that relate to such Content are provided under terms and conditions of the Other License and can be made available
-to others under the terms of the Other License. In addition, with regard to Modifications for which you are the copyright holder, you are also
-providing the Modifications under the terms and conditions of the CPL and such Modifications can be made available to others under the terms of
-the CPL.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/examples/org.eclipse.swt.examples.launcher/build.properties b/examples/org.eclipse.swt.examples.launcher/build.properties
deleted file mode 100755
index 2ca3829db3..0000000000
--- a/examples/org.eclipse.swt.examples.launcher/build.properties
+++ /dev/null
@@ -1,22 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2003 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Common Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/cpl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-bin.includes = doc/,\
- doc-html/,\
- icons/,\
- schema/,\
- plugin.properties,\
- plugin.xml,\
- about.html,\
- *.jar
-
-src.includes = about.html
-
-source.launcher.jar = src/
diff --git a/examples/org.eclipse.swt.examples.launcher/doc-html/hglegal.htm b/examples/org.eclipse.swt.examples.launcher/doc-html/hglegal.htm
deleted file mode 100755
index 621115699c..0000000000
--- a/examples/org.eclipse.swt.examples.launcher/doc-html/hglegal.htm
+++ /dev/null
@@ -1,14 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <LINK REL="stylesheet" HREF="../../../book.css" CHARSET="ISO-8859-1" TYPE="text/css">
- <title>Legal Notices</title>
-</head>
-<body>
-
-<h3>
-<a NAME="Notices"></a>Notices</h3>
-(c) Copyright (c) 2000, 2004 IBM Corporation and others. All Rights Reserved.
-</body>
-</html>
diff --git a/examples/org.eclipse.swt.examples.launcher/doc-html/ngibmcpy.gif b/examples/org.eclipse.swt.examples.launcher/doc-html/ngibmcpy.gif
deleted file mode 100755
index c786e43e1f..0000000000
--- a/examples/org.eclipse.swt.examples.launcher/doc-html/ngibmcpy.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples.launcher/doc-html/swt_launcher_ex.html b/examples/org.eclipse.swt.examples.launcher/doc-html/swt_launcher_ex.html
deleted file mode 100755
index eaa0c22cc6..0000000000
--- a/examples/org.eclipse.swt.examples.launcher/doc-html/swt_launcher_ex.html
+++ /dev/null
@@ -1,44 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <title>SWT - Example Launcher</title>
-</head>
-<body>
-
-<h2>SWT Example Launcher</h2>
-
-<p>
-The Example Launcher is used to launch SWT examples, which can either be Workbench views
-or standalone applications.
-</p>
-
-<ul>
-<li>Workbench views are examples that are integrated into Eclipse. When the launcher
-starts a Workbench view, it is opened in the currently active perspective.
-<li>Standalone applications are launched in a separate window.
-</ul>
-
-<p>
-For information on how to run the standalone examples without the SWT Example Launcher,
-refer to <a href="../../org.eclipse.swt.examples/doc-html/swt_manual_setup.html">SWT standalone examples setup</a>.
-</p>
-<p>
-The SWT Workbench view examples can also be launched directly without using the SWT Example
-Launcher. SWT Workbench view examples can be found under the <strong>SWT Examples</strong> category of the
-<strong>Show Views</strong> dialog.
-</p>
-
-<h3>Running the Example Launcher</h3>
-
-<p>
-From Eclipse's <strong>Window</strong> menu, select <strong>Show View &gt; Other</strong>.
-In the <strong>Show View</strong> dialog, expand <strong>SWT Examples</strong> and select the <strong>SWT Example Launcher</strong> view.
-A view containing a list of examples will appear in your current perspective.
-When you select an example from the list a brief description of the example is displayed.
-Click on the <strong>Run</strong> button to launch the example.
-</p>
-
-<p><a href="hglegal.htm"><img SRC="ngibmcpy.gif" ALT="Copyright IBM Corporation and others 2000, 2004. All Rights Reserved." BORDER=0 height=14 width=324></a></p>
-</body>
-</html>
diff --git a/examples/org.eclipse.swt.examples.launcher/doc/org.eclipse.swt.examples.launcher.launchItems.html b/examples/org.eclipse.swt.examples.launcher/doc/org.eclipse.swt.examples.launcher.launchItems.html
deleted file mode 100755
index 3edf91876a..0000000000
--- a/examples/org.eclipse.swt.examples.launcher/doc/org.eclipse.swt.examples.launcher.launchItems.html
+++ /dev/null
@@ -1,60 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<HEAD>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-</HEAD>
-<HTML>
-<BODY>
-<H1><CENTER>Launch Items</CENTER></H1>
-<H2>Identifier</H2>
-org.eclipse.swt.examples.launcher.launchItems<H2>Description</H2>
-This extension point is used to add 'standalone program' and
-'Workbench view'
-launch items to the Launcher, optionally grouping them into
-categories so as to form a multi-tiered hierarchy.
-Standalone programs are executed using the platform's event loop.
-Workbench views are created within the active Workbench Perspective.<H2>Markup</H2>
-<p><samp>&nbsp;&nbsp; &lt;!ELEMENT extension EMPTY&gt;</samp>
-<br><samp>&nbsp;&nbsp; &lt;!ATTLIST extension</samp>
-<br><samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;point&nbsp;CDATA #REQUIRED</samp>
-<br><samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;id&nbsp;&nbsp;&nbsp;&nbsp;CDATA #IMPLIED</samp>
-<br><samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;name&nbsp;&nbsp;CDATA #IMPLIED</samp>
-<br><samp>&nbsp;&nbsp; &gt;</samp>
-<ul>
-<li><b>point</b> - </li><li><b>id</b> - </li><li><b>name</b> - </li></ul>
-<p><samp>&nbsp;&nbsp; &lt;!ELEMENT program EMPTY&gt;</samp>
-<br><samp>&nbsp;&nbsp; &lt;!ATTLIST program</samp>
-<br><samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mainClass&nbsp;CDATA #REQUIRED</samp>
-<br><samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pluginId&nbsp;&nbsp;CDATA #REQUIRED</samp>
-<br><samp>&nbsp;&nbsp; &gt;</samp>
-<ul>
-<li><b>mainClass</b> - The fully-qualified name of the class whose main() method is to be launched.</li><li><b>pluginId</b> - The unique id of the Eclipse Platform plugin containing the program.</li></ul>
-<p><samp>&nbsp;&nbsp; &lt;!ELEMENT view EMPTY&gt;</samp>
-<br><samp>&nbsp;&nbsp; &lt;!ATTLIST view</samp>
-<br><samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;viewId&nbsp;CDATA #REQUIRED</samp>
-<br><samp>&nbsp;&nbsp; &gt;</samp>
-<ul>
-<li><b>viewId</b> - The unique id of the Workbench View to be activated when the item is launched.</li></ul>
-<p><samp>&nbsp;&nbsp; &lt;!ELEMENT category EMPTY&gt;</samp>
-<br><samp>&nbsp;&nbsp; &lt;!ATTLIST category</samp>
-<br><samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CDATA #REQUIRED</samp>
-<br><samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;id&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CDATA #REQUIRED</samp>
-<br><samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;category&nbsp;CDATA #IMPLIED</samp>
-<br><samp>&nbsp;&nbsp; &gt;</samp>
-<ul>
-<li><b>name</b> - The localized name of this category.</li><li><b>id</b> - The unique id of this category. Categories with duplicate id's will be discarded.</li><li><b>category</b> - The unique id of the parent category.</li></ul>
-<p><samp>&nbsp;&nbsp; &lt;!ELEMENT item EMPTY&gt;</samp>
-<br><samp>&nbsp;&nbsp; &lt;!ATTLIST item</samp>
-<br><samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CDATA #REQUIRED</samp>
-<br><samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;id&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CDATA #REQUIRED</samp>
-<br><samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;category&nbsp;&nbsp;&nbsp;&nbsp;CDATA #IMPLIED</samp>
-<br><samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;icon&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CDATA #IMPLIED</samp>
-<br><samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;enabled&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(true | false) "false""true"</samp>
-<br><samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;description&nbsp;CDATA #IMPLIED</samp>
-<br><samp>&nbsp;&nbsp; &gt;</samp>
-<ul>
-<li><b>name</b> - The localized name of this launch item.</li><li><b>id</b> - The unique id of this launch item. Launch items with duplicate id's will be discarded.</li><li><b>category</b> - The unique id of the category this launch item belongs to.</li><li><b>icon</b> - The declaring plugin relative path of an icon to display with this launch item in the Launcher.</li><li><b>enabled</b> - Set to "false" to disable this launch item, or to "true" to enable it (default).</li><li><b>description</b> - The localized plain-text description of this launch item.</li></ul>
-<H2>Example</H2>
-<H2>API Information</H2>
-<H2>Supplied Implementation</H2>
-</BODY>
-</HTML>
diff --git a/examples/org.eclipse.swt.examples.launcher/icons/closedFolder.gif b/examples/org.eclipse.swt.examples.launcher/icons/closedFolder.gif
deleted file mode 100755
index beb6ed134c..0000000000
--- a/examples/org.eclipse.swt.examples.launcher/icons/closedFolder.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples.launcher/icons/generic_example.gif b/examples/org.eclipse.swt.examples.launcher/icons/generic_example.gif
deleted file mode 100755
index f9fb6b0cab..0000000000
--- a/examples/org.eclipse.swt.examples.launcher/icons/generic_example.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples.launcher/icons/launcher_example.gif b/examples/org.eclipse.swt.examples.launcher/icons/launcher_example.gif
deleted file mode 100755
index 3ab4d32c05..0000000000
--- a/examples/org.eclipse.swt.examples.launcher/icons/launcher_example.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples.launcher/icons/openFolder.gif b/examples/org.eclipse.swt.examples.launcher/icons/openFolder.gif
deleted file mode 100755
index a9c777343c..0000000000
--- a/examples/org.eclipse.swt.examples.launcher/icons/openFolder.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples.launcher/plugin.properties b/examples/org.eclipse.swt.examples.launcher/plugin.properties
deleted file mode 100755
index 7b0f95c5de..0000000000
--- a/examples/org.eclipse.swt.examples.launcher/plugin.properties
+++ /dev/null
@@ -1,49 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2003 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Common Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/cpl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-providerName = Eclipse.org
-plugin.SWTLauncherExample.name = SWT Launcher Example Plugin
-category.SWTExamples.name = SWT Examples
-view.LauncherExample.name = SWT Example Launcher
-
-extension-point.launchItems.name = Launch Items
-
-launchcategory.SWTViewExamples.name = Workbench Views
-launchcategory.SWTViewExamples.description = \
- A collection of Standard Widget Toolkit examples that run as Views inside the Workbench. \
- These examples will create a new View in the current Perspective.
-
-launchitem.LauncherExample.name = Launcher
-launchitem.LauncherExample.description = \
- The Example Launcher is used to launch SWT examples which can either be \
- Workbench Views, or Standalone applications.\n\n\
- Workbench Views are examples that are integrated into Eclipse. When the Launcher \
- starts a Workbench View, it is opened in the currently active perspective.\n\n\
- Standalone applications are launched in a separate window.
-
-error.CouldNotLoadResources = Unable to load resources
-error.CouldNotFindRegisteredExtensions = Could Not Find Registered Extensions
-error.IncompleteProgramLaunchItem = Incomplete XML ProgramLaunchItem definition, id = {0}
-error.IncompleteViewLaunchItem = Incomplete XML ViewLaunchItem definition, id = {0}
-error.IncompleteLaunchItem = Incomplete or unrecognized XML LaunchItem definition, id = {0}
-
-launchitem.Null.description = <<no item selected>>
-
-launchitem.Missing.name = <<unnamed>>
-launchitem.Missing.description = <<no description available>>
-
-view.launchGroup.text = Examples
-view.launchButton.text = Run
-view.descriptionGroup.text = Description
-
-run.error.Invocation = A fatal error occurred while launching the program.
-run.error.DoesNotImplementMethod = The class does not implement the open() method.
-run.error.CouldNotFindClass = Could not find the class to run.
-run.error.CouldNotInstantiateClass = Could not instantiate the class to run.
diff --git a/examples/org.eclipse.swt.examples.launcher/plugin.xml b/examples/org.eclipse.swt.examples.launcher/plugin.xml
deleted file mode 100755
index 9cb2d6fea3..0000000000
--- a/examples/org.eclipse.swt.examples.launcher/plugin.xml
+++ /dev/null
@@ -1,80 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<plugin
- id="org.eclipse.swt.examples.launcher"
- name="%plugin.SWTLauncherExample.name"
- version="3.1.0"
- provider-name="%providerName"
- class="org.eclipse.swt.examples.launcher.LauncherPlugin">
-
-<!-- Runtime -->
-<!-- Runtime -->
-<!-- Runtime -->
-<!-- Runtime -->
- <runtime>
- <library name="launcher.jar">
- <packages prefixes="org.eclipse.swt.examples.launcher"/>
- </library>
- </runtime>
-<!-- Required plugins -->
- <requires>
- <import plugin="org.eclipse.ui.ide"/>
- <import plugin="org.eclipse.ui.views"/>
- <import plugin="org.eclipse.jface.text"/>
- <import plugin="org.eclipse.ui.workbench.texteditor"/>
- <import plugin="org.eclipse.ui.editors"/>
- <import plugin="org.eclipse.core.runtime"/>
- <import plugin="org.eclipse.core.resources"/>
- <import plugin="org.eclipse.ui"/>
- <import plugin="org.eclipse.swt"/>
- <import plugin="org.eclipse.jdt.launching"/>
- <import plugin="org.eclipse.debug.core"/>
- <import plugin="org.eclipse.core.boot"/>
- <import plugin="org.eclipse.jdt.core"/>
- <import plugin="org.eclipse.swt.examples"/>
- </requires>
-
-
-<!-- Extension points -->
- <extension-point id="launchItems" name="%extension-point.launchItems.name" schema="schema/org.eclipse.swt.examples.launcher.launchItems.exsd"/>
-
-<!-- Extensions -->
- <extension
- id="application"
- point="org.eclipse.core.runtime.applications">
- </extension>
- <extension
- point="org.eclipse.ui.views">
- <category
- name="%category.SWTExamples.name"
- id="org.eclipse.swt.examples.category">
- </category>
- <view
- name="%view.LauncherExample.name"
- icon="icons/launcher_example.gif"
- category="org.eclipse.swt.examples.category"
- class="org.eclipse.swt.examples.launcher.LauncherView"
- id="org.eclipse.swt.examples.launcher.view">
- </view>
- </extension>
- <extension
- point="org.eclipse.swt.examples.launcher.launchItems">
- <category
- name="%launchcategory.SWTViewExamples.name"
- description="%launchcategory.SWTViewExamples.description"
- id="org.eclipse.swt.examples.launchViewCategory">
- </category>
- <item
- name="%launchitem.LauncherExample.name"
- enabled="false"
- icon="icons/launcher_example.gif"
- description="%launchitem.LauncherExample.description"
- category="org.eclipse.swt.examples.launchViewCategory"
- id="org.eclipse.swt.examples.launcher.viewlauncher">
- <view
- viewId="org.eclipse.swt.examples.launcher.view">
- </view>
- </item>
- </extension>
-
-</plugin>
diff --git a/examples/org.eclipse.swt.examples.launcher/schema/org.eclipse.swt.examples.launcher.launchItems.exsd b/examples/org.eclipse.swt.examples.launcher/schema/org.eclipse.swt.examples.launcher.launchItems.exsd
deleted file mode 100644
index 3813c9d3fe..0000000000
--- a/examples/org.eclipse.swt.examples.launcher/schema/org.eclipse.swt.examples.launcher.launchItems.exsd
+++ /dev/null
@@ -1,210 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.swt.examples.launcher">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.swt.examples.launcher" id="launchItems" name="Launch Items"/>
- </appInfo>
- <documentation>
- This extension point is used to add &apos;standalone program&apos; and
-&apos;Workbench view&apos;
-launch items to the Launcher, optionally grouping them into
-categories so as to form a multi-tiered hierarchy.
-Standalone programs are executed using the platform&apos;s event loop.
-Workbench views are created within the active Workbench Perspective.
- </documentation>
- </annotation>
-
- <element name="extension">
- <complexType>
- <choice minOccurs="0" maxOccurs="unbounded">
- <element ref="category"/>
- <element ref="item"/>
- </choice>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="program">
- <annotation>
- <documentation>
- Specifies a &quot;Standalone Program&quot; for a launch item to run.
- </documentation>
- </annotation>
- <complexType>
- <attribute name="mainClass" type="string" use="required">
- <annotation>
- <documentation>
- The fully-qualified name of the class whose main() method is to be launched.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="pluginId" type="string" use="required">
- <annotation>
- <documentation>
- The unique id of the Eclipse Platform plugin containing the program.
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="view">
- <annotation>
- <documentation>
- Specifies a &quot;Workbench View&quot; for a launch item to activate.
- </documentation>
- </annotation>
- <complexType>
- <attribute name="viewId" type="string" use="required">
- <annotation>
- <documentation>
- The unique id of the Workbench View to be activated when the item is launched.
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="category">
- <annotation>
- <documentation>
- Specifies a launch item category heading.
- </documentation>
- </annotation>
- <complexType>
- <attribute name="name" type="string" use="required">
- <annotation>
- <documentation>
- The localized name of this category.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
- The unique id of this category. Categories with duplicate id&apos;s will be discarded.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="category" type="string">
- <annotation>
- <documentation>
- The unique id of the parent category.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="description" type="string">
- <annotation>
- <documentation>
- Specifies a launch item category description.
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="item">
- <annotation>
- <documentation>
- Specifies a launch item.
- </documentation>
- </annotation>
- <complexType>
- <choice>
- <element ref="view"/>
- <element ref="program"/>
- </choice>
- <attribute name="name" type="string" use="required">
- <annotation>
- <documentation>
- The localized name of this launch item.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
- The unique id of this launch item. Launch items with duplicate id&apos;s will be discarded.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="category" type="string">
- <annotation>
- <documentation>
- The unique id of the category this launch item belongs to.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="icon" type="string">
- <annotation>
- <documentation>
- The declaring plugin relative path of an icon to display with this launch item in the Launcher.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="enabled" type="boolean" use="default" value="true">
- <annotation>
- <documentation>
- Set to &quot;false&quot; to disable this launch item, or to &quot;true&quot; to enable it (default).
- </documentation>
- </annotation>
- </attribute>
- <attribute name="description" type="string">
- <annotation>
- <documentation>
- The localized plain-text description of this launch item.
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appInfo>
- <meta.section type="examples"/>
- </appInfo>
- <documentation>
-
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="apiInfo"/>
- </appInfo>
- <documentation>
-
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="implementation"/>
- </appInfo>
- <documentation>
-
- </documentation>
- </annotation>
-
-</schema>
diff --git a/examples/org.eclipse.swt.examples.launcher/src/import.properties b/examples/org.eclipse.swt.examples.launcher/src/import.properties
deleted file mode 100644
index 58344f0d3e..0000000000
--- a/examples/org.eclipse.swt.examples.launcher/src/import.properties
+++ /dev/null
@@ -1,14 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2003 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Common Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/cpl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-# Persist project settings for later import
-natures = org.eclipse.jdt.core.javanature; org.eclipse.pde.PluginNature
-builders = org.eclipse.jdt.core.javabuilder; org.eclipse.pde.ManifestBuilder; org.eclipse.pde.SchemaBuilder
-var.ECLIPSE_PLUGINS = <<ECLIPSE_PLUGINS>>
diff --git a/examples/org.eclipse.swt.examples.launcher/src/org/eclipse/swt/examples/launcher/ItemDescriptor.java b/examples/org.eclipse.swt.examples.launcher/src/org/eclipse/swt/examples/launcher/ItemDescriptor.java
deleted file mode 100755
index 7ec10195b8..0000000000
--- a/examples/org.eclipse.swt.examples.launcher/src/org/eclipse/swt/examples/launcher/ItemDescriptor.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.launcher;
-
-
-import org.eclipse.swt.graphics.*;
-
-/**
- * ItemDescriptor collects information about a launch item.
- */
-class ItemDescriptor {
- private String id;
- private String name;
- private String description;
- private Image icon;
- private String view;
- private String mainType;
- private String pluginId;
-
-
- /**
- * Constructs an ItemDescriptor.
- *
- * @param id the id
- * @param name the name
- * @param description the description
- * @param icon the icon
- * @param view the host view may be null if it is a standalone application
- * @param mainType the fully qualified class name to run may be null if it is a view
- * @param pluginId the name of the plugin which contains the main class
- */
- public ItemDescriptor(String id, String name, String description,
- Image icon, String view, String mainType, String pluginId) {
- this.id = id;
- this.name = name;
- this.description = description;
- this.icon = icon;
- this.view = view;
- this.mainType = mainType;
- this.pluginId = pluginId;
- }
-
- /**
- * Returns the ID for this program.
- *
- * @return the user-specified ID for this program
- */
- public String getId() {
- return id;
- }
-
- /**
- * Returns the translated name for the program.
- *
- * @return the name of the program
- */
- public String getName() {
- return name;
- }
-
- /**
- * Returns a short description for the program.
- *
- * @return a newline-delimited string describing the program, null if no description is available
- */
- public String getDescription() {
- return description;
- }
-
- /**
- * Returns an icon for this descriptor
- *
- * @returns an icon, null if the item is a folder
- */
- public Image getIcon() {
- return icon;
- }
-
- /**
- * Returns the host view for the program.
- *
- * @return the host view, null if the item is a standalone program.
- */
- public String getView () {
- return view;
- }
-
- /**
- * Returns the fully qualified class to run
- * for the program.
- *
- * @return the class to run for the program.
- */
- public String getMainType () {
- return mainType;
- }
-
- /**
- * Returns the name of the plugin that contains the program.
- *
- * @return the name of the plugin that contains the program.
- */
- public String getPluginId () {
- return pluginId;
- }
-
- /**
- * Determines if an item is a folder.
- *
- * @return true if the item is a folder
- */
- public boolean isFolder() {
- return (mainType == null && view == null);
- }
-
- /**
- * Determines the equality of descriptors.
- *
- * @return true if this.getId().equalsIgnoreCase(other.getId())
- */
- public boolean equals(Object other) {
- if (other instanceof ItemDescriptor) {
- ItemDescriptor otherDescriptor = (ItemDescriptor) other;
- return getId().equalsIgnoreCase(otherDescriptor.getId());
- }
- return false;
- }
-
- /**
- * Produces a hashcode.
- *
- * @return the hashcode
- */
- public int hashCode() {
- return id.toUpperCase().hashCode();
- }
-}
diff --git a/examples/org.eclipse.swt.examples.launcher/src/org/eclipse/swt/examples/launcher/ItemTreeNode.java b/examples/org.eclipse.swt.examples.launcher/src/org/eclipse/swt/examples/launcher/ItemTreeNode.java
deleted file mode 100755
index 6088090e96..0000000000
--- a/examples/org.eclipse.swt.examples.launcher/src/org/eclipse/swt/examples/launcher/ItemTreeNode.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.launcher;
-
-
-/**
- * Internal class used to store tree structures of ItemDescriptors
- */
-class ItemTreeNode {
- private ItemTreeNode nextSibling;
- private ItemTreeNode firstChild;
- private ItemDescriptor descriptor;
-
- /**
- * Constructs a leaf ItemTreeNode with a given descriptor.
- *
- * @param descriptor the descriptor
- */
- public ItemTreeNode(ItemDescriptor descriptor) {
- this.descriptor = descriptor;
- }
-
- /**
- * Adds a node to the Tree in sorted order by name.
- *
- * @param node the node to add. Note that node.nextSibling must be null
- */
- public void addSortedNode(ItemTreeNode node) {
- if (firstChild == null) {
- firstChild = node;
- } else if (firstChild.descriptor.getName().compareTo(node.descriptor.getName()) > 0) {
- node.nextSibling = firstChild;
- firstChild = node;
- } else {
- ItemTreeNode cursor;
- for (cursor = firstChild; cursor.nextSibling != null; cursor = cursor.nextSibling) {
- ItemTreeNode sibling = cursor.nextSibling;
- if (sibling.descriptor.getName().compareTo(node.descriptor.getName()) > 0) break;
- }
- node.nextSibling = cursor.nextSibling;
- cursor.nextSibling = node;
- }
- }
-
- /**
- * Returns the descriptor for this node.
- *
- * @return the descriptor
- */
- public ItemDescriptor getDescriptor() {
- return descriptor;
- }
-
- /**
- * Returns the next sibling of this node.
- *
- * @return the next sibling, or null if none
- */
- public ItemTreeNode getNextSibling() {
- return nextSibling;
- }
-
- /**
- * Returns the first child of this node.
- *
- * @return the first child, or null if none
- */
- public ItemTreeNode getFirstChild() {
- return firstChild;
- }
-}
diff --git a/examples/org.eclipse.swt.examples.launcher/src/org/eclipse/swt/examples/launcher/LauncherPlugin.java b/examples/org.eclipse.swt.examples.launcher/src/org/eclipse/swt/examples/launcher/LauncherPlugin.java
deleted file mode 100755
index c5e1f316b6..0000000000
--- a/examples/org.eclipse.swt.examples.launcher/src/org/eclipse/swt/examples/launcher/LauncherPlugin.java
+++ /dev/null
@@ -1,396 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.launcher;
-
-
-import java.io.*;
-import java.net.*;
-import java.text.*;
-import java.util.*;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.ui.plugin.*;
-import org.osgi.framework.*;
-
-/**
- * The main plugin class to be used in the desktop.
- */
-public class LauncherPlugin extends AbstractUIPlugin {
- //The shared instance.
- private static LauncherPlugin plugin;
- private static ResourceBundle resourceBundle;
-
- private static final String
- LAUNCH_ITEMS_POINT_ID = "org.eclipse.swt.examples.launcher.launchItems",
- LAUNCH_ITEMS_XML_CATEGORY = "category",
- LAUNCH_ITEMS_XML_ITEM = "item",
- LAUNCH_ITEMS_XML_ITEM_ICON = "icon",
- LAUNCH_ITEMS_XML_ITEM_DESCRIPTION = "description",
- LAUNCH_ITEMS_XML_PROGRAM = "program",
- LAUNCH_ITEMS_XML_PROGRAM_PLUGIN = "pluginId",
- LAUNCH_ITEMS_XML_PROGRAM_CLASS = "mainClass",
- LAUNCH_ITEMS_XML_VIEW = "view",
- LAUNCH_ITEMS_XML_VIEW_VIEWID = "viewId",
- LAUNCH_ITEMS_XML_ATTRIB_ID = "id",
- LAUNCH_ITEMS_XML_ATTRIB_NAME = "name",
- LAUNCH_ITEMS_XML_ATTRIB_ENABLED = "enabled",
- LAUNCH_ITEMS_XML_ATTRIB_CATEGORY = "category",
- LAUNCH_ITEMS_XML_VALUE_TRUE = "true",
- LAUNCH_ITEMS_XML_VALUE_FALSE = "false";
-
- static final int
- liClosedFolder = 0,
- liOpenFolder = 1,
- liGenericExample = 2;
- static final String[] imageLocations = {
- "icons/closedFolder.gif",
- "icons/openFolder.gif",
- "icons/generic_example.gif" };
- static Image images[];
-
- /**
- * Constructs the LauncherPlugin.
- */
- public LauncherPlugin() {
- super();
- plugin = this;
- }
-
- public void start(BundleContext context) throws Exception {
- super.start(context);
- resourceBundle = Platform.getResourceBundle(getBundle());
- }
-
- /**
- * Clean up
- */
- public void stop(BundleContext context) throws Exception {
- freeResources();
- super.stop(context);
- }
-
- /**
- * Returns the shared instance.
- */
- public static LauncherPlugin getDefault() {
- return plugin;
- }
-
- /**
- * Loads the resources
- */
- public static void initResources() {
- if (images == null) {
- images = new Image[imageLocations.length];
-
- for (int i = 0; i < imageLocations.length; ++i) {
- images[i] = getImageFromPlugin(plugin.getBundle(), imageLocations[i]);
- if (images[i] == null) {
- freeResources();
- logError(getResourceString("error.CouldNotLoadResources"), null);
- throw new IllegalStateException();
- }
- }
- }
- }
-
- /**
- * Frees the resources
- */
- public static void freeResources() {
- if (images != null) {
- for (int i = 0; i < images.length; ++i) {
- final Image image = images[i];
- if (image != null) image.dispose();
- }
- images = null;
- }
- }
-
- /**
- * Log an error to the ILog for this plugin
- *
- * @param message the localized error message text
- * @param exception the associated exception, or null
- */
- public static void logError(String message, Throwable exception) {
- plugin.getLog().log(new Status(
- IStatus.ERROR, plugin.getBundle().getSymbolicName(), 0, message, exception));
- }
-
- /**
- * Returns a string from the resource bundle.
- * We don't want to crash because of a missing String.
- * Returns the key if not found.
- */
- public static String getResourceString(String key) {
- try {
- return resourceBundle.getString(key);
- } catch (MissingResourceException e) {
- return key;
- } catch (NullPointerException e) {
- return "!" + key + "!";
- }
- }
-
- /**
- * Returns a string from the resource bundle and binds it
- * with the given arguments. If the key is not found,
- * return the key.
- */
- public static String getResourceString(String key, Object[] args) {
- try {
- return MessageFormat.format(getResourceString(key), args);
- } catch (MissingResourceException e) {
- return key;
- } catch (NullPointerException e) {
- return "!" + key + "!";
- }
- }
-
- /**
- * Constructs a list of available programs from registered extensions.
- *
- * @return an ItemTreeNode representing the root of a tree of items (the root is not to be displayed)
- */
- public static ItemTreeNode getLaunchItemTree() {
- ItemTreeNode categoryTree =
- new ItemTreeNode(new ItemDescriptor("<<Root>>", "<<Root>>", null, null, null, null, null));
-
- // get the platform's public plugin registry
- IExtensionRegistry extensionRegistry = Platform.getExtensionRegistry();
- // retrieve all configuration elements registered at our launchItems extension-point
- IConfigurationElement[] configurationElements =
- extensionRegistry.getConfigurationElementsFor(LAUNCH_ITEMS_POINT_ID);
-
- if (configurationElements == null || configurationElements.length == 0) {
- logError(getResourceString("error.CouldNotFindRegisteredExtensions"), null);
- return categoryTree;
- }
-
- /* Collect all launch categories -- coalesce those with same ID */
- HashMap idMap = new HashMap();
- for (int i = 0; i < configurationElements.length; ++i) {
- final IConfigurationElement ce = configurationElements[i];
- final String ceName = ce.getName();
- final String attribId = getItemAttribute(ce, LAUNCH_ITEMS_XML_ATTRIB_ID, null);
-
- if (idMap.containsKey(attribId)) continue;
- if (ceName.equalsIgnoreCase(LAUNCH_ITEMS_XML_CATEGORY)) {
- final String attribName = getItemName(ce);
- ItemDescriptor theDescriptor = new ItemDescriptor(attribId, attribName,
- getItemDescription(ce), null, null, null, null);
- idMap.put(attribId, new ItemTreeNode(theDescriptor));
- }
- }
-
- /* Generate launch category hierarchy */
- Set tempIdSet = new HashSet(); // used to prevent duplicates from being entered into the tree
- for (int i = 0; i < configurationElements.length; ++i) {
- final IConfigurationElement ce = configurationElements[i];
- final String ceName = ce.getName();
- final String attribId = getItemAttribute(ce, LAUNCH_ITEMS_XML_ATTRIB_ID, null);
-
- if (tempIdSet.contains(attribId)) continue;
- if (ceName.equalsIgnoreCase(LAUNCH_ITEMS_XML_CATEGORY)) {
- final ItemTreeNode theNode = (ItemTreeNode) idMap.get(attribId);
- addItemByCategory(ce, categoryTree, theNode, idMap);
- tempIdSet.add(attribId);
- }
- }
-
- /* Generate program tree */
- for (int i = 0; i < configurationElements.length; ++i) {
- final IConfigurationElement ce = configurationElements[i];
- final String ceName = ce.getName();
- final String attribId = getItemAttribute(ce, LAUNCH_ITEMS_XML_ATTRIB_ID, null);
-
- if (idMap.containsKey(attribId)) continue;
- if (ceName.equalsIgnoreCase(LAUNCH_ITEMS_XML_CATEGORY)) {
- // ignore
- } else if (ceName.equalsIgnoreCase(LAUNCH_ITEMS_XML_ITEM)) {
- final String enabled = getItemAttribute(ce, LAUNCH_ITEMS_XML_ATTRIB_ENABLED,
- LAUNCH_ITEMS_XML_VALUE_TRUE);
- if (enabled.equalsIgnoreCase(LAUNCH_ITEMS_XML_VALUE_FALSE)) continue;
- ItemDescriptor theDescriptor = createItemDescriptor(ce, attribId);
-
- if (theDescriptor != null) {
- final ItemTreeNode theNode = new ItemTreeNode(theDescriptor);
- addItemByCategory(ce, categoryTree, theNode, idMap);
- idMap.put(attribId, theNode);
- }
- }
- }
- return categoryTree;
- }
-
-
- /**
- * Adds an item to the category tree.
- */
- private static void addItemByCategory(IConfigurationElement ce, ItemTreeNode root,
- ItemTreeNode theNode, HashMap idMap) {
- final String attribCategory = getItemAttribute(ce, LAUNCH_ITEMS_XML_ATTRIB_CATEGORY, null);
-
- // locate the parent node
- ItemTreeNode parentNode = null;
- if (attribCategory != null) {
- parentNode = (ItemTreeNode) idMap.get(attribCategory);
- }
- if (parentNode == null) parentNode = root;
-
- // add the item
- parentNode.addSortedNode(theNode);
- }
-
- /**
- * Creates an ItemDescriptor from an XML definition.
- *
- * @param ce the IConfigurationElement describing the item
- * @param attribId the attribute id
- * @return a new ItemDescriptor, or null if an error occurs
- */
- private static ItemDescriptor createItemDescriptor(IConfigurationElement ce, String attribId) {
- final String attribName = getItemName(ce);
- final Image attribIcon = getItemIcon(ce);
- final String attribDescription = getItemDescription(ce);
-
- IConfigurationElement viewCE = getItemElement(ce, LAUNCH_ITEMS_XML_VIEW);
- if (viewCE != null) {
- //Item is a view
- final String attribView = getItemAttribute(viewCE, LAUNCH_ITEMS_XML_VIEW_VIEWID, null);
- if (attribView == null) {
- logError(getResourceString("error.IncompleteViewLaunchItem",
- new Object[] { attribId } ), null);
- return null;
- }
- return new ItemDescriptor(attribId, attribName, attribDescription,
- attribIcon, attribView, null, null);
- } else {
- //Item is a standalone
- IConfigurationElement programCE = getItemElement(ce, LAUNCH_ITEMS_XML_PROGRAM);
- if (programCE != null) {
- final String attribPluginId = getItemAttribute(programCE, LAUNCH_ITEMS_XML_PROGRAM_PLUGIN, null);
- final String attribClass = getItemAttribute(programCE, LAUNCH_ITEMS_XML_PROGRAM_CLASS, null);
- if (attribClass == null || attribPluginId == null) {
- logError(getResourceString("error.IncompleteProgramLaunchItem",
- new Object[] { attribId } ), null);
- return null;
- }
- return new ItemDescriptor(attribId, attribName, attribDescription,
- attribIcon, null, attribClass, attribPluginId);
- } else {
- logError(getResourceString("error.IncompleteLaunchItem",
- new Object[] { attribId } ), null);
- return null;
- }
- }
- }
-
- /**
- * Returns the first instance of a particular child XML element.
- *
- * @param ce the IConfigurationElement parent
- * @param element the name of the element to fetch
- * @return the element's IConfigurationElement, or null if not found
- */
- private static IConfigurationElement getItemElement(IConfigurationElement ce, String element) {
- IConfigurationElement[] elementCEs = ce.getChildren(element);
- return (elementCEs != null && elementCEs.length != 0) ? elementCEs[0] : null;
- }
-
- /**
- * Returns the value of an XML attribute for an item.
- *
- * @param ce the IConfigurationElement describing the item
- * @param attribute the attribute to fetch
- * @param defaultValue the value to return if the attribute is not found
- * @return the attribute value
- */
- private static String getItemAttribute(IConfigurationElement ce, String attribute, String defaultValue) {
- String value = ce.getAttribute(attribute);
- return (value != null) ? value : defaultValue;
- }
-
- /**
- * Returns the description string given the IConfigurationElement for an item.
- *
- * @param ce the IConfigurationElement describing the item
- * @return a newline-delimited string that describes this item, or null if none
- */
- private static String getItemDescription(IConfigurationElement ce) {
- String description = getItemAttribute(ce, LAUNCH_ITEMS_XML_ITEM_DESCRIPTION, "");
- return (description.length() == 0) ? null : description;
- }
-
- /**
- * Returns the name of an item.
- *
- * @param ce the IConfigurationElement describing the item
- * @return the attribute value
- */
- private static String getItemName(IConfigurationElement ce) {
- return getItemAttribute(ce, LAUNCH_ITEMS_XML_ATTRIB_NAME,
- getResourceString("launchitem.Missing.name"));
- }
-
-
- /**
- * Returns the icon for an item.
- *
- * @param ce the IConfigurationElement describing the item
- * @return an icon
- */
- private static Image getItemIcon(IConfigurationElement ce) {
- String iconPath = getItemAttribute(ce, LAUNCH_ITEMS_XML_ITEM_ICON, "");
- if (iconPath.length() != 0) {
- String symbolicName = ce.getDeclaringExtension().getNamespace();
- Bundle bundle = Platform.getBundle(symbolicName);
- Image icon = getImageFromPlugin(bundle, iconPath);
- if (icon != null) {
- Image[] newImages = new Image[images.length + 1];
- System.arraycopy(images, 0, newImages, 0, images.length);
- newImages[images.length] = icon;
- images = newImages;
- return icon;
- }
- }
- return images[liGenericExample];
- }
-
- /**
- * Gets an image from a path relative to the plugin install directory.
- *
- * @param bundle the plugin descriptor for the plugin with the image
- * @param iconPath the path relative to the install directory
- * @return the image, or null if not found
- */
- private static Image getImageFromPlugin(Bundle bundle, String iconPath) {
- InputStream is = null;
- try {
- URL installUrl = bundle.getEntry("/");
- URL url = new URL(installUrl, iconPath);
- is = url.openConnection().getInputStream();
- ImageData source = new ImageData(is);
- ImageData mask = source.getTransparencyMask();
- Image image = new Image(null, source, mask);
- return image;
- } catch (Throwable ex) {
- return null;
- } finally {
- try {
- if (is != null) is.close();
- } catch (IOException e) {
- }
- }
- }
-}
diff --git a/examples/org.eclipse.swt.examples.launcher/src/org/eclipse/swt/examples/launcher/LauncherView.java b/examples/org.eclipse.swt.examples.launcher/src/org/eclipse/swt/examples/launcher/LauncherView.java
deleted file mode 100755
index 663dfd6415..0000000000
--- a/examples/org.eclipse.swt.examples.launcher/src/org/eclipse/swt/examples/launcher/LauncherView.java
+++ /dev/null
@@ -1,233 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.launcher;
-
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.*;
-import org.eclipse.ui.part.*;
-import java.lang.reflect.*;
-
-/**
- * Launcher uses <code>org.eclipse.swt</code>
- * to launch the other registered examples.
- *
- * @see ViewPart
- */
-public class LauncherView extends ViewPart {
- private Shell workbenchShell;
-
- private Tree launchTree;
- private Text descriptionText;
- private Button runButton;
-
- /**
- * Constructs a LauncherView.
- */
- public LauncherView() {
- LauncherPlugin.initResources();
- }
-
- /**
- * Creates the example.
- *
- * @see ViewPart#createPartControl
- */
- public void createPartControl(Composite parent) {
- workbenchShell = getSite().getShell();
- parent.setLayout(new SplitLayout());
-
- Group launchGroup = new Group(parent, SWT.NULL);
- launchGroup.setText(LauncherPlugin.getResourceString("view.launchGroup.text"));
-
- GridLayout gridLayout = new GridLayout();
- gridLayout.numColumns = 2;
- launchGroup.setLayout(gridLayout);
-
- launchTree = new Tree(launchGroup, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);
- GridData gridData = new GridData(GridData.FILL_HORIZONTAL | GridData.FILL_VERTICAL);
- gridData.horizontalSpan = 2;
- launchTree.setLayoutData(gridData);
- launchTree.addSelectionListener(new SelectionListener() {
- public void widgetSelected(SelectionEvent event) {
- final ItemDescriptor item = getSelectedItem();
- setDescriptionByItem(item);
- }
- public void widgetDefaultSelected(SelectionEvent event) {
- final ItemDescriptor item = getSelectedItem();
- setDescriptionByItem(item);
- launchItem(getSelectedItem());
- }
- });
- launchTree.addTreeListener(new TreeListener() {
- public void treeCollapsed(TreeEvent event) {
- final TreeItem item = (TreeItem) event.item;
- if (item == null) return;
- item.setImage(LauncherPlugin.images[LauncherPlugin.liClosedFolder]);
- }
- public void treeExpanded(TreeEvent event) {
- final TreeItem item = (TreeItem) event.item;
- if (item == null) return;
- item.setImage(LauncherPlugin.images[LauncherPlugin.liOpenFolder]);
- }
- });
-
- runButton = new Button(launchGroup, SWT.PUSH);
- runButton.setText(LauncherPlugin.getResourceString("view.launchButton.text"));
- runButton.addSelectionListener(new SelectionListener() {
- public void widgetSelected(SelectionEvent event) {
- launchItem(getSelectedItem());
- }
- public void widgetDefaultSelected(SelectionEvent event) {
- }
- });
-
- Group descriptionGroup = new Group(parent, SWT.NULL);
- descriptionGroup.setText(LauncherPlugin.getResourceString("view.descriptionGroup.text"));
- descriptionGroup.setLayout(new FillLayout());
-
- descriptionText = new Text(descriptionGroup, SWT.MULTI | SWT.BORDER |
- SWT.WRAP | SWT.V_SCROLL | SWT.READ_ONLY);
-
- setDescriptionByItem(null);
- setItemDescriptors(LauncherPlugin.getLaunchItemTree());
- }
-
- /**
- * Called when we must grab focus.
- *
- * @see org.eclipse.ui.part.ViewPart#setFocus
- */
- public void setFocus() {
- launchTree.setFocus();
- runButton.getShell().setDefaultButton(runButton);
- }
-
- /**
- * Called when the View is to be disposed
- */
- public void dispose() {
- workbenchShell = null;
- launchTree = null;
- descriptionText = null;
- runButton = null;
- super.dispose();
- }
-
- /**
- * Installs a new launch list.
- *
- * @param newRoot the new tree of launch items for the UI
- */
- public void setItemDescriptors(final ItemTreeNode newRoot) {
- if (workbenchShell == null) return;
- workbenchShell.getDisplay().syncExec(new Runnable() {
- public void run() {
- if ((launchTree == null) || (launchTree.isDisposed())) return;
- launchTree.removeAll();
-
- for (ItemTreeNode node = newRoot.getFirstChild(); node != null;
- node = node.getNextSibling()) {
- doNode(node, new TreeItem(launchTree, SWT.NONE)); // top-level TreeItem
- }
- }
- private void addGroup(TreeItem parent, ItemTreeNode node) {
- for (;node != null; node = node.getNextSibling()) {
- doNode(node, new TreeItem(parent, SWT.NONE)); // TreeItem at depth > 0
- }
- }
- private void doNode(ItemTreeNode node, TreeItem treeItem) {
- final ItemDescriptor item = node.getDescriptor();
- treeItem.setText(item.getName());
- treeItem.setData(item);
- if (node.getDescriptor().isFolder()) {
- treeItem.setExpanded(false);
- treeItem.setImage(LauncherPlugin.images[LauncherPlugin.liClosedFolder]);
- } else {
- treeItem.setImage(node.getDescriptor().getIcon());
- }
- addGroup(treeItem, node.getFirstChild());
- }
- });
- }
-
- /**
- * Runs the specified launch item.
- *
- * @param itemDescriptor the launch item to execute
- */
- private void launchItem(ItemDescriptor itemDescriptor) {
- /* Case 1: The launch item is a view */
- String pluginViewId = itemDescriptor.getView ();
- if (pluginViewId != null) {
- final IWorkbenchPart workbenchPart = this;
- final IWorkbenchPartSite workbenchPartSite = workbenchPart.getSite();
- final IWorkbenchPage workbenchPage = workbenchPartSite.getPage();
- try {
- workbenchPage.showView(pluginViewId);
- } catch (PartInitException e) {
- LauncherPlugin.logError(LauncherPlugin.getResourceString("run.error.Invocation"), e);
- }
- return;
- }
- /* Case 2: The launch item is a standalone program */
- if (workbenchShell == null) return;
- try {
- Class cl = Class.forName(itemDescriptor.getMainType());
- Display display = workbenchShell.getDisplay();
- Object exampleInstance = cl.newInstance();
- Method openMethod = cl.getDeclaredMethod("open", new Class[] {Display.class});
- openMethod.invoke(exampleInstance, new Object[] {display});
- } catch (NoSuchMethodException e) {
- LauncherPlugin.logError(LauncherPlugin.getResourceString("run.error.DoesNotImplementMethod"), null);
- } catch (ClassNotFoundException e) {
- LauncherPlugin.logError(LauncherPlugin.getResourceString("run.error.CouldNotFindClass"), e);
- } catch (Exception e) {
- LauncherPlugin.logError(LauncherPlugin.getResourceString("run.error.CouldNotInstantiateClass"), e);
- }
- }
-
- /**
- * Obtains the selected launch item.
- *
- * @return the currently selected ItemDescriptor
- */
- private ItemDescriptor getSelectedItem() {
- final TreeItem[] selections = launchTree.getSelection();
- if (selections.length == 0) return null;
- final ItemDescriptor itemDescriptor = (ItemDescriptor) selections[0].getData();
- return itemDescriptor;
- }
-
- /**
- * Sets the currently visible description text to reflect that of a particular ItemDescriptor.
- *
- * @param itemDescriptor the launch item whose description is to be displayed, or null if none
- */
- private void setDescriptionByItem(ItemDescriptor itemDescriptor) {
- String description;
- if (itemDescriptor == null) {
- description = LauncherPlugin.getResourceString("launchitem.Null.description");
- if (runButton != null) runButton.setEnabled(false);
- } else {
- description = itemDescriptor.getDescription();
- if (description == null)
- description = LauncherPlugin.getResourceString("launchitem.Missing.description");
- if (runButton != null) {
- runButton.setEnabled(itemDescriptor.getView() != null || itemDescriptor.getMainType() != null);
- }
- }
- descriptionText.setText(description);
- }
-}
diff --git a/examples/org.eclipse.swt.examples.launcher/src/org/eclipse/swt/examples/launcher/SplitLayout.java b/examples/org.eclipse.swt.examples.launcher/src/org/eclipse/swt/examples/launcher/SplitLayout.java
deleted file mode 100755
index 47dbfddd89..0000000000
--- a/examples/org.eclipse.swt.examples.launcher/src/org/eclipse/swt/examples/launcher/SplitLayout.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.launcher;
-
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.widgets.*;
-
-/**
- * A Layout class that automatically switches from a horizontal split to a vertical
- * split layout to accomodate changing size conditions.
- *
- * Later on we might improve this class to take into account the "preferred" size of
- * the widgets.
- */
-public class SplitLayout extends Layout {
- private static final int
- splitHorizontally = 0,
- splitVertically = 1;
- private int splitDirection = splitHorizontally;
-
- public int spacing = 3;
- public int marginTop = 3;
- public int marginLeft = 3;
- public int marginRight = 3;
- public int marginBottom = 3;
-
- /**
- * Creates a new layout
- */
- public SplitLayout() {
- }
-
- /**
- * @see Layout#computeSize(Composite, int, int, boolean)
- */
- protected Point computeSize(Composite composite, int wHint, int hHint, boolean flushCache) {
- if (wHint == SWT.DEFAULT) {
- if (hHint == SWT.DEFAULT) {
- Point hSplitSize = computeHSplitSize(composite, wHint, hHint, flushCache);
- Point vSplitSize = computeVSplitSize(composite, wHint, hHint, false);
- int hSplitArea = hSplitSize.x * hSplitSize.y;
- int vSplitArea = vSplitSize.x * vSplitSize.y;
- // Choose direction consuming least area
- if (hSplitArea < vSplitArea) {
- splitDirection = splitHorizontally;
- return hSplitSize;
- } else {
- splitDirection = splitVertically;
- return vSplitSize;
- }
- } else {
- // Constrained in height: split vertically
- splitDirection = splitVertically;
- return computeVSplitSize(composite, wHint, hHint, flushCache);
- }
- } else {
- if (hHint == SWT.DEFAULT) {
- // Constrained in width: split horizontally
- splitDirection = splitHorizontally;
- return computeHSplitSize(composite, wHint, hHint, flushCache);
- } else {
- if (hHint < wHint) {
- splitDirection = splitVertically;
- return computeVSplitSize(composite, wHint, hHint, flushCache);
- } else {
- splitDirection = splitHorizontally;
- return computeHSplitSize(composite, wHint, hHint, flushCache);
- }
- }
- }
- }
- /**
- * @see Layout#layout(Composite, boolean)
- */
- protected void layout(Composite composite, boolean flushCache) {
- Rectangle clientArea = composite.getClientArea();
- computeSize(composite, clientArea.width, clientArea.height, false);
-
- Control[] children = composite.getChildren();
- clientArea.x += marginLeft;
- clientArea.y += marginTop;
- clientArea.width -= marginRight + marginLeft;
- clientArea.height -= marginBottom + marginTop;
- Point position = new Point(clientArea.x, clientArea.y);
-
- for (int i = 0; i < children.length; ++i) {
- final Control child = children[i];
- final Rectangle bounds;
- if (splitDirection == splitHorizontally) {
- int height = clientArea.height / children.length;
- bounds = new Rectangle(position.x, position.y, clientArea.width, height);
- position.y += height + spacing;
- } else {
- int width = clientArea.width / children.length;
- bounds = new Rectangle(position.x, position.y, width, clientArea.height);
- position.x += width + spacing;
- }
- bounds.width = Math.max(bounds.width, 0);
- bounds.height = Math.max(bounds.height, 0);
- child.setBounds(bounds);
- }
- }
-
- private Point computeHSplitSize(Composite composite, int wHint, int hHint, boolean flushCache) {
- Point size = new Point(marginLeft + marginRight, marginTop + marginBottom);
- Control[] children = composite.getChildren();
- for (int i = 0; i < children.length; ++i) {
- final Control child = children[i];
-
- Point childSize = child.computeSize(wHint, hHint, flushCache);
- size.x = Math.max(size.x, childSize.x);
- size.y += childSize.y + spacing;
- }
- return size;
- }
-
- private Point computeVSplitSize(Composite composite, int wHint, int hHint, boolean flushCache) {
- Point size = new Point(marginLeft + marginRight, marginTop + marginBottom);
- Control[] children = composite.getChildren();
- for (int i = 0; i < children.length; ++i) {
- final Control child = children[i];
-
- Point childSize = child.computeSize(wHint, hHint, flushCache);
- size.x += childSize.x + spacing;
- size.y = Math.max(size.y, childSize.y);
- }
- return size;
- }
-}
diff --git a/examples/org.eclipse.swt.examples.layouts/.classpath b/examples/org.eclipse.swt.examples.layouts/.classpath
deleted file mode 100644
index 065ac06e19..0000000000
--- a/examples/org.eclipse.swt.examples.layouts/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/examples/org.eclipse.swt.examples.layouts/.cvsignore b/examples/org.eclipse.swt.examples.layouts/.cvsignore
deleted file mode 100644
index c5e82d7458..0000000000
--- a/examples/org.eclipse.swt.examples.layouts/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin \ No newline at end of file
diff --git a/examples/org.eclipse.swt.examples.layouts/.project b/examples/org.eclipse.swt.examples.layouts/.project
deleted file mode 100644
index a6fc2cb975..0000000000
--- a/examples/org.eclipse.swt.examples.layouts/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.swt.examples.layouts</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.PluginNature</nature>
- </natures>
-</projectDescription>
diff --git a/examples/org.eclipse.swt.examples.layouts/about.html b/examples/org.eclipse.swt.examples.layouts/about.html
deleted file mode 100644
index 9db411aab9..0000000000
--- a/examples/org.eclipse.swt.examples.layouts/about.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<title>About</title>
-<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>20th June, 2002</p>
-<h3>License</h3>
-<p>Eclipse.org makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise indicated below, the Content is provided to you under the terms and conditions of the
-Common Public License Version 1.0 (&quot;CPL&quot;). A copy of the CPL is available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>.
-For purposes of the CPL, &quot;Program&quot; will mean the Content.</p>
-
-<h3>Contributions</h3>
-
-<p>If this Content is licensed to you under the terms and conditions of the CPL, any Contributions, as defined in the CPL, uploaded, submitted, or otherwise
-made available to Eclipse.org, members of Eclipse.org and/or the host of Eclipse.org web site, by you that relate to such
-Content are provided under the terms and conditions of the CPL and can be made available to others under the terms of the CPL.</p>
-
-<p>If this Content is licensed to you under license terms and conditions other than the CPL (&quot;Other License&quot;), any modifications, enhancements and/or
-other code and/or documentation (&quot;Modifications&quot;) uploaded, submitted, or otherwise made available to Eclipse.org, members of Eclipse.org and/or the
-host of Eclipse.org, by you that relate to such Content are provided under terms and conditions of the Other License and can be made available
-to others under the terms of the Other License. In addition, with regard to Modifications for which you are the copyright holder, you are also
-providing the Modifications under the terms and conditions of the CPL and such Modifications can be made available to others under the terms of
-the CPL.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/examples/org.eclipse.swt.examples.layouts/build.properties b/examples/org.eclipse.swt.examples.layouts/build.properties
deleted file mode 100644
index 1c236e8ba2..0000000000
--- a/examples/org.eclipse.swt.examples.layouts/build.properties
+++ /dev/null
@@ -1,20 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2003 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Common Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/cpl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-bin.includes = doc-html/,\
- icons/,\
- plugin.properties,\
- plugin.xml,\
- about.html,\
- *.jar
-
-src.includes = about.html
-
-source.layouts.jar = src/
diff --git a/examples/org.eclipse.swt.examples.layouts/doc-html/hglegal.htm b/examples/org.eclipse.swt.examples.layouts/doc-html/hglegal.htm
deleted file mode 100644
index 621115699c..0000000000
--- a/examples/org.eclipse.swt.examples.layouts/doc-html/hglegal.htm
+++ /dev/null
@@ -1,14 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <LINK REL="stylesheet" HREF="../../../book.css" CHARSET="ISO-8859-1" TYPE="text/css">
- <title>Legal Notices</title>
-</head>
-<body>
-
-<h3>
-<a NAME="Notices"></a>Notices</h3>
-(c) Copyright (c) 2000, 2004 IBM Corporation and others. All Rights Reserved.
-</body>
-</html>
diff --git a/examples/org.eclipse.swt.examples.layouts/doc-html/ngibmcpy.gif b/examples/org.eclipse.swt.examples.layouts/doc-html/ngibmcpy.gif
deleted file mode 100644
index c786e43e1f..0000000000
--- a/examples/org.eclipse.swt.examples.layouts/doc-html/ngibmcpy.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples.layouts/doc-html/swt_layout_ex.html b/examples/org.eclipse.swt.examples.layouts/doc-html/swt_layout_ex.html
deleted file mode 100644
index 9857c599fa..0000000000
--- a/examples/org.eclipse.swt.examples.layouts/doc-html/swt_layout_ex.html
+++ /dev/null
@@ -1,35 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <title>SWT - Layout Example</title>
-</head>
-<body>
-
-<h2>SWT example - Layouts</h2>
-
-<p>
-This example is a simple demonstration of common SWT layouts.
-It consists of a tab folder where each tab in the folder allows the
-user to interact with a different SWT layout.
-The user can insert widgets into a layout and set the values of the layout data
-using a property sheet. When the user has a suitable arrangement, the underlying
-code can be generated by clicking on the <strong>Code</strong> button.
-</p>
-
-<h3>Running the example</h3>
-<p>
-Follow the <a href="../../org.eclipse.swt.examples/doc-html/swt_manual_setup.html">SWT standalone examples setup</a>
-instructions to install and run the example from your workspace.
-</p>
-<p>
-The "Main" class is <code>org.eclipse.swt.examples.layoutexample.LayoutExample</code>.
-</p>
-<p>
-This example can also be run using the <a href="../../org.eclipse.swt.examples.launcher/doc-html/swt_launcher_ex.html">Example Launcher</a>.
-Select the <strong>Layouts</strong> item from the <strong>Workbench Views</strong> category and click <strong>Run</strong>.
-</p>
-
-<p><a href="hglegal.htm"><img SRC="ngibmcpy.gif" ALT="Copyright IBM Corporation and others 2000, 2004. All Rights Reserved." BORDER=0 height=14 width=324></a></p>
-</body>
-</html> \ No newline at end of file
diff --git a/examples/org.eclipse.swt.examples.layouts/icons/layouts_example.gif b/examples/org.eclipse.swt.examples.layouts/icons/layouts_example.gif
deleted file mode 100644
index d945dde53b..0000000000
--- a/examples/org.eclipse.swt.examples.layouts/icons/layouts_example.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples.layouts/plugin.properties b/examples/org.eclipse.swt.examples.layouts/plugin.properties
deleted file mode 100644
index 59ffc928d5..0000000000
--- a/examples/org.eclipse.swt.examples.layouts/plugin.properties
+++ /dev/null
@@ -1,28 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2003 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Common Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/cpl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-providerName = Eclipse.org
-plugin.SWTLayoutExample.name = SWT Layout Example Plugin
-category.SWTExamples.name = SWT Examples
-view.LayoutExample.name = SWT Layouts
-
-launchcategory.SWTViewExamples.name = Workbench Views
-launchcategory.SWTViewExamples.description = \
- A collection of Standard Widget Toolkit examples that run as Views inside the Workbench. \
- These examples will create a new View in the current Perspective.
-
-launchitem.LayoutExample.name = Layouts
-launchitem.LayoutExample.description = \
- This example is a simple demonstration of common SWT layouts. \n\n\
- It consists of a tab folder where each tab allows the \
- user to interact with a different SWT layout.\
- The user can insert widgets into a layout and set the values of the layout data \
- using a property sheet. When the user has a suitable arrangement, code can be \
- generated by clicking on the Code button.
diff --git a/examples/org.eclipse.swt.examples.layouts/plugin.xml b/examples/org.eclipse.swt.examples.layouts/plugin.xml
deleted file mode 100644
index 3cac276945..0000000000
--- a/examples/org.eclipse.swt.examples.layouts/plugin.xml
+++ /dev/null
@@ -1,62 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<plugin
- id="org.eclipse.swt.examples.layouts"
- name="%plugin.SWTLayoutExample.name"
- version="3.1.0"
- provider-name="%providerName"
- class="org.eclipse.swt.examples.layouts.LayoutPlugin">
-
-<!-- Runtime -->
-<!-- Runtime -->
- <runtime>
- <library name="layouts.jar">
- <packages prefixes="org.eclipse.swt.examples.layouts"/>
- </library>
- </runtime>
-<!-- Required plugins -->
- <requires>
- <import plugin="org.eclipse.ui.ide"/>
- <import plugin="org.eclipse.ui.views"/>
- <import plugin="org.eclipse.jface.text"/>
- <import plugin="org.eclipse.ui.workbench.texteditor"/>
- <import plugin="org.eclipse.ui.editors"/>
- <import plugin="org.eclipse.core.runtime"/>
- <import plugin="org.eclipse.ui"/>
- <import plugin="org.eclipse.swt"/>
- <import plugin="org.eclipse.swt.examples"/>
- </requires>
-
-
-<!-- Extension points -->
-<!-- Extensions -->
- <extension
- point="org.eclipse.ui.views">
- <view
- name="%view.LayoutExample.name"
- icon="icons/layouts_example.gif"
- category="org.eclipse.swt.examples.category"
- class="org.eclipse.swt.examples.layouts.LayoutView"
- id="org.eclipse.swt.examples.layouts.view">
- </view>
- </extension>
- <extension
- point="org.eclipse.swt.examples.launcher.launchItems">
- <category
- name="%launchcategory.SWTViewExamples.name"
- description="%launchcategory.SWTViewExamples.description"
- id="org.eclipse.swt.examples.launchViewCategory">
- </category>
- <item
- name="%launchitem.LayoutExample.name"
- icon="icons/layouts_example.gif"
- description="%launchitem.LayoutExample.description"
- category="org.eclipse.swt.examples.launchViewCategory"
- id="org.eclipse.swt.examples.layouts.viewlauncher">
- <view
- viewId="org.eclipse.swt.examples.layouts.view">
- </view>
- </item>
- </extension>
-
-</plugin>
diff --git a/examples/org.eclipse.swt.examples.layouts/src/import.properties b/examples/org.eclipse.swt.examples.layouts/src/import.properties
deleted file mode 100644
index 58344f0d3e..0000000000
--- a/examples/org.eclipse.swt.examples.layouts/src/import.properties
+++ /dev/null
@@ -1,14 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2003 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Common Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/cpl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-# Persist project settings for later import
-natures = org.eclipse.jdt.core.javanature; org.eclipse.pde.PluginNature
-builders = org.eclipse.jdt.core.javabuilder; org.eclipse.pde.ManifestBuilder; org.eclipse.pde.SchemaBuilder
-var.ECLIPSE_PLUGINS = <<ECLIPSE_PLUGINS>>
diff --git a/examples/org.eclipse.swt.examples.layouts/src/org/eclipse/swt/examples/layouts/LayoutPlugin.java b/examples/org.eclipse.swt.examples.layouts/src/org/eclipse/swt/examples/layouts/LayoutPlugin.java
deleted file mode 100644
index 2f9763335f..0000000000
--- a/examples/org.eclipse.swt.examples.layouts/src/org/eclipse/swt/examples/layouts/LayoutPlugin.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.layouts;
-
-
-import org.eclipse.ui.plugin.*;
-
-/**
- * The main plugin class to be used in the desktop.
- */
-public class LayoutPlugin extends AbstractUIPlugin {
- /**
- * The constructor.
- */
- public LayoutPlugin() {
- super();
- }
-}
diff --git a/examples/org.eclipse.swt.examples.layouts/src/org/eclipse/swt/examples/layouts/LayoutView.java b/examples/org.eclipse.swt.examples.layouts/src/org/eclipse/swt/examples/layouts/LayoutView.java
deleted file mode 100644
index a765800c3e..0000000000
--- a/examples/org.eclipse.swt.examples.layouts/src/org/eclipse/swt/examples/layouts/LayoutView.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.layouts;
-
-
-import org.eclipse.swt.examples.layoutexample.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.part.*;
-
-/**
- * <code>Layouts</code> is a simple demonstration
- * of the layouts defined by SWT. It consists of a workbench
- * view and tab folder where each tab in the folder allows the
- * user to interact with a layout.
- *
- * @see ViewPart
- */
-public class LayoutView extends ViewPart {
- LayoutExample instance = null;
-
- /**
- * Create the example
- *
- * @see ViewPart#createPartControl
- */
- public void createPartControl(Composite frame) {
- instance = new LayoutExample(frame);
- }
-
- /**
- * Called when we must grab focus.
- *
- * @see org.eclipse.ui.part.ViewPart#setFocus
- */
- public void setFocus() {
- instance.setFocus();
- }
-
- /**
- * Called when the View is to be disposed
- */
- public void dispose() {
- instance.dispose();
- instance = null;
- super.dispose();
- }
-}
diff --git a/examples/org.eclipse.swt.examples.ole.win32/.classpath b/examples/org.eclipse.swt.examples.ole.win32/.classpath
deleted file mode 100755
index 065ac06e19..0000000000
--- a/examples/org.eclipse.swt.examples.ole.win32/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/examples/org.eclipse.swt.examples.ole.win32/.cvsignore b/examples/org.eclipse.swt.examples.ole.win32/.cvsignore
deleted file mode 100755
index c5e82d7458..0000000000
--- a/examples/org.eclipse.swt.examples.ole.win32/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin \ No newline at end of file
diff --git a/examples/org.eclipse.swt.examples.ole.win32/.project b/examples/org.eclipse.swt.examples.ole.win32/.project
deleted file mode 100644
index ff00f68d20..0000000000
--- a/examples/org.eclipse.swt.examples.ole.win32/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.swt.examples.ole.win32</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.PluginNature</nature>
- </natures>
-</projectDescription>
diff --git a/examples/org.eclipse.swt.examples.ole.win32/about.html b/examples/org.eclipse.swt.examples.ole.win32/about.html
deleted file mode 100644
index 9db411aab9..0000000000
--- a/examples/org.eclipse.swt.examples.ole.win32/about.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<title>About</title>
-<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>20th June, 2002</p>
-<h3>License</h3>
-<p>Eclipse.org makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise indicated below, the Content is provided to you under the terms and conditions of the
-Common Public License Version 1.0 (&quot;CPL&quot;). A copy of the CPL is available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>.
-For purposes of the CPL, &quot;Program&quot; will mean the Content.</p>
-
-<h3>Contributions</h3>
-
-<p>If this Content is licensed to you under the terms and conditions of the CPL, any Contributions, as defined in the CPL, uploaded, submitted, or otherwise
-made available to Eclipse.org, members of Eclipse.org and/or the host of Eclipse.org web site, by you that relate to such
-Content are provided under the terms and conditions of the CPL and can be made available to others under the terms of the CPL.</p>
-
-<p>If this Content is licensed to you under license terms and conditions other than the CPL (&quot;Other License&quot;), any modifications, enhancements and/or
-other code and/or documentation (&quot;Modifications&quot;) uploaded, submitted, or otherwise made available to Eclipse.org, members of Eclipse.org and/or the
-host of Eclipse.org, by you that relate to such Content are provided under terms and conditions of the Other License and can be made available
-to others under the terms of the Other License. In addition, with regard to Modifications for which you are the copyright holder, you are also
-providing the Modifications under the terms and conditions of the CPL and such Modifications can be made available to others under the terms of
-the CPL.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/examples/org.eclipse.swt.examples.ole.win32/build.properties b/examples/org.eclipse.swt.examples.ole.win32/build.properties
deleted file mode 100755
index c30cc18464..0000000000
--- a/examples/org.eclipse.swt.examples.ole.win32/build.properties
+++ /dev/null
@@ -1,20 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2003 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Common Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/cpl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-bin.includes = doc-html/,\
- icons/,\
- plugin.properties,\
- plugin.xml,\
- about.html,\
- *.jar
-
-src.includes = about.html
-
-source.olewin32.jar = src/
diff --git a/examples/org.eclipse.swt.examples.ole.win32/doc-html/hglegal.htm b/examples/org.eclipse.swt.examples.ole.win32/doc-html/hglegal.htm
deleted file mode 100755
index 621115699c..0000000000
--- a/examples/org.eclipse.swt.examples.ole.win32/doc-html/hglegal.htm
+++ /dev/null
@@ -1,14 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <LINK REL="stylesheet" HREF="../../../book.css" CHARSET="ISO-8859-1" TYPE="text/css">
- <title>Legal Notices</title>
-</head>
-<body>
-
-<h3>
-<a NAME="Notices"></a>Notices</h3>
-(c) Copyright (c) 2000, 2004 IBM Corporation and others. All Rights Reserved.
-</body>
-</html>
diff --git a/examples/org.eclipse.swt.examples.ole.win32/doc-html/ngibmcpy.gif b/examples/org.eclipse.swt.examples.ole.win32/doc-html/ngibmcpy.gif
deleted file mode 100755
index c786e43e1f..0000000000
--- a/examples/org.eclipse.swt.examples.ole.win32/doc-html/ngibmcpy.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples.ole.win32/doc-html/swt_ole_ex.html b/examples/org.eclipse.swt.examples.ole.win32/doc-html/swt_ole_ex.html
deleted file mode 100755
index 55fa8f9a08..0000000000
--- a/examples/org.eclipse.swt.examples.ole.win32/doc-html/swt_ole_ex.html
+++ /dev/null
@@ -1,37 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <title>SWT - OLE Web Browser</title>
-</head>
-<body>
-
-<h2>SWT example - OLE Web Browser</h2>
-
-<p>
-This example shows how to embed an Active X control into an SWT application or an Eclipse view.
-<p>
-</p>
-When the view is opened, it will create an instance of the Windows Internet Explorer
-control. The OLE web browser has
-<strong>Back</strong> and <strong>Forward</strong> buttons to take you to recently visited pages. The browser also contains
-a <strong>Home</strong> button to take you to the web browser's home page, a <strong>Stop</strong> button which stops the
-current transfer, a <strong>Search</strong> button which will search for text typed in the <strong>Address</strong> text field, and
-a <strong>Refresh</strong> button which re-draws the contents of the currently displayed page. There is also a
-<strong>Go</strong> button which, when clicked, will attempt to load the page specified in the <strong>Address</strong> field.
-</p>
-
-<h3>Running the example</h3>
-
-<p>
-From Eclipse's <strong>Window</strong> menu select <strong>Show View</strong> &gt; <strong>Other</strong>.
-In the <strong>Show View</strong> dialog, expand <strong>SWT Examples</strong> and select
-the view named <strong>OLE Web Browser (win32)</strong>. A view containing a web browser will appear.
-</p>
-<p>
-This example can also be run using the <a href="../../org.eclipse.swt.examples.launcher/doc-html/swt_launcher_ex.html">Example Launcher</a>.
-Select the <strong>OLE Web Browser</strong> item from the <strong>Win32 only</strong> category and click <strong>Run</strong>.
-</p>
-<p><a href="hglegal.htm"><img SRC="ngibmcpy.gif" ALT="Copyright IBM Corporation and others 2000, 2004. All Rights Reserved." BORDER=0 height=14 width=324></a></p>
-</body>
-</html>
diff --git a/examples/org.eclipse.swt.examples.ole.win32/icons/backward_nav.gif b/examples/org.eclipse.swt.examples.ole.win32/icons/backward_nav.gif
deleted file mode 100755
index 5fcf41b783..0000000000
--- a/examples/org.eclipse.swt.examples.ole.win32/icons/backward_nav.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples.ole.win32/icons/forward_nav.gif b/examples/org.eclipse.swt.examples.ole.win32/icons/forward_nav.gif
deleted file mode 100755
index 3b9b6af9b1..0000000000
--- a/examples/org.eclipse.swt.examples.ole.win32/icons/forward_nav.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples.ole.win32/icons/home_nav.gif b/examples/org.eclipse.swt.examples.ole.win32/icons/home_nav.gif
deleted file mode 100755
index 77a2306ed2..0000000000
--- a/examples/org.eclipse.swt.examples.ole.win32/icons/home_nav.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples.ole.win32/icons/refresh_nav.gif b/examples/org.eclipse.swt.examples.ole.win32/icons/refresh_nav.gif
deleted file mode 100755
index e270e18bde..0000000000
--- a/examples/org.eclipse.swt.examples.ole.win32/icons/refresh_nav.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples.ole.win32/icons/search_nav.gif b/examples/org.eclipse.swt.examples.ole.win32/icons/search_nav.gif
deleted file mode 100755
index 73ac91bddb..0000000000
--- a/examples/org.eclipse.swt.examples.ole.win32/icons/search_nav.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples.ole.win32/icons/stop_nav.gif b/examples/org.eclipse.swt.examples.ole.win32/icons/stop_nav.gif
deleted file mode 100755
index 653d347b57..0000000000
--- a/examples/org.eclipse.swt.examples.ole.win32/icons/stop_nav.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples.ole.win32/icons/webbrowser_example.gif b/examples/org.eclipse.swt.examples.ole.win32/icons/webbrowser_example.gif
deleted file mode 100755
index 895e22110d..0000000000
--- a/examples/org.eclipse.swt.examples.ole.win32/icons/webbrowser_example.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples.ole.win32/plugin.properties b/examples/org.eclipse.swt.examples.ole.win32/plugin.properties
deleted file mode 100755
index f7fa735f62..0000000000
--- a/examples/org.eclipse.swt.examples.ole.win32/plugin.properties
+++ /dev/null
@@ -1,60 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2003 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Common Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/cpl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-providerName = Eclipse.org
-plugin.SWTOLEExample.name = SWT OLE Example Plugin (Win32)
-category.SWTExamples.name = SWT Examples
-view.OLEWebBrowserExample.name = OLE Web Browser (Win32)
-
-launchcategory.SWTWin32OnlyExamples.name = Win32 only
-launchcategory.SWTWin32OnlyExamples.description = \
- A collection of Standard Widget Toolkit examples for Windows systems only.
-
-launchitem.OLEWebBrowserExample.name = OLE Web Browser
-launchitem.OLEWebBrowserExample.description = \
- This example demonstrates how to embed an Active X control into an SWT application or an Eclipse view.\n\n\
- When the view is opened, it will create an instance of the Windows Internet Explorer \
- control. The OLE Web Browser has \
- Back and Forward buttons to take you to recently visited pages. The browser also contains \
- a Home button to take you to the web browser's home page, a Stop button which stops the \
- current transfer, a Search button which will search for text typed in the Address text field, and \
- a Refresh button which re-draws the contents of the currently displayed page. There is also a \
- Go button which, when clicked, will attempt to load the page specified in the Address field.
-
-browser.Back.text = Backward
-browser.Back.tooltip = Go to previous Web site in the history list
-
-browser.Forward.text = Forward
-browser.Forward.tooltip = Go to next Web site in the history list
-
-browser.Home.text = Home
-browser.Home.tooltip = Go to home Web site
-
-browser.Stop.text = Stop
-browser.Stop.tooltip = Stop loading current Web site
-
-browser.Refresh.text = Refresh
-browser.Refresh.tooltip = Refresh current Web site
-
-browser.Search.text = Search
-browser.Search.tooltip = Search the Web
-
-browser.Address.label = Address :
-
-browser.Go.text = Go
-
-browser.State.Uninitialized.text = Not ready.
-browser.State.Loading.text = Loading Web site...
-browser.State.Loaded.text = Ready.
-browser.State.Interactive.text = Loading Web site...
-browser.State.Complete.text = Done.
-
-error.CouldNotLoadResources = Unable to load resources
-error.CouldNotCreateBrowserControl = Unable to create <<Browser Control>>
diff --git a/examples/org.eclipse.swt.examples.ole.win32/plugin.xml b/examples/org.eclipse.swt.examples.ole.win32/plugin.xml
deleted file mode 100755
index d7a9dcc973..0000000000
--- a/examples/org.eclipse.swt.examples.ole.win32/plugin.xml
+++ /dev/null
@@ -1,61 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<!-- File written by PDE 1.0 -->
-<plugin
- id="org.eclipse.swt.examples.ole.win32"
- name="%plugin.SWTOLEExample.name"
- version="3.1.0"
- provider-name="%providerName"
- class="org.eclipse.swt.examples.ole.win32.OlePlugin">
-<!-- Required plugins -->
-<requires>
- <import plugin="org.eclipse.ui.ide"/>
- <import plugin="org.eclipse.ui.views"/>
- <import plugin="org.eclipse.jface.text"/>
- <import plugin="org.eclipse.ui.workbench.texteditor"/>
- <import plugin="org.eclipse.ui.editors"/>
- <import plugin="org.eclipse.core.runtime"/>
- <import plugin="org.eclipse.core.resources"/>
- <import plugin="org.eclipse.ui"/>
- <import plugin="org.eclipse.swt"/>
-</requires>
-
-<!-- Runtime -->
-<!-- Runtime -->
-<runtime>
- <library name="olewin32.jar">
- <packages prefixes="org.eclipse.swt.examples.ole"/>
- </library>
-</runtime>
-
-<!-- Extensions -->
-<!-- Extension points -->
-<extension
- point="org.eclipse.ui.views">
- <view
- name="%view.OLEWebBrowserExample.name"
- icon="icons/webbrowser_example.gif"
- category="org.eclipse.swt.examples.category"
- class="org.eclipse.swt.examples.ole.win32.OleBrowserView"
- id="org.eclipse.swt.examples.ole.win32.browserView">
- </view>
-</extension>
-<extension
- point="org.eclipse.swt.examples.launcher.launchItems">
- <category
- name="%launchcategory.SWTWin32OnlyExamples.name"
- description="%launchcategory.SWTWin32OnlyExamples.description"
- id="org.eclipse.swt.examples.launchWin32OnlyCategory">
- </category>
- <item
- name="%launchitem.OLEWebBrowserExample.name"
- icon="icons/webbrowser_example.gif"
- description="%launchitem.OLEWebBrowserExample.description"
- category="org.eclipse.swt.examples.launchWin32OnlyCategory"
- id="org.eclipse.swt.examples.ole.win32.viewlauncher">
- <view
- viewId="org.eclipse.swt.examples.ole.win32.browserView">
- </view>
- </item>
-</extension>
-</plugin>
diff --git a/examples/org.eclipse.swt.examples.ole.win32/src/import.properties b/examples/org.eclipse.swt.examples.ole.win32/src/import.properties
deleted file mode 100644
index 58344f0d3e..0000000000
--- a/examples/org.eclipse.swt.examples.ole.win32/src/import.properties
+++ /dev/null
@@ -1,14 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2003 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Common Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/cpl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-# Persist project settings for later import
-natures = org.eclipse.jdt.core.javanature; org.eclipse.pde.PluginNature
-builders = org.eclipse.jdt.core.javabuilder; org.eclipse.pde.ManifestBuilder; org.eclipse.pde.SchemaBuilder
-var.ECLIPSE_PLUGINS = <<ECLIPSE_PLUGINS>>
diff --git a/examples/org.eclipse.swt.examples.ole.win32/src/org/eclipse/swt/examples/ole/win32/OleBrowserView.java b/examples/org.eclipse.swt.examples.ole.win32/src/org/eclipse/swt/examples/ole/win32/OleBrowserView.java
deleted file mode 100755
index 84323f84e6..0000000000
--- a/examples/org.eclipse.swt.examples.ole.win32/src/org/eclipse/swt/examples/ole/win32/OleBrowserView.java
+++ /dev/null
@@ -1,370 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.ole.win32;
-
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.ole.win32.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.part.*;
-
-/**
- * Ole uses <code>org.eclipse.swt</code> to demonstrate Win32 OLE / ActiveX
- * integration.
- *
- * @see ViewPart
- */
-public class OleBrowserView extends ViewPart {
-
- private Composite displayArea;
-
- private OleFrame webFrame;
- private OleWebBrowser webBrowser;
- private Text webUrl;
- private OleControlSite webControlSite;
- private ProgressBar webProgress;
- private Label webStatus;
- private Button webNavigateButton;
-
- private ToolItem webCommandBackward;
- private ToolItem webCommandForward;
- private ToolItem webCommandHome;
- private ToolItem webCommandStop;
- private ToolItem webCommandRefresh;
- private ToolItem webCommandSearch;
-
- private boolean activated = false;
-
- private static final int DISPID_AMBIENT_DLCONTROL = -5512;
- private static final int DLCTL_NO_SCRIPTS = 0x80;
-
- /**
- * Constructs the OLE browser view.
- */
- public OleBrowserView() {
- OlePlugin.initResources();
- }
-
- /**
- * Creates the example.
- *
- * @see ViewPart#createPartControl
- */
- public void createPartControl(Composite parent) {
- displayArea = new Composite(parent, SWT.NONE);
-
- GridLayout gridLayout = new GridLayout();
- gridLayout.numColumns = 3;
- displayArea.setLayout(gridLayout);
-
- createToolbar();
- createBrowserFrame();
- createStatusArea();
- createBrowserControl();
- }
-
- /**
- * Cleanup
- */
- public void dispose() {
- if (activated) {
- webControlSite.deactivateInPlaceClient();
- activated = false;
- }
- if (webBrowser != null) webBrowser.dispose();
- webBrowser = null;
- super.dispose();
- }
-
- /**
- * Called when we must grab focus.
- *
- * @see org.eclipse.ui.part.ViewPart#setFocus
- */
- public void setFocus() {
- webUrl.setFocus();
- }
-
- /**
- * Creates the Web browser toolbar.
- */
- private void createToolbar() {
- // Add a toolbar
- ToolBar bar = new ToolBar(displayArea, SWT.NONE);
- GridData gridData = new GridData(GridData.FILL_HORIZONTAL);
- gridData.horizontalSpan = 3;
- bar.setLayoutData(gridData);
-
- // Add a button to navigate backwards through previously visited web sites
- webCommandBackward = new ToolItem(bar, SWT.NONE);
- webCommandBackward.setToolTipText(OlePlugin.getResourceString("browser.Back.tooltip"));
- webCommandBackward.setText(OlePlugin.getResourceString("browser.Back.text"));
- webCommandBackward.setImage(OlePlugin.images[OlePlugin.biBack]);
- webCommandBackward.setEnabled(false);
- webCommandBackward.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- if (webBrowser == null) return;
- webBrowser.GoBack();
- }
- });
-
- // Add a button to navigate forward through previously visited web sites
- webCommandForward = new ToolItem(bar, SWT.NONE);
- webCommandForward.setToolTipText(OlePlugin.getResourceString("browser.Forward.tooltip"));
- webCommandForward.setText(OlePlugin.getResourceString("browser.Forward.text"));
- webCommandForward.setImage(OlePlugin.images[OlePlugin.biForward]);
- webCommandForward.setEnabled(false);
- webCommandForward.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- if (webBrowser == null) return;
- webBrowser.GoForward();
- }
- });
-
- // Add a separator
- new ToolItem(bar, SWT.SEPARATOR);
-
- // Add a button to navigate to the Home page
- webCommandHome = new ToolItem(bar, SWT.NONE);
- webCommandHome.setToolTipText(OlePlugin.getResourceString("browser.Home.tooltip"));
- webCommandHome.setText(OlePlugin.getResourceString("browser.Home.text"));
- webCommandHome.setImage(OlePlugin.images[OlePlugin.biHome]);
- webCommandHome.setEnabled(false);
- webCommandHome.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- if (webBrowser == null) return;
- webBrowser.GoHome();
- }
- });
-
- // Add a button to abort web page loading
- webCommandStop = new ToolItem(bar, SWT.NONE);
- webCommandStop.setToolTipText(OlePlugin.getResourceString("browser.Stop.tooltip"));
- webCommandStop.setText(OlePlugin.getResourceString("browser.Stop.text"));
- webCommandStop.setImage(OlePlugin.images[OlePlugin.biStop]);
- webCommandStop.setEnabled(false);
- webCommandStop.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- if (webBrowser == null) return;
- webBrowser.Stop();
- }
- });
-
- // Add a button to refresh the current web page
- webCommandRefresh = new ToolItem(bar, SWT.NONE);
- webCommandRefresh.setToolTipText(OlePlugin.getResourceString("browser.Refresh.tooltip"));
- webCommandRefresh.setText(OlePlugin.getResourceString("browser.Refresh.text"));
- webCommandRefresh.setImage(OlePlugin.images[OlePlugin.biRefresh]);
- webCommandRefresh.setEnabled(false);
- webCommandRefresh.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- if (webBrowser == null) return;
- webBrowser.Refresh();
- }
- });
-
- // Add a separator
- new ToolItem(bar, SWT.SEPARATOR);
-
- // Add a button to search the web
- webCommandSearch = new ToolItem(bar, SWT.NONE);
- webCommandSearch.setToolTipText(OlePlugin.getResourceString("browser.Search.tooltip"));
- webCommandSearch.setText(OlePlugin.getResourceString("browser.Search.text"));
- webCommandSearch.setImage(OlePlugin.images[OlePlugin.biSearch]);
- webCommandSearch.setEnabled(false);
- webCommandSearch.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- if (webBrowser == null) return;
- webBrowser.GoSearch();
- }
- });
-
- // Add a text area for Users to enter a url
- Composite addressBar = new Composite(displayArea, SWT.NONE);
- gridData = new GridData(GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_FILL);
- gridData.horizontalSpan = 3;
- addressBar.setLayoutData(gridData);
- GridLayout gridLayout = new GridLayout();
- gridLayout.numColumns = 3;
- addressBar.setLayout(gridLayout);
-
- Label addressLabel = new Label(addressBar, SWT.NONE);
- gridData = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL);
- addressLabel.setLayoutData(gridData);
- addressLabel.setText(OlePlugin.getResourceString("browser.Address.label"));
- addressLabel.setFont(OlePlugin.browserFont);
-
- webUrl = new Text(addressBar, SWT.SINGLE | SWT.BORDER);
- webUrl.setFont(OlePlugin.browserFont);
- gridData = new GridData(GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_FILL);
- webUrl.setLayoutData(gridData);
- webUrl.addFocusListener(new FocusAdapter() {
- public void focusGained(FocusEvent e) {
- webNavigateButton.getShell().setDefaultButton(webNavigateButton);
- }
- });
-
- // Add a button to navigate to the web site specified in the Text area defined above
- webNavigateButton = new Button(addressBar, SWT.PUSH);
- gridData = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL);
- webNavigateButton.setLayoutData(gridData);
- webNavigateButton.setText(OlePlugin.getResourceString("browser.Go.text"));
- webNavigateButton.setFont(OlePlugin.browserFont);
- webNavigateButton.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event event) {
- if (webBrowser == null) return;
- webBrowser.Navigate(webUrl.getText());
- }
- });
- }
-
- /**
- * Creates the Web browser OleFrame.
- */
- private void createBrowserFrame() {
- // Every control must have an associated OleFrame:
- webFrame = new OleFrame(displayArea, SWT.NONE);
- GridData gridData = new GridData(GridData.FILL_HORIZONTAL | GridData.FILL_VERTICAL);
- gridData.horizontalSpan = 3;
- webFrame.setLayoutData(gridData);
- }
-
- /**
- * Creates the Web browser status area.
- */
- private void createStatusArea() {
- // Add a progress bar to display downloading progress information
- webProgress = new ProgressBar(displayArea, SWT.BORDER);
- GridData gridData = new GridData();
- gridData.horizontalAlignment = GridData.BEGINNING;
- gridData.verticalAlignment = GridData.FILL;
- webProgress.setLayoutData(gridData);
-
- // Add a label for displaying status messages as they are received from the control
- webStatus = new Label(displayArea, SWT.SINGLE | SWT.READ_ONLY | SWT.BORDER);
- gridData = new GridData(GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_FILL);
- gridData.horizontalSpan = 2;
- webStatus.setLayoutData(gridData);
- webStatus.setFont(OlePlugin.browserFont);
- }
-
- /**
- * Creates Web browser control.
- */
- private void createBrowserControl() {
- try {
- // Create an Automation object for access to extended capabilities
- webControlSite = new OleControlSite(webFrame, SWT.NONE, "Shell.Explorer");
- Variant download = new Variant(DLCTL_NO_SCRIPTS);
- webControlSite.setSiteProperty(DISPID_AMBIENT_DLCONTROL, download);
- OleAutomation oleAutomation = new OleAutomation(webControlSite);
- webBrowser = new OleWebBrowser(oleAutomation);
- } catch (SWTException ex) {
- // Creation may have failed because control is not installed on machine
- Label label = new Label(webFrame, SWT.BORDER);
- OlePlugin.logError(OlePlugin.getResourceString("error.CouldNotCreateBrowserControl"), ex);
- label.setText(OlePlugin.getResourceString("error.CouldNotCreateBrowserControl"));
- return;
- }
-
- // Respond to ProgressChange events by updating the Progress bar
- webControlSite.addEventListener(OleWebBrowser.ProgressChange, new OleListener() {
- public void handleEvent(OleEvent event) {
- Variant progress = event.arguments[0];
- Variant maxProgress = event.arguments[1];
- if (progress == null || maxProgress == null)
- return;
- webProgress.setMaximum(maxProgress.getInt());
- webProgress.setSelection(progress.getInt());
- }
- });
-
- // Respond to StatusTextChange events by updating the Status Text label
- webControlSite.addEventListener(OleWebBrowser.StatusTextChange, new OleListener() {
- public void handleEvent(OleEvent event) {
- Variant statusText = event.arguments[0];
- if (statusText == null) return;
- String text = statusText.getString();
- if (text != null)
- webStatus.setText(text);
- }
- });
-
- // Listen for changes to the ready state and print out the current state
- webControlSite.addPropertyListener(OleWebBrowser.DISPID_READYSTATE, new OleListener() {
- public void handleEvent(OleEvent event) {
- if (event.detail == OLE.PROPERTY_CHANGING) return;
- int state = webBrowser.getReadyState();
- switch (state) {
- case OleWebBrowser.READYSTATE_UNINITIALIZED:
- webStatus.setText(
- OlePlugin.getResourceString("browser.State.Uninitialized.text"));
- webCommandBackward.setEnabled(false);
- webCommandForward.setEnabled(false);
- webCommandHome.setEnabled(false);
- webCommandRefresh.setEnabled(false);
- webCommandStop.setEnabled(false);
- webCommandSearch.setEnabled(false);
- break;
- case OleWebBrowser.READYSTATE_LOADING:
- webStatus.setText(
- OlePlugin.getResourceString("browser.State.Loading.text"));
- webCommandHome.setEnabled(true);
- webCommandRefresh.setEnabled(true);
- webCommandStop.setEnabled(true);
- webCommandSearch.setEnabled(true);
- break;
- case OleWebBrowser.READYSTATE_LOADED:
- webStatus.setText(
- OlePlugin.getResourceString("browser.State.Loaded.text"));
- webCommandStop.setEnabled(true);
- break;
- case OleWebBrowser.READYSTATE_INTERACTIVE:
- webStatus.setText(
- OlePlugin.getResourceString("browser.State.Interactive.text"));
- webCommandStop.setEnabled(true);
- break;
- case OleWebBrowser.READYSTATE_COMPLETE:
- webStatus.setText(
- OlePlugin.getResourceString("browser.State.Complete.text"));
- webCommandStop.setEnabled(false);
- break;
- }
- }
- });
-
- // Listen for changes to the active command states
- webControlSite.addEventListener(OleWebBrowser.CommandStateChange, new OleListener() {
- public void handleEvent(OleEvent event) {
- if (event.type != OleWebBrowser.CommandStateChange) return;
- final int commandID =
- (event.arguments[0] != null) ? event.arguments[0].getInt() : 0;
- final boolean commandEnabled =
- (event.arguments[1] != null) ? event.arguments[1].getBoolean() : false;
-
- switch (commandID) {
- case OleWebBrowser.CSC_NAVIGATEBACK:
- webCommandBackward.setEnabled(commandEnabled);
- break;
- case OleWebBrowser.CSC_NAVIGATEFORWARD:
- webCommandForward.setEnabled(commandEnabled);
- break;
- }
- }
- });
-
- // in place activate the ActiveX control
- activated = (webControlSite.doVerb(OLE.OLEIVERB_INPLACEACTIVATE) == OLE.S_OK);
- if (activated) webBrowser.GoHome();
- }
-}
diff --git a/examples/org.eclipse.swt.examples.ole.win32/src/org/eclipse/swt/examples/ole/win32/OlePlugin.java b/examples/org.eclipse.swt.examples.ole.win32/src/org/eclipse/swt/examples/ole/win32/OlePlugin.java
deleted file mode 100755
index 88c8dc65d4..0000000000
--- a/examples/org.eclipse.swt.examples.ole.win32/src/org/eclipse/swt/examples/ole/win32/OlePlugin.java
+++ /dev/null
@@ -1,189 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.ole.win32;
-
-
-import java.io.*;
-import java.net.*;
-import java.text.*;
-import java.util.*;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.swt.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.ui.plugin.*;
-import org.osgi.framework.*;
-
-/**
- * The main plugin class to be used in the desktop.
- */
-public class OlePlugin extends AbstractUIPlugin {
- //The shared instance.
- private static OlePlugin plugin;
- private static ResourceBundle resourceBundle;
-
- static final int
- biBack = 0,
- biForward = 1,
- biHome = 2,
- biStop = 3,
- biRefresh = 4,
- biSearch = 5;
- static final String[] imageLocations = {
- "icons/backward_nav.gif",
- "icons/forward_nav.gif",
- "icons/home_nav.gif",
- "icons/stop_nav.gif",
- "icons/refresh_nav.gif",
- "icons/search_nav.gif" };
- static Image images[];
- static Font browserFont;
-
- /**
- * Constructs an OLE plugin.
- */
- public OlePlugin() {
- super();
- plugin = this;
- }
-
- public void start(BundleContext context) throws Exception {
- super.start(context);
- resourceBundle = Platform.getResourceBundle(getBundle());
- }
-
- /**
- * Clean up
- */
- public void stop(BundleContext context) throws Exception {
- freeResources();
- super.stop(context);
- }
-
- /**
- * Returns the shared instance.
- */
- public static OlePlugin getDefault() {
- return plugin;
- }
-
- /**
- * Returns a string from the resource bundle.
- * We don't want to crash because of a missing String.
- * Returns the key if not found.
- */
- public static String getResourceString(String key) {
- try {
- return resourceBundle.getString(key);
- } catch (MissingResourceException e) {
- return key;
- } catch (NullPointerException e) {
- return "!" + key + "!";
- }
- }
-
- /**
- * Returns a string from the resource bundle and binds it
- * with the given arguments. If the key is not found,
- * return the key.
- */
- public static String getResourceString(String key, Object[] args) {
- try {
- return MessageFormat.format(getResourceString(key), args);
- } catch (MissingResourceException e) {
- return key;
- } catch (NullPointerException e) {
- return "!" + key + "!";
- }
- }
-
- /**
- * Log an error to the ILog for this plugin
- *
- * @param message the localized error message text
- * @param exception the associated exception, or null
- */
- public static void logError(String message, Throwable exception) {
- plugin.getLog().log(new Status(
- IStatus.ERROR, plugin.getBundle().getSymbolicName(), 0, message, exception));
- }
-
- /**
- * Loads the resources.
- */
- public static void initResources() {
- if (images == null) {
- images = new Image[imageLocations.length];
-
- for (int i = 0; i < imageLocations.length; ++i) {
- images[i] = getImageFromPlugin(plugin.getBundle(), imageLocations[i]);
- if (images[i] == null) {
- freeResources();
- logError(getResourceString("error.CouldNotLoadResources"), null);
- throw new IllegalStateException();
- }
- }
- }
- if (browserFont == null) {
- try {
- browserFont = new Font (null, "MS Sans Serif", 8, SWT.NULL);
- } catch (Throwable ex) {
- }
- }
- if (images == null || browserFont == null) {
- freeResources();
- logError(getResourceString("error.CouldNotLoadResources"), null);
- throw new IllegalStateException();
- }
- }
-
- /**
- * Frees the resources
- */
- public static void freeResources() {
- if (images != null) {
- for (int i = 0; i < images.length; ++i) {
- final Image image = images[i];
- if (image != null) image.dispose();
- }
- images = null;
- }
- if (browserFont != null) browserFont.dispose ();
- browserFont = null;
- }
-
- /**
- * Gets an image from a path relative to the plugin install directory.
- *
- * @param pd the plugin descriptor for the plugin with the image
- * @param iconPath the path relative to the install directory
- * @return the image, or null if not found
- */
- private static Image getImageFromPlugin(Bundle bundle, String iconPath) {
- InputStream is = null;
- try {
- URL installUrl = bundle.getEntry("/");
- URL url = new URL(installUrl, iconPath);
- is = url.openConnection().getInputStream();
- ImageData source = new ImageData(is);
- ImageData mask = source.getTransparencyMask();
- Image image = new Image(null, source, mask);
- return image;
- } catch (Throwable ex) {
- return null;
- } finally {
- try {
- if (is != null) is.close();
- } catch (IOException e) {
- }
- }
- }
-}
diff --git a/examples/org.eclipse.swt.examples.ole.win32/src/org/eclipse/swt/examples/ole/win32/OleWebBrowser.java b/examples/org.eclipse.swt.examples.ole.win32/src/org/eclipse/swt/examples/ole/win32/OleWebBrowser.java
deleted file mode 100755
index 38d3534e6b..0000000000
--- a/examples/org.eclipse.swt.examples.ole.win32/src/org/eclipse/swt/examples/ole/win32/OleWebBrowser.java
+++ /dev/null
@@ -1,228 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.ole.win32;
-
-
-import org.eclipse.swt.ole.win32.*;
-
-/**
- * Wrapper for an OleAutomation object used to send commands
- * to a Win32 "Shell.Explorer" OLE control.
- *
- * Instances of this class manage the setup, typical use and teardown of
- * a simple web browser.
- */
-class OleWebBrowser {
- /* See the Windows Platform SDK documentation for more information about the
- * OLE control used here and its usage.
- */
- // Generated from typelib filename: shdocvw.dll
-
- // Constants for WebBrowser CommandStateChange
- public static final int CSC_UPDATECOMMANDS = -1;
- public static final int CSC_NAVIGATEFORWARD = 1;
- public static final int CSC_NAVIGATEBACK = 2;
-
- // COnstants for Web Browser ReadyState
- public static final int READYSTATE_UNINITIALIZED = 0;
- public static final int READYSTATE_LOADING = 1;
- public static final int READYSTATE_LOADED = 2;
- public static final int READYSTATE_INTERACTIVE = 3;
- public static final int READYSTATE_COMPLETE = 4;
-
- // Web Browser Control Events
- public static final int BeforeNavigate = 100; // Fired when a new hyperlink is being navigated to.
- public static final int NavigateComplete = 101; // Fired when the document being navigated to becomes visible and enters the navigation stack.
- public static final int StatusTextChange = 102; // Statusbar text changed.
- public static final int ProgressChange = 108; // Fired when download progress is updated.
- public static final int DownloadComplete = 104; // Download of page complete.
- public static final int CommandStateChange = 105; // The enabled state of a command changed
- public static final int DownloadBegin = 106; // Download of a page started.
- public static final int NewWindow = 107; // Fired when a new window should be created.
- public static final int TitleChange = 113; // Document title changed.
- public static final int FrameBeforeNavigate = 200; // Fired when a new hyperlink is being navigated to in a frame.
- public static final int FrameNavigateComplete = 201; // Fired when a new hyperlink is being navigated to in a frame.
- public static final int FrameNewWindow = 204; // Fired when a new window should be created.
- public static final int Quit = 103; // Fired when application is quiting.
- public static final int WindowMove = 109; // Fired when window has been moved.
- public static final int WindowResize = 110; // Fired when window has been sized.
- public static final int WindowActivate = 111; // Fired when window has been activated.
- public static final int PropertyChange = 112; // Fired when the PutProperty method has been called.
-
- // Web Browser properties
- public static final int DISPID_READYSTATE = -525;
-
- private OleAutomation oleAutomation;
-
- /**
- * Creates a Web browser control.
- * <p>
- * Typical use:<br>
- * <code>
- * OleControlSite oleControlSite = new OleControlSite(oleFrame, style, "Shell.Explorer");<br>
- * OleAutomation oleAutomation = new OleAutomation(oleControlSite);<br>
- * OleWebBrowser webBrowser = new OleWebBrowser(oleControlSite, oleAutomation);<br>
- * </code>
- *
- * @param oleAutomation the OleAutomation object for this control.
- * @param oleControlSite the OleControlSite object for this control.
- */
- public OleWebBrowser(OleAutomation oleAutomation) {
- this.oleAutomation = oleAutomation;
- }
-
-
- /**
- * Disposes of the Web browser control.
- */
- public void dispose() {
- if (oleAutomation != null) oleAutomation.dispose();
- oleAutomation = null;
- }
-
- /*
- * Interact with the Control via OLE Automation
- *
- * Note: You can hard code the DISPIDs if you know them beforehand
- * this is of course the fastest way, but you increase coupling
- * to the control.
- */
-
- /**
- * Returns the current web page title.
- *
- * @return the current web page title String
- */
- public String getLocationName() {
- // dispid=210, type=PROPGET, name="LocationName"
- int[] rgdispid = oleAutomation.getIDsOfNames(new String[]{"LocationName"});
- int dispIdMember = rgdispid[0];
- Variant pVarResult = oleAutomation.getProperty(dispIdMember);
- if (pVarResult == null || pVarResult.getType() != OLE.VT_BSTR) return null;
- return pVarResult.getString();
- }
-
- /**
- * Returns the current URL.
- *
- * @return the current URL String
- */
- public String getLocationURL() {
- // dispid=211, type=PROPGET, name="LocationURL"
- int[] rgdispid = oleAutomation.getIDsOfNames(new String[]{"LocationURL"});
- int dispIdMember = rgdispid[0];
-
- Variant pVarResult = oleAutomation.getProperty(dispIdMember);
- if (pVarResult == null || pVarResult.getType() != OLE.VT_BSTR) return null;
- return pVarResult.getString();
- }
-
- /**
- * Returns the current state of the control.
- *
- * @return the current state of the control, one of:
- * READYSTATE_UNINITIALIZED;
- * READYSTATE_LOADING;
- * READYSTATE_LOADED;
- * READYSTATE_INTERACTIVE;
- * READYSTATE_COMPLETE.
- */
- public int getReadyState() {
- // dispid=4294966771, type=PROPGET, name="ReadyState"
- int[] rgdispid = oleAutomation.getIDsOfNames(new String[]{"ReadyState"});
- int dispIdMember = rgdispid[0];
-
- Variant pVarResult = oleAutomation.getProperty(dispIdMember);
- if (pVarResult == null || pVarResult.getType() != OLE.VT_I4) return -1;
- return pVarResult.getInt();
- }
-
- /**
- * Navigates backwards through previously visited web sites.
- */
- public void GoBack() {
-
- // dispid=100, type=METHOD, name="GoBack"
- int[] rgdispid = oleAutomation.getIDsOfNames(new String[]{"GoBack"});
- int dispIdMember = rgdispid[0];
- oleAutomation.invoke(dispIdMember);
- }
-
- /**
- * Navigates backwards through previously visited web sites.
- */
- public void GoForward() {
-
- // dispid=101, type=METHOD, name="GoForward"
- int[] rgdispid = oleAutomation.getIDsOfNames(new String[]{"GoForward"});
- int dispIdMember = rgdispid[0];
- oleAutomation.invoke(dispIdMember);
- }
-
- /**
- * Navigates to home page.
- */
- public void GoHome() {
- // dispid=102, type=METHOD, name="GoHome"
- int[] rgdispid = oleAutomation.getIDsOfNames(new String[]{"GoHome"});
- int dispIdMember = rgdispid[0];
- oleAutomation.invoke(dispIdMember);
- }
-
- /**
- * Navigates to user-specified Web search gateway.
- */
- public void GoSearch() {
- // dispid=103, type=METHOD, name="GoSearch"
- int[] rgdispid = oleAutomation.getIDsOfNames(new String[]{"GoSearch"});
- int dispIdMember = rgdispid[0];
- oleAutomation.invoke(dispIdMember);
- }
-
- /**
- * Navigates to a particular URL.
- */
- public void Navigate(String url) {
- // dispid=104, type=METHOD, name="Navigate"
- int[] rgdispid = oleAutomation.getIDsOfNames(new String[]{"Navigate", "URL"});
- int dispIdMember = rgdispid[0];
-
- Variant[] rgvarg = new Variant[1];
- rgvarg[0] = new Variant(url);
- int[] rgdispidNamedArgs = new int[1];
- rgdispidNamedArgs[0] = rgdispid[1]; // identifier of argument
- oleAutomation.invoke(dispIdMember, rgvarg, rgdispidNamedArgs);
- }
-
- /**
- * Refreshes the currently viewed page.
- *
- * @return the platform-defined result code for the "Refresh" method invocation
- */
- public void Refresh(){
- // dispid= 4294966746, type=METHOD, name="Refresh"
- int[] rgdispid = oleAutomation.getIDsOfNames(new String[]{"Refresh"});
- int dispIdMember = rgdispid[0];
- oleAutomation.invokeNoReply(dispIdMember);
- }
-
- /**
- * Aborts loading of the currnet page.
- *
- * @return the platform-defined result code for the "Stop" method invocation
- */
- public void Stop() {
- // dispid=106, type=METHOD, name="Stop"
- int[] rgdispid = oleAutomation.getIDsOfNames(new String[]{"Stop"});
- int dispIdMember = rgdispid[0];
- oleAutomation.invoke(dispIdMember);
- }
-}
diff --git a/examples/org.eclipse.swt.examples.paint/.classpath b/examples/org.eclipse.swt.examples.paint/.classpath
deleted file mode 100755
index 065ac06e19..0000000000
--- a/examples/org.eclipse.swt.examples.paint/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/examples/org.eclipse.swt.examples.paint/.cvsignore b/examples/org.eclipse.swt.examples.paint/.cvsignore
deleted file mode 100755
index c5e82d7458..0000000000
--- a/examples/org.eclipse.swt.examples.paint/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin \ No newline at end of file
diff --git a/examples/org.eclipse.swt.examples.paint/.project b/examples/org.eclipse.swt.examples.paint/.project
deleted file mode 100644
index 8d39af0053..0000000000
--- a/examples/org.eclipse.swt.examples.paint/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.swt.examples.paint</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.PluginNature</nature>
- </natures>
-</projectDescription>
diff --git a/examples/org.eclipse.swt.examples.paint/about.html b/examples/org.eclipse.swt.examples.paint/about.html
deleted file mode 100644
index 9db411aab9..0000000000
--- a/examples/org.eclipse.swt.examples.paint/about.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<title>About</title>
-<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>20th June, 2002</p>
-<h3>License</h3>
-<p>Eclipse.org makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise indicated below, the Content is provided to you under the terms and conditions of the
-Common Public License Version 1.0 (&quot;CPL&quot;). A copy of the CPL is available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>.
-For purposes of the CPL, &quot;Program&quot; will mean the Content.</p>
-
-<h3>Contributions</h3>
-
-<p>If this Content is licensed to you under the terms and conditions of the CPL, any Contributions, as defined in the CPL, uploaded, submitted, or otherwise
-made available to Eclipse.org, members of Eclipse.org and/or the host of Eclipse.org web site, by you that relate to such
-Content are provided under the terms and conditions of the CPL and can be made available to others under the terms of the CPL.</p>
-
-<p>If this Content is licensed to you under license terms and conditions other than the CPL (&quot;Other License&quot;), any modifications, enhancements and/or
-other code and/or documentation (&quot;Modifications&quot;) uploaded, submitted, or otherwise made available to Eclipse.org, members of Eclipse.org and/or the
-host of Eclipse.org, by you that relate to such Content are provided under terms and conditions of the Other License and can be made available
-to others under the terms of the Other License. In addition, with regard to Modifications for which you are the copyright holder, you are also
-providing the Modifications under the terms and conditions of the CPL and such Modifications can be made available to others under the terms of
-the CPL.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/examples/org.eclipse.swt.examples.paint/build.properties b/examples/org.eclipse.swt.examples.paint/build.properties
deleted file mode 100755
index c899ccc30a..0000000000
--- a/examples/org.eclipse.swt.examples.paint/build.properties
+++ /dev/null
@@ -1,20 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2003 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Common Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/cpl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-bin.includes = doc-html/,\
- icons/,\
- plugin.properties,\
- plugin.xml,\
- about.html,\
- *.jar
-
-src.includes = about.html
-
-source.paint.jar = src/
diff --git a/examples/org.eclipse.swt.examples.paint/doc-html/hglegal.htm b/examples/org.eclipse.swt.examples.paint/doc-html/hglegal.htm
deleted file mode 100755
index 621115699c..0000000000
--- a/examples/org.eclipse.swt.examples.paint/doc-html/hglegal.htm
+++ /dev/null
@@ -1,14 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <LINK REL="stylesheet" HREF="../../../book.css" CHARSET="ISO-8859-1" TYPE="text/css">
- <title>Legal Notices</title>
-</head>
-<body>
-
-<h3>
-<a NAME="Notices"></a>Notices</h3>
-(c) Copyright (c) 2000, 2004 IBM Corporation and others. All Rights Reserved.
-</body>
-</html>
diff --git a/examples/org.eclipse.swt.examples.paint/doc-html/ngibmcpy.gif b/examples/org.eclipse.swt.examples.paint/doc-html/ngibmcpy.gif
deleted file mode 100755
index c786e43e1f..0000000000
--- a/examples/org.eclipse.swt.examples.paint/doc-html/ngibmcpy.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples.paint/doc-html/swt_paint_ex.html b/examples/org.eclipse.swt.examples.paint/doc-html/swt_paint_ex.html
deleted file mode 100755
index 919f78d4b6..0000000000
--- a/examples/org.eclipse.swt.examples.paint/doc-html/swt_paint_ex.html
+++ /dev/null
@@ -1,38 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <title>SWT - Paint Tool</title>
-</head>
-<body>
-
-<h2>SWT example - Paint Tool</h2>
-
-<p>
-This example demonstrates the use of SWT graphics operations in the form of a
-rudimentary bitmap painting program. The Paint Tool implementation also
-demonstrates a mechanism for managing timed GUI operations in the background
-that are triggered by user input.
-</p>
-<p>
-Select a tool with which to draw in the drawing area. There are a number of tools
-to choose from on the toolbar. To change the color selection, click on a color in the
-palette below the drawing area; left-click to set the foreground color, right-click to set the
-background color.
-</p>
-
-<h3>Running the example</h3>
-
-<p>
-From Eclipse's <strong>Window</strong> menu select <strong>Show View</strong> &gt; <strong>Other</strong>.
-In the <strong>Show View</strong> dialog, expand <strong>SWT Examples</strong> and select
-the view named <strong>Paint</strong>. A view containing the paint program will appear.
-</p>
-<p>
-This example can also be run using the <a href="../../org.eclipse.swt.examples.launcher/doc-html/swt_launcher_ex.html">Example Launcher</a>.
-Select the <strong>Paint</strong> item from the <strong>Workbench Views</strong> category and click <strong>Run</strong>.
-</p>
-
-<p><a href="hglegal.htm"><img SRC="ngibmcpy.gif" ALT="Copyright IBM Corporation and others 2000, 2004. All Rights Reserved." BORDER=0 height=14 width=324></a></p>
-</body>
-</html>
diff --git a/examples/org.eclipse.swt.examples.paint/icons/fill_none.gif b/examples/org.eclipse.swt.examples.paint/icons/fill_none.gif
deleted file mode 100755
index d26dd584e7..0000000000
--- a/examples/org.eclipse.swt.examples.paint/icons/fill_none.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples.paint/icons/fill_outline.gif b/examples/org.eclipse.swt.examples.paint/icons/fill_outline.gif
deleted file mode 100755
index c6ccfee10e..0000000000
--- a/examples/org.eclipse.swt.examples.paint/icons/fill_outline.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples.paint/icons/fill_solid.gif b/examples/org.eclipse.swt.examples.paint/icons/fill_solid.gif
deleted file mode 100755
index cb34e64a30..0000000000
--- a/examples/org.eclipse.swt.examples.paint/icons/fill_solid.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples.paint/icons/linestyle_dash.gif b/examples/org.eclipse.swt.examples.paint/icons/linestyle_dash.gif
deleted file mode 100644
index fb57bb38b7..0000000000
--- a/examples/org.eclipse.swt.examples.paint/icons/linestyle_dash.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples.paint/icons/linestyle_dashdot.gif b/examples/org.eclipse.swt.examples.paint/icons/linestyle_dashdot.gif
deleted file mode 100644
index 322968c30b..0000000000
--- a/examples/org.eclipse.swt.examples.paint/icons/linestyle_dashdot.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples.paint/icons/linestyle_dot.gif b/examples/org.eclipse.swt.examples.paint/icons/linestyle_dot.gif
deleted file mode 100644
index 4937ccb06d..0000000000
--- a/examples/org.eclipse.swt.examples.paint/icons/linestyle_dot.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples.paint/icons/linestyle_solid.gif b/examples/org.eclipse.swt.examples.paint/icons/linestyle_solid.gif
deleted file mode 100644
index 70a57ce2c4..0000000000
--- a/examples/org.eclipse.swt.examples.paint/icons/linestyle_solid.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples.paint/icons/options_font.gif b/examples/org.eclipse.swt.examples.paint/icons/options_font.gif
deleted file mode 100755
index 965fe08560..0000000000
--- a/examples/org.eclipse.swt.examples.paint/icons/options_font.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples.paint/icons/paint_example.gif b/examples/org.eclipse.swt.examples.paint/icons/paint_example.gif
deleted file mode 100755
index c48d9a9567..0000000000
--- a/examples/org.eclipse.swt.examples.paint/icons/paint_example.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples.paint/icons/tool_airbrush.gif b/examples/org.eclipse.swt.examples.paint/icons/tool_airbrush.gif
deleted file mode 100755
index a310edddb2..0000000000
--- a/examples/org.eclipse.swt.examples.paint/icons/tool_airbrush.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples.paint/icons/tool_ellipse.gif b/examples/org.eclipse.swt.examples.paint/icons/tool_ellipse.gif
deleted file mode 100755
index dc2142f8e2..0000000000
--- a/examples/org.eclipse.swt.examples.paint/icons/tool_ellipse.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples.paint/icons/tool_line.gif b/examples/org.eclipse.swt.examples.paint/icons/tool_line.gif
deleted file mode 100755
index 2ff819f129..0000000000
--- a/examples/org.eclipse.swt.examples.paint/icons/tool_line.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples.paint/icons/tool_pencil.gif b/examples/org.eclipse.swt.examples.paint/icons/tool_pencil.gif
deleted file mode 100755
index f16a234c13..0000000000
--- a/examples/org.eclipse.swt.examples.paint/icons/tool_pencil.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples.paint/icons/tool_polyline.gif b/examples/org.eclipse.swt.examples.paint/icons/tool_polyline.gif
deleted file mode 100755
index aa384e9b30..0000000000
--- a/examples/org.eclipse.swt.examples.paint/icons/tool_polyline.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples.paint/icons/tool_rectangle.gif b/examples/org.eclipse.swt.examples.paint/icons/tool_rectangle.gif
deleted file mode 100755
index d26dd584e7..0000000000
--- a/examples/org.eclipse.swt.examples.paint/icons/tool_rectangle.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples.paint/icons/tool_roundedrectangle.gif b/examples/org.eclipse.swt.examples.paint/icons/tool_roundedrectangle.gif
deleted file mode 100755
index bf845d7602..0000000000
--- a/examples/org.eclipse.swt.examples.paint/icons/tool_roundedrectangle.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples.paint/icons/tool_text.gif b/examples/org.eclipse.swt.examples.paint/icons/tool_text.gif
deleted file mode 100755
index 0d7457ffa3..0000000000
--- a/examples/org.eclipse.swt.examples.paint/icons/tool_text.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples.paint/plugin.properties b/examples/org.eclipse.swt.examples.paint/plugin.properties
deleted file mode 100755
index 4e0a80b60f..0000000000
--- a/examples/org.eclipse.swt.examples.paint/plugin.properties
+++ /dev/null
@@ -1,134 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2003 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Common Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/cpl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-providerName = Eclipse.org
-plugin.SWTPaintExample.name = SWT Paint Example Plugin
-category.SWTExamples.name = SWT Examples
-view.PaintExample.name = Paint
-
-launchcategory.SWTViewExamples.name = Workbench Views
-launchcategory.SWTViewExamples.description = \
- A collection of Standard Widget Toolkit examples that run as Views inside the Workbench. \
- These examples will create a new View in the current Perspective.
-
-launchitem.PaintExample.name = Paint
-launchitem.PaintExample.description = \
- This example demonstrates the use of SWT graphics operations in the form of a \
- rudimentary bitmap painting program. The Airbrush Tool implementation also \
- demonstrates a mechanism for managing timed GUI operations in the background \
- that are triggered by user input.\n\n\
- Select a tool with which to draw in the drawing area. There are a number of tools \
- to choose from on the toolbar. To change the color selection, click on a color in the \
- palette below the drawing area: left-click for the foreground color, right-click for the \
- background color.\n\n\
- Uses SWT's GC and FontDialog, and JFace's InputDialog and action set support.
-
-menu.Tools.label = Tools
-menu.Options.label = Options
-
-tool.Pencil.label = Pencil
-tool.Pencil.tooltip = Pencil tool
-tool.Pencil.image = icons/tool_pencil.gif
-tool.Pencil.description = Selects the Pencil tool.
-
-tool.Airbrush.label = Airbrush
-tool.Airbrush.tooltip = Airbrush tool
-tool.Airbrush.image = icons/tool_airbrush.gif
-tool.Airbrush.description = Selects the Airbrush tool.
-
-tool.Line.label = Line
-tool.Line.tooltip = Line tool
-tool.Line.image = icons/tool_line.gif
-tool.Line.description = Selects the Line tool.
-
-tool.PolyLine.label = Polygon
-tool.PolyLine.tooltip = Polygon tool
-tool.PolyLine.image = icons/tool_polyline.gif
-tool.PolyLine.description = Selects the PolyLine tool.
-
-tool.Rectangle.label = Rectangle
-tool.Rectangle.tooltip = Rectangle tool
-tool.Rectangle.image = icons/tool_rectangle.gif
-tool.Rectangle.description = Selects the Rectangle tool.
-
-tool.Ellipse.label = Ellipse
-tool.Ellipse.tooltip = Ellipse tool
-tool.Ellipse.image = icons/tool_ellipse.gif
-tool.Ellipse.description = Selects the Ellipse tool.
-
-tool.RoundedRectangle.label = Rounded Rectangle
-tool.RoundedRectangle.tooltip = Rounded Rectangle
-tool.RoundedRectangle.image = icons/tool_roundedrectangle.gif
-tool.RoundedRectangle.description = Selects the Rounded Rectangle tool.
-
-tool.Text.label = Text
-tool.Text.tooltip = Text tool
-tool.Text.image = icons/tool_text.gif
-tool.Text.description = Selects the Text tool.
-tool.Text.settings.defaulttext = Hello!
-tool.Text.dialog.title = Text Tool Settings
-tool.Text.dialog.message = Please enter the new text string to be painted.
-
-tool.Null.label = <none>
-
-fill.None.label = No Fill
-fill.None.tooltip = No fill mode
-fill.None.image = icons/fill_none.gif
-fill.None.description = Selects No Fill mode.
-
-fill.Outline.label = Outline Fill
-fill.Outline.tooltip = Outline fill mode
-fill.Outline.image = icons/fill_outline.gif
-fill.Outline.description = Selects Outline Fill mode.
-
-fill.Solid.label = Solid Fill
-fill.Solid.tooltip = Solid fill mode
-fill.Solid.image = icons/fill_solid.gif
-fill.Solid.description = Selects Solid Fill mode.
-
-linestyle.Solid.label = Solid Line
-linestyle.Solid.tooltip = Solid line style
-linestyle.Solid.image = icons/linestyle_solid.gif
-linestyle.Solid.description = Select Solid Line style.
-
-linestyle.Dot.label = Dotted Line
-linestyle.Dot.tooltip = Dotted line style
-linestyle.Dot.image = icons/linestyle_dot.gif
-linestyle.Dot.description = Select Dotted Line style.
-
-linestyle.Dash.label = Dashed Line
-linestyle.Dash.tooltip = Dashed line style
-linestyle.Dash.image = icons/linestyle_dash.gif
-linestyle.Dash.description = Select Dashed Line style.
-
-linestyle.DashDot.label = Dash-Dot Line
-linestyle.DashDot.tooltip = Dash-Dot line style
-linestyle.DashDot.image = icons/linestyle_dashdot.gif
-linestyle.DashDot.description = Select Dash-Dot Line style.
-
-options.Font.label = Text Tool Font
-options.Font.tooltip = Select Text Tool font
-options.Font.image = icons/options_font.gif
-options.Font.description = Selects Text Tool font.
-options.Font.dialog.title = Text Tool Font
-
-settings.AirbrushRadius.text = Airbrush Radius
-settings.AirbrushIntensity.text = Airbrush Intensity
-
-session.Null.message = Select a tool...
-session.ContinuousPaint.message = Click and drag to draw...
-session.DragInteractivePaint.message = Click and drag to preview, release to draw, right-click to cancel...
-session.SegmentedInteractivePaint.message.anchorMode = Click to set anchor...
-session.SegmentedInteractivePaint.message.interactiveMode = Click to draw, double-click to close figure, right-click to cancel...
-session.Text.message = Click to draw text, right-click to edit text...
-
-status.Coord.format = ({0}, {1})
-status.CoordRange.format = ({0}, {1}) - ({2}, {3})
-status.Bar.format = {0} : {1} {2}
diff --git a/examples/org.eclipse.swt.examples.paint/plugin.xml b/examples/org.eclipse.swt.examples.paint/plugin.xml
deleted file mode 100755
index 97b37506fc..0000000000
--- a/examples/org.eclipse.swt.examples.paint/plugin.xml
+++ /dev/null
@@ -1,61 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<plugin
- id="org.eclipse.swt.examples.paint"
- name="%plugin.SWTPaintExample.name"
- version="3.1.0"
- provider-name="%providerName"
- class="org.eclipse.swt.examples.paint.PaintPlugin">
-
-<!-- Runtime -->
- <runtime>
- <library name="paint.jar">
- <packages prefixes="org.eclipse.swt.examples.paint"/>
- </library>
- </runtime>
-<!-- Required plugins -->
- <requires>
- <import plugin="org.eclipse.ui.ide"/>
- <import plugin="org.eclipse.ui.views"/>
- <import plugin="org.eclipse.jface.text"/>
- <import plugin="org.eclipse.ui.workbench.texteditor"/>
- <import plugin="org.eclipse.ui.editors"/>
- <import plugin="org.eclipse.core.runtime"/>
- <import plugin="org.eclipse.core.resources"/>
- <import plugin="org.eclipse.ui"/>
- <import plugin="org.eclipse.swt"/>
- </requires>
-
-
-<!-- Extension points -->
-<!-- Extensions -->
- <extension
- point="org.eclipse.ui.views">
- <view
- name="%view.PaintExample.name"
- icon="icons/paint_example.gif"
- category="org.eclipse.swt.examples.category"
- class="org.eclipse.swt.examples.paint.PaintView"
- id="org.eclipse.swt.examples.paint.view">
- </view>
- </extension>
- <extension
- point="org.eclipse.swt.examples.launcher.launchItems">
- <category
- name="%launchcategory.SWTViewExamples.name"
- description="%launchcategory.SWTViewExamples.description"
- id="org.eclipse.swt.examples.launchViewCategory">
- </category>
- <item
- name="%launchitem.PaintExample.name"
- icon="icons/paint_example.gif"
- description="%launchitem.PaintExample.description"
- category="org.eclipse.swt.examples.launchViewCategory"
- id="org.eclipse.swt.examples.paint.viewlauncher">
- <view
- viewId="org.eclipse.swt.examples.paint.view">
- </view>
- </item>
- </extension>
-
-</plugin>
diff --git a/examples/org.eclipse.swt.examples.paint/src/import.properties b/examples/org.eclipse.swt.examples.paint/src/import.properties
deleted file mode 100644
index 58344f0d3e..0000000000
--- a/examples/org.eclipse.swt.examples.paint/src/import.properties
+++ /dev/null
@@ -1,14 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2003 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Common Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/cpl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-# Persist project settings for later import
-natures = org.eclipse.jdt.core.javanature; org.eclipse.pde.PluginNature
-builders = org.eclipse.jdt.core.javabuilder; org.eclipse.pde.ManifestBuilder; org.eclipse.pde.SchemaBuilder
-var.ECLIPSE_PLUGINS = <<ECLIPSE_PLUGINS>>
diff --git a/examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/AirbrushTool.java b/examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/AirbrushTool.java
deleted file mode 100755
index 5730b4dc13..0000000000
--- a/examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/AirbrushTool.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.paint;
-
-
-import java.util.Random;
-import org.eclipse.swt.graphics.*;
-
-/**
- * An airbrush tool.
- */
-public class AirbrushTool extends ContinuousPaintSession implements PaintTool {
- private ToolSettings settings;
- private Random random;
- private int cachedRadiusSquared;
- private int cachedNumPoints;
-
- /**
- * Constructs a Tool.
- *
- * @param toolSettings the new tool settings
- * @param paintSurface the PaintSurface we will render on.
- */
- public AirbrushTool(ToolSettings toolSettings, PaintSurface paintSurface) {
- super(paintSurface);
- random = new Random();
- setRetriggerTimer(10);
- set(toolSettings);
- }
-
- /**
- * Sets the tool's settings.
- *
- * @param toolSettings the new tool settings
- */
- public void set(ToolSettings toolSettings) {
- // compute things we need to know for drawing
- settings = toolSettings;
- cachedRadiusSquared = settings.airbrushRadius * settings.airbrushRadius;
- cachedNumPoints = 314 * settings.airbrushIntensity * cachedRadiusSquared / 250000;
- if (cachedNumPoints == 0 && settings.airbrushIntensity != 0)
- cachedNumPoints = 1;
- }
-
- /**
- * Returns the name associated with this tool.
- *
- * @return the localized name of this tool
- */
- public String getDisplayName() {
- return PaintPlugin.getResourceString("tool.Airbrush.label");
- }
-
- /*
- * Template method for drawing
- */
- protected void render(Point point) {
- // Draws a bunch (cachedNumPoints) of random pixels within a specified circle (cachedRadiusSquared).
- ContainerFigure cfig = new ContainerFigure();
-
- for (int i = 0; i < cachedNumPoints; ++i) {
- int randX, randY;
- do {
- randX = (int) ((random.nextDouble() - 0.5) * settings.airbrushRadius * 2.0);
- randY = (int) ((random.nextDouble() - 0.5) * settings.airbrushRadius * 2.0);
- } while (randX * randX + randY * randY > cachedRadiusSquared);
- cfig.add(new PointFigure(settings.commonForegroundColor, point.x + randX, point.y + randY));
- }
- getPaintSurface().drawFigure(cfig);
- }
-}
diff --git a/examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/BasicPaintSession.java b/examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/BasicPaintSession.java
deleted file mode 100755
index 9732189930..0000000000
--- a/examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/BasicPaintSession.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.paint;
-
-
-public abstract class BasicPaintSession implements PaintSession {
- /**
- * The paint surface
- */
- private PaintSurface paintSurface;
-
- /**
- * Constructs a PaintSession.
- *
- * @param paintSurface the drawing surface to use
- */
- protected BasicPaintSession(PaintSurface paintSurface) {
- this.paintSurface = paintSurface;
- }
-
- /**
- * Returns the paint surface associated with this paint session.
- *
- * @return the associated PaintSurface
- */
- public PaintSurface getPaintSurface() {
- return paintSurface;
- }
-}
diff --git a/examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/ContainerFigure.java b/examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/ContainerFigure.java
deleted file mode 100755
index 135067cf4b..0000000000
--- a/examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/ContainerFigure.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.paint;
-
-
-import org.eclipse.swt.graphics.*;
-
-/**
- * Container for Figure objects with stacking preview mechanism.
- */
-public class ContainerFigure extends Figure {
- private static final int INITIAL_ARRAY_SIZE = 16;
-
- Figure[] objectStack = null;
- int nextIndex = 0;
-
- /**
- * Constructs an empty Container
- */
- public ContainerFigure() {
- }
- /**
- * Adds an object to the container for later drawing.
- *
- * @param object the object to add to the drawing list
- */
- public void add(Figure object) {
- if (objectStack == null) {
- objectStack = new Figure[INITIAL_ARRAY_SIZE];
- } else if (objectStack.length <= nextIndex) {
- Figure[] newObjectStack = new Figure[objectStack.length * 2];
- System.arraycopy(objectStack, 0, newObjectStack, 0, objectStack.length);
- objectStack = newObjectStack;
- }
- objectStack[nextIndex] = object;
- ++nextIndex;
- }
- /**
- * Determines if the container is empty.
- * @return true if the container is empty
- */
- public boolean isEmpty() {
- return nextIndex == 0;
- }
- /**
- * Adds an object to the container and draws its preview then updates the supplied preview state.
- *
- * @param object the object to add to the drawing list
- * @param gc the GC to draw on
- * @param offset the offset to add to virtual coordinates to get display coordinates
- * @param rememberedState the state returned by a previous drawPreview() or addAndPreview()
- * using this Container, may be null if there was no such previous call
- * @return object state that must be passed to erasePreview() later to erase this object
- */
-// public Object addAndPreview(Figure object, GC gc, Point offset, Object rememberedState) {
-// Object[] stateStack = (Object[]) rememberedState;
-// if (stateStack == null) {
-// stateStack = new Object[INITIAL_ARRAY_SIZE];
-// } else if (stateStack.length <= nextIndex) {
-// Object[] newStateStack = new Object[stateStack.length * 2];
-// System.arraycopy(stateStack, 0, newStateStack, 0, stateStack.length);
-// stateStack = newStateStack;
-// }
-// add(object);
-// stateStack[nextIndex - 1] = object.drawPreview(gc, offset);
-// return stateStack;
-// }
- /**
- * Clears the container.
- * <p>
- * Note that erasePreview() cannot be called after this point to erase any previous
- * drawPreview()'s.
- * </p>
- */
- public void clear() {
- while (--nextIndex > 0) objectStack[nextIndex] = null;
- nextIndex = 0;
- }
- public void draw(FigureDrawContext fdc) {
- for (int i = 0; i < nextIndex; ++i) objectStack[i].draw(fdc);
- }
- public void addDamagedRegion(FigureDrawContext fdc, Region region) {
- for (int i = 0; i < nextIndex; ++i) objectStack[i].addDamagedRegion(fdc, region);
- }
-}
diff --git a/examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/ContinuousPaintSession.java b/examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/ContinuousPaintSession.java
deleted file mode 100755
index 49a724ca02..0000000000
--- a/examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/ContinuousPaintSession.java
+++ /dev/null
@@ -1,234 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.paint;
-
-
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.widgets.*;
-
-/**
- * The superclass for paint tools that draw continuously along the path
- * traced by the mouse's movement while the button is depressed
- */
-public abstract class ContinuousPaintSession extends BasicPaintSession {
- /**
- * True if a click-drag is in progress.
- */
- private boolean dragInProgress = false;
-
- /**
- * A cached Point array for drawing.
- */
- private Point[] points = new Point[] { new Point(-1, -1), new Point(-1, -1) };
-
- /**
- * The time to wait between retriggers in milliseconds.
- */
- private int retriggerInterval = 0;
-
- /**
- * The currently valid RetriggerHandler
- */
- protected Runnable retriggerHandler = null;
-
- /**
- * Constructs a ContinuousPaintSession.
- *
- * @param paintSurface the drawing surface to use
- */
- protected ContinuousPaintSession(PaintSurface paintSurface) {
- super(paintSurface);
- }
-
- /**
- * Sets the retrigger timer.
- * <p>
- * After the timer elapses, if the mouse is still hovering over the same point with the
- * drag button pressed, a new render order is issued and the timer is restarted.
- * </p>
- * @param interval the time in milliseconds to wait between retriggers, 0 to disable
- */
- public void setRetriggerTimer(int interval) {
- retriggerInterval = interval;
- }
-
- /**
- * Activates the tool.
- */
- public void beginSession() {
- getPaintSurface().
- setStatusMessage(PaintPlugin.getResourceString("session.ContinuousPaint.message"));
- dragInProgress = false;
- }
-
- /**
- * Deactivates the tool.
- */
- public void endSession() {
- abortRetrigger();
- }
-
- /**
- * Aborts the current operation.
- */
- public void resetSession() {
- abortRetrigger();
- }
-
- /**
- * Handles a mouseDown event.
- *
- * @param event the mouse event detail information
- */
- public final void mouseDown(MouseEvent event) {
- if (event.button != 1) return;
- if (dragInProgress) return; // spurious event
- dragInProgress = true;
-
- points[0].x = event.x;
- points[0].y = event.y;
- render(points[0]);
- prepareRetrigger();
- }
-
- /**
- * Handles a mouseDoubleClick event.
- *
- * @param event the mouse event detail information
- */
- public final void mouseDoubleClick(MouseEvent event) {
- }
-
- /**
- * Handles a mouseUp event.
- *
- * @param event the mouse event detail information
- */
- public final void mouseUp(MouseEvent event) {
- if (event.button != 1) return;
- if (! dragInProgress) return; // spurious event
- abortRetrigger();
- mouseSegmentFinished(event);
- dragInProgress = false;
- }
-
- /**
- * Handles a mouseMove event.
- *
- * @param event the mouse event detail information
- */
- public final void mouseMove(MouseEvent event) {
- final PaintSurface ps = getPaintSurface();
- ps.setStatusCoord(ps.getCurrentPosition());
- if (! dragInProgress) return;
- mouseSegmentFinished(event);
- prepareRetrigger();
- }
-
- /**
- * Handle a rendering segment
- *
- * @param event the mouse event detail information
- */
- private final void mouseSegmentFinished(MouseEvent event) {
- if (points[0].x == -1) return; // spurious event
- if (points[0].x != event.x || points[0].y != event.y) {
- // draw new segment
- points[1].x = event.x;
- points[1].y = event.y;
- renderContinuousSegment();
- }
- }
-
- /**
- * Draws a continuous segment from points[0] to points[1].
- * Assumes points[0] has been drawn already.
- *
- * @post points[0] will refer to the same point as points[1]
- */
- protected void renderContinuousSegment() {
- /* A lazy but effective line drawing algorithm */
- final int dX = points[1].x - points[0].x;
- final int dY = points[1].y - points[0].y;
- int absdX = Math.abs(dX);
- int absdY = Math.abs(dY);
-
- if ((dX == 0) && (dY == 0)) return;
-
- if (absdY > absdX) {
- final int incfpX = (dX << 16) / absdY;
- final int incY = (dY > 0) ? 1 : -1;
- int fpX = points[0].x << 16; // X in fixedpoint format
-
- while (--absdY >= 0) {
- points[0].y += incY;
- points[0].x = (fpX += incfpX) >> 16;
- render(points[0]);
- }
- if (points[0].x == points[1].x) return;
- points[0].x = points[1].x;
- } else {
- final int incfpY = (dY << 16) / absdX;
- final int incX = (dX > 0) ? 1 : -1;
- int fpY = points[0].y << 16; // Y in fixedpoint format
-
- while (--absdX >= 0) {
- points[0].x += incX;
- points[0].y = (fpY += incfpY) >> 16;
- render(points[0]);
- }
- if (points[0].y == points[1].y) return;
- points[0].y = points[1].y;
- }
- render(points[0]);
- }
-
- /**
- * Prepare the retrigger timer
- */
- private final void prepareRetrigger() {
- if (retriggerInterval > 0) {
- /*
- * timerExec() provides a lightweight mechanism for running code at intervals from within
- * the event loop when timing accuracy is not important.
- *
- * Since it is not possible to cancel a timerExec(), we remember the Runnable that is
- * active in order to distinguish the valid one from the stale ones. In practice,
- * if the interval is 1/100th of a second, then creating a few hundred new RetriggerHandlers
- * each second will not cause a significant performance hit.
- */
- Display display = getPaintSurface().getDisplay();
- retriggerHandler = new Runnable() {
- public void run() {
- if (retriggerHandler == this) {
- render(points[0]);
- prepareRetrigger();
- }
- }
- };
- display.timerExec(retriggerInterval, retriggerHandler);
- }
- }
-
- /**
- * Aborts the retrigger timer
- */
- private final void abortRetrigger() {
- retriggerHandler = null;
- }
-
- /**
- * Template method: Renders a point.
- * @param point, the point to render
- */
- protected abstract void render(Point point);
-}
diff --git a/examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/DragPaintSession.java b/examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/DragPaintSession.java
deleted file mode 100755
index 539c3b567c..0000000000
--- a/examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/DragPaintSession.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.paint;
-
-
-import org.eclipse.swt.events.MouseEvent;
-import org.eclipse.swt.graphics.*;
-
-/**
- * The superclass for paint tools that use click-drag-release motions to
- * draw objects.
- */
-public abstract class DragPaintSession extends BasicPaintSession {
- /**
- * True if a click-drag is in progress
- */
- private boolean dragInProgress = false;
-
- /**
- * The position of the first click in a click-drag
- */
- private Point anchorPosition = new Point(-1, -1);
-
- /**
- * A temporary point
- */
- private Point tempPosition = new Point(-1, -1);
-
- /**
- * Constructs a PaintSession.
- *
- * @param getPaintSurface() the drawing surface to use
- */
- protected DragPaintSession(PaintSurface paintSurface) {
- super(paintSurface);
- }
-
- /**
- * Activates the tool.
- */
- public void beginSession() {
- getPaintSurface().
- setStatusMessage(PaintPlugin.getResourceString("session.DragInteractivePaint.message"));
- anchorPosition.x = -1;
- dragInProgress = false;
- }
-
- /**
- * Deactivates the tool.
- */
- public void endSession() {
- }
-
- /**
- * Resets the tool.
- * Aborts any operation in progress.
- */
- public void resetSession() {
- getPaintSurface().clearRubberbandSelection();
- anchorPosition.x = -1;
- dragInProgress = false;
- }
-
- /**
- * Handles a mouseDown event.
- *
- * @param event the mouse event detail information
- */
- public void mouseDown(MouseEvent event) {
- if (event.button != 1) return;
- if (dragInProgress) return; // spurious event
- dragInProgress = true;
-
- anchorPosition.x = event.x;
- anchorPosition.y = event.y;
- }
-
- /**
- * Handles a mouseDoubleClick event.
- *
- * @param event the mouse event detail information
- */
- public void mouseDoubleClick(MouseEvent event) {
- }
-
- /**
- * Handles a mouseUp event.
- *
- * @param event the mouse event detail information
- */
- public void mouseUp(MouseEvent event) {
- if (event.button != 1) {
- resetSession(); // abort if right or middle mouse button pressed
- return;
- }
- if (! dragInProgress) return; // spurious event
- dragInProgress = false;
- if (anchorPosition.x == -1) return; // spurious event
-
- getPaintSurface().commitRubberbandSelection();
- }
-
- /**
- * Handles a mouseMove event.
- *
- * @param event the mouse event detail information
- */
- public void mouseMove(MouseEvent event) {
- final PaintSurface ps = getPaintSurface();
- if (! dragInProgress) {
- ps.setStatusCoord(ps.getCurrentPosition());
- return;
- }
- ps.setStatusCoordRange(anchorPosition, ps.getCurrentPosition());
- ps.clearRubberbandSelection();
- tempPosition.x = event.x;
- tempPosition.y = event.y;
- ps.addRubberbandSelection(createFigure(anchorPosition, tempPosition));
- }
-
- /**
- * Template Method: Creates a Figure for drawing rubberband entities and the final product
- *
- * @param anchor the anchor point
- * @param cursor the point marking the current pointer location
- */
- protected abstract Figure createFigure(Point anchor, Point cursor);
-}
diff --git a/examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/EllipseFigure.java b/examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/EllipseFigure.java
deleted file mode 100755
index e6a5907b8d..0000000000
--- a/examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/EllipseFigure.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.paint;
-
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.graphics.*;
-
-/**
- * 2D Ellipse object
- */
-public class EllipseFigure extends Figure {
- private Color foregroundColor, backgroundColor;
- private int lineStyle, x1, y1, x2, y2;
- /**
- * Constructs an Ellipse
- * These objects are defined by any two diametrically opposing corners of a box
- * bounding the ellipse.
- *
- * @param color the color for this object
- * @param lineStyle the line style for this object
- * @param x1 the virtual X coordinate of the first corner
- * @param y1 the virtual Y coordinate of the first corner
- * @param x2 the virtual X coordinate of the second corner
- * @param y2 the virtual Y coordinate of the second corner
- */
- public EllipseFigure(Color foregroundColor, Color backgroundColor, int lineStyle, int x1, int y1, int x2, int y2) {
- this.foregroundColor = foregroundColor;
- this.backgroundColor = backgroundColor;
- this.lineStyle = lineStyle;
- this.x1 = x1; this.y1 = y1; this.x2 = x2; this.y2 = y2;
- }
- public void draw(FigureDrawContext fdc) {
- Rectangle r = fdc.toClientRectangle(x1, y1, x2, y2);
- fdc.gc.setForeground(foregroundColor);
- fdc.gc.setBackground(backgroundColor);
- fdc.gc.setLineStyle(lineStyle);
- fdc.gc.drawOval(r.x, r.y, r.width - 1, r.height - 1);
- fdc.gc.setLineStyle(SWT.LINE_SOLID);
- }
- public void addDamagedRegion(FigureDrawContext fdc, Region region) {
- region.add(fdc.toClientRectangle(x1, y1, x2, y2));
- }
-}
diff --git a/examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/EllipseTool.java b/examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/EllipseTool.java
deleted file mode 100755
index 785879cdeb..0000000000
--- a/examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/EllipseTool.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.paint;
-
-
-import org.eclipse.swt.graphics.*;
-
-/**
- * A drawing tool.
- */
-public class EllipseTool extends DragPaintSession implements PaintTool {
- private ToolSettings settings;
-
- /**
- * Constructs a EllipseTool.
- *
- * @param toolSettings the new tool settings
- * @param paintSurface the PaintSurface we will render on.
- */
- public EllipseTool(ToolSettings toolSettings, PaintSurface paintSurface) {
- super(paintSurface);
- set(toolSettings);
- }
-
- /**
- * Sets the tool's settings.
- *
- * @param toolSettings the new tool settings
- */
- public void set(ToolSettings toolSettings) {
- settings = toolSettings;
- }
-
- /**
- * Returns name associated with this tool.
- *
- * @return the localized name of this tool
- */
- public String getDisplayName() {
- return PaintPlugin.getResourceString("tool.Ellipse.label");
- }
-
- /*
- * Template methods for drawing
- */
- protected Figure createFigure(Point a, Point b) {
- ContainerFigure container = new ContainerFigure();
- if (settings.commonFillType != ToolSettings.ftNone)
- container.add(new SolidEllipseFigure(settings.commonBackgroundColor, a.x, a.y, b.x, b.y));
- if (settings.commonFillType != ToolSettings.ftSolid)
- container.add(new EllipseFigure(settings.commonForegroundColor, settings.commonBackgroundColor, settings.commonLineStyle,
- a.x, a.y, b.x, b.y));
- return container;
- }
-}
diff --git a/examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/Figure.java b/examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/Figure.java
deleted file mode 100755
index 6eb305b77f..0000000000
--- a/examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/Figure.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.paint;
-
-
-import org.eclipse.swt.graphics.*;
-
-/**
- * Superinterface for all drawing objects.
- * All drawing objects know how to render themselved to the screen and can draw a
- * temporary version of themselves for previewing the general appearance of the
- * object onscreen before it gets committed.
- */
-public abstract class Figure {
- /**
- * Draws this object.
- *
- * @param fdc a parameter block specifying drawing-related information
- */
- public abstract void draw(FigureDrawContext fdc);
-
- /**
- * Computes the damaged screen region caused by drawing this object (imprecise), then
- * appends it to the supplied region.
- *
- * @param fdc a parameter block specifying drawing-related information
- * @param region a region to which additional damage areas will be added
- */
- public abstract void addDamagedRegion(FigureDrawContext fdc, Region region);
-}
diff --git a/examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/FigureDrawContext.java b/examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/FigureDrawContext.java
deleted file mode 100644
index b020ff4902..0000000000
--- a/examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/FigureDrawContext.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.paint;
-
-
-import org.eclipse.swt.graphics.*;
-
-public class FigureDrawContext {
- /*
- * <p>
- * The GC must be set up as follows
- * (it will be returned to this state upon completion of drawing operations)
- * <ul>
- * <li>setXORMode(false)
- * </ul>
- * </p>
- */
- public GC gc = null;
- public int xOffset = 0, yOffset = 0; // substract to get GC coords
- public int xScale = 1, yScale = 1;
-
- public Rectangle toClientRectangle(int x1, int y1, int x2, int y2) {
- return new Rectangle(
- Math.min(x1, x2) * xScale - xOffset,
- Math.min(y1, y2) * yScale - yOffset,
- (Math.abs(x2 - x1) + 1) * xScale,
- (Math.abs(y2 - y1) + 1) * yScale);
- }
- public Point toClientPoint(int x, int y) {
- return new Point(x * xScale - xOffset, y * yScale - yOffset);
- }
-}
diff --git a/examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/LineFigure.java b/examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/LineFigure.java
deleted file mode 100755
index ab07a8a676..0000000000
--- a/examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/LineFigure.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.paint;
-
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.graphics.*;
-
-/**
- * 2D Line object
- */
-public class LineFigure extends Figure {
- private Color foregroundColor, backgroundColor;
- private int lineStyle, x1, y1, x2, y2;
- /**
- * Constructs a Line
- * These objects are defined by their two end-points.
- *
- * @param color the color for this object
- * @param lineStyle the line style for this object
- * @param x1 the virtual X coordinate of the first end-point
- * @param y1 the virtual Y coordinate of the first end-point
- * @param x2 the virtual X coordinate of the second end-point
- * @param y2 the virtual Y coordinate of the second end-point
- */
- public LineFigure(Color foregroundColor, Color backgroundColor, int lineStyle, int x1, int y1, int x2, int y2) {
- this.foregroundColor = foregroundColor;
- this.backgroundColor = backgroundColor;
- this.lineStyle = lineStyle;
- this.x1 = x1; this.y1 = y1; this.x2 = x2; this.y2 = y2;
- }
- public void draw(FigureDrawContext fdc) {
- Point p1 = fdc.toClientPoint(x1, y1);
- Point p2 = fdc.toClientPoint(x2, y2);
- fdc.gc.setForeground(foregroundColor);
- fdc.gc.setBackground(backgroundColor);
- fdc.gc.setLineStyle(lineStyle);
- fdc.gc.drawLine(p1.x, p1.y, p2.x, p2.y);
- fdc.gc.setLineStyle(SWT.LINE_SOLID);
- }
- public void addDamagedRegion(FigureDrawContext fdc, Region region) {
- region.add(fdc.toClientRectangle(x1, y1, x2, y2));
- }
-}
diff --git a/examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/LineTool.java b/examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/LineTool.java
deleted file mode 100755
index 32d0399d51..0000000000
--- a/examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/LineTool.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.paint;
-
-
-import org.eclipse.swt.graphics.*;
-
-/**
- * A line drawing tool
- */
-public class LineTool extends DragPaintSession implements PaintTool {
- private ToolSettings settings;
-
- /**
- * Constructs a LineTool.
- *
- * @param toolSettings the new tool settings
- * @param paintSurface the PaintSurface we will render on.
- */
- public LineTool(ToolSettings toolSettings, PaintSurface paintSurface) {
- super(paintSurface);
- set(toolSettings);
- }
-
- /**
- * Sets the tool's settings.
- *
- * @param toolSettings the new tool settings
- */
- public void set(ToolSettings toolSettings) {
- settings = toolSettings;
- }
-
- /**
- * Returns name associated with this tool.
- *
- * @return the localized name of this tool
- */
- public String getDisplayName() {
- return PaintPlugin.getResourceString("tool.Line.label");
- }
-
- /*
- * Template methods for drawing
- */
- protected Figure createFigure(Point a, Point b) {
- return new LineFigure(settings.commonForegroundColor, settings.commonBackgroundColor, settings.commonLineStyle,
- a.x, a.y, b.x, b.y);
- }
-}
diff --git a/examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/PaintPlugin.java b/examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/PaintPlugin.java
deleted file mode 100755
index 5dc3ec57b3..0000000000
--- a/examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/PaintPlugin.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.paint;
-
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.ui.plugin.*;
-import org.osgi.framework.BundleContext;
-
-import java.text.*;
-import java.util.*;
-
-/**
- * The main plugin class to be used in the desktop.
- */
-public class PaintPlugin extends AbstractUIPlugin {
- //The shared instance.
- private static PaintPlugin plugin;
- private static ResourceBundle resourceBundle;
-
- /**
- * Constructs the Paint plugin.
- */
- public PaintPlugin() {
- super();
- plugin = this;
- }
-
- /**
- * Returns the shared instance.
- */
- public static PaintPlugin getDefault() {
- return plugin;
- }
-
- /**
- * Log an error to the ILog for this plugin
- *
- * @param message the localized error message text
- * @param exception the associated exception, or null
- */
- public static void logError(String message, Throwable exception) {
- plugin.getLog().log(
- new Status(IStatus.ERROR, plugin.getBundle().getSymbolicName(), 0, message, exception));
- }
-
- /**
- * Returns a string from the resource bundle.
- * We don't want to crash because of a missing String.
- * Returns the key if not found.
- */
- public static String getResourceString(String key) {
- try {
- return resourceBundle.getString(key);
- } catch (MissingResourceException e) {
- return key;
- } catch (NullPointerException e) {
- return "!" + key + "!";
- }
- }
-
- /**
- * Returns a string from the resource bundle and binds it
- * with the given arguments. If the key is not found,
- * return the key.
- */
- public static String getResourceString(String key, Object[] args) {
- try {
- return MessageFormat.format(getResourceString(key), args);
- } catch (MissingResourceException e) {
- return key;
- } catch (NullPointerException e) {
- return "!" + key + "!";
- }
- }
-
- public void start(BundleContext context) throws Exception {
- super.start(context);
- resourceBundle = Platform.getResourceBundle(getBundle());
- }
-}
diff --git a/examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/PaintSession.java b/examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/PaintSession.java
deleted file mode 100755
index 1d6eda21bf..0000000000
--- a/examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/PaintSession.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.paint;
-
-
-import org.eclipse.swt.events.*;
-
-/**
- * Manages an interactive paint session.
- * Note that the coordinates received via the listener interfaces are virtualized to zero-origin
- * relative to the painting surface.
- */
-public interface PaintSession extends MouseListener, MouseMoveListener {
- /**
- * Returns the paint surface associated with this paint session
- *
- * @return the associated PaintSurface
- */
- public PaintSurface getPaintSurface();
-
- /**
- * Activates the session.
- *
- * Note: When overriding this method, call super.beginSession() at method start.
- */
- public abstract void beginSession();
-
- /**
- * Deactivates the session.
- *
- * Note: When overriding this method, call super.endSession() at method exit.
- */
- public abstract void endSession();
-
- /**
- * Resets the session.
- * Aborts any operation in progress.
- *
- * Note: When overriding this method, call super.resetSession() at method exit.
- */
- public abstract void resetSession();
-
-
- /**
- * Returns the name associated with this tool.
- *
- * @return the localized name of this tool
- */
- public String getDisplayName();
-}
diff --git a/examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/PaintSurface.java b/examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/PaintSurface.java
deleted file mode 100755
index a58af26f9f..0000000000
--- a/examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/PaintSurface.java
+++ /dev/null
@@ -1,523 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.paint;
-
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.widgets.*;
-
-/**
- * Manages a simple drawing surface.
- */
-public class PaintSurface {
- private Point currentPosition = new Point(0, 0);
- private Canvas paintCanvas;
-
- private PaintSession paintSession;
- private Image image;
- private Image paintImage; // buffer for refresh blits
- private int imageWidth, imageHeight;
- private int visibleWidth, visibleHeight;
-
- private FigureDrawContext displayFDC = new FigureDrawContext();
- private FigureDrawContext imageFDC = new FigureDrawContext();
- private FigureDrawContext paintFDC = new FigureDrawContext();
-
- /* Rubberband */
- private ContainerFigure rubberband = new ContainerFigure();
- // the active rubberband selection
- private int rubberbandHiddenNestingCount = 0;
- // always >= 0, if > 0 rubberband has been hidden
-
- /* Status */
- private Text statusText;
- private String statusActionInfo, statusMessageInfo, statusCoordInfo;
-
- /**
- * Constructs a PaintSurface.
- * <p>
- * paintCanvas must have SWT.NO_REDRAW_RESIZE and SWT.NO_BACKGROUND styles,
- * and may have SWT.V_SCROLL and/or SWT.H_SCROLL.
- * </p>
- * @param paintCanvas the Canvas object in which to render
- * @param paintStatus the PaintStatus object to use for providing user feedback
- * @param fillColor the color to fill the canvas with initially
- */
- public PaintSurface(Canvas paintCanvas, Text statusText, Color fillColor) {
- this.paintCanvas = paintCanvas;
- this.statusText = statusText;
- clearStatus();
-
- /* Set up the drawing surface */
- Rectangle displayRect = paintCanvas.getDisplay().getClientArea();
- imageWidth = displayRect.width;
- imageHeight = displayRect.height;
- image = new Image(paintCanvas.getDisplay(), imageWidth, imageHeight);
-
- imageFDC.gc = new GC(image);
- imageFDC.gc.setBackground(fillColor);
- imageFDC.gc.fillRectangle(0, 0, imageWidth, imageHeight);
- displayFDC.gc = new GC(paintCanvas);
-
- /* Initialize the session */
- setPaintSession(null);
-
- /* Add our listeners */
- paintCanvas.addDisposeListener(new DisposeListener() {
- public void widgetDisposed(DisposeEvent e) {
- displayFDC.gc.dispose();
- }
- });
- paintCanvas.addMouseListener(new MouseAdapter() {
- public void mouseDown(MouseEvent event) {
- processMouseEventCoordinates(event);
- if (paintSession != null) paintSession.mouseDown(event);
- }
- public void mouseUp(MouseEvent event) {
- processMouseEventCoordinates(event);
- if (paintSession != null) paintSession.mouseUp(event);
- }
- public void mouseDoubleClick(MouseEvent event) {
- processMouseEventCoordinates(event);
- if (paintSession != null) paintSession.mouseDoubleClick(event);
- }
- });
- paintCanvas.addMouseMoveListener(new MouseMoveListener() {
- public void mouseMove(MouseEvent event) {
- processMouseEventCoordinates(event);
- if (paintSession != null) paintSession.mouseMove(event);
- }
- });
- paintCanvas.addPaintListener(new PaintListener() {
- public void paintControl(PaintEvent event) {
- if (rubberband.isEmpty()) {
- // Nothing to merge, so we just refresh
- event.gc.drawImage(image,
- displayFDC.xOffset + event.x, displayFDC.yOffset + event.y, event.width, event.height,
- event.x, event.y, event.width, event.height);
- } else {
- /*
- * Avoid flicker when merging overlayed objects by constructing the image on
- * a backbuffer first, then blitting it to the screen.
- */
- // Check that the backbuffer is large enough
- if (paintImage != null) {
- Rectangle rect = paintImage.getBounds();
- if ((event.width + event.x > rect.width) ||
- (event.height + event.y > rect.height)) {
- paintFDC.gc.dispose();
- paintImage.dispose();
- paintImage = null;
- }
- }
- if (paintImage == null) {
- Display display = getDisplay();
- Rectangle rect = display.getClientArea();
- paintImage = new Image(display,
- Math.max(rect.width, event.width + event.x),
- Math.max(rect.height, event.height + event.y));
- paintFDC.gc = new GC(paintImage);
- }
- // Setup clipping and the FDC
- Region clipRegion = new Region();
- event.gc.getClipping(clipRegion);
- paintFDC.gc.setClipping(clipRegion);
- clipRegion.dispose();
-
- paintFDC.xOffset = displayFDC.xOffset;
- paintFDC.yOffset = displayFDC.yOffset;
- paintFDC.xScale = displayFDC.xScale;
- paintFDC.yScale = displayFDC.yScale;
-
- // Merge the overlayed objects into the image, then blit
- paintFDC.gc.drawImage(image,
- displayFDC.xOffset + event.x, displayFDC.yOffset + event.y, event.width, event.height,
- event.x, event.y, event.width, event.height);
- rubberband.draw(paintFDC);
- event.gc.drawImage(paintImage,
- event.x, event.y, event.width, event.height,
- event.x, event.y, event.width, event.height);
- }
- }
- });
- paintCanvas.addControlListener(new ControlAdapter() {
- public void controlResized(ControlEvent event) {
- handleResize();
- }
- });
-
- /* Set up the paint canvas scroll bars */
- ScrollBar horizontal = paintCanvas.getHorizontalBar();
- horizontal.setVisible(true);
- horizontal.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent event) {
- scrollHorizontally((ScrollBar)event.widget);
- }
- });
- ScrollBar vertical = paintCanvas.getVerticalBar();
- vertical.setVisible(true);
- vertical.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent event) {
- scrollVertically((ScrollBar)event.widget);
- }
- });
- handleResize();
- }
-
- /**
- * Disposes of the PaintSurface's resources.
- */
- public void dispose() {
- imageFDC.gc.dispose();
- image.dispose();
- if (paintImage != null) {
- paintImage.dispose();
- paintFDC.gc.dispose();
- }
-
- currentPosition = null;
- paintCanvas = null;
- paintSession = null;
- image = null;
- paintImage = null;
- displayFDC = null;
- imageFDC = null;
- paintFDC = null;
- rubberband = null;
- statusText = null;
- statusActionInfo = null;
- statusMessageInfo = null;
- statusCoordInfo = null;
- }
-
- /**
- * Called when we must grab focus.
- */
- public void setFocus() {
- paintCanvas.setFocus();
- }
-
- /**
- * Returns the Display on which the PaintSurface resides.
- * @return the Display
- */
- public Display getDisplay() {
- return paintCanvas.getDisplay();
- }
-
- /**
- * Returns the Shell in which the PaintSurface resides.
- * @return the Shell
- */
- public Shell getShell() {
- return paintCanvas.getShell();
- }
-
- /**
- * Sets the current paint session.
- * <p>
- * If oldPaintSession != paintSession calls oldPaintSession.end()
- * and paintSession.begin()
- * </p>
- *
- * @param paintSession the paint session to activate; null to disable all sessions
- */
- public void setPaintSession(PaintSession paintSession) {
- if (this.paintSession != null) {
- if (this.paintSession == paintSession) return;
- this.paintSession.endSession();
- }
- this.paintSession = paintSession;
- clearStatus();
- if (paintSession != null) {
- setStatusAction(paintSession.getDisplayName());
- paintSession.beginSession();
- } else {
- setStatusAction(PaintPlugin.getResourceString("tool.Null.label"));
- setStatusMessage(PaintPlugin.getResourceString("session.Null.message"));
- }
- }
-
- /**
- * Returns the current paint session.
- *
- * @return the current paint session, null if none is active
- */
- public PaintSession getPaintSession() {
- return paintSession;
- }
-
- /**
- * Returns the current paint tool.
- *
- * @return the current paint tool, null if none is active (though some other session
- * might be)
- */
- public PaintTool getPaintTool() {
- return (paintSession != null && paintSession instanceof PaintTool) ?
- (PaintTool)paintSession : null;
- }
-
- /**
- * Returns the current position in an interactive operation.
- *
- * @return the last known position of the pointer
- */
- public Point getCurrentPosition() {
- return currentPosition;
- }
-
- /**
- * Draws a Figure object to the screen and to the backing store permanently.
- *
- * @param object the object to draw onscreen
- */
- public void drawFigure(Figure object) {
- object.draw(imageFDC);
- object.draw(displayFDC);
- }
-
- /**
- * Adds a Figure object to the active rubberband selection.
- * <p>
- * This object will be drawn to the screen as a preview and refreshed appropriately
- * until the selection is either cleared or committed.
- * </p>
- *
- * @param object the object to add to the selection
- */
- public void addRubberbandSelection(Figure object) {
- rubberband.add(object);
- if (! isRubberbandHidden()) object.draw(displayFDC);
- }
-
- /**
- * Clears the active rubberband selection.
- * <p>
- * Erases any rubberband objects on the screen then clears the selection.
- * </p>
- */
- public void clearRubberbandSelection() {
- if (! isRubberbandHidden()) {
- Region region = new Region();
- rubberband.addDamagedRegion(displayFDC, region);
- Rectangle r = region.getBounds();
- paintCanvas.redraw(r.x, r.y, r.width, r.height, true);
- region.dispose();
- }
- rubberband.clear();
-
- }
-
- /**
- * Commits the active rubberband selection.
- * <p>
- * Redraws any rubberband objects on the screen as permanent objects then clears the selection.
- * </p>
- */
- public void commitRubberbandSelection() {
- rubberband.draw(imageFDC);
- if (isRubberbandHidden()) rubberband.draw(displayFDC);
- rubberband.clear();
- }
-
- /**
- * Hides the rubberband (but does not eliminate it).
- * <p>
- * Increments by one the rubberband "hide" nesting count. The rubberband
- * is hidden from view (but remains active) if it wasn't already hidden.
- * </p>
- */
- public void hideRubberband() {
- if (rubberbandHiddenNestingCount++ <= 0) {
- Region region = new Region();
- rubberband.addDamagedRegion(displayFDC, region);
- Rectangle r = region.getBounds();
- paintCanvas.redraw(r.x, r.y, r.width, r.height, true);
- region.dispose();
- }
- }
-
- /**
- * Shows (un-hides) the rubberband.
- * <p>
- * Decrements by one the rubberband "hide" nesting count. The rubberband
- * is only made visible when showRubberband() has been called once for each
- * previous hideRubberband(). It is not permitted to call showRubberband() if
- * the rubber band is not presently hidden.
- * </p>
- */
- public void showRubberband() {
- if (rubberbandHiddenNestingCount <= 0)
- throw new IllegalStateException("rubberbandHiddenNestingCount > 0");
- if (--rubberbandHiddenNestingCount == 0) {
- rubberband.draw(displayFDC);
- }
- }
-
- /**
- * Determines if the rubberband is hidden.
- *
- * @return true iff the rubber is hidden
- */
- public boolean isRubberbandHidden() {
- return rubberbandHiddenNestingCount > 0;
- }
-
- /**
- * Handles a horizontal scroll event
- *
- * @param scrollbar the horizontal scroll bar that posted this event
- */
- public void scrollHorizontally(ScrollBar scrollBar) {
- if (image == null) return;
- if (imageWidth > visibleWidth) {
- final int oldOffset = displayFDC.xOffset;
- final int newOffset = Math.min(scrollBar.getSelection(), imageWidth - visibleWidth);
- if (oldOffset != newOffset) {
- paintCanvas.update();
- displayFDC.xOffset = newOffset;
- paintCanvas.scroll(Math.max(oldOffset - newOffset, 0), 0, Math.max(newOffset - oldOffset, 0), 0,
- visibleWidth, visibleHeight, false);
- }
- }
- }
-
- /**
- * Handles a vertical scroll event
- *
- * @param scrollbar the vertical scroll bar that posted this event
- */
- public void scrollVertically(ScrollBar scrollBar) {
- if (image == null) return;
- if (imageHeight > visibleHeight) {
- final int oldOffset = displayFDC.yOffset;
- final int newOffset = Math.min(scrollBar.getSelection(), imageHeight - visibleHeight);
- if (oldOffset != newOffset) {
- paintCanvas.update();
- displayFDC.yOffset = newOffset;
- paintCanvas.scroll(0, Math.max(oldOffset - newOffset, 0), 0, Math.max(newOffset - oldOffset, 0),
- visibleWidth, visibleHeight, false);
- }
- }
- }
-
- /**
- * Handles resize events
- */
- private void handleResize() {
- paintCanvas.update();
-
- Rectangle visibleRect = paintCanvas.getClientArea();
- visibleWidth = visibleRect.width;
- visibleHeight = visibleRect.height;
-
- ScrollBar horizontal = paintCanvas.getHorizontalBar();
- if (horizontal != null) {
- displayFDC.xOffset = Math.min(horizontal.getSelection(), imageWidth - visibleWidth);
- if (imageWidth <= visibleWidth) {
- horizontal.setEnabled(false);
- horizontal.setSelection(0);
- } else {
- final int max = imageWidth - visibleWidth;
- horizontal.setEnabled(true);
- horizontal.setValues(displayFDC.xOffset, 0, imageWidth, visibleWidth,
- 8, visibleWidth);
- }
- }
-
- ScrollBar vertical = paintCanvas.getVerticalBar();
- if (vertical != null) {
- displayFDC.yOffset = Math.min(vertical.getSelection(), imageHeight - visibleHeight);
- if (imageHeight <= visibleHeight) {
- vertical.setEnabled(false);
- vertical.setSelection(0);
- } else {
- final int max = imageHeight - visibleHeight;
- vertical.setEnabled(true);
- vertical.setValues(displayFDC.yOffset, 0, imageHeight, visibleHeight,
- 8, visibleHeight);
- }
- }
- }
-
- /**
- * Virtualizes MouseEvent coordinates and stores the current position.
- */
- private void processMouseEventCoordinates(MouseEvent event) {
- currentPosition.x = event.x =
- Math.min(Math.max(event.x, 0), visibleWidth - 1) + displayFDC.xOffset;
- currentPosition.y = event.y =
- Math.min(Math.max(event.y, 0), visibleHeight - 1) + displayFDC.yOffset;
- }
-
- /**
- * Clears the status bar.
- */
- public void clearStatus() {
- statusActionInfo = "";
- statusMessageInfo = "";
- statusCoordInfo = "";
- updateStatus();
- }
-
- /**
- * Sets the status bar action text.
- *
- * @param action the action in progress, null to clear
- */
- public void setStatusAction(String action) {
- statusActionInfo = (action != null) ? action : "";
- updateStatus();
- }
-
- /**
- * Sets the status bar message text.
- *
- * @param message the message to display, null to clear
- */
- public void setStatusMessage(String message) {
- statusMessageInfo = (message != null) ? message : "";
- updateStatus();
- }
-
- /**
- * Sets the coordinates in the status bar.
- *
- * @param coord the coordinates to display, null to clear
- */
- public void setStatusCoord(Point coord) {
- statusCoordInfo = (coord != null) ? PaintPlugin.getResourceString("status.Coord.format", new Object[]
- { new Integer(coord.x), new Integer(coord.y)}) : "";
- updateStatus();
- }
-
- /**
- * Sets the coordinate range in the status bar.
- *
- * @param a the "from" coordinate, must not be null
- * @param b the "to" coordinate, must not be null
- */
- public void setStatusCoordRange(Point a, Point b) {
- statusCoordInfo = PaintPlugin.getResourceString("status.CoordRange.format", new Object[]
- { new Integer(a.x), new Integer(a.y), new Integer(b.x), new Integer(b.y)});
- updateStatus();
- }
-
- /**
- * Updates the display.
- */
- private void updateStatus() {
- statusText.setText(
- PaintPlugin.getResourceString("status.Bar.format", new Object[]
- { statusActionInfo, statusMessageInfo, statusCoordInfo }));
- }
-}
diff --git a/examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/PaintTool.java b/examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/PaintTool.java
deleted file mode 100755
index 7ec50d9dbe..0000000000
--- a/examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/PaintTool.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.paint;
-
-public interface PaintTool extends PaintSession {
- /**
- * Sets the tool's settings.
- *
- * @param toolSettings the new tool settings
- */
- public void set(ToolSettings toolSettings);
-}
diff --git a/examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/PaintView.java b/examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/PaintView.java
deleted file mode 100755
index b194b52449..0000000000
--- a/examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/PaintView.java
+++ /dev/null
@@ -1,500 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.paint;
-
-
-import org.eclipse.jface.action.*;
-import org.eclipse.jface.resource.*;
-import org.eclipse.swt.*;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.*;
-import org.eclipse.ui.part.*;
-
-import java.net.*;
-import java.util.*;
-
-/**
- * The view for the paint application.
- * All rendering happens inside the area created by createPartControl().
- *
- * @see ViewPart
- */
-public class PaintView extends ViewPart {
- private Display workbenchDisplay;
-
- // current active settings
- private ToolSettings toolSettings;
-
- // paint surface for drawing
- private PaintSurface paintSurface;
-
- // map action ids to useful data
- private HashMap /* of String to PaintTool */ paintToolMap;
- private HashMap /* of String to Integer */ paintFillTypeMap;
- private HashMap /* of String to Integer */ paintLineStyleMap;
-
- /** UI data **/
- // handle of currently active tool IAction on the UI
- private IAction activeToolAction;
- // handle of currently active filltype IAction on the UI
- private IAction activeFillTypeAction;
- // handle of currently active linetype IAction on the UI
- private IAction activeLineStyleAction;
-
- // handle of active foreground color box Canvas widget
- private Canvas activeForegroundColorCanvas;
- // handle of active background color box Canvas widget
- private Canvas activeBackgroundColorCanvas;
-
- private static final int numPaletteRows = 3;
- private static final int numPaletteCols = 50;
-
- // shared data
- private Color paintColorBlack, paintColorWhite; // alias for paintColors[0] and [1]
- private Color[] paintColors;
- private Font paintDefaultFont; // do not free
-
- /**
- * Constructs a Paint view.
- */
- public PaintView() {
- }
-
- /**
- * Cleanup
- */
- public void dispose() {
- if (paintSurface != null) paintSurface.dispose();
- if (paintColors != null) {
- for (int i = 0; i < paintColors.length; ++i) {
- final Color color = paintColors[i];
- if (color != null) color.dispose();
- }
- }
- paintDefaultFont = null;
- paintColors = null;
- paintSurface = null;
- super.dispose();
- }
-
- /**
- * Called when we must grab focus.
- *
- * @see org.eclipse.ui.part.ViewPart#setFocus
- */
- public void setFocus() {
- paintSurface.setFocus();
- }
-
- /**
- * Creates the example.
- *
- * @see ViewPart#createPartControl
- */
- public void createPartControl(Composite parent) {
- /*** Initialize shared data ***/
- workbenchDisplay = parent.getDisplay();
-
- paintColorWhite = new Color(workbenchDisplay, 255, 255, 255);
- paintColorBlack = new Color(workbenchDisplay, 0, 0, 0);
-
- paintDefaultFont = workbenchDisplay.getSystemFont();
-
- paintColors = new Color[numPaletteCols * numPaletteRows];
- paintColors[0] = paintColorBlack;
- paintColors[1] = paintColorWhite;
- for (int i = 2; i < paintColors.length; i++) {
- paintColors[i] = new Color(workbenchDisplay,
- ((i*7)%255),((i*23)%255), ((i*51)%255));
- }
-
- toolSettings = new ToolSettings();
- toolSettings.commonForegroundColor = paintColorBlack;
- toolSettings.commonBackgroundColor = paintColorWhite;
- toolSettings.commonFont = paintDefaultFont;
-
- /*** Add toolbar contributions ***/
- final IActionBars actionBars = getViewSite().getActionBars();
- IToolBarManager toolbarManager = actionBars.getToolBarManager();
-
- toolbarManager.add(new GroupMarker("group.tools"));
- toolbarManager.appendToGroup("group.tools", new SelectPaintToolAction("tool.Pencil"));
- toolbarManager.appendToGroup("group.tools", new SelectPaintToolAction("tool.Airbrush"));
- toolbarManager.appendToGroup("group.tools", new SelectPaintToolAction("tool.Line"));
- toolbarManager.appendToGroup("group.tools", new SelectPaintToolAction("tool.PolyLine"));
- toolbarManager.appendToGroup("group.tools", new SelectPaintToolAction("tool.Rectangle"));
- toolbarManager.appendToGroup("group.tools", new SelectPaintToolAction("tool.RoundedRectangle"));
- toolbarManager.appendToGroup("group.tools", new SelectPaintToolAction("tool.Ellipse"));
- toolbarManager.appendToGroup("group.tools", new SelectPaintToolAction("tool.Text"));
- toolbarManager.add(new Separator());
- toolbarManager.add(new GroupMarker("group.options.fill"));
- toolbarManager.appendToGroup("group.options.fill", new SelectFillTypeAction("fill.None"));
- toolbarManager.appendToGroup("group.options.fill", new SelectFillTypeAction("fill.Outline"));
- toolbarManager.appendToGroup("group.options.fill", new SelectFillTypeAction("fill.Solid"));
- toolbarManager.add(new Separator());
- toolbarManager.add(new GroupMarker("group.options.linestyle"));
- toolbarManager.appendToGroup("group.options.linestyle", new SelectLineStyleAction("linestyle.Solid"));
- toolbarManager.appendToGroup("group.options.linestyle", new SelectLineStyleAction("linestyle.Dash"));
- toolbarManager.appendToGroup("group.options.linestyle", new SelectLineStyleAction("linestyle.Dot"));
- toolbarManager.appendToGroup("group.options.linestyle", new SelectLineStyleAction("linestyle.DashDot"));
- toolbarManager.add(new Separator());
- toolbarManager.add(new GroupMarker("group.options"));
- toolbarManager.appendToGroup("group.options", new SelectFontAction("options.Font"));
- actionBars.updateActionBars();
-
- /*** Build GUI ***/
- createGUI(parent);
-
- /*** Set defaults ***/
- setPaintToolByID("tool.Pencil");
- setFillTypeByID("fill.None");
- setLineStyleByID("linestyle.Solid");
- setForegroundColor(paintColorBlack);
- setBackgroundColor(paintColorWhite);
- }
-
- /**
- * Creates the GUI.
- */
- private void createGUI(Composite parent) {
- GridLayout gridLayout;
- GridData gridData;
-
- /*** Create principal GUI layout elements ***/
- Composite displayArea = new Composite(parent, SWT.NONE);
- gridLayout = new GridLayout();
- gridLayout.numColumns = 1;
- displayArea.setLayout(gridLayout);
-
- // Creating these elements here avoids the need to instantiate the GUI elements
- // in strict layout order. The natural layout ordering is an artifact of using
- // SWT layouts, but unfortunately it is not the same order as that required to
- // instantiate all of the non-GUI application elements to satisfy referential
- // dependencies. It is possible to reorder the initialization to some extent, but
- // this can be very tedious.
-
- // paint canvas
- final Canvas paintCanvas = new Canvas(displayArea, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL |
- SWT.NO_REDRAW_RESIZE | SWT.NO_BACKGROUND);
- gridData = new GridData(GridData.FILL_HORIZONTAL | GridData.FILL_VERTICAL);
- paintCanvas.setLayoutData(gridData);
- paintCanvas.setBackground(paintColorWhite);
-
- // color selector frame
- final Composite colorFrame = new Composite(displayArea, SWT.NONE);
- gridData = new GridData(GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_FILL);
- colorFrame.setLayoutData(gridData);
-
- // tool settings frame
- final Composite toolSettingsFrame = new Composite(displayArea, SWT.NONE);
- gridData = new GridData(GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_FILL);
- toolSettingsFrame.setLayoutData(gridData);
-
- // status text
- final Text statusText = new Text(displayArea, SWT.BORDER | SWT.SINGLE | SWT.READ_ONLY);
- gridData = new GridData(GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_FILL);
- statusText.setLayoutData(gridData);
-
- /*** Create the remaining application elements inside the principal GUI layout elements ***/
- // paintSurface
- paintSurface = new PaintSurface(paintCanvas, statusText, paintColorWhite);
-
- // paintToolMap
- paintToolMap = new HashMap();
- paintToolMap.put("tool.Pencil", new PencilTool(toolSettings, paintSurface));
- paintToolMap.put("tool.Airbrush", new AirbrushTool(toolSettings, paintSurface));
- paintToolMap.put("tool.Line", new LineTool(toolSettings, paintSurface));
- paintToolMap.put("tool.PolyLine", new PolyLineTool(toolSettings, paintSurface));
- paintToolMap.put("tool.Rectangle", new RectangleTool(toolSettings, paintSurface));
- paintToolMap.put("tool.RoundedRectangle", new RoundedRectangleTool(toolSettings, paintSurface));
- paintToolMap.put("tool.Ellipse", new EllipseTool(toolSettings, paintSurface));
- paintToolMap.put("tool.Text", new TextTool(toolSettings, paintSurface));
- paintToolMap.put("tool.Null", null);
-
- // paintFillTypeMap
- paintFillTypeMap = new HashMap();
- paintFillTypeMap.put("fill.None", new Integer(ToolSettings.ftNone));
- paintFillTypeMap.put("fill.Outline", new Integer(ToolSettings.ftOutline));
- paintFillTypeMap.put("fill.Solid", new Integer(ToolSettings.ftSolid));
-
- // paintLineStyleMap
- paintLineStyleMap = new HashMap();
- paintLineStyleMap.put("linestyle.Solid", new Integer(SWT.LINE_SOLID));
- paintLineStyleMap.put("linestyle.Dash", new Integer(SWT.LINE_DASH));
- paintLineStyleMap.put("linestyle.Dot", new Integer(SWT.LINE_DOT));
- paintLineStyleMap.put("linestyle.DashDot", new Integer(SWT.LINE_DASHDOT));
-
- // colorFrame
- gridLayout = new GridLayout();
- gridLayout.numColumns = 3;
- gridLayout.marginHeight = 0;
- gridLayout.marginWidth = 0;
- colorFrame.setLayout(gridLayout);
-
- // activeForegroundColorCanvas, activeBackgroundColorCanvas
- activeForegroundColorCanvas = new Canvas(colorFrame, SWT.BORDER);
- gridData = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
- gridData.heightHint = 24;
- gridData.widthHint = 24;
- activeForegroundColorCanvas.setLayoutData(gridData);
-
- activeBackgroundColorCanvas = new Canvas(colorFrame, SWT.BORDER);
- gridData = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
- gridData.heightHint = 24;
- gridData.widthHint = 24;
- activeBackgroundColorCanvas.setLayoutData(gridData);
-
- // paletteCanvas
- final Canvas paletteCanvas = new Canvas(colorFrame, SWT.BORDER | SWT.NO_BACKGROUND);
- gridData = new GridData(GridData.FILL_HORIZONTAL);
- gridData.heightHint = 24;
- paletteCanvas.setLayoutData(gridData);
- paletteCanvas.addListener(SWT.MouseDown, new Listener() {
- public void handleEvent(Event e) {
- Rectangle bounds = paletteCanvas.getClientArea();
- Color color = getColorAt(bounds, e.x, e.y);
-
- if (e.button == 1) setForegroundColor(color);
- else setBackgroundColor(color);
- }
- private Color getColorAt(Rectangle bounds, int x, int y) {
- if (bounds.height <= 1 && bounds.width <= 1) return paintColorWhite;
- final int row = (y - bounds.y) * numPaletteRows / bounds.height;
- final int col = (x - bounds.x) * numPaletteCols / bounds.width;
- return paintColors[Math.min(Math.max(row * numPaletteCols + col, 0), paintColors.length - 1)];
- }
- });
- Listener refreshListener = new Listener() {
- public void handleEvent(Event e) {
- if (e.gc == null) return;
- Rectangle bounds = paletteCanvas.getClientArea();
- for (int row = 0; row < numPaletteRows; ++row) {
- for (int col = 0; col < numPaletteCols; ++col) {
- final int x = bounds.width * col / numPaletteCols;
- final int y = bounds.height * row / numPaletteRows;
- final int width = Math.max(bounds.width * (col + 1) / numPaletteCols - x, 1);
- final int height = Math.max(bounds.height * (row + 1) / numPaletteRows - y, 1);
- e.gc.setBackground(paintColors[row * numPaletteCols + col]);
- e.gc.fillRectangle(bounds.x + x, bounds.y + y, width, height);
- }
- }
- }
- };
- paletteCanvas.addListener(SWT.Resize, refreshListener);
- paletteCanvas.addListener(SWT.Paint, refreshListener);
- //paletteCanvas.redraw();
-
- // toolSettingsFrame
- gridLayout = new GridLayout();
- gridLayout.numColumns = 4;
- gridLayout.marginHeight = 0;
- gridLayout.marginWidth = 0;
- toolSettingsFrame.setLayout(gridLayout);
-
- Label label = new Label(toolSettingsFrame, SWT.NONE);
- label.setText(PaintPlugin.getResourceString("settings.AirbrushRadius.text"));
-
- final Scale airbrushRadiusScale = new Scale(toolSettingsFrame, SWT.HORIZONTAL);
- airbrushRadiusScale.setMinimum(5);
- airbrushRadiusScale.setMaximum(50);
- airbrushRadiusScale.setSelection(toolSettings.airbrushRadius);
- airbrushRadiusScale.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_FILL));
- airbrushRadiusScale.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- toolSettings.airbrushRadius = airbrushRadiusScale.getSelection();
- updateToolSettings();
- }
- });
-
- label = new Label(toolSettingsFrame, SWT.NONE);
- label.setText(PaintPlugin.getResourceString("settings.AirbrushIntensity.text"));
-
- final Scale airbrushIntensityScale = new Scale(toolSettingsFrame, SWT.HORIZONTAL);
- airbrushIntensityScale.setMinimum(1);
- airbrushIntensityScale.setMaximum(100);
- airbrushIntensityScale.setSelection(toolSettings.airbrushIntensity);
- airbrushIntensityScale.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_FILL));
- airbrushIntensityScale.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- toolSettings.airbrushIntensity = airbrushIntensityScale.getSelection();
- updateToolSettings();
- }
- });
- }
-
- /**
- * Notifies the tool that its settings have changed.
- */
- private void updateToolSettings() {
- final PaintTool activePaintTool = paintSurface.getPaintTool();
- if (activePaintTool == null) return;
-
- activePaintTool.endSession();
- activePaintTool.set(toolSettings);
- activePaintTool.beginSession();
- }
-
- /**
- * Sets the tool foreground color.
- *
- * @param color the new color to use
- */
- public void setForegroundColor(Color color) {
- if (activeForegroundColorCanvas != null)
- activeForegroundColorCanvas.setBackground(color);
- toolSettings.commonForegroundColor = color;
- updateToolSettings();
- }
-
- /**
- * Set the tool background color.
- *
- * @param color the new color to use
- */
- public void setBackgroundColor(Color color) {
- if (activeBackgroundColorCanvas != null)
- activeBackgroundColorCanvas.setBackground(color);
- toolSettings.commonBackgroundColor = color;
- updateToolSettings();
- }
-
- /**
- * Selects a tool given its ID.
- */
- public void setPaintToolByID(String id) {
- activeToolAction = handleRadioAction(activeToolAction, id);
-
- final PaintTool paintTool = (PaintTool) paintToolMap.get(id);
- paintSurface.setPaintSession(paintTool);
- updateToolSettings();
- }
-
- /**
- * Selects a filltype given its ID.
- */
- public void setFillTypeByID(String id) {
- activeFillTypeAction = handleRadioAction(activeFillTypeAction, id);
-
- final Integer fillType = (Integer) paintFillTypeMap.get(id);
- toolSettings.commonFillType = fillType.intValue();
- updateToolSettings();
- }
-
- /**
- * Selects line type given its ID.
- */
- public void setLineStyleByID(String id) {
- activeLineStyleAction = handleRadioAction(activeLineStyleAction, id);
-
- final Integer lineType = (Integer) paintLineStyleMap.get(id);
- toolSettings.commonLineStyle = lineType.intValue();
- updateToolSettings();
- }
-
- /**
- * Gets the IAction for an ID belonging to a set of mutually exclusive actions, and
- * toggles the old action off if necessary.
- */
- private IAction handleRadioAction(IAction oldAction, String id) {
- IAction action = getActionByID(id);
- if (action != null) {
- if (oldAction != null) oldAction.setChecked(false);
- if (! action.isChecked()) action.setChecked(true);
- return action;
- }
- return oldAction;
- }
-
- /**
- * Gets the IAction representing the UI toolbar button with the specified ID.
- */
- private IAction getActionByID(String id) {
- final IActionBars actionBars = getViewSite().getActionBars();
- IToolBarManager toolbarManager = actionBars.getToolBarManager();
- ActionContributionItem contributionItem = (ActionContributionItem) toolbarManager.find(id);
- if (contributionItem == null) return null;
- return contributionItem.getAction();
- }
-
- /**
- * Returns the Display.
- *
- * @return the display we're using
- */
- public Display getDisplay() {
- return workbenchDisplay;
- }
-
- /**
- * Action set glue.
- */
- abstract class PaintAction extends Action {
- public PaintAction(String id) {
- super();
- setId(id);
-
- try {
- final URL installUrl = PaintPlugin.getDefault().getBundle().getEntry("/");
- final URL imageUrl = new URL(installUrl, PaintPlugin.getResourceString(id + ".image"));
- setImageDescriptor(ImageDescriptor.createFromURL(imageUrl));
- } catch (MalformedURLException e) {
- PaintPlugin.logError("", e);
- }
-
- setText(PaintPlugin.getResourceString(id + ".label"));
- setToolTipText(PaintPlugin.getResourceString(id + ".tooltip"));
- setDescription(PaintPlugin.getResourceString(id + ".description"));
- }
- }
- class SelectPaintToolAction extends PaintAction {
- public SelectPaintToolAction(String id) { super(id); }
- public int getStyle() { return IAction.AS_CHECK_BOX; }
- public void run() { setPaintToolByID(getId()); }
-
- }
- class SelectFillTypeAction extends PaintAction {
- public SelectFillTypeAction(String id) { super(id); }
- public int getStyle() { return IAction.AS_CHECK_BOX; }
- public void run() { setFillTypeByID(getId()); }
- }
- class SelectLineStyleAction extends PaintAction {
- public SelectLineStyleAction(String id) { super(id); }
- public int getStyle() { return IAction.AS_CHECK_BOX; }
- public void run() { setLineStyleByID(getId()); }
- }
- class SelectFontAction extends PaintAction {
- public SelectFontAction(String id) { super(id); }
- public int getStyle() { return IAction.AS_PUSH_BUTTON; }
- public void run() {
- FontDialog fontDialog = new FontDialog(paintSurface.getShell(), SWT.PRIMARY_MODAL);
- FontData[] fontDatum = toolSettings.commonFont.getFontData();
- if (fontDatum != null && fontDatum.length > 0) {
- fontDialog.setFontList(fontDatum);
- }
- fontDialog.setText(PaintPlugin.getResourceString("options.Font.dialog.title"));
-
- paintSurface.hideRubberband();
- FontData fontData = fontDialog.open();
- paintSurface.showRubberband();
- if (fontData != null) {
- try {
- Font font = new Font(workbenchDisplay, fontData);
- toolSettings.commonFont = font;
- updateToolSettings();
- } catch (SWTException e) {
- }
- }
- }
- }
-}
diff --git a/examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/PencilTool.java b/examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/PencilTool.java
deleted file mode 100755
index 08d1dab9e3..0000000000
--- a/examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/PencilTool.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.paint;
-
-
-import org.eclipse.swt.graphics.*;
-
-/**
- * A pencil tool.
- */
-public class PencilTool extends ContinuousPaintSession implements PaintTool {
- private ToolSettings settings;
-
- /**
- * Constructs a pencil tool.
- *
- * @param toolSettings the new tool settings
- * @param getPaintSurface() the PaintSurface we will render on.
- */
- public PencilTool(ToolSettings toolSettings, PaintSurface paintSurface) {
- super(paintSurface);
- set(toolSettings);
- }
-
- /**
- * Sets the tool's settings.
- *
- * @param toolSettings the new tool settings
- */
- public void set(ToolSettings toolSettings) {
- settings = toolSettings;
- }
-
- /**
- * Returns the name associated with this tool.
- *
- * @return the localized name of this tool
- */
- public String getDisplayName() {
- return PaintPlugin.getResourceString("tool.Pencil.label");
- }
-
- /*
- * Template method for drawing
- */
- public void render(final Point point) {
- final PaintSurface ps = getPaintSurface();
- ps.drawFigure(new PointFigure(settings.commonForegroundColor, point.x, point.y));
- }
-}
diff --git a/examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/PointFigure.java b/examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/PointFigure.java
deleted file mode 100644
index 4b853693d2..0000000000
--- a/examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/PointFigure.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.paint;
-
-
-import org.eclipse.swt.graphics.*;
-
-/**
- * 2D Point object
- */
-public class PointFigure extends Figure {
- private Color color;
- private int x, y;
- /**
- * Constructs a Point
- *
- * @param color the color for this object
- * @param x the virtual X coordinate of the first end-point
- * @param y the virtual Y coordinate of the first end-point
- */
- public PointFigure(Color color, int x, int y) {
- this.color = color; this.x = x; this.y = y;
- }
- public void draw(FigureDrawContext fdc) {
- Point p = fdc.toClientPoint(x, y);
- fdc.gc.setBackground(color);
- fdc.gc.fillRectangle(p.x, p.y, 1, 1);
- }
- public void addDamagedRegion(FigureDrawContext fdc, Region region) {
- region.add(fdc.toClientRectangle(x, y, x, y));
- }
-}
diff --git a/examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/PolyLineTool.java b/examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/PolyLineTool.java
deleted file mode 100755
index 03d1583e43..0000000000
--- a/examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/PolyLineTool.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.paint;
-
-
-import org.eclipse.swt.graphics.*;
-
-/**
- * A polyline drawing tool.
- */
-public class PolyLineTool extends SegmentedPaintSession implements PaintTool {
- private ToolSettings settings;
-
- /**
- * Constructs a PolyLineTool.
- *
- * @param toolSettings the new tool settings
- * @param paintSurface the PaintSurface we will render on.
- */
- public PolyLineTool(ToolSettings toolSettings, PaintSurface paintSurface) {
- super(paintSurface);
- set(toolSettings);
- }
-
- /**
- * Sets the tool's settings.
- *
- * @param toolSettings the new tool settings
- */
- public void set(ToolSettings toolSettings) {
- settings = toolSettings;
- }
-
- /**
- * Returns the name associated with this tool.
- *
- * @return the localized name of this tool
- */
- public String getDisplayName() {
- return PaintPlugin.getResourceString("tool.PolyLine.label");
- }
-
- /*
- * Template methods for drawing
- */
- protected Figure createFigure(Point[] points, int numPoints, boolean closed) {
- ContainerFigure container = new ContainerFigure();
- if (closed && settings.commonFillType != ToolSettings.ftNone && numPoints >= 3) {
- container.add(new SolidPolygonFigure(settings.commonBackgroundColor, points, numPoints));
- }
- if (! closed || settings.commonFillType != ToolSettings.ftSolid || numPoints < 3) {
- for (int i = 0; i < numPoints - 1; ++i) {
- final Point a = points[i];
- final Point b = points[i + 1];
- container.add(new LineFigure(settings.commonForegroundColor, settings.commonBackgroundColor, settings.commonLineStyle,
- a.x, a.y, b.x, b.y));
- }
- if (closed) {
- final Point a = points[points.length - 1];
- final Point b = points[0];
- container.add(new LineFigure(settings.commonForegroundColor, settings.commonBackgroundColor, settings.commonLineStyle,
- a.x, a.y, b.x, b.y));
- }
- }
- return container;
- }
-}
diff --git a/examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/RectangleFigure.java b/examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/RectangleFigure.java
deleted file mode 100755
index 1f416f8094..0000000000
--- a/examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/RectangleFigure.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.paint;
-
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.graphics.*;
-
-/**
- * 2D Rectangle object
- */
-public class RectangleFigure extends Figure {
- private Color foregroundColor, backgroundColor;
- private int lineStyle, x1, y1, x2, y2;
- /**
- * Constructs a Rectangle
- * These objects are defined by any two diametrically opposing corners.
- *
- * @param color the color for this object
- * @param lineStyle the line style for this object
- * @param x1 the virtual X coordinate of the first corner
- * @param y1 the virtual Y coordinate of the first corner
- * @param x2 the virtual X coordinate of the second corner
- * @param y2 the virtual Y coordinate of the second corner
- */
- public RectangleFigure(Color foregroundColor, Color backgroundColor, int lineStyle, int x1, int y1, int x2, int y2) {
- this.foregroundColor = foregroundColor;
- this.backgroundColor = backgroundColor;
- this.lineStyle = lineStyle;
- this.x1 = x1; this.y1 = y1; this.x2 = x2; this.y2 = y2;
- }
- public void draw(FigureDrawContext fdc) {
- Rectangle r = fdc.toClientRectangle(x1, y1, x2, y2);
- fdc.gc.setForeground(foregroundColor);
- fdc.gc.setBackground(backgroundColor);
- fdc.gc.setLineStyle(lineStyle);
- fdc.gc.drawRectangle(r.x, r.y, r.width - 1, r.height - 1);
- fdc.gc.setLineStyle(SWT.LINE_SOLID);
- }
- public void addDamagedRegion(FigureDrawContext fdc, Region region) {
- region.add(fdc.toClientRectangle(x1, y1, x2, y2));
- }
-}
diff --git a/examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/RectangleTool.java b/examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/RectangleTool.java
deleted file mode 100755
index d9d6329eff..0000000000
--- a/examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/RectangleTool.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.paint;
-
-
-import org.eclipse.swt.graphics.*;
-
-/**
- * A drawing tool.
- */
-public class RectangleTool extends DragPaintSession implements PaintTool {
- private ToolSettings settings;
-
- /**
- * Constructs a RectangleTool.
- *
- * @param toolSettings the new tool settings
- * @param paintSurface the PaintSurface we will render on.
- */
- public RectangleTool(ToolSettings toolSettings, PaintSurface paintSurface) {
- super(paintSurface);
- set(toolSettings);
- }
-
- /**
- * Sets the tool's settings.
- *
- * @param toolSettings the new tool settings
- */
- public void set(ToolSettings toolSettings) {
- settings = toolSettings;
- }
-
- /**
- * Returns name associated with this tool.
- *
- * @return the localized name of this tool
- */
- public String getDisplayName() {
- return PaintPlugin.getResourceString("tool.Rectangle.label");
- }
-
- /*
- * Template method for drawing
- */
- protected Figure createFigure(Point a, Point b) {
- switch (settings.commonFillType) {
- default:
- case ToolSettings.ftNone:
- return new RectangleFigure(settings.commonForegroundColor, settings.commonBackgroundColor, settings.commonLineStyle,
- a.x, a.y, b.x, b.y);
- case ToolSettings.ftSolid:
- return new SolidRectangleFigure(settings.commonBackgroundColor, a.x, a.y, b.x, b.y);
- case ToolSettings.ftOutline: {
- ContainerFigure container = new ContainerFigure();
- container.add(new SolidRectangleFigure(settings.commonBackgroundColor, a.x, a.y, b.x, b.y));
- container.add(new RectangleFigure(settings.commonForegroundColor, settings.commonBackgroundColor, settings.commonLineStyle,
- a.x, a.y, b.x, b.y));
- return container;
- }
- }
- }
-}
diff --git a/examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/RoundedRectangleFigure.java b/examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/RoundedRectangleFigure.java
deleted file mode 100755
index 8b62e49e13..0000000000
--- a/examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/RoundedRectangleFigure.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.paint;
-
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.graphics.*;
-
-/**
- * 2D Rectangle object
- */
-public class RoundedRectangleFigure extends Figure {
- private Color foregroundColor, backgroundColor;
- private int lineStyle, x1, y1, x2, y2, diameter;
- /**
- * Constructs a Rectangle
- * These objects are defined by any two diametrically opposing corners.
- *
- * @param color the color for this object
- * @param lineStyle the line style for this object
- * @param x1 the virtual X coordinate of the first corner
- * @param y1 the virtual Y coordinate of the first corner
- * @param x2 the virtual X coordinate of the second corner
- * @param y2 the virtual Y coordinate of the second corner
- * @param diameter the diameter of curvature of all four corners
- */
- public RoundedRectangleFigure(Color foregroundColor, Color backgroundColor, int lineStyle, int x1, int y1, int x2, int y2, int diameter) {
- this.foregroundColor = foregroundColor;
- this.backgroundColor = backgroundColor;
- this.lineStyle = lineStyle;
- this.x1 = x1; this.y1 = y1; this.x2 = x2; this.y2 = y2;
- this.diameter = diameter;
- }
- public void draw(FigureDrawContext fdc) {
- Rectangle r = fdc.toClientRectangle(x1, y1, x2, y2);
- fdc.gc.setForeground(foregroundColor);
- fdc.gc.setBackground(backgroundColor);
- fdc.gc.setLineStyle(lineStyle);
- fdc.gc.drawRoundRectangle(r.x, r.y, r.width - 1, r.height - 1, diameter, diameter);
- fdc.gc.setLineStyle(SWT.LINE_SOLID);
- }
- public void addDamagedRegion(FigureDrawContext fdc, Region region) {
- region.add(fdc.toClientRectangle(x1, y1, x2, y2));
- }
-}
diff --git a/examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/RoundedRectangleTool.java b/examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/RoundedRectangleTool.java
deleted file mode 100755
index 052bbb67a6..0000000000
--- a/examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/RoundedRectangleTool.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.paint;
-
-
-import org.eclipse.swt.graphics.*;
-
-/**
- * A drawing tool.
- */
-public class RoundedRectangleTool extends DragPaintSession implements PaintTool {
- private ToolSettings settings;
-
- /**
- * Constructs a RoundedRectangleTool.
- *
- * @param toolSettings the new tool settings
- * @param paintSurface the PaintSurface we will render on.
- */
- public RoundedRectangleTool(ToolSettings toolSettings, PaintSurface paintSurface) {
- super(paintSurface);
- set(toolSettings);
- }
-
- /**
- * Sets the tool's settings.
- *
- * @param toolSettings the new tool settings
- */
- public void set(ToolSettings toolSettings) {
- settings = toolSettings;
- }
-
- /**
- * Returns name associated with this tool.
- *
- * @return the localized name of this tool
- */
- public String getDisplayName() {
- return PaintPlugin.getResourceString("tool.RoundedRectangle.label");
- }
-
- /*
- * Template methods for drawing
- */
- protected Figure createFigure(Point a, Point b) {
- ContainerFigure container = new ContainerFigure();
- if (settings.commonFillType != ToolSettings.ftNone)
- container.add(new SolidRoundedRectangleFigure(settings.commonBackgroundColor,
- a.x, a.y, b.x, b.y, settings.roundedRectangleCornerDiameter));
- if (settings.commonFillType != ToolSettings.ftSolid)
- container.add(new RoundedRectangleFigure(settings.commonForegroundColor, settings.commonBackgroundColor,
- settings.commonLineStyle, a.x, a.y, b.x, b.y, settings.roundedRectangleCornerDiameter));
- return container;
- }
-}
diff --git a/examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/SegmentedPaintSession.java b/examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/SegmentedPaintSession.java
deleted file mode 100755
index 342edb134c..0000000000
--- a/examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/SegmentedPaintSession.java
+++ /dev/null
@@ -1,159 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.paint;
-
-
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.graphics.*;
-
-import java.util.*;
-
-/**
- * The superclass for paint tools that contruct objects from individually
- * picked segments.
- */
-public abstract class SegmentedPaintSession extends BasicPaintSession {
- /**
- * The set of control points making up the segmented selection
- */
- private Vector /* of Point */ controlPoints = new Vector();
-
- /**
- * The previous figure (so that we can abort with right-button)
- */
- private Figure previousFigure = null;
-
- /**
- * The current figure (so that we can abort with right-button)
- */
- private Figure currentFigure = null;
-
- /**
- * Constructs a PaintSession.
- *
- * @param paintSurface the drawing surface to use
- */
- protected SegmentedPaintSession(PaintSurface paintSurface) {
- super(paintSurface);
- }
-
- /**
- * Activates the tool.
- */
- public void beginSession() {
- getPaintSurface().setStatusMessage(PaintPlugin.getResourceString(
- "session.SegmentedInteractivePaint.message.anchorMode"));
- previousFigure = null;
- currentFigure = null;
- controlPoints.clear();
- }
-
- /**
- * Deactivates the tool.
- */
- public void endSession() {
- getPaintSurface().clearRubberbandSelection();
- if (previousFigure != null) getPaintSurface().drawFigure(previousFigure);
- }
-
- /**
- * Resets the tool.
- * Aborts any operation in progress.
- */
- public void resetSession() {
- getPaintSurface().clearRubberbandSelection();
- if (previousFigure != null) getPaintSurface().drawFigure(previousFigure);
-
- getPaintSurface().setStatusMessage(PaintPlugin.getResourceString(
- "session.SegmentedInteractivePaint.message.anchorMode"));
- previousFigure = null;
- currentFigure = null;
- controlPoints.clear();
- }
-
- /**
- * Handles a mouseDown event.
- *
- * @param event the mouse event detail information
- */
- public void mouseDown(MouseEvent event) {
- if (event.button != 1) return;
-
- getPaintSurface().setStatusMessage(PaintPlugin.getResourceString(
- "session.SegmentedInteractivePaint.message.interactiveMode"));
- previousFigure = currentFigure;
-
- if (controlPoints.size() > 0) {
- final Point lastPoint = (Point) controlPoints.elementAt(controlPoints.size() - 1);
- if (lastPoint.x == event.x || lastPoint.y == event.y) return; // spurious event
- }
- controlPoints.add(new Point(event.x, event.y));
- }
-
- /**
- * Handles a mouseDoubleClick event.
- *
- * @param event the mouse event detail information
- */
- public void mouseDoubleClick(MouseEvent event) {
- if (event.button != 1) return;
- if (controlPoints.size() >= 2) {
- getPaintSurface().clearRubberbandSelection();
- previousFigure = createFigure(
- (Point[]) controlPoints.toArray(new Point[controlPoints.size()]),
- controlPoints.size(), true);
- }
- resetSession();
- }
-
- /**
- * Handles a mouseUp event.
- *
- * @param event the mouse event detail information
- */
- public void mouseUp(MouseEvent event) {
- if (event.button != 1) {
- resetSession(); // abort if right or middle mouse button pressed
- return;
- }
- }
-
- /**
- * Handles a mouseMove event.
- *
- * @param event the mouse event detail information
- */
- public void mouseMove(MouseEvent event) {
- final PaintSurface ps = getPaintSurface();
- if (controlPoints.size() == 0) {
- ps.setStatusCoord(ps.getCurrentPosition());
- return; // spurious event
- } else {
- ps.setStatusCoordRange((Point) controlPoints.elementAt(controlPoints.size() - 1),
- ps.getCurrentPosition());
- }
-
- ps.clearRubberbandSelection();
- Point[] points = (Point[]) controlPoints.toArray(new Point[controlPoints.size() + 1]);
- points[controlPoints.size()] = ps.getCurrentPosition();
- currentFigure = createFigure(points, points.length, false);
- ps.addRubberbandSelection(currentFigure);
- }
-
- /**
- * Template Method: Creates a Figure for drawing rubberband entities and the final product
- *
- * @param points the array of control points
- * @param numPoints the number of valid points in the array (n >= 2)
- * @param closed true if the user double-clicked on the final control point
- */
- protected abstract Figure createFigure(Point[] points, int numPoints, boolean closed);
-}
diff --git a/examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/SolidEllipseFigure.java b/examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/SolidEllipseFigure.java
deleted file mode 100755
index e23263de4d..0000000000
--- a/examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/SolidEllipseFigure.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.paint;
-
-
-import org.eclipse.swt.graphics.*;
-
-/**
- * 2D Solid Ellipse object
- */
-public class SolidEllipseFigure extends Figure {
- private Color color;
- private int x1, y1, x2, y2;
- /**
- * Constructs a SolidEllipse
- * These objects are defined by any two diametrically opposing corners of a box
- * bounding the ellipse.
- *
- * @param color the color for this object
- * @param x1 the virtual X coordinate of the first corner
- * @param y1 the virtual Y coordinate of the first corner
- * @param x2 the virtual X coordinate of the second corner
- * @param y2 the virtual Y coordinate of the second corner
- */
- public SolidEllipseFigure(Color color, int x1, int y1, int x2, int y2) {
- this.color = color; this.x1 = x1; this.y1 = y1; this.x2 = x2; this.y2 = y2;
- }
- public void draw(FigureDrawContext fdc) {
- Rectangle r = fdc.toClientRectangle(x1, y1, x2, y2);
- fdc.gc.setBackground(color);
- fdc.gc.fillOval(r.x, r.y, r.width, r.height);
- }
- public void addDamagedRegion(FigureDrawContext fdc, Region region) {
- region.add(fdc.toClientRectangle(x1, y1, x2, y2));
- }
-}
diff --git a/examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/SolidPolygonFigure.java b/examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/SolidPolygonFigure.java
deleted file mode 100755
index a5aca3dd11..0000000000
--- a/examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/SolidPolygonFigure.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.paint;
-
-
-import org.eclipse.swt.graphics.*;
-
-/**
- * 2D Line object
- */
-public class SolidPolygonFigure extends Figure {
- private Color color;
- private int[] points;
- /**
- * Constructs a SolidPolygon
- * These objects are defined by a sequence of vertices.
- *
- * @param color the color for this object
- * @param vertices the array of vertices making up the polygon
- * @param numPoint the number of valid points in the array (n >= 3)
- */
- public SolidPolygonFigure(Color color, Point[] vertices, int numPoints) {
- this.color = color;
- this.points = new int[numPoints * 2];
- for (int i = 0; i < numPoints; ++i) {
- points[i * 2] = vertices[i].x;
- points[i * 2 + 1] = vertices[i].y;
- }
- }
- public void draw(FigureDrawContext fdc) {
- int[] drawPoints = new int[points.length];
- for (int i = 0; i < points.length; i += 2) {
- drawPoints[i] = points[i] * fdc.xScale - fdc.xOffset;
- drawPoints[i + 1] = points[i + 1] * fdc.yScale - fdc.yOffset;
- }
- fdc.gc.setBackground(color);
- fdc.gc.fillPolygon(drawPoints);
- }
- public void addDamagedRegion(FigureDrawContext fdc, Region region) {
- int xmin = Integer.MAX_VALUE, ymin = Integer.MAX_VALUE;
- int xmax = Integer.MIN_VALUE, ymax = Integer.MIN_VALUE;
-
- for (int i = 0; i < points.length; i += 2) {
- if (points[i] < xmin) xmin = points[i];
- if (points[i] > xmax) xmax = points[i];
- if (points[i+1] < ymin) ymin = points[i+1];
- if (points[i+1] > ymax) ymax = points[i+1];
- }
- region.add(fdc.toClientRectangle(xmin, ymin, xmax, ymax));
- }
-}
diff --git a/examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/SolidRectangleFigure.java b/examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/SolidRectangleFigure.java
deleted file mode 100755
index 608a58c4ed..0000000000
--- a/examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/SolidRectangleFigure.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.paint;
-
-
-import org.eclipse.swt.graphics.*;
-
-/**
- * 2D SolidRectangle object
- */
-public class SolidRectangleFigure extends Figure {
- private Color color;
- private int x1, y1, x2, y2;
- /**
- * Constructs a SolidRectangle
- * These objects are defined by any two diametrically opposing corners.
- *
- * @param color the color for this object
- * @param x1 the virtual X coordinate of the first corner
- * @param y1 the virtual Y coordinate of the first corner
- * @param x2 the virtual X coordinate of the second corner
- * @param y2 the virtual Y coordinate of the second corner
- */
- public SolidRectangleFigure(Color color, int x1, int y1, int x2, int y2) {
- this.color = color; this.x1 = x1; this.y1 = y1; this.x2 = x2; this.y2 = y2;
- }
- public void draw(FigureDrawContext fdc) {
- Rectangle r = fdc.toClientRectangle(x1, y1, x2, y2);
- fdc.gc.setBackground(color);
- fdc.gc.fillRectangle(r.x, r.y, r.width, r.height);
- }
- public void addDamagedRegion(FigureDrawContext fdc, Region region) {
- region.add(fdc.toClientRectangle(x1, y1, x2, y2));
- }
-}
diff --git a/examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/SolidRoundedRectangleFigure.java b/examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/SolidRoundedRectangleFigure.java
deleted file mode 100755
index 7b4146a342..0000000000
--- a/examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/SolidRoundedRectangleFigure.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.paint;
-
-
-import org.eclipse.swt.graphics.*;
-
-/**
- * 2D SolidRectangle object
- */
-public class SolidRoundedRectangleFigure extends Figure {
- private Color color;
- private int x1, y1, x2, y2, diameter;
- /**
- * Constructs a SolidRectangle
- * These objects are defined by any two diametrically opposing corners.
- *
- * @param color the color for this object
- * @param x1 the virtual X coordinate of the first corner
- * @param y1 the virtual Y coordinate of the first corner
- * @param x2 the virtual X coordinate of the second corner
- * @param y2 the virtual Y coordinate of the second corner
- * @param diameter the diameter of curvature of all four corners
- */
- public SolidRoundedRectangleFigure(Color color, int x1, int y1, int x2, int y2, int diameter) {
- this.color = color; this.x1 = x1; this.y1 = y1; this.x2 = x2; this.y2 = y2;
- this.diameter = diameter;
- }
- public void draw(FigureDrawContext fdc) {
- Rectangle r = fdc.toClientRectangle(x1, y1, x2, y2);
- fdc.gc.setBackground(color);
- fdc.gc.fillRoundRectangle(r.x, r.y, r.width, r.height, diameter, diameter);
- }
- public void addDamagedRegion(FigureDrawContext fdc, Region region) {
- region.add(fdc.toClientRectangle(x1, y1, x2, y2));
- }
-}
diff --git a/examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/TextFigure.java b/examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/TextFigure.java
deleted file mode 100755
index cdb8929ac3..0000000000
--- a/examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/TextFigure.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.paint;
-
-
-import org.eclipse.swt.graphics.*;
-
-/**
- * 2D Rectangle object
- */
-public class TextFigure extends Figure {
- private Color color;
- private Font font;
- private String text;
- private int x, y;
- /**
- * Constructs a TextFigure
- *
- * @param color the color for this object
- * @param font the font for this object
- * @param text the text to draw, tab and new-line expansion is performed
- * @param x the virtual X coordinate of the top-left corner of the text bounding box
- * @param y the virtual Y coordinate of the top-left corner of the text bounding box
- */
- public TextFigure(Color color, Font font, String text, int x, int y) {
- this.color = color; this.font = font; this.text = text; this.x = x; this.y = y;
- }
- public void draw(FigureDrawContext fdc) {
- Point p = fdc.toClientPoint(x, y);
- fdc.gc.setFont(font);
- fdc.gc.setForeground(color);
- fdc.gc.drawText(text, p.x, p.y, true);
- }
- public void addDamagedRegion(FigureDrawContext fdc, Region region) {
- Font oldFont = fdc.gc.getFont();
- fdc.gc.setFont(font);
- Point textExtent = fdc.gc.textExtent(text);
- fdc.gc.setFont(oldFont);
- region.add(fdc.toClientRectangle(x, y, x + textExtent.x, y + textExtent.y));
- }
-}
diff --git a/examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/TextTool.java b/examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/TextTool.java
deleted file mode 100755
index b5807969fe..0000000000
--- a/examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/TextTool.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.paint;
-
-
-import org.eclipse.jface.dialogs.*;
-import org.eclipse.swt.events.*;
-
-/**
- * A text drawing tool.
- */
-public class TextTool extends BasicPaintSession implements PaintTool {
- private ToolSettings settings;
- private String drawText = PaintPlugin.getResourceString("tool.Text.settings.defaulttext");
-
- /**
- * Constructs a PaintTool.
- *
- * @param toolSettings the new tool settings
- * @param paintSurface the PaintSurface we will render on.
- */
- public TextTool(ToolSettings toolSettings, PaintSurface paintSurface) {
- super(paintSurface);
- set(toolSettings);
- }
-
- /**
- * Sets the tool's settings.
- *
- * @param toolSettings the new tool settings
- */
- public void set(ToolSettings toolSettings) {
- settings = toolSettings;
- }
-
- /**
- * Returns name associated with this tool.
- *
- * @return the localized name of this tool
- */
- public String getDisplayName() {
- return PaintPlugin.getResourceString("tool.Text.label");
- }
-
- /**
- * Activates the tool.
- */
- public void beginSession() {
- getPaintSurface().setStatusMessage(PaintPlugin.getResourceString(
- "session.Text.message"));
- }
-
- /**
- * Deactivates the tool.
- */
- public void endSession() {
- getPaintSurface().clearRubberbandSelection();
- }
-
- /**
- * Aborts the current operation.
- */
- public void resetSession() {
- getPaintSurface().clearRubberbandSelection();
- }
-
- /**
- * Handles a mouseDown event.
- *
- * @param event the mouse event detail information
- */
- public void mouseDown(MouseEvent event) {
- if (event.button == 1) {
- // draw with left mouse button
- getPaintSurface().commitRubberbandSelection();
- } else {
- // set text with right mouse button
- getPaintSurface().clearRubberbandSelection();
- InputDialog inputDialog = new InputDialog(getPaintSurface().getShell(),
- PaintPlugin.getResourceString("tool.Text.dialog.title"),
- PaintPlugin.getResourceString("tool.Text.dialog.message"),
- drawText, null);
- inputDialog.setBlockOnOpen(true);
- inputDialog.open();
- if (inputDialog.getReturnCode() == InputDialog.OK) drawText = inputDialog.getValue();
- inputDialog.close();
- }
- }
-
- /**
- * Handles a mouseDoubleClick event.
- *
- * @param event the mouse event detail information
- */
- public void mouseDoubleClick(MouseEvent event) {
- }
-
- /**
- * Handles a mouseUp event.
- *
- * @param event the mouse event detail information
- */
- public void mouseUp(MouseEvent event) {
- }
-
- /**
- * Handles a mouseMove event.
- *
- * @param event the mouse event detail information
- */
- public void mouseMove(MouseEvent event) {
- final PaintSurface ps = getPaintSurface();
- ps.setStatusCoord(ps.getCurrentPosition());
- ps.clearRubberbandSelection();
- ps.addRubberbandSelection(
- new TextFigure(settings.commonForegroundColor, settings.commonFont,
- drawText, event.x, event.y));
- }
-}
diff --git a/examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/ToolSettings.java b/examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/ToolSettings.java
deleted file mode 100755
index 02fb877693..0000000000
--- a/examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/ToolSettings.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.paint;
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.graphics.*;
-
-/**
- * Tool Settings objects group tool-related configuration information.
- */
-public class ToolSettings {
- public static final int ftNone = 0, ftOutline = 1, ftSolid = 2;
-
- /**
- * commonForegroundColor: current tool foreground colour
- */
- public Color commonForegroundColor;
-
- /**
- * commonBackgroundColor: current tool background colour
- */
- public Color commonBackgroundColor;
-
- /**
- * commonFont: current font
- */
- public Font commonFont;
-
- /**
- * commonFillType: current fill type
- * <p>One of ftNone, ftOutline, ftSolid.</p>
- */
- public int commonFillType = ftNone;
-
- /**
- * commonLineStyle: current line type
- */
- public int commonLineStyle = SWT.LINE_SOLID;
-
- /**
- * airbrushRadius: coverage radius in pixels
- */
- public int airbrushRadius = 10;
-
- /**
- * airbrushIntensity: average surface area coverage in region defined by radius per "jot"
- */
- public int airbrushIntensity = 30;
-
- /**
- * roundedRectangleCornerDiameter: the diameter of curvature of corners in a rounded rectangle
- */
- public int roundedRectangleCornerDiameter = 16;
-}
diff --git a/examples/org.eclipse.swt.examples/.classpath b/examples/org.eclipse.swt.examples/.classpath
deleted file mode 100755
index 065ac06e19..0000000000
--- a/examples/org.eclipse.swt.examples/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/examples/org.eclipse.swt.examples/.cvsignore b/examples/org.eclipse.swt.examples/.cvsignore
deleted file mode 100755
index c5e82d7458..0000000000
--- a/examples/org.eclipse.swt.examples/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin \ No newline at end of file
diff --git a/examples/org.eclipse.swt.examples/.project b/examples/org.eclipse.swt.examples/.project
deleted file mode 100644
index 7277259e47..0000000000
--- a/examples/org.eclipse.swt.examples/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.swt.examples</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.PluginNature</nature>
- </natures>
-</projectDescription>
diff --git a/examples/org.eclipse.swt.examples/about.html b/examples/org.eclipse.swt.examples/about.html
deleted file mode 100644
index 9db411aab9..0000000000
--- a/examples/org.eclipse.swt.examples/about.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<title>About</title>
-<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>20th June, 2002</p>
-<h3>License</h3>
-<p>Eclipse.org makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise indicated below, the Content is provided to you under the terms and conditions of the
-Common Public License Version 1.0 (&quot;CPL&quot;). A copy of the CPL is available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>.
-For purposes of the CPL, &quot;Program&quot; will mean the Content.</p>
-
-<h3>Contributions</h3>
-
-<p>If this Content is licensed to you under the terms and conditions of the CPL, any Contributions, as defined in the CPL, uploaded, submitted, or otherwise
-made available to Eclipse.org, members of Eclipse.org and/or the host of Eclipse.org web site, by you that relate to such
-Content are provided under the terms and conditions of the CPL and can be made available to others under the terms of the CPL.</p>
-
-<p>If this Content is licensed to you under license terms and conditions other than the CPL (&quot;Other License&quot;), any modifications, enhancements and/or
-other code and/or documentation (&quot;Modifications&quot;) uploaded, submitted, or otherwise made available to Eclipse.org, members of Eclipse.org and/or the
-host of Eclipse.org, by you that relate to such Content are provided under terms and conditions of the Other License and can be made available
-to others under the terms of the Other License. In addition, with regard to Modifications for which you are the copyright holder, you are also
-providing the Modifications under the terms and conditions of the CPL and such Modifications can be made available to others under the terms of
-the CPL.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/examples/org.eclipse.swt.examples/build.properties b/examples/org.eclipse.swt.examples/build.properties
deleted file mode 100755
index fb675c8780..0000000000
--- a/examples/org.eclipse.swt.examples/build.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2003 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Common Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/cpl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-bin.includes = doc-html/,\
- plugin.properties,\
- plugin.xml,\
- about.html,\
- swtexamples.jar
-
-src.includes = about.html
-
-source.swtexamples.jar = src/
diff --git a/examples/org.eclipse.swt.examples/doc-html/hglegal.htm b/examples/org.eclipse.swt.examples/doc-html/hglegal.htm
deleted file mode 100755
index 621115699c..0000000000
--- a/examples/org.eclipse.swt.examples/doc-html/hglegal.htm
+++ /dev/null
@@ -1,14 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <LINK REL="stylesheet" HREF="../../../book.css" CHARSET="ISO-8859-1" TYPE="text/css">
- <title>Legal Notices</title>
-</head>
-<body>
-
-<h3>
-<a NAME="Notices"></a>Notices</h3>
-(c) Copyright (c) 2000, 2004 IBM Corporation and others. All Rights Reserved.
-</body>
-</html>
diff --git a/examples/org.eclipse.swt.examples/doc-html/ngibmcpy.gif b/examples/org.eclipse.swt.examples/doc-html/ngibmcpy.gif
deleted file mode 100755
index c786e43e1f..0000000000
--- a/examples/org.eclipse.swt.examples/doc-html/ngibmcpy.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples/doc-html/swt_addressbook_ex.html b/examples/org.eclipse.swt.examples/doc-html/swt_addressbook_ex.html
deleted file mode 100755
index 4ccddb4adc..0000000000
--- a/examples/org.eclipse.swt.examples/doc-html/swt_addressbook_ex.html
+++ /dev/null
@@ -1,32 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <title>SWT - Address Book Example</title>
-</head>
-<body>
-
-<h2>SWT standalone example - Address Book</h2>
-
-<p>
-The AddressBook example shows how a Table control can be used to
-present information in a tabular format. The application can save and load data
-from a file, sort the entries, and search for strings within the fields.
-</p>
-
-<h3>Running the example</h3>
-<p>
-Follow the <a href="swt_manual_setup.html">SWT standalone examples setup</a>
-instructions to install and run the example from your workspace.
-</p>
-<p>
-The "Main" class is <code>org.eclipse.swt.examples.addressbook.AddressBook</code>.
-</p>
-<p>
-This example can also be run using the <a href="../../org.eclipse.swt.examples.launcher/doc-html/swt_launcher_ex.html">Example Launcher</a>.
-Select the <strong>Address Book</strong> item from the <strong>Standalone</strong> category and click <strong>Run</strong>.
-</p>
-
-<p><a href="hglegal.htm"><img SRC="ngibmcpy.gif" ALT="Copyright IBM Corporation and others 2000, 2004. All Rights Reserved." BORDER=0 height=14 width=324></a></p>
-</body>
-</html>
diff --git a/examples/org.eclipse.swt.examples/doc-html/swt_clipboard_ex.html b/examples/org.eclipse.swt.examples/doc-html/swt_clipboard_ex.html
deleted file mode 100644
index a590590c5f..0000000000
--- a/examples/org.eclipse.swt.examples/doc-html/swt_clipboard_ex.html
+++ /dev/null
@@ -1,31 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <title>SWT - Clipboard Example</title>
-</head>
-<body>
-
-<h2>SWT standalone example - Clipboard</h2>
-
-<p>
-The Clipboard example shows the various SWT clipboard transfer types in use. The example can
-cut, copy and paste using Text, RTF, Binary and File transfer types.
-</p>
-
-<h3>Running the example</h3>
-<p>
-Follow the <a href="swt_manual_setup.html">SWT standalone examples setup</a>
-instructions to install and run the example from your workspace.
-</p>
-<p>
-The "Main" class is <code>org.eclipse.swt.examples.clipboard.ClipboardExample</code>.
-</p>
-<p>
-This example can also be run using the <a href="../../org.eclipse.swt.examples.launcher/doc-html/swt_launcher_ex.html">Example Launcher</a>.
-Select the <strong>Clipboard</strong> item from the <strong>Standalone</strong> category and click <strong>Run</strong>.
-</p>
-
-<p><a href="hglegal.htm"><img SRC="ngibmcpy.gif" ALT="Copyright IBM Corporation and others 2000, 2004. All Rights Reserved." BORDER=0 height=14 width=324></a></p>
-</body>
-</html>
diff --git a/examples/org.eclipse.swt.examples/doc-html/swt_fileviewer_ex.html b/examples/org.eclipse.swt.examples/doc-html/swt_fileviewer_ex.html
deleted file mode 100755
index 9c6f23ff3d..0000000000
--- a/examples/org.eclipse.swt.examples/doc-html/swt_fileviewer_ex.html
+++ /dev/null
@@ -1,33 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <title>SWT - File Viewer Example</title>
-</head>
-<body>
-
-<h2>SWT standalone example - File Viewer</h2>
-
-<p>
-The File Viewer example shows how a simple application can be implemented using SWT.
-This application provides the ability to navigate files and folders on the local file system and manipulate them using drag and drop.
-It uses alternate threads for long actions and demonstrates the use of the Tree,
-Table, and Toolbar widgets and the Program class.
-</p>
-
-<h3>Running the example</h3>
-<p>
-Follow the <a href="swt_manual_setup.html">SWT standalone examples setup</a>
-instructions to install and run the example from your workspace.
-</p>
-<p>
-The "Main" class is <code>org.eclipse.swt.examples.fileviewer.FileViewer</code>.
-</p>
-<p>
-This example can also be run using the <a href="../../org.eclipse.swt.examples.launcher/doc-html/swt_launcher_ex.html">Example Launcher</a>.
-Select the <strong>File Viewer</strong> item from the <strong>Standalone</strong> category and click <strong>Run</strong>.
-</p>
-
-<p><a href="hglegal.htm"><img SRC="ngibmcpy.gif" ALT="Copyright IBM Corporation and others 2000, 2004. All Rights Reserved." BORDER=0 height=14 width=324></a></p>
-</body>
-</html>
diff --git a/examples/org.eclipse.swt.examples/doc-html/swt_helloworld_ex.html b/examples/org.eclipse.swt.examples/doc-html/swt_helloworld_ex.html
deleted file mode 100755
index 6bf168b3b7..0000000000
--- a/examples/org.eclipse.swt.examples/doc-html/swt_helloworld_ex.html
+++ /dev/null
@@ -1,61 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <title>SWT - Hello World Examples</title>
-</head>
-<body>
-
-<h2>SWT standalone example - Hello World</h2>
-
-<p>
-The Hello World examples are a set of introductory examples that show how to get started
-on creating an application with SWT. They cover the creation of a shell, the use of event listeners,
-using layouts, processing events in an event loop, and drawing with a Graphics Context.
-</p>
-
-<h4>Hello World 1</h4>
-<p>
-This example demonstrates how to open a Shell and process the events.
-</p>
-
-<h4>Hello World 2</h4>
-<p>
-This example builds on HelloWorld1 and demonstrates how to display a Label inside of the Shell.
-</p>
-
-<h4>Hello World 3</h4>
-<p>
-This example builds on HelloWorld2 and demonstrates how to use a listener mechanism to resize the Label
-when the Shell size changes.
-</p>
-
-<h4>Hello World 4</h4>
-<p>
-This example builds on HelloWorld2 and demonstrates how to use a Layout to resize the Label
-when the Shell size changes.
-</p>
-
-<h4>Hello World 5</h4>
-<p>
-This example builds on HelloWorld1 and demonstrates how to draw directly
-on an SWT Control using a Graphics Context.
-</p>
-
-<h3>Running the example</h3>
-
-<p>
-Follow the <a href="swt_manual_setup.html">SWT standalone examples setup</a>
-instructions to install and run the example from your workspace.
-</p>
-<p>
-The "Main" class is <code>org.eclipse.swt.examples.helloworld.HelloWorld[1-5]</code>.
-</p>
-<p>
-This example can also be run using the <a href="../../org.eclipse.swt.examples.launcher/doc-html/swt_launcher_ex.html">Example Launcher</a>.
-Select one of the <strong>Hello World</strong> items from the <strong>Standalone</strong> category and click <strong>Run</strong>.
-</p>
-
-<p><a href="hglegal.htm"><img SRC="ngibmcpy.gif" ALT="Copyright IBM Corporation and others 2000, 2004. All Rights Reserved." BORDER=0 height=14 width=324></a></p>
-</body>
-</html>
diff --git a/examples/org.eclipse.swt.examples/doc-html/swt_hoverhelp_ex.html b/examples/org.eclipse.swt.examples/doc-html/swt_hoverhelp_ex.html
deleted file mode 100755
index d415be913d..0000000000
--- a/examples/org.eclipse.swt.examples/doc-html/swt_hoverhelp_ex.html
+++ /dev/null
@@ -1,36 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <title>SWT - Hover Help Example</title>
-</head>
-<body>
-
-<h2>SWT standalone example - Hover Help</h2>
-
-<p>
-The Hover Help example shows how to implement custom tooltips and hover help support
-on various SWT controls including Buttons, TableItems, ToolItems and TreeItems.
-To see the custom tooltips in action, hover over an item or button in the UI, and
-notice that images appear in the left-hand corner of the tooltip.
-To see the custom hover help in action, hover over an item or button in the UI until
-the tooltip is displayed. Then, without moving the mouse, press <strong>F1</strong> and a new
-Shell will be shown with the extended hover help information for the UI element.
-</p>
-
-<h3>Running the example</h3>
-<p>
-Follow the <a href="swt_manual_setup.html">SWT standalone examples setup</a>
-instructions to install and run the example from your workspace.
-</p>
-<p>
-The "Main" class is <code>org.eclipse.swt.examples.hoverhelp.HoverHelp</code>.
-</p>
-<p>
-This example can also be run using the <a href="../../org.eclipse.swt.examples.launcher/doc-html/swt_launcher_ex.html">Example Launcher</a>.
-Select the <strong>Hover Help</strong> item from the <strong>Standalone</strong> category and click <strong>Run</strong>.
-</p>
-
-<p><a href="hglegal.htm"><img SRC="ngibmcpy.gif" ALT="Copyright IBM Corporation and others 2000, 2004. All Rights Reserved." BORDER=0 height=14 width=324></a></p>
-</body>
-</html>
diff --git a/examples/org.eclipse.swt.examples/doc-html/swt_imageanalyzer_ex.html b/examples/org.eclipse.swt.examples/doc-html/swt_imageanalyzer_ex.html
deleted file mode 100755
index 9804c8b394..0000000000
--- a/examples/org.eclipse.swt.examples/doc-html/swt_imageanalyzer_ex.html
+++ /dev/null
@@ -1,56 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <title>SWT - Image Analyzer Example</title>
-</head>
-<body>
-
-<h2>SWT standalone example - Image Analyzer</h2>
-
-<p>
-The ImageAnalyzer example opens image files and displays their visual contents and
-an image data summary.
-The user can make adjustments to various elements of the image such as scaling and Alpha
-blending, and can save these changes to a file.
-</p>
-<p>
-The ImageAnalyzer can load and display image files of type GIF, JPEG, BMP, ICO, and PNG.
-If a loaded file is an interlaced GIF or PNG, or a progressive JPEG, and <strong>Incremental Display</strong> is selected,
-then the ImageAnalyzer will display the image increments as they are loaded.
-If the file contains an animated GIF, then the <strong>Next</strong>, <strong>Previous</strong>, and <strong>Animate</strong> buttons become enabled,
-and can be used to cycle through and animate the images in the file. If a GIF defines a background color,
-as many animated GIFs do, then selecting <strong>Background</strong> will use the GIF's background color.
-If the image has transparency, which is possible with images of type GIF, PNG, and ICO, then selecting <strong>Display Mask</strong> will draw the image's transparency
-mask to the right of the image. You can change the background color of the ImageAnalyzer in order to see the transparency work.
-To turn off transparency, deselect <strong>Display Transparency</strong>.
-After an image is loaded, it can be scaled with the <strong>Scale</strong> combo, or have alpha transparency applied to it using the <strong>Alpha-K</strong> combo
-and <strong>Alpha</strong> menu. <strong>File</strong> &gt; <strong>Reopen</strong> restores the scaling and alpha attributes to their default values and reloads the current image file.
-If the image has transparency,
-<strong>File</strong> &gt; <strong>Save Mask As...</strong> can be used to save the image's transparency mask.
-</p>
-<p>
-When SWT loads an image file, an instance of <code>org.eclipse.swt.graphics.ImageData</code> is created (though in the case of an ICO file or
-multi-image GIF an array of <code>ImageData</code> instances is created). The ImageAnalyzer displays all of the data stored in the <code>ImageData</code>
-instance(s) for the currently loaded image file, including the pixel data. Hovering over a pixel in the image display will show the RGB
-color data for that pixel. For certain images, particularly animated GIFs, additional data is stored in the <code>org.eclipse.swt.graphics.ImageLoader</code>
-instance that is used to load the image. The ImageAnalyzer displays this data as well.
-</p>
-
-<h3>Running the example</h3>
-
-<p>
-Follow the <a href="swt_manual_setup.html">SWT standalone examples setup</a>
-instructions to install and run the example from your workspace.
-</p>
-<p>
-The "Main" class is <code>org.eclipse.swt.examples.imageanalyzer.ImageAnalyzer</code>.
-</p>
-<p>
-This example can also be run using the <a href="../../org.eclipse.swt.examples.launcher/doc-html/swt_launcher_ex.html">Example Launcher</a>.
-Select the <strong>Image Analyzer</strong> item from the <strong>Standalone</strong> category and click <strong>Run</strong>.
-</p>
-
-<p><a href="hglegal.htm"><img SRC="ngibmcpy.gif" ALT="Copyright IBM Corporation and others 2000, 2004. All Rights Reserved." BORDER=0 height=14 width=324></a></p>
-</body>
-</html>
diff --git a/examples/org.eclipse.swt.examples/doc-html/swt_javaviewer_ex.html b/examples/org.eclipse.swt.examples/doc-html/swt_javaviewer_ex.html
deleted file mode 100755
index 389cb9e4bb..0000000000
--- a/examples/org.eclipse.swt.examples/doc-html/swt_javaviewer_ex.html
+++ /dev/null
@@ -1,33 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <title>SWT - Java Syntax Viewer Example</title>
-</head>
-<body>
-
-<h2>SWT standalone example - Java Syntax Viewer</h2>
-
-<p>
-This example shows how to implement a user-defined line styler for the StyledText widget.
-The example provides a typical editor interface.
-To see the effect of the line styler, open a *.java file, and
-when the contents of the file are displayed in the editor area, notice that the keywords have been highlighted.
-</p>
-
-<h3>Running the example</h3>
-<p>
-Follow the <a href="swt_manual_setup.html">SWT standalone examples setup</a>
-instructions to install and run the example from your workspace.
-</p>
-<p>
-The "Main" class is <code>org.eclipse.swt.examples.javaviewer.JavaViewer</code>.
-</p>
-<p>
-This example can also be run using the <a href="../../org.eclipse.swt.examples.launcher/doc-html/swt_launcher_ex.html">Example Launcher</a>.
-Select the <strong>Java Syntax Viewer</strong> item from the <strong>Standalone</strong> category and click <strong>Run</strong>.
-</p>
-
-<p><a href="hglegal.htm"><img SRC="ngibmcpy.gif" ALT="Copyright IBM Corporation and others 2000, 2004. All Rights Reserved." BORDER=0 height=14 width=324></a></p>
-</body>
-</html>
diff --git a/examples/org.eclipse.swt.examples/doc-html/swt_manual_setup.html b/examples/org.eclipse.swt.examples/doc-html/swt_manual_setup.html
deleted file mode 100755
index 5d828086cd..0000000000
--- a/examples/org.eclipse.swt.examples/doc-html/swt_manual_setup.html
+++ /dev/null
@@ -1,118 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <title>SWT Standalone Examples Setup</title>
-</head>
-<body>
-
-<h2>SWT standalone examples setup</h2>
-
-<h3>Importing example source</h3>
-
-<p>
-*** In the following description, substitute the location in which you installed Eclipse for INSTALLDIR ***
-</p>
-
-<p>Import the example code and all its required resources into your workspace:</p>
-
-<ol>
-<li>Create a Java Project called "SWT Examples".
-<li>Select the project "SWT Examples" in the Packages view.
-<li>Select the <strong>File</strong> &gt; <strong>Import</strong> menu, then select <strong>Zip File</strong> from the subsequent dialog and click <strong>Next</strong>.
-<li>Locate the source zip file for the SWT examples. For example:
- <ul>
- <li><em>win32: </em><code>INSTALLDIR\eclipse\plugins\org.eclipse.sdk.examples.source_3.0.0\src\org.eclipse.swt.examples_3.0.0\swtexamplessrc.zip</code>
- <li><em>*ix: </em><code>INSTALLDIR/eclipse/plugins/org.eclipse.sdk.examples.source_3.0.0/src/org.eclipse.swt.examples_3.0.0/swtexamplessrc.zip</code>
- </ul>
-<li>Click <strong>Finish</strong>.
-<li>Select the <strong>File</strong> &gt; <strong>Import</strong> menu, then select <strong>Zip File</strong> from the subsequent dialog and click <strong>Next</strong>.
-<li>Locate the jar file for the SWT examples. For example:
- <ul>
- <li><em>win32: </em><code>INSTALLDIR\eclipse\plugins\org.eclipse.swt.examples_3.0.0\swtexamples.jar</code>
- <li><em>*ix: </em><code>INSTALLDIR/eclipse/plugins/org.eclipse.swt.examples_3.0.0/swtexamples.jar</code>
- </ul>
-<li>Expand the top level directory of the jar file (/), uncheck "META-INF", and click <strong>Finish</strong>.
-<li>In the resulting "<em>Overwrite?</em>" prompter click <strong>No To All</strong> so that only non-class resources will be imported.
-</ol>
-
-<p>Now you need to compile the SWT examples. In order to do this, you must add the SWT jar(s) to
-the compile path:</p>
-<ol>
-<li>Select the project "SWT Examples" in the Packages view, and from its context menu select <strong>Properties</strong>.
-<li>Select the <strong>Java Build Path</strong> page, and then select its <strong>Libraries</strong> tab.
-<li>Click on the <strong>Add External JARs...</strong> button.
-<li>Locate the swt jar for the platform on which you wish to run:<br>
- <ul>
- <li><em>win32: </em><code>INSTALLDIR\eclipse\plugins\org.eclipse.swt.win32_3.0.0\ws\win32\swt.jar</code>
- <li><em>gtk: </em><code>INSTALLDIR/eclipse/plugins/org.eclipse.swt.gtk_3.0.0/ws/gtk/swt.jar</code>
- <li><em>motif: </em><code>INSTALLDIR/eclipse/plugins/org.eclipse.swt.motif_3.0.0/ws/motif/swt.jar</code>
- <li><em>photon: </em><code>INSTALLDIR/eclipse/plugins/org.eclipse.swt.photon_3.0.0/ws/photon/swt.jar</code>
- <li><em>macosx: </em><code>INSTALLDIR/eclipse/plugins/org.eclipse.swt.carbon_3.0.0/ws/carbon/swt.jar</code>
- </ul>
-<li>Click on OK.
-</ol>
-<p><strong>NOTE:</strong> For some platforms, such as GTK, more than one jar is required to run SWT (on
-GTK there is a swt.jar and a swt-pi.jar and a swt-mozilla.jar file). In this case all of the required jars must
-be added to the class path. This is done by repeating the steps above for each jar file.
-All jar files are located in the same directory/folder.</p>
-
-<p>At this point your SWT examples should be compiled without any errors. Check the Tasks
-view for errors. If you get an error like "<code>java.lang.Object</code> not found" it means
-you have not configured a JRE. Go to the <strong>Window</strong> &gt; <strong>Preferences</strong> dialog
-and select the <strong>Java</strong> &gt; <strong>Installed JREs</strong> preference page and ensure that a JRE is installed
-and that the path to the JRE is correct.</p>
-
-<h3><a NAME="Run"></a>Running the Example</h3>
-
-<p>Now you have to configure Eclipse to run the example. This requires putting the SWT
-JNI libraries on the library path so that the VM can find them:
-
-<ol>
-<li>Open the Java perspective.
-<li>In the Packages view, select the main class that you want to run.
- For example, the main class for the Address Book example is
- &nbsp;&nbsp;&nbsp;&nbsp;<code>org.eclipse.swt.examples.addressbook.AddressBook</code>.
-<li>Select <strong>Run</strong> &gt; <strong>Run...</strong> from the main menu.
-<li>In the Launch Configurations dialog that appears, select <strong>Java Application</strong> and click
- on the <strong>New</strong> button.
-<li>Fill in the <strong>Name</strong>, <strong>Project</strong> and <strong>Main</strong> class fields according to the example that you wish to run.
-<li>Select the <strong>Arguments</strong> tab. In the <strong>VM Arguments</strong> area specify the location of the SWT
- library depending on your target platform as follows:
- <ul>
- <li><em>win32: </em><code>-Djava.library.path=INSTALLDIR\plugins\org.eclipse.swt.win32_3.0.0\os\win32\x86</code>
- <li><em>linux gtk: </em><code>-Djava.library.path=INSTALLDIR/eclipse/plugins/org.eclipse.swt.gtk_3.0.0/os/linux/x86</code>
- <li><em>linux motif: </em><code>-Djava.library.path=INSTALLDIR/eclipse/plugins/org.eclipse.swt.motif_3.0.0/os/linux/x86</code>
- <li><em>solaris motif: </em><code>-Djava.library.path=INSTALLDIR/eclipse/plugins/org.eclipse.swt.motif_3.0.0/os/solaris/sparc</code>
- <li><em>aix motif: </em><code>-Djava.library.path=INSTALLDIR/eclipse/plugins/org.eclipse.swt.motif_3.0.0/os/aix/ppc</code>
- <li><em>hpux motif: </em><code>-Djava.library.path=INSTALLDIR/eclipse/plugins/org.eclipse.swt.motif_3.0.0/os/hpux/PA_RISC</code>
- <li><em>photon qnx: </em><code>-Djava.library.path=INSTALLDIR/eclipse/plugins/org.eclipse.swt.photon_3.0.0/os/qnx/x86</code>
- <li><em>macosx: </em><code>-Djava.library.path=INSTALLDIR/eclipse/plugins/org.eclipse.swt.carbon_3.0.0/os/macosx/ppc</code>
- </ul>
-<li>Click on the <strong>Run</strong> button.
-</ol>
-
-
-<h3>Examples Overview</h3>
-<p>
-Consult the documentation of each individual example for the name of
-its main class and additional details.
-The following examples are included in the <code>swtexamples.jar</code>:
-</p>
-<ul>
-<li><a href="swt_addressbook_ex.html">Address Book</a>
-<li><a href="swt_clipboard_ex.html">Clipboard</a>
-<li><a href="../../org.eclipse.swt.examples.controls/doc-html/swt_controls_ex.html">Controls</a>
-<li><a href="../../org.eclipse.swt.examples.controls/doc-html/swt_customcontrols_ex.html">Custom Controls</a>
-<li><a href="swt_fileviewer_ex.html">File Viewer</a>
-<li><a href="swt_helloworld_ex.html">Hello World [1-5]</a>
-<li><a href="swt_hoverhelp_ex.html">Hover Help</a>
-<li><a href="swt_imageanalyzer_ex.html">Image Analyzer</a>
-<li><a href="swt_javaviewer_ex.html">Java Syntax Viewer</a>
-<li><a href="../../org.eclipse.swt.examples.layouts/doc-html/swt_layout_ex.html">Layouts</a>
-<li><a href="swt_texteditor_ex.html">Text Editor</a>
-</ul>
-
-<p><br><a href="hglegal.htm"><img SRC="ngibmcpy.gif" ALT="Copyright IBM Corporation and others 2000, 2004. All Rights Reserved." BORDER=0 height=14 width=324></a>
-</body>
-</html>
diff --git a/examples/org.eclipse.swt.examples/doc-html/swt_texteditor_ex.html b/examples/org.eclipse.swt.examples/doc-html/swt_texteditor_ex.html
deleted file mode 100755
index b35f246a35..0000000000
--- a/examples/org.eclipse.swt.examples/doc-html/swt_texteditor_ex.html
+++ /dev/null
@@ -1,34 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <title>SWT - Text Editor Example</title>
-</head>
-<body>
-
-<h2>SWT standalone example - Text Editor</h2>
-
-<p>
-This example demonstrates how to use a StyledText widget to implement
-a text editor with formatting support.
-The example has a typical text editor interface.
-The <strong>Edit</strong> menu contains <strong>Cut</strong>, <strong>Copy</strong>, <strong>Paste</strong> and <strong>Set Font</strong> items. The toolbar
-provides a bold text toggle, three colour tools, and a reset button, all of which operate on the current selection.
-</p>
-
-<h3>Running the example</h3>
-<p>
-Follow the <a href="swt_manual_setup.html">SWT standalone examples setup</a>
-instructions to install and run the example from your workspace.
-</p>
-<p>
-The "Main" class is <code>org.eclipse.swt.examples.texteditor.TextEditor</code>.
-</p>
-<p>
-This example can also be run using the <a href="../../org.eclipse.swt.examples.launcher/doc-html/swt_launcher_ex.html">Example Launcher</a>.
-Select the <strong>Text Editor</strong> item from the <strong>Standalone</strong> category and click <strong>Run</strong>.
-</p>
-
-<p><a href="hglegal.htm"><img SRC="ngibmcpy.gif" ALT="Copyright IBM Corporation and others 2000, 2004. All Rights Reserved." BORDER=0 height=14 width=324></a></p>
-</body>
-</html>
diff --git a/examples/org.eclipse.swt.examples/plugin.properties b/examples/org.eclipse.swt.examples/plugin.properties
deleted file mode 100755
index 91d1514232..0000000000
--- a/examples/org.eclipse.swt.examples/plugin.properties
+++ /dev/null
@@ -1,133 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2003 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Common Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/cpl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-providerName = Eclipse.org
-plugin.SWTStandaloneExampleSet.name = SWT Standalone Examples Plugin
-
-launchcategory.SWTStandaloneExamples.name = Standalone
-launchcategory.SWTStandaloneExamples.description = \
- A collection of Standard Widget Toolkit examples that run independant \
- of the Eclipse Platform.
-
-launchitem.AddressBook.name = Address Book
-launchitem.AddressBook.description = \
- The AddressBook example shows how the Table control can be used to \
- present information in a tabular format.\n\n\
- The application can save and load data from a file, sort the entries, and \
- search for strings within the fields.
-
-launchitem.BrowserExample.name = Browser
-launchitem.BrowserExample.description = \
- This example is a simple demonstration of the SWT Browser widget.\n\n\
- It consists of a composite containing a Browser widget to render HTML. \
- Additional widgets allow the user to perform typical browser actions (for example, navigate to a particular URL, go back, forward, refresh and stop).
-
-launchitem.Clipboard.name = Clipboard
-launchitem.Clipboard.description = \
- The Clipboard example shows the various SWT clipboard transfer types in use.
-
-launchitem.ControlExample.name = SWT Controls Example
-launchitem.ControlExample.description = \
- The Controls example is a simple demonstration of common SWT controls. \n\n\
- It consists of a tab folder where each tab in the folder allows the user \
- to interact with a different control. \
- The user can change styles and settings and view how this affects the control.
-
-launchitem.FileViewer.name = File Viewer
-launchitem.FileViewer.description = \
- The File Viewer example shows how a simple application can be implemented using SWT.\n\n\
- This application provides the ability to navigate files and folders and manipulate them via Drag and Drop. \
- It includes the use of alternate threads for long actions and demonstrates the use of the Tree, \
- Table, Toolbar and Program.
-
-launchitem.HoverHelp.name = Hover Help
-launchitem.HoverHelp.description = \
- The Hover Help example shows how to implement custom tooltips and hover help support \
- on a number of different SWT controls including Buttons, TableItems, ToolItems and TreeItems.\n\n\
- The example implements its own tooltip and hover help support. \
- To see the custom tooltips in action, hover over an item or button in the UI. \
- An image appears in the left-hand corner of the tooltip.\n\n\
- To see the custom hover help in action, hover over an item or button in the UI until \
- the tooltip is displayed. Without moving the mouse, hit F1. A new Shell will pop up with the \
- extended hover help information for the UI element in question
-
-launchitem.HelloWorld1.name = Hello World (1)
-launchitem.HelloWorld1.description = \
- This example demonstrates how to open a Shell and process the events.
-
-launchitem.HelloWorld2.name = Hello World (2)
-launchitem.HelloWorld2.description = \
- This example builds on HelloWorld1 and demonstrates how to display a Label inside the Shell.
-
-launchitem.HelloWorld3.name = Hello World (3)
-launchitem.HelloWorld3.description = \
- This example builds on HelloWorld2 and demonstrates how to resize the Label \
- when the Shell resizes using a Listener mechanism.
-
-launchitem.HelloWorld4.name = Hello World (4)
-launchitem.HelloWorld4.description = \
- This example builds on HelloWorld2 and demonstrates how to resize the Label \
- when the Shell resizes using a Layout.
-
-launchitem.HelloWorld5.name = Hello World (5)
-launchitem.HelloWorld5.description = \
- This example builds on HelloWorld1 and demonstrates how to draw directly on an SWT Control using a graphic context.
-
-launchitem.ImageAnalyzer.name = Image Analyzer
-launchitem.ImageAnalyzer.description = \
- The ImageAnalyzer opens image files and displays the visual contents of the file along with a \
- summary of the data in the image file.\n\n\
- The user can make adjustments to various elements of the image such as scaling and Alpha \
- blending and can save these changes to a file.\n\n\
- The ImageAnalyzer will load and display image files of type GIF, JPEG, BMP, ICO, and PNG. \
- To open a file, use the File->Open... menu item, and select the image file in the FileDialog.\n\n\
- If the file is an interlaced GIF or PNG or a progressive JPEG, and Incremental Display is selected, \
- then the ImageAnalyzer displays the image increments as they are being loaded.\n\n\
- If the file contains an animated GIF, then the Next, Previous, and Animate buttons become enabled, \
- and they can be used to cycle through the images in the file, or animate them. If a GIF defines a background color, \
- as many animated GIFs do, selecting Background will use the GIF's background color.\n\n\
- If the image has transparency (possible with GIF, PNG, or ICO), then selecting Display Mask will draw the image's transparency \
- mask to the right of the image. You can change the background color of the ImageAnalyzer to see the transparency work. \
- To turn off the transparency, deselect Display Transparency.\n\n\
- After an image is loaded, it can be scaled or have alpha transparency applied, using the Scale and Alpha-K combos, \
- and the Alpha menu. File->Reopen restores scaling and Alpha to their default values and reloads the current image file.\n\n\
- File->Save As... can be used to save the currently loaded image to another type of image file. If the image has transparency, \
- File->Save Mask As... saves the image's transparency mask.\n\n\
- When SWT loads an image file, an instance of org.eclipse.swt.graphics.ImageData is created. (In the case of an ICO file or \
- multi-image GIF, an array of ImageData instances is created). The ImageAnalyzer displays all of the data stored in the ImageData \
- instance(s) for the currently loaded image file, including the pixel data. Hovering over a pixel in the image display will show the RGB \
- color data for that pixel. For certain images (particularly animated GIFs) additional data is stored in the org.eclipse.swt.graphics.ImageLoader \
- instance used to load the image. The ImageAnalyzer displays this data as well.
-
-launchitem.JavaViewer.name = Java Syntax Viewer
-launchitem.JavaViewer.description = \
- This example demonstrates how to implement a user-defined line styler for the StyledText widget.\n\n\
- The example provides a typical editor interface. \
- To see the effect of the line styler, open a *.java file. \
- When the contents of the file are displayed in the editor area, notice that the keywords have been highlighted.
-
-launchitem.LayoutExample.name = Layout Example
-launchitem.LayoutExample.description = \
- This example is a simple demonstration of common SWT layouts. \n\n\
- It consists of a tab folder where each tab in the folder allows the \
- user to interact with a different SWT layout. \
- The user can insert widgets into a layout and set the values of the layout data \
- using a property sheet. When the user has a suitable arrangement, code can be \
- generated by clicking on the Code button.
-
-launchitem.TextEditor.name = Text Editor
-launchitem.TextEditor.description = \
- This example demonstrates how to use the StyledText widget to implement \
- a text editor with formatting support.\n\n\
- The example has a typical text editor interface. \
- The Edit menu contains Cut, Copy, Paste and Set Font items and the toolbar \
- provides a bold text toggle, three colour tools that operate on the current \
- selection, and a reset to defaults button that also operates on the current selection.
- \ No newline at end of file
diff --git a/examples/org.eclipse.swt.examples/plugin.xml b/examples/org.eclipse.swt.examples/plugin.xml
deleted file mode 100755
index 019f7497b2..0000000000
--- a/examples/org.eclipse.swt.examples/plugin.xml
+++ /dev/null
@@ -1,153 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<!-- File written by PDE 1.0 -->
-<plugin
- id="org.eclipse.swt.examples"
- name="%plugin.SWTStandaloneExampleSet.name"
- version="3.1.0"
- provider-name="%providerName"
- class="">
-<!-- Required plugins -->
-<requires>
- <import plugin="org.eclipse.swt"/>
-</requires>
-
-<!-- Runtime -->
-<runtime>
- <library name="swtexamples.jar">
- <export name="*"/>
- <packages prefixes="org.eclipse.swt.examples"/>
- </library>
-</runtime>
-
-<!-- Extensions -->
-<!-- Extension points -->
-<extension
- point="org.eclipse.swt.examples.launcher.launchItems">
- <category
- name="%launchcategory.SWTStandaloneExamples.name"
- description="%launchcategory.SWTStandaloneExamples.description"
- id="org.eclipse.swt.examples.launchStandaloneCategory">
- </category>
- <item
- name="%launchitem.AddressBook.name"
- description="%launchitem.AddressBook.description"
- category="org.eclipse.swt.examples.launchStandaloneCategory"
- id="org.eclipse.swt.examples.addressbook.standalonelauncher">
- <program
- pluginId="org.eclipse.swt.examples"
- mainClass="org.eclipse.swt.examples.addressbook.AddressBook">
- </program>
- </item>
- <item
- name="%launchitem.Clipboard.name"
- description="%launchitem.Clipboard.description"
- category="org.eclipse.swt.examples.launchStandaloneCategory"
- id="org.eclipse.swt.examples.clipboard.standalonelauncher">
- <program
- pluginId="org.eclipse.swt.examples"
- mainClass="org.eclipse.swt.examples.clipboard.ClipboardExample">
- </program>
- </item>
- <item
- name="%launchitem.FileViewer.name"
- description="%launchitem.FileViewer.description"
- category="org.eclipse.swt.examples.launchStandaloneCategory"
- id="org.eclipse.swt.examples.fileviewer.standalonelauncher">
- <program
- pluginId="org.eclipse.swt.examples"
- mainClass="org.eclipse.swt.examples.fileviewer.FileViewer">
- </program>
- </item>
- <item
- name="%launchitem.HoverHelp.name"
- description="%launchitem.HoverHelp.description"
- category="org.eclipse.swt.examples.launchStandaloneCategory"
- id="org.eclipse.swt.examples.hoverhelp.standalonelauncher">
- <program
- pluginId="org.eclipse.swt.examples"
- mainClass="org.eclipse.swt.examples.hoverhelp.HoverHelp">
- </program>
- </item>
- <item
- name="%launchitem.HelloWorld1.name"
- description="%launchitem.HelloWorld1.description"
- category="org.eclipse.swt.examples.launchStandaloneCategory"
- id="org.eclipse.swt.examples.helloworld1.standalonelauncher">
- <program
- pluginId="org.eclipse.swt.examples"
- mainClass="org.eclipse.swt.examples.helloworld.HelloWorld1">
- </program>
- </item>
- <item
- name="%launchitem.HelloWorld2.name"
- description="%launchitem.HelloWorld2.description"
- category="org.eclipse.swt.examples.launchStandaloneCategory"
- id="org.eclipse.swt.examples.helloworld2.standalonelauncher">
- <program
- pluginId="org.eclipse.swt.examples"
- mainClass="org.eclipse.swt.examples.helloworld.HelloWorld2">
- </program>
- </item>
- <item
- name="%launchitem.HelloWorld3.name"
- description="%launchitem.HelloWorld3.description"
- category="org.eclipse.swt.examples.launchStandaloneCategory"
- id="org.eclipse.swt.examples.helloworld3.standalonelauncher">
- <program
- pluginId="org.eclipse.swt.examples"
- mainClass="org.eclipse.swt.examples.helloworld.HelloWorld3">
- </program>
- </item>
- <item
- name="%launchitem.HelloWorld4.name"
- description="%launchitem.HelloWorld4.description"
- category="org.eclipse.swt.examples.launchStandaloneCategory"
- id="org.eclipse.swt.examples.helloworld4.standalonelauncher">
- <program
- pluginId="org.eclipse.swt.examples"
- mainClass="org.eclipse.swt.examples.helloworld.HelloWorld4">
- </program>
- </item>
- <item
- name="%launchitem.HelloWorld5.name"
- description="%launchitem.HelloWorld5.description"
- category="org.eclipse.swt.examples.launchStandaloneCategory"
- id="org.eclipse.swt.examples.helloworld5.standalonelauncher">
- <program
- pluginId="org.eclipse.swt.examples"
- mainClass="org.eclipse.swt.examples.helloworld.HelloWorld5">
- </program>
- </item>
- <item
- name="%launchitem.ImageAnalyzer.name"
- description="%launchitem.ImageAnalyzer.description"
- category="org.eclipse.swt.examples.launchStandaloneCategory"
- id="org.eclipse.swt.examples.imageanalyzer.standalonelauncher">
- <program
- pluginId="org.eclipse.swt.examples"
- mainClass="org.eclipse.swt.examples.imageanalyzer.ImageAnalyzer">
- </program>
- </item>
- <item
- name="%launchitem.JavaViewer.name"
- description="%launchitem.JavaViewer.description"
- category="org.eclipse.swt.examples.launchStandaloneCategory"
- id="org.eclipse.swt.examples.javaviewer.standalonelauncher">
- <program
- pluginId="org.eclipse.swt.examples"
- mainClass="org.eclipse.swt.examples.javaviewer.JavaViewer">
- </program>
- </item>
- <item
- name="%launchitem.TextEditor.name"
- description="%launchitem.TextEditor.description"
- category="org.eclipse.swt.examples.launchStandaloneCategory"
- id="org.eclipse.swt.examples.texteditor.standalonelauncher">
- <program
- pluginId="org.eclipse.swt.examples"
- mainClass="org.eclipse.swt.examples.texteditor.TextEditor">
- </program>
- </item>
-</extension>
-</plugin>
diff --git a/examples/org.eclipse.swt.examples/src/examples_addressbook.properties b/examples/org.eclipse.swt.examples/src/examples_addressbook.properties
deleted file mode 100644
index 19e36dd2c6..0000000000
--- a/examples/org.eclipse.swt.examples/src/examples_addressbook.properties
+++ /dev/null
@@ -1,69 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2003 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Common Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/cpl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-Last_name = Last Name
-First_name = First Name
-Business_phone = Business Phone
-Home_phone = Home Phone
-Email = Email
-Fax = Fax
-Close_save = The address book contents have changed.\nDo you want to save the changes?
-New_title = Untitled
-Column = Column:
-Book_extension = .adr
-Book_filter_name = Address Books
-All_filter_name = All Files
-File = File
-Does_not_exist = does not exist.
-File_not_found = File not found:
-IO_error_read = IO error reading text file:
-IO_error_write = IO error writing text file:
-IO_error_close = IO error closing text file:
-Title_bar = Address Book -
-Save_as_title = Save As
-Query_overwrite = already exists.\nDo you want to replace it?
-File_menu_title = &File
-New_contact = &New Contact...\tCtrl+N
-Edit_contact = &Edit Contact...\tCtrl+E
-New_address_book = New Address &Book\tCtrl+B
-Open_address_book = &Open Address Book...\tCtrl+O
-Save_address_book = &Save Address Book\tCtrl+S
-Save_book_as = Save &Address Book As...\tCtrl+A
-Exit = E&xit
-Edit_menu_title = &Edit
-Edit = &Edit...\tCtrl+E
-Copy = &Copy\tCtrl+C
-Paste = &Paste\tCtrl+V
-Delete = De&lete\tDel
-Sort = &Sort
-Search_menu_title = &Search
-Find = &Find...\tCtrl+F
-Find_next = Find &Next...\tF3
-Pop_up_new = &New...
-Pop_up_edit = &Edit...
-Pop_up_copy = &Copy
-Pop_up_paste = &Paste
-Pop_up_delete = &Delete
-Pop_up_find = &Find...
-Help_menu_title = &Help
-About = &About Address Book...
-About_1 = About
-About_2 = \nversion 1.0
-OK = OK
-Cancel = Cancel
-Search_dialog_title = Find
-Dialog_find_what = Fi&nd what:
-Dialog_match_case = Match &case
-Dialog_match_word = Match &whole word
-Dialog_direction = Direction
-Dialog_dir_up = &Up
-Dialog_dir_down = &Down
-Dialog_find = &Find
-Cannot_find = Cannot find \ No newline at end of file
diff --git a/examples/org.eclipse.swt.examples/src/examples_browser.properties b/examples/org.eclipse.swt.examples/src/examples_browser.properties
deleted file mode 100644
index e102cfd52c..0000000000
--- a/examples/org.eclipse.swt.examples/src/examples_browser.properties
+++ /dev/null
@@ -1,20 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2003 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Common Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/cpl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-error.CouldNotLoadResources = Unable to load resources
-window.title = SWT Browser
-
-Back = Back
-BrowserNotCreated = Error - The Browser widget could not be instantiated. Please check the Browser widget is supported on this platform. Supported platforms and software requirements for the Browser widget are listed on the SWT FAQ web page.
-Forward = Forward
-Stop = Stop
-Refresh = Refresh
-Go = Go
-Startup = http://www.eclipse.org
diff --git a/examples/org.eclipse.swt.examples/src/examples_control.properties b/examples/org.eclipse.swt.examples/src/examples_control.properties
deleted file mode 100644
index c6df1c561e..0000000000
--- a/examples/org.eclipse.swt.examples/src/examples_control.properties
+++ /dev/null
@@ -1,181 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2004 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Common Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/cpl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-error.CouldNotLoadResources = Unable to load resources
-window.title = SWT Controls
-custom.window.title = SWT Custom Controls
-
-Text_Buttons = Text Buttons
-Size = Size
-Alignment = Alignment
-Left = Left
-Right = Right
-Up = Up
-Down = Down
-Center = Center
-One = One
-Two = Two
-Three = Three
-Image_Buttons = Image Buttons
-Control_Example = Control Example
-Parameters = Parameters
-Other = Other
-Enabled = Enabled
-Visible = Visible
-Preferred = Preferred
-Styles = Styles
-Listeners = Listeners
-Select_Listeners = Select Listeners
-Listen = Listen
-Clear = Clear
-Select_All = Select All
-Deselect_All = Deselect All
-OK = OK
-FillDamage = Fill Damaged Area With Color
-Title_Text = Title Text
-Text_Labels = Text Labels
-Image_Labels = Image Labels
-Custom_Labels = Custom Labels
-Custom_Combo = Custom Combo
-One_Two_Three = One Two Three
-Text_ToolBar = Text ToolBar
-Image_ToolBar = Image ToolBar
-Maximum = Maximum
-Minimum = Minimum
-Selection = Selection
-Increment = Increment
-Page_Increment = Page Increment
-Thumb = Thumb
-Tree_With_Images = Tree With Images
-Dialog_Type = Dialog Type
-Create_Dialog = Create Dialog
-Button_Styles = Button Styles
-Icon_Styles = Icon Styles
-Modal_Styles = Modal Styles
-File_Dialog_Styles = File Dialog Styles
-Item_Styles = Item Styles
-Dialog_Result = Dialog Result
-ColorDialog = ColorDialog
-DirectoryDialog = DirectoryDialog
-FileDialog = FileDialog
-FontDialog = FontDialog
-PrintDialog = PrintDialog
-MessageBox = MessageBox
-Multi_line = A multi line text widget.
-Example_string = The quick brown fox jumps over the lazy dog.
-Header_Visible = Header Visible
-Lines_Visible = Lines Visible
-Locked = Locked
-Node_1 = Node 1
-Node_2 = Node 2
-Node_3 = Node 3
-Node_4 = Node 4
-Node_1_1 = Node 1.1
-Node_2_1 = Node 2.1
-Node_3_1 = Node 3.1
-Node_2_2 = Node 2.2
-Node_2_2_1 = Node 2.2.1
-Parent = Parent
-No_Parent = No Parent
-Decoration_Styles = Decoration Styles
-Create_Shell = Create Shell
-Close_All_Shells = Close All Shells
-Push = Push
-Radio = Radio
-Check = Check
-Drop_Down = Drop Down
-Images_failed = Warning: Failed to load images
-readme_txt = readme.txt
-Index = Index:
-Title = Title:
-Close = Close
-Result = Result: {0}
-FilterName_0 = Text Files
-FilterName_1 = Batch Files
-FilterName_2 = Doc Files
-TableTitle_0 = Name
-TableTitle_1 = Type
-TableTitle_2 = Size
-TableTitle_3 = Modified
-TableLine0_0 = <empty>
-TableLine0_1 = classes
-TableLine0_2 = 0
-TableLine0_3 = today
-TableLine1_0 = <empty>
-TableLine1_1 = databases
-TableLine1_2 = 2556
-TableLine1_3 = <empty>
-TableLine2_0 = <empty>
-TableLine2_1 = images
-TableLine2_2 = 91571
-TableLine2_3 = yesterday
-ListData0_0 = Line 1
-ListData0_1 = Line 2
-ListData0_2 = Line 3
-ListData0_3 = Line 4
-ListData0_4 = Line 5
-ListData0_5 = Line 6
-ListData0_6 = Line 7
-ListData0_7 = Line 8
-ListData0_8 = Longest Line In List
-ListData1_0 = Apples
-ListData1_1 = Oranges
-ListData1_2 = Bananas
-ListData1_3 = Grapefruit
-ListData1_4 = Peaches
-ListData1_5 = Kiwi
-ListData1_6 = Apricots
-ListData1_7 = Strawberries
-ListData1_8 = The Longest String
-DropDownData_0 = Apples
-DropDownData_1 = Oranges
-DropDownData_2 =
-DropDownData_3 = Grapefruit
-DropDownData_4 = Peaches
-DropDownData_5 = Kiwi
-DropDownData_6 =
-DropDownData_7 = Strawberries
-DropDownData_8 = The Longest String
-Colors = Colors and Font
-Table_Item_Colors = Row 0 Colors and Font
-Tree_Item_Colors = Node 1 Colors and Font
-CTab_Item_Colors = CTab 0 Font
-Background_Color = Background Color
-Foreground_Color = Foreground Color
-Font = &Font...
-Defaults = &Defaults
-Wrap_Text = Jack and Jill went up the hill to fetch a pail of water, \
- Jack fell down and broke his crown and Jill came tumbling after!
-Foreground_Style = Foreground Style
-Background_Style = Background Style
-StyledText_Styles = Text Styles
-StyledText_Style_Instructions = Select text, then style.
-Bold = Bold
-Italic = Italic
-Fill = Horizontal Fill
-TabItem1_0 = Tab 0
-TabItem1_1 = Tab 1
-TabItem1_2 = Tab 2
-TabItem_content = TabItem Content
-CTabItem1_0 = CTabItem 0
-CTabItem1_1 = CTabItem 1
-CTabItem1_2 = CTabItem 2 has a long name
-CItem_Colors = CTabItem Colors
-CTabItem_content = CTabItem Content
-Set_Simple_Tabs = Simple Tabs
-Set_Image = Image
-TableTree_column = Column
-MenuItem_Cut = Cu&t Ctrl+X
-MenuItem_Copy = &Copy Ctrl+C
-MenuItem_Paste = &Paste Ctrl+V
-MenuItem_SelectAll = Select &All Ctrl+A
-Orientation = Orientation
-Default = Default (Inherit)
-
diff --git a/examples/org.eclipse.swt.examples/src/examples_fileviewer.properties b/examples/org.eclipse.swt.examples/src/examples_fileviewer.properties
deleted file mode 100644
index 9948e091f0..0000000000
--- a/examples/org.eclipse.swt.examples/src/examples_fileviewer.properties
+++ /dev/null
@@ -1,69 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2003 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Common Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/cpl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-Title = SWT FileViewer - {0}
-
-menu.File.text = &File
-menu.File.Close.text = &Close
-menu.File.SimulateOnly.text = Simulate File Operations
-menu.Help.text = &Help
-menu.Help.About.text = &About
-
-tool.Cut.tiptext = Cut
-tool.Copy.tiptext = Copy
-tool.Delete.tiptext = Delete
-tool.Parent.tiptext = Parent
-tool.Paste.tiptext = Paste
-tool.Print.tiptext = Print
-tool.Refresh.tiptext = Refresh
-tool.Rename.tiptext = Rename
-tool.Search.tiptext = Search
-
-details.AllFolders.text = All Folders
-details.ContentsOf.text = Contents of ''{0}''
-details.FileSize.text = {0} bytes
-details.DirNumberOfObjects.text = {0} object(s)
-details.NumberOfSelectedFiles.text = {0} object(s) selected
-
-table.Name.title = Name
-table.Size.title = Size
-table.Type.title = Type
-table.Modified.title = Modified
-
-filetype.Unknown = {0} File
-filetype.None = File
-filetype.Folder = Folder
-filesize.KB = {0} kb
-
-dialog.About.title = About SWT FileViewer
-dialog.About.description = SWT FileViewer\n\nVersion: 0.9\n\nRunning on: {0}
-
-dialog.NotImplemented.title = Not Implemented
-dialog.ActionNotImplemented.description = Sorry! The action you selected has not been implemented.
-
-dialog.FailedCopy.title = Copy Files Error
-dialog.FailedCopy.description = An error occured while trying to copy "{0}" to "{1}".
-
-dialog.FailedDelete.title = Delete Files Error
-dialog.FailedDelete.description = An error occured while trying to delete "{0}".
-
-progressDialog.cancelButton.text = Cancel
-progressDialog.Copy.title = Copy Files
-progressDialog.Copy.description = Copying files.
-progressDialog.Copy.operation = Copying... {0}
-progressDialog.Move.title = Move Files
-progressDialog.Move.description = Moving files.
-progressDialog.Delete.operation = Deleting... {0}
-
-simulate.CopyFromTo.text = Simulated copy from "{0}" to "{1}".
-simulate.DirectoriesCreated.text = Simulated directories created for "{0}".
-simulate.Delete.text = Simulated delete of "{0}".
-
-error.FailedLaunch.message = Could not launch "{0}"
diff --git a/examples/org.eclipse.swt.examples/src/examples_helloworld.properties b/examples/org.eclipse.swt.examples/src/examples_helloworld.properties
deleted file mode 100644
index a8cb9f6f92..0000000000
--- a/examples/org.eclipse.swt.examples/src/examples_helloworld.properties
+++ /dev/null
@@ -1,11 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2003 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Common Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/cpl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-Hello_world = Hello World \ No newline at end of file
diff --git a/examples/org.eclipse.swt.examples/src/examples_hoverhelp.properties b/examples/org.eclipse.swt.examples/src/examples_hoverhelp.properties
deleted file mode 100644
index 69300e3367..0000000000
--- a/examples/org.eclipse.swt.examples/src/examples_hoverhelp.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2003 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Common Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/cpl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-error.CouldNotLoadResources = Unable to load resources : {0}
-
-ToolItem.text = ToolItem {0}
-ToolItem.tooltip = Tooltip for {0}. Try F1 on me.
-ToolItem.help = Help text for {0}.
-
-TableItem.text = TableItem {0}
-TableItem.tooltip = Tooltip for {0}. Try F1 on me.
-TableItem.help = Help text for {0}.
-
-TreeItem.text = TreeItem {0}
-TreeItem.tooltip = Tooltip for {0}. Try F1 on me.
-TreeItem.help = Help text for {0}.
-
-Hello.text = Hello
-Hello.tooltip = Greetings!
diff --git a/examples/org.eclipse.swt.examples/src/examples_images.properties b/examples/org.eclipse.swt.examples/src/examples_images.properties
deleted file mode 100644
index 859d256e7d..0000000000
--- a/examples/org.eclipse.swt.examples/src/examples_images.properties
+++ /dev/null
@@ -1,111 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2003 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Common Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/cpl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-Image_analyzer = Image Analyzer
-None = None
-White = White
-Black = Black
-Red = Red
-Green = Green
-Blue = Blue
-X_scale = X Scale
-Y_scale = Y Scale
-Alpha_K = Alpha-K
-Display = Display
-Incremental = Incremental
-Transparent = Transparent
-Transparent_lc = transparent
-Mask = Mask
-Background = Background
-Animation = Animation
-Previous = < &Previous
-Next = &Next >
-Animate = &Animate
-Type_initial = Type:
-Type_string = Type: {0}
-Type_index = Type: {0} [{1,number,integer} of {2,number,integer}]
-Size_initial = Size:
-Size_value = Size: {0,number,integer} x {1,number,integer}
-Depth_initial = Depth:
-Depth_value = Depth: {0}
-Transparent_pixel_initial = Transparent pixel:
-Transparent_pixel_value = Transparent pixel: {0}
-Time_to_load_initial = Time to load:
-Time_to_load_value = Time to load: {0} ms
-Animation_size_initial = Animation size:
-Animation_size_value = Animation size: {0,number,integer} x {1,number,integer}
-Background_pixel_initial = Background pixel:
-Background_pixel_value = Background pixel: {0}
-Image_location_initial = Image location:
-Image_location_value = Image location: ({0,number,integer}, {1,number,integer})
-Disposal_initial = Disposal:
-Disposal_value = Disposal: {0,number,integer} ({1})
-Delay_initial = Delay:
-Delay_value = Delay: {0,number,integer} ms (using {1,number,integer} ms)
-Delay_used = Delay: {0,number,integer} ms
-Repeats_initial = Repeats:
-Repeats_value = Repeats: {0,number,integer}
-Repeats_forever = Repeats: {0,number,integer} (forever)
-Palette_initial = Palette:
-Palette_direct = Palette: Direct
-Palette_value = Palette size: {0,number,integer}
-Pixel_data_initial = Pixel data:
-Pixel_data_value = Pixel data: Bytes per line: {0,number,integer} \
- Scanline pad: {1,number,integer} {2}
-File = &File
-OpenFile = &Open File...\tCtrl+O
-OpenURL = Open &URL...\tCtrl+U
-Reopen = &Reopen
-Save = &Save\tCtrl+S
-Save_as = Save &As...
-Save_mask_as = Save &Mask As...
-Print = &Print\tCtrl+P
-Exit = E&xit
-Alpha = Alpha
-OpenURLDialog = Open URL
-EnterURL = Enter the URL for an image (bmp, gif, ico, jpg, jpeg, png):
-All_images = All Image Files
-Loading_lc = loading
-Saving_lc = saving
-Unknown_extension = Unknown file extension: {0}\nPlease use bmp, gif, ico, \
- jpg, jpeg, or png.
-Overwrite = Overwrite {0}?
-Analyzer_on = Image Analyzer on: {0}
-Reloading_lc = reloading
-Color_at = Image color at ({0,number,integer}, {1,number,integer}) \
- index {2,number,integer} (0x{3}) is {4}
-Color_at_trans = Image color at ({0,number,integer}, {1,number,integer}) \
- index {2,number,integer} (0x{3}) is {4} (transparent)
-Creating_image = Creating image # {0,number,integer} from
-OK = OK
-Cancel = Cancel
-Stop = &Stop
-Creating_from = Creating image read from
-Palette_direct = Palette: Direct
-Palette_size = Palette size: {0,number,integer}
-Bytes_per_line = Bytes per line:
-Scanline_pad = Scanline pad:
-Printing_error = Printing error:
-Error = Error {0} file\n{1}\n\n
-Pixels_per_byte = pixels per byte
-Byte_per_pixel = byte per pixel
-Bytes_per_pixel = bytes per pixel
-Unsupported_lc = unsupported
-None_lc = none
-Background_lc = background
-Previous_lc = previous
-Unspecified_lc = unspecified
-Unknown_ac = UNKNOWN
-Forever_lc = forever
-Depth_info = Depth: {0,number,integer} -- {1}
-One_byte = 1 byte per pixel
-Multi_bytes = {0,number,integer} bytes per pixel
-Multi_pixels = {0,number,integer} pixels per byte {1}
-Max_length_string = Transparent pixel: -1 (none) \ No newline at end of file
diff --git a/examples/org.eclipse.swt.examples/src/examples_javaviewer.properties b/examples/org.eclipse.swt.examples/src/examples_javaviewer.properties
deleted file mode 100644
index c877154c3c..0000000000
--- a/examples/org.eclipse.swt.examples/src/examples_javaviewer.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2003 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Common Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/cpl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-Open_menuitem=&Open...\tCtrl+O
-Exit_menuitem=E&xit
-File_menuitem=&File
-Window_title=SWT Java Viewer
-Err_file_no_exist=File {0} does not exist.
-Err_file_io=IO error reading file:\n{0}
-Err_file_not_found=File not found:\n{0} \ No newline at end of file
diff --git a/examples/org.eclipse.swt.examples/src/examples_layout.properties b/examples/org.eclipse.swt.examples/src/examples_layout.properties
deleted file mode 100644
index 5e01c8f801..0000000000
--- a/examples/org.eclipse.swt.examples/src/examples_layout.properties
+++ /dev/null
@@ -1,51 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2003 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Common Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/cpl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-window.title = SWT Layouts
-
-Add = &Add
-Delete = &Delete
-Clear = &Clear
-Children = Children
-Type = Type
-Layout = Layout
-Preferred_Size = Preferred Size
-Code = C&ode
-Generated_Code = Generated Code
-Parameters = Parameters
-Properties = Properties
-Margins = Margins
-Margins_Spacing = Margins and Spacing
-Columns = Columns
-Attach_Edit = Edit
-Left_Attachment = Edit Left Attachment
-Right_Attachment = Edit Right Attachment
-Top_Attachment = Edit Top Attachment
-Bottom_Attachment = Edit Bottom Attachment
-Position = Position
-Control = Control
-Offset = Offset [+/-]
-Item = Item {0}
-Combo_Index = Combo {0}
-Group_Index = Group {0}
-Label_Index = Label {0}
-Button_Index = Button {0}
-StyledText_Index = StyledText {0}
-Text_Index = Text {0}
-OK = OK
-Cancel = Cancel
-Edit = &Edit
-Select_All = Select &All\tCtrl+A
-Copy = &Copy\tCtrl+C
-Exit = E&xit
-Name_Title = Enter Names
-Name_Label = Enter names for your controls
-Invalid_Name = Invalid Name - Please enter valid variable names for your controls
-Default = Default \ No newline at end of file
diff --git a/examples/org.eclipse.swt.examples/src/examples_texteditor.properties b/examples/org.eclipse.swt.examples/src/examples_texteditor.properties
deleted file mode 100644
index b66d829d95..0000000000
--- a/examples/org.eclipse.swt.examples/src/examples_texteditor.properties
+++ /dev/null
@@ -1,18 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2003 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Common Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/cpl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-Exit_menuitem=E&xit
-Cut_menuitem=Cu&t\tCtrl+X
-Copy_menuitem=&Copy\tCtrl+C
-Paste_menuitem=&Paste\tCtrl+V
-Window_title=SWT Text Editor
-Font_menuitem=Set &Font...
-Edit_menuitem=&Edit
-File_menuitem=&File \ No newline at end of file
diff --git a/examples/org.eclipse.swt.examples/src/import.properties b/examples/org.eclipse.swt.examples/src/import.properties
deleted file mode 100644
index 6f750b8e34..0000000000
--- a/examples/org.eclipse.swt.examples/src/import.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2003 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Common Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/cpl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-# Persist project settings for later import
-natures = org.eclipse.jdt.core.javanature; org.eclipse.pde.PluginNature
-builders = org.eclipse.jdt.core.javabuilder; org.eclipse.pde.ManifestBuilder; org.eclipse.pde.SchemaBuilder
-var.ECLIPSE_PLUGINS = <<ECLIPSE_PLUGINS>>
-vmargs.org/eclipse/swt/examples/addressbook/AddressBook.java%AddressBook = "-Djava.library.path=<<SWT_LIBRARY_PATH>>"
-vmargs.org/eclipse/swt/examples/controlexample/ControlExample.java%ControlExample = "-Djava.library.path=<<SWT_LIBRARY_PATH>>"
-vmargs.org/eclipse/swt/examples/fileviewer/FileViewer.java%FileViewer = "-Djava.library.path=<<SWT_LIBRARY_PATH>>"
-vmargs.org/eclipse/swt/examples/helloworld/HelloWorld1.java%HelloWorld1 = "-Djava.library.path=<<SWT_LIBRARY_PATH>>"
-vmargs.org/eclipse/swt/examples/helloworld/HelloWorld2.java%HelloWorld2 = "-Djava.library.path=<<SWT_LIBRARY_PATH>>"
-vmargs.org/eclipse/swt/examples/helloworld/HelloWorld3.java%HelloWorld3 = "-Djava.library.path=<<SWT_LIBRARY_PATH>>"
-vmargs.org/eclipse/swt/examples/helloworld/HelloWorld4.java%HelloWorld4 = "-Djava.library.path=<<SWT_LIBRARY_PATH>>"
-vmargs.org/eclipse/swt/examples/helloworld/HelloWorld5.java%HelloWorld5 = "-Djava.library.path=<<SWT_LIBRARY_PATH>>"
-vmargs.org/eclipse/swt/examples/hoverhelp/HoverHelp.java%HoverHelp = "-Djava.library.path=<<SWT_LIBRARY_PATH>>"
-vmargs.org/eclipse/swt/examples/imageanalyzer/ImageAnalyzer.java%ImageAnalyzer = "-Djava.library.path=<<SWT_LIBRARY_PATH>>"
-vmargs.org/eclipse/swt/examples/javaviewer/JavaViewer.java%JavaViewer = "-Djava.library.path=<<SWT_LIBRARY_PATH>>"
-vmargs.org/eclipse/swt/examples/texteditor/TextEditor.java%TextEditor = "-Djava.library.path=<<SWT_LIBRARY_PATH>>"
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/addressbook/AddressBook.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/addressbook/AddressBook.java
deleted file mode 100755
index cedabfecc0..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/addressbook/AddressBook.java
+++ /dev/null
@@ -1,879 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.addressbook;
-
-
-/* Imports */
-import java.io.*;
-import java.util.*;
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-
-/**
- * AddressBookExample is an example that uses <code>org.eclipse.swt</code>
- * libraries to implement a simple address book. This application has
- * save, load, sorting, and searching functions common
- * to basic address books.
- */
-public class AddressBook {
-
- private static ResourceBundle resAddressBook = ResourceBundle.getBundle("examples_addressbook");
- private Shell shell;
-
- private Table table;
- private SearchDialog searchDialog;
-
- private File file;
- private boolean isModified;
-
- private String[] copyBuffer;
-
- private int lastSortColumn= -1;
-
- private static final String DELIMITER = "\t";
- private static final String[] columnNames = {resAddressBook.getString("Last_name"),
- resAddressBook.getString("First_name"),
- resAddressBook.getString("Business_phone"),
- resAddressBook.getString("Home_phone"),
- resAddressBook.getString("Email"),
- resAddressBook.getString("Fax")};
-
-public static void main(String[] args) {
- Display display = new Display();
- AddressBook application = new AddressBook();
- Shell shell = application.open(display);
- while(!shell.isDisposed()){
- if(!display.readAndDispatch())
- display.sleep();
- }
- display.dispose();
-}
-public Shell open(Display display) {
- shell = new Shell(display);
- shell.setLayout(new FillLayout());
- shell.addShellListener(new ShellAdapter() {
- public void shellClosed(ShellEvent e) {
- e.doit = closeAddressBook();
- }
- });
-
- createMenuBar();
-
- searchDialog = new SearchDialog(shell);
- searchDialog.setSearchAreaNames(columnNames);
- searchDialog.setSearchAreaLabel(resAddressBook.getString("Column"));
- searchDialog.addFindListener(new FindListener () {
- public boolean find() {
- return findEntry();
- }
- });
-
- table = new Table(shell, SWT.SINGLE | SWT.BORDER | SWT.FULL_SELECTION);
- table.setHeaderVisible(true);
- table.setMenu(createPopUpMenu());
- table.addSelectionListener(new SelectionAdapter() {
- public void widgetDefaultSelected(SelectionEvent e) {
- TableItem[] items = table.getSelection();
- if (items.length > 0) editEntry(items[0]);
- }
- });
- for(int i = 0; i < columnNames.length; i++) {
- TableColumn column = new TableColumn(table, SWT.NONE);
- column.setText(columnNames[i]);
- column.setWidth(150);
- final int columnIndex = i;
- column.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- sort(columnIndex);
- }
- });
- }
-
- newAddressBook();
-
- shell.setSize(table.computeSize(SWT.DEFAULT, SWT.DEFAULT).x, 300);
- shell.open();
- return shell;
-}
-
-private boolean closeAddressBook() {
- if(isModified) {
- //ask user if they want to save current address book
- MessageBox box = new MessageBox(shell, SWT.ICON_WARNING | SWT.YES | SWT.NO | SWT.CANCEL);
- box.setText(shell.getText());
- box.setMessage(resAddressBook.getString("Close_save"));
-
- int choice = box.open();
- if(choice == SWT.CANCEL) {
- return false;
- } else if(choice == SWT.YES) {
- if (!save()) return false;
- }
- }
-
- TableItem[] items = table.getItems();
- for (int i = 0; i < items.length; i ++) {
- items[i].dispose();
- }
-
- return true;
-}
-/**
- * Creates the menu at the top of the shell where most
- * of the programs functionality is accessed.
- *
- * @return The <code>Menu</code> widget that was created
- */
-private Menu createMenuBar() {
- Menu menuBar = new Menu(shell, SWT.BAR);
- shell.setMenuBar(menuBar);
-
- //create each header and subMenu for the menuBar
- createFileMenu(menuBar);
- createEditMenu(menuBar);
- createSearchMenu(menuBar);
- createHelpMenu(menuBar);
-
- return menuBar;
-}
-
-/**
- * Converts an encoded <code>String</code> to a String array representing a table entry.
- */
-private String[] decodeLine(String line) {
- if(line == null) return null;
-
- String[] parsedLine = new String[table.getColumnCount()];
- for(int i = 0; i < parsedLine.length - 1; i++) {
- int index = line.indexOf(DELIMITER);
- if (index > -1) {
- parsedLine[i] = line.substring(0, index);
- line = line.substring(index + DELIMITER.length(), line.length());
- } else {
- return null;
- }
- }
-
- if (line.indexOf(DELIMITER) != -1) return null;
-
- parsedLine[parsedLine.length - 1] = line;
-
- return parsedLine;
-}
-private void displayError(String msg) {
- MessageBox box = new MessageBox(shell, SWT.ICON_ERROR);
- box.setMessage(msg);
- box.open();
-}
-private void editEntry(TableItem item) {
- DataEntryDialog dialog = new DataEntryDialog(shell);
- dialog.setLabels(columnNames);
- String[] values = new String[table.getColumnCount()];
- for (int i = 0; i < values.length; i++) {
- values[i] = item.getText(i);
- }
- dialog.setValues(values);
- values = dialog.open();
- if (values != null) {
- item.setText(values);
- isModified = true;
- }
-}
-private String encodeLine(String[] tableItems) {
- String line = "";
- for (int i = 0; i < tableItems.length - 1; i++) {
- line += tableItems[i] + DELIMITER;
- }
- line += tableItems[tableItems.length - 1] + "\n";
-
- return line;
-}
-private boolean findEntry() {
- Cursor waitCursor = new Cursor(shell.getDisplay(), SWT.CURSOR_WAIT);
- shell.setCursor(waitCursor);
-
- boolean matchCase = searchDialog.getMatchCase();
- boolean matchWord = searchDialog.getMatchWord();
- String searchString = searchDialog.getSearchString();
- int column = searchDialog.getSelectedSearchArea();
-
- searchString = matchCase ? searchString : searchString.toLowerCase();
-
- boolean found = false;
- if (searchDialog.getSearchDown()) {
- for(int i = table.getSelectionIndex() + 1; i < table.getItemCount(); i++) {
- if (found = findMatch(searchString, table.getItem(i), column, matchWord, matchCase)){
- table.setSelection(i);
- break;
- }
- }
- } else {
- for(int i = table.getSelectionIndex() - 1; i > -1; i--) {
- if (found = findMatch(searchString, table.getItem(i), column, matchWord, matchCase)){
- table.setSelection(i);
- break;
- }
- }
- }
-
- shell.setCursor(null);
- if (waitCursor != null)
- waitCursor.dispose();
-
- return found;
-}
-private boolean findMatch(String searchString, TableItem item, int column, boolean matchWord, boolean matchCase) {
-
- String tableText = matchCase ? item.getText(column) : item.getText(column).toLowerCase();
- if (matchWord) {
- if (tableText != null && tableText.equals(searchString)) {
- return true;
- }
-
- } else {
- if(tableText!= null && tableText.indexOf(searchString) != -1) {
- return true;
- }
- }
- return false;
-}
-private void newAddressBook() {
- shell.setText(resAddressBook.getString("Title_bar") + resAddressBook.getString("New_title"));
- file = null;
- isModified = false;
-}
-private void newEntry() {
- DataEntryDialog dialog = new DataEntryDialog(shell);
- dialog.setLabels(columnNames);
- String[] data = dialog.open();
- if (data != null) {
- TableItem item = new TableItem(table, SWT.NONE);
- item.setText(data);
- isModified = true;
- }
-}
-
-private void openAddressBook() {
- FileDialog fileDialog = new FileDialog(shell, SWT.OPEN);
-
- fileDialog.setFilterExtensions(new String[] {"*.adr;", "*.*"});
- fileDialog.setFilterNames(new String[] {resAddressBook.getString("Book_filter_name") + " (*.adr)",
- resAddressBook.getString("All_filter_name") + " (*.*)"});
- String name = fileDialog.open();
-
- if(name == null) return;
- File file = new File(name);
- if (!file.exists()) {
- displayError(resAddressBook.getString("File")+file.getName()+" "+resAddressBook.getString("Does_not_exist"));
- return;
- }
-
- Cursor waitCursor = new Cursor(shell.getDisplay(), SWT.CURSOR_WAIT);
- shell.setCursor(waitCursor);
-
- FileReader fileReader = null;
- BufferedReader bufferedReader = null;
- String[] data = new String[0];
- try {
- fileReader = new FileReader(file.getAbsolutePath());
- bufferedReader = new BufferedReader(fileReader);
- String nextLine = bufferedReader.readLine();
- while (nextLine != null){
- String[] newData = new String[data.length + 1];
- System.arraycopy(data, 0, newData, 0, data.length);
- newData[data.length] = nextLine;
- data = newData;
- nextLine = bufferedReader.readLine();
- }
- } catch(FileNotFoundException e) {
- displayError(resAddressBook.getString("File_not_found") + "\n" + file.getName());
- return;
- } catch (IOException e ) {
- displayError(resAddressBook.getString("IO_error_read") + "\n" + file.getName());
- return;
- } finally {
-
- shell.setCursor(null);
- waitCursor.dispose();
-
- if(fileReader != null) {
- try {
- fileReader.close();
- } catch(IOException e) {
- displayError(resAddressBook.getString("IO_error_close") + "\n" + file.getName());
- return;
- }
- }
- }
-
- String[][] tableInfo = new String[data.length][table.getColumnCount()];
- int writeIndex = 0;
- for (int i = 0; i < data.length; i++) {
- String[] line = decodeLine(data[i]);
- if (line != null) tableInfo[writeIndex++] = line;
- }
- if (writeIndex != data.length) {
- String[][] result = new String[writeIndex][table.getColumnCount()];
- System.arraycopy(tableInfo, 0, result, 0, writeIndex);
- tableInfo = result;
- }
- Arrays.sort(tableInfo, new RowComparator(0));
-
- for (int i = 0; i < tableInfo.length; i++) {
- TableItem item = new TableItem(table, SWT.NONE);
- item.setText(tableInfo[i]);
- }
- shell.setText(resAddressBook.getString("Title_bar")+fileDialog.getFileName());
- isModified = false;
- this.file = file;
-}
-private boolean save() {
- if(file == null) return saveAs();
-
- Cursor waitCursor = new Cursor(shell.getDisplay(), SWT.CURSOR_WAIT);
- shell.setCursor(waitCursor);
-
- TableItem[] items = table.getItems();
- String[] lines = new String[items.length];
- for(int i = 0; i < items.length; i++) {
- String[] itemText = new String[table.getColumnCount()];
- for (int j = 0; j < itemText.length; j++) {
- itemText[j] = items[i].getText(j);
- }
- lines[i] = encodeLine(itemText);
- }
-
- FileWriter fileWriter = null;
- try {
- fileWriter = new FileWriter(file.getAbsolutePath(), false);
- for (int i = 0; i < lines.length; i++) {
- fileWriter.write(lines[i]);
- }
- } catch(FileNotFoundException e) {
- displayError(resAddressBook.getString("File_not_found") + "\n" + file.getName());
- return false;
- } catch(IOException e ) {
- displayError(resAddressBook.getString("IO_error_write") + "\n" + file.getName());
- return false;
- } finally {
- shell.setCursor(null);
- waitCursor.dispose();
-
- if(fileWriter != null) {
- try {
- fileWriter.close();
- } catch(IOException e) {
- displayError(resAddressBook.getString("IO_error_close") + "\n" + file.getName());
- return false;
- }
- }
- }
-
- shell.setText(resAddressBook.getString("Title_bar")+file.getName());
- isModified = false;
- return true;
-}
-private boolean saveAs() {
-
- FileDialog saveDialog = new FileDialog(shell, SWT.SAVE);
- saveDialog.setFilterExtensions(new String[] {"*.adr;", "*.*"});
- saveDialog.setFilterNames(new String[] {"Address Books (*.adr)", "All Files "});
-
- saveDialog.open();
- String name = saveDialog.getFileName();
-
- if(name.equals("")) return false;
-
- if(name.indexOf(".adr") != name.length() - 4) {
- name += ".adr";
- }
-
- File file = new File(saveDialog.getFilterPath(), name);
- if(file.exists()) {
- MessageBox box = new MessageBox(shell, SWT.ICON_WARNING | SWT.YES | SWT.NO);
- box.setText(resAddressBook.getString("Save_as_title"));
- box.setMessage(resAddressBook.getString("File") + file.getName()+" "+resAddressBook.getString("Query_overwrite"));
- if(box.open() != SWT.YES) {
- return false;
- }
- }
- this.file = file;
- return save();
-}
-private void sort(int column) {
- if(table.getItemCount() <= 1) return;
-
- TableItem[] items = table.getItems();
- String[][] data = new String[items.length][table.getColumnCount()];
- for(int i = 0; i < items.length; i++) {
- for(int j = 0; j < table.getColumnCount(); j++) {
- data[i][j] = items[i].getText(j);
- }
- }
-
- Arrays.sort(data, new RowComparator(column));
-
- if (lastSortColumn != column) {
- for (int i = 0; i < data.length; i++) {
- items[i].setText(data[i]);
- }
- lastSortColumn = column;
- } else {
- // reverse order if the current column is selected again
- int j = data.length -1;
- for (int i = 0; i < data.length; i++) {
- items[i].setText(data[j--]);
- }
- lastSortColumn = -1;
- }
-
-}
-/**
- * Creates all the items located in the File submenu and
- * associate all the menu items with their appropriate
- * functions.
- *
- * @param menuBar Menu
- * the <code>Menu</code> that file contain
- * the File submenu.
- */
-private void createFileMenu(Menu menuBar) {
- //File menu.
- MenuItem item = new MenuItem(menuBar, SWT.CASCADE);
- item.setText(resAddressBook.getString("File_menu_title"));
- Menu menu = new Menu(shell, SWT.DROP_DOWN);
- item.setMenu(menu);
- /**
- * Adds a listener to handle enabling and disabling
- * some items in the Edit submenu.
- */
- menu.addMenuListener(new MenuAdapter() {
- public void menuShown(MenuEvent e) {
- Menu menu = (Menu)e.widget;
- MenuItem[] items = menu.getItems();
- items[1].setEnabled(table.getSelectionCount() != 0); // edit contact
- items[5].setEnabled((file != null) && isModified); // save
- items[6].setEnabled(table.getItemCount() != 0); // save as
- }
- });
-
-
- //File -> New Contact
- MenuItem subItem = new MenuItem(menu, SWT.NULL);
- subItem.setText(resAddressBook.getString("New_contact"));
- subItem.setAccelerator(SWT.MOD1 + 'N');
- subItem.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- newEntry();
- }
- });
- subItem = new MenuItem(menu, SWT.NULL);
- subItem.setText(resAddressBook.getString("Edit_contact"));
- subItem.setAccelerator(SWT.MOD1 + 'E');
- subItem.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- TableItem[] items = table.getSelection();
- if (items.length == 0) return;
- editEntry(items[0]);
- }
- });
-
-
- new MenuItem(menu, SWT.SEPARATOR);
-
- //File -> New Address Book
- subItem = new MenuItem(menu, SWT.NULL);
- subItem.setText(resAddressBook.getString("New_address_book"));
- subItem.setAccelerator(SWT.MOD1 + 'B');
- subItem.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- if (closeAddressBook()) {
- newAddressBook();
- }
- }
- });
-
- //File -> Open
- subItem = new MenuItem(menu, SWT.NULL);
- subItem.setText(resAddressBook.getString("Open_address_book"));
- subItem.setAccelerator(SWT.MOD1 + 'O');
- subItem.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- if (closeAddressBook()) {
- openAddressBook();
- }
- }
- });
-
- //File -> Save.
- subItem = new MenuItem(menu, SWT.NULL);
- subItem.setText(resAddressBook.getString("Save_address_book"));
- subItem.setAccelerator(SWT.MOD1 + 'S');
- subItem.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- save();
- }
- });
-
- //File -> Save As.
- subItem = new MenuItem(menu, SWT.NULL);
- subItem.setText(resAddressBook.getString("Save_book_as"));
- subItem.setAccelerator(SWT.MOD1 + 'A');
- subItem.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- saveAs();
- }
- });
-
-
- new MenuItem(menu, SWT.SEPARATOR);
-
- //File -> Exit.
- subItem = new MenuItem(menu, SWT.NULL);
- subItem.setText(resAddressBook.getString("Exit"));
- subItem.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- shell.close();
- }
- });
-}
-
-/**
- * Creates all the items located in the Edit submenu and
- * associate all the menu items with their appropriate
- * functions.
- *
- * @param menuBar Menu
- * the <code>Menu</code> that file contain
- * the Edit submenu.
- *
- * @see #createSortMenu()
- */
-private MenuItem createEditMenu(Menu menuBar) {
- //Edit menu.
- MenuItem item = new MenuItem(menuBar, SWT.CASCADE);
- item.setText(resAddressBook.getString("Edit_menu_title"));
- Menu menu = new Menu(shell, SWT.DROP_DOWN);
- item.setMenu(menu);
-
- /**
- * Add a listener to handle enabling and disabling
- * some items in the Edit submenu.
- */
- menu.addMenuListener(new MenuAdapter() {
- public void menuShown(MenuEvent e) {
- Menu menu = (Menu)e.widget;
- MenuItem[] items = menu.getItems();
- int count = table.getSelectionCount();
- items[0].setEnabled(count != 0); // edit
- items[1].setEnabled(count != 0); // copy
- items[2].setEnabled(copyBuffer != null); // paste
- items[3].setEnabled(count != 0); // delete
- items[5].setEnabled(table.getItemCount() != 0); // sort
- }
- });
-
- //Edit -> Edit
- MenuItem subItem = new MenuItem(menu, SWT.CASCADE);
- subItem.setText(resAddressBook.getString("Edit"));
- subItem.setAccelerator(SWT.MOD1 + 'E');
- subItem.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- TableItem[] items = table.getSelection();
- if (items.length == 0) return;
- editEntry(items[0]);
- }
- });
-
- //Edit -> Copy
- subItem = new MenuItem(menu, SWT.NULL);
- subItem.setText(resAddressBook.getString("Copy"));
- subItem.setAccelerator(SWT.MOD1 + 'C');
- subItem.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- TableItem[] items = table.getSelection();
- if (items.length == 0) return;
- copyBuffer = new String[table.getColumnCount()];
- for (int i = 0; i < copyBuffer.length; i++) {
- copyBuffer[i] = items[0].getText(i);
- }
- }
- });
-
- //Edit -> Paste
- subItem = new MenuItem(menu, SWT.NULL);
- subItem.setText(resAddressBook.getString("Paste"));
- subItem.setAccelerator(SWT.MOD1 + 'V');
- subItem.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- if (copyBuffer == null) return;
- TableItem item = new TableItem(table, SWT.NONE);
- item.setText(copyBuffer);
- isModified = true;
- }
- });
-
- //Edit -> Delete
- subItem = new MenuItem(menu, SWT.NULL);
- subItem.setText(resAddressBook.getString("Delete"));
- subItem.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- TableItem[] items = table.getSelection();
- if (items.length == 0) return;
- items[0].dispose();
- isModified = true; }
- });
-
- new MenuItem(menu, SWT.SEPARATOR);
-
- //Edit -> Sort(Cascade)
- subItem = new MenuItem(menu, SWT.CASCADE);
- subItem.setText(resAddressBook.getString("Sort"));
- Menu submenu = createSortMenu();
- subItem.setMenu(submenu);
-
- return item;
-
-}
-
-/**
- * Creates all the items located in the Sort cascading submenu and
- * associate all the menu items with their appropriate
- * functions.
- *
- * @return Menu
- * The cascading menu with all the sort menu items on it.
- */
-private Menu createSortMenu() {
- Menu submenu = new Menu(shell, SWT.DROP_DOWN);
- MenuItem subitem;
- for(int i = 0; i < columnNames.length; i++) {
- subitem = new MenuItem (submenu, SWT.NULL);
- subitem.setText(columnNames [i]);
- final int column = i;
- subitem.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- sort(column);
- }
- });
-
- }
-
- return submenu;
-}
-
-/**
- * Creates all the items located in the Search submenu and
- * associate all the menu items with their appropriate
- * functions.
- *
- * @param menuBar Menu
- * the <code>Menu</code> that file contain
- * the Search submenu.
- */
-private void createSearchMenu(Menu menuBar) {
- //Search menu.
- MenuItem item = new MenuItem(menuBar, SWT.CASCADE);
- item.setText(resAddressBook.getString("Search_menu_title"));
- Menu searchMenu = new Menu(shell, SWT.DROP_DOWN);
- item.setMenu(searchMenu);
-
- //Search -> Find...
- item = new MenuItem(searchMenu, SWT.NULL);
- item.setText(resAddressBook.getString("Find"));
- item.setAccelerator(SWT.MOD1 + 'F');
- item.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- searchDialog.setMatchCase(false);
- searchDialog.setMatchWord(false);
- searchDialog.setSearchDown(true);
- searchDialog.setSearchString("");
- searchDialog.setSelectedSearchArea(0);
- searchDialog.open();
- }
- });
-
- //Search -> Find Next
- item = new MenuItem(searchMenu, SWT.NULL);
- item.setText(resAddressBook.getString("Find_next"));
- item.setAccelerator(SWT.F3);
- item.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- searchDialog.open();
- }
- });
-}
-
-/**
- * Creates all items located in the popup menu and associates
- * all the menu items with their appropriate functions.
- *
- * @return Menu
- * The created popup menu.
- */
-private Menu createPopUpMenu() {
- Menu popUpMenu = new Menu(shell, SWT.POP_UP);
-
- /**
- * Adds a listener to handle enabling and disabling
- * some items in the Edit submenu.
- */
- popUpMenu.addMenuListener(new MenuAdapter() {
- public void menuShown(MenuEvent e) {
- Menu menu = (Menu)e.widget;
- MenuItem[] items = menu.getItems();
- int count = table.getSelectionCount();
- items[2].setEnabled(count != 0); // edit
- items[3].setEnabled(count != 0); // copy
- items[4].setEnabled(copyBuffer != null); // paste
- items[5].setEnabled(count != 0); // delete
- items[7].setEnabled(table.getItemCount() != 0); // find
- }
- });
-
- //New
- MenuItem item = new MenuItem(popUpMenu, SWT.CASCADE);
- item.setText(resAddressBook.getString("Pop_up_new"));
- item.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- newEntry();
- }
- });
-
- new MenuItem(popUpMenu, SWT.SEPARATOR);
-
- //Edit
- item = new MenuItem(popUpMenu, SWT.CASCADE);
- item.setText(resAddressBook.getString("Pop_up_edit"));
- item.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- TableItem[] items = table.getSelection();
- if (items.length == 0) return;
- editEntry(items[0]);
- }
- });
-
- //Copy
- item = new MenuItem(popUpMenu, SWT.CASCADE);
- item.setText(resAddressBook.getString("Pop_up_copy"));
- item.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- TableItem[] items = table.getSelection();
- if (items.length == 0) return;
- copyBuffer = new String[table.getColumnCount()];
- for (int i = 0; i < copyBuffer.length; i++) {
- copyBuffer[i] = items[0].getText(i);
- }
- }
- });
-
- //Paste
- item = new MenuItem(popUpMenu, SWT.CASCADE);
- item.setText(resAddressBook.getString("Pop_up_paste"));
- item.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- if (copyBuffer == null) return;
- TableItem item = new TableItem(table, SWT.NONE);
- item.setText(copyBuffer);
- isModified = true;
- }
- });
-
- //Delete
- item = new MenuItem(popUpMenu, SWT.CASCADE);
- item.setText(resAddressBook.getString("Pop_up_delete"));
- item.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- TableItem[] items = table.getSelection();
- if (items.length == 0) return;
- items[0].dispose();
- isModified = true;
- }
- });
-
- new MenuItem(popUpMenu, SWT.SEPARATOR);
-
- //Find...
- item = new MenuItem(popUpMenu, SWT.NULL);
- item.setText(resAddressBook.getString("Pop_up_find"));
- item.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- searchDialog.open();
- }
- });
-
- return popUpMenu;
-}
-
-/**
- * Creates all the items located in the Help submenu and
- * associate all the menu items with their appropriate
- * functions.
- *
- * @param menuBar Menu
- * the <code>Menu</code> that file contain
- * the Help submenu.
- */
-private void createHelpMenu(Menu menuBar) {
-
- //Help Menu
- MenuItem item = new MenuItem(menuBar, SWT.CASCADE);
- item.setText(resAddressBook.getString("Help_menu_title"));
- Menu menu = new Menu(shell, SWT.DROP_DOWN);
- item.setMenu(menu);
-
- //Help -> About Text Editor
- MenuItem subItem = new MenuItem(menu, SWT.NULL);
- subItem.setText(resAddressBook.getString("About"));
- subItem.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- MessageBox box = new MessageBox(shell, SWT.NONE);
- box.setText(resAddressBook.getString("About_1") + shell.getText());
- box.setMessage(shell.getText() + resAddressBook.getString("About_2"));
- box.open();
- }
- });
-}
-
-/**
- * To compare entries (rows) by the given column
- */
-private class RowComparator implements Comparator {
- private int column;
-
- /**
- * Constructs a RowComparator given the column index
- * @param col The index (starting at zero) of the column
- */
- public RowComparator(int col) {
- column = col;
- }
-
- /**
- * Compares two rows (type String[]) using the specified
- * column entry.
- * @param obj1 First row to compare
- * @param obj2 Second row to compare
- * @return negative if obj1 less than obj2, positive if
- * obj1 greater than obj2, and zero if equal.
- */
- public int compare(Object obj1, Object obj2) {
- String[] row1 = (String[])obj1;
- String[] row2 = (String[])obj2;
-
- return row1[column].compareTo(row2[column]);
- }
-}
-}
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/addressbook/DataEntryDialog.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/addressbook/DataEntryDialog.java
deleted file mode 100755
index 17b48660d7..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/addressbook/DataEntryDialog.java
+++ /dev/null
@@ -1,163 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.addressbook;
-
-
-/* Imports */
-import org.eclipse.swt.*;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-import java.util.ResourceBundle;
-
-/**
- * DataEntryDialog class uses <code>org.eclipse.swt</code>
- * libraries to implement a dialog that accepts basic personal information that
- * is added to a <code>Table</code> widget or edits a <code>TableItem</code> entry
- * to represent the entered data.
- */
-public class DataEntryDialog {
-
- private static ResourceBundle resAddressBook = ResourceBundle.getBundle("examples_addressbook");
-
- Shell shell;
- String[] values;
- String[] labels;
-
-public DataEntryDialog(Shell parent) {
- shell = new Shell(parent, SWT.DIALOG_TRIM | SWT.PRIMARY_MODAL);
- shell.setLayout(new GridLayout());
-}
-
-private void addTextListener(final Text text) {
- text.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e){
- Integer index = (Integer)(text.getData("index"));
- values[index.intValue()] = text.getText();
- }
- });
-}
-private void createControlButtons() {
- Composite composite = new Composite(shell, SWT.NULL);
- composite.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_CENTER));
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- composite.setLayout(layout);
-
- Button okButton = new Button(composite, SWT.PUSH);
- okButton.setText(resAddressBook.getString("OK"));
- okButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- shell.close();
- }
- });
-
- Button cancelButton = new Button(composite, SWT.PUSH);
- cancelButton.setText(resAddressBook.getString("Cancel"));
- cancelButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- values = null;
- shell.close();
- }
- });
-
- shell.setDefaultButton(okButton);
-}
-
-private void createTextWidgets() {
- if (labels == null) return;
-
- Composite composite = new Composite(shell, SWT.NULL);
- composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- GridLayout layout= new GridLayout();
- layout.numColumns = 2;
- composite.setLayout(layout);
-
- if (values == null)
- values = new String[labels.length];
-
- for (int i = 0; i < labels.length; i++) {
- Label label = new Label(composite, SWT.RIGHT);
- label.setText(labels[i]);
- Text text = new Text(composite, SWT.BORDER);
- GridData gridData = new GridData();
- gridData.widthHint = 400;
- text.setLayoutData(gridData);
- if (values[i] != null) {
- text.setText(values[i]);
- }
- text.setData("index", new Integer(i));
- addTextListener(text);
- }
-}
-
-public String[] getLabels() {
- return labels;
-}
-public String getTitle() {
- return shell.getText();
-}
-/**
- * Returns the contents of the <code>Text</code> widgets in the dialog in a
- * <code>String</code> array.
- *
- * @return String[]
- * The contents of the text widgets of the dialog.
- * May return null if all text widgets are empty.
- */
-public String[] getValues() {
- return values;
-}
-/**
- * Opens the dialog in the given state. Sets <code>Text</code> widget contents
- * and dialog behaviour accordingly.
- *
- * @param dialogState int
- * The state the dialog should be opened in.
- */
-public String[] open() {
- createTextWidgets();
- createControlButtons();
- shell.pack();
- shell.open();
- Display display = shell.getDisplay();
- while(!shell.isDisposed()){
- if(!display.readAndDispatch())
- display.sleep();
- }
-
- return getValues();
-}
-public void setLabels(String[] labels) {
- this.labels = labels;
-}
-public void setTitle(String title) {
- shell.setText(title);
-}
-/**
- * Sets the values of the <code>Text</code> widgets of the dialog to
- * the values supplied in the parameter array.
- *
- * @param itemInfo String[]
- * The values to which the dialog contents will be set.
- */
-public void setValues(String[] itemInfo) {
- if (labels == null) return;
-
- if (values == null)
- values = new String[labels.length];
-
- int numItems = Math.min(values.length, itemInfo.length);
- for(int i = 0; i < numItems; i++) {
- values[i] = itemInfo[i];
- }
-}
-}
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/addressbook/FindListener.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/addressbook/FindListener.java
deleted file mode 100755
index 12ad2d796d..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/addressbook/FindListener.java
+++ /dev/null
@@ -1,18 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.addressbook;
-
-
-public interface FindListener {
-
-public boolean find();
-
-}
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/addressbook/SearchDialog.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/addressbook/SearchDialog.java
deleted file mode 100755
index 0c42630f17..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/addressbook/SearchDialog.java
+++ /dev/null
@@ -1,202 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.addressbook;
-
-
-/* Imports */
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.events.*;
-import java.util.ResourceBundle;
-
-/**
- * SearchDialog is a simple class that uses <code>org.eclipse.swt</code>
- * libraries to implement a basic search dialog.
- */
-public class SearchDialog {
-
- private static ResourceBundle resAddressBook = ResourceBundle.getBundle("examples_addressbook");
-
- Shell shell;
- Text searchText;
- Combo searchArea;
- Label searchAreaLabel;
- Button matchCase;
- Button matchWord;
- Button findButton;
- Button down;
- FindListener findHandler;
-
-/**
- * Class constructor that sets the parent shell and the table widget that
- * the dialog will search.
- *
- * @param parent Shell
- * The shell that is the parent of the dialog.
- */
-public SearchDialog(Shell parent) {
- shell = new Shell(parent, SWT.CLOSE | SWT.BORDER | SWT.TITLE);
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- shell.setLayout(layout);
- shell.setText(resAddressBook.getString("Search_dialog_title"));
- shell.addShellListener(new ShellAdapter(){
- public void shellClosed(ShellEvent e) {
- // don't dispose of the shell, just hide it for later use
- e.doit = false;
- shell.setVisible(false);
- }
- });
-
- Label label = new Label(shell, SWT.LEFT);
- label.setText(resAddressBook.getString("Dialog_find_what"));
- searchText = new Text(shell, SWT.BORDER);
- GridData gridData = new GridData(GridData.FILL_HORIZONTAL);
- gridData.widthHint = 200;
- searchText.setLayoutData(gridData);
- searchText.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- boolean enableFind = (searchText.getCharCount() != 0);
- findButton.setEnabled(enableFind);
- }
- });
-
- searchAreaLabel = new Label(shell, SWT.LEFT);
- searchArea = new Combo(shell, SWT.DROP_DOWN | SWT.READ_ONLY);
- gridData = new GridData(GridData.FILL_HORIZONTAL);
- gridData.widthHint = 200;
- searchArea.setLayoutData(gridData);
-
- matchCase = new Button(shell, SWT.CHECK);
- matchCase.setText(resAddressBook.getString("Dialog_match_case"));
- gridData = new GridData();
- gridData.horizontalSpan = 2;
- matchCase.setLayoutData(gridData);
-
- matchWord = new Button(shell, SWT.CHECK);
- matchWord.setText(resAddressBook.getString("Dialog_match_word"));
- gridData = new GridData();
- gridData.horizontalSpan = 2;
- matchWord.setLayoutData(gridData);
-
- Group direction = new Group(shell, SWT.NONE);
- gridData = new GridData();
- gridData.horizontalSpan = 2;
- direction.setLayoutData(gridData);
- direction.setLayout (new FillLayout ());
- direction.setText(resAddressBook.getString("Dialog_direction"));
-
- Button up = new Button(direction, SWT.RADIO);
- up.setText(resAddressBook.getString("Dialog_dir_up"));
- up.setSelection(false);
-
- down = new Button(direction, SWT.RADIO);
- down.setText(resAddressBook.getString("Dialog_dir_down"));
- down.setSelection(true);
-
- Composite composite = new Composite(shell, SWT.NONE);
- gridData = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
- gridData.horizontalSpan = 2;
- composite.setLayoutData(gridData);
- layout = new GridLayout();
- layout.numColumns = 2;
- layout.makeColumnsEqualWidth = true;
- composite.setLayout(layout);
-
- findButton = new Button(composite, SWT.PUSH);
- findButton.setText(resAddressBook.getString("Dialog_find"));
- findButton.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
- findButton.setEnabled(false);
- findButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- if (!findHandler.find()){
- MessageBox box = new MessageBox(shell, SWT.ICON_INFORMATION | SWT.OK | SWT.PRIMARY_MODAL);
- box.setText(shell.getText());
- box.setMessage(resAddressBook.getString("Cannot_find") + "\"" + searchText.getText() + "\"");
- box.open();
- }
- }
- });
-
- Button cancelButton = new Button(composite, SWT.PUSH);
- cancelButton.setText(resAddressBook.getString("Cancel"));
- cancelButton.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING));
- cancelButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- shell.setVisible(false);
- }
- });
-
- shell.pack();
-}
-public String getSearchAreaLabel(String label) {
- return searchAreaLabel.getText();
-}
-
-public String[] getsearchAreaNames() {
- return searchArea.getItems();
-}
-public boolean getMatchCase() {
- return matchCase.getSelection();
-}
-public boolean getMatchWord() {
- return matchWord.getSelection();
-}
-public String getSearchString() {
- return searchText.getText();
-}
-public boolean getSearchDown(){
- return down.getSelection();
-}
-public int getSelectedSearchArea() {
- return searchArea.getSelectionIndex();
-}
-public void open() {
- if (shell.isVisible()) {
- shell.setFocus();
- } else {
- shell.open();
- }
- searchText.setFocus();
-}
-public void setSearchAreaNames(String[] names) {
- for (int i = 0; i < names.length; i++) {
- searchArea.add(names[i]);
- }
- searchArea.select(0);
-}
-public void setSearchAreaLabel(String label) {
- searchAreaLabel.setText(label);
-}
-public void setMatchCase(boolean match) {
- matchCase.setSelection(match);
-}
-public void setMatchWord(boolean match) {
- matchWord.setSelection(match);
-}
-public void setSearchDown(boolean searchDown){
- down.setSelection(searchDown);
-}
-public void setSearchString(String searchString) {
- searchText.setText(searchString);
-}
-
-public void setSelectedSearchArea(int index) {
- searchArea.select(index);
-}
-public void addFindListener(FindListener listener) {
- this.findHandler = listener;
-}
-public void removeFindListener(FindListener listener) {
- this.findHandler = null;
-}
-}
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/browserexample/BrowserExample.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/browserexample/BrowserExample.java
deleted file mode 100644
index fa32424b16..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/browserexample/BrowserExample.java
+++ /dev/null
@@ -1,358 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.browserexample;
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.browser.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-import java.util.*;
-
-public class BrowserExample {
- static ResourceBundle resourceBundle = ResourceBundle.getBundle("examples_browser");
- int index;
- boolean busy;
- Image images[];
- Image icon = null;
- boolean title = false;
- Composite parent;
- Text locationBar;
- Browser browser;
- ToolBar toolbar;
- Canvas canvas;
- ToolItem itemBack, itemForward;
- Label status;
- ProgressBar progressBar;
- SWTError error = null;
-
- static final String[] imageLocations = {
- "eclipse01.bmp", "eclipse02.bmp", "eclipse03.bmp", "eclipse04.bmp", "eclipse05.bmp",
- "eclipse06.bmp", "eclipse07.bmp", "eclipse08.bmp", "eclipse09.bmp", "eclipse10.bmp",
- "eclipse11.bmp", "eclipse12.bmp",};
- static final String iconLocation = "document.gif";
-
- public BrowserExample(Composite parent, boolean top) {
- this.parent = parent;
- try {
- browser = new Browser(parent, SWT.BORDER);
- } catch (SWTError e) {
- error = e;
- /* Browser widget could not be instantiated */
- parent.setLayout(new FillLayout());
- Label label = new Label(parent, SWT.CENTER | SWT.WRAP);
- label.setText(getResourceString("BrowserNotCreated"));
- parent.layout(true);
- return;
- }
- initResources();
- final Display display = parent.getDisplay();
- browser.setData("org.eclipse.swt.examples.browserexample.BrowserApplication", this);
- browser.addOpenWindowListener(new OpenWindowListener() {
- public void open(WindowEvent event) {
- Shell shell = new Shell(display);
- if (icon != null) shell.setImage(icon);
- shell.setLayout(new FillLayout());
- BrowserExample app = new BrowserExample(shell, false);
- app.setShellDecoration(icon, true);
- event.browser = app.getBrowser();
- }
- });
- if (top) {
- browser.setUrl(getResourceString("Startup"));
- show(false, null, null, true, true, true, true);
- } else {
- browser.addVisibilityWindowListener(new VisibilityWindowListener() {
- public void hide(WindowEvent e) {
- }
- public void show(WindowEvent e) {
- Browser browser = (Browser)e.widget;
- BrowserExample app = (BrowserExample)browser.getData("org.eclipse.swt.examples.browserexample.BrowserApplication");
- app.show(true, e.location, e.size, e.addressBar, e.menuBar, e.statusBar, e.toolBar);
- }
- });
- browser.addCloseWindowListener(new CloseWindowListener() {
- public void close(WindowEvent event) {
- Browser browser = (Browser)event.widget;
- Shell shell = browser.getShell();
- shell.close();
- }
- });
- }
- }
-
- /**
- * Disposes of all resources associated with a particular
- * instance of the BrowserApplication.
- */
- public void dispose() {
- freeResources();
- }
-
- /**
- * Gets a string from the resource bundle.
- * We don't want to crash because of a missing String.
- * Returns the key if not found.
- */
- static String getResourceString(String key) {
- try {
- return resourceBundle.getString(key);
- } catch (MissingResourceException e) {
- return key;
- } catch (NullPointerException e) {
- return "!" + key + "!";
- }
- }
-
- public SWTError getError() { return error; }
-
- public Browser getBrowser() { return browser; }
-
- public void setShellDecoration(Image icon, boolean title) {
- this.icon = icon;
- this.title = title;
- }
-
- void show(boolean owned, Point location, Point size, boolean addressBar, boolean menuBar, boolean statusBar, boolean toolBar) {
- final Shell shell = browser.getShell();
- if (owned) {
- if (location != null) shell.setLocation(location);
- if (size != null) shell.setSize(shell.computeSize(size.x, size.y));
- }
- FormData data = null;
- if (toolBar) {
- toolbar = new ToolBar(parent, SWT.NONE);
- data = new FormData();
- data.top = new FormAttachment(0, 5);
- toolbar.setLayoutData(data);
- itemBack = new ToolItem(toolbar, SWT.PUSH);
- itemBack.setText(getResourceString("Back"));
- itemForward = new ToolItem(toolbar, SWT.PUSH);
- itemForward.setText(getResourceString("Forward"));
- final ToolItem itemStop = new ToolItem(toolbar, SWT.PUSH);
- itemStop.setText(getResourceString("Stop"));
- final ToolItem itemRefresh = new ToolItem(toolbar, SWT.PUSH);
- itemRefresh.setText(getResourceString("Refresh"));
- final ToolItem itemGo = new ToolItem(toolbar, SWT.PUSH);
- itemGo.setText(getResourceString("Go"));
-
- itemBack.setEnabled(browser.isBackEnabled());
- itemForward.setEnabled(browser.isForwardEnabled());
- Listener listener = new Listener() {
- public void handleEvent(Event event) {
- ToolItem item = (ToolItem)event.widget;
- if (item == itemBack) browser.back();
- else if (item == itemForward) browser.forward();
- else if (item == itemStop) browser.stop();
- else if (item == itemRefresh) browser.refresh();
- else if (item == itemGo) browser.setUrl(locationBar.getText());
- }
- };
- itemBack.addListener(SWT.Selection, listener);
- itemForward.addListener(SWT.Selection, listener);
- itemStop.addListener(SWT.Selection, listener);
- itemRefresh.addListener(SWT.Selection, listener);
- itemGo.addListener(SWT.Selection, listener);
-
- canvas = new Canvas(parent, SWT.NO_BACKGROUND);
- data = new FormData();
- data.width = 24;
- data.height = 24;
- data.top = new FormAttachment(0, 5);
- data.right = new FormAttachment(100, -5);
- canvas.setLayoutData(data);
-
- final Rectangle rect = images[0].getBounds();
- canvas.addListener(SWT.Paint, new Listener() {
- public void handleEvent(Event e) {
- Point pt = ((Canvas)e.widget).getSize();
- e.gc.drawImage(images[index], 0, 0, rect.width, rect.height, 0, 0, pt.x, pt.y);
- }
- });
- canvas.addListener(SWT.MouseDown, new Listener() {
- public void handleEvent(Event e) {
- browser.setUrl(getResourceString("Startup"));
- }
- });
-
- final Display display = parent.getDisplay();
- display.asyncExec(new Runnable() {
- public void run() {
- if (canvas.isDisposed()) return;
- if (busy) {
- index++;
- if (index == images.length) index = 0;
- canvas.redraw();
- }
- display.timerExec(150, this);
- }
- });
- }
- if (addressBar) {
- locationBar = new Text(parent, SWT.BORDER);
- data = new FormData();
- if (toolbar != null) {
- data.top = new FormAttachment(toolbar, 0, SWT.TOP);
- data.left = new FormAttachment(toolbar, 5, SWT.RIGHT);
- data.right = new FormAttachment(canvas, -5, SWT.DEFAULT);
- } else {
- data.top = new FormAttachment(0, 0);
- data.left = new FormAttachment(0, 0);
- data.right = new FormAttachment(100, 0);
- }
- locationBar.setLayoutData(data);
- locationBar.addListener(SWT.DefaultSelection, new Listener() {
- public void handleEvent(Event e) {
- browser.setUrl(locationBar.getText());
- }
- });
- }
- if (statusBar) {
- status = new Label(parent, SWT.NONE);
- progressBar = new ProgressBar(parent, SWT.NONE);
-
- data = new FormData();
- data.left = new FormAttachment(0, 5);
- data.right = new FormAttachment(progressBar, 0, SWT.DEFAULT);
- data.bottom = new FormAttachment(100, -5);
- status.setLayoutData(data);
-
- data = new FormData();
- data.right = new FormAttachment(100, -5);
- data.bottom = new FormAttachment(100, -5);
- progressBar.setLayoutData(data);
-
- browser.addStatusTextListener(new StatusTextListener() {
- public void changed(StatusTextEvent event) {
- status.setText(event.text);
- }
- });
- }
- parent.setLayout(new FormLayout());
-
- Control aboveBrowser = toolBar ? (Control)canvas : (addressBar ? (Control)locationBar : null);
- data = new FormData();
- data.left = new FormAttachment(0, 0);
- data.top = aboveBrowser != null ? new FormAttachment(aboveBrowser, 5, SWT.DEFAULT) : new FormAttachment(0, 0);
- data.right = new FormAttachment(100, 0);
- data.bottom = status != null ? new FormAttachment(status, -5, SWT.DEFAULT) : new FormAttachment(100, 0);
- browser.setLayoutData(data);
-
- if (statusBar || toolBar) {
- browser.addProgressListener(new ProgressListener() {
- public void changed(ProgressEvent event) {
- if (event.total == 0) return;
- int ratio = event.current * 100 / event.total;
- if (progressBar != null) progressBar.setSelection(ratio);
- busy = event.current != event.total;
- if (!busy) {
- index = 0;
- if (canvas != null) canvas.redraw();
- }
- }
- public void completed(ProgressEvent event) {
- if (progressBar != null) progressBar.setSelection(0);
- busy = false;
- index = 0;
- if (canvas != null) {
- itemBack.setEnabled(browser.isBackEnabled());
- itemForward.setEnabled(browser.isForwardEnabled());
- canvas.redraw();
- }
- }
- });
- }
- if (addressBar || statusBar || toolBar) {
- browser.addLocationListener(new LocationListener() {
- public void changed(LocationEvent event) {
- busy = true;
- if (event.top && locationBar != null) locationBar.setText(event.location);
- }
- public void changing(LocationEvent event) {
- }
- });
- }
- if (title) {
- browser.addTitleListener(new TitleListener() {
- public void changed(TitleEvent event) {
- shell.setText(event.title+" - "+getResourceString("window.title"));
- }
- });
- }
- parent.layout(true);
- if (owned) shell.open();
- }
-
- /**
- * Grabs input focus.
- */
- public void focus() {
- if (locationBar != null) locationBar.setFocus();
- else if (browser != null) browser.setFocus();
- else parent.setFocus();
- }
-
- /**
- * Frees the resources
- */
- void freeResources() {
- if (images != null) {
- for (int i = 0; i < images.length; ++i) {
- final Image image = images[i];
- if (image != null) image.dispose();
- }
- images = null;
- }
- }
-
- /**
- * Loads the resources
- */
- void initResources() {
- final Class clazz = this.getClass();
- if (resourceBundle != null) {
- try {
- if (images == null) {
- images = new Image[imageLocations.length];
- for (int i = 0; i < imageLocations.length; ++i) {
- ImageData source = new ImageData(clazz.getResourceAsStream(imageLocations[i]));
- ImageData mask = source.getTransparencyMask();
- images[i] = new Image(null, source, mask);
- }
- }
- return;
- } catch (Throwable t) {
- }
- }
- String error = (resourceBundle != null) ? getResourceString("error.CouldNotLoadResources") : "Unable to load resources";
- freeResources();
- throw new RuntimeException(error);
- }
-
- public static void main(String [] args) {
- Display display = new Display();
- Shell shell = new Shell(display);
- shell.setLayout(new FillLayout());
- shell.setText(getResourceString("window.title"));
- Image icon = new Image(display, BrowserExample.class.getResourceAsStream(iconLocation));
- shell.setImage(icon);
- BrowserExample app = new BrowserExample(shell, true);
- app.setShellDecoration(icon, true);
- shell.open();
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch())
- display.sleep();
- }
- icon.dispose();
- app.dispose();
- display.dispose();
- }
-}
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/browserexample/document.gif b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/browserexample/document.gif
deleted file mode 100644
index 895e22110d..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/browserexample/document.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/browserexample/eclipse01.bmp b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/browserexample/eclipse01.bmp
deleted file mode 100644
index 43116e6d8e..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/browserexample/eclipse01.bmp
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/browserexample/eclipse02.bmp b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/browserexample/eclipse02.bmp
deleted file mode 100644
index 8db04efb6b..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/browserexample/eclipse02.bmp
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/browserexample/eclipse03.bmp b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/browserexample/eclipse03.bmp
deleted file mode 100644
index 5fc7b1003c..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/browserexample/eclipse03.bmp
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/browserexample/eclipse04.bmp b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/browserexample/eclipse04.bmp
deleted file mode 100644
index 2140654bb2..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/browserexample/eclipse04.bmp
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/browserexample/eclipse05.bmp b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/browserexample/eclipse05.bmp
deleted file mode 100644
index 7e45a99b5b..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/browserexample/eclipse05.bmp
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/browserexample/eclipse06.bmp b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/browserexample/eclipse06.bmp
deleted file mode 100644
index aaa888a67f..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/browserexample/eclipse06.bmp
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/browserexample/eclipse07.bmp b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/browserexample/eclipse07.bmp
deleted file mode 100644
index 50e22225ba..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/browserexample/eclipse07.bmp
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/browserexample/eclipse08.bmp b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/browserexample/eclipse08.bmp
deleted file mode 100644
index b1ac29dc96..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/browserexample/eclipse08.bmp
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/browserexample/eclipse09.bmp b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/browserexample/eclipse09.bmp
deleted file mode 100644
index 561f830ffc..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/browserexample/eclipse09.bmp
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/browserexample/eclipse10.bmp b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/browserexample/eclipse10.bmp
deleted file mode 100644
index 6ae79b2df8..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/browserexample/eclipse10.bmp
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/browserexample/eclipse11.bmp b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/browserexample/eclipse11.bmp
deleted file mode 100644
index a0c24a6815..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/browserexample/eclipse11.bmp
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/browserexample/eclipse12.bmp b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/browserexample/eclipse12.bmp
deleted file mode 100644
index 1cae71cf7e..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/browserexample/eclipse12.bmp
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/clipboard/ClipboardExample.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/clipboard/ClipboardExample.java
deleted file mode 100644
index d7e9086fac..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/clipboard/ClipboardExample.java
+++ /dev/null
@@ -1,370 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.clipboard;
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.custom.*;
-import org.eclipse.swt.dnd.*;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-
-public class ClipboardExample {
-
- Clipboard clipboard;
- Shell shell;
- Text copyText;
- Text pasteText;
- Text copyRtfText;
- Text pasteRtfText;
- Table copyFileTable;
- Table pasteFileTable;
- Text text;
- Combo combo;
- StyledText styledText;
- Label status;
- static final int SIZE = 60;
-
-public static void main( String[] args) {
- Display display = new Display();
- new ClipboardExample().open(display);
- display.dispose();
-}
-public void open(Display display) {
- clipboard = new Clipboard(display);
- shell = new Shell (display);
- shell.setText("SWT Clipboard");
- shell.setLayout(new GridLayout(2, true));
-
- Group copyGroup = new Group(shell, SWT.NONE);
- copyGroup.setText("Copy From:");
- GridData data = new GridData(GridData.FILL_BOTH);
- copyGroup.setLayoutData(data);
- copyGroup.setLayout(new GridLayout(3, false));
-
- Group pasteGroup = new Group(shell, SWT.NONE);
- pasteGroup.setText("Paste To:");
- data = new GridData(GridData.FILL_BOTH);
- pasteGroup.setLayoutData(data);
- pasteGroup.setLayout(new GridLayout(3, false));
-
- Group controlGroup = new Group(shell, SWT.NONE);
- controlGroup.setText("Control API:");
- data = new GridData(GridData.FILL_BOTH);
- data.horizontalSpan = 2;
- controlGroup.setLayoutData(data);
- controlGroup.setLayout(new GridLayout(5, false));
-
- Group typesGroup = new Group(shell, SWT.NONE);
- typesGroup.setText("Available Types");
- data = new GridData(GridData.FILL_BOTH);
- data.horizontalSpan = 2;
- typesGroup.setLayoutData(data);
- typesGroup.setLayout(new GridLayout(2, false));
-
- status = new Label(shell, SWT.BORDER);
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan = 2;
- data.heightHint = 60;
- status.setLayoutData(data);
-
- createTextTransfer(copyGroup, pasteGroup);
- createRTFTransfer(copyGroup, pasteGroup);
- createFileTransfer(copyGroup, pasteGroup);
- createMyTransfer(copyGroup, pasteGroup);
- createControlTransfer(controlGroup);
- createAvailableTypes(typesGroup);
-
- shell.pack();
- shell.open();
- while (!shell.isDisposed ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- clipboard.dispose();
-}
-void createTextTransfer(Composite copyParent, Composite pasteParent) {
-
- // TextTransfer
- Label l = new Label(copyParent, SWT.NONE);
- l.setText("TextTransfer:"); //$NON-NLS-1$
- copyText = new Text(copyParent, SWT.MULTI | SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);
- copyText.setText("some\nplain\ntext");
- GridData data = new GridData(GridData.FILL_HORIZONTAL);
- data.heightHint = data.widthHint = SIZE;
- copyText.setLayoutData(data);
- Button b = new Button(copyParent, SWT.PUSH);
- b.setText("Copy");
- b.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- String data = copyText.getText();
- if (data.length() > 0) {
- status.setText("");
- clipboard.setContents(new Object[] {data}, new Transfer[] {TextTransfer.getInstance()});
- } else {
- status.setText("nothing to copy");
- }
- }
- });
-
- l = new Label(pasteParent, SWT.NONE);
- l.setText("TextTransfer:"); //$NON-NLS-1$
- pasteText = new Text(pasteParent, SWT.READ_ONLY | SWT.MULTI | SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.heightHint = data.widthHint = SIZE;
- pasteText.setLayoutData(data);
- b = new Button(pasteParent, SWT.PUSH);
- b.setText("Paste");
- b.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- String data = (String)clipboard.getContents(TextTransfer.getInstance());
- if (data != null && data.length() > 0) {
- status.setText("");
- pasteText.setText("begin paste>"+data+"<end paste");
- } else {
- status.setText("nothing to paste");
- }
- }
- });
-}
-void createRTFTransfer(Composite copyParent, Composite pasteParent){
- // RTF Transfer
- Label l = new Label(copyParent, SWT.NONE);
- l.setText("RTFTransfer:"); //$NON-NLS-1$
- copyRtfText = new Text(copyParent, SWT.MULTI | SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);
- copyRtfText.setText("some\nrtf\ntext");
- GridData data = new GridData(GridData.FILL_HORIZONTAL);
- data.heightHint = data.widthHint = SIZE;
- copyRtfText.setLayoutData(data);
- Button b = new Button(copyParent, SWT.PUSH);
- b.setText("Copy");
- b.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- String data = copyRtfText.getText();
- if (data.length() > 0) {
- status.setText("");
- data = "{\\rtf1{\\colortbl;\\red255\\green0\\blue0;}\\uc1\\b\\i " + data + "}";
- clipboard.setContents(new Object[] {data}, new Transfer[] {RTFTransfer.getInstance()});
- } else {
- status.setText("nothing to copy");
- }
- }
- });
-
- l = new Label(pasteParent, SWT.NONE);
- l.setText("RTFTransfer:"); //$NON-NLS-1$
- pasteRtfText = new Text(pasteParent, SWT.READ_ONLY | SWT.MULTI | SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.heightHint = data.widthHint = SIZE;
- pasteRtfText.setLayoutData(data);
- b = new Button(pasteParent, SWT.PUSH);
- b.setText("Paste");
- b.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- String data = (String)clipboard.getContents(RTFTransfer.getInstance());
- if (data != null && data.length() > 0) {
- status.setText("");
- pasteRtfText.setText("start paste>"+data+"<end paste");
- } else {
- status.setText("nothing to paste");
- }
- }
- });
-}
-void createFileTransfer(Composite copyParent, Composite pasteParent){
- //File Transfer
- Label l = new Label(copyParent, SWT.NONE);
- l.setText("FileTransfer:"); //$NON-NLS-1$
-
- Composite c = new Composite(copyParent, SWT.NONE);
- c.setLayout(new GridLayout(2, false));
- GridData data = new GridData(GridData.FILL_HORIZONTAL);
- c.setLayoutData(data);
-
- copyFileTable = new Table(c, SWT.MULTI | SWT.BORDER);
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.heightHint = data.widthHint = SIZE;
- data.horizontalSpan = 2;
- copyFileTable.setLayoutData(data);
-
- Button b = new Button(c, SWT.PUSH);
- b.setText("Select file(s)");
- b.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- FileDialog dialog = new FileDialog(shell, SWT.OPEN | SWT.MULTI);
- String result = dialog.open();
- if (result != null && result.length() > 0){
- //copyFileTable.removeAll();
- String separator = System.getProperty("file.separator");
- String path = dialog.getFilterPath();
- String[] names = dialog.getFileNames();
- for (int i = 0; i < names.length; i++) {
- TableItem item = new TableItem(copyFileTable, SWT.NONE);
- item.setText(path+separator+names[i]);
- }
- }
- }
- });
- b = new Button(c, SWT.PUSH);
- b.setText("Select directory");
- b.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- DirectoryDialog dialog = new DirectoryDialog(shell, SWT.OPEN);
- String result = dialog.open();
- if (result != null && result.length() > 0){
- //copyFileTable.removeAll();
- TableItem item = new TableItem(copyFileTable, SWT.NONE);
- item.setText(result);
- }
- }
- });
-
- b = new Button(copyParent, SWT.PUSH);
- b.setText("Copy");
- b.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- TableItem[] items = copyFileTable.getItems();
- if (items.length > 0){
- status.setText("");
- String[] data = new String[items.length];
- for (int i = 0; i < data.length; i++) {
- data[i] = items[i].getText();
- }
- clipboard.setContents(new Object[] {data}, new Transfer[] {FileTransfer.getInstance()});
- } else {
- status.setText("nothing to copy");
- }
- }
- });
-
- l = new Label(pasteParent, SWT.NONE);
- l.setText("FileTransfer:"); //$NON-NLS-1$
- pasteFileTable = new Table(pasteParent, SWT.MULTI | SWT.BORDER);
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.heightHint = data.widthHint = SIZE;
- pasteFileTable.setLayoutData(data);
- b = new Button(pasteParent, SWT.PUSH);
- b.setText("Paste");
- b.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- String[] data = (String[])clipboard.getContents(FileTransfer.getInstance());
- if (data != null && data.length > 0) {
- status.setText("");
- pasteFileTable.removeAll();
- for (int i = 0; i < data.length; i++) {
- TableItem item = new TableItem(pasteFileTable, SWT.NONE);
- item.setText(data[i]);
- }
- } else {
- status.setText("nothing to paste");
- }
- }
- });
-}
-void createMyTransfer(Composite copyParent, Composite pasteParent){
- // MyType Transfer
- // TODO
-}
-void createControlTransfer(Composite parent){
- Label l = new Label(parent, SWT.NONE);
- l.setText("Text:");
- Button b = new Button(parent, SWT.PUSH);
- b.setText("Cut");
- b.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- text.cut();
- }
- });
- b = new Button(parent, SWT.PUSH);
- b.setText("Copy");
- b.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- text.copy();
- }
- });
- b = new Button(parent, SWT.PUSH);
- b.setText("Paste");
- b.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- text.paste();
- }
- });
- text = new Text(parent, SWT.BORDER | SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
- GridData data = new GridData(GridData.FILL_HORIZONTAL);
- data.heightHint = data.widthHint = SIZE;
- text.setLayoutData(data);
-
- l = new Label(parent, SWT.NONE);
- l.setText("Combo:");
- b = new Button(parent, SWT.PUSH);
- b.setText("Cut");
- b.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- combo.cut();
- }
- });
- b = new Button(parent, SWT.PUSH);
- b.setText("Copy");
- b.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- combo.copy();
- }
- });
- b = new Button(parent, SWT.PUSH);
- b.setText("Paste");
- b.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- combo.paste();
- }
- });
- combo = new Combo(parent, SWT.NONE);
- combo.setItems(new String[] {"Item 1", "Item 2", "Item 3", "A longer Item"});
-
- l = new Label(parent, SWT.NONE);
- l.setText("StyledText:");
- l = new Label(parent, SWT.NONE);
- l.setVisible(false);
- b = new Button(parent, SWT.PUSH);
- b.setText("Copy");
- b.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- styledText.copy();
- }
- });
- b = new Button(parent, SWT.PUSH);
- b.setText("Paste");
- b.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- styledText.paste();
- }
- });
- styledText = new StyledText(parent, SWT.BORDER | SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.heightHint = data.widthHint = SIZE;
- styledText.setLayoutData(data);
-}
-void createAvailableTypes(Composite parent){
- final List list = new List(parent, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
- GridData data = new GridData(GridData.FILL_BOTH);
- data.heightHint = 100;
- list.setLayoutData(data);
- Button b = new Button(parent, SWT.PUSH);
- b.setText("Get Available Types");
- b.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- list.removeAll();
- String[] names = clipboard.getAvailableTypeNames();
- for (int i = 0; i < names.length; i++) {
- list.add(names[i]);
- }
- }
- });
-}
-} \ No newline at end of file
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/clipboard/MyType.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/clipboard/MyType.java
deleted file mode 100644
index f1fb79a6bb..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/clipboard/MyType.java
+++ /dev/null
@@ -1,16 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.clipboard;
-
-public class MyType {
- String firstName;
- String lastName;
-}
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/clipboard/MyTypeTransfer.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/clipboard/MyTypeTransfer.java
deleted file mode 100644
index 306a5de507..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/clipboard/MyTypeTransfer.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.clipboard;
-
-import java.io.*;
-import org.eclipse.swt.dnd.*;
-
-public class MyTypeTransfer extends ByteArrayTransfer {
-
- private static final String MYTYPENAME = "name_list"; //$NON-NLS-1$
- private static final int MYTYPEID = registerType(MYTYPENAME);
- private static MyTypeTransfer _instance = new MyTypeTransfer();
-
-public static MyTypeTransfer getInstance () {
- return _instance;
-}
-public void javaToNative (Object object, TransferData transferData) {
- if (object == null || !(object instanceof MyType[])) return;
-
- if (isSupportedType(transferData)) {
- MyType[] myTypes = (MyType[]) object;
- try {
- // write data to a byte array and then ask super to convert to pMedium
- ByteArrayOutputStream out = new ByteArrayOutputStream();
- DataOutputStream writeOut = new DataOutputStream(out);
- for (int i = 0, length = myTypes.length; i < length; i++){
- byte[] buffer = myTypes[i].firstName.getBytes();
- writeOut.writeInt(buffer.length);
- writeOut.write(buffer);
- buffer = myTypes[i].firstName.getBytes();
- writeOut.writeInt(buffer.length);
- writeOut.write(buffer);
- }
- byte[] buffer = out.toByteArray();
- writeOut.close();
-
- super.javaToNative(buffer, transferData);
-
- } catch (IOException e) {
- }
- }
-}
-public Object nativeToJava(TransferData transferData){
-
- if (isSupportedType(transferData)) {
-
- byte[] buffer = (byte[])super.nativeToJava(transferData);
- if (buffer == null) return null;
-
- MyType[] myData = new MyType[0];
- try {
- ByteArrayInputStream in = new ByteArrayInputStream(buffer);
- DataInputStream readIn = new DataInputStream(in);
- while(readIn.available() > 20) {
- MyType datum = new MyType();
- int size = readIn.readInt();
- byte[] name = new byte[size];
- readIn.read(name);
- datum.firstName = new String(name);
- size = readIn.readInt();
- name = new byte[size];
- readIn.read(name);
- datum.lastName = new String(name);
- MyType[] newMyData = new MyType[myData.length + 1];
- System.arraycopy(myData, 0, newMyData, 0, myData.length);
- newMyData[myData.length] = datum;
- myData = newMyData;
- }
- readIn.close();
- } catch (IOException ex) {
- return null;
- }
- return myData;
- }
-
- return null;
-}
-protected String[] getTypeNames(){
- return new String[]{MYTYPENAME};
-}
-protected int[] getTypeIds(){
- return new int[] {MYTYPEID};
-}
-}
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/AlignableTab.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/AlignableTab.java
deleted file mode 100755
index 271a9caca5..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/AlignableTab.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.controlexample;
-
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.events.*;
-
-/**
- * <code>AlignableTab</code> is the abstract
- * superclass of example controls that can be
- * aligned.
- */
-abstract class AlignableTab extends Tab {
-
- /* Alignment Controls */
- Button leftButton, rightButton, centerButton;
-
- /* Alignment Group */
- Group alignmentGroup;
-
- /**
- * Creates the Tab within a given instance of ControlExample.
- */
- AlignableTab(ControlExample instance) {
- super(instance);
- }
-
- /**
- * Creates the "Control" group.
- */
- void createControlGroup () {
- super.createControlGroup ();
-
- /* Create the group */
- alignmentGroup = new Group (controlGroup, SWT.NONE);
- alignmentGroup.setLayout (new GridLayout ());
- alignmentGroup.setLayoutData (new GridData(GridData.HORIZONTAL_ALIGN_FILL |
- GridData.VERTICAL_ALIGN_FILL));
- alignmentGroup.setText (ControlExample.getResourceString("Alignment"));
-
- /* Create the controls */
- leftButton = new Button (alignmentGroup, SWT.RADIO);
- leftButton.setText (ControlExample.getResourceString("Left"));
- centerButton = new Button (alignmentGroup, SWT.RADIO);
- centerButton.setText(ControlExample.getResourceString("Center"));
- rightButton = new Button (alignmentGroup, SWT.RADIO);
- rightButton.setText (ControlExample.getResourceString("Right"));
-
- /* Add the listeners */
- SelectionListener selectionListener = new SelectionAdapter () {
- public void widgetSelected(SelectionEvent event) {
- if (!((Button) event.widget).getSelection ()) return;
- setExampleWidgetAlignment ();
- };
- };
- leftButton.addSelectionListener (selectionListener);
- centerButton.addSelectionListener (selectionListener);
- rightButton.addSelectionListener (selectionListener);
- }
-
- /**
- * Sets the alignment of the "Example" widgets.
- */
- abstract void setExampleWidgetAlignment ();
-
- /**
- * Sets the state of the "Example" widgets.
- */
- void setExampleWidgetState () {
- super.setExampleWidgetState ();
- Control [] controls = getExampleWidgets ();
- if (controls.length != 0) {
- leftButton.setSelection ((controls [0].getStyle () & SWT.LEFT) != 0);
- centerButton.setSelection ((controls [0].getStyle () & SWT.CENTER) != 0);
- rightButton.setSelection ((controls [0].getStyle () & SWT.RIGHT) != 0);
- }
- }
-}
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/ButtonTab.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/ButtonTab.java
deleted file mode 100755
index 7d35f3a83e..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/ButtonTab.java
+++ /dev/null
@@ -1,205 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.controlexample;
-
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.events.*;
-
-/**
- * <code>ButtonTab</code> is the class that
- * demonstrates SWT buttons.
- */
-class ButtonTab extends AlignableTab {
-
- /* Example widgets and groups that contain them */
- Button button1, button2, button3, button4, button5, button6;
- Group textButtonGroup, imageButtonGroup;
-
- /* Alignment widgets added to the "Control" group */
- Button upButton, downButton;
-
- /* Style widgets added to the "Style" group */
- Button pushButton, checkButton, radioButton, toggleButton, arrowButton, flatButton;
-
- /**
- * Creates the Tab within a given instance of ControlExample.
- */
- ButtonTab(ControlExample instance) {
- super(instance);
- }
-
- /**
- * Creates the "Control" group.
- */
- void createControlGroup () {
- super.createControlGroup ();
-
- /* Create the controls */
- upButton = new Button (alignmentGroup, SWT.RADIO);
- upButton.setText (ControlExample.getResourceString("Up"));
- downButton = new Button (alignmentGroup, SWT.RADIO);
- downButton.setText (ControlExample.getResourceString("Down"));
-
- /* Add the listeners */
- SelectionListener selectionListener = new SelectionAdapter() {
- public void widgetSelected(SelectionEvent event) {
- if (!((Button) event.widget).getSelection()) return;
- setExampleWidgetAlignment ();
- };
- };
- upButton.addSelectionListener(selectionListener);
- downButton.addSelectionListener(selectionListener);
- }
-
- /**
- * Creates the "Example" group.
- */
- void createExampleGroup () {
- super.createExampleGroup ();
-
- /* Create a group for text buttons */
- textButtonGroup = new Group(exampleGroup, SWT.NONE);
- GridLayout gridLayout = new GridLayout ();
- textButtonGroup.setLayout(gridLayout);
- gridLayout.numColumns = 3;
- textButtonGroup.setLayoutData (new GridData (GridData.GRAB_HORIZONTAL | GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL));
- textButtonGroup.setText (ControlExample.getResourceString("Text_Buttons"));
-
- /* Create a group for the image buttons */
- imageButtonGroup = new Group(exampleGroup, SWT.NONE);
- gridLayout = new GridLayout();
- imageButtonGroup.setLayout(gridLayout);
- gridLayout.numColumns = 3;
- imageButtonGroup.setLayoutData (new GridData (GridData.GRAB_HORIZONTAL | GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL));
- imageButtonGroup.setText (ControlExample.getResourceString("Image_Buttons"));
- }
-
- /**
- * Creates the "Example" widgets.
- */
- void createExampleWidgets () {
-
- /* Compute the widget style */
- int style = getDefaultStyle();
- if (pushButton.getSelection()) style |= SWT.PUSH;
- if (checkButton.getSelection()) style |= SWT.CHECK;
- if (radioButton.getSelection()) style |= SWT.RADIO;
- if (toggleButton.getSelection()) style |= SWT.TOGGLE;
- if (flatButton.getSelection()) style |= SWT.FLAT;
- if (borderButton.getSelection()) style |= SWT.BORDER;
- if (leftButton.getSelection()) style |= SWT.LEFT;
- if (rightButton.getSelection()) style |= SWT.RIGHT;
- if (arrowButton.getSelection()) {
- style |= SWT.ARROW;
- if (upButton.getSelection()) style |= SWT.UP;
- if (downButton.getSelection()) style |= SWT.DOWN;
- } else {
- if (centerButton.getSelection()) style |= SWT.CENTER;
- }
-
- /* Create the example widgets */
- button1 = new Button(textButtonGroup, style);
- button1.setText(ControlExample.getResourceString("One"));
- button2 = new Button(textButtonGroup, style);
- button2.setText(ControlExample.getResourceString("Two"));
- button3 = new Button(textButtonGroup, style);
- button3.setText(ControlExample.getResourceString("Three"));
- button4 = new Button(imageButtonGroup, style);
- button4.setImage(instance.images[ControlExample.ciClosedFolder]);
- button5 = new Button(imageButtonGroup, style);
- button5.setImage(instance.images[ControlExample.ciOpenFolder]);
- button6 = new Button(imageButtonGroup, style);
- button6.setImage(instance.images[ControlExample.ciTarget]);
- }
-
- /**
- * Creates the "Style" group.
- */
- void createStyleGroup() {
- super.createStyleGroup ();
-
- /* Create the extra widgets */
- pushButton = new Button (styleGroup, SWT.RADIO);
- pushButton.setText("SWT.PUSH");
- checkButton = new Button (styleGroup, SWT.RADIO);
- checkButton.setText ("SWT.CHECK");
- radioButton = new Button (styleGroup, SWT.RADIO);
- radioButton.setText ("SWT.RADIO");
- toggleButton = new Button (styleGroup, SWT.RADIO);
- toggleButton.setText ("SWT.TOGGLE");
- arrowButton = new Button (styleGroup, SWT.RADIO);
- arrowButton.setText ("SWT.ARROW");
- flatButton = new Button (styleGroup, SWT.CHECK);
- flatButton.setText ("SWT.FLAT");
- borderButton = new Button (styleGroup, SWT.CHECK);
- borderButton.setText ("SWT.BORDER");
- }
-
- /**
- * Gets the "Example" widget children.
- */
- Control [] getExampleWidgets () {
- return new Control [] {button1, button2, button3, button4, button5, button6};
- }
-
- /**
- * Gets the text for the tab folder item.
- */
- String getTabText () {
- return "Button";
- }
-
- /**
- * Sets the alignment of the "Example" widgets.
- */
- void setExampleWidgetAlignment () {
- int alignment = 0;
- if (leftButton.getSelection ()) alignment = SWT.LEFT;
- if (centerButton.getSelection ()) alignment = SWT.CENTER;
- if (rightButton.getSelection ()) alignment = SWT.RIGHT;
- if (upButton.getSelection ()) alignment = SWT.UP;
- if (downButton.getSelection ()) alignment = SWT.DOWN;
- button1.setAlignment (alignment);
- button2.setAlignment (alignment);
- button3.setAlignment (alignment);
- button4.setAlignment (alignment);
- button5.setAlignment (alignment);
- button6.setAlignment (alignment);
- }
-
- /**
- * Sets the state of the "Example" widgets.
- */
- void setExampleWidgetState () {
- super.setExampleWidgetState ();
- if (arrowButton.getSelection ()) {
- upButton.setEnabled (true);
- centerButton.setEnabled (false);
- downButton.setEnabled (true);
- } else {
- upButton.setEnabled (false);
- centerButton.setEnabled (true);
- downButton.setEnabled (false);
- }
- upButton.setSelection ((button1.getStyle () & SWT.UP) != 0);
- downButton.setSelection ((button1.getStyle () & SWT.DOWN) != 0);
- pushButton.setSelection ((button1.getStyle () & SWT.PUSH) != 0);
- checkButton.setSelection ((button1.getStyle () & SWT.CHECK) != 0);
- radioButton.setSelection ((button1.getStyle () & SWT.RADIO) != 0);
- toggleButton.setSelection ((button1.getStyle () & SWT.TOGGLE) != 0);
- arrowButton.setSelection ((button1.getStyle () & SWT.ARROW) != 0);
- flatButton.setSelection ((button1.getStyle () & SWT.FLAT) != 0);
- borderButton.setSelection ((button1.getStyle () & SWT.BORDER) != 0);
- }
-}
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/CComboTab.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/CComboTab.java
deleted file mode 100644
index ab35141bec..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/CComboTab.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.controlexample;
-
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.custom.*;
-import org.eclipse.swt.layout.*;
-
-class CComboTab extends Tab {
-
- /* Example widgets and groups that contain them */
- CCombo combo1;
- Group comboGroup;
-
- /* Style widgets added to the "Style" group */
- Button flatButton, readOnlyButton;
-
- static String [] ListData = {ControlExample.getResourceString("ListData0_0"),
- ControlExample.getResourceString("ListData0_1"),
- ControlExample.getResourceString("ListData0_2"),
- ControlExample.getResourceString("ListData0_3"),
- ControlExample.getResourceString("ListData0_4"),
- ControlExample.getResourceString("ListData0_5"),
- ControlExample.getResourceString("ListData0_6"),
- ControlExample.getResourceString("ListData0_7"),
- ControlExample.getResourceString("ListData0_8")};
-
- /**
- * Creates the Tab within a given instance of ControlExample.
- */
- CComboTab(ControlExample instance) {
- super(instance);
- }
-
- /**
- * Creates the "Example" group.
- */
- void createExampleGroup () {
- super.createExampleGroup ();
-
- /* Create a group for the combo box */
- comboGroup = new Group (exampleGroup, SWT.NONE);
- comboGroup.setLayout (new GridLayout ());
- comboGroup.setLayoutData (new GridData (GridData.GRAB_HORIZONTAL | GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL));
- comboGroup.setText (ControlExample.getResourceString("Custom_Combo"));
- }
-
- /**
- * Creates the "Example" widgets.
- */
- void createExampleWidgets () {
-
- /* Compute the widget style */
- int style = getDefaultStyle();
- if (flatButton.getSelection ()) style |= SWT.FLAT;
- if (readOnlyButton.getSelection ()) style |= SWT.READ_ONLY;
- if (borderButton.getSelection ()) style |= SWT.BORDER;
-
- /* Create the example widgets */
- combo1 = new CCombo (comboGroup, style);
- combo1.setItems (ListData);
- if (ListData.length >= 3) {
- combo1.setText(ListData [2]);
- }
- }
-
- /**
- * Creates the "Style" group.
- */
- void createStyleGroup () {
- super.createStyleGroup ();
-
- /* Create the extra widgets */
- readOnlyButton = new Button (styleGroup, SWT.CHECK);
- readOnlyButton.setText ("SWT.READ_ONLY");
- borderButton = new Button (styleGroup, SWT.CHECK);
- borderButton.setText ("SWT.BORDER");
- flatButton = new Button (styleGroup, SWT.CHECK);
- flatButton.setText ("SWT.FLAT");
- }
-
- /**
- * Gets the "Example" widget children.
- */
- Control [] getExampleWidgets () {
- return new Control [] {combo1};
- }
-
- /**
- * Gets the text for the tab folder item.
- */
- String getTabText () {
- return "CCombo";
- }
-
- /**
- * Sets the state of the "Example" widgets.
- */
- void setExampleWidgetState () {
- super.setExampleWidgetState ();
- flatButton.setSelection ((combo1.getStyle () & SWT.FLAT) != 0);
- readOnlyButton.setSelection ((combo1.getStyle () & SWT.READ_ONLY) != 0);
- borderButton.setSelection ((combo1.getStyle () & SWT.BORDER) != 0);
- }
-}
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/CLabelTab.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/CLabelTab.java
deleted file mode 100644
index 2c0bb1cd51..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/CLabelTab.java
+++ /dev/null
@@ -1,141 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.controlexample;
-
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.custom.*;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-
-class CLabelTab extends AlignableTab {
- /* Example widgets and groups that contain them */
- CLabel label1, label2, label3;
- Group textLabelGroup;
-
- /* Style widgets added to the "Style" group */
- Button shadowInButton, shadowOutButton, shadowNoneButton;
-
- /**
- * Creates the Tab within a given instance of ControlExample.
- */
- CLabelTab(ControlExample instance) {
- super(instance);
- }
-
- /**
- * Creates the "Example" group.
- */
- void createExampleGroup () {
- super.createExampleGroup ();
-
- /* Create a group for the text labels */
- textLabelGroup = new Group(exampleGroup, SWT.NONE);
- GridLayout gridLayout = new GridLayout ();
- textLabelGroup.setLayout (gridLayout);
- gridLayout.numColumns = 3;
- textLabelGroup.setLayoutData (new GridData (GridData.GRAB_HORIZONTAL | GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL));
- textLabelGroup.setText (ControlExample.getResourceString("Custom_Labels"));
- }
-
- /**
- * Creates the "Example" widgets.
- */
- void createExampleWidgets () {
-
- /* Compute the widget style */
- int style = getDefaultStyle();
- if (shadowInButton.getSelection ()) style |= SWT.SHADOW_IN;
- if (shadowNoneButton.getSelection ()) style |= SWT.SHADOW_NONE;
- if (shadowOutButton.getSelection ()) style |= SWT.SHADOW_OUT;
- if (leftButton.getSelection ()) style |= SWT.LEFT;
- if (centerButton.getSelection ()) style |= SWT.CENTER;
- if (rightButton.getSelection ()) style |= SWT.RIGHT;
-
- /* Create the example widgets */
- label1 = new CLabel (textLabelGroup, style);
- label1.setText(ControlExample.getResourceString("One"));
- label1.setImage (instance.images[ControlExample.ciClosedFolder]);
- label2 = new CLabel (textLabelGroup, style);
- label2.setImage (instance.images[ControlExample.ciTarget]);
- label3 = new CLabel (textLabelGroup, style);
- label3.setText(ControlExample.getResourceString("Example_string"));
- }
-
- /**
- * Creates the "Style" group.
- */
- void createStyleGroup() {
- super.createStyleGroup ();
-
- /* Create the extra widgets */
- shadowNoneButton = new Button (styleGroup, SWT.RADIO);
- shadowNoneButton.setText ("SWT.SHADOW_NONE");
- shadowInButton = new Button (styleGroup, SWT.RADIO);
- shadowInButton.setText ("SWT.SHADOW_IN");
- shadowOutButton = new Button (styleGroup, SWT.RADIO);
- shadowOutButton.setText ("SWT.SHADOW_OUT");
-
- /* Add the listeners */
- SelectionListener selectionListener = new SelectionAdapter () {
- public void widgetSelected(SelectionEvent event) {
- if ((event.widget.getStyle() & SWT.RADIO) != 0) {
- if (!((Button) event.widget).getSelection ()) return;
- }
- recreateExampleWidgets ();
- };
- };
- shadowInButton.addSelectionListener (selectionListener);
- shadowOutButton.addSelectionListener (selectionListener);
- shadowNoneButton.addSelectionListener (selectionListener);
- }
-
- /**
- * Gets the "Example" widget children.
- */
- Control [] getExampleWidgets () {
- return new Control [] {label1, label2, label3};
- }
-
- /**
- * Gets the text for the tab folder item.
- */
- String getTabText () {
- return "CLabel";
- }
-
- /**
- * Sets the alignment of the "Example" widgets.
- */
- void setExampleWidgetAlignment () {
- int alignment = 0;
- if (leftButton.getSelection ()) alignment = SWT.LEFT;
- if (centerButton.getSelection ()) alignment = SWT.CENTER;
- if (rightButton.getSelection ()) alignment = SWT.RIGHT;
- label1.setAlignment (alignment);
- label2.setAlignment (alignment);
- label3.setAlignment (alignment);
- }
-
- /**
- * Sets the state of the "Example" widgets.
- */
- void setExampleWidgetState () {
- super.setExampleWidgetState ();
- leftButton.setSelection ((label1.getStyle () & SWT.LEFT) != 0);
- centerButton.setSelection ((label1.getStyle () & SWT.CENTER) != 0);
- rightButton.setSelection ((label1.getStyle () & SWT.RIGHT) != 0);
- shadowInButton.setSelection ((label1.getStyle () & SWT.SHADOW_IN) != 0);
- shadowOutButton.setSelection ((label1.getStyle () & SWT.SHADOW_OUT) != 0);
- shadowNoneButton.setSelection ((label1.getStyle () & (SWT.SHADOW_IN | SWT.SHADOW_OUT)) == 0);
- }
-}
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/CTabFolderTab.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/CTabFolderTab.java
deleted file mode 100644
index 214b6323ca..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/CTabFolderTab.java
+++ /dev/null
@@ -1,302 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.controlexample;
-
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.custom.*;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.widgets.*;
-
-class CTabFolderTab extends Tab {
- int lastSelectedTab = 0;
-
- /* Example widgets and groups that contain them */
- CTabFolder tabFolder1;
- Group tabFolderGroup, itemGroup;
-
- /* Style widgets added to the "Style" group */
- Button topButton, bottomButton, flatButton, closeButton;
-
- static String [] CTabItems1 = {ControlExample.getResourceString("CTabItem1_0"),
- ControlExample.getResourceString("CTabItem1_1"),
- ControlExample.getResourceString("CTabItem1_2")};
-
- /* Controls and resources added to the "Fonts" group */
- Button itemFontButton;
- Font itemFont;
-
- /* Other widgets added to the "Other" group */
- Button setSimpleTabButton, setImageButton;
-
- /**
- * Creates the Tab within a given instance of ControlExample.
- */
- CTabFolderTab(ControlExample instance) {
- super(instance);
- }
-
- /**
- * Creates the "Fonts" group.
- */
- void createColorGroup () {
- super.createColorGroup();
-
- itemGroup = new Group (colorGroup, SWT.NONE);
- itemGroup.setText (ControlExample.getResourceString ("CTab_Item_Colors"));
- GridData data = new GridData ();
- data.horizontalSpan = 2;
- itemGroup.setLayoutData (data);
- itemGroup.setLayout (new GridLayout (2, false));
- itemFontButton = new Button (itemGroup, SWT.PUSH);
- itemFontButton.setText(ControlExample.getResourceString("Font"));
- itemFontButton.setLayoutData(new GridData (GridData.HORIZONTAL_ALIGN_FILL));
-
- Shell shell = colorGroup.getShell ();
- final FontDialog fontDialog = new FontDialog (shell);
-
- /* Add listeners to set the colors and font */
- itemFontButton.addSelectionListener(new SelectionAdapter () {
- public void widgetSelected (SelectionEvent event) {
- Font oldFont = itemFont;
- if (oldFont == null) oldFont = tabFolder1.getItem (0).getFont ();
- fontDialog.setFontList(oldFont.getFontData());
- FontData fontData = fontDialog.open ();
- if (fontData == null) return;
- oldFont = itemFont;
- itemFont = new Font (event.display, fontData);
- setItemFont ();
- setExampleWidgetSize ();
- if (oldFont != null) oldFont.dispose ();
- }
- });
- shell.addDisposeListener(new DisposeListener() {
- public void widgetDisposed(DisposeEvent event) {
- if (itemFont != null) itemFont.dispose();
- itemFont = null;
- }
- });
- }
-
- /**
- * Creates the "Other" group.
- */
- void createOtherGroup () {
- super.createOtherGroup ();
-
- /* Create display controls specific to this example */
- setSimpleTabButton = new Button (otherGroup, SWT.CHECK);
- setSimpleTabButton.setText (ControlExample.getResourceString("Set_Simple_Tabs"));
- setSimpleTabButton.setSelection(true);
- setImageButton = new Button (otherGroup, SWT.CHECK);
- setImageButton.setText (ControlExample.getResourceString("Set_Image"));
-
- /* Add the listeners */
- setSimpleTabButton.addSelectionListener (new SelectionAdapter () {
- public void widgetSelected (SelectionEvent event) {
- setSimpleTabs();
- }
- });
- setImageButton.addSelectionListener (new SelectionAdapter () {
- public void widgetSelected (SelectionEvent event) {
- setImages();
- }
- });
- }
-
- /**
- * Creates the "Example" group.
- */
- void createExampleGroup () {
- super.createExampleGroup ();
-
- /* Create a group for the CTabFolder */
- tabFolderGroup = new Group (exampleGroup, SWT.NONE);
- tabFolderGroup.setLayout (new GridLayout ());
- tabFolderGroup.setLayoutData (new GridData (GridData.GRAB_HORIZONTAL | GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL));
- tabFolderGroup.setText ("CTabFolder");
- }
-
- /**
- * Creates the "Example" widgets.
- */
- void createExampleWidgets () {
-
- /* Compute the widget style */
- int style = getDefaultStyle();
- if (topButton.getSelection ()) style |= SWT.TOP;
- if (bottomButton.getSelection ()) style |= SWT.BOTTOM;
- if (borderButton.getSelection ()) style |= SWT.BORDER;
- if (flatButton.getSelection ()) style |= SWT.FLAT;
- if (closeButton.getSelection ()) style |= SWT.CLOSE;
-
- /* Create the example widgets */
- tabFolder1 = new CTabFolder (tabFolderGroup, style);
- for (int i = 0; i < CTabItems1.length; i++) {
- CTabItem item = new CTabItem(tabFolder1, SWT.NONE);
- item.setText(CTabItems1[i]);
- Text text = new Text(tabFolder1, SWT.NONE);
- text.setText(ControlExample.getResourceString("CTabItem_content") + ": " + i);
- item.setControl(text);
- }
- tabFolder1.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event event) {
- lastSelectedTab = tabFolder1.getSelectionIndex();
- }
- });
- tabFolder1.setSelection(lastSelectedTab);
- }
-
- /**
- * Creates the "Style" group.
- */
- void createStyleGroup() {
- super.createStyleGroup ();
-
- /* Create the extra widgets */
- topButton = new Button (styleGroup, SWT.RADIO);
- topButton.setText ("SWT.TOP");
- topButton.setSelection(true);
- bottomButton = new Button (styleGroup, SWT.RADIO);
- bottomButton.setText ("SWT.BOTTOM");
- borderButton = new Button (styleGroup, SWT.CHECK);
- borderButton.setText ("SWT.BORDER");
- flatButton = new Button (styleGroup, SWT.CHECK);
- flatButton.setText ("SWT.FLAT");
- flatButton.setEnabled(false);
- closeButton = new Button (styleGroup, SWT.CHECK);
- closeButton.setText ("SWT.CLOSE");
-
- /* Add the listeners */
- SelectionListener selectionListener = new SelectionAdapter () {
- public void widgetSelected(SelectionEvent event) {
- if ((event.widget.getStyle() & SWT.RADIO) != 0) {
- if (!((Button) event.widget).getSelection ()) return;
- }
- recreateExampleWidgets ();
- };
- };
- topButton.addSelectionListener (selectionListener);
- bottomButton.addSelectionListener (selectionListener);
- borderButton.addSelectionListener (selectionListener);
- flatButton.addSelectionListener (selectionListener);
- closeButton.addSelectionListener (selectionListener);
- borderButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- flatButton.setEnabled(borderButton.getSelection());
- }
- });
- }
-
- /**
- * Gets the list of custom event names.
- *
- * @return an array containing custom event names
- */
- String [] getCustomEventNames () {
- return new String [] {"CTabFolderEvent"};
- }
-
- /**
- * Gets the "Example" widget children's items, if any.
- *
- * @return an array containing the example widget children's items
- */
- Item [] getExampleWidgetItems () {
- return tabFolder1.getItems();
- }
-
- /**
- * Gets the "Example" widget children.
- */
- Control [] getExampleWidgets () {
- return new Control [] {tabFolder1};
- }
-
- /**
- * Gets the text for the tab folder item.
- */
- String getTabText () {
- return "CTabFolder";
- }
-
- /**
- * Hooks the custom listener specified by eventName.
- */
- void hookCustomListener (final String eventName) {
- if (eventName == "CTabFolderEvent") {
- tabFolder1.addCTabFolder2Listener (new CTabFolder2Adapter () {
- public void itemClosed (CTabFolderEvent event) {
- log (eventName, event);
- }
- });
- }
- }
-
- /**
- * Sets the foreground color, background color, and font
- * of the "Example" widgets to their default settings.
- * Also sets foreground and background color of the Node 1
- * TreeItems to default settings.
- */
- void resetColorsAndFonts () {
- super.resetColorsAndFonts ();
- Font oldFont = font;
- itemFont = null;
- setItemFont ();
- setExampleWidgetSize ();
- if (oldFont != null) oldFont.dispose();
- }
-
- /**
- * Sets the state of the "Example" widgets.
- */
- void setExampleWidgetState () {
- super.setExampleWidgetState ();
- setSimpleTabs ();
- setImages ();
- setItemFont ();
- setExampleWidgetSize ();
- }
-
- /**
- * Sets the header visible state of the "Example" widgets.
- */
- void setSimpleTabs () {
- tabFolder1.setSimple (setSimpleTabButton.getSelection ());
- }
-
- /**
- * Sets an image into each item of the "Example" widgets.
- */
- void setImages () {
- boolean setImage = setImageButton.getSelection ();
- CTabItem items[] = tabFolder1.getItems ();
- for (int i = 0; i < items.length; i++) {
- if (setImage) {
- items[i].setImage (instance.images[ControlExample.ciClosedFolder]);
- } else {
- items[i].setImage (null);
- }
- }
- setExampleWidgetSize ();
- }
-
- /**
- * Sets the font of CTabItem 0.
- */
- void setItemFont () {
- if (instance.startup) return;
- tabFolder1.getItem (0).setFont (itemFont);
- }
-}
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/CanvasTab.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/CanvasTab.java
deleted file mode 100644
index 4b93b692ee..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/CanvasTab.java
+++ /dev/null
@@ -1,304 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.controlexample;
-
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.layout.*;
-
-class CanvasTab extends Tab {
- static int colors [] = {
- SWT.COLOR_RED,
- SWT.COLOR_GREEN,
- SWT.COLOR_BLUE,
- SWT.COLOR_MAGENTA,
- SWT.COLOR_YELLOW,
- SWT.COLOR_CYAN,
- SWT.COLOR_DARK_RED,
- SWT.COLOR_DARK_GREEN,
- SWT.COLOR_DARK_BLUE,
- SWT.COLOR_DARK_MAGENTA,
- SWT.COLOR_DARK_YELLOW,
- SWT.COLOR_DARK_CYAN
- };
-
- /* Example widgets and groups that contain them */
- Canvas canvas;
- Group canvasGroup;
-
- /* Style widgets added to the "Style" group */
- Button horizontalButton, verticalButton, noBackgroundButton, noFocusButton, noMergePaintsButton, noRedrawResizeButton;
-
- /* Other widgets added to the "Other" group */
- Button caretButton, fillDamageButton;
-
- int paintCount;
- int cx, cy;
- int maxX, maxY;
-
- /**
- * Creates the Tab within a given instance of ControlExample.
- */
- CanvasTab(ControlExample instance) {
- super(instance);
- }
-
- /**
- * Creates a bitmap image.
- */
- Image createBitmapImage (Display display, String name) {
- ImageData source = new ImageData(ControlExample.class.getResourceAsStream(name + ".bmp"));
- ImageData mask = new ImageData(ControlExample.class.getResourceAsStream(name + "_mask.bmp"));
- return new Image (display, source, mask);
- }
-
- /**
- * Creates the "Other" group.
- */
- void createOtherGroup () {
- super.createOtherGroup ();
-
- /* Create display controls specific to this example */
- caretButton = new Button (otherGroup, SWT.CHECK);
- caretButton.setText (ControlExample.getResourceString("Caret"));
- fillDamageButton = new Button (otherGroup, SWT.CHECK);
- fillDamageButton.setText (ControlExample.getResourceString("FillDamage"));
-
- /* Add the listeners */
- caretButton.addSelectionListener (new SelectionAdapter () {
- public void widgetSelected (SelectionEvent event) {
- setCaret ();
- }
- });
- }
-
- /**
- * Creates the "Example" group.
- */
- void createExampleGroup () {
- super.createExampleGroup ();
-
- /* Create a group for the canvas widget */
- canvasGroup = new Group (exampleGroup, SWT.NONE);
- canvasGroup.setLayout (new GridLayout ());
- canvasGroup.setLayoutData (new GridData (GridData.GRAB_HORIZONTAL | GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL));
- canvasGroup.setText ("Canvas");
- }
-
- /**
- * Creates the "Example" widgets.
- */
- void createExampleWidgets () {
-
- /* Compute the widget style */
- int style = getDefaultStyle();
- if (horizontalButton.getSelection ()) style |= SWT.H_SCROLL;
- if (verticalButton.getSelection ()) style |= SWT.V_SCROLL;
- if (borderButton.getSelection ()) style |= SWT.BORDER;
- if (noBackgroundButton.getSelection ()) style |= SWT.NO_BACKGROUND;
- if (noFocusButton.getSelection ()) style |= SWT.NO_FOCUS;
- if (noMergePaintsButton.getSelection ()) style |= SWT.NO_MERGE_PAINTS;
- if (noRedrawResizeButton.getSelection ()) style |= SWT.NO_REDRAW_RESIZE;
-
- /* Create the example widgets */
- paintCount = 0; cx = 0; cy = 0;
- canvas = new Canvas (canvasGroup, style);
- canvas.addPaintListener(new PaintListener () {
- public void paintControl(PaintEvent e) {
- paintCount++;
- GC gc = e.gc;
- if (fillDamageButton.getSelection ()) {
- Color color = e.display.getSystemColor (colors [paintCount % colors.length]);
- gc.setBackground(color);
- gc.fillRectangle(e.x, e.y, e.width, e.height);
- }
- Point size = canvas.getSize ();
- gc.drawArc(cx + 1, cy + 1, size.x - 2, size.y - 2, 0, 360);
- gc.drawRectangle(cx + (size.x - 10) / 2, cy + (size.y - 10) / 2, 10, 10);
- }
- });
- canvas.addControlListener(new ControlAdapter() {
- public void controlResized(ControlEvent event) {
- Point size = canvas.getSize ();
- maxX = size.x * 3 / 2; maxY = size.y * 3 / 2;
- resizeScrollBars ();
- }
- });
- ScrollBar bar = canvas.getHorizontalBar();
- if (bar != null) {
- bar.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent event) {
- scrollHorizontal ((ScrollBar)event.widget);
- }
- });
- }
- bar = canvas.getVerticalBar();
- if (bar != null) {
- bar.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent event) {
- scrollVertical ((ScrollBar)event.widget);
- }
- });
- }
- resizeScrollBars ();
- }
-
- /**
- * Creates the "Style" group.
- */
- void createStyleGroup() {
- super.createStyleGroup();
-
- /* Create the extra widgets */
- horizontalButton = new Button (styleGroup, SWT.CHECK);
- horizontalButton.setText ("SWT.H_SCROLL");
- horizontalButton.setSelection(true);
- verticalButton = new Button (styleGroup, SWT.CHECK);
- verticalButton.setText ("SWT.V_SCROLL");
- verticalButton.setSelection(true);
- borderButton = new Button (styleGroup, SWT.CHECK);
- borderButton.setText ("SWT.BORDER");
- noBackgroundButton = new Button (styleGroup, SWT.CHECK);
- noBackgroundButton.setText ("SWT.NO_BACKGROUND");
- noFocusButton = new Button (styleGroup, SWT.CHECK);
- noFocusButton.setText ("SWT.NO_FOCUS");
- noMergePaintsButton = new Button (styleGroup, SWT.CHECK);
- noMergePaintsButton.setText ("SWT.NO_MERGE_PAINTS");
- noRedrawResizeButton = new Button (styleGroup, SWT.CHECK);
- noRedrawResizeButton.setText ("SWT.NO_REDRAW_RESIZE");
- }
-
- /**
- * Creates the tab folder page.
- *
- * @param tabFolder org.eclipse.swt.widgets.TabFolder
- * @return the new page for the tab folder
- */
- Composite createTabFolderPage (TabFolder tabFolder) {
- super.createTabFolderPage (tabFolder);
-
- /*
- * Add a resize listener to the tabFolderPage so that
- * if the user types into the example widget to change
- * its preferred size, and then resizes the shell, we
- * recalculate the preferred size correctly.
- */
- tabFolderPage.addControlListener(new ControlAdapter() {
- public void controlResized(ControlEvent e) {
- setExampleWidgetSize ();
- }
- });
-
- return tabFolderPage;
- }
-
- /**
- * Gets the "Example" widget children.
- */
- Control [] getExampleWidgets () {
- return new Control [] {canvas};
- }
-
- /**
- * Gets the text for the tab folder item.
- */
- String getTabText () {
- return "Canvas";
- }
-
- /**
- * Resizes the maximum and thumb of both scrollbars.
- */
- void resizeScrollBars () {
- Rectangle clientArea = canvas.getClientArea();
- ScrollBar bar = canvas.getHorizontalBar();
- if (bar != null) {
- bar.setMaximum(maxX);
- bar.setThumb(clientArea.width);
- bar.setPageIncrement(clientArea.width);
- }
- bar = canvas.getVerticalBar();
- if (bar != null) {
- bar.setMaximum(maxY);
- bar.setThumb(clientArea.height);
- bar.setPageIncrement(clientArea.height);
- }
- }
-
- /**
- * Scrolls the canvas horizontally.
- *
- * @param scrollBar
- */
- void scrollHorizontal (ScrollBar scrollBar) {
- Rectangle bounds = canvas.getClientArea();
- int x = -scrollBar.getSelection();
- if (x + maxX < bounds.width) {
- x = bounds.width - maxX;
- }
- canvas.scroll(x, cy, cx, cy, maxX, maxY, false);
- cx = x;
- }
-
- /**
- * Scrolls the canvas vertically.
- *
- * @param scrollBar
- */
- void scrollVertical (ScrollBar scrollBar) {
- Rectangle bounds = canvas.getClientArea();
- int y = -scrollBar.getSelection();
- if (y + maxY < bounds.height) {
- y = bounds.height - maxY;
- }
- canvas.scroll(cx, y, cx, cy, maxX, maxY, false);
- cy = y;
- }
-
- /**
- * Sets or clears the caret in the "Example" widget.
- */
- void setCaret () {
- Caret oldCaret = canvas.getCaret ();
- if (caretButton.getSelection ()) {
- Caret newCaret = new Caret(canvas, SWT.NONE);
- Font font = canvas.getFont();
- newCaret.setFont(font);
- GC gc = new GC(canvas);
- gc.setFont(font);
- newCaret.setBounds(1, 1, 1, gc.getFontMetrics().getHeight());
- gc.dispose();
- canvas.setCaret (newCaret);
- canvas.setFocus();
- } else {
- canvas.setCaret (null);
- }
- if (oldCaret != null) oldCaret.dispose ();
- }
-
- /**
- * Sets the state of the "Example" widgets.
- */
- void setExampleWidgetState () {
- super.setExampleWidgetState ();
- horizontalButton.setSelection ((canvas.getStyle () & SWT.H_SCROLL) != 0);
- verticalButton.setSelection ((canvas.getStyle () & SWT.V_SCROLL) != 0);
- borderButton.setSelection ((canvas.getStyle () & SWT.BORDER) != 0);
- noBackgroundButton.setSelection ((canvas.getStyle () & SWT.NO_BACKGROUND) != 0);
- noFocusButton.setSelection ((canvas.getStyle () & SWT.NO_FOCUS) != 0);
- noMergePaintsButton.setSelection ((canvas.getStyle () & SWT.NO_MERGE_PAINTS) != 0);
- noRedrawResizeButton.setSelection ((canvas.getStyle () & SWT.NO_REDRAW_RESIZE) != 0);
- setCaret ();
- }
-}
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/ComboTab.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/ComboTab.java
deleted file mode 100755
index 0cff972d60..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/ComboTab.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.controlexample;
-
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.layout.*;
-
-class ComboTab extends Tab {
-
- /* Example widgets and groups that contain them */
- Combo combo1;
- Group comboGroup;
-
- /* Style widgets added to the "Style" group */
- Button dropDownButton, readOnlyButton, simpleButton;
-
- static String [] ListData = {ControlExample.getResourceString("ListData0_0"),
- ControlExample.getResourceString("ListData0_1"),
- ControlExample.getResourceString("ListData0_2"),
- ControlExample.getResourceString("ListData0_3"),
- ControlExample.getResourceString("ListData0_4"),
- ControlExample.getResourceString("ListData0_5"),
- ControlExample.getResourceString("ListData0_6"),
- ControlExample.getResourceString("ListData0_7"),
- ControlExample.getResourceString("ListData0_8")};
-
- /**
- * Creates the Tab within a given instance of ControlExample.
- */
- ComboTab(ControlExample instance) {
- super(instance);
- }
-
- /**
- * Creates the "Example" group.
- */
- void createExampleGroup () {
- super.createExampleGroup ();
-
- /* Create a group for the combo box */
- comboGroup = new Group (exampleGroup, SWT.NONE);
- comboGroup.setLayout (new GridLayout ());
- comboGroup.setLayoutData (new GridData (GridData.GRAB_HORIZONTAL | GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL));
- comboGroup.setText ("Combo");
- }
-
- /**
- * Creates the "Example" widgets.
- */
- void createExampleWidgets () {
-
- /* Compute the widget style */
- int style = getDefaultStyle();
- if (dropDownButton.getSelection ()) style |= SWT.DROP_DOWN;
- if (readOnlyButton.getSelection ()) style |= SWT.READ_ONLY;
- if (simpleButton.getSelection ()) style |= SWT.SIMPLE;
-
- /* Create the example widgets */
- combo1 = new Combo (comboGroup, style);
- combo1.setItems (ListData);
- if (ListData.length >= 3) {
- combo1.setText(ListData [2]);
- }
- }
-
- /**
- * Creates the tab folder page.
- *
- * @param tabFolder org.eclipse.swt.widgets.TabFolder
- * @return the new page for the tab folder
- */
- Composite createTabFolderPage (TabFolder tabFolder) {
- super.createTabFolderPage (tabFolder);
-
- /*
- * Add a resize listener to the tabFolderPage so that
- * if the user types into the example widget to change
- * its preferred size, and then resizes the shell, we
- * recalculate the preferred size correctly.
- */
- tabFolderPage.addControlListener(new ControlAdapter() {
- public void controlResized(ControlEvent e) {
- setExampleWidgetSize ();
- }
- });
-
- return tabFolderPage;
- }
-
- /**
- * Creates the "Style" group.
- */
- void createStyleGroup () {
- super.createStyleGroup ();
-
- /* Create the extra widgets */
- dropDownButton = new Button (styleGroup, SWT.RADIO);
- dropDownButton.setText ("SWT.DROP_DOWN");
- simpleButton = new Button (styleGroup, SWT.RADIO);
- simpleButton.setText("SWT.SIMPLE");
- readOnlyButton = new Button (styleGroup, SWT.CHECK);
- readOnlyButton.setText ("SWT.READ_ONLY");
- }
-
- /**
- * Gets the "Example" widget children.
- */
- Control [] getExampleWidgets () {
- return new Control [] {combo1};
- }
-
- /**
- * Gets the text for the tab folder item.
- */
- String getTabText () {
- return "Combo";
- }
-
- /**
- * Sets the state of the "Example" widgets.
- */
- void setExampleWidgetState () {
- super.setExampleWidgetState ();
- dropDownButton.setSelection ((combo1.getStyle () & SWT.DROP_DOWN) != 0);
- simpleButton.setSelection ((combo1.getStyle () & SWT.SIMPLE) != 0);
- readOnlyButton.setSelection ((combo1.getStyle () & SWT.READ_ONLY) != 0);
- readOnlyButton.setEnabled(!simpleButton.getSelection());
- }
-}
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/ControlExample.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/ControlExample.java
deleted file mode 100755
index ef3408956d..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/ControlExample.java
+++ /dev/null
@@ -1,208 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.controlexample;
-
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-
-import java.text.*;
-import java.util.*;
-
-public class ControlExample {
- private static ResourceBundle resourceBundle =
- ResourceBundle.getBundle("examples_control");
- private ShellTab shellTab;
- private TabFolder tabFolder;
- Image images[];
-
- static final int ciClosedFolder = 0, ciOpenFolder = 1, ciTarget = 2;
- static final String[] imageLocations = {
- "closedFolder.gif",
- "openFolder.gif",
- "target.gif" };
-
- boolean startup = true;
-
- /**
- * Creates an instance of a ControlExample embedded inside
- * the supplied parent Composite.
- *
- * @param parent the container of the example
- */
- public ControlExample(Composite parent) {
- initResources();
- tabFolder = new TabFolder (parent, SWT.NONE);
- Tab [] tabs = createTabs();
- for (int i=0; i<tabs.length; i++) {
- TabItem item = new TabItem (tabFolder, SWT.NONE);
- item.setText (tabs [i].getTabText ());
- item.setControl (tabs [i].createTabFolderPage (tabFolder));
- item.setData (tabs [i]);
- }
- startup = false;
- }
-
- /**
- * Answers the set of example Tabs
- */
- Tab[] createTabs() {
- return new Tab [] {
- new ButtonTab (this),
- new CanvasTab (this),
- new ComboTab (this),
- new CoolBarTab (this),
- new DialogTab (this),
- new GroupTab (this),
- new LabelTab (this),
- new ListTab (this),
- new ProgressBarTab (this),
- new SashTab (this),
- shellTab = new ShellTab(this),
- new SliderTab (this),
- new TabFolderTab (this),
- new TableTab (this),
- new TextTab (this),
- new ToolBarTab (this),
- new TreeTab (this),
- };
- }
-
- /**
- * Disposes of all resources associated with a particular
- * instance of the ControlExample.
- */
- public void dispose() {
- /*
- * Destroy any shells that may have been created
- * by the Shells tab. When a shell is disposed,
- * all child shells are also disposed. Therefore
- * it is necessary to check for disposed shells
- * in the shells list to avoid disposing a shell
- * twice.
- */
- if (shellTab != null) shellTab.closeAllShells ();
- shellTab = null;
- tabFolder = null;
- freeResources();
- }
-
- /**
- * Frees the resources
- */
- void freeResources() {
- if (images != null) {
- for (int i = 0; i < images.length; ++i) {
- final Image image = images[i];
- if (image != null) image.dispose();
- }
- images = null;
- }
- }
-
- /**
- * Gets a string from the resource bundle.
- * We don't want to crash because of a missing String.
- * Returns the key if not found.
- */
- static String getResourceString(String key) {
- try {
- return resourceBundle.getString(key);
- } catch (MissingResourceException e) {
- return key;
- } catch (NullPointerException e) {
- return "!" + key + "!";
- }
- }
-
- /**
- * Gets a string from the resource bundle and binds it
- * with the given arguments. If the key is not found,
- * return the key.
- */
- static String getResourceString(String key, Object[] args) {
- try {
- return MessageFormat.format(getResourceString(key), args);
- } catch (MissingResourceException e) {
- return key;
- } catch (NullPointerException e) {
- return "!" + key + "!";
- }
- }
-
- /**
- * Loads the resources
- */
- void initResources() {
- final Class clazz = ControlExample.class;
- if (resourceBundle != null) {
- try {
- if (images == null) {
- images = new Image[imageLocations.length];
-
- for (int i = 0; i < imageLocations.length; ++i) {
- ImageData source = new ImageData(clazz.getResourceAsStream(
- imageLocations[i]));
- ImageData mask = source.getTransparencyMask();
- images[i] = new Image(null, source, mask);
- }
- }
- return;
- } catch (Throwable t) {
- }
- }
- String error = (resourceBundle != null) ?
- getResourceString("error.CouldNotLoadResources") :
- "Unable to load resources";
- freeResources();
- throw new RuntimeException(error);
- }
-
- /**
- * Invokes as a standalone program.
- */
- public static void main(String[] args) {
- Display display = new Display();
- Shell shell = new Shell(display);
- shell.setLayout(new FillLayout());
- ControlExample instance = new ControlExample(shell);
- shell.setText(getResourceString("window.title"));
- setShellSize(display, shell);
- shell.open();
- while (! shell.isDisposed()) {
- if (! display.readAndDispatch()) display.sleep();
- }
- instance.dispose();
- }
-
- /**
- * Grabs input focus.
- */
- public void setFocus() {
- tabFolder.setFocus();
- }
-
- /**
- * Sets the size of the shell to it's "packed" size,
- * unless that makes it bigger than the display,
- * in which case set it to 9/10 of display size.
- */
- static void setShellSize (Display display, Shell shell) {
- Rectangle bounds = display.getBounds();
- Point size = shell.computeSize (SWT.DEFAULT, SWT.DEFAULT);
- if (size.x > bounds.width) size.x = bounds.width * 9 / 10;
- if (size.y > bounds.height) size.y = bounds.height * 9 / 10;
- shell.setSize (size);
- }
-}
-
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/CoolBarTab.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/CoolBarTab.java
deleted file mode 100644
index 32afa14f04..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/CoolBarTab.java
+++ /dev/null
@@ -1,449 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.controlexample;
-
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.events.*;
-
-class CoolBarTab extends Tab {
- Button dropDownButton, lockedButton, flatButton;
-
- /* Example widgets and group that contains them */
- CoolBar coolBar;
- CoolItem pushItem, dropDownItem, radioItem, checkItem;
- Group coolBarGroup;
-
- Point[] sizes;
- int[] wrapIndices;
- int[] order;
-
- /**
- * Creates the Tab within a given instance of ControlExample.
- */
- CoolBarTab(ControlExample instance) {
- super(instance);
- }
-
- /**
- * Creates the "Other" group.
- */
- void createOtherGroup () {
- super.createOtherGroup ();
-
- /* Create display controls specific to this example */
- lockedButton = new Button (otherGroup, SWT.CHECK);
- lockedButton.setText (ControlExample.getResourceString("Locked"));
-
- /* Add the listeners */
- lockedButton.addSelectionListener (new SelectionAdapter () {
- public void widgetSelected (SelectionEvent event) {
- setWidgetLocked ();
- }
- });
- }
-
- /**
- * Creates the "Example" group.
- */
- void createExampleGroup () {
- super.createExampleGroup ();
- coolBarGroup = new Group (exampleGroup, SWT.NONE);
- coolBarGroup.setLayout (new GridLayout ());
- coolBarGroup.setLayoutData (new GridData (GridData.GRAB_HORIZONTAL | GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL));
- coolBarGroup.setText ("CoolBar");
- }
-
- /**
- * Creates the "Example" widgets.
- */
- void createExampleWidgets () {
- int style = getDefaultStyle(), itemStyle = 0;
-
- /* Compute the widget style */
- int toolBarStyle = SWT.FLAT;
- if (borderButton.getSelection()) style |= SWT.BORDER;
- if (flatButton.getSelection()) style |= SWT.FLAT;
- if (dropDownButton.getSelection()) itemStyle |= SWT.DROP_DOWN;
-
- /*
- * Create the example widgets.
- */
- coolBar = new CoolBar (coolBarGroup, style);
-
- /* create the push button toolbar */
- ToolBar toolBar = new ToolBar (coolBar, toolBarStyle);
- ToolItem item = new ToolItem (toolBar, SWT.PUSH);
- item.setImage (instance.images[ControlExample.ciClosedFolder]);
- item.setToolTipText ("SWT.PUSH");
- item = new ToolItem (toolBar, SWT.PUSH);
- item.setImage (instance.images[ControlExample.ciOpenFolder]);
- item.setToolTipText ("SWT.PUSH");
- item = new ToolItem (toolBar, SWT.PUSH);
- item.setImage (instance.images[ControlExample.ciTarget]);
- item.setToolTipText ("SWT.PUSH");
- item = new ToolItem (toolBar, SWT.SEPARATOR);
- item = new ToolItem (toolBar, SWT.PUSH);
- item.setImage (instance.images[ControlExample.ciClosedFolder]);
- item.setToolTipText ("SWT.PUSH");
- item = new ToolItem (toolBar, SWT.PUSH);
- item.setImage (instance.images[ControlExample.ciOpenFolder]);
- item.setToolTipText ("SWT.PUSH");
- pushItem = new CoolItem (coolBar, itemStyle);
- pushItem.setControl (toolBar);
- Point pushSize = toolBar.computeSize(SWT.DEFAULT, SWT.DEFAULT);
- pushSize = pushItem.computeSize(pushSize.x, pushSize.y);
- pushItem.setSize(pushSize);
- pushItem.setMinimumSize(item.getWidth(), pushSize.y);
- pushItem.addSelectionListener (new CoolItemSelectionListener());
-
- /* create the dropdown toolbar */
- toolBar = new ToolBar (coolBar, toolBarStyle);
- item = new ToolItem (toolBar, SWT.DROP_DOWN);
- item.setImage (instance.images[ControlExample.ciOpenFolder]);
- item.setToolTipText ("SWT.DROP_DOWN");
- item.addSelectionListener (new DropDownSelectionListener());
- item = new ToolItem (toolBar, SWT.DROP_DOWN);
- item.setImage (instance.images[ControlExample.ciClosedFolder]);
- item.setToolTipText ("SWT.DROP_DOWN");
- item.addSelectionListener (new DropDownSelectionListener());
- dropDownItem = new CoolItem (coolBar, itemStyle);
- dropDownItem.setControl (toolBar);
- Point dropSize = toolBar.computeSize(SWT.DEFAULT, SWT.DEFAULT);
- dropSize = dropDownItem.computeSize(dropSize.x, dropSize.y);
- dropDownItem.setSize(dropSize);
- dropDownItem.setMinimumSize(item.getWidth(), dropSize.y);
- dropDownItem.addSelectionListener (new CoolItemSelectionListener());
-
- /* create the radio button toolbar */
- toolBar = new ToolBar (coolBar, toolBarStyle);
- item = new ToolItem (toolBar, SWT.RADIO);
- item.setImage (instance.images[ControlExample.ciClosedFolder]);
- item.setToolTipText ("SWT.RADIO");
- item = new ToolItem (toolBar, SWT.RADIO);
- item.setImage (instance.images[ControlExample.ciClosedFolder]);
- item.setToolTipText ("SWT.RADIO");
- item = new ToolItem (toolBar, SWT.RADIO);
- item.setImage (instance.images[ControlExample.ciClosedFolder]);
- item.setToolTipText ("SWT.RADIO");
- radioItem = new CoolItem (coolBar, itemStyle);
- radioItem.setControl (toolBar);
- Point radioSize = toolBar.computeSize(SWT.DEFAULT, SWT.DEFAULT);
- radioSize = radioItem.computeSize(radioSize.x, radioSize.y);
- radioItem.setSize(radioSize);
- radioItem.setMinimumSize(item.getWidth(), radioSize.y);
- radioItem.addSelectionListener (new CoolItemSelectionListener());
-
- /* create the check button toolbar */
- toolBar = new ToolBar (coolBar, toolBarStyle);
- item = new ToolItem (toolBar, SWT.CHECK);
- item.setImage (instance.images[ControlExample.ciClosedFolder]);
- item.setToolTipText ("SWT.CHECK");
- item = new ToolItem (toolBar, SWT.CHECK);
- item.setImage (instance.images[ControlExample.ciTarget]);
- item.setToolTipText ("SWT.CHECK");
- item = new ToolItem (toolBar, SWT.CHECK);
- item.setImage (instance.images[ControlExample.ciOpenFolder]);
- item.setToolTipText ("SWT.CHECK");
- item = new ToolItem (toolBar, SWT.CHECK);
- item.setImage (instance.images[ControlExample.ciTarget]);
- item.setToolTipText ("SWT.CHECK");
- checkItem = new CoolItem (coolBar, itemStyle);
- checkItem.setControl (toolBar);
- Point checkSize = toolBar.computeSize(SWT.DEFAULT, SWT.DEFAULT);
- checkSize = checkItem.computeSize(checkSize.x, checkSize.y);
- checkItem.setSize(checkSize);
- checkItem.setMinimumSize(item.getWidth(), checkSize.y);
- checkItem.addSelectionListener (new CoolItemSelectionListener());
-
- /* if we have saved state, restore it */
- if (order != null) {
- coolBar.setItemLayout(order, wrapIndices, sizes);
- /*
- * special case: because setItemLayout will restore the items
- * to the sizes the user left them at, the preferred size may not
- * be the same as the actual size. Thus we must explicitly set
- * the preferred sizes.
- */
- pushItem.setPreferredSize(pushSize);
- dropDownItem.setPreferredSize(dropSize);
- radioItem.setPreferredSize(radioSize);
- checkItem.setPreferredSize(checkSize);
- }
- else {
- coolBar.setWrapIndices(new int[] {1, 3});
- }
-
- /* add a listener to resize the group box to match the coolbar */
- coolBar.addListener(SWT.Resize, new Listener() {
- public void handleEvent(Event event) {
- exampleGroup.layout();
- }
- });
- }
-
- /**
- * Creates the "Style" group.
- */
- void createStyleGroup() {
- super.createStyleGroup();
-
- /* Create the extra widget */
- borderButton = new Button (styleGroup, SWT.CHECK);
- borderButton.setText ("SWT.BORDER");
- flatButton = new Button (styleGroup, SWT.CHECK);
- flatButton.setText ("SWT.FLAT");
- Group itemGroup = new Group(styleGroup, SWT.NONE);
- itemGroup.setLayout (new GridLayout ());
- itemGroup.setLayoutData (new GridData (GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL));
- itemGroup.setText(ControlExample.getResourceString("Item_Styles"));
- dropDownButton = new Button (itemGroup, SWT.CHECK);
- dropDownButton.setText ("SWT.DROP_DOWN");
- dropDownButton.addSelectionListener (new SelectionAdapter () {
- public void widgetSelected (SelectionEvent event) {
- recreateExampleWidgets ();
- }
- });
- }
-
- /**
- * Disposes the "Example" widgets.
- */
- void disposeExampleWidgets () {
- /* store the state of the toolbar if applicable */
- if (coolBar != null) {
- sizes = coolBar.getItemSizes();
- wrapIndices = coolBar.getWrapIndices();
- order = coolBar.getItemOrder();
- }
- super.disposeExampleWidgets();
- }
-
- /**
- * Gets the "Example" widget children's items, if any.
- *
- * @return an array containing the example widget children's items
- */
- Item [] getExampleWidgetItems () {
- return coolBar.getItems();
- }
-
- /**
- * Gets the "Example" widget children.
- */
- Control [] getExampleWidgets () {
- return new Control [] {coolBar};
- }
-
- /**
- * Gets the text for the tab folder item.
- */
- String getTabText () {
- return "CoolBar";
- }
-
- /**
- * Sets the state of the "Example" widgets.
- */
- void setExampleWidgetState () {
- super.setExampleWidgetState ();
- borderButton.setSelection ((coolBar.getStyle () & SWT.BORDER) != 0);
- flatButton.setSelection ((coolBar.getStyle () & SWT.FLAT) != 0);
- dropDownButton.setSelection ((coolBar.getItem(0).getStyle () & SWT.DROP_DOWN) != 0);
- setWidgetLocked ();
- }
-
- /**
- * Sets the header visible state of the "Example" widgets.
- */
- void setWidgetLocked () {
- coolBar.setLocked (lockedButton.getSelection ());
- }
-
- /**
- * Listens to widgetSelected() events on SWT.DROP_DOWN type ToolItems
- * and opens/closes a menu when appropriate.
- */
- class DropDownSelectionListener extends SelectionAdapter {
- private Menu menu = null;
- private boolean visible = false;
-
- public void widgetSelected(SelectionEvent event) {
- // Create the menu if it has not already been created
- if (menu == null) {
- // Lazy create the menu.
- Shell shell = tabFolderPage.getShell();
- menu = new Menu(shell);
- menu.addMenuListener(new MenuAdapter() {
- public void menuHidden(MenuEvent e) {
- visible = false;
- }
- });
- for (int i = 0; i < 9; ++i) {
- final String text = ControlExample.getResourceString("DropDownData_" + i);
- if (text.length() != 0) {
- MenuItem menuItem = new MenuItem(menu, SWT.NONE);
- menuItem.setText(text);
- /*
- * Add a menu selection listener so that the menu is hidden
- * when the user selects an item from the drop down menu.
- */
- menuItem.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- setMenuVisible(false);
- }
- });
- } else {
- new MenuItem(menu, SWT.SEPARATOR);
- }
- }
- }
-
- /**
- * A selection event will be fired when a drop down tool
- * item is selected in the main area and in the drop
- * down arrow. Examine the event detail to determine
- * where the widget was selected.
- */
- if (event.detail == SWT.ARROW) {
- /*
- * The drop down arrow was selected.
- */
- if (visible) {
- // Hide the menu to give the Arrow the appearance of being a toggle button.
- setMenuVisible(false);
- } else {
- // Position the menu below and vertically aligned with the the drop down tool button.
- final ToolItem toolItem = (ToolItem) event.widget;
- final ToolBar toolBar = toolItem.getParent();
-
- Rectangle toolItemBounds = toolItem.getBounds();
- Point point = toolBar.toDisplay(new Point(toolItemBounds.x, toolItemBounds.y));
- menu.setLocation(point.x, point.y + toolItemBounds.height);
- setMenuVisible(true);
- }
- } else {
- /*
- * Main area of drop down tool item selected.
- * An application would invoke the code to perform the action for the tool item.
- */
- }
- }
- private void setMenuVisible(boolean visible) {
- menu.setVisible(visible);
- this.visible = visible;
- }
- }
-
- /**
- * Listens to widgetSelected() events on SWT.DROP_DOWN type CoolItems
- * and opens/closes a menu when appropriate.
- */
- class CoolItemSelectionListener extends SelectionAdapter {
- private Menu menu = null;
-
- public void widgetSelected(SelectionEvent event) {
- /**
- * A selection event will be fired when the cool item
- * is selected by its gripper or if the drop down arrow
- * (or 'chevron') is selected. Examine the event detail
- * to determine where the widget was selected.
- */
- if (event.detail == SWT.ARROW) {
- /* If the popup menu is already up (i.e. user pressed arrow twice),
- * then dispose it.
- */
- if (menu != null) {
- menu.dispose();
- menu = null;
- return;
- }
-
- /* Get the cool item and convert its bounds to display coordinates. */
- CoolItem coolItem = (CoolItem) event.widget;
- Rectangle itemBounds = coolItem.getBounds ();
- itemBounds.width = event.x - itemBounds.x;
- Point pt = coolBar.toDisplay(new Point (itemBounds.x, itemBounds.y));
- itemBounds.x = pt.x;
- itemBounds.y = pt.y;
-
- /* Get the toolbar from the cool item. */
- ToolBar toolBar = (ToolBar) coolItem.getControl ();
- ToolItem[] tools = toolBar.getItems ();
- int toolCount = tools.length;
-
- /* Convert the bounds of each tool item to display coordinates,
- * and determine which ones are past the bounds of the cool item.
- */
- int i = 0;
- while (i < toolCount) {
- Rectangle toolBounds = tools[i].getBounds ();
- pt = toolBar.toDisplay(new Point(toolBounds.x, toolBounds.y));
- toolBounds.x = pt.x;
- toolBounds.y = pt.y;
- Rectangle intersection = itemBounds.intersection (toolBounds);
- if (!intersection.equals (toolBounds)) break;
- i++;
- }
-
- /* Create a pop-up menu with items for each of the hidden buttons. */
- menu = new Menu (coolBar);
- for (int j = i; j < toolCount; j++) {
- ToolItem tool = tools[j];
- Image image = tool.getImage();
- if (image == null) {
- new MenuItem (menu, SWT.SEPARATOR);
- } else {
- if ((tool.getStyle() & SWT.DROP_DOWN) != 0) {
- MenuItem menuItem = new MenuItem (menu, SWT.CASCADE);
- menuItem.setImage(image);
- Menu m = new Menu(menu);
- menuItem.setMenu(m);
- for (int k = 0; k < 9; ++k) {
- String text = ControlExample.getResourceString("DropDownData_" + k);
- if (text.length() != 0) {
- MenuItem mi = new MenuItem(m, SWT.NONE);
- mi.setText(text);
- /* Application code to perform the action for the submenu item would go here. */
- } else {
- new MenuItem(m, SWT.SEPARATOR);
- }
- }
- } else {
- MenuItem menuItem = new MenuItem (menu, SWT.NONE);
- menuItem.setImage(image);
- }
- /* Application code to perform the action for the menu item would go here. */
-
- }
- }
-
- /* Display the pop-up menu at the lower left corner of the arrow button.
- * Dispose the menu when the user is done with it.
- */
- pt = coolBar.toDisplay(new Point(event.x, event.y));
- menu.setLocation (pt.x, pt.y);
- menu.setVisible (true);
- Display display = coolBar.getDisplay ();
- while (menu != null && !menu.isDisposed() && menu.isVisible ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- if (menu != null) {
- menu.dispose ();
- menu = null;
- }
- }
- }
- }
-}
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/CustomControlExample.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/CustomControlExample.java
deleted file mode 100644
index ecb047eb97..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/CustomControlExample.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.controlexample;
-
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-
-
-public class CustomControlExample extends ControlExample {
-
- /**
- * Creates an instance of a CustomControlExample embedded
- * inside the supplied parent Composite.
- *
- * @param parent the container of the example
- */
- public CustomControlExample(Composite parent) {
- super (parent);
- }
-
- /**
- * Answers the set of example Tabs
- */
- Tab[] createTabs() {
- return new Tab [] {
- new CComboTab (this),
- new CLabelTab (this),
- new CTabFolderTab (this),
- new SashFormTab (this),
- new StyledTextTab (this),
- new TableTreeTab (this),
- };
- }
-
- /**
- * Invokes as a standalone program.
- */
- public static void main(String[] args) {
- Display display = new Display();
- Shell shell = new Shell(display);
- shell.setLayout(new FillLayout());
- CustomControlExample instance = new CustomControlExample(shell);
- shell.setText(getResourceString("custom.window.title"));
- setShellSize(display, shell);
- shell.open();
- while (! shell.isDisposed()) {
- if (! display.readAndDispatch()) display.sleep();
- }
- instance.dispose();
- }
-}
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/DialogTab.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/DialogTab.java
deleted file mode 100755
index b2d2621dc2..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/DialogTab.java
+++ /dev/null
@@ -1,474 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.controlexample;
-
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.printing.*;
-import org.eclipse.swt.events.*;
-
-class DialogTab extends Tab {
- /* Example widgets and groups that contain them */
- Group dialogStyleGroup, resultGroup;
- Text textWidget;
-
- /* Style widgets added to the "Style" group */
- Combo dialogCombo;
- Button okButton, cancelButton;
- Button yesButton, noButton;
- Button retryButton;
- Button abortButton, ignoreButton;
- Button iconErrorButton, iconInformationButton, iconQuestionButton;
- Button iconWarningButton, iconWorkingButton;
- Button modelessButton, primaryModalButton, applicationModalButton, systemModalButton;
- Button saveButton, openButton, multiButton;
-
- static String [] FilterExtensions = {"*.txt", "*.bat", "*.doc"};
- static String [] FilterNames = {ControlExample.getResourceString("FilterName_0"),
- ControlExample.getResourceString("FilterName_1"),
- ControlExample.getResourceString("FilterName_2")};
-
- /**
- * Creates the Tab within a given instance of ControlExample.
- */
- DialogTab(ControlExample instance) {
- super(instance);
- }
-
- /**
- * Handle a button style selection event.
- *
- * @param event the selection event
- */
- void buttonStyleSelected(SelectionEvent event) {
- /*
- * Only certain combinations of button styles are
- * supported for various dialogs. Make sure the
- * control widget reflects only valid combinations.
- */
- okButton.setEnabled (
- !(yesButton.getSelection () || noButton.getSelection () ||
- retryButton.getSelection () || abortButton.getSelection () ||
- ignoreButton.getSelection ()));
- cancelButton.setEnabled (
- !(abortButton.getSelection () || ignoreButton.getSelection () ||
- (yesButton.getSelection () != noButton.getSelection ())));
- yesButton.setEnabled (
- !(okButton.getSelection () || retryButton.getSelection () ||
- abortButton.getSelection () || ignoreButton.getSelection () ||
- (cancelButton.getSelection () && !yesButton.getSelection () && !noButton.getSelection ())));
- noButton.setEnabled (
- !(okButton.getSelection () || retryButton.getSelection () ||
- abortButton.getSelection () || ignoreButton.getSelection () ||
- (cancelButton.getSelection () && !yesButton.getSelection () && !noButton.getSelection ())));
- retryButton.setEnabled (
- !(okButton.getSelection() || yesButton.getSelection() || noButton.getSelection ()));
- abortButton.setEnabled (
- !(okButton.getSelection () || cancelButton.getSelection () ||
- yesButton.getSelection () || noButton.getSelection ()));
- ignoreButton.setEnabled (
- !(okButton.getSelection () || cancelButton.getSelection () |
- yesButton.getSelection () || noButton.getSelection ()));
- }
-
- /**
- * Handle the create button selection event.
- *
- * @param event org.eclipse.swt.events.SelectionEvent
- */
- void createButtonSelected(SelectionEvent event) {
-
- /* Compute the appropriate dialog style */
- int style = getDefaultStyle();
- if (okButton.getEnabled () && okButton.getSelection ()) style |= SWT.OK;
- if (cancelButton.getEnabled () && cancelButton.getSelection ()) style |= SWT.CANCEL;
- if (yesButton.getEnabled () && yesButton.getSelection ()) style |= SWT.YES;
- if (noButton.getEnabled () && noButton.getSelection ()) style |= SWT.NO;
- if (retryButton.getEnabled () && retryButton.getSelection ()) style |= SWT.RETRY;
- if (abortButton.getEnabled () && abortButton.getSelection ()) style |= SWT.ABORT;
- if (ignoreButton.getEnabled () && ignoreButton.getSelection ()) style |= SWT.IGNORE;
- if (iconErrorButton.getEnabled () && iconErrorButton.getSelection ()) style |= SWT.ICON_ERROR;
- if (iconInformationButton.getEnabled () && iconInformationButton.getSelection ()) style |= SWT.ICON_INFORMATION;
- if (iconQuestionButton.getEnabled () && iconQuestionButton.getSelection ()) style |= SWT.ICON_QUESTION;
- if (iconWarningButton.getEnabled () && iconWarningButton.getSelection ()) style |= SWT.ICON_WARNING;
- if (iconWorkingButton.getEnabled () && iconWorkingButton.getSelection ()) style |= SWT.ICON_WORKING;
- if (primaryModalButton.getEnabled () && primaryModalButton.getSelection ()) style |= SWT.PRIMARY_MODAL;
- if (applicationModalButton.getEnabled () && applicationModalButton.getSelection ()) style |= SWT.APPLICATION_MODAL;
- if (systemModalButton.getEnabled () && systemModalButton.getSelection ()) style |= SWT.SYSTEM_MODAL;
- if (saveButton.getEnabled () && saveButton.getSelection ()) style |= SWT.SAVE;
- if (openButton.getEnabled () && openButton.getSelection ()) style |= SWT.OPEN;
- if (multiButton.getEnabled () && multiButton.getSelection ()) style |= SWT.MULTI;
-
- /* Open the appropriate dialog type */
- String name = dialogCombo.getText ();
- Shell shell = tabFolderPage.getShell ();
-
- if (name.equals (ControlExample.getResourceString("ColorDialog"))) {
- ColorDialog dialog = new ColorDialog (shell ,style);
- dialog.setRGB (new RGB (100, 100, 100));
- dialog.setText (ControlExample.getResourceString("Title"));
- RGB result = dialog.open ();
- textWidget.append (ControlExample.getResourceString("ColorDialog") + Text.DELIMITER);
- textWidget.append (ControlExample.getResourceString("Result", new String [] {"" + result}) + Text.DELIMITER + Text.DELIMITER);
- return;
- }
-
- if (name.equals (ControlExample.getResourceString("DirectoryDialog"))) {
- DirectoryDialog dialog = new DirectoryDialog (shell, style);
- dialog.setMessage (ControlExample.getResourceString("Example_string"));
- dialog.setText (ControlExample.getResourceString("Title"));
- String result = dialog.open ();
- textWidget.append (ControlExample.getResourceString("DirectoryDialog") + Text.DELIMITER);
- textWidget.append (ControlExample.getResourceString("Result", new String [] {"" + result}) + Text.DELIMITER + Text.DELIMITER);
- return;
- }
-
- if (name.equals (ControlExample.getResourceString("FileDialog"))) {
- FileDialog dialog = new FileDialog (shell, style);
- dialog.setFileName (ControlExample.getResourceString("readme_txt"));
- dialog.setFilterNames (FilterNames);
- dialog.setFilterExtensions (FilterExtensions);
- dialog.setText (ControlExample.getResourceString("Title"));
- String result = dialog.open();
- textWidget.append (ControlExample.getResourceString("FileDialog") + Text.DELIMITER);
- textWidget.append (ControlExample.getResourceString("Result", new String [] {"" + result}) + Text.DELIMITER + Text.DELIMITER);
- return;
- }
-
- if (name.equals (ControlExample.getResourceString("FontDialog"))) {
- FontDialog dialog = new FontDialog (shell, style);
- dialog.setText (ControlExample.getResourceString("Title"));
- FontData result = dialog.open ();
- textWidget.append (ControlExample.getResourceString("FontDialog") + Text.DELIMITER);
- textWidget.append (ControlExample.getResourceString("Result", new String [] {"" + result}) + Text.DELIMITER + Text.DELIMITER);
- return;
- }
-
- if (name.equals (ControlExample.getResourceString("PrintDialog"))) {
- PrintDialog dialog = new PrintDialog (shell, style);
- dialog.setText(ControlExample.getResourceString("Title"));
- PrinterData result = dialog.open ();
- textWidget.append (ControlExample.getResourceString("PrintDialog") + Text.DELIMITER);
- textWidget.append (ControlExample.getResourceString("Result", new String [] {"" + result}) + Text.DELIMITER + Text.DELIMITER);
- return;
- }
-
- if (name.equals(ControlExample.getResourceString("MessageBox"))) {
- MessageBox dialog = new MessageBox (shell, style);
- dialog.setMessage (ControlExample.getResourceString("Example_string"));
- dialog.setText (ControlExample.getResourceString("Title"));
- int result = dialog.open ();
- textWidget.append (ControlExample.getResourceString("MessageBox") + Text.DELIMITER);
- /*
- * The resulting integer depends on the original
- * dialog style. Decode the result and display it.
- */
- switch (result) {
- case SWT.OK:
- textWidget.append (ControlExample.getResourceString("Result", new String [] {"SWT.OK"}));
- break;
- case SWT.YES:
- textWidget.append (ControlExample.getResourceString("Result", new String [] {"SWT.YES"}));
- break;
- case SWT.NO:
- textWidget.append (ControlExample.getResourceString("Result", new String [] {"SWT.NO"}));
- break;
- case SWT.CANCEL:
- textWidget.append (ControlExample.getResourceString("Result", new String [] {"SWT.CANCEL"}));
- break;
- case SWT.ABORT:
- textWidget.append (ControlExample.getResourceString("Result", new String [] {"SWT.ABORT"}));
- break;
- case SWT.RETRY:
- textWidget.append (ControlExample.getResourceString("Result", new String [] {"SWT.RETRY"}));
- break;
- case SWT.IGNORE:
- textWidget.append (ControlExample.getResourceString("Result", new String [] {"SWT.IGNORE"}));
- break;
- default:
- textWidget.append(ControlExample.getResourceString("Result", new String [] {"" + result}));
- break;
- }
- textWidget.append (Text.DELIMITER + Text.DELIMITER);
- }
- }
-
- /**
- * Creates the "Control" group.
- */
- void createControlGroup () {
- /*
- * Create the "Control" group. This is the group on the
- * right half of each example tab. It consists of the
- * style group, the display group and the size group.
- */
- controlGroup = new Group (tabFolderPage, SWT.NONE);
- GridLayout gridLayout= new GridLayout ();
- controlGroup.setLayout(gridLayout);
- gridLayout.numColumns = 2;
- gridLayout.makeColumnsEqualWidth = true;
- controlGroup.setLayoutData (new GridData (GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL));
- controlGroup.setText (ControlExample.getResourceString("Parameters"));
-
- /*
- * Create a group to hold the dialog style combo box and
- * create dialog button.
- */
- dialogStyleGroup = new Group (controlGroup, SWT.NONE);
- dialogStyleGroup.setLayout (new GridLayout ());
- GridData gridData = new GridData (GridData.HORIZONTAL_ALIGN_CENTER);
- gridData.horizontalSpan = 2;
- dialogStyleGroup.setLayoutData (gridData);
- dialogStyleGroup.setText (ControlExample.getResourceString("Dialog_Type"));
- }
-
- /**
- * Creates the "Control" widget children.
- */
- void createControlWidgets () {
-
- /* Create the combo */
- String [] strings = {
- ControlExample.getResourceString("ColorDialog"),
- ControlExample.getResourceString("DirectoryDialog"),
- ControlExample.getResourceString("FileDialog"),
- ControlExample.getResourceString("FontDialog"),
- ControlExample.getResourceString("PrintDialog"),
- ControlExample.getResourceString("MessageBox"),
- };
- dialogCombo = new Combo (dialogStyleGroup, SWT.READ_ONLY);
- dialogCombo.setItems (strings);
- dialogCombo.setText (strings [0]);
-
- /* Create the create dialog button */
- Button createButton = new Button(dialogStyleGroup, SWT.NONE);
- createButton.setText (ControlExample.getResourceString("Create_Dialog"));
- createButton.setLayoutData (new GridData(GridData.HORIZONTAL_ALIGN_CENTER));
-
- /* Create a group for the various dialog button style controls */
- Group buttonStyleGroup = new Group (controlGroup, SWT.NONE);
- buttonStyleGroup.setLayout (new GridLayout ());
- buttonStyleGroup.setLayoutData (new GridData (GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL));
- buttonStyleGroup.setText (ControlExample.getResourceString("Button_Styles"));
-
- /* Create the button style buttons */
- okButton = new Button (buttonStyleGroup, SWT.CHECK);
- okButton.setText ("SWT.OK");
- cancelButton = new Button (buttonStyleGroup, SWT.CHECK);
- cancelButton.setText ("SWT.CANCEL");
- yesButton = new Button (buttonStyleGroup, SWT.CHECK);
- yesButton.setText ("SWT.YES");
- noButton = new Button (buttonStyleGroup, SWT.CHECK);
- noButton.setText ("SWT.NO");
- retryButton = new Button (buttonStyleGroup, SWT.CHECK);
- retryButton.setText ("SWT.RETRY");
- abortButton = new Button (buttonStyleGroup, SWT.CHECK);
- abortButton.setText ("SWT.ABORT");
- ignoreButton = new Button (buttonStyleGroup, SWT.CHECK);
- ignoreButton.setText ("SWT.IGNORE");
-
- /* Create a group for the icon style controls */
- Group iconStyleGroup = new Group (controlGroup, SWT.NONE);
- iconStyleGroup.setLayout (new GridLayout ());
- iconStyleGroup.setLayoutData (new GridData (GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL));
- iconStyleGroup.setText (ControlExample.getResourceString("Icon_Styles"));
-
- /* Create the icon style buttons */
- iconErrorButton = new Button (iconStyleGroup, SWT.RADIO);
- iconErrorButton.setText ("SWT.ICON_ERROR");
- iconInformationButton = new Button (iconStyleGroup, SWT.RADIO);
- iconInformationButton.setText ("SWT.ICON_INFORMATION");
- iconQuestionButton = new Button (iconStyleGroup, SWT.RADIO);
- iconQuestionButton.setText ("SWT.ICON_QUESTION");
- iconWarningButton = new Button (iconStyleGroup, SWT.RADIO);
- iconWarningButton.setText ("SWT.ICON_WARNING");
- iconWorkingButton = new Button (iconStyleGroup, SWT.RADIO);
- iconWorkingButton.setText ("SWT.ICON_WORKING");
-
- /* Create a group for the modal style controls */
- Group modalStyleGroup = new Group (controlGroup, SWT.NONE);
- modalStyleGroup.setLayout (new GridLayout ());
- modalStyleGroup.setLayoutData (new GridData (GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL));
- modalStyleGroup.setText (ControlExample.getResourceString("Modal_Styles"));
-
- /* Create the modal style buttons */
- modelessButton = new Button (modalStyleGroup, SWT.RADIO);
- modelessButton.setText ("SWT.MODELESS");
- primaryModalButton = new Button (modalStyleGroup, SWT.RADIO);
- primaryModalButton.setText ("SWT.PRIMARY_MODAL");
- applicationModalButton = new Button (modalStyleGroup, SWT.RADIO);
- applicationModalButton.setText ("SWT.APPLICATION_MODAL");
- systemModalButton = new Button (modalStyleGroup, SWT.RADIO);
- systemModalButton.setText ("SWT.SYSTEM_MODAL");
-
- /* Create a group for the file dialog style controls */
- Group fileDialogStyleGroup = new Group (controlGroup, SWT.NONE);
- fileDialogStyleGroup.setLayout (new GridLayout ());
- fileDialogStyleGroup.setLayoutData (new GridData (GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL));
- fileDialogStyleGroup.setText (ControlExample.getResourceString("File_Dialog_Styles"));
-
- /* Create the file dialog style buttons */
- openButton = new Button(fileDialogStyleGroup, SWT.RADIO);
- openButton.setText("SWT.OPEN");
- saveButton = new Button (fileDialogStyleGroup, SWT.RADIO);
- saveButton.setText ("SWT.SAVE");
- multiButton = new Button(fileDialogStyleGroup, SWT.CHECK);
- multiButton.setText("SWT.MULTI");
-
- /* Create the orientation group */
- if (RTL_SUPPORT_ENABLE) {
- createOrientationGroup();
- }
-
- /* Add the listeners */
- dialogCombo.addSelectionListener (new SelectionAdapter () {
- public void widgetSelected (SelectionEvent event) {
- dialogSelected (event);
- };
- });
- createButton.addSelectionListener (new SelectionAdapter () {
- public void widgetSelected (SelectionEvent event) {
- createButtonSelected (event);
- };
- });
- SelectionListener buttonStyleListener = new SelectionAdapter () {
- public void widgetSelected (SelectionEvent event) {
- buttonStyleSelected (event);
- };
- };
- okButton.addSelectionListener (buttonStyleListener);
- cancelButton.addSelectionListener (buttonStyleListener);
- yesButton.addSelectionListener (buttonStyleListener);
- noButton.addSelectionListener (buttonStyleListener);
- retryButton.addSelectionListener (buttonStyleListener);
- abortButton.addSelectionListener (buttonStyleListener);
- ignoreButton.addSelectionListener (buttonStyleListener);
-
- /* Set default values for style buttons */
- okButton.setEnabled (false);
- cancelButton.setEnabled (false);
- yesButton.setEnabled (false);
- noButton.setEnabled (false);
- retryButton.setEnabled (false);
- abortButton.setEnabled (false);
- ignoreButton.setEnabled (false);
- iconErrorButton.setEnabled (false);
- iconInformationButton.setEnabled (false);
- iconQuestionButton.setEnabled (false);
- iconWarningButton.setEnabled (false);
- iconWorkingButton.setEnabled (false);
- saveButton.setEnabled (false);
- openButton.setEnabled (false);
- openButton.setSelection (true);
- multiButton.setEnabled (false);
- iconInformationButton.setSelection (true);
- modelessButton.setSelection (true);
- }
-
- /**
- * Creates the "Example" group.
- */
- void createExampleGroup () {
- super.createExampleGroup ();
-
- /*
- * Create a group for the text widget to display
- * the results returned by the example dialogs.
- */
- resultGroup = new Group (exampleGroup, SWT.NONE);
- resultGroup.setLayout (new GridLayout ());
- resultGroup.setLayoutData (new GridData (GridData.FILL_BOTH));
- resultGroup.setText (ControlExample.getResourceString("Dialog_Result"));
- }
-
- /**
- * Creates the "Example" widgets.
- */
- void createExampleWidgets () {
- /*
- * Create a multi lined, scrolled text widget for output.
- */
- textWidget = new Text(resultGroup, SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
- GridData gridData = new GridData (GridData.FILL_BOTH);
- textWidget.setLayoutData (gridData);
- }
-
- /**
- * The platform dialogs do not have SWT listeners.
- */
- void createListenersGroup () {
- }
-
- /**
- * Handle a dialog type combo selection event.
- *
- * @param event the selection event
- */
- void dialogSelected (SelectionEvent event) {
-
- /* Enable/Disable the buttons */
- String name = dialogCombo.getText ();
- boolean isMessageBox = name.equals (ControlExample.getResourceString("MessageBox"));
- boolean isFileDialog = name.equals (ControlExample.getResourceString("FileDialog"));
- okButton.setEnabled (isMessageBox);
- cancelButton.setEnabled (isMessageBox);
- yesButton.setEnabled (isMessageBox);
- noButton.setEnabled (isMessageBox);
- retryButton.setEnabled (isMessageBox);
- abortButton.setEnabled (isMessageBox);
- ignoreButton.setEnabled (isMessageBox);
- iconErrorButton.setEnabled (isMessageBox);
- iconInformationButton.setEnabled (isMessageBox);
- iconQuestionButton.setEnabled (isMessageBox);
- iconWarningButton.setEnabled (isMessageBox);
- iconWorkingButton.setEnabled (isMessageBox);
- saveButton.setEnabled (isFileDialog);
- openButton.setEnabled (isFileDialog);
- multiButton.setEnabled (isFileDialog);
-
- /* Unselect the buttons */
- if (!isMessageBox) {
- okButton.setSelection (false);
- cancelButton.setSelection (false);
- yesButton.setSelection (false);
- noButton.setSelection (false);
- retryButton.setSelection (false);
- abortButton.setSelection (false);
- ignoreButton.setSelection (false);
- }
- }
-
- /**
- * Gets the "Example" widget children.
- */
- Control [] getExampleWidgets () {
- return new Control [0];
- }
-
- /**
- * Gets the text for the tab folder item.
- */
- String getTabText () {
- return "Dialog";
- }
-
- /**
- * Recreates the "Example" widgets.
- */
- void recreateExampleWidgets () {
- if (textWidget == null) {
- super.recreateExampleWidgets ();
- }
- }
-}
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/GroupTab.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/GroupTab.java
deleted file mode 100644
index 7d1b496528..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/GroupTab.java
+++ /dev/null
@@ -1,159 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.controlexample;
-
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-
-class GroupTab extends Tab {
- Button titleButton;
-
- /* Example widgets and groups that contain them */
- Group group1;
- Group groupGroup;
-
- /* Style widgets added to the "Style" group */
- Button shadowEtchedInButton, shadowEtchedOutButton, shadowInButton, shadowOutButton, shadowNoneButton;
-
- /**
- * Creates the Tab within a given instance of ControlExample.
- */
- GroupTab(ControlExample instance) {
- super(instance);
- }
-
- /**
- * Creates the "Other" group.
- */
- void createOtherGroup () {
- super.createOtherGroup ();
-
- /* Create display controls specific to this example */
- titleButton = new Button (otherGroup, SWT.CHECK);
- titleButton.setText (ControlExample.getResourceString("Title_Text"));
-
- /* Add the listeners */
- titleButton.addSelectionListener (new SelectionAdapter () {
- public void widgetSelected (SelectionEvent event) {
- setTitleText ();
- }
- });
- }
-
- /**
- * Creates the "Example" group.
- */
- void createExampleGroup () {
- super.createExampleGroup ();
-
- /* Create a group for the Group */
- groupGroup = new Group (exampleGroup, SWT.NONE);
- groupGroup.setLayout (new GridLayout ());
- groupGroup.setLayoutData (new GridData (GridData.GRAB_HORIZONTAL | GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL));
- groupGroup.setText ("Group");
- }
-
- /**
- * Creates the "Example" widgets.
- */
- void createExampleWidgets () {
-
- /* Compute the widget style */
- int style = getDefaultStyle();
- if (shadowEtchedInButton.getSelection ()) style |= SWT.SHADOW_ETCHED_IN;
- if (shadowEtchedOutButton.getSelection ()) style |= SWT.SHADOW_ETCHED_OUT;
- if (shadowInButton.getSelection ()) style |= SWT.SHADOW_IN;
- if (shadowOutButton.getSelection ()) style |= SWT.SHADOW_OUT;
- if (shadowNoneButton.getSelection ()) style |= SWT.SHADOW_NONE;
- if (borderButton.getSelection ()) style |= SWT.BORDER;
-
- /* Create the example widgets */
- group1 = new Group (groupGroup, style);
- }
-
- /**
- * Creates the "Style" group.
- */
- void createStyleGroup() {
- super.createStyleGroup ();
-
- /* Create the extra widgets */
- shadowEtchedInButton = new Button (styleGroup, SWT.RADIO);
- shadowEtchedInButton.setText ("SWT.SHADOW_ETCHED_IN");
- shadowEtchedInButton.setSelection(true);
- shadowEtchedOutButton = new Button (styleGroup, SWT.RADIO);
- shadowEtchedOutButton.setText ("SWT.SHADOW_ETCHED_OUT");
- shadowInButton = new Button (styleGroup, SWT.RADIO);
- shadowInButton.setText ("SWT.SHADOW_IN");
- shadowOutButton = new Button (styleGroup, SWT.RADIO);
- shadowOutButton.setText ("SWT.SHADOW_OUT");
- shadowNoneButton = new Button (styleGroup, SWT.RADIO);
- shadowNoneButton.setText ("SWT.SHADOW_NONE");
- borderButton = new Button (styleGroup, SWT.CHECK);
- borderButton.setText ("SWT.BORDER");
-
- /* Add the listeners */
- SelectionListener selectionListener = new SelectionAdapter () {
- public void widgetSelected(SelectionEvent event) {
- if (!((Button) event.widget).getSelection ()) return;
- recreateExampleWidgets ();
- };
- };
- shadowEtchedInButton.addSelectionListener (selectionListener);
- shadowEtchedOutButton.addSelectionListener (selectionListener);
- shadowInButton.addSelectionListener (selectionListener);
- shadowOutButton.addSelectionListener (selectionListener);
- shadowNoneButton.addSelectionListener (selectionListener);
- }
-
- /**
- * Gets the "Example" widget children.
- */
- Control [] getExampleWidgets () {
- return new Control [] {group1};
- }
-
- /**
- * Gets the text for the tab folder item.
- */
- String getTabText () {
- return "Group";
- }
-
- /**
- * Sets the title text of the "Example" widgets.
- */
- void setTitleText () {
- if (titleButton.getSelection ()) {
- group1.setText (ControlExample.getResourceString("Title_Text"));
- } else {
- group1.setText ("");
- }
- setExampleWidgetSize ();
- }
-
- /**
- * Sets the state of the "Example" widgets.
- */
- void setExampleWidgetState () {
- super.setExampleWidgetState ();
- shadowEtchedInButton.setSelection ((group1.getStyle () & SWT.SHADOW_ETCHED_IN) != 0);
- shadowEtchedOutButton.setSelection ((group1.getStyle () & SWT.SHADOW_ETCHED_OUT) != 0);
- shadowInButton.setSelection ((group1.getStyle () & SWT.SHADOW_IN) != 0);
- shadowOutButton.setSelection ((group1.getStyle () & SWT.SHADOW_OUT) != 0);
- shadowNoneButton.setSelection ((group1.getStyle () & SWT.SHADOW_NONE) != 0);
- borderButton.setSelection ((group1.getStyle () & SWT.BORDER) != 0);
- setTitleText ();
- }
-}
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/LabelTab.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/LabelTab.java
deleted file mode 100755
index 4d843446a6..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/LabelTab.java
+++ /dev/null
@@ -1,190 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.controlexample;
-
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.events.*;
-
-class LabelTab extends AlignableTab {
- /* Example widgets and groups that contain them */
- Label label1, label2, label3, label4, label5, label6;
- Group textLabelGroup, imageLabelGroup;
-
- /* Style widgets added to the "Style" group */
- Button wrapButton, separatorButton, horizontalButton, verticalButton, shadowInButton, shadowOutButton, shadowNoneButton;
-
- /**
- * Creates the Tab within a given instance of ControlExample.
- */
- LabelTab(ControlExample instance) {
- super(instance);
- }
-
- /**
- * Creates the "Example" group.
- */
- void createExampleGroup () {
- super.createExampleGroup ();
-
- /* Create a group for the text labels */
- textLabelGroup = new Group(exampleGroup, SWT.NONE);
- GridLayout gridLayout = new GridLayout ();
- textLabelGroup.setLayout (gridLayout);
- gridLayout.numColumns = 3;
- textLabelGroup.setLayoutData (new GridData (GridData.GRAB_HORIZONTAL | GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL));
- textLabelGroup.setText (ControlExample.getResourceString("Text_Labels"));
-
- /* Create a group for the image labels */
- imageLabelGroup = new Group (exampleGroup, SWT.SHADOW_NONE);
- gridLayout = new GridLayout ();
- imageLabelGroup.setLayout (gridLayout);
- gridLayout.numColumns = 3;
- imageLabelGroup.setLayoutData (new GridData (GridData.GRAB_HORIZONTAL | GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL));
- imageLabelGroup.setText (ControlExample.getResourceString("Image_Labels"));
- }
-
- /**
- * Creates the "Example" widgets.
- */
- void createExampleWidgets () {
-
- /* Compute the widget style */
- int style = getDefaultStyle();
- if (wrapButton.getSelection ()) style |= SWT.WRAP;
- if (separatorButton.getSelection ()) style |= SWT.SEPARATOR;
- if (horizontalButton.getSelection ()) style |= SWT.HORIZONTAL;
- if (verticalButton.getSelection ()) style |= SWT.VERTICAL;
- if (shadowInButton.getSelection ()) style |= SWT.SHADOW_IN;
- if (shadowOutButton.getSelection ()) style |= SWT.SHADOW_OUT;
- if (shadowNoneButton.getSelection ()) style |= SWT.SHADOW_NONE;
- if (borderButton.getSelection ()) style |= SWT.BORDER;
- if (leftButton.getSelection ()) style |= SWT.LEFT;
- if (centerButton.getSelection ()) style |= SWT.CENTER;
- if (rightButton.getSelection ()) style |= SWT.RIGHT;
-
- /* Create the example widgets */
- label1 = new Label (textLabelGroup, style);
- label1.setText(ControlExample.getResourceString("One"));
- label2 = new Label (textLabelGroup, style);
- label2.setText(ControlExample.getResourceString("Two"));
- label3 = new Label (textLabelGroup, style);
- if (wrapButton.getSelection ()) {
- label3.setText (ControlExample.getResourceString("Wrap_Text"));
- } else {
- label3.setText (ControlExample.getResourceString("Three"));
- }
- label4 = new Label (imageLabelGroup, style);
- label4.setImage (instance.images[ControlExample.ciClosedFolder]);
- label5 = new Label (imageLabelGroup, style);
- label5.setImage (instance.images[ControlExample.ciOpenFolder]);
- label6 = new Label(imageLabelGroup, style);
- label6.setImage (instance.images[ControlExample.ciTarget]);
- }
-
- /**
- * Creates the "Style" group.
- */
- void createStyleGroup() {
- super.createStyleGroup ();
-
- /* Create the extra widgets */
- wrapButton = new Button (styleGroup, SWT.CHECK);
- wrapButton.setText ("SWT.WRAP");
- separatorButton = new Button (styleGroup, SWT.CHECK);
- separatorButton.setText ("SWT.SEPARATOR");
- horizontalButton = new Button (styleGroup, SWT.RADIO);
- horizontalButton.setText ("SWT.HORIZONTAL");
- verticalButton = new Button (styleGroup, SWT.RADIO);
- verticalButton.setText ("SWT.VERTICAL");
- Group styleSubGroup = new Group (styleGroup, SWT.NONE);
- styleSubGroup.setLayout (new GridLayout ());
- shadowInButton = new Button (styleSubGroup, SWT.RADIO);
- shadowInButton.setText ("SWT.SHADOW_IN");
- shadowOutButton = new Button (styleSubGroup, SWT.RADIO);
- shadowOutButton.setText ("SWT.SHADOW_OUT");
- shadowNoneButton = new Button (styleSubGroup, SWT.RADIO);
- shadowNoneButton.setText ("SWT.SHADOW_NONE");
- borderButton = new Button(styleGroup, SWT.CHECK);
- borderButton.setText("SWT.BORDER");
-
- /* Add the listeners */
- SelectionListener selectionListener = new SelectionAdapter () {
- public void widgetSelected(SelectionEvent event) {
- if ((event.widget.getStyle() & SWT.RADIO) != 0) {
- if (!((Button) event.widget).getSelection ()) return;
- }
- recreateExampleWidgets ();
- };
- };
- shadowInButton.addSelectionListener (selectionListener);
- shadowOutButton.addSelectionListener (selectionListener);
- shadowNoneButton.addSelectionListener (selectionListener);
- }
-
- /**
- * Gets the "Example" widget children.
- */
- Control [] getExampleWidgets () {
- return new Control [] {label1, label2, label3, label4, label5, label6};
- }
-
- /**
- * Gets the text for the tab folder item.
- */
- String getTabText () {
- return "Label";
- }
-
- /**
- * Sets the alignment of the "Example" widgets.
- */
- void setExampleWidgetAlignment () {
- int alignment = 0;
- if (leftButton.getSelection ()) alignment = SWT.LEFT;
- if (centerButton.getSelection ()) alignment = SWT.CENTER;
- if (rightButton.getSelection ()) alignment = SWT.RIGHT;
- label1.setAlignment (alignment);
- label2.setAlignment (alignment);
- label3.setAlignment (alignment);
- label4.setAlignment (alignment);
- label5.setAlignment (alignment);
- label6.setAlignment (alignment);
- }
-
- /**
- * Sets the state of the "Example" widgets.
- */
- void setExampleWidgetState () {
- super.setExampleWidgetState ();
- boolean isSeparator = (label1.getStyle () & SWT.SEPARATOR) != 0;
- wrapButton.setSelection (!isSeparator && (label1.getStyle () & SWT.WRAP) != 0);
- leftButton.setSelection (!isSeparator && (label1.getStyle () & SWT.LEFT) != 0);
- centerButton.setSelection (!isSeparator && (label1.getStyle () & SWT.CENTER) != 0);
- rightButton.setSelection (!isSeparator && (label1.getStyle () & SWT.RIGHT) != 0);
- shadowInButton.setSelection (isSeparator && (label1.getStyle () & SWT.SHADOW_IN) != 0);
- shadowOutButton.setSelection (isSeparator && (label1.getStyle () & SWT.SHADOW_OUT) != 0);
- shadowNoneButton.setSelection (isSeparator && (label1.getStyle () & SWT.SHADOW_NONE) != 0);
- horizontalButton.setSelection (isSeparator && (label1.getStyle () & SWT.HORIZONTAL) != 0);
- verticalButton.setSelection (isSeparator && (label1.getStyle () & SWT.VERTICAL) != 0);
- wrapButton.setEnabled (!isSeparator);
- leftButton.setEnabled (!isSeparator);
- centerButton.setEnabled (!isSeparator);
- rightButton.setEnabled (!isSeparator);
- shadowInButton.setEnabled (isSeparator);
- shadowOutButton.setEnabled (isSeparator);
- shadowNoneButton.setEnabled (isSeparator);
- horizontalButton.setEnabled (isSeparator);
- verticalButton.setEnabled (isSeparator);
- }
-}
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/ListTab.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/ListTab.java
deleted file mode 100755
index 57af4681c8..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/ListTab.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.controlexample;
-
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.layout.*;
-
-class ListTab extends ScrollableTab {
-
- /* Example widgets and groups that contain them */
- List list1;
- Group listGroup;
-
- static String [] ListData1 = {ControlExample.getResourceString("ListData1_0"),
- ControlExample.getResourceString("ListData1_1"),
- ControlExample.getResourceString("ListData1_2"),
- ControlExample.getResourceString("ListData1_3"),
- ControlExample.getResourceString("ListData1_4"),
- ControlExample.getResourceString("ListData1_5"),
- ControlExample.getResourceString("ListData1_6"),
- ControlExample.getResourceString("ListData1_7"),
- ControlExample.getResourceString("ListData1_8")};
-
- /**
- * Creates the Tab within a given instance of ControlExample.
- */
- ListTab(ControlExample instance) {
- super(instance);
- }
-
- /**
- * Creates the "Example" group.
- */
- void createExampleGroup () {
- super.createExampleGroup ();
-
- /* Create a group for the list */
- listGroup = new Group (exampleGroup, SWT.NONE);
- listGroup.setLayout (new GridLayout ());
- listGroup.setLayoutData (new GridData (GridData.GRAB_HORIZONTAL | GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL));
- listGroup.setText ("List");
- }
-
- /**
- * Creates the "Example" widgets.
- */
- void createExampleWidgets () {
-
- /* Compute the widget style */
- int style = getDefaultStyle();
- if (singleButton.getSelection ()) style |= SWT.SINGLE;
- if (multiButton.getSelection ()) style |= SWT.MULTI;
- if (horizontalButton.getSelection ()) style |= SWT.H_SCROLL;
- if (verticalButton.getSelection ()) style |= SWT.V_SCROLL;
- if (borderButton.getSelection ()) style |= SWT.BORDER;
-
- /* Create the example widgets */
- list1 = new List (listGroup, style);
- list1.setItems (ListData1);
- }
-
- /**
- * Gets the "Example" widget children.
- */
- Control [] getExampleWidgets () {
- return new Control [] {list1};
- }
-
- /**
- * Gets the text for the tab folder item.
- */
- String getTabText () {
- return "List";
- }
-}
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/ProgressBarTab.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/ProgressBarTab.java
deleted file mode 100755
index 8e03f970e0..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/ProgressBarTab.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.controlexample;
-
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.layout.*;
-
-class ProgressBarTab extends RangeTab {
- /* Example widgets and groups that contain them */
- ProgressBar progressBar1;
- Group progressBarGroup;
-
- /* Style widgets added to the "Style" group */
- Button smoothButton;
- Button indeterminateButton;
-
- /**
- * Creates the Tab within a given instance of ControlExample.
- */
- ProgressBarTab(ControlExample instance) {
- super(instance);
- }
-
- /**
- * Creates the "Example" group.
- */
- void createExampleGroup() {
- super.createExampleGroup ();
-
- /* Create a group for the progress bar */
- progressBarGroup = new Group (exampleGroup, SWT.NONE);
- progressBarGroup.setLayout (new GridLayout ());
- progressBarGroup.setLayoutData (new GridData (GridData.GRAB_HORIZONTAL | GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL));
- progressBarGroup.setText ("ProgressBar");
- }
-
- /**
- * Creates the "Example" widgets.
- */
- void createExampleWidgets () {
-
- /* Compute the widget style */
- int style = getDefaultStyle();
- if (horizontalButton.getSelection ()) style |= SWT.HORIZONTAL;
- if (verticalButton.getSelection ()) style |= SWT.VERTICAL;
- if (smoothButton.getSelection ()) style |= SWT.SMOOTH;
- if (borderButton.getSelection ()) style |= SWT.BORDER;
- if (indeterminateButton.getSelection ()) style |= SWT.INDETERMINATE;
-
- /* Create the example widgets */
- progressBar1 = new ProgressBar (progressBarGroup, style);
- progressBar1.setMaximum (100);
- progressBar1.setSelection (50);
- }
-
- /**
- * Creates the "Style" group.
- */
- void createStyleGroup () {
- super.createStyleGroup ();
-
- /* Create the extra widgets */
- smoothButton = new Button (styleGroup, SWT.CHECK);
- smoothButton.setText ("SWT.SMOOTH");
- indeterminateButton = new Button (styleGroup, SWT.CHECK);
- indeterminateButton.setText ("SWT.INDETERMINATE");
- }
-
- /**
- * Gets the "Example" widget children.
- */
- Control [] getExampleWidgets () {
- return new Control [] {progressBar1};
- }
-
- /**
- * Gets the text for the tab folder item.
- */
- String getTabText () {
- return "ProgressBar";
- }
-
- /**
- * Sets the state of the "Example" widgets.
- */
- void setExampleWidgetState () {
- super.setExampleWidgetState ();
- if (indeterminateButton.getSelection ()) {
- selectionScale.setEnabled (false);
- minimumScale.setEnabled (false);
- maximumScale.setEnabled (false);
- } else {
- selectionScale.setEnabled (true);
- minimumScale.setEnabled (true);
- maximumScale.setEnabled (true);
- }
- maximumScale.setMaximum (progressBar1.getMaximum ());
- smoothButton.setSelection ((progressBar1.getStyle () & SWT.SMOOTH) != 0);
- indeterminateButton.setSelection ((progressBar1.getStyle () & SWT.INDETERMINATE) != 0);
- }
-
- /**
- * Sets the maximum of the "Example" widgets.
- */
- void setWidgetMaximum () {
- progressBar1.setMaximum (maximumScale.getSelection ());
- updateScales ();
- }
-
- /**
- * Sets the minimim of the "Example" widgets.
- */
- void setWidgetMinimum () {
- progressBar1.setMinimum (minimumScale.getSelection ());
- updateScales ();
- }
-
- /**
- * Sets the selection of the "Example" widgets.
- */
- void setWidgetSelection () {
- progressBar1.setSelection (selectionScale.getSelection ());
- updateScales ();
- }
-
- /**
- * Update the scale widgets to reflect the actual value set
- * on the "Example" widget.
- */
- void updateScales () {
- minimumScale.setSelection (progressBar1.getMinimum ());
- selectionScale.setSelection (progressBar1.getSelection ());
- maximumScale.setSelection (progressBar1.getMaximum ());
- }
-}
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/RangeTab.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/RangeTab.java
deleted file mode 100755
index 5662814d11..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/RangeTab.java
+++ /dev/null
@@ -1,183 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.controlexample;
-
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.events.*;
-
-abstract class RangeTab extends Tab {
- /* Style widgets added to the "Style" group */
- Button horizontalButton, verticalButton;
-
- /* Scale widgets added to the "Control" group */
- Scale minimumScale, selectionScale, maximumScale;
-
- /**
- * Creates the Tab within a given instance of ControlExample.
- */
- RangeTab(ControlExample instance) {
- super(instance);
- }
-
- /**
- * Creates the "Control" widget children.
- */
- void createControlWidgets () {
- /* Create controls specific to this example */
- createMinimumGroup ();
- createMaximumGroup ();
- createSelectionGroup ();
- }
-
- /**
- * Create a group of widgets to control the maximum
- * attribute of the example widget.
- */
- void createMaximumGroup() {
-
- /* Create the group */
- Group maximumGroup = new Group (controlGroup, SWT.NONE);
- maximumGroup.setLayout (new GridLayout ());
- maximumGroup.setText (ControlExample.getResourceString("Maximum"));
- maximumGroup.setLayoutData (new GridData (GridData.FILL_HORIZONTAL));
-
- /* Create a scale widget */
- maximumScale = new Scale (maximumGroup, SWT.NONE);
- maximumScale.setMaximum (100);
- maximumScale.setSelection (100);
- maximumScale.setPageIncrement (10);
- maximumScale.setIncrement (5);
-
- GridData data = new GridData (GridData.FILL_HORIZONTAL);
- data.widthHint = 100;
- maximumScale.setLayoutData (data);
-
- /* Add the listeners */
- maximumScale.addSelectionListener(new SelectionAdapter () {
- public void widgetSelected (SelectionEvent event) {
- setWidgetMaximum ();
- };
- });
- }
-
- /**
- * Create a group of widgets to control the minimum
- * attribute of the example widget.
- */
- void createMinimumGroup() {
-
- /* Create the group */
- Group minimumGroup = new Group (controlGroup, SWT.NONE);
- minimumGroup.setLayout (new GridLayout ());
- minimumGroup.setText (ControlExample.getResourceString("Minimum"));
- minimumGroup.setLayoutData (new GridData (GridData.FILL_HORIZONTAL));
-
- /* Create a scale widget */
- minimumScale = new Scale (minimumGroup, SWT.NONE);
- minimumScale.setMaximum (100);
- minimumScale.setPageIncrement (10);
- minimumScale.setIncrement (5);
-
- GridData data = new GridData (GridData.FILL_HORIZONTAL);
- data.widthHint = 100;
- minimumScale.setLayoutData (data);
-
- /* Add the listeners */
- minimumScale.addSelectionListener (new SelectionAdapter () {
- public void widgetSelected (SelectionEvent event) {
- setWidgetMinimum ();
- };
- });
-
- }
-
- /**
- * Create a group of widgets to control the selection
- * attribute of the example widget.
- */
- void createSelectionGroup() {
-
- /* Create the group */
- Group selectionGroup = new Group(controlGroup, SWT.NONE);
- selectionGroup.setLayout(new GridLayout());
- GridData gridData = new GridData(GridData.FILL_HORIZONTAL);
- selectionGroup.setLayoutData(gridData);
- selectionGroup.setText(ControlExample.getResourceString("Selection"));
-
- /* Create a scale widget */
- selectionScale = new Scale (selectionGroup, SWT.NONE);
- selectionScale.setMaximum (100);
- selectionScale.setSelection (50);
- selectionScale.setPageIncrement (10);
- selectionScale.setIncrement (5);
-
- GridData data = new GridData (GridData.FILL_HORIZONTAL);
- data.widthHint = 100;
- selectionScale.setLayoutData (data);
-
- /* Add the listeners */
- selectionScale.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent event) {
- setWidgetSelection ();
- };
- });
-
- }
-
- /**
- * Creates the "Style" group.
- */
- void createStyleGroup () {
- super.createStyleGroup ();
-
- /* Create the extra widgets */
- horizontalButton = new Button (styleGroup, SWT.RADIO);
- horizontalButton.setText ("SWT.HORIZONTAL");
- verticalButton = new Button (styleGroup, SWT.RADIO);
- verticalButton.setText ("SWT.VERTICAL");
- borderButton = new Button (styleGroup, SWT.CHECK);
- borderButton.setText ("SWT.BORDER");
- }
-
- /**
- * Sets the state of the "Example" widgets.
- */
- void setExampleWidgetState () {
- super.setExampleWidgetState ();
- setWidgetMinimum ();
- setWidgetMaximum ();
- setWidgetSelection ();
- Control [] controls = getExampleWidgets ();
- if (controls.length != 0){
- horizontalButton.setSelection ((controls [0].getStyle () & SWT.HORIZONTAL) != 0);
- verticalButton.setSelection ((controls [0].getStyle () & SWT.VERTICAL) != 0);
- borderButton.setSelection ((controls [0].getStyle () & SWT.BORDER) != 0);
- }
- }
-
- /**
- * Sets the maximum of the "Example" widgets.
- */
- abstract void setWidgetMaximum ();
-
- /**
- * Sets the minimim of the "Example" widgets.
- */
- abstract void setWidgetMinimum ();
-
- /**
- * Sets the selection of the "Example" widgets.
- */
- abstract void setWidgetSelection ();
-}
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/SashFormTab.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/SashFormTab.java
deleted file mode 100644
index f28c7d28cf..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/SashFormTab.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.controlexample;
-
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.custom.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-
-class SashFormTab extends Tab {
- /* Example widgets and groups that contain them */
- SashForm fullForm, topForm;
- List list1, list2, list3;
- Text text;
-
- static String [] ListData0 = {ControlExample.getResourceString("ListData0_0"),
- ControlExample.getResourceString("ListData0_1"),
- ControlExample.getResourceString("ListData0_2"),
- ControlExample.getResourceString("ListData0_3"),
- ControlExample.getResourceString("ListData0_4"),
- ControlExample.getResourceString("ListData0_5"),
- ControlExample.getResourceString("ListData0_6"),
- ControlExample.getResourceString("ListData0_7"),
- ControlExample.getResourceString("ListData0_8")};
-
- static String [] ListData1 = {ControlExample.getResourceString("ListData1_0"),
- ControlExample.getResourceString("ListData1_1"),
- ControlExample.getResourceString("ListData1_2"),
- ControlExample.getResourceString("ListData1_3"),
- ControlExample.getResourceString("ListData1_4"),
- ControlExample.getResourceString("ListData1_5"),
- ControlExample.getResourceString("ListData1_6"),
- ControlExample.getResourceString("ListData1_7"),
- ControlExample.getResourceString("ListData1_8")};
-
- /* Constants */
- static final int SASH_WIDTH = 3;
-
- /**
- * Creates the Tab within a given instance of ControlExample.
- */
- SashFormTab(ControlExample instance) {
- super(instance);
- }
-
- /**
- * Creates the tab folder page.
- */
- Composite createTabFolderPage (TabFolder tabFolder) {
- tabFolderPage = new Composite(tabFolder, SWT.BORDER);
- tabFolderPage.setLayout(new FillLayout());
-
- fullForm = new SashForm (tabFolderPage, SWT.HORIZONTAL);
- fullForm.setLayout(new FillLayout());
- topForm = new SashForm (fullForm, SWT.VERTICAL);
- topForm.setLayout(new FillLayout());
-
- list1 = new List (topForm, SWT.V_SCROLL | SWT.H_SCROLL | SWT.BORDER);
- list1.setItems (ListData0);
- list2 = new List (topForm, SWT.V_SCROLL | SWT.H_SCROLL | SWT.BORDER);
- list2.setItems (ListData1);
- text = new Text (fullForm, SWT.MULTI | SWT.BORDER);
- text.setText (ControlExample.getResourceString("Multi_line"));
-
- fullForm.setWeights(new int[] {50, 50});
- topForm.setWeights(new int[] {50, 50});
-
- return tabFolderPage;
- }
-
- /**
- * Gets the "Example" widget children.
- */
- Control [] getExampleWidgets () {
- return new Control [] {fullForm, topForm};
- }
-
- /**
- * Gets the text for the tab folder item.
- */
- String getTabText () {
- return "SashForm";
- }
-
- /**
- * Recreates the "Example" widgets.
- */
- void recreateExampleWidgets () {
- // this tab does not use this framework mechanism
- }
-}
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/SashTab.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/SashTab.java
deleted file mode 100755
index 98bbc1fd22..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/SashTab.java
+++ /dev/null
@@ -1,184 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.controlexample;
-
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.events.*;
-
-class SashTab extends Tab {
- /* Example widgets and groups that contain them */
- Sash hSash, vSash;
- List list1, list2, list3;
- Text text;
-
- static String [] ListData0 = {ControlExample.getResourceString("ListData0_0"),
- ControlExample.getResourceString("ListData0_1"),
- ControlExample.getResourceString("ListData0_2"),
- ControlExample.getResourceString("ListData0_3"),
- ControlExample.getResourceString("ListData0_4"),
- ControlExample.getResourceString("ListData0_5"),
- ControlExample.getResourceString("ListData0_6"),
- ControlExample.getResourceString("ListData0_7"),
- ControlExample.getResourceString("ListData0_8")};
-
- static String [] ListData1 = {ControlExample.getResourceString("ListData1_0"),
- ControlExample.getResourceString("ListData1_1"),
- ControlExample.getResourceString("ListData1_2"),
- ControlExample.getResourceString("ListData1_3"),
- ControlExample.getResourceString("ListData1_4"),
- ControlExample.getResourceString("ListData1_5"),
- ControlExample.getResourceString("ListData1_6"),
- ControlExample.getResourceString("ListData1_7"),
- ControlExample.getResourceString("ListData1_8")};
-
- /* Constants */
- static final int SASH_WIDTH = 3;
-
- /**
- * Creates the Tab within a given instance of ControlExample.
- */
- SashTab(ControlExample instance) {
- super(instance);
- }
-
- /**
- * Creates the tab folder page.
- */
- Composite createTabFolderPage (TabFolder tabFolder) {
- /*
- * Create the page. This example does not use layouts.
- */
- tabFolderPage = new Composite(tabFolder, SWT.BORDER);
-
- /* Create the list and text widgets */
- list1 = new List (tabFolderPage, SWT.V_SCROLL | SWT.H_SCROLL | SWT.BORDER);
- list1.setItems (ListData0);
- list2 = new List (tabFolderPage, SWT.V_SCROLL | SWT.H_SCROLL | SWT.BORDER);
- list2.setItems (ListData1);
- text = new Text (tabFolderPage, SWT.MULTI | SWT.BORDER);
- text.setText (ControlExample.getResourceString("Multi_line"));
-
- /* Create the sashes */
- vSash = new Sash (tabFolderPage, SWT.VERTICAL);
- hSash = new Sash (tabFolderPage, SWT.HORIZONTAL);
-
- /* Add the listeners */
- hSash.addSelectionListener (new SelectionAdapter () {
- public void widgetSelected (SelectionEvent event) {
- if (event.detail != SWT.DRAG) {
- hSash.setBounds (event.x, event.y, event.width, event.height);
- layout ();
- }
- }
- });
- vSash.addSelectionListener (new SelectionAdapter () {
- public void widgetSelected (SelectionEvent event) {
- if (event.detail != SWT.DRAG) {
- vSash.setBounds(event.x, event.y, event.width, event.height);
- layout ();
- }
- }
- });
- tabFolderPage.addControlListener (new ControlAdapter () {
- public void controlResized (ControlEvent event) {
- shellResized ();
- }
- });
-
- /*
- * Do not set the bounds of the lists, text and sashes here
- * because this method is run before the widget is opened
- * so we do not know how big the tabComposite is going to be.
- * When the widget is opened a resize event will occur
- * and the contained widgets can be sized accordingly.
- */
- return tabFolderPage;
- }
-
- /**
- * Gets the "Example" widget children.
- */
- Control [] getExampleWidgets () {
- return new Control [] {hSash, vSash};
- }
-
- /**
- * Gets the text for the tab folder item.
- */
- String getTabText () {
- return "Sash";
- }
-
- /**
- * Layout the list and text widgets according to the new
- * positions of the sashes..events.SelectionEvent
- */
- void layout () {
-
- Rectangle tabCompositeBounds = tabFolderPage.getClientArea ();
- Rectangle hSashBounds = hSash.getBounds ();
- Rectangle vSashBounds = vSash.getBounds ();
-
- list1.setBounds (0, 0, vSashBounds.x, hSashBounds.y);
- list2.setBounds (vSashBounds.x + vSashBounds.width, 0, tabCompositeBounds.width - (vSashBounds.x + vSashBounds.width), hSashBounds.y);
- text.setBounds (0, hSashBounds.y + hSashBounds.height, tabCompositeBounds.width, tabCompositeBounds.height - (hSashBounds.y + hSashBounds.height));
-
- /**
- * If the horizontal sash has been moved then the vertical
- * sash is either too long or too short and its size must
- * be adjusted.
- */
- vSashBounds.height = hSashBounds.y;
- vSash.setBounds (vSashBounds);
- }
-
- /**
- * Recreates the "Example" widgets.
- */
- void recreateExampleWidgets () {
- // this tab does not use this framework mechanism
- }
-
- /**
- * Handle the shell resized event.
- */
- void shellResized () {
-
- /* Get the client area for the shell */
- Rectangle tabFolderPageBounds = tabFolderPage.getClientArea ();
-
- /*
- * Make list 1 half the width and half the height of the tab leaving room for the sash.
- * Place list 1 in the top left quadrant of the tab.
- */
- Rectangle list1Bounds = new Rectangle (0, 0, (tabFolderPageBounds.width - SASH_WIDTH) / 2, (tabFolderPageBounds.height - SASH_WIDTH) / 2);
- list1.setBounds (list1Bounds);
-
- /*
- * Make list 2 half the width and half the height of the tab leaving room for the sash.
- * Place list 2 in the top right quadrant of the tab.
- */
- list2.setBounds (list1Bounds.width + SASH_WIDTH, 0, tabFolderPageBounds.width - (list1Bounds.width + SASH_WIDTH), list1Bounds.height);
-
- /*
- * Make the text area the full width and half the height of the tab leaving room for the sash.
- * Place the text area in the bottom half of the tab.
- */
- text.setBounds (0, list1Bounds.height + SASH_WIDTH, tabFolderPageBounds.width, tabFolderPageBounds.height - (list1Bounds.height + SASH_WIDTH));
-
- /* Position the sashes */
- vSash.setBounds (list1Bounds.width, 0, SASH_WIDTH, list1Bounds.height);
- hSash.setBounds (0, list1Bounds.height, tabFolderPageBounds.width, SASH_WIDTH);
- }
-}
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/ScrollableTab.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/ScrollableTab.java
deleted file mode 100755
index dd0b4a24bd..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/ScrollableTab.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.controlexample;
-
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-
-abstract class ScrollableTab extends Tab {
- /* Style widgets added to the "Style" group */
- Button singleButton, multiButton, horizontalButton, verticalButton, borderButton;
-
- /**
- * Creates the Tab within a given instance of ControlExample.
- */
- ScrollableTab(ControlExample instance) {
- super(instance);
- }
-
- /**
- * Creates the "Style" group.
- */
- void createStyleGroup () {
- super.createStyleGroup ();
-
- /* Create the extra widgets */
- singleButton = new Button (styleGroup, SWT.RADIO);
- singleButton.setText ("SWT.SINGLE");
- multiButton = new Button (styleGroup, SWT.RADIO);
- multiButton.setText ("SWT.MULTI");
- horizontalButton = new Button (styleGroup, SWT.CHECK);
- horizontalButton.setText ("SWT.H_SCROLL");
- horizontalButton.setSelection(true);
- verticalButton = new Button (styleGroup, SWT.CHECK);
- verticalButton.setText ("SWT.V_SCROLL");
- verticalButton.setSelection(true);
- borderButton = new Button (styleGroup, SWT.CHECK);
- borderButton.setText ("SWT.BORDER");
- }
-
- /**
- * Sets the state of the "Example" widgets.
- */
- void setExampleWidgetState () {
- super.setExampleWidgetState ();
- Control [] controls = getExampleWidgets ();
- if (controls.length != 0){
- singleButton.setSelection ((controls [0].getStyle () & SWT.SINGLE) != 0);
- multiButton.setSelection ((controls [0].getStyle () & SWT.MULTI) != 0);
- horizontalButton.setSelection ((controls [0].getStyle () & SWT.H_SCROLL) != 0);
- verticalButton.setSelection ((controls [0].getStyle () & SWT.V_SCROLL) != 0);
- borderButton.setSelection ((controls [0].getStyle () & SWT.BORDER) != 0);
- }
- }
-}
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/ShellTab.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/ShellTab.java
deleted file mode 100755
index cf65389b8f..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/ShellTab.java
+++ /dev/null
@@ -1,295 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.controlexample;
-
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.events.*;
-
-class ShellTab extends Tab {
- /* Style widgets added to the "Style" group */
- Button noParentButton, parentButton;
- Button noTrimButton, closeButton, titleButton, minButton, maxButton, borderButton, resizeButton, onTopButton, toolButton;
- Button createButton, closeAllButton;
- Button modelessButton, primaryModalButton, applicationModalButton, systemModalButton;
- Group parentStyleGroup, modalStyleGroup;
-
- /* Variables used to track the open shells */
- int shellCount = 0;
- Shell [] shells = new Shell [4];
-
- /**
- * Creates the Tab within a given instance of ControlExample.
- */
- ShellTab(ControlExample instance) {
- super(instance);
- }
-
- /**
- * Close all the example shells.
- */
- void closeAllShells() {
- for (int i = 0; i<shellCount; i++) {
- if (shells[i] != null & !shells [i].isDisposed ()) {
- shells [i].dispose();
- }
- }
- shellCount = 0;
- }
-
- /**
- * Handle the Create button selection event.
- *
- * @param event org.eclipse.swt.events.SelectionEvent
- */
- public void createButtonSelected(SelectionEvent event) {
-
- /*
- * Remember the example shells so they
- * can be disposed by the user.
- */
- if (shellCount >= shells.length) {
- Shell [] newShells = new Shell [shells.length + 4];
- System.arraycopy (shells, 0, newShells, 0, shells.length);
- shells = newShells;
- }
-
- /* Compute the shell style */
- int style = SWT.NONE;
- if (noTrimButton.getSelection()) style |= SWT.NO_TRIM;
- if (closeButton.getSelection()) style |= SWT.CLOSE;
- if (titleButton.getSelection()) style |= SWT.TITLE;
- if (minButton.getSelection()) style |= SWT.MIN;
- if (maxButton.getSelection()) style |= SWT.MAX;
- if (borderButton.getSelection()) style |= SWT.BORDER;
- if (resizeButton.getSelection()) style |= SWT.RESIZE;
- if (onTopButton.getSelection()) style |= SWT.ON_TOP;
- if (toolButton.getSelection()) style |= SWT.TOOL;
- if (modelessButton.getSelection()) style |= SWT.MODELESS;
- if (primaryModalButton.getSelection()) style |= SWT.PRIMARY_MODAL;
- if (applicationModalButton.getSelection()) style |= SWT.APPLICATION_MODAL;
- if (systemModalButton.getSelection()) style |= SWT.SYSTEM_MODAL;
-
- /* Create the shell with or without a parent */
- if (noParentButton.getSelection ()) {
- shells [shellCount] = new Shell (style);
- } else {
- Shell shell = tabFolderPage.getShell ();
- shells [shellCount] = new Shell (shell, style);
- }
- final Shell currentShell = shells [shellCount];
- Button button = new Button(currentShell, SWT.PUSH);
- button.setBounds(20, 20, 120, 30);
- Button closeButton = new Button(currentShell, SWT.PUSH);
- closeButton.setBounds(160, 20, 120, 30);
- closeButton.setText(ControlExample.getResourceString("Close"));
- closeButton.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event event) {
- currentShell.dispose();
- }
- });
-
- /* Set the size, title and open the shell */
- currentShell.setSize (300, 100);
- currentShell.setText (ControlExample.getResourceString("Title") + shellCount);
- hookListeners (currentShell);
- currentShell.open ();
- shellCount++;
- }
-
- /**
- * Creates the "Control" group.
- */
- void createControlGroup () {
- /*
- * Create the "Control" group. This is the group on the
- * right half of each example tab. It consists of the
- * style group, the 'other' group and the size group.
- */
- controlGroup = new Group (tabFolderPage, SWT.NONE);
- GridLayout gridLayout= new GridLayout ();
- controlGroup.setLayout (gridLayout);
- gridLayout.numColumns = 1;
- gridLayout.makeColumnsEqualWidth = true;
- controlGroup.setLayoutData (new GridData (GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL));
- controlGroup.setText (ControlExample.getResourceString("Parameters"));
-
- /* Create individual groups inside the "Control" group */
- styleGroup = new Group (controlGroup, SWT.NONE);
- gridLayout = new GridLayout ();
- styleGroup.setLayout (gridLayout);
- gridLayout.numColumns = 2;
- gridLayout.makeColumnsEqualWidth = true;
- styleGroup.setLayoutData (new GridData(GridData.GRAB_HORIZONTAL | GridData.GRAB_VERTICAL | GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL));
- styleGroup.setText (ControlExample.getResourceString("Styles"));
-
- /* Create a group for the parent style controls */
- parentStyleGroup = new Group (styleGroup, SWT.NONE);
- parentStyleGroup.setLayout (new GridLayout ());
- GridData gridData = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
- parentStyleGroup.setLayoutData (gridData);
- parentStyleGroup.setText (ControlExample.getResourceString("Parent"));
- }
-
- /**
- * Creates the "Control" widget children.
- */
- void createControlWidgets () {
-
- /* Create the parent style buttons */
- noParentButton = new Button (parentStyleGroup, SWT.RADIO);
- noParentButton.setText (ControlExample.getResourceString("No_Parent"));
- parentButton = new Button (parentStyleGroup, SWT.RADIO);
- parentButton.setText (ControlExample.getResourceString("Parent"));
-
- /* Create a group for the decoration style controls */
- Group decorationStyleGroup = new Group(styleGroup, SWT.NONE);
- decorationStyleGroup.setLayout (new GridLayout ());
- GridData gridData = new GridData (GridData.HORIZONTAL_ALIGN_FILL);
- gridData.verticalSpan = 2;
- decorationStyleGroup.setLayoutData (gridData);
- decorationStyleGroup.setText (ControlExample.getResourceString("Decoration_Styles"));
-
- /* Create the decoration style buttons */
- noTrimButton = new Button (decorationStyleGroup, SWT.CHECK);
- noTrimButton.setText ("SWT.NO_TRIM");
- closeButton = new Button (decorationStyleGroup, SWT.CHECK);
- closeButton.setText ("SWT.CLOSE");
- titleButton = new Button (decorationStyleGroup, SWT.CHECK);
- titleButton.setText ("SWT.TITLE");
- minButton = new Button (decorationStyleGroup, SWT.CHECK);
- minButton.setText ("SWT.MIN");
- maxButton = new Button (decorationStyleGroup, SWT.CHECK);
- maxButton.setText ("SWT.MAX");
- borderButton = new Button (decorationStyleGroup, SWT.CHECK);
- borderButton.setText ("SWT.BORDER");
- resizeButton = new Button (decorationStyleGroup, SWT.CHECK);
- resizeButton.setText ("SWT.RESIZE");
- onTopButton = new Button (decorationStyleGroup, SWT.CHECK);
- onTopButton.setText ("SWT.ON_TOP");
- toolButton = new Button (decorationStyleGroup, SWT.CHECK);
- toolButton.setText ("SWT.TOOL");
-
- /* Create a group for the modal style controls */
- modalStyleGroup = new Group (styleGroup, SWT.NONE);
- modalStyleGroup.setLayout (new GridLayout ());
- modalStyleGroup.setText (ControlExample.getResourceString("Modal_Styles"));
- gridData = new GridData ();
- gridData.verticalAlignment = GridData.FILL;
- modalStyleGroup.setLayoutData(gridData);
-
- /* Create the modal style buttons */
- modelessButton = new Button (modalStyleGroup, SWT.RADIO);
- modelessButton.setText ("SWT.MODELESS");
- primaryModalButton = new Button (modalStyleGroup, SWT.RADIO);
- primaryModalButton.setText ("SWT.PRIMARY_MODAL");
- applicationModalButton = new Button (modalStyleGroup, SWT.RADIO);
- applicationModalButton.setText ("SWT.APPLICATION_MODAL");
- systemModalButton = new Button (modalStyleGroup, SWT.RADIO);
- systemModalButton.setText ("SWT.SYSTEM_MODAL");
-
- /* Create the "create" and "closeAll" buttons */
- createButton = new Button (styleGroup, SWT.NONE);
- gridData = new GridData (GridData.HORIZONTAL_ALIGN_END);
- createButton.setLayoutData (gridData);
- createButton.setText (ControlExample.getResourceString("Create_Shell"));
- closeAllButton = new Button (styleGroup, SWT.NONE);
- gridData = new GridData (GridData.HORIZONTAL_ALIGN_BEGINNING);
- closeAllButton.setText (ControlExample.getResourceString("Close_All_Shells"));
- closeAllButton.setLayoutData (gridData);
-
- /* Add the listeners */
- createButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- createButtonSelected(e);
- };
- });
- closeAllButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- closeAllShells ();
- };
- });
- SelectionListener decorationButtonListener = new SelectionAdapter() {
- public void widgetSelected(SelectionEvent event) {
- decorationButtonSelected(event);
- };
- };
- noTrimButton.addSelectionListener (decorationButtonListener);
- closeButton.addSelectionListener (decorationButtonListener);
- titleButton.addSelectionListener (decorationButtonListener);
- minButton.addSelectionListener (decorationButtonListener);
- maxButton.addSelectionListener (decorationButtonListener);
- borderButton.addSelectionListener (decorationButtonListener);
- resizeButton.addSelectionListener (decorationButtonListener);
- applicationModalButton.addSelectionListener (decorationButtonListener);
- systemModalButton.addSelectionListener (decorationButtonListener);
-
- /* Set the default state */
- noParentButton.setSelection (true);
- modelessButton.setSelection (true);
- }
-
- /**
- * Handle a decoration button selection event.
- *
- * @param event org.eclipse.swt.events.SelectionEvent
- */
- public void decorationButtonSelected(SelectionEvent event) {
-
- /* Make sure if the modal style is SWT.APPLICATION_MODAL or
- * SWT.SYSTEM_MODAL the style SWT.CLOSE is also selected.
- * This is to make sure the user can close the shell.
- */
- Button widget = (Button) event.widget;
- if (widget == applicationModalButton || widget == systemModalButton) {
- if (widget.getSelection()) {
- closeButton.setSelection (true);
- noTrimButton.setSelection (false);
- }
- return;
- }
- if (widget == closeButton) {
- if (applicationModalButton.getSelection() || systemModalButton.getSelection()) {
- closeButton.setSelection (true);
- }
- }
- /*
- * Make sure if the No Trim button is selected then
- * all other decoration buttons are deselected.
- */
- if (widget.getSelection() && widget != noTrimButton) {
- noTrimButton.setSelection (false);
- return;
- }
- if (widget.getSelection() && widget == noTrimButton) {
- if (applicationModalButton.getSelection() || systemModalButton.getSelection()) {
- noTrimButton.setSelection (false);
- return;
- }
- closeButton.setSelection (false);
- titleButton.setSelection (false);
- minButton.setSelection (false);
- maxButton.setSelection (false);
- borderButton.setSelection (false);
- resizeButton.setSelection (false);
- return;
- }
- }
-
- /**
- * Gets the text for the tab folder item.
- */
- String getTabText () {
- return "Shell";
- }
-}
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/SliderTab.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/SliderTab.java
deleted file mode 100755
index 00be184c4d..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/SliderTab.java
+++ /dev/null
@@ -1,253 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.controlexample;
-
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.events.*;
-
-class SliderTab extends RangeTab {
- /* Example widgets and groups that contain them */
- Scale scale1;
- Slider slider1;
- Group sliderGroup, scaleGroup;
-
- /* Scale widgets added to the "Control" group */
- Scale incrementScale, pageIncrementScale, thumbScale;
-
- /**
- * Creates the Tab within a given instance of ControlExample.
- */
- SliderTab(ControlExample instance) {
- super(instance);
- }
-
- /**
- * Creates the "Control" widget children.
- */
- void createControlWidgets () {
- super.createControlWidgets ();
- createThumbGroup ();
- createIncrementGroup ();
- createPageIncrementGroup ();
- }
-
- /**
- * Creates the "Example" group.
- */
- void createExampleGroup () {
- super.createExampleGroup ();
-
- /* Create a group for the slider */
- sliderGroup = new Group (exampleGroup, SWT.NONE);
- sliderGroup.setLayout (new GridLayout ());
- sliderGroup.setLayoutData (new GridData (GridData.GRAB_HORIZONTAL | GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL));
- sliderGroup.setText ("Slider");
-
- /* Create a group for the scale */
- scaleGroup = new Group (exampleGroup, SWT.NONE);
- scaleGroup.setLayout (new GridLayout ());
- scaleGroup.setLayoutData (new GridData (GridData.GRAB_HORIZONTAL | GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL));
- scaleGroup.setText ("Scale");
-
- }
-
- /**
- * Creates the "Example" widgets.
- */
- void createExampleWidgets () {
-
- /* Compute the widget style */
- int style = getDefaultStyle();
- if (horizontalButton.getSelection ()) style |= SWT.HORIZONTAL;
- if (verticalButton.getSelection ()) style |= SWT.VERTICAL;
- if (borderButton.getSelection ()) style |= SWT.BORDER;
-
- /* Create the example widgets */
- scale1 = new Scale (scaleGroup, style);
- scale1.setMaximum (100);
- scale1.setSelection (50);
- scale1.setIncrement (5);
- scale1.setPageIncrement (10);
- slider1 = new Slider(sliderGroup, style);
- slider1.setMaximum (100);
- slider1.setSelection (50);
- slider1.setIncrement(5);
- slider1.setPageIncrement (10);
- slider1.setThumb (10);
- }
-
- /**
- * Create a group of widgets to control the increment
- * attribute of the example widget.
- */
- void createIncrementGroup() {
-
- /* Create the group */
- Group incrementGroup = new Group (controlGroup, SWT.NONE);
- incrementGroup.setLayout (new GridLayout ());
- incrementGroup.setText (ControlExample.getResourceString("Increment"));
- incrementGroup.setLayoutData (new GridData (GridData.FILL_HORIZONTAL));
-
- /* Create the scale widget */
- incrementScale = new Scale (incrementGroup, SWT.NONE);
- incrementScale.setMaximum (100);
- incrementScale.setSelection (5);
- incrementScale.setPageIncrement (10);
- incrementScale.setIncrement (5);
-
- GridData data = new GridData (GridData.FILL_HORIZONTAL);
- data.widthHint = 100;
- incrementScale.setLayoutData (data);
-
- /* Add the listeners */
- incrementScale.addSelectionListener (new SelectionAdapter () {
- public void widgetSelected (SelectionEvent e) {
- setWidgetIncrement ();
- };
- });
- }
-
- /**
- * Create a group of widgets to control the page increment
- * attribute of the example widget.
- */
- void createPageIncrementGroup() {
-
- /* Create the group */
- Group pageIncrementGroup = new Group (controlGroup, SWT.NONE);
- pageIncrementGroup.setLayout (new GridLayout ());
- pageIncrementGroup.setText (ControlExample.getResourceString("Page_Increment"));
- pageIncrementGroup.setLayoutData (new GridData (GridData.FILL_HORIZONTAL));
-
- /* Create the scale widget */
- pageIncrementScale = new Scale (pageIncrementGroup, SWT.NONE);
- pageIncrementScale.setMaximum (100);
- pageIncrementScale.setSelection (10);
- pageIncrementScale.setPageIncrement (10);
- pageIncrementScale.setIncrement (5);
-
- GridData data = new GridData (GridData.FILL_HORIZONTAL);
- data.widthHint = 100;
- pageIncrementScale.setLayoutData (data);
-
- /* Add the listeners */
- pageIncrementScale.addSelectionListener (new SelectionAdapter () {
- public void widgetSelected (SelectionEvent event) {
- setWidgetPageIncrement ();
- }
- });
- }
-
- /**
- * Create a group of widgets to control the thumb
- * attribute of the example widget.
- */
- void createThumbGroup() {
-
- /* Create the group */
- Group thumbGroup = new Group (controlGroup, SWT.NONE);
- thumbGroup.setLayout (new GridLayout ());
- thumbGroup.setText (ControlExample.getResourceString("Thumb"));
- thumbGroup.setLayoutData (new GridData (GridData.FILL_HORIZONTAL));
-
- /* Create the scale widget */
- thumbScale = new Scale (thumbGroup, SWT.NONE);
- thumbScale.setMaximum (100);
- thumbScale.setSelection (10);
- thumbScale.setPageIncrement (10);
- thumbScale.setIncrement (5);
-
- GridData data = new GridData (GridData.FILL_HORIZONTAL);
- data.widthHint = 100;
- thumbScale.setLayoutData (data);
-
- /* Add the listeners */
- thumbScale.addSelectionListener (new SelectionAdapter () {
- public void widgetSelected (SelectionEvent event) {
- setWidgetThumb ();
- };
- });
- }
-
- /**
- * Gets the "Example" widget children.
- */
- Control [] getExampleWidgets () {
- return new Control [] {scale1, slider1};
- }
-
- /**
- * Gets the text for the tab folder item.
- */
- String getTabText () {
- return "Slider/Scale";
- }
-
- /**
- * Sets the state of the "Example" widgets.
- */
- void setExampleWidgetState () {
- super.setExampleWidgetState ();
- setWidgetIncrement ();
- setWidgetPageIncrement ();
- setWidgetThumb ();
- }
-
- /**
- * Sets the increment of the "Example" widgets.
- */
- void setWidgetIncrement () {
- slider1.setIncrement (incrementScale.getSelection ());
- scale1.setIncrement (incrementScale.getSelection ());
- }
-
- /**
- * Sets the minimim of the "Example" widgets.
- */
- void setWidgetMaximum () {
- slider1.setMaximum (maximumScale.getSelection ());
- scale1.setMaximum (maximumScale.getSelection ());
- }
-
- /**
- * Sets the minimim of the "Example" widgets.
- */
- void setWidgetMinimum () {
- slider1.setMinimum (minimumScale.getSelection ());
- scale1.setMinimum (minimumScale.getSelection ());
- }
-
- /**
- * Sets the page increment of the "Example" widgets.
- */
- void setWidgetPageIncrement () {
- slider1.setPageIncrement (pageIncrementScale.getSelection ());
- scale1.setPageIncrement (pageIncrementScale.getSelection ());
- }
-
- /**
- * Sets the selection of the "Example" widgets.
- */
- void setWidgetSelection () {
- slider1.setSelection (selectionScale.getSelection ());
- scale1.setSelection (selectionScale.getSelection ());
- }
-
- /**
- * Sets the thumb of the "Example" widgets.
- */
- void setWidgetThumb () {
- slider1.setThumb (thumbScale.getSelection ());
- }
-}
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/StyledTextTab.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/StyledTextTab.java
deleted file mode 100644
index 8f7d5854f2..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/StyledTextTab.java
+++ /dev/null
@@ -1,287 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.controlexample;
-
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.custom.*;
-
-class StyledTextTab extends ScrollableTab {
- /* Example widgets and groups that contain them */
- StyledText styledText;
- Group styledTextGroup, styledTextStyleGroup;
-
- /* Style widgets added to the "Style" group */
- Button wrapButton, readOnlyButton, fullSelectionButton;
-
- /* Buttons for adding StyleRanges to StyledText */
- Button boldButton, italicButton, redButton, yellowButton;
- Image boldImage, italicImage, redImage, yellowImage;
-
- /* Variables for saving state. */
- StyleRange[] styleRanges;
-
- /**
- * Creates the Tab within a given instance of ControlExample.
- */
- StyledTextTab(ControlExample instance) {
- super(instance);
- }
-
- /**
- * Creates a bitmap image.
- */
- Image createBitmapImage (Display display, String name) {
- ImageData source = new ImageData(ControlExample.class.getResourceAsStream(name + ".bmp"));
- ImageData mask = new ImageData(ControlExample.class.getResourceAsStream(name + "_mask.bmp"));
- return new Image (display, source, mask);
- }
-
- /**
- * Creates the "Control" widget children.
- */
- void createControlWidgets () {
- super.createControlWidgets ();
-
- /* Add a group for modifying the StyledText widget */
- createStyledTextStyleGroup ();
- }
-
- /**
- * Creates the "Example" group.
- */
- void createExampleGroup () {
- super.createExampleGroup ();
-
- /* Create a group for the styled text widget */
- styledTextGroup = new Group (exampleGroup, SWT.NONE);
- styledTextGroup.setLayout (new GridLayout ());
- styledTextGroup.setLayoutData (new GridData (GridData.GRAB_HORIZONTAL | GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL));
- styledTextGroup.setText ("StyledText");
- }
-
- /**
- * Creates the "Example" widgets.
- */
- void createExampleWidgets () {
-
- /* Compute the widget style */
- int style = getDefaultStyle();
- if (singleButton.getSelection ()) style |= SWT.SINGLE;
- if (multiButton.getSelection ()) style |= SWT.MULTI;
- if (horizontalButton.getSelection ()) style |= SWT.H_SCROLL;
- if (verticalButton.getSelection ()) style |= SWT.V_SCROLL;
- if (wrapButton.getSelection ()) style |= SWT.WRAP;
- if (readOnlyButton.getSelection ()) style |= SWT.READ_ONLY;
- if (borderButton.getSelection ()) style |= SWT.BORDER;
- if (fullSelectionButton.getSelection ()) style |= SWT.FULL_SELECTION;
-
- /* Create the example widgets */
- styledText = new StyledText (styledTextGroup, style);
- styledText.setText (ControlExample.getResourceString("Example_string"));
- styledText.append ("\n");
- styledText.append (ControlExample.getResourceString("One_Two_Three"));
-
- if (styleRanges != null) {
- styledText.setStyleRanges(styleRanges);
- styleRanges = null;
- }
- }
-
- /**
- * Creates the "Style" group.
- */
- void createStyleGroup() {
- super.createStyleGroup();
-
- /* Create the extra widgets */
- wrapButton = new Button (styleGroup, SWT.CHECK);
- wrapButton.setText ("SWT.WRAP");
- readOnlyButton = new Button (styleGroup, SWT.CHECK);
- readOnlyButton.setText ("SWT.READ_ONLY");
- fullSelectionButton = new Button (styleGroup, SWT.CHECK);
- fullSelectionButton.setText ("SWT.FULL_SELECTION");
- }
-
- /**
- * Creates the "StyledText Style" group.
- */
- void createStyledTextStyleGroup () {
- final Display display = controlGroup.getDisplay ();
- styledTextStyleGroup = new Group (controlGroup, SWT.NONE);
- styledTextStyleGroup.setText (ControlExample.getResourceString ("StyledText_Styles"));
- styledTextStyleGroup.setLayout (new GridLayout(5, false));
- GridData data = new GridData (GridData.HORIZONTAL_ALIGN_FILL);
- data.horizontalSpan = 2;
- styledTextStyleGroup.setLayoutData (data);
-
- /* Get images */
- boldImage = createBitmapImage (display, "bold");
- italicImage = createBitmapImage (display, "italic");
- redImage = createBitmapImage (display, "red");
- yellowImage = createBitmapImage (display, "yellow");
-
- /* Create controls to modify the StyledText */
- Label label = new Label (styledTextStyleGroup, SWT.NONE);
- label.setText (ControlExample.getResourceString ("StyledText_Style_Instructions"));
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan = 5;
- label.setLayoutData(data);
- new Label (styledTextStyleGroup, SWT.NONE).setText (ControlExample.getResourceString ("Bold"));
- boldButton = new Button (styledTextStyleGroup, SWT.PUSH);
- boldButton.setImage (boldImage);
- boldButton.addSelectionListener(new SelectionAdapter () {
- public void widgetSelected (SelectionEvent e) {
- Point sel = styledText.getSelectionRange();
- if ((sel == null) || (sel.y == 0)) return;
- StyleRange style;
- for (int i = sel.x; i<sel.x+sel.y; i++) {
- StyleRange range = styledText.getStyleRangeAtOffset(i);
- if (range == null) {style = new StyleRange(i, 1, null, null, SWT.BOLD);}
- else {style = new StyleRange(i, 1, range.foreground, range.background, range.fontStyle | SWT.BOLD);};
- styledText.setStyleRange(style);
- }
- styledText.setSelectionRange(sel.x + sel.y, 0);
- }
- });
- new Label (styledTextStyleGroup, SWT.NONE).setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- new Label (styledTextStyleGroup, SWT.NONE).setText (ControlExample.getResourceString ("Foreground_Style"));
- redButton = new Button (styledTextStyleGroup, SWT.PUSH);
- redButton.setImage (redImage);
- new Label (styledTextStyleGroup, SWT.NONE).setText (ControlExample.getResourceString ("Italic"));
- italicButton = new Button (styledTextStyleGroup, SWT.PUSH);
- italicButton.setImage (italicImage);
- italicButton.addSelectionListener(new SelectionAdapter () {
- public void widgetSelected (SelectionEvent e) {
- Point sel = styledText.getSelectionRange();
- if ((sel == null) || (sel.y == 0)) return;
- StyleRange style;
- for (int i = sel.x; i<sel.x+sel.y; i++) {
- StyleRange range = styledText.getStyleRangeAtOffset(i);
- if (range == null) {style = new StyleRange(i, 1, null, null, SWT.ITALIC);}
- else {style = new StyleRange(i, 1, range.foreground, range.background, range.fontStyle | SWT.ITALIC);};
- styledText.setStyleRange(style);
- }
- styledText.setSelectionRange(sel.x + sel.y, 0);
- }
- });
- new Label (styledTextStyleGroup, SWT.NONE).setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- new Label (styledTextStyleGroup, SWT.NONE).setText (ControlExample.getResourceString ("Background_Style"));
- yellowButton = new Button (styledTextStyleGroup, SWT.PUSH);
- yellowButton.setImage (yellowImage);
- SelectionListener colorListener = new SelectionAdapter () {
- public void widgetSelected (SelectionEvent e) {
- Point sel = styledText.getSelectionRange();
- if ((sel == null) || (sel.y == 0)) return;
- Color fg, bg;
- if (e.widget == redButton) {
- fg = display.getSystemColor (SWT.COLOR_RED);
- bg = null;
- } else if (e.widget == yellowButton) {
- fg = null;
- bg = display.getSystemColor (SWT.COLOR_YELLOW);
- } else {
- fg = bg = null;
- }
- StyleRange style;
- for (int i = sel.x; i<sel.x+sel.y; i++) {
- StyleRange range = styledText.getStyleRangeAtOffset(i);
- if (range == null) {
- style = new StyleRange(i, 1, fg, bg, SWT.NORMAL);
- }
- else {
- if (range.foreground != null) fg = range.foreground;
- if (range.background != null) bg = range.background;
- style = new StyleRange(i, 1, fg, bg, range.fontStyle);
- };
- styledText.setStyleRange(style);
- }
- styledText.setSelectionRange(sel.x + sel.y, 0);
- };
- };
- redButton.addSelectionListener(colorListener);
- yellowButton.addSelectionListener(colorListener);
- yellowButton.addDisposeListener(new DisposeListener () {
- public void widgetDisposed (DisposeEvent e) {
- boldImage.dispose();
- italicImage.dispose();
- redImage.dispose();
- yellowImage.dispose();
- }
- });
- }
-
- /**
- * Creates the tab folder page.
- *
- * @param tabFolder org.eclipse.swt.widgets.TabFolder
- * @return the new page for the tab folder
- */
- Composite createTabFolderPage (TabFolder tabFolder) {
- super.createTabFolderPage (tabFolder);
-
- /*
- * Add a resize listener to the tabFolderPage so that
- * if the user types into the example widget to change
- * its preferred size, and then resizes the shell, we
- * recalculate the preferred size correctly.
- */
- tabFolderPage.addControlListener(new ControlAdapter() {
- public void controlResized(ControlEvent e) {
- setExampleWidgetSize ();
- }
- });
-
- return tabFolderPage;
- }
-
- /**
- * Disposes the "Example" widgets.
- */
- void disposeExampleWidgets () {
- /* store the state of the styledText if applicable */
- if (styledText != null) {
- styleRanges = styledText.getStyleRanges();
- }
- super.disposeExampleWidgets();
- }
-
- /**
- * Gets the "Example" widget children.
- */
- Control [] getExampleWidgets () {
- return new Control [] {styledText};
- }
-
- /**
- * Gets the text for the tab folder item.
- */
- String getTabText () {
- return "StyledText";
- }
-
- /**
- * Sets the state of the "Example" widgets.
- */
- void setExampleWidgetState () {
- super.setExampleWidgetState ();
- wrapButton.setSelection ((styledText.getStyle () & SWT.WRAP) != 0);
- readOnlyButton.setSelection ((styledText.getStyle () & SWT.READ_ONLY) != 0);
- fullSelectionButton.setSelection ((styledText.getStyle () & SWT.FULL_SELECTION) != 0);
- horizontalButton.setEnabled ((styledText.getStyle () & SWT.MULTI) != 0);
- verticalButton.setEnabled ((styledText.getStyle () & SWT.MULTI) != 0);
- wrapButton.setEnabled ((styledText.getStyle () & SWT.MULTI) != 0);
- }
-}
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/Tab.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/Tab.java
deleted file mode 100755
index 3bfbbca834..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/Tab.java
+++ /dev/null
@@ -1,938 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.controlexample;
-
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.events.*;
-
-/**
- * <code>Tab</code> is the abstract superclass of every page
- * in the example's tab folder. Each page in the tab folder
- * describes a control.
- *
- * A Tab itself is not a control but instead provides a
- * hierarchy with which to share code that is common to
- * every page in the folder.
- *
- * A typical page in a Tab contains a two column composite.
- * The left column contains the "Example" group. The right
- * column contains "Control" group. The "Control" group
- * contains controls that allow the user to interact with
- * the example control. The "Control" group typically
- * contains a "Style", "Other" and "Size" group. Subclasses
- * can override these defaults to augment a group or stop
- * a group from being created.
- */
-abstract class Tab {
- /* Common control buttons */
- Button borderButton, enabledButton, visibleButton;
- Button preferredButton, tooSmallButton, smallButton, largeButton, fillButton;
-
- /* Common groups and composites */
- Composite tabFolderPage;
- Group exampleGroup, controlGroup, listenersGroup, otherGroup, sizeGroup, styleGroup, colorGroup;
-
- /* Controlling instance */
- final ControlExample instance;
-
- /* Sizing constants for the "Size" group */
- static final int TOO_SMALL_SIZE = 10;
- static final int SMALL_SIZE = 50;
- static final int LARGE_SIZE = 100;
-
- /* Right-to-left support */
- static final boolean RTL_SUPPORT_ENABLE = false;
- Group orientationGroup;
- Button rtlButton, ltrButton, defaultOrietationButton;
-
- /* Controls and resources for the "Colors" group */
- Button foregroundButton, backgroundButton, fontButton;
- Image foregroundImage, backgroundImage;
- Color foregroundColor, backgroundColor;
- Font font;
-
- /* Event logging variables and controls */
- Text eventConsole;
- boolean logging = false;
- boolean [] eventsFilter;
-
- static final String [] EVENT_NAMES = {
- "KeyDown", "KeyUp",
- "MouseDown", "MouseUp", "MouseMove", "MouseEnter", "MouseExit", "MouseDoubleClick",
- "Paint", "Move", "Resize", "Dispose",
- "Selection", "DefaultSelection",
- "FocusIn", "FocusOut",
- "Expand", "Collapse",
- "Iconify", "Deiconify", "Close",
- "Show", "Hide",
- "Modify", "Verify",
- "Activate", "Deactivate",
- "Help", "DragDetect", "Arm", "Traverse", "MouseHover",
- "HardKeyDown", "HardKeyUp",
- "MenuDetect"
- };
-
- /**
- * Creates the Tab within a given instance of ControlExample.
- */
- Tab(ControlExample instance) {
- this.instance = instance;
- }
-
- /**
- * Creates the "Control" group. The "Control" group
- * is typically the right hand column in the tab.
- */
- void createControlGroup () {
-
- /*
- * Create the "Control" group. This is the group on the
- * right half of each example tab. It consists of the
- * "Style" group, the "Other" group and the "Size" group.
- */
- controlGroup = new Group (tabFolderPage, SWT.NONE);
- controlGroup.setLayout (new GridLayout (2, true));
- controlGroup.setLayoutData (new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL));
- controlGroup.setText (ControlExample.getResourceString("Parameters"));
-
- /* Create individual groups inside the "Control" group */
- createStyleGroup ();
- createOtherGroup ();
- createSizeGroup ();
- createColorGroup ();
- if (RTL_SUPPORT_ENABLE) {
- createOrientationGroup ();
- }
-
- /*
- * For each Button child in the style group, add a selection
- * listener that will recreate the example controls. If the
- * style group button is a RADIO button, ensure that the radio
- * button is selected before recreating the example controls.
- * When the user selects a RADIO button, the current RADIO
- * button in the group is deselected and the new RADIO button
- * is selected automatically. The listeners are notified for
- * both these operations but typically only do work when a RADIO
- * button is selected.
- */
- SelectionListener selectionListener = new SelectionAdapter () {
- public void widgetSelected (SelectionEvent event) {
- if ((event.widget.getStyle () & SWT.RADIO) != 0) {
- if (!((Button) event.widget).getSelection ()) return;
- }
- recreateExampleWidgets ();
- };
- };
- Control [] children = styleGroup.getChildren ();
- for (int i=0; i<children.length; i++) {
- if (children [i] instanceof Button) {
- Button button = (Button) children [i];
- button.addSelectionListener (selectionListener);
- }
- }
- if (RTL_SUPPORT_ENABLE) {
- rtlButton.addSelectionListener (selectionListener);
- ltrButton.addSelectionListener (selectionListener);
- defaultOrietationButton.addSelectionListener (selectionListener);
- }
- }
-
- /**
- * Creates the "Control" widget children.
- * Subclasses override this method to augment
- * the standard controls created in the "Style",
- * "Other" and "Size" groups.
- */
- void createControlWidgets () {
- }
-
- /**
- * Creates the "Colors" group. This is typically
- * a child of the "Control" group. Subclasses override
- * this method to customize and set system colors.
- */
- void createColorGroup () {
- /* Create the group */
- colorGroup = new Group(controlGroup, SWT.NONE);
- colorGroup.setLayout (new GridLayout (2, false));
- colorGroup.setLayoutData (new GridData (GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL));
- colorGroup.setText (ControlExample.getResourceString ("Colors"));
- new Label (colorGroup, SWT.NONE).setText (ControlExample.getResourceString ("Foreground_Color"));
- foregroundButton = new Button (colorGroup, SWT.PUSH);
- new Label (colorGroup, SWT.NONE).setText (ControlExample.getResourceString ("Background_Color"));
- backgroundButton = new Button (colorGroup, SWT.PUSH);
- fontButton = new Button (colorGroup, SWT.PUSH);
- fontButton.setText(ControlExample.getResourceString("Font"));
- fontButton.setLayoutData(new GridData (GridData.HORIZONTAL_ALIGN_FILL));
- Button defaultsButton = new Button (colorGroup, SWT.PUSH);
- defaultsButton.setText(ControlExample.getResourceString("Defaults"));
-
- Shell shell = controlGroup.getShell ();
- final ColorDialog foregroundDialog = new ColorDialog (shell);
- final ColorDialog backgroundDialog = new ColorDialog (shell);
- final FontDialog fontDialog = new FontDialog (shell);
-
- /* Create images to display current colors */
- int imageSize = 12;
- Display display = shell.getDisplay ();
- foregroundImage = new Image (display, imageSize, imageSize);
- backgroundImage = new Image (display, imageSize, imageSize);
-
- /* Add listeners to set the colors and font */
- foregroundButton.setImage(foregroundImage); // sets the size of the button
- foregroundButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent event) {
- Color oldColor = foregroundColor;
- if (oldColor == null) {
- Control [] controls = getExampleWidgets ();
- if (controls.length > 0) oldColor = controls [0].getForeground ();
- }
- if (oldColor != null) foregroundDialog.setRGB(oldColor.getRGB()); // seed dialog with current color
- RGB rgb = foregroundDialog.open();
- if (rgb == null) return;
- oldColor = foregroundColor; // save old foreground color to dispose when done
- foregroundColor = new Color (event.display, rgb);
- setExampleWidgetForeground ();
- if (oldColor != null) oldColor.dispose ();
- }
- });
- backgroundButton.setImage(backgroundImage); // sets the size of the button
- backgroundButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent event) {
- Color oldColor = backgroundColor;
- if (oldColor == null) {
- Control [] controls = getExampleWidgets ();
- if (controls.length > 0) oldColor = controls [0].getBackground (); // seed dialog with current color
- }
- if (oldColor != null) backgroundDialog.setRGB(oldColor.getRGB());
- RGB rgb = backgroundDialog.open();
- if (rgb == null) return;
- oldColor = backgroundColor; // save old background color to dispose when done
- backgroundColor = new Color (event.display, rgb);
- setExampleWidgetBackground ();
- if (oldColor != null) oldColor.dispose ();
- }
- });
- fontButton.addSelectionListener(new SelectionAdapter () {
- public void widgetSelected (SelectionEvent event) {
- Font oldFont = font;
- if (oldFont == null) {
- Control [] controls = getExampleWidgets ();
- if (controls.length > 0) oldFont = controls [0].getFont ();
- }
- if (oldFont != null) fontDialog.setFontList(oldFont.getFontData()); // seed dialog with current font
- FontData fontData = fontDialog.open ();
- if (fontData == null) return;
- oldFont = font; // dispose old font when done
- font = new Font (event.display, fontData);
- setExampleWidgetFont ();
- setExampleWidgetSize ();
- if (oldFont != null) oldFont.dispose ();
- }
- });
- defaultsButton.addSelectionListener(new SelectionAdapter () {
- public void widgetSelected (SelectionEvent e) {
- resetColorsAndFonts ();
- }
- });
- shell.addDisposeListener(new DisposeListener() {
- public void widgetDisposed(DisposeEvent event) {
- if (foregroundImage != null) foregroundImage.dispose();
- if (backgroundImage != null) backgroundImage.dispose();
- if (foregroundColor != null) foregroundColor.dispose();
- if (backgroundColor != null) backgroundColor.dispose();
- if (font != null) font.dispose();
- foregroundColor = null;
- backgroundColor = null;
- font = null;
- }
- });
- }
-
- /**
- * Creates the "Other" group. This is typically
- * a child of the "Control" group.
- */
- void createOtherGroup () {
- /* Create the group */
- otherGroup = new Group (controlGroup, SWT.NONE);
- otherGroup.setLayout (new GridLayout ());
- otherGroup.setLayoutData (new GridData (GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL));
- otherGroup.setText (ControlExample.getResourceString("Other"));
-
- /* Create the controls */
- enabledButton = new Button(otherGroup, SWT.CHECK);
- enabledButton.setText(ControlExample.getResourceString("Enabled"));
- visibleButton = new Button(otherGroup, SWT.CHECK);
- visibleButton.setText(ControlExample.getResourceString("Visible"));
-
- /* Add the listeners */
- enabledButton.addSelectionListener (new SelectionAdapter () {
- public void widgetSelected (SelectionEvent event) {
- setExampleWidgetEnabled ();
- }
- });
- visibleButton.addSelectionListener (new SelectionAdapter () {
- public void widgetSelected (SelectionEvent event) {
- setExampleWidgetVisibility ();
- }
- });
-
- /* Set the default state */
- enabledButton.setSelection(true);
- visibleButton.setSelection(true);
- }
-
- /**
- * Create the event console popup menu.
- */
- void createEventConsolePopup () {
- Menu popup = new Menu (eventConsole.getShell (), SWT.POP_UP);
- eventConsole.setMenu (popup);
-
- MenuItem cut = new MenuItem (popup, SWT.PUSH);
- cut.setText (ControlExample.getResourceString("MenuItem_Cut"));
- cut.addListener (SWT.Selection, new Listener () {
- public void handleEvent (Event event) {
- eventConsole.cut ();
- }
- });
- MenuItem copy = new MenuItem (popup, SWT.PUSH);
- copy.setText (ControlExample.getResourceString("MenuItem_Copy"));
- copy.addListener (SWT.Selection, new Listener () {
- public void handleEvent (Event event) {
- eventConsole.copy ();
- }
- });
- MenuItem paste = new MenuItem (popup, SWT.PUSH);
- paste.setText (ControlExample.getResourceString("MenuItem_Paste"));
- paste.addListener (SWT.Selection, new Listener () {
- public void handleEvent (Event event) {
- eventConsole.paste ();
- }
- });
- new MenuItem (popup, SWT.SEPARATOR);
- MenuItem selectAll = new MenuItem (popup, SWT.PUSH);
- selectAll.setText(ControlExample.getResourceString("MenuItem_SelectAll"));
- selectAll.addListener (SWT.Selection, new Listener () {
- public void handleEvent (Event event) {
- eventConsole.selectAll ();
- }
- });
- }
-
- /**
- * Creates the "Example" group. The "Example" group
- * is typically the left hand column in the tab.
- */
- void createExampleGroup () {
- exampleGroup = new Group (tabFolderPage, SWT.NONE);
- GridLayout gridLayout = new GridLayout ();
- exampleGroup.setLayout (gridLayout);
- exampleGroup.setLayoutData (new GridData (GridData.FILL_BOTH));
- }
-
- /**
- * Creates the "Example" widget children of the "Example" group.
- * Subclasses override this method to create the particular
- * example control.
- */
- void createExampleWidgets () {
- /* Do nothing */
- }
-
- /**
- * Creates and opens the "Listener selection" dialog.
- */
- void createListenerSelectionDialog () {
- final Shell dialog = new Shell (tabFolderPage.getShell (), SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL);
- dialog.setText (ControlExample.getResourceString ("Select_Listeners"));
- dialog.setLayout (new GridLayout (2, false));
- final Table table = new Table (dialog, SWT.BORDER | SWT.V_SCROLL | SWT.CHECK);
- GridData data = new GridData(GridData.FILL_BOTH);
- data.verticalSpan = 2;
- table.setLayoutData(data);
- for (int i = 0; i < EVENT_NAMES.length; i++) {
- TableItem item = new TableItem (table, SWT.NONE);
- item.setText (EVENT_NAMES[i]);
- item.setChecked (eventsFilter[i]);
- }
- final String [] customNames = getCustomEventNames ();
- for (int i = 0; i < customNames.length; i++) {
- TableItem item = new TableItem (table, SWT.NONE);
- item.setText (customNames[i]);
- item.setChecked (eventsFilter[EVENT_NAMES.length + i]);
- }
- Button selectAll = new Button (dialog, SWT.PUSH);
- selectAll.setText(ControlExample.getResourceString ("Select_All"));
- selectAll.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
- selectAll.addSelectionListener (new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- TableItem [] items = table.getItems();
- for (int i = 0; i < EVENT_NAMES.length; i++) {
- items[i].setChecked(true);
- }
- for (int i = 0; i < customNames.length; i++) {
- items[EVENT_NAMES.length + i].setChecked(true);
- }
- }
- });
- Button deselectAll = new Button (dialog, SWT.PUSH);
- deselectAll.setText(ControlExample.getResourceString ("Deselect_All"));
- deselectAll.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_BEGINNING));
- deselectAll.addSelectionListener (new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- TableItem [] items = table.getItems();
- for (int i = 0; i < EVENT_NAMES.length; i++) {
- items[i].setChecked(false);
- }
- for (int i = 0; i < customNames.length; i++) {
- items[EVENT_NAMES.length + i].setChecked(false);
- }
- }
- });
- Label filler = new Label(dialog, SWT.NONE);
- Button ok = new Button (dialog, SWT.PUSH);
- ok.setText(ControlExample.getResourceString ("OK"));
- dialog.setDefaultButton(ok);
- ok.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
- ok.addSelectionListener (new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- TableItem [] items = table.getItems();
- for (int i = 0; i < EVENT_NAMES.length; i++) {
- eventsFilter[i] = items[i].getChecked();
- }
- for (int i = 0; i < customNames.length; i++) {
- eventsFilter[EVENT_NAMES.length + i] = items[EVENT_NAMES.length + i].getChecked();
- }
- dialog.dispose();
- }
- });
- dialog.pack ();
- dialog.open ();
- while (! dialog.isDisposed()) {
- if (! dialog.getDisplay().readAndDispatch()) dialog.getDisplay().sleep();
- }
- }
-
- /**
- * Creates the "Listeners" group. The "Listeners" group
- * goes below the "Example" and "Control" groups.
- */
- void createListenersGroup () {
- listenersGroup = new Group (tabFolderPage, SWT.NONE);
- listenersGroup.setLayout (new GridLayout (3, false));
- GridData gridData = new GridData (GridData.HORIZONTAL_ALIGN_FILL | GridData.FILL_VERTICAL);
- gridData.horizontalSpan = 2;
- listenersGroup.setLayoutData (gridData);
- listenersGroup.setText (ControlExample.getResourceString ("Listeners"));
-
- /*
- * Create the button to access the 'Listeners' dialog.
- */
- Button listenersButton = new Button (listenersGroup, SWT.PUSH);
- listenersButton.setText (ControlExample.getResourceString ("Select_Listeners"));
- listenersButton.addSelectionListener (new SelectionAdapter() {
- public void widgetSelected (SelectionEvent e) {
- createListenerSelectionDialog ();
- recreateExampleWidgets ();
- }
- });
-
- /*
- * Create the checkbox to add/remove listeners to/from the example widgets.
- */
- final Button listenCheckbox = new Button (listenersGroup, SWT.CHECK);
- listenCheckbox.setText (ControlExample.getResourceString ("Listen"));
- listenCheckbox.addSelectionListener (new SelectionAdapter () {
- public void widgetSelected(SelectionEvent e) {
- logging = listenCheckbox.getSelection ();
- recreateExampleWidgets ();
- }
- });
-
- /*
- * Create the button to clear the text.
- */
- Button clearButton = new Button (listenersGroup, SWT.PUSH);
- clearButton.setText (ControlExample.getResourceString ("Clear"));
- clearButton.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
- clearButton.addSelectionListener (new SelectionAdapter() {
- public void widgetSelected (SelectionEvent e) {
- eventConsole.setText ("");
- }
- });
-
- /* Initialize the eventsFilter to log all events. */
- int customEventCount = getCustomEventNames ().length;
- eventsFilter = new boolean [EVENT_NAMES.length + customEventCount];
- for (int i = 0; i < EVENT_NAMES.length + customEventCount; i++) {
- eventsFilter [i] = true;
- }
-
- /* Create the event console Text. */
- eventConsole = new Text (listenersGroup, SWT.BORDER | SWT.MULTI | SWT.V_SCROLL | SWT.H_SCROLL);
- GridData data = new GridData (GridData.FILL_BOTH);
- data.horizontalSpan = 3;
- data.heightHint = 80;
- eventConsole.setLayoutData (data);
- createEventConsolePopup ();
- eventConsole.addKeyListener (new KeyAdapter () {
- public void keyPressed (KeyEvent e) {
- if ((e.keyCode == 'A' || e.keyCode == 'a') && (e.stateMask & SWT.MOD1) != 0) {
- eventConsole.selectAll ();
- e.doit = false;
- }
- }
- });
- }
-
- void createOrientationGroup () {
- /* Create Orientation group*/
- orientationGroup = new Group (controlGroup, SWT.NONE);
- orientationGroup.setLayout (new GridLayout());
- orientationGroup.setLayoutData (new GridData (GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL));
- orientationGroup.setText (ControlExample.getResourceString("Orientation"));
- defaultOrietationButton = new Button (orientationGroup, SWT.RADIO);
- defaultOrietationButton.setText (ControlExample.getResourceString("Default"));
- defaultOrietationButton.setSelection (true);
- ltrButton = new Button (orientationGroup, SWT.RADIO);
- ltrButton.setText ("SWT.LEFT_TO_RIGHT");
- rtlButton = new Button (orientationGroup, SWT.RADIO);
- rtlButton.setText ("SWT.RIGHT_TO_LEFT");
- }
-
- /**
- * Creates the "Size" group. The "Size" group contains
- * controls that allow the user to change the size of
- * the example widgets.
- */
- void createSizeGroup () {
- /* Create the group */
- sizeGroup = new Group (controlGroup, SWT.NONE);
- sizeGroup.setLayout (new GridLayout());
- sizeGroup.setLayoutData (new GridData (GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL));
- sizeGroup.setText (ControlExample.getResourceString("Size"));
-
- /* Create the controls */
-
- /*
- * The preferred size of a widget is the size returned
- * by widget.computeSize (SWT.DEFAULT, SWT.DEFAULT).
- * This size is defined on a widget by widget basis.
- * Many widgets will attempt to display their contents.
- */
- preferredButton = new Button (sizeGroup, SWT.RADIO);
- preferredButton.setText (ControlExample.getResourceString("Preferred"));
- tooSmallButton = new Button (sizeGroup, SWT.RADIO);
- tooSmallButton.setText (TOO_SMALL_SIZE + " X " + TOO_SMALL_SIZE);
- smallButton = new Button(sizeGroup, SWT.RADIO);
- smallButton.setText (SMALL_SIZE + " X " + SMALL_SIZE);
- largeButton = new Button (sizeGroup, SWT.RADIO);
- largeButton.setText (LARGE_SIZE + " X " + LARGE_SIZE);
- fillButton = new Button (sizeGroup, SWT.RADIO);
- fillButton.setText (ControlExample.getResourceString("Fill"));
-
- /* Add the listeners */
- SelectionAdapter selectionListener = new SelectionAdapter () {
- public void widgetSelected (SelectionEvent event) {
- if (!((Button) event.widget).getSelection ()) return;
- setExampleWidgetSize ();
- };
- };
- preferredButton.addSelectionListener(selectionListener);
- tooSmallButton.addSelectionListener(selectionListener);
- smallButton.addSelectionListener(selectionListener);
- largeButton.addSelectionListener(selectionListener);
- fillButton.addSelectionListener(selectionListener);
-
- /* Set the default state */
- preferredButton.setSelection (true);
- }
-
- /**
- * Creates the "Style" group. The "Style" group contains
- * controls that allow the user to change the style of
- * the example widgets. Changing a widget "Style" causes
- * the widget to be destroyed and recreated.
- */
- void createStyleGroup () {
- styleGroup = new Group (controlGroup, SWT.NONE);
- styleGroup.setLayout (new GridLayout ());
- styleGroup.setLayoutData (new GridData (GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL));
- styleGroup.setText (ControlExample.getResourceString("Styles"));
- }
-
- /**
- * Creates the tab folder page.
- *
- * @param tabFolder org.eclipse.swt.widgets.TabFolder
- * @return the new page for the tab folder
- */
- Composite createTabFolderPage (TabFolder tabFolder) {
- /*
- * Create a two column page.
- */
- tabFolderPage = new Composite (tabFolder, SWT.NONE);
- tabFolderPage.setLayout (new GridLayout (2, false));
-
- /* Create the "Example" and "Control" groups. */
- createExampleGroup ();
- createControlGroup ();
-
- /* Create the "Listeners" group under the "Control" group. */
- createListenersGroup ();
-
- /* Create and initialize the example and control widgets. */
- createExampleWidgets ();
- hookExampleWidgetListeners ();
- createControlWidgets ();
- setExampleWidgetState ();
-
- return tabFolderPage;
- }
-
- /**
- * Disposes the "Example" widgets.
- */
- void disposeExampleWidgets () {
- Control [] controls = getExampleWidgets ();
- for (int i=0; i<controls.length; i++) {
- controls [i].dispose ();
- }
- }
-
- void drawImage (Image image, Color color) {
- GC gc = new GC(image);
- gc.setBackground(color);
- Rectangle bounds = image.getBounds();
- gc.fillRectangle(0, 0, bounds.width, bounds.height);
- gc.drawRectangle(0, 0, bounds.width - 1, bounds.height - 1);
- gc.dispose();
- }
-
- /**
- * Gets the list of custom event names.
- *
- * @return an array containing custom event names
- */
- String [] getCustomEventNames () {
- return new String [0];
- }
-
- /**
- * Gets the default style for a widget
- *
- * @return the default style bit
- */
- int getDefaultStyle () {
- if (ltrButton != null && ltrButton.getSelection()) {
- return SWT.LEFT_TO_RIGHT;
- }
- if (rtlButton != null && rtlButton.getSelection()) {
- return SWT.RIGHT_TO_LEFT;
- }
- return SWT.NONE;
- }
-
- /**
- * Gets the "Example" widget children.
- *
- * @return an array containing the example widget children
- */
- Control [] getExampleWidgets () {
- return new Control [0];
- }
-
- /**
- * Gets the "Example" widget children's items, if any.
- *
- * @return an array containing the example widget children's items
- */
- Item [] getExampleWidgetItems () {
- return new Item [0];
- }
-
- /**
- * Gets the text for the tab folder item.
- *
- * @return the text for the tab item
- */
- String getTabText () {
- return "";
- }
-
- /**
- * Hooks all listeners to all example controls
- * and example control items.
- */
- void hookExampleWidgetListeners () {
- if (logging) {
- Control[] exampleControls = getExampleWidgets ();
- for (int i = 0; i < exampleControls.length; i++) {
- hookListeners (exampleControls [i]);
- }
- Item[] exampleItems = getExampleWidgetItems ();
- for (int i = 0; i < exampleItems.length; i++) {
- hookListeners (exampleItems [i]);
- }
- String [] customNames = getCustomEventNames ();
- for (int i = 0; i < customNames.length; i++) {
- if (eventsFilter [EVENT_NAMES.length + i]) hookCustomListener (customNames[i]);
- }
- }
- }
-
- /**
- * Hooks the custom listener specified by eventName.
- */
- void hookCustomListener (String eventName) {
- }
-
- /**
- * Hooks all listeners to the specified widget.
- */
- void hookListeners (Widget widget) {
- if (logging) {
- Listener listener = new Listener() {
- public void handleEvent (Event event) {
- log (event);
- }
- };
- for (int i = 0; i < EVENT_NAMES.length; i++) {
- if (eventsFilter [i]) widget.addListener (i + 1, listener);
- }
- }
- }
-
- /**
- * Logs an untyped event to the event console.
- */
- void log(Event event) {
- String toString = EVENT_NAMES[event.type - 1] + ": ";
- switch (event.type) {
- case SWT.KeyDown:
- case SWT.KeyUp: toString += new KeyEvent (event).toString (); break;
- case SWT.MouseDown:
- case SWT.MouseUp:
- case SWT.MouseMove:
- case SWT.MouseEnter:
- case SWT.MouseExit:
- case SWT.MouseDoubleClick:
- case SWT.MouseHover: toString += new MouseEvent (event).toString (); break;
- case SWT.Paint: toString += new PaintEvent (event).toString (); break;
- case SWT.Move:
- case SWT.Resize: toString += new ControlEvent (event).toString (); break;
- case SWT.Dispose: toString += new DisposeEvent (event).toString (); break;
- case SWT.Selection:
- case SWT.DefaultSelection: toString += new SelectionEvent (event).toString (); break;
- case SWT.FocusIn:
- case SWT.FocusOut: toString += new FocusEvent (event).toString (); break;
- case SWT.Expand:
- case SWT.Collapse: toString += new TreeEvent (event).toString (); break;
- case SWT.Iconify:
- case SWT.Deiconify:
- case SWT.Close:
- case SWT.Activate:
- case SWT.Deactivate: toString += new ShellEvent (event).toString (); break;
- case SWT.Show:
- case SWT.Hide: toString += (event.widget instanceof Menu) ? new MenuEvent (event).toString () : event.toString(); break;
- case SWT.Modify: toString += new ModifyEvent (event).toString (); break;
- case SWT.Verify: toString += new VerifyEvent (event).toString (); break;
- case SWT.Help: toString += new HelpEvent (event).toString (); break;
- case SWT.Arm: toString += new ArmEvent (event).toString (); break;
- case SWT.Traverse: toString += new TraverseEvent (event).toString (); break;
- case SWT.HardKeyDown:
- case SWT.HardKeyUp:
- case SWT.DragDetect:
- case SWT.MenuDetect:
- default: toString += event.toString ();
- }
- eventConsole.append (toString);
- eventConsole.append ("\n");
- }
-
- /**
- * Logs a typed event to the event console.
- */
- void log (String eventName, TypedEvent event) {
- eventConsole.append (eventName + ": ");
- eventConsole.append (event.toString ());
- eventConsole.append ("\n");
- }
-
- /**
- * Recreates the "Example" widgets.
- */
- void recreateExampleWidgets () {
- disposeExampleWidgets ();
- createExampleWidgets ();
- hookExampleWidgetListeners ();
- setExampleWidgetState ();
- }
-
- /**
- * Sets the foreground color, background color, and font
- * of the "Example" widgets to their default settings.
- * Subclasses may extend in order to reset other colors
- * and fonts to default settings as well.
- */
- void resetColorsAndFonts () {
- Color oldColor = foregroundColor;
- foregroundColor = null;
- setExampleWidgetForeground ();
- if (oldColor != null) oldColor.dispose();
- oldColor = backgroundColor;
- backgroundColor = null;
- setExampleWidgetBackground ();
- if (oldColor != null) oldColor.dispose();
- Font oldFont = font;
- font = null;
- setExampleWidgetFont ();
- setExampleWidgetSize ();
- if (oldFont != null) oldFont.dispose();
- }
-
- /**
- * Sets the background color of the "Example" widgets.
- */
- void setExampleWidgetBackground () {
- if (backgroundButton == null) return; // no background button on this tab
- Control [] controls = getExampleWidgets ();
- for (int i = 0; i < controls.length; i++) {
- controls[i].setBackground (backgroundColor);
- }
- // Set the background button's color to match the color just set.
- Color color = backgroundColor;
- if (controls.length == 0) return;
- if (color == null) color = controls [0].getBackground ();
- drawImage (backgroundImage, color);
- backgroundButton.setImage (backgroundImage);
- }
-
- /**
- * Sets the enabled state of the "Example" widgets.
- */
- void setExampleWidgetEnabled () {
- Control [] controls = getExampleWidgets ();
- for (int i=0; i<controls.length; i++) {
- controls [i].setEnabled (enabledButton.getSelection ());
- }
- }
-
- /**
- * Sets the font of the "Example" widgets.
- */
- void setExampleWidgetFont () {
- if (instance.startup) return;
- if (fontButton == null) return; // no font button on this tab
- Control [] controls = getExampleWidgets ();
- for (int i = 0; i < controls.length; i++) {
- Control control = controls[i];
- control.setFont(font);
- }
- }
-
- /**
- * Sets the foreground color of the "Example" widgets.
- */
- void setExampleWidgetForeground () {
- if (foregroundButton == null) return; // no foreground button on this tab
- Control [] controls = getExampleWidgets ();
- for (int i = 0; i < controls.length; i++) {
- controls[i].setForeground (foregroundColor);
- }
- // Set the foreground button's color to match the color just set.
- Color color = foregroundColor;
- if (controls.length == 0) return;
- if (color == null) color = controls [0].getForeground ();
- drawImage (foregroundImage, color);
- foregroundButton.setImage (foregroundImage);
- }
-
- /**
- * Sets the size of the "Example" widgets.
- */
- void setExampleWidgetSize () {
- int size = SWT.DEFAULT;
- if (preferredButton == null) return;
- if (preferredButton.getSelection()) size = SWT.DEFAULT;
- if (tooSmallButton.getSelection()) size = TOO_SMALL_SIZE;
- if (smallButton.getSelection()) size = SMALL_SIZE;
- if (largeButton.getSelection()) size = LARGE_SIZE;
- Control [] controls = getExampleWidgets ();
- for (int i=0; i<controls.length; i++) {
- GridData gridData;
- if (fillButton.getSelection()) {
- gridData = new GridData (GridData.FILL_BOTH);
- } else {
- gridData = new GridData ();
- gridData.widthHint = size;
- gridData.heightHint = size;
- }
- controls [i].setLayoutData (gridData);
- }
- /*
- * Force the entire widget tree to layout,
- * even when the child sizes may not have
- * changed.
- */
- int seenCount = 0;
- Composite [] seen = new Composite [4];
- for (int i=0; i<controls.length; i++) {
- Control control = controls [i];
- while (control != exampleGroup) {
- Composite parent = control.getParent ();
- int index = 0;
- while (index < seenCount) {
- if (seen [index] == parent) break;
- index++;
- }
- if (index == seenCount) parent.layout ();
- if (seenCount == seen.length) {
- Composite [] newSeen = new Composite [seen.length + 4];
- System.arraycopy (seen, 0, newSeen, 0, seen.length);
- seen = newSeen;
- }
- seen [seenCount++] = parent;
- control = control.getParent ();
- }
- }
- }
-
- /**
- * Sets the state of the "Example" widgets. Subclasses
- * reimplement this method to set "Example" widget state
- * that is specific to the widget.
- */
- void setExampleWidgetState () {
- setExampleWidgetEnabled ();
- setExampleWidgetVisibility ();
- setExampleWidgetBackground ();
- setExampleWidgetForeground ();
- setExampleWidgetFont ();
- setExampleWidgetSize ();
- }
-
- /**
- * Sets the visibility of the "Example" widgets.
- */
- void setExampleWidgetVisibility () {
- Control [] controls = getExampleWidgets ();
- for (int i=0; i<controls.length; i++) {
- controls [i].setVisible (visibleButton.getSelection ());
- }
- }
-}
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/TabFolderTab.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/TabFolderTab.java
deleted file mode 100644
index 29e0468f45..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/TabFolderTab.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.controlexample;
-
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-
-class TabFolderTab extends Tab {
- /* Example widgets and groups that contain them */
- TabFolder tabFolder1;
- Group tabFolderGroup;
-
- /* Style widgets added to the "Style" group */
- Button topButton, bottomButton;
-
- static String [] TabItems1 = {ControlExample.getResourceString("TabItem1_0"),
- ControlExample.getResourceString("TabItem1_1"),
- ControlExample.getResourceString("TabItem1_2")};
-
- /**
- * Creates the Tab within a given instance of ControlExample.
- */
- TabFolderTab(ControlExample instance) {
- super(instance);
- }
-
- /**
- * Creates the "Example" group.
- */
- void createExampleGroup () {
- super.createExampleGroup ();
-
- /* Create a group for the TabFolder */
- tabFolderGroup = new Group (exampleGroup, SWT.NONE);
- tabFolderGroup.setLayout (new GridLayout ());
- tabFolderGroup.setLayoutData (new GridData (GridData.GRAB_HORIZONTAL | GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL));
- tabFolderGroup.setText ("TabFolder");
- }
-
- /**
- * Creates the "Example" widgets.
- */
- void createExampleWidgets () {
-
- /* Compute the widget style */
- int style = getDefaultStyle();
- if (topButton.getSelection ()) style |= SWT.TOP;
- if (bottomButton.getSelection ()) style |= SWT.BOTTOM;
- if (borderButton.getSelection ()) style |= SWT.BORDER;
-
- /* Create the example widgets */
- tabFolder1 = new TabFolder (tabFolderGroup, style);
- for (int i = 0; i < TabItems1.length; i++) {
- TabItem item = new TabItem(tabFolder1, SWT.NONE);
- item.setText(TabItems1[i]);
- Text content = new Text(tabFolder1, SWT.WRAP | SWT.MULTI);
- content.setText(ControlExample.getResourceString("TabItem_content") + ": " + i);
- item.setControl(content);
- }
- }
-
- /**
- * Creates the "Style" group.
- */
- void createStyleGroup() {
- super.createStyleGroup ();
-
- /* Create the extra widgets */
- topButton = new Button (styleGroup, SWT.RADIO);
- topButton.setText ("SWT.TOP");
- topButton.setSelection(true);
- bottomButton = new Button (styleGroup, SWT.RADIO);
- bottomButton.setText ("SWT.BOTTOM");
- borderButton = new Button (styleGroup, SWT.CHECK);
- borderButton.setText ("SWT.BORDER");
-
- /* Add the listeners */
- SelectionListener selectionListener = new SelectionAdapter () {
- public void widgetSelected(SelectionEvent event) {
- if (!((Button) event.widget).getSelection ()) return;
- recreateExampleWidgets ();
- };
- };
- topButton.addSelectionListener (selectionListener);
- bottomButton.addSelectionListener (selectionListener);
- }
-
- /**
- * Gets the "Example" widget children's items, if any.
- *
- * @return an array containing the example widget children's items
- */
- Item [] getExampleWidgetItems () {
- return tabFolder1.getItems();
- }
-
- /**
- * Gets the "Example" widget children.
- */
- Control [] getExampleWidgets () {
- return new Control [] {tabFolder1};
- }
-
- /**
- * Gets the text for the tab folder item.
- */
- String getTabText () {
- return "TabFolder";
- }
-
- /**
- * Sets the state of the "Example" widgets.
- */
- void setExampleWidgetState () {
- super.setExampleWidgetState ();
- topButton.setSelection ((tabFolder1.getStyle () & SWT.TOP) != 0);
- bottomButton.setSelection ((tabFolder1.getStyle () & SWT.BOTTOM) != 0);
- borderButton.setSelection ((tabFolder1.getStyle () & SWT.BORDER) != 0);
- }
-}
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/TableTab.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/TableTab.java
deleted file mode 100755
index 719e318d16..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/TableTab.java
+++ /dev/null
@@ -1,379 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.controlexample;
-
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.events.*;
-
-class TableTab extends ScrollableTab {
- /* Example widgets and groups that contain them */
- Table table1;
- Group tableGroup, itemGroup;
-
- /* Style widgets added to the "Style" group */
- Button checkButton, fullSelectionButton, hideSelectionButton;
-
- /* Other widgets added to the "Other" group */
- Button headerVisibleButton, linesVisibleButton;
-
- /* Controls and resources added to the "Colors" group */
- Button itemForegroundButton, itemBackgroundButton, itemFontButton;
- Color itemForegroundColor, itemBackgroundColor;
- Image itemForegroundImage, itemBackgroundImage;
- Font itemFont;
-
- static String [] columnTitles = {ControlExample.getResourceString("TableTitle_0"),
- ControlExample.getResourceString("TableTitle_1"),
- ControlExample.getResourceString("TableTitle_2"),
- ControlExample.getResourceString("TableTitle_3")};
-
- static String [] stringLine0 = {ControlExample.getResourceString("TableLine0_0"),
- ControlExample.getResourceString("TableLine0_1"),
- ControlExample.getResourceString("TableLine0_2"),
- ControlExample.getResourceString("TableLine0_3")};
-
- static String [] stringLine1 = {ControlExample.getResourceString("TableLine1_0"),
- ControlExample.getResourceString("TableLine1_1"),
- ControlExample.getResourceString("TableLine1_2"),
- ControlExample.getResourceString("TableLine1_3")};
-
- static String [] stringLine2 = {ControlExample.getResourceString("TableLine2_0"),
- ControlExample.getResourceString("TableLine2_1"),
- ControlExample.getResourceString("TableLine2_2"),
- ControlExample.getResourceString("TableLine2_3")};
-
- /**
- * Creates the Tab within a given instance of ControlExample.
- */
- TableTab(ControlExample instance) {
- super(instance);
- }
-
- /**
- * Creates the "Colors" group.
- */
- void createColorGroup () {
- super.createColorGroup();
-
- itemGroup = new Group (colorGroup, SWT.NONE);
- itemGroup.setText (ControlExample.getResourceString ("Table_Item_Colors"));
- GridData data = new GridData ();
- data.horizontalSpan = 2;
- itemGroup.setLayoutData (data);
- itemGroup.setLayout (new GridLayout (2, false));
- new Label (itemGroup, SWT.NONE).setText (ControlExample.getResourceString ("Foreground_Color"));
- itemForegroundButton = new Button (itemGroup, SWT.PUSH);
- new Label (itemGroup, SWT.NONE).setText (ControlExample.getResourceString ("Background_Color"));
- itemBackgroundButton = new Button (itemGroup, SWT.PUSH);
- itemFontButton = new Button (itemGroup, SWT.PUSH);
- itemFontButton.setText(ControlExample.getResourceString("Font"));
- itemFontButton.setLayoutData(new GridData (GridData.HORIZONTAL_ALIGN_FILL));
-
- Shell shell = colorGroup.getShell ();
- final ColorDialog foregroundDialog = new ColorDialog (shell);
- final ColorDialog backgroundDialog = new ColorDialog (shell);
- final FontDialog fontDialog = new FontDialog (shell);
-
- int imageSize = 12;
- Display display = shell.getDisplay ();
- itemForegroundImage = new Image(display, imageSize, imageSize);
- itemBackgroundImage = new Image(display, imageSize, imageSize);
-
- /* Add listeners to set the colors and font */
- itemForegroundButton.setImage(itemForegroundImage);
- itemForegroundButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent event) {
- Color oldColor = itemForegroundColor;
- if (oldColor == null) oldColor = table1.getItem (0).getForeground ();
- foregroundDialog.setRGB(oldColor.getRGB());
- RGB rgb = foregroundDialog.open();
- if (rgb == null) return;
- oldColor = itemForegroundColor;
- itemForegroundColor = new Color (event.display, rgb);
- setItemForeground ();
- if (oldColor != null) oldColor.dispose ();
- }
- });
- itemBackgroundButton.setImage(itemBackgroundImage);
- itemBackgroundButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent event) {
- Color oldColor = itemBackgroundColor;
- if (oldColor == null) oldColor = table1.getItem (0).getBackground ();
- backgroundDialog.setRGB(oldColor.getRGB());
- RGB rgb = backgroundDialog.open();
- if (rgb == null) return;
- oldColor = itemBackgroundColor;
- itemBackgroundColor = new Color (event.display, rgb);
- setItemBackground ();
- if (oldColor != null) oldColor.dispose ();
- }
- });
- itemFontButton.addSelectionListener(new SelectionAdapter () {
- public void widgetSelected (SelectionEvent event) {
- Font oldFont = itemFont;
- if (oldFont == null) oldFont = table1.getItem (0).getFont ();
- fontDialog.setFontList(oldFont.getFontData());
- FontData fontData = fontDialog.open ();
- if (fontData == null) return;
- oldFont = itemFont;
- itemFont = new Font (event.display, fontData);
- setItemFont ();
- setExampleWidgetSize ();
- if (oldFont != null) oldFont.dispose ();
- }
- });
- shell.addDisposeListener(new DisposeListener() {
- public void widgetDisposed(DisposeEvent event) {
- if (itemBackgroundImage != null) itemBackgroundImage.dispose();
- if (itemForegroundImage != null) itemForegroundImage.dispose();
- if (itemBackgroundColor != null) itemBackgroundColor.dispose();
- if (itemForegroundColor != null) itemForegroundColor.dispose();
- if (itemFont != null) itemFont.dispose();
- itemBackgroundColor = null;
- itemForegroundColor = null;
- itemFont = null;
- }
- });
- }
-
- /**
- * Creates the "Other" group.
- */
- void createOtherGroup () {
- super.createOtherGroup ();
-
- /* Create display controls specific to this example */
- headerVisibleButton = new Button (otherGroup, SWT.CHECK);
- headerVisibleButton.setText (ControlExample.getResourceString("Header_Visible"));
- linesVisibleButton = new Button (otherGroup, SWT.CHECK);
- linesVisibleButton.setText (ControlExample.getResourceString("Lines_Visible"));
-
- /* Add the listeners */
- headerVisibleButton.addSelectionListener (new SelectionAdapter () {
- public void widgetSelected (SelectionEvent event) {
- setWidgetHeaderVisible ();
- }
- });
- linesVisibleButton.addSelectionListener (new SelectionAdapter () {
- public void widgetSelected (SelectionEvent event) {
- setWidgetLinesVisible ();
- };
- });
- }
-
- /**
- * Creates the "Example" group.
- */
- void createExampleGroup () {
- super.createExampleGroup ();
-
- /* Create a group for the table */
- tableGroup = new Group (exampleGroup, SWT.NONE);
- tableGroup.setLayout (new GridLayout ());
- tableGroup.setLayoutData (new GridData (GridData.GRAB_HORIZONTAL | GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL));
- tableGroup.setText ("Table");
- }
-
- /**
- * Creates the "Example" widgets.
- */
- void createExampleWidgets () {
- /* Compute the widget style */
- int style = getDefaultStyle();
- if (singleButton.getSelection ()) style |= SWT.SINGLE;
- if (multiButton.getSelection ()) style |= SWT.MULTI;
- if (verticalButton.getSelection ()) style |= SWT.V_SCROLL;
- if (horizontalButton.getSelection ()) style |= SWT.H_SCROLL;
- if (checkButton.getSelection ()) style |= SWT.CHECK;
- if (fullSelectionButton.getSelection ()) style |= SWT.FULL_SELECTION;
- if (hideSelectionButton.getSelection ()) style |= SWT.HIDE_SELECTION;
- if (borderButton.getSelection ()) style |= SWT.BORDER;
-
- /* Create the table widget */
- table1 = new Table (tableGroup, style);
-
- /* Fill the table with data */
- for (int i = 0; i < columnTitles.length; i++) {
- TableColumn tableColumn = new TableColumn(table1, SWT.NONE);
- tableColumn.setText(columnTitles[i]);
- }
- for (int i=0; i<16; i++) {
- TableItem item = new TableItem (table1, SWT.NONE);
- item.setImage (instance.images [i % 3]);
- switch (i % 3) {
- case 0:
- stringLine0 [0] = ControlExample.getResourceString("Index") + i;
- item.setText(stringLine0);
- break;
- case 1:
- stringLine1 [0] = ControlExample.getResourceString("Index") + i;
- item.setText(stringLine1);
- break;
- case 2:
- stringLine2 [0] = ControlExample.getResourceString("Index") + i;
- item.setText(stringLine2);
- break;
- }
- }
- for (int i = 0; i < columnTitles.length; i++) {
- TableColumn tableColumn = table1.getColumn(i);
- tableColumn.pack();
- }
- }
-
- /**
- * Creates the "Style" group.
- */
- void createStyleGroup () {
- super.createStyleGroup ();
-
- /* Create the extra widgets */
- checkButton = new Button (styleGroup, SWT.CHECK);
- checkButton.setText ("SWT.CHECK");
- fullSelectionButton = new Button (styleGroup, SWT.CHECK);
- fullSelectionButton.setText ("SWT.FULL_SELECTION");
- hideSelectionButton = new Button (styleGroup, SWT.CHECK);
- hideSelectionButton.setText ("SWT.HIDE_SELECTION");
- }
-
- /**
- * Gets the "Example" widget children's items, if any.
- *
- * @return an array containing the example widget children's items
- */
- Item [] getExampleWidgetItems () {
- Item [] columns = table1.getColumns();
- Item [] items = table1.getItems();
- Item [] allItems = new Item [columns.length + items.length];
- System.arraycopy(columns, 0, allItems, 0, columns.length);
- System.arraycopy(items, 0, allItems, columns.length, items.length);
- return allItems;
- }
-
- /**
- * Gets the "Example" widget children.
- */
- Control [] getExampleWidgets () {
- return new Control [] {table1};
- }
-
- /**
- * Gets the text for the tab folder item.
- */
- String getTabText () {
- return "Table";
- }
-
- /**
- * Sets the foreground color, background color, and font
- * of the "Example" widgets to their default settings.
- * Also sets foreground and background color of TableItem [0]
- * to default settings.
- */
- void resetColorsAndFonts () {
- super.resetColorsAndFonts ();
- Color oldColor = itemForegroundColor;
- itemForegroundColor = null;
- setItemForeground ();
- if (oldColor != null) oldColor.dispose();
- oldColor = itemBackgroundColor;
- itemBackgroundColor = null;
- setItemBackground ();
- if (oldColor != null) oldColor.dispose();
- Font oldFont = font;
- itemFont = null;
- setItemFont ();
- setExampleWidgetSize ();
- if (oldFont != null) oldFont.dispose();
- }
-
- /**
- * Sets the background color of TableItem [0].
- */
- void setItemBackground () {
- table1.getItem (0).setBackground (itemBackgroundColor);
- /* Set the background button's color to match the color just set. */
- Color color = itemBackgroundColor;
- if (color == null) color = table1.getItem (0).getBackground ();
- drawImage (itemBackgroundImage, color);
- itemBackgroundButton.setImage (itemBackgroundImage);
- }
-
- /**
- * Sets the foreground color of TableItem [0].
- */
- void setItemForeground () {
- table1.getItem (0).setForeground (itemForegroundColor);
- /* Set the foreground button's color to match the color just set. */
- Color color = itemForegroundColor;
- if (color == null) color = table1.getItem (0).getForeground ();
- drawImage (itemForegroundImage, color);
- itemForegroundButton.setImage (itemForegroundImage);
- }
-
- /**
- * Sets the font of TableItem 0.
- */
- void setItemFont () {
- if (instance.startup) return;
- table1.getItem (0).setFont (itemFont);
- packColumns ();
- }
-
- /**
- * Sets the font of the "Example" widgets.
- */
- void setExampleWidgetFont () {
- super.setExampleWidgetFont();
- packColumns ();
- }
-
- void packColumns () {
- for (int i = 0; i < columnTitles.length; i++) {
- TableColumn tableColumn = table1.getColumn(i);
- tableColumn.pack();
- }
- }
-
- /**
- * Sets the state of the "Example" widgets.
- */
- void setExampleWidgetState () {
- super.setExampleWidgetState ();
- setItemBackground ();
- setItemForeground ();
- setItemFont ();
- setExampleWidgetSize ();
- setWidgetHeaderVisible ();
- setWidgetLinesVisible ();
- checkButton.setSelection ((table1.getStyle () & SWT.CHECK) != 0);
- fullSelectionButton.setSelection ((table1.getStyle () & SWT.FULL_SELECTION) != 0);
- hideSelectionButton.setSelection ((table1.getStyle () & SWT.HIDE_SELECTION) != 0);
- }
-
- /**
- * Sets the header visible state of the "Example" widgets.
- */
- void setWidgetHeaderVisible () {
- table1.setHeaderVisible (headerVisibleButton.getSelection ());
- }
-
- /**
- * Sets the lines visible state of the "Example" widgets.
- */
- void setWidgetLinesVisible () {
- table1.setLinesVisible (linesVisibleButton.getSelection ());
- }
-}
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/TableTreeTab.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/TableTreeTab.java
deleted file mode 100644
index f2a7118a8a..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/TableTreeTab.java
+++ /dev/null
@@ -1,379 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.controlexample;
-
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.custom.*;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.widgets.*;
-
-class TableTreeTab extends ScrollableTab {
- /* Example widgets and groups that contain them */
- TableTree tree1;
- TableTreeItem node1;
- Group treeGroup, itemGroup;
-
- /* Style widgets added to the "Style" group */
- Button checkButton, fullSelectionButton;
-
- /* Controls and resources added to the "Colors" group */
- Button itemForegroundButton, itemBackgroundButton, itemFontButton;
- Color itemForegroundColor, itemBackgroundColor;
- Image itemForegroundImage, itemBackgroundImage;
- Font itemFont;
-
- /* Other widgets added to the "Other" group */
- Button headerVisibleButton, linesVisibleButton;
-
- /**
- * Creates the Tab within a given instance of ControlExample.
- */
- TableTreeTab(ControlExample instance) {
- super(instance);
- }
-
- /**
- * Creates the "Colors" group.
- */
- void createColorGroup () {
- super.createColorGroup();
-
- itemGroup = new Group (colorGroup, SWT.NONE);
- itemGroup.setText (ControlExample.getResourceString ("Tree_Item_Colors"));
- GridData data = new GridData ();
- data.horizontalSpan = 2;
- itemGroup.setLayoutData (data);
- itemGroup.setLayout (new GridLayout (2, false));
- new Label (itemGroup, SWT.NONE).setText (ControlExample.getResourceString ("Foreground_Color"));
- itemForegroundButton = new Button (itemGroup, SWT.PUSH);
- new Label (itemGroup, SWT.NONE).setText (ControlExample.getResourceString ("Background_Color"));
- itemBackgroundButton = new Button (itemGroup, SWT.PUSH);
- itemFontButton = new Button (itemGroup, SWT.PUSH);
- itemFontButton.setText(ControlExample.getResourceString("Font"));
- itemFontButton.setLayoutData(new GridData (GridData.HORIZONTAL_ALIGN_FILL));
-
- Shell shell = colorGroup.getShell ();
- final ColorDialog foregroundDialog = new ColorDialog (shell);
- final ColorDialog backgroundDialog = new ColorDialog (shell);
- final FontDialog fontDialog = new FontDialog (shell);
-
- int imageSize = 12;
- Display display = shell.getDisplay ();
- itemForegroundImage = new Image(display, imageSize, imageSize);
- itemBackgroundImage = new Image(display, imageSize, imageSize);
-
- /* Add listeners to set the colors and font */
- itemForegroundButton.setImage(itemForegroundImage);
- itemForegroundButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent event) {
- Color oldColor = itemForegroundColor;
- if (oldColor == null) oldColor = node1.getForeground ();
- foregroundDialog.setRGB(oldColor.getRGB());
- RGB rgb = foregroundDialog.open();
- if (rgb == null) return;
- oldColor = itemForegroundColor;
- itemForegroundColor = new Color (event.display, rgb);
- setItemForeground ();
- if (oldColor != null) oldColor.dispose ();
- }
- });
- itemBackgroundButton.setImage(itemBackgroundImage);
- itemBackgroundButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent event) {
- Color oldColor = itemBackgroundColor;
- if (oldColor == null) oldColor = node1.getBackground ();
- backgroundDialog.setRGB(oldColor.getRGB());
- RGB rgb = backgroundDialog.open();
- if (rgb == null) return;
- oldColor = itemBackgroundColor;
- itemBackgroundColor = new Color (event.display, rgb);
- setItemBackground ();
- if (oldColor != null) oldColor.dispose ();
- }
- });
- itemFontButton.addSelectionListener(new SelectionAdapter () {
- public void widgetSelected (SelectionEvent event) {
- Font oldFont = itemFont;
- if (oldFont == null) oldFont = node1.getFont ();
- fontDialog.setFontList(oldFont.getFontData());
- FontData fontData = fontDialog.open ();
- if (fontData == null) return;
- oldFont = itemFont;
- itemFont = new Font (event.display, fontData);
- setItemFont ();
- setExampleWidgetSize ();
- if (oldFont != null) oldFont.dispose ();
- }
- });
- shell.addDisposeListener(new DisposeListener() {
- public void widgetDisposed(DisposeEvent event) {
- if (itemBackgroundImage != null) itemBackgroundImage.dispose();
- if (itemForegroundImage != null) itemForegroundImage.dispose();
- if (itemBackgroundColor != null) itemBackgroundColor.dispose();
- if (itemForegroundColor != null) itemForegroundColor.dispose();
- if (itemFont != null) itemFont.dispose();
- itemBackgroundColor = null;
- itemForegroundColor = null;
- itemFont = null;
- }
- });
- }
-
- /**
- * Creates the "Other" group.
- */
- void createOtherGroup () {
- super.createOtherGroup ();
-
- /* Create display controls specific to this example */
- headerVisibleButton = new Button (otherGroup, SWT.CHECK);
- headerVisibleButton.setText (ControlExample.getResourceString("Header_Visible"));
- linesVisibleButton = new Button (otherGroup, SWT.CHECK);
- linesVisibleButton.setText (ControlExample.getResourceString("Lines_Visible"));
-
- /* Add the listeners */
- headerVisibleButton.addSelectionListener (new SelectionAdapter () {
- public void widgetSelected (SelectionEvent event) {
- setWidgetHeaderVisible();
- }
- });
- linesVisibleButton.addSelectionListener (new SelectionAdapter () {
- public void widgetSelected (SelectionEvent event) {
- setWidgetLinesVisible();
- };
- });
- }
-
- /**
- * Creates the "Example" group.
- */
- void createExampleGroup () {
- super.createExampleGroup ();
-
- /* Create a group for the text tree */
- treeGroup = new Group (exampleGroup, SWT.NONE);
- treeGroup.setLayout (new GridLayout ());
- treeGroup.setLayoutData (new GridData (GridData.GRAB_HORIZONTAL | GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL));
- treeGroup.setText ("TableTree");
- }
-
- /**
- * Creates the "Example" widgets.
- */
- void createExampleWidgets () {
- /* Compute the widget style */
- int style = getDefaultStyle();
- if (singleButton.getSelection()) style |= SWT.SINGLE;
- if (multiButton.getSelection()) style |= SWT.MULTI;
- if (checkButton.getSelection()) style |= SWT.CHECK;
- if (borderButton.getSelection()) style |= SWT.BORDER;
- if (fullSelectionButton.getSelection()) style |= SWT.FULL_SELECTION;
-
- /* Create the text tree */
- tree1 = new TableTree (treeGroup, style);
- Table table = tree1.getTable();
- for (int i = 0; i < 3; i++) {
- TableColumn column = new TableColumn (table,SWT.NONE);
- column.setWidth(100);
- column.setText(ControlExample.getResourceString("TableTree_column") + ": " + i);
- }
- node1 = new TableTreeItem (tree1, SWT.NONE);
- for (int i = 0; i < 3; i++) {
- node1.setText (i, ControlExample.getResourceString("Node_1") + "-" + i);
- }
- node1.setImage (instance.images[ControlExample.ciOpenFolder]);
- TableTreeItem node2 = new TableTreeItem (tree1, SWT.NONE);
- for (int i = 0; i < 3; i++) {
- node2.setText (i, ControlExample.getResourceString("Node_2") + "-" + i);
- }
- node2.setImage (instance.images[ControlExample.ciClosedFolder]);
- TableTreeItem node3 = new TableTreeItem (tree1, SWT.NONE);
- for (int i = 0; i < 3; i++) {
- node3.setText (i, ControlExample.getResourceString("Node_3") + "-" + i);
- }
- node3.setImage (instance.images[ControlExample.ciTarget]);
- TableTreeItem node4 = new TableTreeItem (tree1, SWT.NONE);
- for (int i = 0; i < 3; i++) {
- node4.setText (i, ControlExample.getResourceString("Node_4") + "-" + i);
- }
- node4.setImage (instance.images[ControlExample.ciOpenFolder]);
- TableTreeItem node1_1 = new TableTreeItem (node1, SWT.NONE);
- for (int i = 0; i < 3; i++) {
- node1_1.setText (i, ControlExample.getResourceString("Node_1_1") + "-" + i);
- }
- node1_1.setImage (instance.images[ControlExample.ciClosedFolder]);
- TableTreeItem node2_1 = new TableTreeItem (node2, SWT.NONE);
- for (int i = 0; i < 3; i++) {
- node2_1.setText (i, ControlExample.getResourceString("Node_2_1") + "-" + i);
- }
- node2_1.setImage (instance.images[ControlExample.ciTarget]);
- TableTreeItem node3_1 = new TableTreeItem (node3, SWT.NONE);
- for (int i = 0; i < 3; i++) {
- node3_1.setText (i, ControlExample.getResourceString("Node_3_1") + "-" + i);
- }
- node3_1.setImage (instance.images[ControlExample.ciOpenFolder]);
- TableTreeItem node2_2 = new TableTreeItem (node2, SWT.NONE);
- for (int i = 0; i < 3; i++) {
- node2_2.setText (i, ControlExample.getResourceString("Node_2_2") + "-" + i);
- }
- node2_2.setImage (instance.images[ControlExample.ciClosedFolder]);
- TableTreeItem node2_2_1 = new TableTreeItem (node2_2, SWT.NONE);
- for (int i = 0; i < 3; i++) {
- node2_2_1.setText (i, ControlExample.getResourceString("Node_2_2_1") + "-" + i);
- }
- node2_2_1.setImage (instance.images[ControlExample.ciTarget]);
- }
-
- /**
- * Creates the "Style" group.
- */
- void createStyleGroup() {
- super.createStyleGroup();
-
- /* Create the extra widgets */
- checkButton = new Button (styleGroup, SWT.CHECK);
- checkButton.setText ("SWT.CHECK");
- fullSelectionButton = new Button (styleGroup, SWT.CHECK);
- fullSelectionButton.setText ("SWT.FULL_SELECTION");
- }
-
- /**
- * Creates the tab folder page.
- *
- * @param tabFolder org.eclipse.swt.widgets.TabFolder
- * @return the new page for the tab folder
- */
- Composite createTabFolderPage (TabFolder tabFolder) {
- super.createTabFolderPage (tabFolder);
-
- /*
- * Add a resize listener to the tabFolderPage so that
- * if the user types into the example widget to change
- * its preferred size, and then resizes the shell, we
- * recalculate the preferred size correctly.
- */
- tabFolderPage.addControlListener(new ControlAdapter() {
- public void controlResized(ControlEvent e) {
- setExampleWidgetSize ();
- }
- });
-
- return tabFolderPage;
- }
-
- /**
- * Gets the "Example" widget children's items, if any.
- *
- * @return an array containing the example widget children's items
- */
- Item [] getExampleWidgetItems () {
- return tree1.getItems();
- }
-
- /**
- * Gets the "Example" widget children.
- */
- Control [] getExampleWidgets () {
- return new Control [] {tree1};
- }
-
- /**
- * Gets the text for the tab folder item.
- */
- String getTabText () {
- return "TableTree";
- }
-
- /**
- * Sets the foreground color, background color, and font
- * of the "Example" widgets to their default settings.
- * Also sets foreground and background color of the Node 1
- * TreeItems to default settings.
- */
- void resetColorsAndFonts () {
- super.resetColorsAndFonts ();
- Color oldColor = itemForegroundColor;
- itemForegroundColor = null;
- setItemForeground ();
- if (oldColor != null) oldColor.dispose();
- oldColor = itemBackgroundColor;
- itemBackgroundColor = null;
- setItemBackground ();
- if (oldColor != null) oldColor.dispose();
- Font oldFont = font;
- itemFont = null;
- setItemFont ();
- setExampleWidgetSize ();
- if (oldFont != null) oldFont.dispose();
- }
-
- /**
- * Sets the state of the "Example" widgets.
- */
- void setExampleWidgetState () {
- super.setExampleWidgetState ();
- setItemBackground ();
- setItemForeground ();
- setItemFont ();
- setExampleWidgetSize ();
- setWidgetHeaderVisible ();
- setWidgetLinesVisible ();
- }
-
- /**
- * Sets the background color of the Node 1 TreeItems.
- */
- void setItemBackground () {
- node1.setBackground (itemBackgroundColor);
- /* Set the background button's color to match the color just set. */
- Color color = itemBackgroundColor;
- if (color == null) color = node1.getBackground ();
- drawImage (itemBackgroundImage, color);
- itemBackgroundButton.setImage (itemBackgroundImage);
- }
-
- /**
- * Sets the foreground color of the Node 1 TreeItems.
- */
- void setItemForeground () {
- node1.setForeground (itemForegroundColor);
- /* Set the foreground button's color to match the color just set. */
- Color color = itemForegroundColor;
- if (color == null) color = node1.getForeground ();
- drawImage (itemForegroundImage, color);
- itemForegroundButton.setImage (itemForegroundImage);
- }
-
- /**
- * Sets the font of the Node 1 TreeItems.
- */
- void setItemFont () {
- if (instance.startup) return;
- node1.setFont (itemFont);
- }
-
- /**
- * Sets the header visible state of the "Example" widgets.
- */
- void setWidgetHeaderVisible () {
- tree1.getTable().setHeaderVisible (headerVisibleButton.getSelection ());
- }
-
- /**
- * Sets the lines visible state of the "Example" widgets.
- */
- void setWidgetLinesVisible () {
- tree1.getTable().setLinesVisible (linesVisibleButton.getSelection ());
- }
-}
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/TextTab.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/TextTab.java
deleted file mode 100755
index 74587b0c02..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/TextTab.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.controlexample;
-
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.layout.*;
-
-class TextTab extends ScrollableTab {
- /* Example widgets and groups that contain them */
- Text text;
- Group textGroup;
-
- /* Style widgets added to the "Style" group */
- Button wrapButton, readOnlyButton;
-
- /**
- * Creates the Tab within a given instance of ControlExample.
- */
- TextTab(ControlExample instance) {
- super(instance);
- }
-
- /**
- * Creates a bitmap image.
- */
- Image createBitmapImage (Display display, String name) {
- ImageData source = new ImageData(ControlExample.class.getResourceAsStream(name + ".bmp"));
- ImageData mask = new ImageData(ControlExample.class.getResourceAsStream(name + "_mask.bmp"));
- return new Image (display, source, mask);
- }
-
- /**
- * Creates the "Example" group.
- */
- void createExampleGroup () {
- super.createExampleGroup ();
-
- /* Create a group for the text widget */
- textGroup = new Group (exampleGroup, SWT.NONE);
- textGroup.setLayout (new GridLayout ());
- textGroup.setLayoutData (new GridData (GridData.GRAB_HORIZONTAL | GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL));
- textGroup.setText ("Text");
- }
-
- /**
- * Creates the "Example" widgets.
- */
- void createExampleWidgets () {
-
- /* Compute the widget style */
- int style = getDefaultStyle();
- if (singleButton.getSelection ()) style |= SWT.SINGLE;
- if (multiButton.getSelection ()) style |= SWT.MULTI;
- if (horizontalButton.getSelection ()) style |= SWT.H_SCROLL;
- if (verticalButton.getSelection ()) style |= SWT.V_SCROLL;
- if (wrapButton.getSelection ()) style |= SWT.WRAP;
- if (readOnlyButton.getSelection ()) style |= SWT.READ_ONLY;
- if (borderButton.getSelection ()) style |= SWT.BORDER;
-
- /* Create the example widgets */
- text = new Text (textGroup, style);
- text.setText (ControlExample.getResourceString("Example_string") + Text.DELIMITER + ControlExample.getResourceString("One_Two_Three"));
- }
-
- /**
- * Creates the "Style" group.
- */
- void createStyleGroup() {
- super.createStyleGroup();
-
- /* Create the extra widgets */
- wrapButton = new Button (styleGroup, SWT.CHECK);
- wrapButton.setText ("SWT.WRAP");
- readOnlyButton = new Button (styleGroup, SWT.CHECK);
- readOnlyButton.setText ("SWT.READ_ONLY");
- }
-
- /**
- * Creates the tab folder page.
- *
- * @param tabFolder org.eclipse.swt.widgets.TabFolder
- * @return the new page for the tab folder
- */
- Composite createTabFolderPage (TabFolder tabFolder) {
- super.createTabFolderPage (tabFolder);
-
- /*
- * Add a resize listener to the tabFolderPage so that
- * if the user types into the example widget to change
- * its preferred size, and then resizes the shell, we
- * recalculate the preferred size correctly.
- */
- tabFolderPage.addControlListener(new ControlAdapter() {
- public void controlResized(ControlEvent e) {
- setExampleWidgetSize ();
- }
- });
-
- return tabFolderPage;
- }
-
- /**
- * Gets the "Example" widget children.
- */
- Control [] getExampleWidgets () {
- return new Control [] {text};
- }
-
- /**
- * Gets the text for the tab folder item.
- */
- String getTabText () {
- return "Text";
- }
-
- /**
- * Sets the state of the "Example" widgets.
- */
- void setExampleWidgetState () {
- super.setExampleWidgetState ();
- wrapButton.setSelection ((text.getStyle () & SWT.WRAP) != 0);
- readOnlyButton.setSelection ((text.getStyle () & SWT.READ_ONLY) != 0);
- horizontalButton.setEnabled ((text.getStyle () & SWT.MULTI) != 0);
- verticalButton.setEnabled ((text.getStyle () & SWT.MULTI) != 0);
- }
-}
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/ToolBarTab.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/ToolBarTab.java
deleted file mode 100755
index 8fdfc27f32..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/ToolBarTab.java
+++ /dev/null
@@ -1,282 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.controlexample;
-
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.events.*;
-
-class ToolBarTab extends Tab {
- /* Example widgets and groups that contain them */
- ToolBar imageToolBar, textToolBar;
- Group imageToolBarGroup, textToolBarGroup;
-
- /* Style widgets added to the "Style" group */
- Button horizontalButton, verticalButton, flatButton, shadowOutButton, wrapButton, rightButton;
-
- /**
- * Creates the Tab within a given instance of ControlExample.
- */
- ToolBarTab(ControlExample instance) {
- super(instance);
- }
-
- /**
- * Creates the "Example" group.
- */
- void createExampleGroup () {
- super.createExampleGroup ();
-
- /* Create a group for the image tool bar */
- imageToolBarGroup = new Group (exampleGroup, SWT.NONE);
- imageToolBarGroup.setLayout (new GridLayout ());
- imageToolBarGroup.setLayoutData (new GridData (GridData.GRAB_HORIZONTAL | GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL));
- imageToolBarGroup.setText (ControlExample.getResourceString("Image_ToolBar"));
-
- /* Create a group for the text tool bar */
- textToolBarGroup = new Group (exampleGroup, SWT.NONE);
- textToolBarGroup.setLayout (new GridLayout ());
- textToolBarGroup.setLayoutData (new GridData (GridData.GRAB_HORIZONTAL | GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL));
- textToolBarGroup.setText (ControlExample.getResourceString("Text_ToolBar"));
- }
-
- /**
- * Creates the "Example" widgets.
- */
- void createExampleWidgets () {
-
- /* Compute the widget style */
- int style = getDefaultStyle();
- if (horizontalButton.getSelection()) style |= SWT.HORIZONTAL;
- if (verticalButton.getSelection()) style |= SWT.VERTICAL;
- if (flatButton.getSelection()) style |= SWT.FLAT;
- if (wrapButton.getSelection()) style |= SWT.WRAP;
- if (borderButton.getSelection()) style |= SWT.BORDER;
- if (shadowOutButton.getSelection()) style |= SWT.SHADOW_OUT;
- if (rightButton.getSelection()) style |= SWT.RIGHT;
-
- /*
- * Create the example widgets.
- *
- * A tool bar must consist of all image tool
- * items or all text tool items but not both.
- */
-
- /* Create the image tool bar */
- imageToolBar = new ToolBar (imageToolBarGroup, style);
- ToolItem item = new ToolItem (imageToolBar, SWT.PUSH);
- item.setImage (instance.images[ControlExample.ciClosedFolder]);
- item.setToolTipText("SWT.PUSH");
- item = new ToolItem (imageToolBar, SWT.PUSH);
- item.setImage (instance.images[ControlExample.ciClosedFolder]);
- item.setToolTipText ("SWT.PUSH");
- item = new ToolItem (imageToolBar, SWT.RADIO);
- item.setImage (instance.images[ControlExample.ciOpenFolder]);
- item.setToolTipText ("SWT.RADIO");
- item = new ToolItem (imageToolBar, SWT.RADIO);
- item.setImage (instance.images[ControlExample.ciOpenFolder]);
- item.setToolTipText ("SWT.RADIO");
- item = new ToolItem (imageToolBar, SWT.CHECK);
- item.setImage (instance.images[ControlExample.ciTarget]);
- item.setToolTipText ("SWT.CHECK");
- item = new ToolItem (imageToolBar, SWT.RADIO);
- item.setImage (instance.images[ControlExample.ciClosedFolder]);
- item.setToolTipText ("SWT.RADIO");
- item = new ToolItem (imageToolBar, SWT.RADIO);
- item.setImage (instance.images[ControlExample.ciClosedFolder]);
- item.setToolTipText ("SWT.RADIO");
- item = new ToolItem (imageToolBar, SWT.SEPARATOR);
- item.setToolTipText("SWT.SEPARATOR");
- item = new ToolItem (imageToolBar, SWT.DROP_DOWN);
- item.setImage (instance.images[ControlExample.ciTarget]);
- item.setToolTipText ("SWT.DROP_DOWN");
- item.addSelectionListener(new DropDownSelectionListener());
-
- /* Create the text tool bar */
- textToolBar = new ToolBar (textToolBarGroup, style);
- item = new ToolItem (textToolBar, SWT.PUSH);
- item.setText (ControlExample.getResourceString("Push"));
- item.setToolTipText("SWT.PUSH");
- item = new ToolItem (textToolBar, SWT.PUSH);
- item.setText (ControlExample.getResourceString("Push"));
- item.setToolTipText("SWT.PUSH");
- item = new ToolItem (textToolBar, SWT.RADIO);
- item.setText (ControlExample.getResourceString("Radio"));
- item.setToolTipText("SWT.RADIO");
- item = new ToolItem (textToolBar, SWT.RADIO);
- item.setText (ControlExample.getResourceString("Radio"));
- item.setToolTipText("SWT.RADIO");
- item = new ToolItem (textToolBar, SWT.CHECK);
- item.setText (ControlExample.getResourceString("Check"));
- item.setToolTipText("SWT.CHECK");
- item = new ToolItem (textToolBar, SWT.RADIO);
- item.setText (ControlExample.getResourceString("Radio"));
- item.setToolTipText("SWT.RADIO");
- item = new ToolItem (textToolBar, SWT.RADIO);
- item.setText (ControlExample.getResourceString("Radio"));
- item.setToolTipText("SWT.RADIO");
- item = new ToolItem (textToolBar, SWT.SEPARATOR);
- item.setToolTipText("SWT.SEPARATOR");
- item = new ToolItem (textToolBar, SWT.DROP_DOWN);
- item.setText (ControlExample.getResourceString("Drop_Down"));
- item.setToolTipText("SWT.DROP_DOWN");
- item.addSelectionListener(new DropDownSelectionListener());
-
- /*
- * Do not add the selection event for this drop down
- * tool item. Without hooking the event, the drop down
- * widget does nothing special when the drop down area
- * is selected.
- */
- }
-
- /**
- * Creates the "Style" group.
- */
- void createStyleGroup() {
- super.createStyleGroup();
-
- /* Create the extra widgets */
- horizontalButton = new Button (styleGroup, SWT.RADIO);
- horizontalButton.setText ("SWT.HORIZONTAL");
- verticalButton = new Button (styleGroup, SWT.RADIO);
- verticalButton.setText ("SWT.VERTICAL");
- flatButton = new Button (styleGroup, SWT.CHECK);
- flatButton.setText ("SWT.FLAT");
- shadowOutButton = new Button (styleGroup, SWT.CHECK);
- shadowOutButton.setText ("SWT.SHADOW_OUT");
- wrapButton = new Button (styleGroup, SWT.CHECK);
- wrapButton.setText ("SWT.WRAP");
- rightButton = new Button (styleGroup, SWT.CHECK);
- rightButton.setText ("SWT.RIGHT");
- borderButton = new Button (styleGroup, SWT.CHECK);
- borderButton.setText ("SWT.BORDER");
- }
-
- void disposeExampleWidgets () {
- super.disposeExampleWidgets ();
- }
-
- /**
- * Gets the "Example" widget children's items, if any.
- *
- * @return an array containing the example widget children's items
- */
- Item [] getExampleWidgetItems () {
- Item [] imageToolBarItems = imageToolBar.getItems();
- Item [] textToolBarItems = textToolBar.getItems();
- Item [] allItems = new Item [imageToolBarItems.length + textToolBarItems.length];
- System.arraycopy(imageToolBarItems, 0, allItems, 0, imageToolBarItems.length);
- System.arraycopy(textToolBarItems, 0, allItems, imageToolBarItems.length, textToolBarItems.length);
- return allItems;
- }
-
- /**
- * Gets the "Example" widget children.
- */
- Control [] getExampleWidgets () {
- return new Control [] {imageToolBar, textToolBar};
- }
-
- /**
- * Gets the text for the tab folder item.
- */
- String getTabText () {
- return "ToolBar";
- }
-
- /**
- * Sets the state of the "Example" widgets.
- */
- void setExampleWidgetState () {
- super.setExampleWidgetState ();
- horizontalButton.setSelection ((imageToolBar.getStyle () & SWT.HORIZONTAL) != 0);
- verticalButton.setSelection ((imageToolBar.getStyle () & SWT.VERTICAL) != 0);
- flatButton.setSelection ((imageToolBar.getStyle () & SWT.FLAT) != 0);
- wrapButton.setSelection ((imageToolBar.getStyle () & SWT.WRAP) != 0);
- shadowOutButton.setSelection ((imageToolBar.getStyle () & SWT.SHADOW_OUT) != 0);
- borderButton.setSelection ((imageToolBar.getStyle () & SWT.BORDER) != 0);
- rightButton.setSelection ((imageToolBar.getStyle () & SWT.RIGHT) != 0);
- }
-
- /**
- * Listens to widgetSelected() events on SWT.DROP_DOWN type ToolItems
- * and opens/closes a menu when appropriate.
- */
- class DropDownSelectionListener extends SelectionAdapter {
- private Menu menu = null;
- private boolean visible = false;
-
- public void widgetSelected(SelectionEvent event) {
- // Create the menu if it has not already been created
- if (menu == null) {
- // Lazy create the menu.
- Shell shell = tabFolderPage.getShell();
- menu = new Menu(shell);
- for (int i = 0; i < 9; ++i) {
- final String text = ControlExample.getResourceString("DropDownData_" + i);
- if (text.length() != 0) {
- MenuItem menuItem = new MenuItem(menu, SWT.NONE);
- menuItem.setText(text);
- /*
- * Add a menu selection listener so that the menu is hidden
- * when the user selects an item from the drop down menu.
- */
- menuItem.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- setMenuVisible(false);
- }
- });
- } else {
- new MenuItem(menu, SWT.SEPARATOR);
- }
- }
- }
-
- /**
- * A selection event will be fired when a drop down tool
- * item is selected in the main area and in the drop
- * down arrow. Examine the event detail to determine
- * where the widget was selected.
- */
- if (event.detail == SWT.ARROW) {
- /*
- * The drop down arrow was selected.
- */
- if (visible) {
- // Hide the menu to give the Arrow the appearance of being a toggle button.
- setMenuVisible(false);
- } else {
- // Position the menu below and vertically aligned with the the drop down tool button.
- final ToolItem toolItem = (ToolItem) event.widget;
- final ToolBar toolBar = toolItem.getParent();
-
- Rectangle toolItemBounds = toolItem.getBounds();
- Point point = toolBar.toDisplay(new Point(toolItemBounds.x, toolItemBounds.y));
- menu.setLocation(point.x, point.y + toolItemBounds.height);
- setMenuVisible(true);
- }
- } else {
- /*
- * Main area of drop down tool item selected.
- * An application would invoke the code to perform the action for the tool item.
- */
- }
- }
- private void setMenuVisible(boolean visible) {
- menu.setVisible(visible);
- this.visible = visible;
- }
- }
-}
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/TreeTab.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/TreeTab.java
deleted file mode 100755
index 50fa0c2efd..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/TreeTab.java
+++ /dev/null
@@ -1,305 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.controlexample;
-
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.events.*;
-
-class TreeTab extends ScrollableTab {
- /* Example widgets and groups that contain them */
- Tree tree1, tree2;
- TreeItem textNode1, imageNode1;
- Group treeGroup, imageTreeGroup, itemGroup;
-
- /* Style widgets added to the "Style" group */
- Button checkButton;
-
- /* Controls and resources added to the "Colors" group */
- Button itemForegroundButton, itemBackgroundButton, itemFontButton;
- Color itemForegroundColor, itemBackgroundColor;
- Image itemForegroundImage, itemBackgroundImage;
- Font itemFont;
-
- /**
- * Creates the Tab within a given instance of ControlExample.
- */
- TreeTab(ControlExample instance) {
- super(instance);
- }
-
- /**
- * Creates the "Colors" group.
- */
- void createColorGroup () {
- super.createColorGroup();
-
- itemGroup = new Group (colorGroup, SWT.NONE);
- itemGroup.setText (ControlExample.getResourceString ("Tree_Item_Colors"));
- GridData data = new GridData ();
- data.horizontalSpan = 2;
- itemGroup.setLayoutData (data);
- itemGroup.setLayout (new GridLayout (2, false));
- new Label (itemGroup, SWT.NONE).setText (ControlExample.getResourceString ("Foreground_Color"));
- itemForegroundButton = new Button (itemGroup, SWT.PUSH);
- new Label (itemGroup, SWT.NONE).setText (ControlExample.getResourceString ("Background_Color"));
- itemBackgroundButton = new Button (itemGroup, SWT.PUSH);
- itemFontButton = new Button (itemGroup, SWT.PUSH);
- itemFontButton.setText(ControlExample.getResourceString("Font"));
- itemFontButton.setLayoutData(new GridData (GridData.HORIZONTAL_ALIGN_FILL));
-
- Shell shell = colorGroup.getShell ();
- final ColorDialog foregroundDialog = new ColorDialog (shell);
- final ColorDialog backgroundDialog = new ColorDialog (shell);
- final FontDialog fontDialog = new FontDialog (shell);
-
- int imageSize = 12;
- Display display = shell.getDisplay ();
- itemForegroundImage = new Image(display, imageSize, imageSize);
- itemBackgroundImage = new Image(display, imageSize, imageSize);
-
- /* Add listeners to set the colors and font */
- itemForegroundButton.setImage(itemForegroundImage);
- itemForegroundButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent event) {
- Color oldColor = itemForegroundColor;
- if (oldColor == null) oldColor = textNode1.getForeground ();
- foregroundDialog.setRGB(oldColor.getRGB());
- RGB rgb = foregroundDialog.open();
- if (rgb == null) return;
- oldColor = itemForegroundColor;
- itemForegroundColor = new Color (event.display, rgb);
- setItemForeground ();
- if (oldColor != null) oldColor.dispose ();
- }
- });
- itemBackgroundButton.setImage(itemBackgroundImage);
- itemBackgroundButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent event) {
- Color oldColor = itemBackgroundColor;
- if (oldColor == null) oldColor = textNode1.getBackground ();
- backgroundDialog.setRGB(oldColor.getRGB());
- RGB rgb = backgroundDialog.open();
- if (rgb == null) return;
- oldColor = itemBackgroundColor;
- itemBackgroundColor = new Color (event.display, rgb);
- setItemBackground ();
- if (oldColor != null) oldColor.dispose ();
- }
- });
- itemFontButton.addSelectionListener(new SelectionAdapter () {
- public void widgetSelected (SelectionEvent event) {
- Font oldFont = itemFont;
- if (oldFont == null) oldFont = textNode1.getFont ();
- fontDialog.setFontList(oldFont.getFontData());
- FontData fontData = fontDialog.open ();
- if (fontData == null) return;
- oldFont = itemFont;
- itemFont = new Font (event.display, fontData);
- setItemFont ();
- setExampleWidgetSize ();
- if (oldFont != null) oldFont.dispose ();
- }
- });
- shell.addDisposeListener(new DisposeListener() {
- public void widgetDisposed(DisposeEvent event) {
- if (itemBackgroundImage != null) itemBackgroundImage.dispose();
- if (itemForegroundImage != null) itemForegroundImage.dispose();
- if (itemBackgroundColor != null) itemBackgroundColor.dispose();
- if (itemForegroundColor != null) itemForegroundColor.dispose();
- if (itemFont != null) itemFont.dispose();
- itemBackgroundColor = null;
- itemForegroundColor = null;
- itemFont = null;
- }
- });
- }
-
- /**
- * Creates the "Example" group.
- */
- void createExampleGroup () {
- super.createExampleGroup ();
-
- /* Create a group for the text tree */
- treeGroup = new Group (exampleGroup, SWT.NONE);
- treeGroup.setLayout (new GridLayout ());
- treeGroup.setLayoutData (new GridData (GridData.GRAB_HORIZONTAL | GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL));
- treeGroup.setText ("Tree");
-
- /* Create a group for the image tree */
- imageTreeGroup = new Group (exampleGroup, SWT.NONE);
- imageTreeGroup.setLayout (new GridLayout ());
- imageTreeGroup.setLayoutData (new GridData (GridData.GRAB_HORIZONTAL | GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL));
- imageTreeGroup.setText (ControlExample.getResourceString("Tree_With_Images"));
- }
-
- /**
- * Creates the "Example" widgets.
- */
- void createExampleWidgets () {
- /* Compute the widget style */
- int style = getDefaultStyle();
- if (singleButton.getSelection()) style |= SWT.SINGLE;
- if (multiButton.getSelection()) style |= SWT.MULTI;
- if (checkButton.getSelection()) style |= SWT.CHECK;
- if (borderButton.getSelection()) style |= SWT.BORDER;
-
- /* Create the text tree */
- tree1 = new Tree (treeGroup, style);
- textNode1 = new TreeItem (tree1, SWT.NONE);
- textNode1.setText (ControlExample.getResourceString("Node_1"));
- TreeItem node2 = new TreeItem (tree1, SWT.NONE);
- node2.setText (ControlExample.getResourceString("Node_2"));
- TreeItem node3 = new TreeItem (tree1, SWT.NONE);
- node3.setText (ControlExample.getResourceString("Node_3"));
- TreeItem node4 = new TreeItem (tree1, SWT.NONE);
- node4.setText (ControlExample.getResourceString("Node_4"));
- TreeItem node1_1 = new TreeItem (textNode1, SWT.NONE);
- node1_1.setText (ControlExample.getResourceString("Node_1_1"));
- TreeItem node2_1 = new TreeItem (node2, SWT.NONE);
- node2_1.setText (ControlExample.getResourceString("Node_2_1"));
- TreeItem node3_1 = new TreeItem (node3, SWT.NONE);
- node3_1.setText (ControlExample.getResourceString("Node_3_1"));
- TreeItem node2_2 = new TreeItem (node2, SWT.NONE);
- node2_2.setText (ControlExample.getResourceString("Node_2_2"));
- TreeItem node2_2_1 = new TreeItem (node2_2, SWT.NONE);
- node2_2_1.setText (ControlExample.getResourceString("Node_2_2_1"));
-
- /* Create the image tree */
- tree2 = new Tree (imageTreeGroup, style);
- imageNode1 = new TreeItem (tree2, SWT.NONE);
- imageNode1.setText (ControlExample.getResourceString("Node_1"));
- imageNode1.setImage (instance.images[ControlExample.ciClosedFolder]);
- node2 = new TreeItem (tree2, SWT.NONE);
- node2.setText (ControlExample.getResourceString("Node_2"));
- node2.setImage (instance.images[ControlExample.ciClosedFolder]);
- node3 = new TreeItem (tree2, SWT.NONE);
- node3.setText (ControlExample.getResourceString("Node_3"));
- node3.setImage (instance.images[ControlExample.ciClosedFolder]);
- node4 = new TreeItem (tree2, SWT.NONE);
- node4.setText (ControlExample.getResourceString("Node_4"));
- node4.setImage (instance.images[ControlExample.ciClosedFolder]);
- node1_1 = new TreeItem (imageNode1, SWT.NONE);
- node1_1.setText (ControlExample.getResourceString("Node_1_1"));
- node1_1.setImage (instance.images[ControlExample.ciClosedFolder]);
- node2_1 = new TreeItem (node2, SWT.NONE);
- node2_1.setText (ControlExample.getResourceString("Node_2_1"));
- node2_1.setImage (instance.images[ControlExample.ciClosedFolder]);
- node3_1 = new TreeItem (node3, SWT.NONE);
- node3_1.setText (ControlExample.getResourceString("Node_3_1"));
- node3_1.setImage (instance.images[ControlExample.ciClosedFolder]);
- node2_2 = new TreeItem(node2, SWT.NONE);
- node2_2.setText (ControlExample.getResourceString("Node_2_2"));
- node2_2.setImage (instance.images[ControlExample.ciClosedFolder]);
- node2_2_1 = new TreeItem (node2_2, SWT.NONE);
- node2_2_1.setText (ControlExample.getResourceString("Node_2_2_1"));
- node2_2_1.setImage (instance.images[ControlExample.ciClosedFolder]);
- }
-
- /**
- * Creates the "Style" group.
- */
- void createStyleGroup() {
- super.createStyleGroup();
-
- /* Create the extra widgets */
- checkButton = new Button (styleGroup, SWT.CHECK);
- checkButton.setText ("SWT.CHECK");
- }
-
- /**
- * Gets the "Example" widget children.
- */
- Control [] getExampleWidgets () {
- return new Control [] {tree1, tree2};
- }
-
- /**
- * Gets the text for the tab folder item.
- */
- String getTabText () {
- return "Tree";
- }
-
- /**
- * Sets the foreground color, background color, and font
- * of the "Example" widgets to their default settings.
- * Also sets foreground and background color of the Node 1
- * TreeItems to default settings.
- */
- void resetColorsAndFonts () {
- super.resetColorsAndFonts ();
- Color oldColor = itemForegroundColor;
- itemForegroundColor = null;
- setItemForeground ();
- if (oldColor != null) oldColor.dispose();
- oldColor = itemBackgroundColor;
- itemBackgroundColor = null;
- setItemBackground ();
- if (oldColor != null) oldColor.dispose();
- Font oldFont = font;
- itemFont = null;
- setItemFont ();
- setExampleWidgetSize ();
- if (oldFont != null) oldFont.dispose();
- }
-
- /**
- * Sets the state of the "Example" widgets.
- */
- void setExampleWidgetState () {
- super.setExampleWidgetState ();
- setItemBackground ();
- setItemForeground ();
- setItemFont ();
- setExampleWidgetSize ();
- checkButton.setSelection ((tree1.getStyle () & SWT.CHECK) != 0);
- }
-
- /**
- * Sets the background color of the Node 1 TreeItems.
- */
- void setItemBackground () {
- textNode1.setBackground (itemBackgroundColor);
- imageNode1.setBackground (itemBackgroundColor);
- /* Set the background button's color to match the color just set. */
- Color color = itemBackgroundColor;
- if (color == null) color = textNode1.getBackground ();
- drawImage (itemBackgroundImage, color);
- itemBackgroundButton.setImage (itemBackgroundImage);
- }
-
- /**
- * Sets the foreground color of the Node 1 TreeItems.
- */
- void setItemForeground () {
- textNode1.setForeground (itemForegroundColor);
- imageNode1.setForeground (itemForegroundColor);
- /* Set the foreground button's color to match the color just set. */
- Color color = itemForegroundColor;
- if (color == null) color = textNode1.getForeground ();
- drawImage (itemForegroundImage, color);
- itemForegroundButton.setImage (itemForegroundImage);
- }
-
- /**
- * Sets the font of the Node 1 TreeItems.
- */
- void setItemFont () {
- if (instance.startup) return;
- textNode1.setFont (itemFont);
- imageNode1.setFont (itemFont);
- }
-}
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/bold.bmp b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/bold.bmp
deleted file mode 100644
index 15136cbf7c..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/bold.bmp
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/bold_mask.bmp b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/bold_mask.bmp
deleted file mode 100644
index 7863429f50..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/bold_mask.bmp
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/closedFolder.gif b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/closedFolder.gif
deleted file mode 100644
index 6660d0b11a..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/closedFolder.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/italic.bmp b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/italic.bmp
deleted file mode 100644
index 82071f6bdd..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/italic.bmp
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/italic_mask.bmp b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/italic_mask.bmp
deleted file mode 100644
index caf2354d48..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/italic_mask.bmp
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/openFolder.gif b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/openFolder.gif
deleted file mode 100644
index fc9943f111..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/openFolder.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/red.bmp b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/red.bmp
deleted file mode 100644
index 9a563ff34a..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/red.bmp
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/red_mask.bmp b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/red_mask.bmp
deleted file mode 100644
index 1359c081de..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/red_mask.bmp
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/target.gif b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/target.gif
deleted file mode 100644
index 9807ae648d..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/target.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/yellow.bmp b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/yellow.bmp
deleted file mode 100644
index 4da9c1de3f..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/yellow.bmp
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/yellow_mask.bmp b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/yellow_mask.bmp
deleted file mode 100644
index 1359c081de..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/yellow_mask.bmp
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/dnd/DNDExample.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/dnd/DNDExample.java
deleted file mode 100644
index f1094fad9d..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/dnd/DNDExample.java
+++ /dev/null
@@ -1,1174 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.dnd;
-
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.dnd.*;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-
-public class DNDExample {
-
- private int dragOperation = 0;
- private Transfer[] dragTypes = new Transfer[0];
- private Control dragControl;
- private int dragControlType = 0;
- private DragSource dragSource;
- private String dragDataText;
- private String dragDataRTF;
- private String[] dragDataFiles;
- private List fileList;
- private boolean dragEnabled = false;
-
- private int dropOperation = 0;
- private int dropDefaultOperation = 0;
- private Transfer[] dropTypes = new Transfer[0];
- private DropTarget dropTarget;
- private Control dropControl;
- private int dropControlType = 0;
- private Composite defaultParent;
- private boolean dropEnabled = false;
-
- private Text dragConsole;
- private boolean dragEventDetail = false;
- private Text dropConsole;
- private boolean dropEventDetail = false;
-
- private static final int BUTTON_TOGGLE = 0;
- private static final int BUTTON_RADIO = 1;
- private static final int BUTTON_CHECK = 2;
- private static final int CANVAS = 3;
- private static final int LABEL = 4;
- private static final int LIST = 5;
- private static final int TABLE = 6;
- private static final int TREE = 7;
- private static final int TEXT = 8;
-
-public static void main(String[] args) {
- DNDExample example = new DNDExample();
- example.open();
-}
-
-private void addDragTransfer(Transfer transfer){
- Transfer[] newTypes = new Transfer[dragTypes.length + 1];
- System.arraycopy(dragTypes, 0, newTypes, 0, dragTypes.length);
- newTypes[dragTypes.length] = transfer;
- dragTypes = newTypes;
- if (dragSource != null) {
- dragSource.setTransfer(dragTypes);
- }
-}
-
-private void addDropTransfer(Transfer transfer){
- Transfer[] newTypes = new Transfer[dropTypes.length + 1];
- System.arraycopy(dropTypes, 0, newTypes, 0, dropTypes.length);
- newTypes[dropTypes.length] = transfer;
- dropTypes = newTypes;
- if (dropTarget != null) {
- dropTarget.setTransfer(dropTypes);
- }
-}
-
-private void createDragOperations(Composite parent) {
- parent.setLayout(new RowLayout(SWT.VERTICAL));
- final Button moveButton = new Button(parent, SWT.CHECK);
- moveButton.setText("DND.DROP_MOVE");
- moveButton.setSelection(true);
- dragOperation = DND.DROP_MOVE;
- moveButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- Button b = (Button)e.widget;
- if (b.getSelection()) {
- dragOperation |= DND.DROP_MOVE;
- } else {
- dragOperation = dragOperation &~DND.DROP_MOVE;
- if (dragOperation == 0) {
- dragOperation = DND.DROP_MOVE;
- moveButton.setSelection(true);
- }
- }
- if (dragEnabled) {
- createDragSource();
- }
- }
- });
-
-
- Button b = new Button(parent, SWT.CHECK);
- b.setText("DND.DROP_COPY");
- b.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- Button b = (Button)e.widget;
- if (b.getSelection()) {
- dragOperation |= DND.DROP_COPY;
- } else {
- dragOperation = dragOperation &~DND.DROP_COPY;
- if (dragOperation == 0) {
- dragOperation = DND.DROP_MOVE;
- moveButton.setSelection(true);
- }
- }
- if (dragEnabled) {
- createDragSource();
- }
- }
- });
-
- b = new Button(parent, SWT.CHECK);
- b.setText("DND.DROP_LINK");
- b.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- Button b = (Button)e.widget;
- if (b.getSelection()) {
- dragOperation |= DND.DROP_LINK;
- } else {
- dragOperation = dragOperation &~DND.DROP_LINK;
- if (dragOperation == 0) {
- dragOperation = DND.DROP_MOVE;
- moveButton.setSelection(true);
- }
- }
- if (dragEnabled) {
- createDragSource();
- }
- }
- });
-}
-
-private void createDragSource() {
- if (dragSource != null) dragSource.dispose();
- dragSource = new DragSource(dragControl, dragOperation);
- dragSource.setTransfer(dragTypes);
- dragSource.addDragListener(new DragSourceListener() {
- public void dragFinished(org.eclipse.swt.dnd.DragSourceEvent event) {
- dragConsole.append(">>dragFinished\n");
- printEvent(event);
- dragDataText = dragDataRTF = null;
- dragDataFiles = null;
- if (event.detail == DND.DROP_MOVE) {
- switch(dragControlType) {
- case BUTTON_CHECK:
- case BUTTON_TOGGLE:
- case BUTTON_RADIO: {
- Button b = (Button)dragControl;
- b.setText("");
- break;
- }
- case TABLE: {
- Table table = (Table)dragControl;
- TableItem[] items = table.getSelection();
- for (int i = 0; i < items.length; i++) {
- items[i].dispose();
- }
- break;
- }
- case TEXT: {
- Text text = (Text)dragControl;
- text.clearSelection();
- break;
- }
- case TREE: {
- Tree tree = (Tree)dragControl;
- TreeItem[] items = tree.getSelection();
- for (int i = 0; i < items.length; i++) {
- items[i].dispose();
- }
- break;
- }
- case CANVAS: {
- dragControl.setData("STRINGS", null);
- dragControl.redraw();
- break;
- }
- case LABEL: {
- Label label = (Label)dragControl;
- label.setText("");
- break;
- }
- case LIST: {
- List list = (List)dragControl;
- int[] indices = list.getSelectionIndices();
- list.remove(indices);
- break;
- }
- }
- }
- }
- public void dragSetData(org.eclipse.swt.dnd.DragSourceEvent event) {
- dragConsole.append(">>dragSetData\n");
- printEvent(event);
- if (TextTransfer.getInstance().isSupportedType(event.dataType)) {
- event.data = dragDataText;
- }
- if (RTFTransfer.getInstance().isSupportedType(event.dataType)) {
- event.data = dragDataRTF;
- }
- if (FileTransfer.getInstance().isSupportedType(event.dataType)) {
- event.data = dragDataFiles;
- }
- }
- public void dragStart(org.eclipse.swt.dnd.DragSourceEvent event) {
- dragConsole.append(">>dragStart\n");
- printEvent(event);
- dragDataFiles = fileList.getItems();
- switch(dragControlType) {
- case BUTTON_CHECK:
- case BUTTON_TOGGLE:
- case BUTTON_RADIO: {
- Button b = (Button)dragControl;
- dragDataText = b.getSelection() ? "true" : "false";
- break;
- }
- case TABLE: {
- Table table = (Table)dragControl;
- TableItem[] items = table.getSelection();
- if (items.length == 0) {
- event.doit = false;
- } else {
- StringBuffer buffer = new StringBuffer();
- for (int i = 0; i < items.length; i++) {
- buffer.append(items[i].getText());
- if (items.length > 1 && i < items.length - 1) {
- buffer.append("\n");
- }
- }
- dragDataText = buffer.toString();
- }
- break;
- }
- case TEXT: {
- Text text = (Text)dragControl;
- String s = text.getSelectionText();
- if (s.length() == 0) {
- event.doit = false;
- } else {
- dragDataText = s;
- }
- break;
- }
- case TREE: {
- Tree tree = (Tree)dragControl;
- TreeItem[] items = tree.getSelection();
- if (items.length == 0) {
- event.doit = false;
- } else {
- StringBuffer buffer = new StringBuffer();
- for (int i = 0; i < items.length; i++) {
- buffer.append(items[i].getText());
- if (items.length > 1 && i < items.length - 1) {
- buffer.append("\n");
- }
- }
- dragDataText = buffer.toString();
- }
- break;
- }
- case CANVAS: {
- String[] strings = (String[])dragControl.getData("STRINGS");
- if (strings == null || strings.length == 0) {
- event.doit = false;
- } else {
- StringBuffer buffer = new StringBuffer();
- for (int i = 0; i < strings.length; i++) {
- buffer.append(strings[i]);
- if (strings.length > 1 && i < strings.length - 1) {
- buffer.append("\n");
- }
- }
- dragDataText = buffer.toString();
- }
- break;
- }
- case LABEL: {
- Label label = (Label)dragControl;
- String string = label.getText();
- if (string.length() == 0) {
- event.doit = false;
- } else {
- dragDataText = string;
- }
- break;
- }
- case LIST: {
- List list = (List)dragControl;
- String[] selection = list.getSelection();
- if (selection.length == 0) {
- event.doit = false;
- } else {
- StringBuffer buffer = new StringBuffer();
- for (int i = 0; i < selection.length; i++) {
- buffer.append(selection[i]);
- if (selection.length > 1 && i < selection.length - 1) {
- buffer.append("\n");
- }
- }
- dragDataText = buffer.toString();
- }
- break;
- }
- default:
- throw new SWTError(SWT.ERROR_NOT_IMPLEMENTED);
- }
- if (dragDataText != null) {
- dragDataRTF = "{\\rtf1{\\colortbl;\\red255\\green0\\blue0;}\\cf1\\b "+dragDataText+"}";
- }
-
- for (int i = 0; i < dragTypes.length; i++) {
- if (dragTypes[i] instanceof TextTransfer && dragDataText == null) {
- event.doit = false;
- }
- if (dragTypes[i] instanceof RTFTransfer && dragDataRTF == null) {
- event.doit = false;
- }
- if (dragTypes[i] instanceof FileTransfer && (dragDataFiles == null || dragDataFiles.length == 0)) {
- event.doit = false;
- }
- }
- }
- });
-}
-
-private void createDragTypes(Composite parent) {
- parent.setLayout(new GridLayout());
- Button b = new Button(parent, SWT.CHECK);
- b.setText("Text Transfer");
- b.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- Button b = (Button)e.widget;
- if (b.getSelection()) {
- addDragTransfer(TextTransfer.getInstance());
- } else {
- removeDragTransfer(TextTransfer.getInstance());
- }
- }
- });
-
- b = new Button(parent, SWT.CHECK);
- b.setText("RTF Transfer");
- b.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- Button b = (Button)e.widget;
- if (b.getSelection()) {
- addDragTransfer(RTFTransfer.getInstance());
- } else {
- removeDragTransfer(RTFTransfer.getInstance());
- }
- }
- });
-
- Composite c = new Composite(parent, SWT.NONE);
- c.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- GridLayout layout = new GridLayout(3, false);
- layout.marginHeight = layout.marginWidth = 0;
- c.setLayout(layout);
- b = new Button(c, SWT.CHECK);
- b.setText("File Transfer");
- b.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_BEGINNING));
- b.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- Button b = (Button)e.widget;
- if (b.getSelection()) {
- addDragTransfer(FileTransfer.getInstance());
- } else {
- removeDragTransfer(FileTransfer.getInstance());
- }
- }
- });
- b = new Button(c, SWT.PUSH);
- b.setText("Select File(s)");
- b.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_BEGINNING));
- b.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- FileDialog dialog = new FileDialog(fileList.getShell(), SWT.OPEN | SWT.MULTI);
- String result = dialog.open();
- if (result != null && result.length() > 0){
- fileList.removeAll();
- String separator = System.getProperty("file.separator");
- String path = dialog.getFilterPath();
- String[] names = dialog.getFileNames();
- for (int i = 0; i < names.length; i++) {
- fileList.add(path+separator+names[i]);
- }
- }
- }
- });
- fileList = new List(c, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
- GridData data = new GridData();
- data.grabExcessHorizontalSpace = true;
- data.horizontalAlignment = GridData.FILL;
- data.verticalAlignment = GridData.BEGINNING;
- fileList.setLayoutData(data);
-}
-
-private void createDragWidget(Composite parent) {
- parent.setLayout(new FormLayout());
- Combo combo = new Combo(parent, SWT.READ_ONLY);
- combo.setItems(new String[] {"Toggle Button", "Radio Button", "Checkbox", "Canvas", "Label", "List", "Table", "Tree"});
- combo.select(LABEL);
- dragControlType = combo.getSelectionIndex();
- dragControl = createWidget(dragControlType, parent, "Drag Source");
-
- combo.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- Object data = dragControl.getLayoutData();
- Composite parent = dragControl.getParent();
- dragControl.dispose();
- Combo c = (Combo)e.widget;
- dragControlType = c.getSelectionIndex();
- dragControl = createWidget(dragControlType, parent, "Drag Source");
- dragControl.setLayoutData(data);
- if (dragEnabled) createDragSource();
- parent.layout();
- }
- });
-
- Button b = new Button(parent, SWT.CHECK);
- b.setText("DragSource");
- b.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- Button b = (Button)e.widget;
- dragEnabled = b.getSelection();
- if (dragEnabled) {
- createDragSource();
- } else {
- if (dragSource != null){
- dragSource.dispose();
- }
- dragSource = null;
- }
- }
- });
-
- FormData data = new FormData();
- data.top = new FormAttachment(0, 10);
- data.bottom = new FormAttachment(combo, -10);
- data.left = new FormAttachment(0, 10);
- data.right = new FormAttachment(100, -10);
- dragControl.setLayoutData(data);
-
- data = new FormData();
- data.bottom = new FormAttachment(b, -10);
- data.left = new FormAttachment(0, 10);
- combo.setLayoutData(data);
-
- data = new FormData();
- data.bottom = new FormAttachment(100, -10);
- data.left = new FormAttachment(0, 10);
- b.setLayoutData(data);
-}
-
-private void createDropOperations(Composite parent) {
- parent.setLayout(new RowLayout(SWT.VERTICAL));
- final Button moveButton = new Button(parent, SWT.CHECK);
- moveButton.setText("DND.DROP_MOVE");
- moveButton.setSelection(true);
- dropOperation = DND.DROP_MOVE;
- moveButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- Button b = (Button)e.widget;
- if (b.getSelection()) {
- dropOperation |= DND.DROP_MOVE;
- } else {
- dropOperation = dropOperation & ~DND.DROP_MOVE;
- if (dropOperation == 0 || (dropDefaultOperation & DND.DROP_MOVE) != 0) {
- dropOperation |= DND.DROP_MOVE;
- moveButton.setSelection(true);
- }
- }
- if (dropEnabled) {
- createDropTarget();
- }
- }
- });
-
-
- final Button copyButton = new Button(parent, SWT.CHECK);
- copyButton.setText("DND.DROP_COPY");
- copyButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- Button b = (Button)e.widget;
- if (b.getSelection()) {
- dropOperation |= DND.DROP_COPY;
- } else {
- dropOperation = dropOperation & ~DND.DROP_COPY;
- if (dropOperation == 0 || (dropDefaultOperation & DND.DROP_COPY) != 0) {
- dropOperation = DND.DROP_COPY;
- copyButton.setSelection(true);
- }
- }
- if (dropEnabled) {
- createDropTarget();
- }
- }
- });
-
- final Button linkButton = new Button(parent, SWT.CHECK);
- linkButton.setText("DND.DROP_LINK");
- linkButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- Button b = (Button)e.widget;
- if (b.getSelection()) {
- dropOperation |= DND.DROP_LINK;
- } else {
- dropOperation = dropOperation & ~DND.DROP_LINK;
- if (dropOperation == 0 || (dropDefaultOperation & DND.DROP_LINK) != 0) {
- dropOperation = DND.DROP_LINK;
- linkButton.setSelection(true);
- }
- }
- if (dropEnabled) {
- createDropTarget();
- }
- }
- });
-
- Button b = new Button(parent, SWT.CHECK);
- b.setText("DND.DROP_DEFAULT");
- defaultParent = new Composite(parent, SWT.NONE);
- b.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- Button b = (Button)e.widget;
- if (b.getSelection()) {
- dropOperation |= DND.DROP_DEFAULT;
- defaultParent.setVisible(true);
- } else {
- dropOperation = dropOperation & ~DND.DROP_DEFAULT;
- defaultParent.setVisible(false);
- }
- if (dropEnabled) {
- createDropTarget();
- }
- }
- });
-
- defaultParent.setVisible(false);
- GridLayout layout = new GridLayout();
- layout.marginWidth = 20;
- defaultParent.setLayout(layout);
- Label label = new Label(defaultParent, SWT.NONE);
- label.setText("Value for default operation is:");
- b = new Button(defaultParent, SWT.RADIO);
- b.setText("DND.DROP_MOVE");
- b.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- Button b = (Button)e.widget;
- if (b.getSelection()) {
- dropDefaultOperation = DND.DROP_MOVE;
- dropOperation |= DND.DROP_MOVE;
- moveButton.setSelection(true);
- if (dropEnabled) {
- createDropTarget();
- }
- }
- }
- });
-
- b = new Button(defaultParent, SWT.RADIO);
- b.setText("DND.DROP_COPY");
- b.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- Button b = (Button)e.widget;
- if (b.getSelection()) {
- dropDefaultOperation = DND.DROP_COPY;
- dropOperation |= DND.DROP_COPY;
- copyButton.setSelection(true);
- if (dropEnabled) {
- createDropTarget();
- }
- }
- }
- });
-
- b = new Button(defaultParent, SWT.RADIO);
- b.setText("DND.DROP_LINK");
- b.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- Button b = (Button)e.widget;
- if (b.getSelection()) {
- dropDefaultOperation = DND.DROP_LINK;
- dropOperation |= DND.DROP_LINK;
- linkButton.setSelection(true);
- if (dropEnabled) {
- createDropTarget();
- }
- }
- }
- });
-
- b = new Button(defaultParent, SWT.RADIO);
- b.setText("DND.DROP_NONE");
- b.setSelection(true);
- b.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- Button b = (Button)e.widget;
- if (b.getSelection()) {
- dropDefaultOperation = DND.DROP_NONE;
- dropOperation &= ~DND.DROP_DEFAULT;
- if (dropEnabled) {
- createDropTarget();
- }
- }
- }
- });
-}
-
-private void createDropTarget() {
- if (dropTarget != null) dropTarget.dispose();
- dropTarget = new DropTarget(dropControl, dropOperation);
- dropTarget.setTransfer(dropTypes);
- dropTarget.addDropListener(new DropTargetListener() {
- public void dragEnter(DropTargetEvent event) {
- dropConsole.append(">>dragEnter\n");
- printEvent(event);
- if (event.detail == DND.DROP_DEFAULT) {
- event.detail = dropDefaultOperation;
- }
- }
- public void dragLeave(DropTargetEvent event) {
- dropConsole.append(">>dragLeave\n");
- printEvent(event);
- }
- public void dragOperationChanged(DropTargetEvent event) {
- dropConsole.append(">>dragOperationChanged\n");
- printEvent(event);
- if (event.detail == DND.DROP_DEFAULT) {
- event.detail = dropDefaultOperation;
- }
- }
- public void dragOver(DropTargetEvent event) {
- dropConsole.append(">>dragOver\n");
- printEvent(event);
- }
- public void drop(DropTargetEvent event) {
- dropConsole.append(">>drop\n");
- printEvent(event);
- String[] strings = null;
- if (TextTransfer.getInstance().isSupportedType(event.currentDataType) ||
- RTFTransfer.getInstance().isSupportedType(event.currentDataType)) {
- strings = new String[] {(String)event.data};
- }
- if (FileTransfer.getInstance().isSupportedType(event.currentDataType)) {
- strings = (String[])event.data;
- }
- if (strings == null || strings.length == 0) {
- dropConsole.append("!!Invalid data dropped");
- return;
- }
-
- if (strings.length == 1 && (dropControlType == TABLE ||
- dropControlType == TREE ||
- dropControlType == LIST)) {
- // convert string separated by "\n" into an array of strings
- String string = strings[0];
- int count = 0;
- int offset = string.indexOf("\n", 0);
- while (offset > 0) {
- count++;
- offset = string.indexOf("\n", offset + 1);
- }
- if (count > 0) {
- strings = new String[count + 1];
- int start = 0;
- int end = string.indexOf("\n");
- int index = 0;
- while (start < end) {
- strings[index++] = string.substring(start, end);
- start = end + 1;
- end = string.indexOf("\n", start);
- if (end == -1) end = string.length();
- }
- }
- }
- switch(dropControlType) {
- case BUTTON_CHECK:
- case BUTTON_TOGGLE:
- case BUTTON_RADIO: {
- Button b = (Button)dropControl;
- b.setText(strings[0]);
- break;
- }
- case TABLE: {
- Table table = (Table)dropControl;
- for(int i = 0; i < strings.length; i++) {
- TableItem item = new TableItem(table, SWT.NONE);
- item.setText(0, strings[i]);
- item.setText(1, "dropped item");
- }
- TableColumn[] columns = table.getColumns();
- for (int i = 0; i < columns.length; i++) {
- columns[i].pack();
- }
- break;
- }
- case TEXT: {
- Text text = (Text)dropControl;
- for(int i = 0; i < strings.length; i++) {
- text.append(strings[i]+"\n");
- }
- break;
- }
- case TREE: {
- Tree tree = (Tree)dropControl;
- for(int i = 0; i < strings.length; i++) {
- TreeItem item = new TreeItem(tree, SWT.NONE);
- item.setText(strings[i]);
- }
- break;
- }
- case CANVAS: {
- dropControl.setData("STRINGS", strings);
- dropControl.redraw();
- break;
- }
- case LABEL: {
- Label label = (Label)dropControl;
- label.setText(strings[0]);
- break;
- }
- case LIST: {
- List list = (List)dropControl;
- for(int i = 0; i < strings.length; i++) {
- list.add(strings[i]);
- }
- break;
- }
- default:
- throw new SWTError(SWT.ERROR_NOT_IMPLEMENTED);
- }
- }
- public void dropAccept(DropTargetEvent event) {
- dropConsole.append(">>dropAccept\n");
- printEvent(event);
- }
- });
-}
-
-private void createDropTypes(Composite parent) {
- parent.setLayout(new RowLayout(SWT.VERTICAL));
- Button b = new Button(parent, SWT.CHECK);
- b.setText("Text Transfer");
- b.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- Button b = (Button)e.widget;
- if (b.getSelection()) {
- addDropTransfer(TextTransfer.getInstance());
- } else {
- removeDropTransfer(TextTransfer.getInstance());
- }
- }
- });
-
- b = new Button(parent, SWT.CHECK);
- b.setText("RTF Transfer");
- b.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- Button b = (Button)e.widget;
- if (b.getSelection()) {
- addDropTransfer(RTFTransfer.getInstance());
- } else {
- removeDropTransfer(RTFTransfer.getInstance());
- }
- }
- });
-
- b = new Button(parent, SWT.CHECK);
- b.setText("File Transfer");
- b.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- Button b = (Button)e.widget;
- if (b.getSelection()) {
- addDropTransfer(FileTransfer.getInstance());
- } else {
- removeDropTransfer(FileTransfer.getInstance());
- }
- }
- });
-}
-
-private void createDropWidget(Composite parent) {
- parent.setLayout(new FormLayout());
- Combo combo = new Combo(parent, SWT.READ_ONLY);
- combo.setItems(new String[] {"Toggle Button", "Radio Button", "Checkbox", "Canvas", "Label", "List", "Table", "Tree", "Text"});
- combo.select(LABEL);
- dropControlType = combo.getSelectionIndex();
- dropControl = createWidget(dropControlType, parent, "Drop Target");
- combo.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- Object data = dropControl.getLayoutData();
- Composite parent = dropControl.getParent();
- dropControl.dispose();
- Combo c = (Combo)e.widget;
- dropControlType = c.getSelectionIndex();
- dropControl = createWidget(dropControlType, parent, "Drop Target");
- dropControl.setLayoutData(data);
- if (dropEnabled) createDropTarget();
- parent.layout();
- }
- });
-
- Button b = new Button(parent, SWT.CHECK);
- b.setText("DropTarget");
- b.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- Button b = (Button)e.widget;
- dropEnabled = b.getSelection();
- if (dropEnabled) {
- createDropTarget();
- } else {
- if (dropTarget != null){
- dropTarget.dispose();
- }
- dropTarget = null;
- }
- }
- });
-
- FormData data = new FormData();
- data.top = new FormAttachment(0, 10);
- data.bottom = new FormAttachment(combo, -10);
- data.left = new FormAttachment(0, 10);
- data.right = new FormAttachment(100, -10);
- dropControl.setLayoutData(data);
-
- data = new FormData();
- data.bottom = new FormAttachment(b, -10);
- data.left = new FormAttachment(0, 10);
- combo.setLayoutData(data);
-
- data = new FormData();
- data.bottom = new FormAttachment(100, -10);
- data.left = new FormAttachment(0, 10);
- b.setLayoutData(data);
-}
-
-private Control createWidget(int type, Composite parent, String prefix){
- switch (type) {
- case BUTTON_CHECK: {
- Button button = new Button(parent, SWT.CHECK);
- button.setText(prefix+" Check box");
- return button;
- }
- case BUTTON_TOGGLE: {
- Button button = new Button(parent, SWT.TOGGLE);
- button.setText(prefix+" Toggle button");
- return button;
- }
- case BUTTON_RADIO: {
- Button button = new Button(parent, SWT.RADIO);
- button.setText(prefix+" Radio button");
- return button;
- }
- case TABLE: {
- Table table = new Table(parent, SWT.BORDER | SWT.MULTI);
- TableColumn column1 = new TableColumn(table, SWT.NONE);
- TableColumn column2 = new TableColumn(table, SWT.NONE);
- for (int i = 0; i < 10; i++) {
- TableItem item = new TableItem(table, SWT.NONE);
- item.setText(0, prefix+" name " + i);
- item.setText(1, prefix+" value " + i);
- }
- column1.pack();
- column2.pack();
- return table;
- }
- case TEXT: {
- Text text = new Text(parent, SWT.BORDER | SWT.MULTI | SWT.V_SCROLL | SWT.H_SCROLL);
- text.setText(prefix+" Text");
- return text;
- }
- case TREE: {
- Tree tree = new Tree(parent, SWT.BORDER);
- for (int i = 0; i < 3; i++) {
- TreeItem item = new TreeItem(tree, SWT.NONE);
- item.setText(prefix+" item " + i);
- for (int j = 0; j < 3; j++) {
- TreeItem subItem = new TreeItem(item, SWT.NONE);
- subItem.setText(prefix+" item " + j);
- for (int k = 0; k < 3; k++) {
- TreeItem subsubItem = new TreeItem(subItem, SWT.NONE);
- subsubItem.setText(prefix+" item " + k);
- }
- }
- }
- return tree;
- }
- case CANVAS: {
- Canvas canvas = new Canvas(parent, SWT.BORDER);
- canvas.setData("STRINGS", new String[] {prefix+" Canvas widget"});
- canvas.addPaintListener(new PaintListener() {
- public void paintControl(PaintEvent e) {
- Canvas c = (Canvas)e.widget;
- Image image = (Image)c.getData("IMAGE");
- if (image != null) {
- e.gc.drawImage(image, 5, 5);
- } else {
- String[] strings = (String[])c.getData("STRINGS");
- if (strings != null) {
- FontMetrics metrics = e.gc.getFontMetrics();
- int height = metrics.getHeight();
- int y = 5;
- for(int i = 0; i < strings.length; i++) {
- e.gc.drawString(strings[i], 5, y);
- y += height + 5;
- }
- }
- }
- }
- });
- return canvas;
- }
- case LABEL: {
- Label label = new Label(parent, SWT.BORDER);
- label.setText(prefix+" Label");
- return label;
- }
- case LIST: {
- List list = new List(parent, SWT.BORDER);
- list.setItems(new String[] {prefix+" Item a", prefix+" Item b", prefix+" Item c", prefix+" Item d"});
- return list;
- }
- default:
- throw new SWTError(SWT.ERROR_NOT_IMPLEMENTED);
- }
-}
-
-private void open() {
- Display display = new Display();
- Shell shell = new Shell(display);
- shell.setText("Drag and Drop Example");
- shell.setLayout(new FormLayout());
-
- Label dragLabel = new Label(shell, SWT.LEFT);
- dragLabel.setText("Drag Source:");
-
- Group dragWidgetGroup = new Group(shell, SWT.NONE);
- dragWidgetGroup.setText("Widget");
- createDragWidget(dragWidgetGroup);
-
- Group dragOperationsGroup = new Group(shell, SWT.NONE);
- dragOperationsGroup.setText("Allowed Operation(s):");
- createDragOperations(dragOperationsGroup);
-
- Group dragTypesGroup = new Group(shell, SWT.NONE);
- dragTypesGroup.setText("Transfer Type(s):");
- createDragTypes(dragTypesGroup);
-
- dragConsole = new Text(shell, SWT.READ_ONLY | SWT.BORDER |SWT.V_SCROLL | SWT.H_SCROLL | SWT.MULTI);
- Menu menu = new Menu (shell, SWT.POP_UP);
- MenuItem item = new MenuItem (menu, SWT.PUSH);
- item.setText ("Clear");
- item.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- dragConsole.setText("");
- }
- });
- item = new MenuItem (menu, SWT.CHECK);
- item.setText ("Show Event detail");
- item.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- MenuItem item = (MenuItem)e.widget;
- dragEventDetail = item.getSelection();
- }
- });
- dragConsole.setMenu(menu);
-
- Label dropLabel = new Label(shell, SWT.LEFT);
- dropLabel.setText("Drop Target:");
-
- Group dropWidgetGroup = new Group(shell, SWT.NONE);
- dropWidgetGroup.setText("Widget");
- createDropWidget(dropWidgetGroup);
-
- Group dropOperationsGroup = new Group(shell, SWT.NONE);
- dropOperationsGroup.setText("Allowed Operation(s):");
- createDropOperations(dropOperationsGroup);
-
- Group dropTypesGroup = new Group(shell, SWT.NONE);
- dropTypesGroup.setText("Transfer Type(s):");
- createDropTypes(dropTypesGroup);
-
- dropConsole = new Text(shell, SWT.READ_ONLY | SWT.BORDER |SWT.V_SCROLL | SWT.H_SCROLL | SWT.MULTI);
- menu = new Menu (shell, SWT.POP_UP);
- item = new MenuItem (menu, SWT.PUSH);
- item.setText ("Clear");
- item.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- dropConsole.setText("");
- }
- });
- item = new MenuItem (menu, SWT.CHECK);
- item.setText ("Show Event detail");
- item.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- MenuItem item = (MenuItem)e.widget;
- dropEventDetail = item.getSelection();
- }
- });
- dropConsole.setMenu(menu);
-
- int height = 300;
- FormData data = new FormData();
- data.top = new FormAttachment(0, 10);
- data.left = new FormAttachment(0, 10);
- dragLabel.setLayoutData(data);
-
- data = new FormData();
- data.top = new FormAttachment(dragLabel, 10);
- data.left = new FormAttachment(0, 10);
- data.right = new FormAttachment(50, -10);
- data.height = height;
- dragWidgetGroup.setLayoutData(data);
-
- data = new FormData();
- data.top = new FormAttachment(dragWidgetGroup, 10);
- data.left = new FormAttachment(0, 10);
- data.right = new FormAttachment(50, -10);
- //data.bottom = new FormAttachment(dropTypesGroup, -10);
- dragOperationsGroup.setLayoutData(data);
-
- data = new FormData();
- data.top = new FormAttachment(dragOperationsGroup, 10);
- data.left = new FormAttachment(0, 10);
- data.right = new FormAttachment(50, -10);
- dragTypesGroup.setLayoutData(data);
-
- data = new FormData();
- data.top = new FormAttachment(dragTypesGroup, 10);
- data.bottom = new FormAttachment(100, -10);
- data.left = new FormAttachment(0, 10);
- data.right = new FormAttachment(50, -10);
- dragConsole.setLayoutData(data);
-
- data = new FormData();
- data.top = new FormAttachment(0, 10);
- data.left = new FormAttachment(dragTypesGroup, 10);
- dropLabel.setLayoutData(data);
-
- data = new FormData();
- data.top = new FormAttachment(dropLabel, 10);
- data.left = new FormAttachment(dragTypesGroup, 10);
- data.right = new FormAttachment(100, -10);
- data.height = height;
- dropWidgetGroup.setLayoutData(data);
-
- data = new FormData();
- data.top = new FormAttachment(dropWidgetGroup, 10);
- data.left = new FormAttachment(dragTypesGroup, 10);
- data.right = new FormAttachment(100, -10);
- dropOperationsGroup.setLayoutData(data);
-
- data = new FormData();
- data.top = new FormAttachment(dropOperationsGroup, 10);
- data.left = new FormAttachment(dragTypesGroup, 10);
- data.right = new FormAttachment(100, -10);
- //data.bottom = new FormAttachment(dragConsole, -10);
- dropTypesGroup.setLayoutData(data);
-
- data = new FormData();
- data.top = new FormAttachment(dropTypesGroup, 10);
- data.bottom = new FormAttachment(100, -10);
- data.left = new FormAttachment(50, 10);
- data.right = new FormAttachment(100, -10);
- dropConsole.setLayoutData(data);
-
- shell.setSize(1000, 900);
- shell.open();
-
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch())
- display.sleep();
- }
-}
-
-private void printEvent(DragSourceEvent e) {
- if (!dragEventDetail) return;
- StringBuffer sb = new StringBuffer();
- sb.append("widget: "); sb.append(e.widget);
- sb.append(", time: "); sb.append(e.time);
- sb.append(", operation: "); sb.append(e.detail);
- sb.append(", type: "); sb.append(e.dataType != null ? e.dataType.type : 0);
- sb.append(", doit: "); sb.append(e.doit);
- sb.append(", data: "); sb.append(e.data);
- sb.append("\n");
- dragConsole.append(sb.toString());
-}
-
-private void printEvent(DropTargetEvent e) {
- if (!dropEventDetail) return;
- StringBuffer sb = new StringBuffer();
- sb.append("widget; "); sb.append(e.widget);
- sb.append(", time: "); sb.append(e.time);
- sb.append(", x: "); sb.append(e.x);
- sb.append(", y: "); sb.append(e.y);
- sb.append(", item: "); sb.append(e.item);
- sb.append(", operations: "); sb.append(e.operations);
- sb.append(", operation: "); sb.append(e.detail);
- sb.append(", feedback: "); sb.append(e.feedback);
- if (e.dataTypes != null) {
- for (int i = 0; i < e.dataTypes.length; i++) {
- sb.append(", dataType "); sb.append(i); sb.append(": "); sb.append(e.dataTypes[i].type);
- }
- } else {
- sb.append(", dataTypes: none");
- }
- sb.append(", currentDataType: "); sb.append(e.currentDataType);
- sb.append(", data: "); sb.append(e.data);
- sb.append("\n");
- dropConsole.append(sb.toString());
-}
-
-private void removeDragTransfer(Transfer transfer){
- if (dragTypes.length == 1) {
- dragTypes = new Transfer[0];
- } else {
- int index = -1;
- for(int i = 0; i < dragTypes.length; i++) {
- if (dragTypes[i] == transfer) {
- index = i;
- break;
- }
- }
- if (index == -1) return;
- Transfer[] newTypes = new Transfer[dragTypes.length - 1];
- System.arraycopy(dragTypes, 0, newTypes, 0, index);
- System.arraycopy(dragTypes, index + 1, newTypes, index, dragTypes.length - index - 1);
- dragTypes = newTypes;
- }
- if (dragSource != null) {
- dragSource.setTransfer(dragTypes);
- }
-}
-
-private void removeDropTransfer(Transfer transfer){
- if (dropTypes.length == 1) {
- dropTypes = new Transfer[0];
- } else {
- int index = -1;
- for(int i = 0; i < dropTypes.length; i++) {
- if (dropTypes[i] == transfer) {
- index = i;
- break;
- }
- }
- if (index == -1) return;
- Transfer[] newTypes = new Transfer[dropTypes.length - 1];
- System.arraycopy(dropTypes, 0, newTypes, 0, index);
- System.arraycopy(dropTypes, index + 1, newTypes, index, dropTypes.length - index - 1);
- dropTypes = newTypes;
- }
- if (dropTarget != null) {
- dropTarget.setTransfer(dropTypes);
- }
-}
-}
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/dnd/ImageTransfer.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/dnd/ImageTransfer.java
deleted file mode 100644
index 301b0fd6d5..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/dnd/ImageTransfer.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.dnd;
-
-
-/**
- * Transfer type to transfer SWT ImageData objects.
- */
-
-import java.io.*;
-import org.eclipse.swt.dnd.*;
-import org.eclipse.swt.*;
-import org.eclipse.swt.graphics.*;
-
-public class ImageTransfer extends ByteArrayTransfer {
-
- private static final String TYPENAME = "imagedata";
- private static final int TYPEID = registerType(TYPENAME);
- private static ImageTransfer _instance = new ImageTransfer();
-
-public static ImageTransfer getInstance () {
- return _instance;
-}
-
-public void javaToNative (Object object, TransferData transferData) {
- if (object == null || !(object instanceof ImageData)) return;
- if (!isSupportedType(transferData)) return;
-
- ImageData imdata = (ImageData)object;
- try {
- // write data to a byte array and then ask super to convert to pMedium
- ByteArrayOutputStream out = new ByteArrayOutputStream();
- DataOutputStream writeOut = new DataOutputStream(out);
- ImageLoader loader = new ImageLoader();
- loader.data = new ImageData [] {imdata};
- loader.save(writeOut, SWT.IMAGE_BMP);
- writeOut.close();
- byte[] buffer = out.toByteArray();
- super.javaToNative(buffer, transferData);
- out.close();
- }
- catch (IOException e) {
- }
-}
-public Object nativeToJava(TransferData transferData){
- if (!isSupportedType(transferData)) return null;
-
- byte[] buffer = (byte[])super.nativeToJava(transferData);
- if (buffer == null) return null;
-
- ImageData imdata;
- try {
- ByteArrayInputStream in = new ByteArrayInputStream(buffer);
- DataInputStream readIn = new DataInputStream(in);
- imdata = new ImageData(readIn);
- readIn.close();
- } catch (IOException ex) {
- return null;
- }
- return imdata;
-}
-protected String[] getTypeNames(){
- return new String[]{TYPENAME};
-}
-protected int[] getTypeIds(){
- return new int[] {TYPEID};
-}
-}
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/FileViewer.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/FileViewer.java
deleted file mode 100755
index 9e0d57e252..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/FileViewer.java
+++ /dev/null
@@ -1,1717 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.fileviewer;
-
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.custom.*;
-import org.eclipse.swt.dnd.*;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.program.*;
-import org.eclipse.swt.widgets.*;
-
-import java.io.*;
-import java.text.*;
-import java.util.*;
-
-/**
- * File Viewer example
- */
-public class FileViewer {
- private static ResourceBundle resourceBundle = ResourceBundle.getBundle("examples_fileviewer");
-
- private final static String DRIVE_A = "a:" + File.separator;
- private final static String DRIVE_B = "b:" + File.separator;
-
- /* UI elements */
- private Display display;
- private Shell shell;
- private ToolBar toolBar;
-
- private Label numObjectsLabel;
- private Label diskSpaceLabel;
-
- private File currentDirectory = null;
- private boolean initial = true;
-
- /* Drag and drop optimizations */
- private boolean isDragging = false; // if this app is dragging
- private boolean isDropping = false; // if this app is dropping
-
- private File[] processedDropFiles = null; // so Drag only deletes what it needs to
- private File[] deferredRefreshFiles = null; // to defer notifyRefreshFiles while we do DND
- private boolean deferredRefreshRequested = false; // to defer notifyRefreshFiles while we do DND
- private ProgressDialog progressDialog = null; // progress dialog for locally-initiated operations
-
- /* Combo view */
- private static final String COMBODATA_ROOTS = "Combo.roots";
- // File[]: Array of files whose paths are currently displayed in the combo
- private static final String COMBODATA_LASTTEXT = "Combo.lastText";
- // String: Previous selection text string
-
- private Combo combo;
-
- /* Tree view */
- private IconCache iconCache = new IconCache();
- private static final String TREEITEMDATA_FILE = "TreeItem.file";
- // File: File associated with tree item
- private static final String TREEITEMDATA_IMAGEEXPANDED = "TreeItem.imageExpanded";
- // Image: shown when item is expanded
- private static final String TREEITEMDATA_IMAGECOLLAPSED = "TreeItem.imageCollapsed";
- // Image: shown when item is collapsed
- private static final String TREEITEMDATA_STUB = "TreeItem.stub";
- // Object: if not present or null then the item has not been populated
-
- private Tree tree;
- private Label treeScopeLabel;
-
- /* Table view */
- private static final DateFormat dateFormat = DateFormat.getDateTimeInstance(
- DateFormat.MEDIUM, DateFormat.MEDIUM);
- private static final String TABLEITEMDATA_FILE = "TableItem.file";
- // File: File associated with table row
- private static final String TABLEDATA_DIR = "Table.dir";
- // File: Currently visible directory
- private static final int[] tableWidths = new int[] {150, 60, 75, 150};
- private final String[] tableTitles = new String [] {
- FileViewer.getResourceString("table.Name.title"),
- FileViewer.getResourceString("table.Size.title"),
- FileViewer.getResourceString("table.Type.title"),
- FileViewer.getResourceString("table.Modified.title")
- };
- private Table table;
- private Label tableContentsOfLabel;
-
- /* Table update worker */
- // Control data
- private final Object workerLock = new Object();
- // Lock for all worker control data and state
- private volatile Thread workerThread = null;
- // The worker's thread
- private volatile boolean workerStopped = false;
- // True if the worker must exit on completion of the current cycle
- private volatile boolean workerCancelled = false;
- // True if the worker must cancel its operations prematurely perhaps due to a state update
-
- // Worker state information -- this is what gets synchronized by an update
- private volatile File workerStateDir = null;
-
- // State information to use for the next cycle
- private volatile File workerNextDir = null;
-
- /* Simulate only flag */
- // when true, disables actual filesystem manipulations and outputs results to standard out
- private boolean simulateOnly = true;
-
- /**
- * Runs main program.
- */
- public static void main (String [] args) {
- Display display = new Display ();
- FileViewer application = new FileViewer();
- Shell shell = application.open(display);
- while (! shell.isDisposed()) {
- if (! display.readAndDispatch()) display.sleep();
- }
- application.close();
- display.dispose();
- }
-
- /**
- * Opens the main program.
- */
- public Shell open(Display display) {
- // Create the window
- this.display = display;
- iconCache.initResources(display);
- shell = new Shell();
- createShellContents();
- notifyRefreshFiles(null);
- shell.open();
- return shell;
- }
-
- /**
- * Closes the main program.
- */
- void close() {
- workerStop();
- iconCache.freeResources();
- }
-
- /**
- * Returns a string from the resource bundle.
- * We don't want to crash because of a missing String.
- * Returns the key if not found.
- */
- static String getResourceString(String key) {
- try {
- return resourceBundle.getString(key);
- } catch (MissingResourceException e) {
- return key;
- } catch (NullPointerException e) {
- return "!" + key + "!";
- }
- }
-
- /**
- * Returns a string from the resource bundle and binds it
- * with the given arguments. If the key is not found,
- * return the key.
- */
- static String getResourceString(String key, Object[] args) {
- try {
- return MessageFormat.format(getResourceString(key), args);
- } catch (MissingResourceException e) {
- return key;
- } catch (NullPointerException e) {
- return "!" + key + "!";
- }
- }
-
- /**
- * Construct the UI
- *
- * @param container the ShellContainer managing the Shell we are rendering inside
- */
- private void createShellContents() {
- shell.setText(getResourceString("Title", new Object[] { "" }));
- shell.setImage(iconCache.stockImages[iconCache.shellIcon]);
- Menu bar = new Menu(shell, SWT.BAR);
- shell.setMenuBar(bar);
- createFileMenu(bar);
- createHelpMenu(bar);
-
- GridLayout gridLayout = new GridLayout();
- gridLayout.numColumns = 3;
- gridLayout.marginHeight = gridLayout.marginWidth = 0;
- shell.setLayout(gridLayout);
-
- GridData gridData = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
- gridData.widthHint = 185;
- createComboView(shell, gridData);
- gridData = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
- gridData.horizontalSpan = 2;
- createToolBar(shell, gridData);
-
- SashForm sashForm = new SashForm(shell, SWT.NONE);
- sashForm.setOrientation(SWT.HORIZONTAL);
- gridData = new GridData(GridData.FILL_HORIZONTAL | GridData.FILL_VERTICAL);
- gridData.horizontalSpan = 3;
- sashForm.setLayoutData(gridData);
- createTreeView(sashForm);
- createTableView(sashForm);
- sashForm.setWeights(new int[] { 2, 5 });
-
- numObjectsLabel = new Label(shell, SWT.BORDER);
- gridData = new GridData(GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_FILL);
- gridData.widthHint = 185;
- numObjectsLabel.setLayoutData(gridData);
-
- diskSpaceLabel = new Label(shell, SWT.BORDER);
- gridData = new GridData(GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_FILL);
- gridData.horizontalSpan = 2;
- diskSpaceLabel.setLayoutData(gridData);
- }
-
- /**
- * Creates the File Menu.
- *
- * @param parent the parent menu
- */
- private void createFileMenu(Menu parent) {
- Menu menu = new Menu(parent);
- MenuItem header = new MenuItem(parent, SWT.CASCADE);
- header.setText(getResourceString("menu.File.text"));
- header.setMenu(menu);
-
- final MenuItem simulateItem = new MenuItem(menu, SWT.CHECK);
- simulateItem.setText(getResourceString("menu.File.SimulateOnly.text"));
- simulateItem.setSelection(simulateOnly);
- simulateItem.addSelectionListener(new SelectionAdapter () {
- public void widgetSelected(SelectionEvent e) {
- simulateOnly = simulateItem.getSelection();
- }
- });
-
- MenuItem item = new MenuItem(menu, SWT.PUSH);
- item.setText(getResourceString("menu.File.Close.text"));
- item.addSelectionListener(new SelectionAdapter () {
- public void widgetSelected(SelectionEvent e) {
- shell.close();
- }
- });
- }
-
- /**
- * Creates the Help Menu.
- *
- * @param parent the parent menu
- */
- private void createHelpMenu(Menu parent) {
- Menu menu = new Menu(parent);
- MenuItem header = new MenuItem(parent, SWT.CASCADE);
- header.setText(getResourceString("menu.Help.text"));
- header.setMenu(menu);
-
- MenuItem item = new MenuItem(menu, SWT.PUSH);
- item.setText(getResourceString("menu.Help.About.text"));
- item.addSelectionListener(new SelectionAdapter () {
- public void widgetSelected(SelectionEvent e) {
- MessageBox box = new MessageBox(shell, SWT.ICON_INFORMATION | SWT.OK);
- box.setText(getResourceString("dialog.About.title"));
- box.setMessage(getResourceString("dialog.About.description",
- new Object[] { System.getProperty("os.name") }));
- box.open();
- }
- });
- }
-
- /**
- * Creates the toolbar
- *
- * @param shell the shell on which to attach the toolbar
- * @param layoutData the layout data
- */
- private void createToolBar(final Shell shell, Object layoutData) {
- toolBar = new ToolBar(shell, SWT.NULL);
- toolBar.setLayoutData(layoutData);
- ToolItem item = new ToolItem(toolBar, SWT.SEPARATOR);
- item = new ToolItem(toolBar, SWT.PUSH);
- item.setImage(iconCache.stockImages[iconCache.cmdParent]);
- item.setToolTipText(getResourceString("tool.Parent.tiptext"));
- item.addSelectionListener(new SelectionAdapter () {
- public void widgetSelected(SelectionEvent e) {
- doParent();
- }
- });
- item = new ToolItem(toolBar, SWT.PUSH);
- item.setImage(iconCache.stockImages[iconCache.cmdRefresh]);
- item.setToolTipText(getResourceString("tool.Refresh.tiptext"));
- item.addSelectionListener(new SelectionAdapter () {
- public void widgetSelected(SelectionEvent e) {
- doRefresh();
- }
- });
- SelectionAdapter unimplementedListener = new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- MessageBox box = new MessageBox(shell, SWT.ICON_INFORMATION | SWT.OK);
- box.setText(getResourceString("dialog.NotImplemented.title"));
- box.setMessage(getResourceString("dialog.ActionNotImplemented.description"));
- box.open();
- }
- };
-
- item = new ToolItem(toolBar, SWT.SEPARATOR);
- item = new ToolItem(toolBar, SWT.PUSH);
- item.setImage(iconCache.stockImages[iconCache.cmdCut]);
- item.setToolTipText(getResourceString("tool.Cut.tiptext"));
- item.addSelectionListener(unimplementedListener);
- item = new ToolItem(toolBar, SWT.PUSH);
- item.setImage(iconCache.stockImages[iconCache.cmdCopy]);
- item.setToolTipText(getResourceString("tool.Copy.tiptext"));
- item.addSelectionListener(unimplementedListener);
- item = new ToolItem(toolBar, SWT.PUSH);
- item.setImage(iconCache.stockImages[iconCache.cmdPaste]);
- item.setToolTipText(getResourceString("tool.Paste.tiptext"));
- item.addSelectionListener(unimplementedListener);
-
- item = new ToolItem(toolBar, SWT.SEPARATOR);
- item = new ToolItem(toolBar, SWT.PUSH);
- item.setImage(iconCache.stockImages[iconCache.cmdDelete]);
- item.setToolTipText(getResourceString("tool.Delete.tiptext"));
- item.addSelectionListener(unimplementedListener);
- item = new ToolItem(toolBar, SWT.PUSH);
- item.setImage(iconCache.stockImages[iconCache.cmdRename]);
- item.setToolTipText(getResourceString("tool.Rename.tiptext"));
- item.addSelectionListener(unimplementedListener);
-
- item = new ToolItem(toolBar, SWT.SEPARATOR);
- item = new ToolItem(toolBar, SWT.PUSH);
- item.setImage(iconCache.stockImages[iconCache.cmdSearch]);
- item.setToolTipText(getResourceString("tool.Search.tiptext"));
- item.addSelectionListener(unimplementedListener);
- item = new ToolItem(toolBar, SWT.PUSH);
- item.setImage(iconCache.stockImages[iconCache.cmdPrint]);
- item.setToolTipText(getResourceString("tool.Print.tiptext"));
- item.addSelectionListener(unimplementedListener);
- }
-
- /**
- * Creates the combo box view.
- *
- * @param parent the parent control
- */
- private void createComboView(Composite parent, Object layoutData) {
- combo = new Combo(parent, SWT.NONE);
- combo.setLayoutData(layoutData);
- combo.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- final File[] roots = (File[]) combo.getData(COMBODATA_ROOTS);
- if (roots == null) return;
- int selection = combo.getSelectionIndex();
- if (selection >= 0 && selection < roots.length) {
- notifySelectedDirectory(roots[selection]);
- }
- }
- public void widgetDefaultSelected(SelectionEvent e) {
- final String lastText = (String) combo.getData(COMBODATA_LASTTEXT);
- String text = combo.getText();
- if (text == null) return;
- if (lastText != null && lastText.equals(text)) return;
- combo.setData(COMBODATA_LASTTEXT, text);
- notifySelectedDirectory(new File(text));
- }
- });
- }
-
- /**
- * Creates the file tree view.
- *
- * @param parent the parent control
- */
- private void createTreeView(Composite parent) {
- Composite composite = new Composite(parent, SWT.NONE);
- GridLayout gridLayout = new GridLayout();
- gridLayout.numColumns = 1;
- gridLayout.marginHeight = gridLayout.marginWidth = 2;
- gridLayout.horizontalSpacing = gridLayout.verticalSpacing = 0;
- composite.setLayout(gridLayout);
-
- treeScopeLabel = new Label(composite, SWT.BORDER);
- treeScopeLabel.setText(FileViewer.getResourceString("details.AllFolders.text"));
- treeScopeLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_FILL));
-
- tree = new Tree(composite, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL | SWT.SINGLE);
- tree.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.FILL_VERTICAL));
-
- tree.addSelectionListener(new SelectionListener() {
- public void widgetSelected(SelectionEvent event) {
- final TreeItem[] selection = tree.getSelection();
- if (selection != null && selection.length != 0) {
- TreeItem item = selection[0];
- File file = (File) item.getData(TREEITEMDATA_FILE);
-
- notifySelectedDirectory(file);
- }
- }
- public void widgetDefaultSelected(SelectionEvent event) {
- final TreeItem[] selection = tree.getSelection();
- if (selection != null && selection.length != 0) {
- TreeItem item = selection[0];
- item.setExpanded(true);
- treeExpandItem(item);
- }
- }
- });
- tree.addTreeListener(new TreeAdapter() {
- public void treeExpanded(TreeEvent event) {
- final TreeItem item = (TreeItem) event.item;
- final Image image = (Image) item.getData(TREEITEMDATA_IMAGEEXPANDED);
- if (image != null) item.setImage(image);
- treeExpandItem(item);
- }
- public void treeCollapsed(TreeEvent event) {
- final TreeItem item = (TreeItem) event.item;
- final Image image = (Image) item.getData(TREEITEMDATA_IMAGECOLLAPSED);
- if (image != null) item.setImage(image);
- }
- });
- createTreeDragSource(tree);
- createTreeDropTarget(tree);
- }
-
- /**
- * Creates the Drag & Drop DragSource for items being dragged from the tree.
- *
- * @return the DragSource for the tree
- */
- private DragSource createTreeDragSource(final Tree tree){
- DragSource dragSource = new DragSource(tree, DND.DROP_MOVE | DND.DROP_COPY);
- dragSource.setTransfer(new Transfer[] { FileTransfer.getInstance() });
- dragSource.addDragListener(new DragSourceListener() {
- TreeItem[] dndSelection = null;
- String[] sourceNames = null;
- public void dragStart(DragSourceEvent event){
- dndSelection = tree.getSelection();
- sourceNames = null;
- event.doit = dndSelection.length > 0;
- isDragging = true;
- processedDropFiles = null;
- }
- public void dragFinished(DragSourceEvent event){
- dragSourceHandleDragFinished(event, sourceNames);
- dndSelection = null;
- sourceNames = null;
- isDragging = false;
- processedDropFiles = null;
- handleDeferredRefresh();
- }
- public void dragSetData(DragSourceEvent event){
- if (dndSelection == null || dndSelection.length == 0) return;
- if (! FileTransfer.getInstance().isSupportedType(event.dataType)) return;
-
- sourceNames = new String[dndSelection.length];
- for (int i = 0; i < dndSelection.length; i++) {
- File file = (File) dndSelection[i].getData(TREEITEMDATA_FILE);
- sourceNames[i] = file.getAbsolutePath();
- }
- event.data = sourceNames;
- }
- });
- return dragSource;
- }
-
- /**
- * Creates the Drag & Drop DropTarget for items being dropped onto the tree.
- *
- * @return the DropTarget for the tree
- */
- private DropTarget createTreeDropTarget(final Tree tree) {
- DropTarget dropTarget = new DropTarget(tree, DND.DROP_MOVE | DND.DROP_COPY);
- dropTarget.setTransfer(new Transfer[] { FileTransfer.getInstance() });
- dropTarget.addDropListener(new DropTargetAdapter() {
- public void dragEnter(DropTargetEvent event) {
- isDropping = true;
- }
- public void dragLeave(DropTargetEvent event) {
- isDropping = false;
- handleDeferredRefresh();
- }
- public void dragOver(DropTargetEvent event) {
- dropTargetValidate(event, getTargetFile(event));
- event.feedback |= DND.FEEDBACK_EXPAND | DND.FEEDBACK_SCROLL;
- }
- public void drop(DropTargetEvent event) {
- File targetFile = getTargetFile(event);
- if (dropTargetValidate(event, targetFile))
- dropTargetHandleDrop(event, targetFile);
- }
- private File getTargetFile(DropTargetEvent event) {
- // Determine the target File for the drop
- TreeItem item = tree.getItem(tree.toControl(new Point(event.x, event.y)));
- File targetFile = null;
- if (item != null) {
- // We are over a particular item in the tree, use the item's file
- targetFile = (File) item.getData(TREEITEMDATA_FILE);
- }
- return targetFile;
- }
- });
- return dropTarget;
- }
-
- /**
- * Handles expand events on a tree item.
- *
- * @param item the TreeItem to fill in
- */
- private void treeExpandItem(TreeItem item) {
- shell.setCursor(iconCache.stockCursors[iconCache.cursorWait]);
- final Object stub = item.getData(TREEITEMDATA_STUB);
- if (stub == null) treeRefreshItem(item, true);
- shell.setCursor(iconCache.stockCursors[iconCache.cursorDefault]);
- }
-
- /**
- * Traverse the entire tree and update only what has changed.
- *
- * @param roots the root directory listing
- */
- private void treeRefresh(File[] masterFiles) {
- TreeItem[] items = tree.getItems();
- int masterIndex = 0;
- int itemIndex = 0;
- for (int i = 0; i < items.length; ++i) {
- final TreeItem item = items[i];
- final File itemFile = (File) item.getData(TREEITEMDATA_FILE);
- if ((itemFile == null) || (masterIndex == masterFiles.length)) {
- // remove bad item or placeholder
- item.dispose();
- continue;
- }
- final File masterFile = masterFiles[masterIndex];
- int compare = compareFiles(masterFile, itemFile);
- if (compare == 0) {
- // same file, update it
- treeRefreshItem(item, false);
- ++itemIndex;
- ++masterIndex;
- } else if (compare < 0) {
- // should appear before file, insert it
- TreeItem newItem = new TreeItem(tree, SWT.NULL, itemIndex);
- treeInitVolume(newItem, masterFile);
- new TreeItem(newItem, SWT.NULL); // placeholder child item to get "expand" button
- ++itemIndex;
- ++masterIndex;
- --i;
- } else {
- // should appear after file, delete stale item
- item.dispose();
- }
- }
- for (;masterIndex < masterFiles.length; ++masterIndex) {
- final File masterFile = masterFiles[masterIndex];
- TreeItem newItem = new TreeItem(tree, SWT.NULL);
- treeInitVolume(newItem, masterFile);
- new TreeItem(newItem, SWT.NULL); // placeholder child item to get "expand" button
- }
- }
-
- /**
- * Traverse an item in the tree and update only what has changed.
- *
- * @param dirItem the tree item of the directory
- * @param forcePopulate true iff we should populate non-expanded items as well
- */
- private void treeRefreshItem(TreeItem dirItem, boolean forcePopulate) {
- final File dir = (File) dirItem.getData(TREEITEMDATA_FILE);
-
- if (! forcePopulate && ! dirItem.getExpanded()) {
- // Refresh non-expanded item
- if (dirItem.getData(TREEITEMDATA_STUB) != null) {
- treeItemRemoveAll(dirItem);
- new TreeItem(dirItem, SWT.NULL); // placeholder child item to get "expand" button
- dirItem.setData(TREEITEMDATA_STUB, null);
- }
- return;
- }
- // Refresh expanded item
- dirItem.setData(TREEITEMDATA_STUB, this); // clear stub flag
-
- /* Get directory listing */
- File[] subFiles = (dir != null) ? FileViewer.getDirectoryList(dir) : null;
- if (subFiles == null || subFiles.length == 0) {
- /* Error or no contents */
- treeItemRemoveAll(dirItem);
- dirItem.setExpanded(false);
- return;
- }
-
- /* Refresh sub-items */
- TreeItem[] items = dirItem.getItems();
- final File[] masterFiles = subFiles;
- int masterIndex = 0;
- int itemIndex = 0;
- File masterFile = null;
- for (int i = 0; i < items.length; ++i) {
- while ((masterFile == null) && (masterIndex < masterFiles.length)) {
- masterFile = masterFiles[masterIndex++];
- if (! masterFile.isDirectory()) masterFile = null;
- }
-
- final TreeItem item = items[i];
- final File itemFile = (File) item.getData(TREEITEMDATA_FILE);
- if ((itemFile == null) || (masterFile == null)) {
- // remove bad item or placeholder
- item.dispose();
- continue;
- }
- int compare = compareFiles(masterFile, itemFile);
- if (compare == 0) {
- // same file, update it
- treeRefreshItem(item, false);
- masterFile = null;
- ++itemIndex;
- } else if (compare < 0) {
- // should appear before file, insert it
- TreeItem newItem = new TreeItem(dirItem, SWT.NULL, itemIndex);
- treeInitFolder(newItem, masterFile);
- new TreeItem(newItem, SWT.NULL); // add a placeholder child item so we get the "expand" button
- masterFile = null;
- ++itemIndex;
- --i;
- } else {
- // should appear after file, delete stale item
- item.dispose();
- }
- }
- while ((masterFile != null) || (masterIndex < masterFiles.length)) {
- if (masterFile != null) {
- TreeItem newItem = new TreeItem(dirItem, SWT.NULL);
- treeInitFolder(newItem, masterFile);
- new TreeItem(newItem, SWT.NULL); // add a placeholder child item so we get the "expand" button
- if (masterIndex == masterFiles.length) break;
- }
- masterFile = masterFiles[masterIndex++];
- if (! masterFile.isDirectory()) masterFile = null;
- }
- }
-
- /**
- * Foreign method: removes all children of a TreeItem.
- * @param treeItem the TreeItem
- */
- private static void treeItemRemoveAll(TreeItem treeItem) {
- final TreeItem[] children = treeItem.getItems();
- for (int i = 0; i < children.length; ++i) {
- children[i].dispose();
- }
- }
-
- /**
- * Initializes a folder item.
- *
- * @param item the TreeItem to initialize
- * @param folder the File associated with this TreeItem
- */
- private void treeInitFolder(TreeItem item, File folder) {
- item.setText(folder.getName());
- item.setImage(iconCache.stockImages[iconCache.iconClosedFolder]);
- item.setData(TREEITEMDATA_FILE, folder);
- item.setData(TREEITEMDATA_IMAGEEXPANDED, iconCache.stockImages[iconCache.iconOpenFolder]);
- item.setData(TREEITEMDATA_IMAGECOLLAPSED, iconCache.stockImages[iconCache.iconClosedFolder]);
- }
-
- /**
- * Initializes a volume item.
- *
- * @param item the TreeItem to initialize
- * @param volume the File associated with this TreeItem
- */
- private void treeInitVolume(TreeItem item, File volume) {
- item.setText(volume.getPath());
- item.setImage(iconCache.stockImages[iconCache.iconClosedDrive]);
- item.setData(TREEITEMDATA_FILE, volume);
- item.setData(TREEITEMDATA_IMAGEEXPANDED, iconCache.stockImages[iconCache.iconOpenDrive]);
- item.setData(TREEITEMDATA_IMAGECOLLAPSED, iconCache.stockImages[iconCache.iconClosedDrive]);
- }
-
- /**
- * Creates the file details table.
- *
- * @param parent the parent control
- */
- private void createTableView(Composite parent) {
- Composite composite = new Composite(parent, SWT.NONE);
- GridLayout gridLayout = new GridLayout();
- gridLayout.numColumns = 1;
- gridLayout.marginHeight = gridLayout.marginWidth = 2;
- gridLayout.horizontalSpacing = gridLayout.verticalSpacing = 0;
- composite.setLayout(gridLayout);
- tableContentsOfLabel = new Label(composite, SWT.BORDER);
- tableContentsOfLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_FILL));
-
- table = new Table(composite, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL | SWT.MULTI | SWT.FULL_SELECTION);
- table.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.FILL_VERTICAL));
-
- for (int i = 0; i < tableTitles.length; ++i) {
- TableColumn column = new TableColumn(table, SWT.NONE);
- column.setText(tableTitles[i]);
- column.setWidth(tableWidths[i]);
- }
- table.setHeaderVisible(true);
- table.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent event) {
- notifySelectedFiles(getSelectedFiles());
- }
- public void widgetDefaultSelected(SelectionEvent event) {
- doDefaultFileAction(getSelectedFiles());
- }
- private File[] getSelectedFiles() {
- final TableItem[] items = table.getSelection();
- final File[] files = new File[items.length];
-
- for (int i = 0; i < items.length; ++i) {
- files[i] = (File) items[i].getData(TABLEITEMDATA_FILE);
- }
- return files;
- }
- });
-
- createTableDragSource(table);
- createTableDropTarget(table);
- }
-
- /**
- * Creates the Drag & Drop DragSource for items being dragged from the table.
- *
- * @return the DragSource for the table
- */
- private DragSource createTableDragSource(final Table table) {
- DragSource dragSource = new DragSource(table, DND.DROP_MOVE | DND.DROP_COPY);
- dragSource.setTransfer(new Transfer[] { FileTransfer.getInstance() });
- dragSource.addDragListener(new DragSourceListener() {
- TableItem[] dndSelection = null;
- String[] sourceNames = null;
- public void dragStart(DragSourceEvent event){
- dndSelection = table.getSelection();
- sourceNames = null;
- event.doit = dndSelection.length > 0;
- isDragging = true;
- }
- public void dragFinished(DragSourceEvent event){
- dragSourceHandleDragFinished(event, sourceNames);
- dndSelection = null;
- sourceNames = null;
- isDragging = false;
- handleDeferredRefresh();
- }
- public void dragSetData(DragSourceEvent event){
- if (dndSelection == null || dndSelection.length == 0) return;
- if (! FileTransfer.getInstance().isSupportedType(event.dataType)) return;
-
- sourceNames = new String[dndSelection.length];
- for (int i = 0; i < dndSelection.length; i++) {
- File file = (File) dndSelection[i].getData(TABLEITEMDATA_FILE);
- sourceNames[i] = file.getAbsolutePath();
- }
- event.data = sourceNames;
- }
- });
- return dragSource;
- }
-
- /**
- * Creates the Drag & Drop DropTarget for items being dropped onto the table.
- *
- * @return the DropTarget for the table
- */
- private DropTarget createTableDropTarget(final Table table){
- DropTarget dropTarget = new DropTarget(table, DND.DROP_MOVE | DND.DROP_COPY);
- dropTarget.setTransfer(new Transfer[] { FileTransfer.getInstance() });
- dropTarget.addDropListener(new DropTargetAdapter() {
- public void dragEnter(DropTargetEvent event) {
- isDropping = true;
- }
- public void dragLeave(DropTargetEvent event) {
- isDropping = false;
- handleDeferredRefresh();
- }
- public void dragOver(DropTargetEvent event) {
- dropTargetValidate(event, getTargetFile(event));
- event.feedback |= DND.FEEDBACK_EXPAND | DND.FEEDBACK_SCROLL;
- }
- public void drop(DropTargetEvent event) {
- File targetFile = getTargetFile(event);
- if (dropTargetValidate(event, targetFile))
- dropTargetHandleDrop(event, targetFile);
- }
- private File getTargetFile(DropTargetEvent event) {
- // Determine the target File for the drop
- TableItem item = table.getItem(table.toControl(new Point(event.x, event.y)));
- File targetFile = null;
- if (item == null) {
- // We are over an unoccupied area of the table.
- // If it is a COPY, we can use the table's root file.
- if (event.detail == DND.DROP_COPY) {
- targetFile = (File) table.getData(TABLEDATA_DIR);
- }
- } else {
- // We are over a particular item in the table, use the item's file
- targetFile = (File) item.getData(TABLEITEMDATA_FILE);
- }
- return targetFile;
- }
- });
- return dropTarget;
- }
-
- /**
- * Notifies the application components that a new current directory has been selected
- *
- * @param dir the directory that was selected, null is ignored
- */
- void notifySelectedDirectory(File dir) {
- if (dir == null) return;
- if (currentDirectory != null && dir.equals(currentDirectory)) return;
- currentDirectory = dir;
- notifySelectedFiles(null);
-
- /* Shell:
- * Sets the title to indicate the selected directory
- */
- shell.setText(getResourceString("Title", new Object[] { currentDirectory.getPath() }));
-
- /* Table view:
- * Displays the contents of the selected directory.
- */
- workerUpdate(dir, false);
-
- /* Combo view:
- * Sets the combo box to point to the selected directory.
- */
- final File[] comboRoots = (File[]) combo.getData(COMBODATA_ROOTS);
- int comboEntry = -1;
- if (comboRoots != null) {
- for (int i = 0; i < comboRoots.length; ++i) {
- if (dir.equals(comboRoots[i])) {
- comboEntry = i;
- break;
- }
- }
- }
- if (comboEntry == -1) combo.setText(dir.getPath());
- else combo.select(comboEntry);
-
- /* Tree view:
- * If not already expanded, recursively expands the parents of the specified
- * directory until it is visible.
- */
- Vector /* of File */ path = new Vector();
- // Build a stack of paths from the root of the tree
- while (dir != null) {
- path.add(dir);
- dir = dir.getParentFile();
- }
- // Recursively expand the tree to get to the specified directory
- TreeItem[] items = tree.getItems();
- TreeItem lastItem = null;
- for (int i = path.size() - 1; i >= 0; --i) {
- final File pathElement = (File) path.elementAt(i);
-
- // Search for a particular File in the array of tree items
- // No guarantee that the items are sorted in any recognizable fashion, so we'll
- // just sequential scan. There shouldn't be more than a few thousand entries.
- TreeItem item = null;
- for (int k = 0; k < items.length; ++k) {
- item = items[k];
- if (item.isDisposed()) continue;
- final File itemFile = (File) item.getData(TREEITEMDATA_FILE);
- if (itemFile != null && itemFile.equals(pathElement)) break;
- }
- if (item == null) break;
- lastItem = item;
- if (i != 0 && !item.getExpanded()) {
- treeExpandItem(item);
- item.setExpanded(true);
- }
- items = item.getItems();
- }
- tree.setSelection((lastItem != null) ? new TreeItem[] { lastItem } : new TreeItem[0]);
- }
-
- /**
- * Notifies the application components that files have been selected
- *
- * @param files the files that were selected, null or empty array indicates no active selection
- */
- void notifySelectedFiles(File[] files) {
- /* Details:
- * Update the details that are visible on screen.
- */
- if ((files != null) && (files.length != 0)) {
- numObjectsLabel.setText(getResourceString("details.NumberOfSelectedFiles.text",
- new Object[] { new Integer(files.length) }));
- long fileSize = 0L;
- for (int i = 0; i < files.length; ++i) {
- fileSize += files[i].length();
- }
- diskSpaceLabel.setText(getResourceString("details.FileSize.text",
- new Object[] { new Long(fileSize) }));
- } else {
- // No files selected
- diskSpaceLabel.setText("");
- if (currentDirectory != null) {
- int numObjects = getDirectoryList(currentDirectory).length;
- numObjectsLabel.setText(getResourceString("details.DirNumberOfObjects.text",
- new Object[] { new Integer(numObjects) }));
- } else {
- numObjectsLabel.setText("");
- }
- }
- }
-
- /**
- * Notifies the application components that files must be refreshed
- *
- * @param files the files that need refreshing, empty array is a no-op, null refreshes all
- */
- void notifyRefreshFiles(File[] files) {
- if (files != null && files.length == 0) return;
-
- if ((deferredRefreshRequested) && (deferredRefreshFiles != null) && (files != null)) {
- // merge requests
- File[] newRequest = new File[deferredRefreshFiles.length + files.length];
- System.arraycopy(deferredRefreshFiles, 0, newRequest, 0, deferredRefreshFiles.length);
- System.arraycopy(files, 0, newRequest, deferredRefreshFiles.length, files.length);
- deferredRefreshFiles = newRequest;
- } else {
- deferredRefreshFiles = files;
- deferredRefreshRequested = true;
- }
- handleDeferredRefresh();
- }
-
- /**
- * Handles deferred Refresh notifications (due to Drag & Drop)
- */
- void handleDeferredRefresh() {
- if (isDragging || isDropping || ! deferredRefreshRequested) return;
- if (progressDialog != null) {
- progressDialog.close();
- progressDialog = null;
- }
-
- deferredRefreshRequested = false;
- File[] files = deferredRefreshFiles;
- deferredRefreshFiles = null;
-
- shell.setCursor(iconCache.stockCursors[iconCache.cursorWait]);
-
- /* Table view:
- * Refreshes information about any files in the list and their children.
- */
- boolean refreshTable = false;
- if (files != null) {
- for (int i = 0; i < files.length; ++i) {
- final File file = files[i];
- if (file.equals(currentDirectory)) {
- refreshTable = true;
- break;
- }
- File parentFile = file.getParentFile();
- if ((parentFile != null) && (parentFile.equals(currentDirectory))) {
- refreshTable = true;
- break;
- }
- }
- } else refreshTable = true;
- if (refreshTable) workerUpdate(currentDirectory, true);
-
- /* Combo view:
- * Refreshes the list of roots
- */
- final File[] roots = getRoots();
-
- if (files == null) {
- boolean refreshCombo = false;
- final File[] comboRoots = (File[]) combo.getData(COMBODATA_ROOTS);
-
- if ((comboRoots != null) && (comboRoots.length == roots.length)) {
- for (int i = 0; i < roots.length; ++i) {
- if (! roots[i].equals(comboRoots[i])) {
- refreshCombo = true;
- break;
- }
- }
- } else refreshCombo = true;
-
- if (refreshCombo) {
- combo.removeAll();
- combo.setData(COMBODATA_ROOTS, roots);
- for (int i = 0; i < roots.length; ++i) {
- final File file = roots[i];
- combo.add(file.getPath());
- }
- }
- }
-
- /* Tree view:
- * Refreshes information about any files in the list and their children.
- */
- treeRefresh(roots);
-
- // Remind everyone where we are in the filesystem
- final File dir = currentDirectory;
- currentDirectory = null;
- notifySelectedDirectory(dir);
-
- shell.setCursor(iconCache.stockCursors[iconCache.cursorDefault]);
- }
-
- /**
- * Performs the default action on a set of files.
- *
- * @param files the array of files to process
- */
- void doDefaultFileAction(File[] files) {
- // only uses the 1st file (for now)
- if (files.length == 0) return;
- final File file = files[0];
-
- if (file.isDirectory()) {
- notifySelectedDirectory(file);
- } else {
- final String fileName = file.getAbsolutePath();
- if (! Program.launch(fileName)) {
- MessageBox dialog = new MessageBox(shell, SWT.ICON_ERROR | SWT.OK);
- dialog.setMessage(getResourceString("error.FailedLaunch.message", new Object[] { fileName }));
- dialog.setText(shell.getText ());
- dialog.open();
- }
- }
- }
-
- /**
- * Navigates to the parent directory
- */
- void doParent() {
- if (currentDirectory == null) return;
- File parentDirectory = currentDirectory.getParentFile();
- notifySelectedDirectory(parentDirectory);
- }
-
- /**
- * Performs a refresh
- */
- void doRefresh() {
- notifyRefreshFiles(null);
- }
-
- /**
- * Validates a drop target as a candidate for a drop operation.
- * <p>
- * Used in dragOver() and dropAccept().<br>
- * Note event.detail is set to DND.DROP_NONE by this method if the target is not valid.
- * </p>
- * @param event the DropTargetEvent to validate
- * @param targetFile the File representing the drop target location
- * under inspection, or null if none
- */
- private boolean dropTargetValidate(DropTargetEvent event, File targetFile) {
- if (targetFile != null && targetFile.isDirectory()) {
- if (event.detail != DND.DROP_COPY && event.detail != DND.DROP_MOVE) {
- event.detail = DND.DROP_MOVE;
- }
- } else {
- event.detail = DND.DROP_NONE;
- }
- return event.detail != DND.DROP_NONE;
- }
-
- /**
- * Handles a drop on a dropTarget.
- * <p>
- * Used in drop().<br>
- * Note event.detail is modified by this method.
- * </p>
- * @param event the DropTargetEvent passed as parameter to the drop() method
- * @param targetFile the File representing the drop target location
- * under inspection, or null if none
- */
- private void dropTargetHandleDrop(DropTargetEvent event, File targetFile) {
- // Get dropped data (an array of filenames)
- if (! dropTargetValidate(event, targetFile)) return;
- final String[] sourceNames = (String[]) event.data;
- if (sourceNames == null) event.detail = DND.DROP_NONE;
- if (event.detail == DND.DROP_NONE) return;
-
- // Open progress dialog
- progressDialog = new ProgressDialog(shell,
- (event.detail == DND.DROP_MOVE) ? ProgressDialog.MOVE : ProgressDialog.COPY);
- progressDialog.setTotalWorkUnits(sourceNames.length);
- progressDialog.open();
-
- // Copy each file
- Vector /* of File */ processedFiles = new Vector();
- for (int i = 0; (i < sourceNames.length) && (! progressDialog.isCancelled()); i++){
- final File source = new File(sourceNames[i]);
- final File dest = new File(targetFile, source.getName());
- if (source.equals(dest)) continue; // ignore if in same location
-
- progressDialog.setDetailFile(source, ProgressDialog.COPY);
- while (! progressDialog.isCancelled()) {
- if (copyFileStructure(source, dest)) {
- processedFiles.add(source);
- break;
- } else if (! progressDialog.isCancelled()) {
- if (event.detail == DND.DROP_MOVE && (!isDragging)) {
- // It is not possible to notify an external drag source that a drop
- // operation was only partially successful. This is particularly a
- // problem for DROP_MOVE operations since unless the source gets
- // DROP_NONE, it will delete the original data including bits that
- // may not have been transferred successfully.
- MessageBox box = new MessageBox(shell, SWT.ICON_ERROR | SWT.RETRY | SWT.CANCEL);
- box.setText(getResourceString("dialog.FailedCopy.title"));
- box.setMessage(getResourceString("dialog.FailedCopy.description",
- new Object[] { source, dest }));
- int button = box.open();
- if (button == SWT.CANCEL) {
- i = sourceNames.length;
- event.detail = DND.DROP_NONE;
- break;
- }
- } else {
- // We can recover gracefully from errors if the drag source belongs
- // to this application since it will look at processedDropFiles.
- MessageBox box = new MessageBox(shell, SWT.ICON_ERROR | SWT.ABORT | SWT.RETRY | SWT.IGNORE);
- box.setText(getResourceString("dialog.FailedCopy.title"));
- box.setMessage(getResourceString("dialog.FailedCopy.description",
- new Object[] { source, dest }));
- int button = box.open();
- if (button == SWT.ABORT) i = sourceNames.length;
- if (button != SWT.RETRY) break;
- }
- }
- progressDialog.addProgress(1);
- }
- }
- if (isDragging) {
- // Remember exactly which files we processed
- processedDropFiles = ((File[]) processedFiles.toArray(new File[processedFiles.size()]));
- } else {
- progressDialog.close();
- progressDialog = null;
- }
- notifyRefreshFiles(new File[] { targetFile });
- }
-
- /**
- * Handles the completion of a drag on a dragSource.
- * <p>
- * Used in dragFinished().<br>
- * </p>
- * @param event the DragSourceEvent passed as parameter to the dragFinished() method
- * @param sourceNames the names of the files that were dragged (event.data is invalid)
- */
- private void dragSourceHandleDragFinished(DragSourceEvent event, String[] sourceNames) {
- if (sourceNames == null) return;
- if (event.detail != DND.DROP_MOVE) return;
-
- // Get array of files that were actually transferred
- final File[] sourceFiles;
- if (processedDropFiles != null) {
- sourceFiles = processedDropFiles;
- } else {
- sourceFiles = new File[sourceNames.length];
- for (int i = 0; i < sourceNames.length; ++i)
- sourceFiles[i] = new File(sourceNames[i]);
- }
- if (progressDialog == null)
- progressDialog = new ProgressDialog(shell, ProgressDialog.MOVE);
- progressDialog.setTotalWorkUnits(sourceFiles.length);
- progressDialog.setProgress(0);
- progressDialog.open();
-
- // Delete each file
- for (int i = 0; (i < sourceFiles.length) && (! progressDialog.isCancelled()); i++){
- final File source = sourceFiles[i];
- progressDialog.setDetailFile(source, ProgressDialog.DELETE);
- while (! progressDialog.isCancelled()) {
- if (deleteFileStructure(source)) {
- break;
- } else if (! progressDialog.isCancelled()) {
- MessageBox box = new MessageBox(shell, SWT.ICON_ERROR | SWT.ABORT | SWT.RETRY | SWT.IGNORE);
- box.setText(getResourceString("dialog.FailedDelete.title"));
- box.setMessage(getResourceString("dialog.FailedDelete.description",
- new Object[] { source }));
- int button = box.open();
- if (button == SWT.ABORT) i = sourceNames.length;
- if (button == SWT.RETRY) break;
- }
- }
- progressDialog.addProgress(1);
- }
- notifyRefreshFiles(sourceFiles);
- progressDialog.close();
- progressDialog = null;
- }
-
- /**
- * Gets filesystem root entries
- *
- * @return an array of Files corresponding to the root directories on the platform,
- * may be empty but not null
- */
- File[] getRoots() {
- /*
- * On JDK 1.22 only...
- */
- // return File.listRoots();
-
- /*
- * On JDK 1.1.7 and beyond...
- * -- PORTABILITY ISSUES HERE --
- */
- if (System.getProperty ("os.name").indexOf ("Windows") != -1) {
- Vector /* of File */ list = new Vector();
- list.add(new File(DRIVE_A));
- list.add(new File(DRIVE_B));
- for (char i = 'c'; i <= 'z'; ++i) {
- File drive = new File(i + ":" + File.separator);
- if (drive.isDirectory() && drive.exists()) {
- list.add(drive);
- if (initial && i == 'c') {
- currentDirectory = drive;
- initial = false;
- }
- }
- }
- File[] roots = (File[]) list.toArray(new File[list.size()]);
- sortFiles(roots);
- return roots;
- } else {
- File root = new File(File.separator);
- if (initial) {
- currentDirectory = root;
- }
- return new File[] { root };
- }
- }
-
- /**
- * Gets a directory listing
- *
- * @param file the directory to be listed
- * @return an array of files this directory contains, may be empty but not null
- */
- static File[] getDirectoryList(File file) {
- File[] list = file.listFiles();
- if (list == null) return new File[0];
- sortFiles(list);
- return list;
- }
-
- /**
- * Copies a file or entire directory structure.
- *
- * @param oldFile the location of the old file or directory
- * @param newFile the location of the new file or directory
- * @return true iff the operation succeeds without errors
- */
- boolean copyFileStructure(File oldFile, File newFile) {
- if (oldFile == null || newFile == null) return false;
-
- // ensure that newFile is not a child of oldFile or a dupe
- File searchFile = newFile;
- do {
- if (oldFile.equals(searchFile)) return false;
- searchFile = searchFile.getParentFile();
- } while (searchFile != null);
-
- if (oldFile.isDirectory()) {
- /*
- * Copy a directory
- */
- if (progressDialog != null) {
- progressDialog.setDetailFile(oldFile, ProgressDialog.COPY);
- }
- if (simulateOnly) {
- //System.out.println(getResourceString("simulate.DirectoriesCreated.text",
- // new Object[] { newFile.getPath() }));
- } else {
- if (! newFile.mkdirs()) return false;
- }
- File[] subFiles = oldFile.listFiles();
- if (subFiles != null) {
- if (progressDialog != null) {
- progressDialog.addWorkUnits(subFiles.length);
- }
- for (int i = 0; i < subFiles.length; i++) {
- File oldSubFile = subFiles[i];
- File newSubFile = new File(newFile, oldSubFile.getName());
- if (! copyFileStructure(oldSubFile, newSubFile)) return false;
- if (progressDialog != null) {
- progressDialog.addProgress(1);
- if (progressDialog.isCancelled()) return false;
- }
- }
- }
- } else {
- /*
- * Copy a file
- */
- if (simulateOnly) {
- //System.out.println(getResourceString("simulate.CopyFromTo.text",
- // new Object[] { oldFile.getPath(), newFile.getPath() }));
- } else {
- FileReader in = null;
- FileWriter out = null;
- try {
- in = new FileReader(oldFile);
- out = new FileWriter(newFile);
-
- int count;
- while ((count = in.read()) != -1) out.write(count);
- } catch (FileNotFoundException e) {
- return false;
- } catch (IOException e) {
- return false;
- } finally {
- try {
- if (in != null) in.close();
- if (out != null) out.close();
- } catch (IOException e) {
- return false;
- }
- }
- }
- }
- return true;
- }
-
- /**
- * Deletes a file or entire directory structure.
- *
- * @param oldFile the location of the old file or directory
- * @return true iff the operation succeeds without errors
- */
- boolean deleteFileStructure(File oldFile) {
- if (oldFile == null) return false;
- if (oldFile.isDirectory()) {
- /*
- * Delete a directory
- */
- if (progressDialog != null) {
- progressDialog.setDetailFile(oldFile, ProgressDialog.DELETE);
- }
- File[] subFiles = oldFile.listFiles();
- if (subFiles != null) {
- if (progressDialog != null) {
- progressDialog.addWorkUnits(subFiles.length);
- }
- for (int i = 0; i < subFiles.length; i++) {
- File oldSubFile = subFiles[i];
- if (! deleteFileStructure(oldSubFile)) return false;
- if (progressDialog != null) {
- progressDialog.addProgress(1);
- if (progressDialog.isCancelled()) return false;
- }
- }
- }
- }
- if (simulateOnly) {
- //System.out.println(getResourceString("simulate.Delete.text",
- // new Object[] { oldFile.getPath(), oldFile.getPath() }));
- return true;
- } else {
- return oldFile.delete();
- }
- }
-
- /**
- * Sorts files lexicographically by name.
- *
- * @param files the array of Files to be sorted
- */
- static void sortFiles(File[] files) {
- /* Very lazy merge sort algorithm */
- sortBlock(files, 0, files.length - 1, new File[files.length]);
- }
- private static void sortBlock(File[] files, int start, int end, File[] mergeTemp) {
- final int length = end - start + 1;
- if (length < 8) {
- for (int i = end; i > start; --i) {
- for (int j = end; j > start; --j) {
- if (compareFiles(files[j - 1], files[j]) > 0) {
- final File temp = files[j];
- files[j] = files[j-1];
- files[j-1] = temp;
- }
- }
- }
- return;
- }
- final int mid = (start + end) / 2;
- sortBlock(files, start, mid, mergeTemp);
- sortBlock(files, mid + 1, end, mergeTemp);
- int x = start;
- int y = mid + 1;
- for (int i = 0; i < length; ++i) {
- if ((x > mid) || ((y <= end) && compareFiles(files[x], files[y]) > 0)) {
- mergeTemp[i] = files[y++];
- } else {
- mergeTemp[i] = files[x++];
- }
- }
- for (int i = 0; i < length; ++i) files[i + start] = mergeTemp[i];
- }
- private static int compareFiles(File a, File b) {
-// boolean aIsDir = a.isDirectory();
-// boolean bIsDir = b.isDirectory();
-// if (aIsDir && ! bIsDir) return -1;
-// if (bIsDir && ! aIsDir) return 1;
-
- // sort case-sensitive files in a case-insensitive manner
- int compare = a.getName().compareToIgnoreCase(b.getName());
- if (compare == 0) compare = a.getName().compareTo(b.getName());
- return compare;
- }
-
- /*
- * This worker updates the table with file information in the background.
- * <p>
- * Implementation notes:
- * <ul>
- * <li> It is designed such that it can be interrupted cleanly.
- * <li> It uses asyncExec() in some places to ensure that SWT Widgets are manipulated in the
- * right thread. Exclusive use of syncExec() would be inappropriate as it would require a pair
- * of context switches between each table update operation.
- * </ul>
- * </p>
- */
-
- /**
- * Stops the worker and waits for it to terminate.
- */
- void workerStop() {
- if (workerThread == null) return;
- synchronized(workerLock) {
- workerCancelled = true;
- workerStopped = true;
- workerLock.notifyAll();
- }
- while (workerThread != null) {
- if (! display.readAndDispatch()) display.sleep();
- }
- }
-
- /**
- * Notifies the worker that it should update itself with new data.
- * Cancels any previous operation and begins a new one.
- *
- * @param dir the new base directory for the table, null is ignored
- * @param force if true causes a refresh even if the data is the same
- */
- void workerUpdate(File dir, boolean force) {
- if (dir == null) return;
- if ((!force) && (workerNextDir != null) && (workerNextDir.equals(dir))) return;
-
- synchronized(workerLock) {
- workerNextDir = dir;
- workerStopped = false;
- workerCancelled = true;
- workerLock.notifyAll();
- }
- if (workerThread == null) {
- workerThread = new Thread(workerRunnable);
- workerThread.start();
- }
- }
-
- /**
- * Manages the worker's thread
- */
- private final Runnable workerRunnable = new Runnable() {
- public void run() {
- while (! workerStopped) {
- synchronized(workerLock) {
- workerCancelled = false;
- workerStateDir = workerNextDir;
- }
- workerExecute();
- synchronized(workerLock) {
- try {
- if ((!workerCancelled) && (workerStateDir == workerNextDir)) workerLock.wait();
- } catch (InterruptedException e) {
- }
- }
- }
- workerThread = null;
- // wake up UI thread in case it is in a modal loop awaiting thread termination
- // (see workerStop())
- display.wake();
- }
- };
-
- /**
- * Updates the table's contents
- */
- private void workerExecute() {
- File[] dirList;
- // Clear existing information
- display.syncExec(new Runnable() {
- public void run() {
- tableContentsOfLabel.setText(FileViewer.getResourceString("details.ContentsOf.text",
- new Object[] { workerStateDir.getPath() }));
- table.removeAll();
- table.setData(TABLEDATA_DIR, workerStateDir);
- }
- });
- dirList = getDirectoryList(workerStateDir);
-
- for (int i = 0; (! workerCancelled) && (i < dirList.length); i++) {
- workerAddFileDetails(dirList[i]);
- }
-
- }
-
- /**
- * Adds a file's detail information to the directory list
- */
- private void workerAddFileDetails(final File file) {
- final String nameString = file.getName();
- final String dateString = dateFormat.format(new Date(file.lastModified()));
- final String sizeString;
- final String typeString;
- final Image iconImage;
-
- if (file.isDirectory()) {
- typeString = getResourceString("filetype.Folder");
- sizeString = "";
- iconImage = iconCache.stockImages[iconCache.iconClosedFolder];
- } else {
- sizeString = getResourceString("filesize.KB",
- new Object[] { new Long((file.length() + 512) / 1024) });
-
- int dot = nameString.lastIndexOf('.');
- if (dot != -1) {
- String extension = nameString.substring(dot);
- Program program = Program.findProgram(extension);
- if (program != null) {
- typeString = program.getName();
- iconImage = iconCache.getIconFromProgram(program);
- } else {
- typeString = getResourceString("filetype.Unknown", new Object[] { extension.toUpperCase() });
- iconImage = iconCache.stockImages[iconCache.iconFile];
- }
- } else {
- typeString = getResourceString("filetype.None");
- iconImage = iconCache.stockImages[iconCache.iconFile];
- }
- }
- final String[] strings = new String[] { nameString, sizeString, typeString, dateString };
-
- display.syncExec(new Runnable() {
- public void run () {
- // guard against the shell being closed before this runs
- if (shell.isDisposed()) return;
- TableItem tableItem = new TableItem(table, 0);
- tableItem.setText(strings);
- tableItem.setImage(iconImage);
- tableItem.setData(TABLEITEMDATA_FILE, file);
- }
- });
- }
-
- /**
- * Instances of this class manage a progress dialog for file operations.
- */
- class ProgressDialog {
- public final static int COPY = 0;
- public final static int DELETE = 1;
- public final static int MOVE = 2;
-
- Shell shell;
- Label messageLabel, detailLabel;
- ProgressBar progressBar;
- Button cancelButton;
- boolean isCancelled = false;
-
- final String operationKeyName[] = {
- "Copy",
- "Delete",
- "Move"
- };
-
- /**
- * Creates a progress dialog but does not open it immediately.
- *
- * @param parent the parent Shell
- * @param style one of COPY, MOVE
- */
- public ProgressDialog(Shell parent, int style) {
- shell = new Shell(parent, SWT.BORDER | SWT.TITLE | SWT.APPLICATION_MODAL);
- GridLayout gridLayout = new GridLayout();
- shell.setLayout(gridLayout);
- shell.setText(getResourceString("progressDialog." + operationKeyName[style] + ".title"));
- shell.addShellListener(new ShellAdapter() {
- public void shellClosed(ShellEvent e) {
- isCancelled = true;
- }
- });
-
- messageLabel = new Label(shell, SWT.HORIZONTAL);
- messageLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_FILL));
- messageLabel.setText(getResourceString("progressDialog." + operationKeyName[style] + ".description"));
-
- progressBar = new ProgressBar(shell, SWT.HORIZONTAL | SWT.WRAP);
- progressBar.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_FILL));
- progressBar.setMinimum(0);
- progressBar.setMaximum(0);
-
- detailLabel = new Label(shell, SWT.HORIZONTAL);
- GridData gridData = new GridData(GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_BEGINNING);
- gridData.widthHint = 400;
- detailLabel.setLayoutData(gridData);
-
- cancelButton = new Button(shell, SWT.PUSH);
- cancelButton.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END | GridData.VERTICAL_ALIGN_FILL));
- cancelButton.setText(getResourceString("progressDialog.cancelButton.text"));
- cancelButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- isCancelled = true;
- cancelButton.setEnabled(false);
- }
- });
- }
- /**
- * Sets the detail text to show the filename along with a string
- * representing the operation being performed on that file.
- *
- * @param file the file to be detailed
- * @param operation one of COPY, DELETE
- */
- public void setDetailFile(File file, int operation) {
- detailLabel.setText(getResourceString("progressDialog." + operationKeyName[operation] + ".operation",
- new Object[] { file }));
- }
- /**
- * Returns true if the Cancel button was been clicked.
- *
- * @return true if the Cancel button was clicked.
- */
- public boolean isCancelled() {
- return isCancelled;
- }
- /**
- * Sets the total number of work units to be performed.
- *
- * @param work the total number of work units
- */
- public void setTotalWorkUnits(int work) {
- progressBar.setMaximum(work);
- }
- /**
- * Adds to the total number of work units to be performed.
- *
- * @param work the number of work units to add
- */
- public void addWorkUnits(int work) {
- setTotalWorkUnits(progressBar.getMaximum() + work);
- }
- /**
- * Sets the progress of completion of the total work units.
- *
- * @param work the total number of work units completed
- */
- public void setProgress(int work) {
- progressBar.setSelection(work);
- while (display.readAndDispatch()); // enable event processing
- }
- /**
- * Adds to the progress of completion of the total work units.
- *
- * @param work the number of work units completed to add
- */
- public void addProgress(int work) {
- setProgress(progressBar.getSelection() + work);
- }
- /**
- * Opens the dialog.
- */
- public void open() {
- shell.pack();
- final Shell parentShell = (Shell) shell.getParent();
- Rectangle rect = parentShell.getBounds();
- Rectangle bounds = shell.getBounds();
- bounds.x = rect.x + (rect.width - bounds.width) / 2;
- bounds.y = rect.y + (rect.height - bounds.height) / 2;
- shell.setBounds(bounds);
- shell.open();
- }
- /**
- * Closes the dialog and disposes its resources.
- */
- public void close() {
- shell.close();
- shell.dispose();
- shell = null;
- messageLabel = null;
- detailLabel = null;
- progressBar = null;
- cancelButton = null;
- }
- }
-}
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/IconCache.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/IconCache.java
deleted file mode 100755
index 5f27107868..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/IconCache.java
+++ /dev/null
@@ -1,156 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.fileviewer;
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.program.*;
-import org.eclipse.swt.widgets.*;
-
-import java.io.*;
-import java.util.*;
-
-/**
- * Manages icons for the application.
- * This is necessary as we could easily end up creating thousands of icons
- * bearing the same image.
- */
-class IconCache {
- // Stock images
- public final int
- shellIcon = 0,
- iconClosedDrive = 1,
- iconClosedFolder = 2,
- iconFile = 3,
- iconOpenDrive = 4,
- iconOpenFolder = 5,
- cmdCopy = 6,
- cmdCut = 7,
- cmdDelete = 8,
- cmdParent = 9,
- cmdPaste = 10,
- cmdPrint = 11,
- cmdRefresh = 12,
- cmdRename = 13,
- cmdSearch = 14;
- public final String[] stockImageLocations = {
- "generic_example.gif",
- "icon_ClosedDrive.gif",
- "icon_ClosedFolder.gif",
- "icon_File.gif",
- "icon_OpenDrive.gif",
- "icon_OpenFolder.gif",
- "cmd_Copy.gif",
- "cmd_Cut.gif",
- "cmd_Delete.gif",
- "cmd_Parent.gif",
- "cmd_Paste.gif",
- "cmd_Print.gif",
- "cmd_Refresh.gif",
- "cmd_Rename.gif",
- "cmd_Search.gif"
- };
- public Image stockImages[];
-
- // Stock cursors
- public final int
- cursorDefault = 0,
- cursorWait = 1;
- public Cursor stockCursors[];
- // Cached icons
- private Hashtable iconCache; /* map Program to Image */
-
- public IconCache() {
- }
- /**
- * Loads the resources
- *
- * @param display the display
- */
- public void initResources(Display display) {
- if (stockImages == null) {
- stockImages = new Image[stockImageLocations.length];
-
- for (int i = 0; i < stockImageLocations.length; ++i) {
- Image image = createStockImage(display, stockImageLocations[i]);
- if (image == null) {
- freeResources();
- throw new IllegalStateException(
- FileViewer.getResourceString("error.CouldNotLoadResources"));
- }
- stockImages[i] = image;
- }
- }
- if (stockCursors == null) {
- stockCursors = new Cursor[] {
- null,
- new Cursor(display, SWT.CURSOR_WAIT)
- };
- }
- iconCache = new Hashtable();
- }
- /**
- * Frees the resources
- */
- public void freeResources() {
- if (stockImages != null) {
- for (int i = 0; i < stockImages.length; ++i) {
- final Image image = stockImages[i];
- if (image != null) image.dispose();
- }
- stockImages = null;
- }
- if (iconCache != null) {
- for (Enumeration it = iconCache.elements(); it.hasMoreElements(); ) {
- Image image = (Image) it.nextElement();
- image.dispose();
- }
- }
- }
- /**
- * Creates a stock image
- *
- * @param display the display
- * @param path the relative path to the icon
- */
- private Image createStockImage(Display display, String path) {
- try {
- InputStream stream = IconCache.class.getResourceAsStream(path);
- if (stream != null) {
- ImageData imageData = new ImageData(stream);
- if (imageData != null) {
- ImageData mask = imageData.getTransparencyMask();
- return new Image(display, imageData, mask);
- }
- }
- } catch (Exception e) {
- }
- return null;
- }
- /**
- * Gets an image for a file associated with a given program
- *
- * @param program the Program
- */
- public Image getIconFromProgram(Program program) {
- Image image = (Image) iconCache.get(program);
- if (image == null) {
- ImageData imageData = program.getImageData();
- if (imageData != null) {
- image = new Image(null, imageData, imageData.getTransparencyMask());
- iconCache.put(program, image);
- } else {
- image = stockImages[iconFile];
- }
- }
- return image;
- }
-}
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/cmd_Copy.gif b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/cmd_Copy.gif
deleted file mode 100755
index 4274b070ac..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/cmd_Copy.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/cmd_Cut.gif b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/cmd_Cut.gif
deleted file mode 100755
index eb948b94b0..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/cmd_Cut.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/cmd_Delete.gif b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/cmd_Delete.gif
deleted file mode 100755
index 6f647666d3..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/cmd_Delete.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/cmd_Parent.gif b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/cmd_Parent.gif
deleted file mode 100755
index 9b278e6fa8..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/cmd_Parent.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/cmd_Paste.gif b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/cmd_Paste.gif
deleted file mode 100755
index 75e0ab2352..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/cmd_Paste.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/cmd_Print.gif b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/cmd_Print.gif
deleted file mode 100755
index 4dfa8cd3fa..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/cmd_Print.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/cmd_Refresh.gif b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/cmd_Refresh.gif
deleted file mode 100755
index a063c230ac..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/cmd_Refresh.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/cmd_Rename.gif b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/cmd_Rename.gif
deleted file mode 100755
index 25b1325e52..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/cmd_Rename.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/cmd_Search.gif b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/cmd_Search.gif
deleted file mode 100755
index 6dc3ebefc9..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/cmd_Search.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/generic_example.gif b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/generic_example.gif
deleted file mode 100755
index f9fb6b0cab..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/generic_example.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/icon_ClosedDrive.gif b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/icon_ClosedDrive.gif
deleted file mode 100755
index 04e530e37c..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/icon_ClosedDrive.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/icon_ClosedFolder.gif b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/icon_ClosedFolder.gif
deleted file mode 100755
index beb6ed134c..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/icon_ClosedFolder.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/icon_File.gif b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/icon_File.gif
deleted file mode 100755
index 6b86d07978..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/icon_File.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/icon_OpenDrive.gif b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/icon_OpenDrive.gif
deleted file mode 100755
index 7b2b6334ca..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/icon_OpenDrive.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/icon_OpenFolder.gif b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/icon_OpenFolder.gif
deleted file mode 100755
index a9c777343c..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/icon_OpenFolder.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/helloworld/HelloWorld1.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/helloworld/HelloWorld1.java
deleted file mode 100755
index b383bd2323..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/helloworld/HelloWorld1.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.helloworld;
-
-
-import org.eclipse.swt.widgets.*;
-
-/*
- * This example demonstrates the minimum amount of code required
- * to open an SWT Shell and process the events.
- */
-public class HelloWorld1 {
-
-public static void main (String [] args) {
- Display display = new Display ();
- Shell shell = new HelloWorld1 ().open (display);
- while (!shell.isDisposed ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose ();
-}
-
-public Shell open (Display display) {
- Shell shell = new Shell (display);
- shell.open ();
- return shell;
-}
-}
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/helloworld/HelloWorld2.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/helloworld/HelloWorld2.java
deleted file mode 100755
index c5061e4c07..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/helloworld/HelloWorld2.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.helloworld;
-
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-import java.util.ResourceBundle;
-
-/*
- * This example builds on HelloWorld1 and demonstrates the minimum amount
- * of code required to open an SWT Shell with a Label and process the events.
- */
-public class HelloWorld2 {
- private static ResourceBundle resHello = ResourceBundle.getBundle("examples_helloworld");
-
-public static void main (String [] args) {
- Display display = new Display ();
- Shell shell = new HelloWorld2 ().open (display);
- while (!shell.isDisposed ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose ();
-}
-
-public Shell open (Display display) {
- Shell shell = new Shell (display);
- Label label = new Label (shell, SWT.CENTER);
- label.setText (resHello.getString("Hello_world"));
- label.setBounds (shell.getClientArea ());
- shell.open ();
- return shell;
-}
-}
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/helloworld/HelloWorld3.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/helloworld/HelloWorld3.java
deleted file mode 100755
index ce391a085e..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/helloworld/HelloWorld3.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.helloworld;
-
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.events.*;
-import java.util.ResourceBundle;
-
-/*
- * This example builds on HelloWorld2 and demonstrates how to resize the
- * Label when the Shell resizes using a Listener mechanism.
- */
-public class HelloWorld3 {
- private static ResourceBundle resHello = ResourceBundle.getBundle("examples_helloworld");
-
-public static void main (String [] args) {
- Display display = new Display ();
- Shell shell = new HelloWorld3 ().open (display);
- while (!shell.isDisposed ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose ();
-}
-
-public Shell open (Display display) {
- final Shell shell = new Shell (display);
- final Label label = new Label (shell, SWT.CENTER);
- label.setText (resHello.getString("Hello_world"));
- label.pack();
- shell.addControlListener(new ControlAdapter() {
- public void controlResized(ControlEvent e) {
- label.setBounds (shell.getClientArea ());
- }
- });
- shell.pack();
- shell.open ();
- return shell;
-}
-}
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/helloworld/HelloWorld4.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/helloworld/HelloWorld4.java
deleted file mode 100755
index 24cb8af5b9..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/helloworld/HelloWorld4.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.helloworld;
-
-
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.layout.*;
-import java.util.ResourceBundle;
-
-/*
- * This example builds on HelloWorld2 and demonstrates how to resize the
- * Label when the Shell resizes using a Layout.
- */
-public class HelloWorld4 {
- private static ResourceBundle resHello = ResourceBundle.getBundle("examples_helloworld");
-
-public static void main (String [] args) {
- Display display = new Display ();
- Shell shell = new HelloWorld4 ().open (display);
- while (!shell.isDisposed ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose ();
-}
-
-public Shell open (Display display) {
- Shell shell = new Shell (display);
- shell.setLayout(new FillLayout());
- Label label = new Label (shell, SWT.CENTER);
- label.setText (resHello.getString("Hello_world"));
- shell.pack ();
- shell.open ();
- return shell;
-}
-}
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/helloworld/HelloWorld5.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/helloworld/HelloWorld5.java
deleted file mode 100755
index c58eb73c57..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/helloworld/HelloWorld5.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.helloworld;
-
-
-
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.graphics.*;
-import java.util.ResourceBundle;
-
-/*
- * This example builds on HelloWorld1 and demonstrates how to draw directly
- * on an SWT Control.
- */
-public class HelloWorld5 {
- private static ResourceBundle resHello = ResourceBundle.getBundle("examples_helloworld");
-
-public static void main (String [] args) {
- Display display = new Display ();
- Shell shell = new HelloWorld5 ().open (display);
- while (!shell.isDisposed ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose ();
-}
-
-public Shell open (Display display) {
- final Color red = new Color(display, 0xFF, 0, 0);
- final Shell shell = new Shell (display);
- shell.addPaintListener(new PaintListener () {
- public void paintControl(PaintEvent event){
- GC gc = event.gc;
- gc.setForeground(red);
- Rectangle rect = shell.getClientArea();
- gc.drawRectangle(rect.x + 10, rect.y + 10, rect.width - 20, rect.height - 20);
- gc.drawString(resHello.getString("Hello_world"), rect.x + 20, rect.y + 20);
- }
- });
- shell.addDisposeListener (new DisposeListener () {
- public void widgetDisposed (DisposeEvent e) {
- red.dispose();
- }
- });
- shell.open ();
- return shell;
-}
-}
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/hoverhelp/HoverHelp.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/hoverhelp/HoverHelp.java
deleted file mode 100755
index e1dc2c15e1..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/hoverhelp/HoverHelp.java
+++ /dev/null
@@ -1,350 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.hoverhelp;
-
-
-import java.io.*;
-import java.text.*;
-import java.util.*;
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-/**
- * This example demonstrates how to implement hover help feedback
- * using the MouseTrackListener.
- */
-public class HoverHelp {
- private static ResourceBundle resourceBundle = ResourceBundle.getBundle("examples_hoverhelp");;
-
- static final int
- hhiInformation = 0,
- hhiWarning = 1;
- static final String[] imageLocations = {
- "information.gif",
- "warning.gif"
- };
- Image images[];
-
- /**
- * Runs main program.
- */
- public static void main (String [] args) {
- Display display = new Display();
- Shell shell = new HoverHelp().open(display);
- // Event loop
- while (shell != null && ! shell.isDisposed()) {
- if (! display.readAndDispatch()) display.sleep();
- }
- // Cleanup
- display.dispose();
-
- }
-
- /**
- * Opens the main program.
- */
- public Shell open(Display display) {
- // Load the images
- Class clazz = HoverHelp.class;
- try {
- if (images == null) {
- images = new Image[imageLocations.length];
-
- for (int i = 0; i < imageLocations.length; ++i) {
- InputStream stream = clazz.getResourceAsStream(imageLocations[i]);
- ImageData source = new ImageData(stream);
- ImageData mask = source.getTransparencyMask();
- images[i] = new Image(display, source, mask);
- }
- }
- } catch (Exception ex) {
- System.err.println(getResourceString("error.CouldNotLoadResources",
- new Object[] { ex.getMessage() }));
- return null;
- }
-
- // Create the window
- Shell shell = new Shell();
- createPartControl(shell);
- shell.addDisposeListener(new DisposeListener() {
- public void widgetDisposed(DisposeEvent e) {
- /* Free resources */
- if (images != null) {
- for (int i = 0; i < images.length; i++) {
- final Image image = images[i];
- if (image != null) image.dispose();
- }
- images = null;
- }
- }
- });
- shell.pack();
- shell.open();
- return shell;
- }
-
- /**
- * Gets a string from the resource bundle.
- * We don't want to crash because of a missing String.
- * Returns the key if not found.
- */
- public String getResourceString(String key) {
- try {
- return resourceBundle.getString(key);
- } catch (MissingResourceException e) {
- return key;
- } catch (NullPointerException e) {
- return "!" + key + "!";
- }
- }
-
- /**
- * Gets a string from the resource bundle and binds it
- * with the given arguments. If the key is not found,
- * return the key.
- */
- public String getResourceString(String key, Object[] args) {
- try {
- return MessageFormat.format(getResourceString(key), args);
- } catch (MissingResourceException e) {
- return key;
- } catch (NullPointerException e) {
- return "!" + key + "!";
- }
- }
-
- /**
- * Creates the example
- */
- public void createPartControl(Composite frame) {
- final ToolTipHandler tooltip = new ToolTipHandler(frame.getShell());
-
- GridLayout layout = new GridLayout();
- layout.numColumns = 3;
- frame.setLayout(layout);
-
- ToolBar bar = new ToolBar (frame, SWT.BORDER);
- for (int i=0; i<5; i++) {
- ToolItem item = new ToolItem (bar, SWT.PUSH);
- item.setText (getResourceString("ToolItem.text", new Object[] { new Integer(i) }));
- item.setData ("TIP_TEXT", getResourceString("ToolItem.tooltip",
- new Object[] { item.getText() }));
- item.setData ("TIP_HELPTEXTHANDLER", new ToolTipHelpTextHandler() {
- public String getHelpText(Widget widget) {
- Item item = (Item) widget;
- return getResourceString("ToolItem.help", new Object[] { item.getText() });
- }
- });
- }
- GridData gridData = new GridData();
- gridData.horizontalSpan = 3;
- bar.setLayoutData(gridData);
- tooltip.activateHoverHelp(bar);
-
- Table table = new Table (frame, SWT.BORDER);
- for (int i=0; i<4; i++) {
- TableItem item = new TableItem (table, SWT.PUSH);
- item.setText (getResourceString("Item", new Object[] { new Integer(i) }));
- item.setData ("TIP_IMAGE", images[hhiInformation]);
- item.setText (getResourceString("TableItem.text", new Object[] { new Integer(i) }));
- item.setData ("TIP_TEXT", getResourceString("TableItem.tooltip",
- new Object[] { item.getText() }));
- item.setData ("TIP_HELPTEXTHANDLER", new ToolTipHelpTextHandler() {
- public String getHelpText(Widget widget) {
- Item item = (Item) widget;
- return getResourceString("TableItem.help", new Object[] { item.getText() });
- }
- });
- }
- table.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_FILL));
- tooltip.activateHoverHelp(table);
-
- Tree tree = new Tree (frame, SWT.BORDER);
- for (int i=0; i<4; i++) {
- TreeItem item = new TreeItem (tree, SWT.PUSH);
- item.setText (getResourceString("Item", new Object[] { new Integer(i) }));
- item.setData ("TIP_IMAGE", images[hhiWarning]);
- item.setText (getResourceString("TreeItem.text", new Object[] { new Integer(i) }));
- item.setData ("TIP_TEXT", getResourceString("TreeItem.tooltip",
- new Object[] { item.getText() }));
- item.setData ("TIP_HELPTEXTHANDLER", new ToolTipHelpTextHandler() {
- public String getHelpText(Widget widget) {
- Item item = (Item) widget;
- return getResourceString("TreeItem.help", new Object[] { item.getText() });
- }
- });
- }
- tree.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_FILL));
- tooltip.activateHoverHelp(tree);
-
- Button button = new Button (frame, SWT.PUSH);
- button.setText (getResourceString("Hello.text"));
- button.setData ("TIP_TEXT", getResourceString("Hello.tooltip"));
- tooltip.activateHoverHelp(button);
- }
-
- /**
- * Emulated tooltip handler
- * Notice that we could display anything in a tooltip besides text and images.
- * For instance, it might make sense to embed large tables of data or buttons linking
- * data under inspection to material elsewhere, or perform dynamic lookup for creating
- * tooltip text on the fly.
- */
- protected static class ToolTipHandler {
- private Shell parentShell;
- private Shell tipShell;
- private Label tipLabelImage, tipLabelText;
- private Widget tipWidget; // widget this tooltip is hovering over
- private Point tipPosition; // the position being hovered over
-
- /**
- * Creates a new tooltip handler
- *
- * @param parent the parent Shell
- */
- public ToolTipHandler(Shell parent) {
- final Display display = parent.getDisplay();
- this.parentShell = parent;
-
- tipShell = new Shell(parent, SWT.ON_TOP);
- GridLayout gridLayout = new GridLayout();
- gridLayout.numColumns = 2;
- gridLayout.marginWidth = 2;
- gridLayout.marginHeight = 2;
- tipShell.setLayout(gridLayout);
-
- tipShell.setBackground(display.getSystemColor(SWT.COLOR_INFO_BACKGROUND));
-
- tipLabelImage = new Label(tipShell, SWT.NONE);
- tipLabelImage.setForeground(display.getSystemColor(SWT.COLOR_INFO_FOREGROUND));
- tipLabelImage.setBackground(display.getSystemColor(SWT.COLOR_INFO_BACKGROUND));
- tipLabelImage.setLayoutData(new GridData(GridData.FILL_HORIZONTAL |
- GridData.VERTICAL_ALIGN_CENTER));
-
- tipLabelText = new Label(tipShell, SWT.NONE);
- tipLabelText.setForeground(display.getSystemColor(SWT.COLOR_INFO_FOREGROUND));
- tipLabelText.setBackground(display.getSystemColor(SWT.COLOR_INFO_BACKGROUND));
- tipLabelText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL |
- GridData.VERTICAL_ALIGN_CENTER));
- }
-
- /**
- * Enables customized hover help for a specified control
- *
- * @control the control on which to enable hoverhelp
- */
- public void activateHoverHelp(final Control control) {
- /*
- * Get out of the way if we attempt to activate the control underneath the tooltip
- */
- control.addMouseListener(new MouseAdapter () {
- public void mouseDown (MouseEvent e) {
- if (tipShell.isVisible()) tipShell.setVisible(false);
- }
- });
-
- /*
- * Trap hover events to pop-up tooltip
- */
- control.addMouseTrackListener(new MouseTrackAdapter () {
- public void mouseExit(MouseEvent e) {
- if (tipShell.isVisible()) tipShell.setVisible(false);
- tipWidget = null;
- }
- public void mouseHover (MouseEvent event) {
- Point pt = new Point (event.x, event.y);
- Widget widget = event.widget;
- if (widget instanceof ToolBar) {
- ToolBar w = (ToolBar) widget;
- widget = w.getItem (pt);
- }
- if (widget instanceof Table) {
- Table w = (Table) widget;
- widget = w.getItem (pt);
- }
- if (widget instanceof Tree) {
- Tree w = (Tree) widget;
- widget = w.getItem (pt);
- }
- if (widget == null) {
- tipShell.setVisible(false);
- tipWidget = null;
- return;
- }
- if (widget == tipWidget) return;
- tipWidget = widget;
- tipPosition = control.toDisplay(pt);
- String text = (String) widget.getData("TIP_TEXT");
- Image image = (Image) widget.getData("TIP_IMAGE");
- tipLabelText.setText(text != null ? text : "");
- tipLabelImage.setImage(image); // accepts null
- tipShell.pack();
- setHoverLocation(tipShell, tipPosition);
- tipShell.setVisible(true);
- }
- });
-
- /*
- * Trap F1 Help to pop up a custom help box
- */
- control.addHelpListener(new HelpListener () {
- public void helpRequested(HelpEvent event) {
- if (tipWidget == null) return;
- ToolTipHelpTextHandler handler = (ToolTipHelpTextHandler)
- tipWidget.getData("TIP_HELPTEXTHANDLER");
- if (handler == null) return;
- String text = handler.getHelpText(tipWidget);
- if (text == null) return;
-
- if (tipShell.isVisible()) {
- tipShell.setVisible(false);
- Shell helpShell = new Shell(parentShell, SWT.SHELL_TRIM);
- helpShell.setLayout(new FillLayout());
- Label label = new Label(helpShell, SWT.NONE);
- label.setText(text);
- helpShell.pack();
- setHoverLocation(helpShell, tipPosition);
- helpShell.open();
- }
- }
- });
- }
-
- /**
- * Sets the location for a hovering shell
- * @param shell the object that is to hover
- * @param position the position of a widget to hover over
- * @return the top-left location for a hovering box
- */
- private void setHoverLocation(Shell shell, Point position) {
- Rectangle displayBounds = shell.getDisplay().getBounds();
- Rectangle shellBounds = shell.getBounds();
- shellBounds.x = Math.max(Math.min(position.x, displayBounds.width - shellBounds.width), 0);
- shellBounds.y = Math.max(Math.min(position.y + 16, displayBounds.height - shellBounds.height), 0);
- shell.setBounds(shellBounds);
- }
- }
-
- /**
- * ToolTip help handler
- */
- protected interface ToolTipHelpTextHandler {
- /**
- * Get help text
- * @param widget the widget that is under help
- * @return a help text string
- */
- public String getHelpText(Widget widget);
- }
-}
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/hoverhelp/information.gif b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/hoverhelp/information.gif
deleted file mode 100755
index 26c7477336..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/hoverhelp/information.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/hoverhelp/warning.gif b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/hoverhelp/warning.gif
deleted file mode 100755
index cf4fdf93c7..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/hoverhelp/warning.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/imageanalyzer/ImageAnalyzer.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/imageanalyzer/ImageAnalyzer.java
deleted file mode 100755
index c86c8c78c9..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/imageanalyzer/ImageAnalyzer.java
+++ /dev/null
@@ -1,2108 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.imageanalyzer;
-
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.printing.*;
-import org.eclipse.swt.custom.*;
-import java.util.*;
-import java.net.*;
-import java.io.*;
-import java.text.MessageFormat;
-
-public class ImageAnalyzer {
- static ResourceBundle bundle = ResourceBundle.getBundle("examples_images");
- Display display;
- Shell shell;
- Canvas imageCanvas, paletteCanvas;
- Label typeLabel, sizeLabel, depthLabel, transparentPixelLabel,
- timeToLoadLabel, screenSizeLabel, backgroundPixelLabel,
- locationLabel, disposalMethodLabel, delayTimeLabel,
- repeatCountLabel, paletteLabel, dataLabel, statusLabel;
- Combo backgroundCombo, scaleXCombo, scaleYCombo, alphaCombo;
- Button incrementalCheck, transparentCheck, maskCheck, backgroundCheck;
- Button previousButton, nextButton, animateButton;
- StyledText dataText;
- Sash sash;
- Color whiteColor, blackColor, redColor, greenColor, blueColor, canvasBackground;
- Font fixedWidthFont;
- Cursor crossCursor;
- GC imageCanvasGC;
-
- int paletteWidth = 140; // recalculated and used as a width hint
- int ix = 0, iy = 0, py = 0; // used to scroll the image and palette
- float xscale = 1, yscale = 1; // used to scale the image
- int alpha = 255; // used to modify the alpha value of the image
- boolean incremental = false; // used to incrementally display an image
- boolean transparent = true; // used to display an image with transparency
- boolean showMask = false; // used to display an icon mask or transparent image mask
- boolean showBackground = false; // used to display the background of an animated image
- boolean animate = false; // used to animate a multi-image file
- Thread animateThread; // draws animated images
- Thread incrementalThread; // draws incremental images
- String lastPath; // used to seed the file dialog
- String currentName; // the current image file or URL name
- String fileName; // the current image file
- ImageLoader loader; // the loader for the current image file
- ImageData[] imageDataArray; // all image data read from the current file
- int imageDataIndex; // the index of the current image data
- ImageData imageData; // the currently-displayed image data
- Image image; // the currently-displayed image
- Vector incrementalEvents; // incremental image events
- long loadTime = 0; // the time it took to load the current image
-
- static final int INDEX_DIGITS = 4;
- static final int ALPHA_CONSTANT = 0;
- static final int ALPHA_X = 1;
- static final int ALPHA_Y = 2;
-
- class TextPrompter extends Dialog {
- String message = "";
- String result = null;
- Shell dialog;
- Text text;
- public TextPrompter (Shell parent, int style) {
- super (parent, style);
- }
- public TextPrompter (Shell parent) {
- this (parent, SWT.APPLICATION_MODAL);
- }
- public String getMessage () {
- return message;
- }
- public void setMessage (String string) {
- message = string;
- }
- public String open () {
- dialog = new Shell(getParent(), getStyle());
- dialog.setText(getText());
- dialog.setLayout(new GridLayout());
- Label label = new Label(dialog, SWT.NULL);
- label.setText(message);
- label.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- text = new Text(dialog, SWT.SINGLE | SWT.BORDER);
- GridData data = new GridData(GridData.FILL_HORIZONTAL);
- data.widthHint = 300;
- text.setLayoutData(data);
- Composite buttons = new Composite(dialog, SWT.NONE);
- GridLayout grid = new GridLayout();
- grid.numColumns = 2;
- buttons.setLayout(grid);
- buttons.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
- Button ok = new Button(buttons, SWT.PUSH);
- ok.setText(bundle.getString("OK"));
- data = new GridData();
- data.widthHint = 75;
- ok.setLayoutData(data);
- ok.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- result = text.getText();
- dialog.dispose();
- }
- });
- Button cancel = new Button(buttons, SWT.PUSH);
- cancel.setText(bundle.getString("Cancel"));
- data = new GridData();
- data.widthHint = 75;
- cancel.setLayoutData(data);
- cancel.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- dialog.dispose();
- }
- });
- dialog.setDefaultButton(ok);
- dialog.pack();
- dialog.open();
- while (!dialog.isDisposed()) {
- if (!display.readAndDispatch()) display.sleep();
- }
- return result;
- }
- }
-
- public static void main(String [] args) {
- Display display = new Display();
- ImageAnalyzer imageAnalyzer = new ImageAnalyzer();
- Shell shell = imageAnalyzer.open(display);
-
- while (!shell.isDisposed())
- if (!display.readAndDispatch()) display.sleep();
- display.dispose();
- }
-
- public Shell open(Display dpy) {
- // Create a window and set its title.
- this.display = dpy;
- shell = new Shell(display);
- shell.setText(bundle.getString("Image_analyzer"));
-
- // Hook resize and dispose listeners.
- shell.addControlListener(new ControlAdapter() {
- public void controlResized(ControlEvent event) {
- resizeShell(event);
- }
- });
- shell.addShellListener(new ShellAdapter() {
- public void shellClosed(ShellEvent e) {
- animate = false; // stop any animation in progress
- if (animateThread != null) {
- // wait for the thread to die before disposing the shell.
- while (animateThread.isAlive()) {
- if (!display.readAndDispatch()) display.sleep();
- }
- }
- e.doit = true;
- }
- });
- shell.addDisposeListener(new DisposeListener() {
- public void widgetDisposed(DisposeEvent e) {
- // Clean up.
- if (image != null)
- image.dispose();
- whiteColor.dispose();
- blackColor.dispose();
- redColor.dispose();
- greenColor.dispose();
- blueColor.dispose();
- fixedWidthFont.dispose();
- crossCursor.dispose();
- }
- });
-
- // Create colors and fonts.
- whiteColor = new Color(display, 255, 255, 255);
- blackColor = new Color(display, 0, 0, 0);
- redColor = new Color(display, 255, 0, 0);
- greenColor = new Color(display, 0, 255, 0);
- blueColor = new Color(display, 0, 0, 255);
- fixedWidthFont = new Font(display, "courier", 10, 0);
- crossCursor = new Cursor(display, SWT.CURSOR_CROSS);
-
- // Add a menu bar and widgets.
- createMenuBar();
- createWidgets();
- shell.pack();
-
- // Create a GC for drawing, and hook the listener to dispose it.
- imageCanvasGC = new GC(imageCanvas);
- imageCanvas.addDisposeListener(new DisposeListener() {
- public void widgetDisposed(DisposeEvent e) {
- imageCanvasGC.dispose();
- }
- });
-
- // Open the window
- shell.open();
- return shell;
- }
-
- void createWidgets() {
- // Add the widgets to the shell in a grid layout.
- GridLayout layout = new GridLayout();
- layout.marginHeight = 0;
- layout.numColumns = 2;
- shell.setLayout(layout);
-
- // Separate the menu bar from the rest of the widgets.
- Label separator = new Label(shell, SWT.SEPARATOR | SWT.HORIZONTAL);
- GridData gridData = new GridData();
- gridData.horizontalSpan = 2;
- gridData.horizontalAlignment = GridData.FILL;
- separator.setLayoutData(gridData);
-
- // Add a composite to contain some control widgets across the top.
- Composite controls = new Composite(shell, SWT.NULL);
- RowLayout rowLayout = new RowLayout();
- rowLayout.marginTop = 0;
- rowLayout.marginBottom = 5;
- rowLayout.spacing = 8;
- controls.setLayout(rowLayout);
- gridData = new GridData();
- gridData.horizontalSpan = 2;
- controls.setLayoutData(gridData);
-
- // Combo to change the background.
- Group group = new Group(controls, SWT.NULL);
- group.setLayout(new RowLayout());
- group.setText(bundle.getString("Background"));
- backgroundCombo = new Combo(group, SWT.DROP_DOWN | SWT.READ_ONLY);
- backgroundCombo.setItems(new String[] {
- bundle.getString("None"),
- bundle.getString("White"),
- bundle.getString("Black"),
- bundle.getString("Red"),
- bundle.getString("Green"),
- bundle.getString("Blue")});
- backgroundCombo.select(backgroundCombo.indexOf(bundle.getString("White")));
- backgroundCombo.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent event) {
- changeBackground();
- }
- });
-
- // Combo to change the x scale.
- String[] values = {
- "0.1", "0.2", "0.3", "0.4", "0.5", "0.6", "0.7", "0.8", "0.9", "1",
- "1.1", "1.2", "1.3", "1.4", "1.5", "1.6", "1.7", "1.8", "1.9", "2",
- "3", "4", "5", "6", "7", "8", "9", "10",};
- group = new Group(controls, SWT.NULL);
- group.setLayout(new RowLayout());
- group.setText(bundle.getString("X_scale"));
- scaleXCombo = new Combo(group, SWT.DROP_DOWN);
- for (int i = 0; i < values.length; i++) {
- scaleXCombo.add(values[i]);
- }
- scaleXCombo.select(scaleXCombo.indexOf("1"));
- scaleXCombo.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent event) {
- scaleX();
- }
- });
-
- // Combo to change the y scale.
- group = new Group(controls, SWT.NULL);
- group.setLayout(new RowLayout());
- group.setText(bundle.getString("Y_scale"));
- scaleYCombo = new Combo(group, SWT.DROP_DOWN);
- for (int i = 0; i < values.length; i++) {
- scaleYCombo.add(values[i]);
- }
- scaleYCombo.select(scaleYCombo.indexOf("1"));
- scaleYCombo.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent event) {
- scaleY();
- }
- });
-
- // Combo to change the alpha value.
- group = new Group(controls, SWT.NULL);
- group.setLayout(new RowLayout());
- group.setText(bundle.getString("Alpha_K"));
- alphaCombo = new Combo(group, SWT.DROP_DOWN | SWT.READ_ONLY);
- for (int i = 0; i <= 255; i += 5) {
- alphaCombo.add(String.valueOf(i));
- }
- alphaCombo.select(alphaCombo.indexOf("255"));
- alphaCombo.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent event) {
- alpha();
- }
- });
-
- // Check box to request incremental display.
- group = new Group(controls, SWT.NULL);
- group.setLayout(new RowLayout());
- group.setText(bundle.getString("Display"));
- incrementalCheck = new Button(group, SWT.CHECK);
- incrementalCheck.setText(bundle.getString("Incremental"));
- incrementalCheck.setSelection(incremental);
- incrementalCheck.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent event) {
- incremental = ((Button)event.widget).getSelection();
- }
- });
-
- // Check box to request transparent display.
- transparentCheck = new Button(group, SWT.CHECK);
- transparentCheck.setText(bundle.getString("Transparent"));
- transparentCheck.setSelection(transparent);
- transparentCheck.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent event) {
- transparent = ((Button)event.widget).getSelection();
- if (image != null) {
- imageCanvas.redraw();
- }
- }
- });
-
- // Check box to request mask display.
- maskCheck = new Button(group, SWT.CHECK);
- maskCheck.setText(bundle.getString("Mask"));
- maskCheck.setSelection(showMask);
- maskCheck.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent event) {
- showMask = ((Button)event.widget).getSelection();
- if (image != null) {
- imageCanvas.redraw();
- }
- }
- });
-
- // Check box to request background display.
- backgroundCheck = new Button(group, SWT.CHECK);
- backgroundCheck.setText(bundle.getString("Background"));
- backgroundCheck.setSelection(showBackground);
- backgroundCheck.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent event) {
- showBackground = ((Button)event.widget).getSelection();
- }
- });
-
- // Group the animation buttons.
- group = new Group(controls, SWT.NULL);
- group.setLayout(new RowLayout());
- group.setText(bundle.getString("Animation"));
-
- // Push button to display the previous image in a multi-image file.
- previousButton = new Button(group, SWT.PUSH);
- previousButton.setText(bundle.getString("Previous"));
- previousButton.setEnabled(false);
- previousButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent event) {
- previous();
- }
- });
-
- // Push button to display the next image in a multi-image file.
- nextButton = new Button(group, SWT.PUSH);
- nextButton.setText(bundle.getString("Next"));
- nextButton.setEnabled(false);
- nextButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent event) {
- next();
- }
- });
-
- // Push button to toggle animation of a multi-image file.
- animateButton = new Button(group, SWT.PUSH);
- animateButton.setText(bundle.getString("Animate"));
- animateButton.setEnabled(false);
- animateButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent event) {
- animate();
- }
- });
-
- // Label to show the image file type.
- typeLabel = new Label(shell, SWT.NULL);
- typeLabel.setText(bundle.getString("Type_initial"));
- typeLabel.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
-
- // Canvas to show the image.
- imageCanvas = new Canvas(shell, SWT.V_SCROLL | SWT.H_SCROLL | SWT.NO_REDRAW_RESIZE);
- imageCanvas.setBackground(whiteColor);
- imageCanvas.setCursor(crossCursor);
- gridData = new GridData();
- gridData.verticalSpan = 15;
- gridData.horizontalAlignment = GridData.FILL;
- gridData.verticalAlignment = GridData.FILL;
- gridData.grabExcessHorizontalSpace = true;
- gridData.grabExcessVerticalSpace = true;
- imageCanvas.setLayoutData(gridData);
- imageCanvas.addPaintListener(new PaintListener() {
- public void paintControl(PaintEvent event) {
- if (image != null)
- paintImage(event);
- }
- });
- imageCanvas.addMouseMoveListener(new MouseMoveListener() {
- public void mouseMove(MouseEvent event) {
- if (image != null) {
- showColorAt(event.x, event.y);
- }
- }
- });
-
- // Set up the image canvas scroll bars.
- ScrollBar horizontal = imageCanvas.getHorizontalBar();
- horizontal.setVisible(true);
- horizontal.setMinimum(0);
- horizontal.setEnabled(false);
- horizontal.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent event) {
- scrollHorizontally((ScrollBar)event.widget);
- }
- });
- ScrollBar vertical = imageCanvas.getVerticalBar();
- vertical.setVisible(true);
- vertical.setMinimum(0);
- vertical.setEnabled(false);
- vertical.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent event) {
- scrollVertically((ScrollBar)event.widget);
- }
- });
-
- // Label to show the image size.
- sizeLabel = new Label(shell, SWT.NULL);
- sizeLabel.setText(bundle.getString("Size_initial"));
- sizeLabel.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
-
- // Label to show the image depth.
- depthLabel = new Label(shell, SWT.NULL);
- depthLabel.setText(bundle.getString("Depth_initial"));
- depthLabel.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
-
- // Label to show the transparent pixel.
- transparentPixelLabel = new Label(shell, SWT.NULL);
- transparentPixelLabel.setText(bundle.getString("Transparent_pixel_initial"));
- transparentPixelLabel.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
-
- // Label to show the time to load.
- timeToLoadLabel = new Label(shell, SWT.NULL);
- timeToLoadLabel.setText(bundle.getString("Time_to_load_initial"));
- timeToLoadLabel.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
-
- // Separate the animation fields from the rest of the fields.
- separator = new Label(shell, SWT.SEPARATOR | SWT.HORIZONTAL);
- separator.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
-
- // Label to show the logical screen size for animation.
- screenSizeLabel = new Label(shell, SWT.NULL);
- screenSizeLabel.setText(bundle.getString("Animation_size_initial"));
- screenSizeLabel.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
-
- // Label to show the background pixel.
- backgroundPixelLabel = new Label(shell, SWT.NULL);
- backgroundPixelLabel.setText(bundle.getString("Background_pixel_initial"));
- backgroundPixelLabel.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
-
- // Label to show the image location (x, y).
- locationLabel = new Label(shell, SWT.NULL);
- locationLabel.setText(bundle.getString("Image_location_initial"));
- locationLabel.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
-
- // Label to show the image disposal method.
- disposalMethodLabel = new Label(shell, SWT.NULL);
- disposalMethodLabel.setText(bundle.getString("Disposal_initial"));
- disposalMethodLabel.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
-
- // Label to show the image delay time.
- delayTimeLabel = new Label(shell, SWT.NULL);
- delayTimeLabel.setText(bundle.getString("Delay_initial"));
- delayTimeLabel.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
-
- // Label to show the background pixel.
- repeatCountLabel = new Label(shell, SWT.NULL);
- repeatCountLabel.setText(bundle.getString("Repeats_initial"));
- repeatCountLabel.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
-
- // Separate the animation fields from the palette.
- separator = new Label(shell, SWT.SEPARATOR | SWT.HORIZONTAL);
- separator.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
-
- // Label to show if the image has a direct or indexed palette.
- paletteLabel = new Label(shell, SWT.NULL);
- paletteLabel.setText(bundle.getString("Palette_initial"));
- paletteLabel.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
-
- // Canvas to show the image's palette.
- paletteCanvas = new Canvas(shell, SWT.BORDER | SWT.V_SCROLL | SWT.NO_REDRAW_RESIZE);
- paletteCanvas.setFont(fixedWidthFont);
- paletteCanvas.getVerticalBar().setVisible(true);
- gridData = new GridData();
- gridData.horizontalAlignment = GridData.FILL;
- gridData.verticalAlignment = GridData.FILL;
- GC gc = new GC(paletteLabel);
- paletteWidth = gc.stringExtent(bundle.getString("Max_length_string")).x;
- gc.dispose();
- gridData.widthHint = paletteWidth;
- gridData.heightHint = 16 * 11; // show at least 16 colors
- paletteCanvas.setLayoutData(gridData);
- paletteCanvas.addPaintListener(new PaintListener() {
- public void paintControl(PaintEvent event) {
- if (image != null)
- paintPalette(event);
- }
- });
-
- // Set up the palette canvas scroll bar.
- vertical = paletteCanvas.getVerticalBar();
- vertical.setVisible(true);
- vertical.setMinimum(0);
- vertical.setIncrement(10);
- vertical.setEnabled(false);
- vertical.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent event) {
- scrollPalette((ScrollBar)event.widget);
- }
- });
-
- // Sash to see more of image or image data.
- sash = new Sash(shell, SWT.HORIZONTAL);
- gridData = new GridData();
- gridData.horizontalSpan = 2;
- gridData.horizontalAlignment = GridData.FILL;
- sash.setLayoutData(gridData);
- sash.addSelectionListener (new SelectionAdapter () {
- public void widgetSelected (SelectionEvent event) {
- if (event.detail != SWT.DRAG) {
- ((GridData)paletteCanvas.getLayoutData()).heightHint = SWT.DEFAULT;
- Rectangle paletteCanvasBounds = paletteCanvas.getBounds();
- int minY = paletteCanvasBounds.y + 20;
- Rectangle dataLabelBounds = dataLabel.getBounds();
- int maxY = statusLabel.getBounds().y - dataLabelBounds.height - 20;
- if (event.y > minY && event.y < maxY) {
- Rectangle oldSash = sash.getBounds();
- sash.setBounds(event.x, event.y, event.width, event.height);
- int diff = event.y - oldSash.y;
- Rectangle bounds = imageCanvas.getBounds();
- imageCanvas.setBounds(bounds.x, bounds.y, bounds.width, bounds.height + diff);
- bounds = paletteCanvasBounds;
- paletteCanvas.setBounds(bounds.x, bounds.y, bounds.width, bounds.height + diff);
- bounds = dataLabelBounds;
- dataLabel.setBounds(bounds.x, bounds.y + diff, bounds.width, bounds.height);
- bounds = dataText.getBounds();
- dataText.setBounds(bounds.x, bounds.y + diff, bounds.width, bounds.height - diff);
- //shell.layout(true);
- }
- }
- }
- });
-
- // Label to show data-specific fields.
- dataLabel = new Label(shell, SWT.NULL);
- dataLabel.setText(bundle.getString("Pixel_data_initial"));
- gridData = new GridData();
- gridData.horizontalSpan = 2;
- gridData.horizontalAlignment = GridData.FILL;
- dataLabel.setLayoutData(gridData);
-
- // Text to show a dump of the data.
- dataText = new StyledText(shell, SWT.BORDER | SWT.MULTI | SWT.READ_ONLY | SWT.V_SCROLL | SWT.H_SCROLL);
- dataText.setBackground(display.getSystemColor(SWT.COLOR_WIDGET_BACKGROUND));
- dataText.setFont(fixedWidthFont);
- gridData = new GridData();
- gridData.horizontalSpan = 2;
- gridData.horizontalAlignment = GridData.FILL;
- gridData.verticalAlignment = GridData.FILL;
- gridData.heightHint = 128;
- gridData.grabExcessVerticalSpace = true;
- dataText.setLayoutData(gridData);
- dataText.addMouseListener(new MouseAdapter() {
- public void mouseDown(MouseEvent event) {
- if (image != null && event.button == 1) {
- showColorForData();
- }
- }
- });
- dataText.addKeyListener(new KeyAdapter() {
- public void keyPressed(KeyEvent event) {
- if (image != null) {
- showColorForData();
- }
- }
- });
-
- // Label to show status and cursor location in image.
- statusLabel = new Label(shell, SWT.NULL);
- statusLabel.setText("");
- gridData = new GridData();
- gridData.horizontalSpan = 2;
- gridData.horizontalAlignment = GridData.FILL;
- statusLabel.setLayoutData(gridData);
- }
-
- Menu createMenuBar() {
- // Menu bar.
- Menu menuBar = new Menu(shell, SWT.BAR);
- shell.setMenuBar(menuBar);
- createFileMenu(menuBar);
- createAlphaMenu(menuBar);
- return menuBar;
- }
-
- void createFileMenu(Menu menuBar) {
- // File menu
- MenuItem item = new MenuItem(menuBar, SWT.CASCADE);
- item.setText(bundle.getString("File"));
- Menu fileMenu = new Menu(shell, SWT.DROP_DOWN);
- item.setMenu(fileMenu);
-
- // File -> Open File...
- item = new MenuItem(fileMenu, SWT.PUSH);
- item.setText(bundle.getString("OpenFile"));
- item.setAccelerator(SWT.MOD1 + 'O');
- item.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent event) {
- menuOpenFile();
- }
- });
-
- // File -> Open URL...
- item = new MenuItem(fileMenu, SWT.PUSH);
- item.setText(bundle.getString("OpenURL"));
- item.setAccelerator(SWT.MOD1 + 'U');
- item.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent event) {
- menuOpenURL();
- }
- });
-
- // File -> Reopen
- item = new MenuItem(fileMenu, SWT.PUSH);
- item.setText(bundle.getString("Reopen"));
- item.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent event) {
- menuReopen();
- }
- });
-
- new MenuItem(fileMenu, SWT.SEPARATOR);
-
- // File -> Save
- item = new MenuItem(fileMenu, SWT.PUSH);
- item.setText(bundle.getString("Save"));
- item.setAccelerator(SWT.MOD1 + 'S');
- item.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent event) {
- menuSave();
- }
- });
-
- // File -> Save As...
- item = new MenuItem(fileMenu, SWT.PUSH);
- item.setText(bundle.getString("Save_as"));
- item.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent event) {
- menuSaveAs();
- }
- });
-
- // File -> Save Mask As...
- item = new MenuItem(fileMenu, SWT.PUSH);
- item.setText(bundle.getString("Save_mask_as"));
- item.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent event) {
- menuSaveMaskAs();
- }
- });
-
- new MenuItem(fileMenu, SWT.SEPARATOR);
-
- // File -> Print
- item = new MenuItem(fileMenu, SWT.PUSH);
- item.setText(bundle.getString("Print"));
- item.setAccelerator(SWT.MOD1 + 'P');
- item.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent event) {
- menuPrint();
- }
- });
-
- new MenuItem(fileMenu, SWT.SEPARATOR);
-
- // File -> Exit
- item = new MenuItem(fileMenu, SWT.PUSH);
- item.setText(bundle.getString("Exit"));
- item.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent event) {
- shell.close();
- }
- });
-
- }
-
- void createAlphaMenu(Menu menuBar) {
- // Alpha menu
- MenuItem item = new MenuItem(menuBar, SWT.CASCADE);
- item.setText(bundle.getString("Alpha"));
- Menu alphaMenu = new Menu(shell, SWT.DROP_DOWN);
- item.setMenu(alphaMenu);
-
- // Alpha -> K
- item = new MenuItem(alphaMenu, SWT.PUSH);
- item.setText("K");
- item.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent event) {
- menuComposeAlpha(ALPHA_CONSTANT);
- }
- });
-
- // Alpha -> (K + x) % 256
- item = new MenuItem(alphaMenu, SWT.PUSH);
- item.setText("(K + x) % 256");
- item.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent event) {
- menuComposeAlpha(ALPHA_X);
- }
- });
-
- // Alpha -> (K + y) % 256
- item = new MenuItem(alphaMenu, SWT.PUSH);
- item.setText("(K + y) % 256");
- item.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent event) {
- menuComposeAlpha(ALPHA_Y);
- }
- });
- }
-
- void menuComposeAlpha(int alpha_op) {
- if (image == null) return;
- animate = false; // stop any animation in progress
- Cursor waitCursor = new Cursor(display, SWT.CURSOR_WAIT);
- shell.setCursor(waitCursor);
- imageCanvas.setCursor(waitCursor);
- try {
- if (alpha_op == ALPHA_CONSTANT) {
- imageData.alpha = alpha;
- } else {
- imageData.alpha = -1;
- switch (alpha_op) {
- case ALPHA_X:
- for (int y = 0; y < imageData.height; y++) {
- for (int x = 0; x < imageData.width; x++) {
- imageData.setAlpha(x, y, (x + alpha) % 256);
- }
- }
- break;
- case ALPHA_Y:
- for (int y = 0; y < imageData.height; y++) {
- for (int x = 0; x < imageData.width; x++) {
- imageData.setAlpha(x, y, (y + alpha) % 256);
- }
- }
- break;
- default: break;
- }
- }
- displayImage(imageData);
- } finally {
- shell.setCursor(null);
- imageCanvas.setCursor(crossCursor);
- waitCursor.dispose();
- }
- }
-
- void menuOpenFile() {
- animate = false; // stop any animation in progress
- resetScaleCombos();
-
- // Get the user to choose an image file.
- FileDialog fileChooser = new FileDialog(shell, SWT.OPEN);
- if (lastPath != null)
- fileChooser.setFilterPath(lastPath);
- fileChooser.setFilterExtensions(new String[] { "*.bmp; *.gif; *.ico; *.jpg; *.pcx; *.png; *.tif", "*.bmp", "*.gif", "*.ico", "*.jpg", "*.pcx", "*.png", "*.tif" });
- fileChooser.setFilterNames(new String[] { bundle.getString("All_images") + " (bmp, gif, ico, jpg, pcx, png, tif)",
- "BMP (*.bmp)", "GIF (*.gif)", "ICO (*.ico)", "JPEG (*.jpg)", "PCX (*.pcx)", "PNG (*.png)", "TIFF (*.tif)" });
- String filename = fileChooser.open();
- lastPath = fileChooser.getFilterPath();
- if (filename == null)
- return;
-
- Cursor waitCursor = new Cursor(display, SWT.CURSOR_WAIT);
- shell.setCursor(waitCursor);
- imageCanvas.setCursor(waitCursor);
- try {
- loader = new ImageLoader();
- if (incremental) {
- // Prepare to handle incremental events.
- loader.addImageLoaderListener(new ImageLoaderListener() {
- public void imageDataLoaded(ImageLoaderEvent event) {
- incrementalDataLoaded(event);
- }
- });
- incrementalThreadStart();
- }
- // Read the new image(s) from the chosen file.
- long startTime = System.currentTimeMillis();
- imageDataArray = loader.load(filename);
- loadTime = System.currentTimeMillis() - startTime;
- if (imageDataArray.length > 0) {
- // Cache the filename.
- currentName = filename;
- fileName = filename;
-
- // If there are multiple images in the file (typically GIF)
- // then enable the Previous, Next and Animate buttons.
- previousButton.setEnabled(imageDataArray.length > 1);
- nextButton.setEnabled(imageDataArray.length > 1);
- animateButton.setEnabled(imageDataArray.length > 1 && loader.logicalScreenWidth > 0 && loader.logicalScreenHeight > 0);
-
- // Display the first image in the file.
- imageDataIndex = 0;
- displayImage(imageDataArray[imageDataIndex]);
- resetScrollBars();
- }
- } catch (SWTException e) {
- showErrorDialog(bundle.getString("Loading_lc"), filename, e);
- } catch (SWTError e) {
- showErrorDialog(bundle.getString("Loading_lc"), filename, e);
- } finally {
- shell.setCursor(null);
- imageCanvas.setCursor(crossCursor);
- waitCursor.dispose();
- }
- }
-
- void menuOpenURL() {
- animate = false; // stop any animation in progress
- resetScaleCombos();
-
- // Get the user to choose an image URL.
- TextPrompter textPrompter = new TextPrompter(shell, SWT.APPLICATION_MODAL | SWT.DIALOG_TRIM);
- textPrompter.setText(bundle.getString("OpenURLDialog"));
- textPrompter.setMessage(bundle.getString("EnterURL"));
- String urlname = textPrompter.open();
- if (urlname == null) return;
-
- Cursor waitCursor = new Cursor(display, SWT.CURSOR_WAIT);
- shell.setCursor(waitCursor);
- imageCanvas.setCursor(waitCursor);
- try {
- URL url = new URL(urlname);
- InputStream stream = url.openStream();
- loader = new ImageLoader();
- if (incremental) {
- // Prepare to handle incremental events.
- loader.addImageLoaderListener(new ImageLoaderListener() {
- public void imageDataLoaded(ImageLoaderEvent event) {
- incrementalDataLoaded(event);
- }
- });
- incrementalThreadStart();
- }
- // Read the new image(s) from the chosen file.
- long startTime = System.currentTimeMillis();
- imageDataArray = loader.load(stream);
- loadTime = System.currentTimeMillis() - startTime;
- if (imageDataArray.length > 0) {
- currentName = urlname;
- fileName = null;
-
- // If there are multiple images in the file (typically GIF)
- // then enable the Previous, Next and Animate buttons.
- previousButton.setEnabled(imageDataArray.length > 1);
- nextButton.setEnabled(imageDataArray.length > 1);
- animateButton.setEnabled(imageDataArray.length > 1 && loader.logicalScreenWidth > 0 && loader.logicalScreenHeight > 0);
-
- // Display the first image in the file.
- imageDataIndex = 0;
- displayImage(imageDataArray[imageDataIndex]);
- resetScrollBars();
- }
- } catch (Exception e) {
- showErrorDialog(bundle.getString("Loading_lc"), urlname, e);
- } finally {
- shell.setCursor(null);
- imageCanvas.setCursor(crossCursor);
- waitCursor.dispose();
- }
- }
-
- /*
- * Called to start a thread that draws incremental images
- * as they are loaded.
- */
- void incrementalThreadStart() {
- incrementalEvents = new Vector();
- incrementalThread = new Thread("Incremental") {
- public void run() {
- // Draw the first ImageData increment.
- while (incrementalEvents != null) {
- // Synchronize so we don't try to remove when the vector is null.
- synchronized (ImageAnalyzer.this) {
- if (incrementalEvents != null) {
- if (incrementalEvents.size() > 0) {
- ImageLoaderEvent event = (ImageLoaderEvent) incrementalEvents.remove(0);
- if (image != null) image.dispose();
- image = new Image(display, event.imageData);
- imageData = event.imageData;
- imageCanvasGC.drawImage(
- image,
- 0,
- 0,
- imageData.width,
- imageData.height,
- imageData.x,
- imageData.y,
- imageData.width,
- imageData.height);
- } else {
- yield();
- }
- }
- }
- }
- display.wake();
- }
- };
- incrementalThread.setDaemon(true);
- incrementalThread.start();
- }
-
- /*
- * Called when incremental image data has been loaded,
- * for example, for interlaced GIF/PNG or progressive JPEG.
- */
- void incrementalDataLoaded(ImageLoaderEvent event) {
- // Synchronize so that we do not try to add while
- // the incremental drawing thread is removing.
- synchronized (this) {
- incrementalEvents.addElement(event);
- }
- }
-
- void menuSave() {
- if (image == null) return;
- animate = false; // stop any animation in progress
-
- // If the image file type is unknown, we can't 'Save',
- // so we have to use 'Save As...'.
- if (imageData.type == SWT.IMAGE_UNDEFINED || fileName == null) {
- menuSaveAs();
- return;
- }
-
- Cursor waitCursor = new Cursor(display, SWT.CURSOR_WAIT);
- shell.setCursor(waitCursor);
- imageCanvas.setCursor(waitCursor);
- try {
- // Save the current image to the current file.
- loader.data = new ImageData[] {imageData};
- loader.save(fileName, imageData.type);
-
- } catch (SWTException e) {
- showErrorDialog(bundle.getString("Saving_lc"), fileName, e);
- } catch (SWTError e) {
- showErrorDialog(bundle.getString("Saving_lc"), fileName, e);
- } finally {
- shell.setCursor(null);
- imageCanvas.setCursor(crossCursor);
- waitCursor.dispose();
- }
- }
-
- void menuSaveAs() {
- if (image == null) return;
- animate = false; // stop any animation in progress
-
- // Get the user to choose a file name and type to save.
- FileDialog fileChooser = new FileDialog(shell, SWT.SAVE);
- fileChooser.setFilterPath(lastPath);
- if (fileName != null) {
- String name = fileName;
- int nameStart = name.lastIndexOf(java.io.File.separatorChar);
- if (nameStart > -1) {
- name = name.substring(nameStart + 1);
- }
- fileChooser.setFileName(name);
- }
- fileChooser.setFilterExtensions(new String[] { "*.bmp", "*.gif", "*.ico", "*.jpg", "*.png" });
- fileChooser.setFilterNames(new String[] { "BMP (*.bmp)", "GIF (*.gif)", "ICO (*.ico)", "JPEG (*.jpg)", "PNG (*.png)" });
- String filename = fileChooser.open();
- lastPath = fileChooser.getFilterPath();
- if (filename == null)
- return;
-
- // Figure out what file type the user wants saved.
- // We need to rely on the file extension because FileDialog
- // does not have API for asking what filter type was selected.
- int filetype = determineFileType(filename);
- if (filetype == SWT.IMAGE_UNDEFINED) {
- MessageBox box = new MessageBox(shell, SWT.ICON_ERROR);
- box.setMessage(createMsg(bundle.getString("Unknown_extension"),
- filename.substring(filename.lastIndexOf('.') + 1)));
- box.open();
- return;
- }
-
- if (new java.io.File(filename).exists()) {
- MessageBox box = new MessageBox(shell, SWT.ICON_QUESTION | SWT.OK | SWT.CANCEL);
- box.setMessage(createMsg(bundle.getString("Overwrite"), filename));
- if (box.open() == SWT.CANCEL)
- return;
- }
-
- Cursor waitCursor = new Cursor(display, SWT.CURSOR_WAIT);
- shell.setCursor(waitCursor);
- imageCanvas.setCursor(waitCursor);
- try {
- // Save the current image to the specified file.
- loader.data = new ImageData[] {imageData};
- loader.save(filename, filetype);
-
- // Update the shell title and file type label,
- // and use the new file.
- fileName = filename;
- shell.setText(createMsg(bundle.getString("Analyzer_on"), filename));
- typeLabel.setText(createMsg(bundle.getString("Type_string"), fileTypeString(filetype)));
-
- } catch (SWTException e) {
- showErrorDialog(bundle.getString("Saving_lc"), filename, e);
- } catch (SWTError e) {
- showErrorDialog(bundle.getString("Saving_lc"), filename, e);
- } finally {
- shell.setCursor(null);
- imageCanvas.setCursor(crossCursor);
- waitCursor.dispose();
- }
- }
-
- void menuSaveMaskAs() {
- if (image == null || !showMask) return;
- if (imageData.getTransparencyType() == SWT.TRANSPARENCY_NONE) return;
- animate = false; // stop any animation in progress
-
- // Get the user to choose a file name and type to save.
- FileDialog fileChooser = new FileDialog(shell, SWT.SAVE);
- fileChooser.setFilterPath(lastPath);
- if (fileName != null) fileChooser.setFileName(fileName);
- fileChooser.setFilterExtensions(new String[] { "*.bmp", "*.gif", "*.ico", "*.jpg", "*.png" });
- fileChooser.setFilterNames(new String[] { "BMP (*.bmp)", "GIF (*.gif)", "ICO (*.ico)", "JPEG (*.jpg)", "PNG (*.png)" });
- String filename = fileChooser.open();
- lastPath = fileChooser.getFilterPath();
- if (filename == null)
- return;
-
- // Figure out what file type the user wants saved.
- // We need to rely on the file extension because FileDialog
- // does not have API for asking what filter type was selected.
- int filetype = determineFileType(filename);
- if (filetype == SWT.IMAGE_UNDEFINED) {
- MessageBox box = new MessageBox(shell, SWT.ICON_ERROR);
- box.setMessage(createMsg(bundle.getString("Unknown_extension"),
- filename.substring(filename.lastIndexOf('.') + 1)));
- box.open();
- return;
- }
-
- if (new java.io.File(filename).exists()) {
- MessageBox box = new MessageBox(shell, SWT.ICON_QUESTION | SWT.OK | SWT.CANCEL);
- box.setMessage(createMsg(bundle.getString("Overwrite"), filename));
- if (box.open() == SWT.CANCEL)
- return;
- }
-
- Cursor waitCursor = new Cursor(display, SWT.CURSOR_WAIT);
- shell.setCursor(waitCursor);
- imageCanvas.setCursor(waitCursor);
- try {
- // Save the mask of the current image to the specified file.
- ImageData maskImageData = imageData.getTransparencyMask();
- loader.data = new ImageData[] {maskImageData};
- loader.save(filename, filetype);
-
- } catch (SWTException e) {
- showErrorDialog(bundle.getString("Saving_lc"), filename, e);
- } catch (SWTError e) {
- showErrorDialog(bundle.getString("Saving_lc"), filename, e);
- } finally {
- shell.setCursor(null);
- imageCanvas.setCursor(crossCursor);
- waitCursor.dispose();
- }
- }
-
- void menuPrint() {
- if (image == null) return;
-
- try {
- // Ask the user to specify the printer.
- PrintDialog dialog = new PrintDialog(shell, SWT.NULL);
- PrinterData printerData = dialog.open();
- if (printerData == null) return;
-
- Printer printer = new Printer(printerData);
- Point screenDPI = display.getDPI();
- Point printerDPI = printer.getDPI();
- int scaleFactor = printerDPI.x / screenDPI.x;
- Rectangle trim = printer.computeTrim(0, 0, 0, 0);
- if (printer.startJob(currentName)) {
- if (printer.startPage()) {
- GC gc = new GC(printer);
- int transparentPixel = imageData.transparentPixel;
- if (transparentPixel != -1 && !transparent) {
- imageData.transparentPixel = -1;
- }
- Image printerImage = new Image(printer, imageData);
- gc.drawImage(
- printerImage,
- 0,
- 0,
- imageData.width,
- imageData.height,
- -trim.x,
- -trim.y,
- scaleFactor * imageData.width,
- scaleFactor * imageData.height);
- if (transparentPixel != -1 && !transparent) {
- imageData.transparentPixel = transparentPixel;
- }
- printerImage.dispose();
- gc.dispose();
- printer.endPage();
- }
- printer.endJob();
- }
- printer.dispose();
- } catch (SWTError e) {
- MessageBox box = new MessageBox(shell, SWT.ICON_ERROR);
- box.setMessage(bundle.getString("Printing_error") + e.getMessage());
- box.open();
- }
- }
-
- void menuReopen() {
- if (currentName == null) return;
- animate = false; // stop any animation in progress
- resetScrollBars();
- resetScaleCombos();
- Cursor waitCursor = new Cursor(display, SWT.CURSOR_WAIT);
- shell.setCursor(waitCursor);
- imageCanvas.setCursor(waitCursor);
- try {
- loader = new ImageLoader();
- long startTime = System.currentTimeMillis();
- ImageData[] newImageData;
- if (fileName == null) {
- URL url = new URL(currentName);
- InputStream stream = url.openStream();
- newImageData = loader.load(stream);
- } else {
- newImageData = loader.load(fileName);
- }
- loadTime = System.currentTimeMillis() - startTime;
- imageDataIndex = 0;
- displayImage(newImageData[imageDataIndex]);
-
- } catch (Exception e) {
- showErrorDialog(bundle.getString("Reloading_lc"), currentName, e);
- } finally {
- shell.setCursor(null);
- imageCanvas.setCursor(crossCursor);
- waitCursor.dispose();
- }
- }
-
- void changeBackground() {
- String background = backgroundCombo.getText();
- if (background.equals(bundle.getString("White"))) {
- imageCanvas.setBackground(whiteColor);
- } else if (background.equals(bundle.getString("Black"))) {
- imageCanvas.setBackground(blackColor);
- } else if (background.equals(bundle.getString("Red"))) {
- imageCanvas.setBackground(redColor);
- } else if (background.equals(bundle.getString("Green"))) {
- imageCanvas.setBackground(greenColor);
- } else if (background.equals(bundle.getString("Blue"))) {
- imageCanvas.setBackground(blueColor);
- } else {
- imageCanvas.setBackground(null);
- }
- }
-
- /*
- * Called when the ScaleX combo selection changes.
- */
- void scaleX() {
- try {
- xscale = Float.parseFloat(scaleXCombo.getText());
- } catch (NumberFormatException e) {
- xscale = 1;
- scaleXCombo.select(scaleXCombo.indexOf("1"));
- }
- if (image != null) {
- resizeScrollBars();
- imageCanvas.redraw();
- }
- }
-
- /*
- * Called when the ScaleY combo selection changes.
- */
- void scaleY() {
- try {
- yscale = Float.parseFloat(scaleYCombo.getText());
- } catch (NumberFormatException e) {
- yscale = 1;
- scaleYCombo.select(scaleYCombo.indexOf("1"));
- }
- if (image != null) {
- resizeScrollBars();
- imageCanvas.redraw();
- }
- }
-
- /*
- * Called when the Alpha combo selection changes.
- */
- void alpha() {
- try {
- alpha = Integer.parseInt(alphaCombo.getText());
- } catch (NumberFormatException e) {
- alphaCombo.select(alphaCombo.indexOf("255"));
- alpha = 255;
- }
- }
-
- /*
- * Called when the mouse moves in the image canvas.
- * Show the color of the image at the point under the mouse.
- */
- void showColorAt(int mx, int my) {
- int x = mx - imageData.x - ix;
- int y = my - imageData.y - iy;
- showColorForPixel(x, y);
- }
-
- /*
- * Called when a mouse down or key press is detected
- * in the data text. Show the color of the pixel at
- * the caret position in the data text.
- */
- void showColorForData() {
- int delimiterLength = dataText.getLineDelimiter().length();
- int charactersPerLine = 6 + 3 * imageData.bytesPerLine + delimiterLength;
- int position = dataText.getCaretOffset();
- int y = position / charactersPerLine;
- if ((position - y * charactersPerLine) < 6 || ((y + 1) * charactersPerLine - position) <= delimiterLength) {
- statusLabel.setText("");
- return;
- }
- int dataPosition = position - 6 * (y + 1) - delimiterLength * y;
- int byteNumber = dataPosition / 3;
- int where = dataPosition - byteNumber * 3;
- int xByte = byteNumber % imageData.bytesPerLine;
- int x = -1;
- int depth = imageData.depth;
- if (depth == 1) { // 8 pixels per byte (can only show 3 of 8)
- if (where == 0) x = xByte * 8;
- if (where == 1) x = xByte * 8 + 3;
- if (where == 2) x = xByte * 8 + 7;
- }
- if (depth == 2) { // 4 pixels per byte (can only show 3 of 4)
- if (where == 0) x = xByte * 4;
- if (where == 1) x = xByte * 4 + 1;
- if (where == 2) x = xByte * 4 + 3;
- }
- if (depth == 4) { // 2 pixels per byte
- if (where == 0) x = xByte * 2;
- if (where == 1) x = xByte * 2;
- if (where == 2) x = xByte * 2 + 1;
- }
- if (depth == 8) { // 1 byte per pixel
- x = xByte;
- }
- if (depth == 16) { // 2 bytes per pixel
- x = xByte / 2;
- }
- if (depth == 24) { // 3 bytes per pixel
- x = xByte / 3;
- }
- if (depth == 32) { // 4 bytes per pixel
- x = xByte / 4;
- }
- if (x != -1) {
- showColorForPixel(x, y);
- } else {
- statusLabel.setText("");
- }
- }
-
- /*
- * Set the status label to show color information
- * for the specified pixel in the image.
- */
- void showColorForPixel(int x, int y) {
- if (x >= 0 && x < imageData.width && y >= 0 && y < imageData.height) {
- int pixel = imageData.getPixel(x, y);
- RGB rgb = imageData.palette.getRGB(pixel);
-
-
- Object[] args = {new Integer(x),
- new Integer(y),
- new Integer(pixel),
- Integer.toHexString(pixel),
- rgb};
- if (pixel == imageData.transparentPixel) {
- statusLabel.setText(createMsg(bundle.getString("Color_at_trans"), args));
- } else {
- statusLabel.setText(createMsg(bundle.getString("Color_at"), args));
- }
- } else {
- statusLabel.setText("");
- }
- }
-
- /*
- * Called when the Animate button is pressed.
- */
- void animate() {
- animate = !animate;
- if (animate && image != null && imageDataArray.length > 1) {
- animateThread = new Thread(bundle.getString("Animation")) {
- public void run() {
- // Pre-animation widget setup.
- preAnimation();
-
- // Animate.
- try {
- animateLoop();
- } catch (final SWTException e) {
- display.syncExec(new Runnable() {
- public void run() {
- showErrorDialog(createMsg(bundle.getString("Creating_image"),
- new Integer(imageDataIndex+1)),
- currentName, e);
- }
- });
- }
-
- // Post animation widget reset.
- postAnimation();
- }
- };
- animateThread.setDaemon(true);
- animateThread.start();
- }
- }
-
- /*
- * Loop through all of the images in a multi-image file
- * and display them one after another.
- */
- void animateLoop() {
- // Create an off-screen image to draw on, and a GC to draw with.
- // Both are disposed after the animation.
- Image offScreenImage = new Image(display, loader.logicalScreenWidth, loader.logicalScreenHeight);
- GC offScreenImageGC = new GC(offScreenImage);
-
- try {
- // Use syncExec to get the background color of the imageCanvas.
- display.syncExec(new Runnable() {
- public void run() {
- canvasBackground = imageCanvas.getBackground();
- }
- });
-
- // Fill the off-screen image with the background color of the canvas.
- offScreenImageGC.setBackground(canvasBackground);
- offScreenImageGC.fillRectangle(
- 0,
- 0,
- loader.logicalScreenWidth,
- loader.logicalScreenHeight);
-
- // Draw the current image onto the off-screen image.
- offScreenImageGC.drawImage(
- image,
- 0,
- 0,
- imageData.width,
- imageData.height,
- imageData.x,
- imageData.y,
- imageData.width,
- imageData.height);
-
- int repeatCount = loader.repeatCount;
- while (animate && (loader.repeatCount == 0 || repeatCount > 0)) {
- if (imageData.disposalMethod == SWT.DM_FILL_BACKGROUND) {
- // Fill with the background color before drawing.
- Color bgColor = null;
- int backgroundPixel = loader.backgroundPixel;
- if (showBackground && backgroundPixel != -1) {
- // Fill with the background color.
- RGB backgroundRGB = imageData.palette.getRGB(backgroundPixel);
- bgColor = new Color(null, backgroundRGB);
- }
- try {
- offScreenImageGC.setBackground(bgColor != null ? bgColor : canvasBackground);
- offScreenImageGC.fillRectangle(
- imageData.x,
- imageData.y,
- imageData.width,
- imageData.height);
- } finally {
- if (bgColor != null) bgColor.dispose();
- }
- } else if (imageData.disposalMethod == SWT.DM_FILL_PREVIOUS) {
- // Restore the previous image before drawing.
- offScreenImageGC.drawImage(
- image,
- 0,
- 0,
- imageData.width,
- imageData.height,
- imageData.x,
- imageData.y,
- imageData.width,
- imageData.height);
- }
-
- // Get the next image data.
- imageDataIndex = (imageDataIndex + 1) % imageDataArray.length;
- imageData = imageDataArray[imageDataIndex];
- image.dispose();
- image = new Image(display, imageData);
-
- // Draw the new image data.
- offScreenImageGC.drawImage(
- image,
- 0,
- 0,
- imageData.width,
- imageData.height,
- imageData.x,
- imageData.y,
- imageData.width,
- imageData.height);
-
- // Draw the off-screen image to the screen.
- imageCanvasGC.drawImage(offScreenImage, 0, 0);
-
- // Sleep for the specified delay time before drawing again.
- try {
- Thread.sleep(visibleDelay(imageData.delayTime * 10));
- } catch (InterruptedException e) {
- }
-
- // If we have just drawn the last image in the set,
- // then decrement the repeat count.
- if (imageDataIndex == imageDataArray.length - 1) repeatCount--;
- }
- } finally {
- offScreenImage.dispose();
- offScreenImageGC.dispose();
- }
- }
-
- /*
- * Pre animation setup.
- */
- void preAnimation() {
- display.syncExec(new Runnable() {
- public void run() {
- // Change the label of the Animate button to 'Stop'.
- animateButton.setText(bundle.getString("Stop"));
-
- // Disable anything we don't want the user
- // to select during the animation.
- previousButton.setEnabled(false);
- nextButton.setEnabled(false);
- backgroundCombo.setEnabled(false);
- scaleXCombo.setEnabled(false);
- scaleYCombo.setEnabled(false);
- alphaCombo.setEnabled(false);
- incrementalCheck.setEnabled(false);
- transparentCheck.setEnabled(false);
- maskCheck.setEnabled(false);
- // leave backgroundCheck enabled
-
- // Reset the scale combos and scrollbars.
- resetScaleCombos();
- resetScrollBars();
- }
- });
- }
-
- /*
- * Post animation reset.
- */
- void postAnimation() {
- display.syncExec(new Runnable() {
- public void run() {
- // Enable anything we disabled before the animation.
- previousButton.setEnabled(true);
- nextButton.setEnabled(true);
- backgroundCombo.setEnabled(true);
- scaleXCombo.setEnabled(true);
- scaleYCombo.setEnabled(true);
- alphaCombo.setEnabled(true);
- incrementalCheck.setEnabled(true);
- transparentCheck.setEnabled(true);
- maskCheck.setEnabled(true);
-
- // Reset the label of the Animate button.
- animateButton.setText(bundle.getString("Animate"));
-
- if (animate) {
- // If animate is still true, we finished the
- // full number of repeats. Leave the image as-is.
- animate = false;
- } else {
- // Redisplay the current image and its palette.
- displayImage(imageDataArray[imageDataIndex]);
- }
- }
- });
- }
-
- /*
- * Called when the Previous button is pressed.
- * Display the previous image in a multi-image file.
- */
- void previous() {
- if (image != null && imageDataArray.length > 1) {
- if (imageDataIndex == 0) {
- imageDataIndex = imageDataArray.length;
- }
- imageDataIndex = imageDataIndex - 1;
- displayImage(imageDataArray[imageDataIndex]);
- }
- }
-
- /*
- * Called when the Next button is pressed.
- * Display the next image in a multi-image file.
- */
- void next() {
- if (image != null && imageDataArray.length > 1) {
- imageDataIndex = (imageDataIndex + 1) % imageDataArray.length;
- displayImage(imageDataArray[imageDataIndex]);
- }
- }
-
- void displayImage(ImageData newImageData) {
- if (incremental && incrementalThread != null) {
- // Tell the incremental thread to stop drawing.
- synchronized (this) {
- incrementalEvents = null;
- }
-
- // Wait until the incremental thread is done.
- while (incrementalThread.isAlive()) {
- if (!display.readAndDispatch()) display.sleep();
- }
- }
-
- // Dispose of the old image, if there was one.
- if (image != null) image.dispose();
-
- try {
- // Cache the new image and imageData.
- image = new Image(display, newImageData);
- imageData = newImageData;
-
- } catch (SWTException e) {
- showErrorDialog(bundle.getString("Creating_from") + " ", currentName, e);
- image = null;
- return;
- }
-
- // Update the widgets with the new image info.
- String string = createMsg(bundle.getString("Analyzer_on"), currentName);
- shell.setText(string);
-
- if (imageDataArray.length > 1) {
- string = createMsg(bundle.getString("Type_index"),
- new Object[] {fileTypeString(imageData.type),
- new Integer(imageDataIndex + 1),
- new Integer(imageDataArray.length)});
- } else {
- string = createMsg(bundle.getString("Type_string"), fileTypeString(imageData.type));
- }
- typeLabel.setText(string);
-
- string = createMsg(bundle.getString("Size_value"),
- new Object[] {new Integer(imageData.width),
- new Integer(imageData.height)});
- sizeLabel.setText(string);
-
- string = createMsg(bundle.getString("Depth_value"), new Integer(imageData.depth));
- depthLabel.setText(string);
-
- string = createMsg(bundle.getString("Transparent_pixel_value"), pixelInfo(imageData.transparentPixel));
- transparentPixelLabel.setText(string);
-
- string = createMsg(bundle.getString("Time_to_load_value"), new Long(loadTime));
- timeToLoadLabel.setText(string);
-
- string = createMsg(bundle.getString("Animation_size_value"),
- new Object[] {new Integer(loader.logicalScreenWidth),
- new Integer(loader.logicalScreenHeight)});
- screenSizeLabel.setText(string);
-
- string = createMsg(bundle.getString("Background_pixel_value"), pixelInfo(loader.backgroundPixel));
- backgroundPixelLabel.setText(string);
-
- string = createMsg(bundle.getString("Image_location_value"),
- new Object[] {new Integer(imageData.x), new Integer(imageData.y)});
- locationLabel.setText(string);
-
- string = createMsg(bundle.getString("Disposal_value"),
- new Object[] {new Integer(imageData.disposalMethod),
- disposalString(imageData.disposalMethod)});
- disposalMethodLabel.setText(string);
-
- int delay = imageData.delayTime * 10;
- int delayUsed = visibleDelay(delay);
- if (delay != delayUsed) {
- string = createMsg(bundle.getString("Delay_value"),
- new Object[] {new Integer(delay), new Integer(delayUsed)});
- } else {
- string = createMsg(bundle.getString("Delay_used"), new Integer(delay));
- }
- delayTimeLabel.setText(string);
-
- if (loader.repeatCount == 0) {
- string = createMsg( bundle.getString("Repeats_forever"), new Integer(loader.repeatCount));
- } else {
- string = createMsg(bundle.getString("Repeats_value"), new Integer(loader.repeatCount));
- }
- repeatCountLabel.setText(string);
-
-
- if (imageData.palette.isDirect) {
- string = bundle.getString("Palette_direct");
- } else {
- string = createMsg(bundle.getString("Palette_value"), new Integer(imageData.palette.getRGBs().length));
- }
- paletteLabel.setText(string);
-
- string = createMsg(bundle.getString("Pixel_data_value"),
- new Object[] {new Integer(imageData.bytesPerLine),
- new Integer(imageData.scanlinePad),
- depthInfo(imageData.depth)});
- dataLabel.setText(string);
-
- String data = dataHexDump(dataText.getLineDelimiter());
- dataText.setText(data);
-
- // bold the first column all the way down
- int index = 0;
- while((index = data.indexOf(':', index+1)) != -1)
- dataText.setStyleRange(new StyleRange(index - INDEX_DIGITS, INDEX_DIGITS, dataText.getForeground(), dataText.getBackground(), SWT.BOLD));
-
- statusLabel.setText("");
-
- // Redraw both canvases.
- paletteCanvas.redraw();
- imageCanvas.redraw();
- }
-
- void paintImage(PaintEvent event) {
- Image paintImage = image;
- int transparentPixel = imageData.transparentPixel;
- if (transparentPixel != -1 && !transparent) {
- imageData.transparentPixel = -1;
- paintImage = new Image(display, imageData);
- }
- int w = Math.round(imageData.width * xscale);
- int h = Math.round(imageData.height * yscale);
- event.gc.drawImage(
- paintImage,
- 0,
- 0,
- imageData.width,
- imageData.height,
- ix + imageData.x,
- iy + imageData.y,
- w,
- h);
- if (showMask && (imageData.getTransparencyType() != SWT.TRANSPARENCY_NONE)) {
- ImageData maskImageData = imageData.getTransparencyMask();
- Image maskImage = new Image(display, maskImageData);
- event.gc.drawImage(
- maskImage,
- 0,
- 0,
- imageData.width,
- imageData.height,
- w + 10 + ix + imageData.x,
- iy + imageData.y,
- w,
- h);
- maskImage.dispose();
- }
- if (transparentPixel != -1 && !transparent) {
- imageData.transparentPixel = transparentPixel;
- paintImage.dispose();
- }
- }
-
- void paintPalette(PaintEvent event) {
- GC gc = event.gc;
- gc.fillRectangle(paletteCanvas.getClientArea());
- if (imageData.palette.isDirect) {
- // For a direct palette, display the masks.
- int y = py + 10;
- int xTab = 50;
- gc.drawString("rMsk", 10, y, true);
- gc.drawString(toHex4ByteString(imageData.palette.redMask), xTab, y, true);
- gc.drawString("gMsk", 10, y+=12, true);
- gc.drawString(toHex4ByteString(imageData.palette.greenMask), xTab, y, true);
- gc.drawString("bMsk", 10, y+=12, true);
- gc.drawString(toHex4ByteString(imageData.palette.blueMask), xTab, y, true);
- gc.drawString("rShf", 10, y+=12, true);
- gc.drawString(Integer.toString(imageData.palette.redShift), xTab, y, true);
- gc.drawString("gShf", 10, y+=12, true);
- gc.drawString(Integer.toString(imageData.palette.greenShift), xTab, y, true);
- gc.drawString("bShf", 10, y+=12, true);
- gc.drawString(Integer.toString(imageData.palette.blueShift), xTab, y, true);
- } else {
- // For an indexed palette, display the palette colors and indices.
- RGB[] rgbs = imageData.palette.getRGBs();
- if (rgbs != null) {
- int xTab1 = 40, xTab2 = 100;
- for (int i = 0; i < rgbs.length; i++) {
- int y = (i+1) * 10 + py;
- gc.drawString(String.valueOf(i), 10, y, true);
- gc.drawString(toHexByteString(rgbs[i].red) + toHexByteString(rgbs[i].green) + toHexByteString(rgbs[i].blue), xTab1, y, true);
- Color color = new Color(display, rgbs[i]);
- gc.setBackground(color);
- gc.fillRectangle(xTab2, y+2, 10, 10);
- color.dispose();
- }
- }
- }
- }
-
- void resizeShell(ControlEvent event) {
- if (image == null || shell.isDisposed())
- return;
- resizeScrollBars();
- }
-
- // Reset the scale combos to 1.
- void resetScaleCombos() {
- xscale = 1; yscale = 1;
- scaleXCombo.select(scaleXCombo.indexOf("1"));
- scaleYCombo.select(scaleYCombo.indexOf("1"));
- }
-
- // Reset the scroll bars to 0.
- void resetScrollBars() {
- if (image == null) return;
- ix = 0; iy = 0; py = 0;
- resizeScrollBars();
- imageCanvas.getHorizontalBar().setSelection(0);
- imageCanvas.getVerticalBar().setSelection(0);
- paletteCanvas.getVerticalBar().setSelection(0);
- }
-
- void resizeScrollBars() {
- // Set the max and thumb for the image canvas scroll bars.
- ScrollBar horizontal = imageCanvas.getHorizontalBar();
- ScrollBar vertical = imageCanvas.getVerticalBar();
- Rectangle canvasBounds = imageCanvas.getClientArea();
- int width = Math.round(imageData.width * xscale);
- if (width > canvasBounds.width) {
- // The image is wider than the canvas.
- horizontal.setEnabled(true);
- horizontal.setMaximum(width);
- horizontal.setThumb(canvasBounds.width);
- horizontal.setPageIncrement(canvasBounds.width);
- } else {
- // The canvas is wider than the image.
- horizontal.setEnabled(false);
- if (ix != 0) {
- // Make sure the image is completely visible.
- ix = 0;
- imageCanvas.redraw();
- }
- }
- int height = Math.round(imageData.height * yscale);
- if (height > canvasBounds.height) {
- // The image is taller than the canvas.
- vertical.setEnabled(true);
- vertical.setMaximum(height);
- vertical.setThumb(canvasBounds.height);
- vertical.setPageIncrement(canvasBounds.height);
- } else {
- // The canvas is taller than the image.
- vertical.setEnabled(false);
- if (iy != 0) {
- // Make sure the image is completely visible.
- iy = 0;
- imageCanvas.redraw();
- }
- }
-
- // Set the max and thumb for the palette canvas scroll bar.
- vertical = paletteCanvas.getVerticalBar();
- if (imageData.palette.isDirect) {
- vertical.setEnabled(false);
- } else { // indexed palette
- canvasBounds = paletteCanvas.getClientArea();
- int paletteHeight = imageData.palette.getRGBs().length * 10 + 20; // 10 pixels each index + 20 for margins.
- vertical.setEnabled(true);
- vertical.setMaximum(paletteHeight);
- vertical.setThumb(canvasBounds.height);
- vertical.setPageIncrement(canvasBounds.height);
- }
- }
-
- /*
- * Called when the image canvas' horizontal scrollbar is selected.
- */
- void scrollHorizontally(ScrollBar scrollBar) {
- if (image == null) return;
- Rectangle canvasBounds = imageCanvas.getClientArea();
- int width = Math.round(imageData.width * xscale);
- int height = Math.round(imageData.height * yscale);
- if (width > canvasBounds.width) {
- // Only scroll if the image is bigger than the canvas.
- int x = -scrollBar.getSelection();
- if (x + width < canvasBounds.width) {
- // Don't scroll past the end of the image.
- x = canvasBounds.width - width;
- }
- imageCanvas.scroll(x, iy, ix, iy, width, height, false);
- ix = x;
- }
- }
-
- /*
- * Called when the image canvas' vertical scrollbar is selected.
- */
- void scrollVertically(ScrollBar scrollBar) {
- if (image == null) return;
- Rectangle canvasBounds = imageCanvas.getClientArea();
- int width = Math.round(imageData.width * xscale);
- int height = Math.round(imageData.height * yscale);
- if (height > canvasBounds.height) {
- // Only scroll if the image is bigger than the canvas.
- int y = -scrollBar.getSelection();
- if (y + height < canvasBounds.height) {
- // Don't scroll past the end of the image.
- y = canvasBounds.height - height;
- }
- imageCanvas.scroll(ix, y, ix, iy, width, height, false);
- iy = y;
- }
- }
-
- /*
- * Called when the palette canvas' vertical scrollbar is selected.
- */
- void scrollPalette(ScrollBar scrollBar) {
- if (image == null) return;
- Rectangle canvasBounds = paletteCanvas.getClientArea();
- int paletteHeight = imageData.palette.getRGBs().length * 10 + 20;
- if (paletteHeight > canvasBounds.height) {
- // Only scroll if the palette is bigger than the canvas.
- int y = -scrollBar.getSelection();
- if (y + paletteHeight < canvasBounds.height) {
- // Don't scroll past the end of the palette.
- y = canvasBounds.height - paletteHeight;
- }
- paletteCanvas.scroll(0, y, 0, py, paletteWidth, paletteHeight, false);
- py = y;
- }
- }
-
- /*
- * Return a String containing a line-by-line dump of
- * the data in the current imageData. The lineDelimiter
- * parameter must be a string of length 1 or 2.
- */
- String dataHexDump(String lineDelimiter) {
- if (image == null) return "";
- char[] dump = new char[imageData.height * (6 + 3 * imageData.bytesPerLine + lineDelimiter.length())];
- int index = 0;
- for (int i = 0; i < imageData.data.length; i++) {
- if (i % imageData.bytesPerLine == 0) {
- int line = i / imageData.bytesPerLine;
- dump[index++] = Character.forDigit(line / 1000 % 10, 10);
- dump[index++] = Character.forDigit(line / 100 % 10, 10);
- dump[index++] = Character.forDigit(line / 10 % 10, 10);
- dump[index++] = Character.forDigit(line % 10, 10);
- dump[index++] = ':';
- dump[index++] = ' ';
- }
- byte b = imageData.data[i];
- dump[index++] = Character.forDigit((b & 0xF0) >> 4, 16);
- dump[index++] = Character.forDigit(b & 0x0F, 16);
- dump[index++] = ' ';
- if ((i + 1) % imageData.bytesPerLine == 0) {
- dump[index++] = lineDelimiter.charAt(0);
- if (lineDelimiter.length() > 1)
- dump[index++] = lineDelimiter.charAt(1);
- }
- }
- String result = "";
- try {
- result = new String(dump);
- } catch (OutOfMemoryError e) {
- /* Too much data to display in the text widget - truncate at 4M. */
- result = new String(dump, 0, 4 * 1024 * 1024) + "\n ...data dump truncated at 4M...";
- }
- return result;
- }
-
- /*
- * Open an error dialog displaying the specified information.
- */
- void showErrorDialog(String operation, String filename, Throwable e) {
- MessageBox box = new MessageBox(shell, SWT.ICON_ERROR);
- String message = createMsg(bundle.getString("Error"), new String[] {operation, filename});
- String errorMessage = "";
- if (e != null) {
- if (e instanceof SWTException) {
- SWTException swte = (SWTException) e;
- errorMessage = swte.getMessage();
- if (swte.throwable != null) {
- errorMessage += ":\n" + swte.throwable.toString();
- }
- } else if (e instanceof SWTError) {
- SWTError swte = (SWTError) e;
- errorMessage = swte.getMessage();
- if (swte.throwable != null) {
- errorMessage += ":\n" + swte.throwable.toString();
- }
- } else {
- errorMessage = e.toString();
- }
- }
- box.setMessage(message + errorMessage);
- box.open();
- }
-
- /*
- * Return a String describing how to analyze the bytes
- * in the hex dump.
- */
- static String depthInfo(int depth) {
- Object[] args = {new Integer(depth), ""};
- switch (depth) {
- case 1:
- args[1] = createMsg(bundle.getString("Multi_pixels"),
- new Object[] {new Integer(8), " [01234567]"});
- break;
- case 2:
- args[1] = createMsg(bundle.getString("Multi_pixels"),
- new Object[] {new Integer(4), "[00112233]"});
- break;
- case 4:
- args[1] = createMsg(bundle.getString("Multi_pixels"),
- new Object[] {new Integer(2), "[00001111]"});
- break;
- case 8:
- args[1] = bundle.getString("One_byte");
- break;
- case 16:
- args[1] = createMsg(bundle.getString("Multi_bytes"), new Integer(2));
- break;
- case 24:
- args[1] = createMsg(bundle.getString("Multi_bytes"), new Integer(3));
- break;
- case 32:
- args[1] = createMsg(bundle.getString("Multi_bytes"), new Integer(4));
- break;
- default:
- args[1] = bundle.getString("Unsupported_lc");
- }
- return createMsg(bundle.getString("Depth_info"), args);
- }
-
- /*
- * Return the specified number of milliseconds.
- * If the specified number of milliseconds is too small
- * to see a visual change, then return a higher number.
- */
- static int visibleDelay(int ms) {
- if (ms < 20) return ms + 30;
- if (ms < 30) return ms + 10;
- return ms;
- }
-
- /*
- * Return the specified byte value as a hex string,
- * preserving leading 0's.
- */
- static String toHexByteString(int i) {
- if (i <= 0x0f)
- return "0" + Integer.toHexString(i);
- return Integer.toHexString(i & 0xff);
- }
-
- /*
- * Return the specified 4-byte value as a hex string,
- * preserving leading 0's.
- * (a bit 'brute force'... should probably use a loop...)
- */
- static String toHex4ByteString(int i) {
- String hex = Integer.toHexString(i);
- if (hex.length() == 1)
- return "0000000" + hex;
- if (hex.length() == 2)
- return "000000" + hex;
- if (hex.length() == 3)
- return "00000" + hex;
- if (hex.length() == 4)
- return "0000" + hex;
- if (hex.length() == 5)
- return "000" + hex;
- if (hex.length() == 6)
- return "00" + hex;
- if (hex.length() == 7)
- return "0" + hex;
- return hex;
- }
-
- /*
- * Return a String describing the specified
- * transparent or background pixel.
- */
- static String pixelInfo(int pixel) {
- if (pixel == -1)
- return pixel + " (" + bundle.getString("None_lc") + ")";
- else
- return pixel + " (0x" + Integer.toHexString(pixel) + ")";
- }
-
- /*
- * Return a String describing the specified disposal method.
- */
- static String disposalString(int disposalMethod) {
- switch (disposalMethod) {
- case SWT.DM_FILL_NONE: return bundle.getString("None_lc");
- case SWT.DM_FILL_BACKGROUND: return bundle.getString("Background_lc");
- case SWT.DM_FILL_PREVIOUS: return bundle.getString("Previous_lc");
- }
- return bundle.getString("Unspecified_lc");
- }
-
- /*
- * Return a String describing the specified image file type.
- */
- static String fileTypeString(int filetype) {
- if (filetype == SWT.IMAGE_BMP)
- return "BMP";
- if (filetype == SWT.IMAGE_GIF)
- return "GIF";
- if (filetype == SWT.IMAGE_ICO)
- return "ICO";
- if (filetype == SWT.IMAGE_JPEG)
- return "JPEG";
- if (filetype == SWT.IMAGE_PNG)
- return "PNG";
- return bundle.getString("Unknown_ac");
- }
-
- /*
- * Return the specified file's image type, based on its extension.
- * Note that this is not a very robust way to determine image type,
- * and it is only to be used in the absence of any better method.
- */
- static int determineFileType(String filename) {
- String ext = filename.substring(filename.lastIndexOf('.') + 1);
- if (ext.equalsIgnoreCase("bmp"))
- return SWT.IMAGE_BMP;
- if (ext.equalsIgnoreCase("gif"))
- return SWT.IMAGE_GIF;
- if (ext.equalsIgnoreCase("ico"))
- return SWT.IMAGE_ICO;
- if (ext.equalsIgnoreCase("jpg") || ext.equalsIgnoreCase("jpeg"))
- return SWT.IMAGE_JPEG;
- if (ext.equalsIgnoreCase("png"))
- return SWT.IMAGE_PNG;
- return SWT.IMAGE_UNDEFINED;
- }
-
- static String createMsg(String msg, Object[] args) {
- MessageFormat formatter = new MessageFormat(msg);
- return formatter.format(args);
- }
-
- static String createMsg(String msg, Object arg) {
- MessageFormat formatter = new MessageFormat(msg);
- return formatter.format(new Object[]{arg});
- }
-}
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/javaviewer/JavaLineStyler.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/javaviewer/JavaLineStyler.java
deleted file mode 100755
index defb307530..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/javaviewer/JavaLineStyler.java
+++ /dev/null
@@ -1,378 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.javaviewer;
-
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.custom.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.widgets.*;
-import java.util.*;
-import java.io.*;
-
-class JavaLineStyler implements LineStyleListener {
- JavaScanner scanner = new JavaScanner();
- int[] tokenColors;
- Color[] colors;
- Vector blockComments = new Vector();
-
- public static final int EOF= -1;
- public static final int EOL= 10;
-
- public static final int WORD= 0;
- public static final int WHITE= 1;
- public static final int KEY= 2;
- public static final int COMMENT= 3;
- public static final int STRING= 5;
- public static final int OTHER= 6;
- public static final int NUMBER= 7;
-
- public static final int MAXIMUM_TOKEN= 8;
-
-public JavaLineStyler() {
- initializeColors();
- scanner = new JavaScanner();
-}
-
-Color getColor(int type) {
- if (type < 0 || type >= tokenColors.length) {
- return null;
- }
- return colors[tokenColors[type]];
-}
-
-boolean inBlockComment(int start, int end) {
- for (int i=0; i<blockComments.size(); i++) {
- int[] offsets = (int[])blockComments.elementAt(i);
- // start of comment in the line
- if ((offsets[0] >= start) && (offsets[0] <= end)) return true;
- // end of comment in the line
- if ((offsets[1] >= start) && (offsets[1] <= end)) return true;
- if ((offsets[0] <= start) && (offsets[1] >= end)) return true;
- }
- return false;
-}
-
-void initializeColors() {
- Display display = Display.getDefault();
- colors= new Color[] {
- new Color(display, new RGB(0, 0, 0)), // black
- new Color(display, new RGB(255, 0, 0)), // red
- new Color(display, new RGB(0, 255, 0)), // green
- new Color(display, new RGB(0, 0, 255)) // blue
- };
- tokenColors= new int[MAXIMUM_TOKEN];
- tokenColors[WORD]= 0;
- tokenColors[WHITE]= 0;
- tokenColors[KEY]= 3;
- tokenColors[COMMENT]= 1;
- tokenColors[STRING]= 2;
- tokenColors[OTHER]= 0;
- tokenColors[NUMBER]= 0;
-}
-
-void disposeColors() {
- for (int i=0;i<colors.length;i++) {
- colors[i].dispose();
- }
-}
-
-/**
- * Event.detail line start offset (input)
- * Event.text line text (input)
- * LineStyleEvent.styles Enumeration of StyleRanges, need to be in order. (output)
- * LineStyleEvent.background line background color (output)
- */
-public void lineGetStyle(LineStyleEvent event) {
- Vector styles = new Vector();
- int token;
- StyleRange lastStyle;
- // If the line is part of a block comment, create one style for the entire line.
- if (inBlockComment(event.lineOffset, event.lineOffset + event.lineText.length())) {
- styles.addElement(new StyleRange(event.lineOffset, event.lineText.length(), getColor(COMMENT), null));
- event.styles = new StyleRange[styles.size()];
- styles.copyInto(event.styles);
- return;
- }
- Color defaultFgColor = ((Control)event.widget).getForeground();
- scanner.setRange(event.lineText);
- token = scanner.nextToken();
- while (token != EOF) {
- if (token == OTHER) {
- // do nothing for non-colored tokens
- } else if (token != WHITE) {
- Color color = getColor(token);
- // Only create a style if the token color is different than the
- // widget's default foreground color and the token's style is not
- // bold. Keywords are bolded.
- if ((!color.equals(defaultFgColor)) || (token == KEY)) {
- StyleRange style = new StyleRange(scanner.getStartOffset() + event.lineOffset, scanner.getLength(), color, null);
- if (token == KEY) {
- style.fontStyle = SWT.BOLD;
- }
- if (styles.isEmpty()) {
- styles.addElement(style);
- } else {
- // Merge similar styles. Doing so will improve performance.
- lastStyle = (StyleRange)styles.lastElement();
- if (lastStyle.similarTo(style) && (lastStyle.start + lastStyle.length == style.start)) {
- lastStyle.length += style.length;
- } else {
- styles.addElement(style);
- }
- }
- }
- } else if ((!styles.isEmpty()) && ((lastStyle=(StyleRange)styles.lastElement()).fontStyle == SWT.BOLD)) {
- int start = scanner.getStartOffset() + event.lineOffset;
- lastStyle = (StyleRange)styles.lastElement();
- // A font style of SWT.BOLD implies that the last style
- // represents a java keyword.
- if (lastStyle.start + lastStyle.length == start) {
- // Have the white space take on the style before it to
- // minimize the number of style ranges created and the
- // number of font style changes during rendering.
- lastStyle.length += scanner.getLength();
- }
- }
- token= scanner.nextToken();
- }
- event.styles = new StyleRange[styles.size()];
- styles.copyInto(event.styles);
-}
-public void parseBlockComments(String text) {
- blockComments = new Vector();
- StringReader buffer = new StringReader(text);
- int ch;
- boolean blkComment = false;
- int cnt = 0;
- int[] offsets = new int[2];
- boolean done = false;
-
- try {
- while (!done) {
- switch (ch = buffer.read()) {
- case -1 : {
- if (blkComment) {
- offsets[1] = cnt;
- blockComments.addElement(offsets);
- }
- done = true;
- break;
- }
- case '/' : {
- ch = buffer.read();
- if ((ch == '*') && (!blkComment)) {
- offsets = new int[2];
- offsets[0] = cnt;
- blkComment = true;
- cnt++;
- } else {
- cnt++;
- }
- cnt++;
- break;
- }
- case '*' : {
- if (blkComment) {
- ch = buffer.read();
- cnt++;
- if (ch == '/') {
- blkComment = false;
- offsets[1] = cnt;
- blockComments.addElement(offsets);
- }
- }
- cnt++;
- break;
- }
- default : {
- cnt++;
- break;
- }
- }
- }
- } catch(IOException e) {
- // ignore errors
- }
-}
-
-/**
- * A simple fuzzy scanner for Java
- */
-public class JavaScanner {
-
- protected Hashtable fgKeys= null;
- protected StringBuffer fBuffer= new StringBuffer();
- protected String fDoc;
- protected int fPos;
- protected int fEnd;
- protected int fStartToken;
- protected boolean fEofSeen= false;
-
- private String[] fgKeywords= {
- "abstract",
- "boolean", "break", "byte",
- "case", "catch", "char", "class", "continue",
- "default", "do", "double",
- "else", "extends",
- "false", "final", "finally", "float", "for",
- "if", "implements", "import", "instanceof", "int", "interface",
- "long",
- "native", "new", "null",
- "package", "private", "protected", "public",
- "return",
- "short", "static", "super", "switch", "synchronized",
- "this", "throw", "throws", "transient", "true", "try",
- "void", "volatile",
- "while"
- };
-
- public JavaScanner() {
- initialize();
- }
-
- /**
- * Returns the ending location of the current token in the document.
- */
- public final int getLength() {
- return fPos - fStartToken;
- }
-
- /**
- * Initialize the lookup table.
- */
- void initialize() {
- fgKeys= new Hashtable();
- Integer k= new Integer(KEY);
- for (int i= 0; i < fgKeywords.length; i++)
- fgKeys.put(fgKeywords[i], k);
- }
-
- /**
- * Returns the starting location of the current token in the document.
- */
- public final int getStartOffset() {
- return fStartToken;
- }
-
- /**
- * Returns the next lexical token in the document.
- */
- public int nextToken() {
- int c;
- fStartToken= fPos;
- while (true) {
- switch (c= read()) {
- case EOF:
- return EOF;
- case '/': // comment
- c= read();
- if (c == '/') {
- while (true) {
- c= read();
- if ((c == EOF) || (c == EOL)) {
- unread(c);
- return COMMENT;
- }
- }
- } else {
- unread(c);
- }
- return OTHER;
- case '\'': // char const
- character: for(;;) {
- c= read();
- switch (c) {
- case '\'':
- return STRING;
- case EOF:
- unread(c);
- return STRING;
- case '\\':
- c= read();
- break;
- }
- }
-
- case '"': // string
- string: for (;;) {
- c= read();
- switch (c) {
- case '"':
- return STRING;
- case EOF:
- unread(c);
- return STRING;
- case '\\':
- c= read();
- break;
- }
- }
-
- case '0': case '1': case '2': case '3': case '4':
- case '5': case '6': case '7': case '8': case '9':
- do {
- c= read();
- } while(Character.isDigit((char)c));
- unread(c);
- return NUMBER;
- default:
- if (Character.isWhitespace((char)c)) {
- do {
- c= read();
- } while(Character.isWhitespace((char)c));
- unread(c);
- return WHITE;
- }
- if (Character.isJavaIdentifierStart((char)c)) {
- fBuffer.setLength(0);
- do {
- fBuffer.append((char)c);
- c= read();
- } while(Character.isJavaIdentifierPart((char)c));
- unread(c);
- Integer i= (Integer) fgKeys.get(fBuffer.toString());
- if (i != null)
- return i.intValue();
- return WORD;
- }
- return OTHER;
- }
- }
- }
-
- /**
- * Returns next character.
- */
- protected int read() {
- if (fPos <= fEnd) {
- return fDoc.charAt(fPos++);
- }
- return EOF;
- }
-
- public void setRange(String text) {
- fDoc= text;
- fPos= 0;
- fEnd= fDoc.length() -1;
- }
-
- protected void unread(int c) {
- if (c != EOF)
- fPos--;
- }
-}
-
-
-
-
-
-}
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/javaviewer/JavaViewer.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/javaviewer/JavaViewer.java
deleted file mode 100755
index 7f41d5c3ad..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/javaviewer/JavaViewer.java
+++ /dev/null
@@ -1,184 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.javaviewer;
-
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.custom.*;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-import java.util.*;
-import java.io.*;
-import java.text.*;
-
-/**
- */
-public class JavaViewer {
- Shell shell;
- StyledText text;
- JavaLineStyler lineStyler = new JavaLineStyler();
- FileDialog fileDialog;
- static ResourceBundle resources = ResourceBundle.getBundle("examples_javaviewer");
-
-Menu createFileMenu() {
- Menu bar = shell.getMenuBar ();
- Menu menu = new Menu (bar);
- MenuItem item;
-
- // Open
- item = new MenuItem (menu, SWT.CASCADE);
- item.setText (resources.getString("Open_menuitem"));
- item.setAccelerator(SWT.MOD1 + 'O');
- item.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent event) {
- openFile();
- }
- });
-
- // Exit
- item = new MenuItem (menu, SWT.PUSH);
- item.setText (resources.getString("Exit_menuitem"));
- item.addSelectionListener (new SelectionAdapter () {
- public void widgetSelected (SelectionEvent e) {
- menuFileExit ();
- }
- });
- return menu;
-}
-
-void createMenuBar () {
- Menu bar = new Menu (shell, SWT.BAR);
- shell.setMenuBar (bar);
-
- MenuItem fileItem = new MenuItem (bar, SWT.CASCADE);
- fileItem.setText (resources.getString("File_menuitem"));
- fileItem.setMenu (createFileMenu ());
-
-}
-
-void createShell (Display display) {
- shell = new Shell (display);
- shell.setText (resources.getString("Window_title"));
- GridLayout layout = new GridLayout();
- layout.numColumns = 1;
- shell.setLayout(layout);
- shell.addShellListener (new ShellAdapter () {
- public void shellClosed (ShellEvent e) {
- lineStyler.disposeColors();
- text.removeLineStyleListener(lineStyler);
- }
- });
-}
-void createStyledText() {
- text = new StyledText (shell, SWT.BORDER | SWT.MULTI | SWT.V_SCROLL | SWT.H_SCROLL);
- GridData spec = new GridData();
- spec.horizontalAlignment = GridData.FILL;
- spec.grabExcessHorizontalSpace = true;
- spec.verticalAlignment = GridData.FILL;
- spec.grabExcessVerticalSpace = true;
- text.setLayoutData(spec);
- text.addLineStyleListener(lineStyler);
- text.setEditable(false);
- Color bg = Display.getDefault().getSystemColor(SWT.COLOR_GRAY);
- text.setBackground(bg);
-}
-
-void displayError(String msg) {
- MessageBox box = new MessageBox(shell, SWT.ICON_ERROR);
- box.setMessage(msg);
- box.open();
-}
-
-public static void main (String [] args) {
- Display display = new Display();
- JavaViewer example = new JavaViewer ();
- Shell shell = example.open (display);
- while (!shell.isDisposed ())
- if (!display.readAndDispatch ()) display.sleep ();
- display.dispose ();
-}
-
-public Shell open (Display display) {
- createShell (display);
- createMenuBar ();
- createStyledText ();
- shell.setSize(500, 400);
- shell.open ();
- return shell;
-}
-
-void openFile() {
- if (fileDialog == null) {
- fileDialog = new FileDialog(shell, SWT.OPEN);
- }
-
- fileDialog.setFilterExtensions(new String[] {"*.java", "*.*"});
- String name = fileDialog.open();
-
- open(name);
-}
-
-void open(String name) {
- final String textString;
-
- if ((name == null) || (name.length() == 0)) return;
-
- File file = new File(name);
- if (!file.exists()) {
- String message = MessageFormat.format(resources.getString("Err_file_no_exist"), new String[] {file.getName()});
- displayError(message);
- return;
- }
-
- try {
- FileInputStream stream= new FileInputStream(file.getPath());
- try {
- Reader in = new BufferedReader(new InputStreamReader(stream));
- char[] readBuffer= new char[2048];
- StringBuffer buffer= new StringBuffer((int) file.length());
- int n;
- while ((n = in.read(readBuffer)) > 0) {
- buffer.append(readBuffer, 0, n);
- }
- textString = buffer.toString();
- stream.close();
- }
- catch (IOException e) {
- // Err_file_io
- String message = MessageFormat.format(resources.getString("Err_file_io"), new String[] {file.getName()});
- displayError(message);
- return;
- }
- }
- catch (FileNotFoundException e) {
- String message = MessageFormat.format(resources.getString("Err_not_found"), new String[] {file.getName()});
- displayError(message);
- return;
- }
- // Guard against superfluous mouse move events -- defer action until later
- Display display = text.getDisplay();
- display.asyncExec(new Runnable() {
- public void run() {
- text.setText(textString);
- }
- });
-
- // parse the block comments up front since block comments can go across
- // lines - inefficient way of doing this
- lineStyler.parseBlockComments(textString);
-}
-
-void menuFileExit () {
- shell.close ();
-}
-}
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/layoutexample/FillLayoutTab.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/layoutexample/FillLayoutTab.java
deleted file mode 100644
index d0c1fa368f..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/layoutexample/FillLayoutTab.java
+++ /dev/null
@@ -1,179 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.layoutexample;
-
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.custom.*;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-
-class FillLayoutTab extends Tab {
- /* Controls for setting layout parameters */
- Button horizontal, vertical;
- /* The example layout instance */
- FillLayout fillLayout;
- /* TableEditors and related controls*/
- TableEditor comboEditor;
- CCombo combo;
-
- /**
- * Creates the Tab within a given instance of LayoutExample.
- */
- FillLayoutTab(LayoutExample instance) {
- super(instance);
- }
-
- /**
- * Creates the widgets in the "child" group.
- */
- void createChildWidgets () {
- /* Add common controls */
- super.createChildWidgets ();
-
- /* Add TableEditors */
- comboEditor = new TableEditor (table);
- table.addSelectionListener (new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- resetEditors ();
- index = table.getSelectionIndex ();
- if (index == -1) return;
- TableItem oldItem = comboEditor.getItem ();
- newItem = table.getItem (index);
- if (newItem == oldItem || newItem != lastSelected) {
- lastSelected = newItem;
- return;
- }
- table.showSelection ();
-
- combo = new CCombo (table, SWT.READ_ONLY);
- createComboEditor (combo, comboEditor);
- }
- });
-
-
- /* Add listener to add an element to the table */
- add.addSelectionListener(new SelectionAdapter () {
- public void widgetSelected(SelectionEvent e) {
- TableItem item = new TableItem (table, 0);
- item.setText (0, String.valueOf (table.indexOf (item)));
- item.setText (1, "Button");
- data.addElement ("Button");
- resetEditors ();
- }
- });
- }
-
- /**
- * Creates the control widgets.
- */
- void createControlWidgets () {
- /* Controls the type of FillLayout */
- Group typeGroup = new Group (controlGroup, SWT.NONE);
- typeGroup.setText (LayoutExample.getResourceString ("Type"));
- typeGroup.setLayout (new GridLayout ());
- typeGroup.setLayoutData (new GridData (GridData.FILL_HORIZONTAL));
- horizontal = new Button (typeGroup, SWT.RADIO);
- horizontal.setText ("SWT.HORIZONTAL");
- horizontal.setLayoutData(new GridData (GridData.FILL_HORIZONTAL));
- horizontal.setSelection(true);
- horizontal.addSelectionListener (selectionListener);
- vertical = new Button (typeGroup, SWT.RADIO);
- vertical.setText ("SWT.VERTICAL");
- vertical.setLayoutData(new GridData (GridData.FILL_HORIZONTAL));
- vertical.addSelectionListener (selectionListener);
-
- /* Add common controls */
- super.createControlWidgets ();
-
- /* Position the sash */
- sash.setWeights (new int [] {4,1});
- }
-
- /**
- * Creates the example layout.
- */
- void createLayout () {
- fillLayout = new FillLayout ();
- layoutComposite.setLayout (fillLayout);
- }
-
- /**
- * Disposes the editors without placing their contents
- * into the table.
- */
- void disposeEditors () {
- comboEditor.setEditor (null, null, -1);
- combo.dispose ();
- }
-
-
- /**
- * Generates code for the example layout.
- */
- StringBuffer generateLayoutCode () {
- StringBuffer code = new StringBuffer ();
- code.append ("\t\tFillLayout fillLayout = new FillLayout ();\n");
- if (fillLayout.type == SWT.VERTICAL) {
- code.append ("\t\tfillLayout.type = SWT.VERTICAL;\n");
- }
- code.append ("\t\tshell.setLayout (fillLayout);\n");
- for (int i = 0; i < children.length; i++) {
- Control control = children [i];
- code.append (getChildCode (control, i));
- }
- return code;
- }
-
- /**
- * Returns the layout data field names.
- */
- String [] getLayoutDataFieldNames() {
- return new String [] {"","Control"};
- }
-
- /**
- * Gets the text for the tab folder item.
- */
- String getTabText () {
- return "FillLayout";
- }
-
- /**
- * Takes information from TableEditors and stores it.
- */
- void resetEditors () {
- TableItem oldItem = comboEditor.getItem ();
- comboEditor.setEditor (null, null, -1);
- if (oldItem != null) {
- int row = table.indexOf (oldItem);
- data.insertElementAt (combo.getText (), row);
- oldItem.setText (1, data.elementAt (row).toString ());
- combo.dispose ();
- }
- setLayoutState ();
- refreshLayoutComposite ();
- layoutComposite.layout (true);
- layoutGroup.layout (true);
- }
-
- /**
- * Sets the state of the layout.
- */
- void setLayoutState () {
- if (vertical.getSelection()) {
- fillLayout.type = SWT.VERTICAL;
- } else {
- fillLayout.type = SWT.HORIZONTAL;
- }
- }
-}
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/layoutexample/FormLayoutTab.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/layoutexample/FormLayoutTab.java
deleted file mode 100644
index b2c9e5d536..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/layoutexample/FormLayoutTab.java
+++ /dev/null
@@ -1,762 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.layoutexample;
-
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.custom.*;
-
-class FormLayoutTab extends Tab {
- /* Controls for setting layout parameters */
- Combo marginHeight, marginWidth;
- /* The example layout instance */
- FormLayout formLayout;
- /* TableEditors and related controls*/
- TableEditor comboEditor, widthEditor, heightEditor;
- TableEditor leftEditor, rightEditor, topEditor, bottomEditor;
- CCombo combo;
- Text widthText, heightText;
- Button leftAttach, rightAttach, topAttach, bottomAttach;
-
- /* Constants */
- final int COMBO_COL = 1;
- final int WIDTH_COL = 2;
- final int HEIGHT_COL = 3;
- final int LEFT_COL = 4;
- final int RIGHT_COL = 5;
- final int TOP_COL = 6;
- final int BOTTOM_COL = 7;
-
- final int MODIFY_COLS = 4; // The number of columns with combo or text editors
- final int TOTAL_COLS = 8;
-
- /**
- * Creates the Tab within a given instance of LayoutExample.
- */
- FormLayoutTab(LayoutExample instance) {
- super(instance);
- }
-
- /**
- * Returns the constant for the alignment for an
- * attachment given a string.
- */
- int alignmentConstant (String align) {
- if (align.equals("LEFT")) return SWT.LEFT;
- if (align.equals("RIGHT")) return SWT.RIGHT;
- if (align.equals("TOP")) return SWT.TOP;
- if (align.equals("BOTTOM")) return SWT.BOTTOM;
- if (align.equals("CENTER")) return SWT.CENTER;
- return SWT.DEFAULT;
- }
-
- /**
- * Returns a string representing the alignment for an
- * attachment given a constant.
- */
- String alignmentString (int align) {
- switch (align) {
- case SWT.LEFT: return "LEFT";
- case SWT.RIGHT: return "RIGHT";
- case SWT.TOP: return "TOP";
- case SWT.BOTTOM: return "BOTTOM";
- case SWT.CENTER: return "CENTER";
- }
- return "DEFAULT";
- }
-
- /**
- * Update the attachment field in case the type of control
- * has changed.
- */
- String checkAttachment (String oldAttach, FormAttachment newAttach) {
- String controlClass = newAttach.control.getClass().toString ();
- String controlType = controlClass.substring (controlClass.lastIndexOf ('.') + 1);
- int i = 0;
- while (i < oldAttach.length () && !Character.isDigit(oldAttach.charAt (i))) {
- i++;
- }
- String index = oldAttach.substring (i, oldAttach.indexOf (','));
- return controlType + index + "," + newAttach.offset + ":" + alignmentString (newAttach.alignment);
- }
-
- /**
- * Creates the widgets in the "child" group.
- */
- void createChildWidgets () {
- /* Add common controls */
- super.createChildWidgets ();
-
- /* Resize the columns */
- table.getColumn (LEFT_COL).setWidth (100);
- table.getColumn (RIGHT_COL).setWidth (100);
- table.getColumn (TOP_COL).setWidth (100);
- table.getColumn (BOTTOM_COL).setWidth (100);
-
- /* Add TableEditors */
- comboEditor = new TableEditor (table);
- widthEditor = new TableEditor (table);
- heightEditor = new TableEditor (table);
- leftEditor = new TableEditor (table);
- rightEditor = new TableEditor (table);
- topEditor = new TableEditor (table);
- bottomEditor = new TableEditor (table);
- table.addMouseListener (new MouseAdapter () {
- public void mouseDown(MouseEvent e) {
- resetEditors();
- index = table.getSelectionIndex ();
- Point pt = new Point (e.x, e.y);
- newItem = table.getItem (pt);
- if (newItem == null) return;
- TableItem oldItem = comboEditor.getItem ();
- if (newItem == oldItem || newItem != lastSelected) {
- lastSelected = newItem;
- return;
- }
- table.showSelection ();
-
- combo = new CCombo (table, SWT.READ_ONLY);
- createComboEditor (combo, comboEditor);
-
- widthText = new Text (table, SWT.SINGLE);
- widthText.setText (((String [])data.elementAt (index)) [WIDTH_COL]);
- createTextEditor (widthText, widthEditor, WIDTH_COL);
-
- heightText = new Text (table, SWT.SINGLE);
- heightText.setText (((String [])data.elementAt (index)) [HEIGHT_COL]);
- createTextEditor (heightText, heightEditor, HEIGHT_COL);
-
- leftAttach = new Button (table, SWT.PUSH);
- leftAttach.setText (LayoutExample.getResourceString ("Attach_Edit"));
- leftEditor.horizontalAlignment = SWT.LEFT;
- leftEditor.grabHorizontal = true;
- leftEditor.minimumWidth = leftAttach.computeSize (SWT.DEFAULT, SWT.DEFAULT).x;
- leftEditor.setEditor (leftAttach, newItem, LEFT_COL);
- leftAttach.addSelectionListener (new SelectionAdapter () {
- public void widgetSelected (SelectionEvent e) {
- Shell shell = tabFolderPage.getShell ();
- AttachDialog dialog = new AttachDialog (shell);
- dialog.setText (LayoutExample.getResourceString ("Left_Attachment"));
- dialog.setColumn (LEFT_COL);
- String attach = dialog.open ();
- newItem.setText (LEFT_COL, attach);
- resetEditors ();
- }
- });
-
- rightAttach = new Button (table, SWT.PUSH);
- rightAttach.setText (LayoutExample.getResourceString ("Attach_Edit"));
- rightEditor.horizontalAlignment = SWT.LEFT;
- rightEditor.grabHorizontal = true;
- rightEditor.minimumWidth = rightAttach.computeSize (SWT.DEFAULT, SWT.DEFAULT).x;
- rightEditor.setEditor (rightAttach, newItem, RIGHT_COL);
- rightAttach.addSelectionListener (new SelectionAdapter () {
- public void widgetSelected (SelectionEvent e) {
- Shell shell = tabFolderPage.getShell ();
- AttachDialog dialog = new AttachDialog (shell);
- dialog.setText (LayoutExample.getResourceString ("Right_Attachment"));
- dialog.setColumn (RIGHT_COL);
- String attach = dialog.open ();
- newItem.setText (RIGHT_COL, attach);
- if (newItem.getText (LEFT_COL).endsWith (")")) newItem.setText (LEFT_COL, "");
- resetEditors ();
- }
- });
-
- topAttach = new Button (table, SWT.PUSH);
- topAttach.setText (LayoutExample.getResourceString ("Attach_Edit"));
- topEditor.horizontalAlignment = SWT.LEFT;
- topEditor.grabHorizontal = true;
- topEditor.minimumWidth = topAttach.computeSize (SWT.DEFAULT, SWT.DEFAULT).x;
- topEditor.setEditor (topAttach, newItem, TOP_COL);
- topAttach.addSelectionListener (new SelectionAdapter () {
- public void widgetSelected (SelectionEvent e) {
- Shell shell = tabFolderPage.getShell ();
- AttachDialog dialog = new AttachDialog (shell);
- dialog.setText (LayoutExample.getResourceString ("Top_Attachment"));
- dialog.setColumn (TOP_COL);
- String attach = dialog.open ();
- newItem.setText (TOP_COL, attach);
- resetEditors ();
- }
- });
- bottomAttach = new Button (table, SWT.PUSH);
- bottomAttach.setText (LayoutExample.getResourceString ("Attach_Edit"));
- bottomEditor.horizontalAlignment = SWT.LEFT;
- bottomEditor.grabHorizontal = true;
- bottomEditor.minimumWidth = bottomAttach.computeSize (SWT.DEFAULT, SWT.DEFAULT).x;
- bottomEditor.setEditor (bottomAttach, newItem, BOTTOM_COL);
- bottomAttach.addSelectionListener (new SelectionAdapter () {
- public void widgetSelected (SelectionEvent e) {
- Shell shell = tabFolderPage.getShell ();
- AttachDialog dialog = new AttachDialog (shell);
- dialog.setText (LayoutExample.getResourceString ("Bottom_Attachment"));
- dialog.setColumn (BOTTOM_COL);
- String attach = dialog.open ();
- newItem.setText (BOTTOM_COL, attach);
- if (newItem.getText (TOP_COL).endsWith (")")) newItem.setText (TOP_COL, "");
- resetEditors ();
- }
- });
-
- for (int i=0; i<table.getColumnCount (); i++) {
- Rectangle rect = newItem.getBounds (i);
- if (rect.contains (pt)) {
- switch (i) {
- case 0:
- resetEditors ();
- break;
- case COMBO_COL :
- combo.setFocus ();
- break;
- case WIDTH_COL :
- widthText.setFocus ();
- break;
- case HEIGHT_COL :
- heightText.setFocus ();
- break;
- default :
- break;
- }
- }
- }
- }
- });
-
- /* Add listener to add an element to the table */
- add.addSelectionListener(new SelectionAdapter () {
- public void widgetSelected(SelectionEvent e) {
- TableItem item = new TableItem (table, 0);
- String [] insert = new String [] {
- String.valueOf (table.indexOf (item)), "Button", "-1", "-1",
- "0,0 (" + LayoutExample.getResourceString ("Default") + ")", "",
- "0,0 (" + LayoutExample.getResourceString ("Default") + ")", ""};
- item.setText (insert);
- data.addElement (insert);
- resetEditors ();
- }
- });
- }
-
- /**
- * Creates the control widgets.
- */
- void createControlWidgets () {
- /* Controls the margins and spacing of the FormLayout */
- String [] marginValues = new String [] {"0","3","5","10"};
- Group marginGroup = new Group (controlGroup, SWT.NONE);
- marginGroup.setText (LayoutExample.getResourceString ("Margins"));
- GridLayout layout = new GridLayout ();
- layout.numColumns = 2;
- marginGroup.setLayout (layout);
- marginGroup.setLayoutData (new GridData (GridData.FILL_HORIZONTAL));
- new Label (marginGroup, SWT.NONE).setText ("marginHeight");
- marginHeight = new Combo (marginGroup, SWT.NONE);
- marginHeight.setItems (marginValues);
- marginHeight.select (0);
- marginHeight.addSelectionListener (selectionListener);
- marginHeight.addTraverseListener (traverseListener);
- GridData data = new GridData (GridData.FILL_HORIZONTAL);
- data.widthHint = 60;
- marginHeight.setLayoutData (data);
- new Label (marginGroup, SWT.NONE).setText ("marginWidth");
- marginWidth = new Combo (marginGroup, SWT.NONE);
- marginWidth.setItems (marginValues);
- marginWidth.select (0);
- marginWidth.addSelectionListener (selectionListener);
- marginWidth.addTraverseListener (traverseListener);
- data = new GridData (GridData.FILL_HORIZONTAL);
- data.widthHint = 60;
- marginWidth.setLayoutData (data);
-
- /* Add common controls */
- super.createControlWidgets ();
-
- /* Position the sash */
- sash.setWeights (new int [] {6,4});
- }
-
- /**
- * Creates the example layout.
- */
- void createLayout () {
- formLayout = new FormLayout ();
- layoutComposite.setLayout (formLayout);
- }
-
- /**
- * Disposes the editors without placing their contents
- * into the table.
- */
- void disposeEditors () {
- comboEditor.setEditor (null, null, -1);
- combo.dispose ();
- widthText.dispose ();
- heightText.dispose ();
- leftAttach.dispose ();
- rightAttach.dispose ();
- topAttach.dispose ();
- bottomAttach.dispose ();
- }
-
- /**
- * Generates code for the example layout.
- */
- StringBuffer generateLayoutCode () {
- StringBuffer code = new StringBuffer ();
- code.append ("\t\tFormLayout formLayout = new FormLayout ();\n");
- if (formLayout.marginHeight != 0) {
- code.append ("\t\tformLayout.marginHeight = " + formLayout.marginHeight + ";\n");
- }
- if (formLayout.marginWidth != 0) {
- code.append ("\t\tformLayout.marginWidth = " + formLayout.marginWidth + ";\n");
- }
- code.append ("\t\tshell.setLayout (formLayout);\n");
-
- boolean first = true;
- for (int i = 0; i < children.length; i++) {
- Control control = children [i];
- code.append (getChildCode (control, i));
- FormData data = (FormData) control.getLayoutData ();
- if (data != null) {
- code.append ("\t\t");
- if (first) {
- code.append ("FormData ");
- first = false;
- }
- code.append ("data = new FormData ();\n");
- if (data.width != SWT.DEFAULT) {
- code.append ("\t\tdata.width = " + data.width + ";\n");
- }
- if (data.height != SWT.DEFAULT) {
- code.append ("\t\tdata.height = " + data.height + ";\n");
- }
- if (data.left != null) {
- if (data.left.control != null) {
- TableItem item = table.getItem (i);
- String controlString = item.getText (LEFT_COL);
- int index = new Integer (controlString.substring (controlString.indexOf (',') - 1, controlString.indexOf (','))).intValue ();
- code.append ("\t\tdata.left = new FormAttachment (" + names [index] + ", " + data.left.offset + ", SWT." + alignmentString (data.left.alignment) + ");\n");
- } else {
- if (data.right != null || (data.left.numerator != 0 ||data.left.offset != 0)) {
- code.append ("\t\tdata.left = new FormAttachment (" + data.left.numerator + ", " + data.left.offset + ");\n");
- }
- }
- }
- if (data.right != null) {
- if (data.right.control != null) {
- TableItem item = table.getItem (i);
- String controlString = item.getText (RIGHT_COL);
- int index = new Integer (controlString.substring (controlString.indexOf (',') - 1, controlString.indexOf (','))).intValue ();
- code.append ("\t\tdata.right = new FormAttachment (" + names [index] + ", " + data.right.offset + ", SWT." + alignmentString (data.right.alignment) + ");\n");
- } else {
- code.append ("\t\tdata.right = new FormAttachment (" + data.right.numerator + ", " + data.right.offset + ");\n");
- }
- }
- if (data.top != null) {
- if (data.top.control != null) {
- TableItem item = table.getItem (i);
- String controlString = item.getText (TOP_COL);
- int index = new Integer (controlString.substring (controlString.indexOf (',') - 1, controlString.indexOf (','))).intValue ();
- code.append ("\t\tdata.top = new FormAttachment (" + names [index] + ", " + data.top.offset + ", SWT." + alignmentString (data.top.alignment) + ");\n");
- } else {
- if (data.bottom != null || (data.top.numerator != 0 ||data.top.offset != 0)) {
- code.append ("\t\tdata.top = new FormAttachment (" + data.top.numerator + ", " + data.top.offset + ");\n");
- }
- }
- }
- if (data.bottom != null) {
- if (data.bottom.control != null) {
- TableItem item = table.getItem (i);
- String controlString = item.getText (BOTTOM_COL);
- int index = new Integer (controlString.substring (controlString.indexOf (',') - 1, controlString.indexOf (','))).intValue ();
- code.append ("\t\tdata.bottom = new FormAttachment (" + names [index] + ", " + data.bottom.offset + ", SWT." + alignmentString (data.bottom.alignment) + ");\n");
- } else {
- code.append ("\t\tdata.bottom = new FormAttachment (" + data.bottom.numerator + ", " + data.bottom.offset + ");\n");
- }
- }
- code.append ("\t\t" + names [i] + ".setLayoutData (data);\n");
- }
- }
- return code;
- }
-
- /**
- * Returns the layout data field names.
- */
- String [] getLayoutDataFieldNames() {
- return new String [] {
- "",
- "Control",
- "width",
- "height",
- "left",
- "right",
- "top",
- "bottom"
- };
- }
-
- /**
- * Gets the text for the tab folder item.
- */
- String getTabText () {
- return "FormLayout";
- }
-
- /**
- * Takes information from TableEditors and stores it.
- */
- void resetEditors () {
- resetEditors (false);
- }
-
- void resetEditors (boolean tab) {
- TableItem oldItem = comboEditor.getItem ();
- if (oldItem != null) {
- int row = table.indexOf (oldItem);
- try {
- new Integer (widthText.getText ()).intValue ();
- } catch (NumberFormatException e) {
- widthText.setText (oldItem.getText (WIDTH_COL));
- }
- try {
- new Integer (heightText.getText ()).intValue ();
- } catch (NumberFormatException e) {
- heightText.setText (oldItem.getText (HEIGHT_COL));
- }
- String [] insert = new String [] {String.valueOf (row), combo.getText (), widthText.getText (), heightText.getText ()};
- data.setElementAt (insert, row);
- for (int i = 0 ; i < MODIFY_COLS; i++) {
- oldItem.setText (i, ((String [])data.elementAt (row)) [i]);
- }
- if (!tab) disposeEditors ();
- }
- setLayoutState ();
- refreshLayoutComposite ();
- setLayoutData ();
- layoutComposite.layout (true);
- layoutGroup.layout (true);
- }
-
- /**
- * Sets an attachment to the edge of a widget using the
- * information in the table.
- */
- FormAttachment setAttachment (String attachment) {
- String control, align;
- int position, offset;
- int comma = attachment.indexOf (',');
- char first = attachment.charAt (0);
- if (Character.isLetter(first)) {
- /* Case where there is a control */
- control = attachment.substring (0, comma);
- int i = 0;
- while (i < control.length () && !Character.isDigit (control.charAt (i))) {
- i++;
- }
- String end = control.substring (i);
- int index = new Integer (end).intValue ();
- Control attachControl = children [index];
- int colon = attachment.indexOf (':');
- try {
- offset = new Integer (attachment.substring (comma + 1, colon)).intValue ();
- } catch (NumberFormatException e) {
- offset = 0;
- }
- align = attachment.substring (colon + 1);
- return new FormAttachment (attachControl, offset, alignmentConstant (align));
- } else {
- /* Case where there is a position */
- try {
- position = new Integer (attachment.substring (0,comma)).intValue ();
- } catch (NumberFormatException e) {
- position = 0;
- }
- try {
- offset = new Integer (attachment.substring (comma + 1)).intValue ();
- } catch (NumberFormatException e) {
- offset = 0;
- }
- return new FormAttachment (position, offset);
- }
- }
-
- /**
- * Sets the layout data for the children of the layout.
- */
- void setLayoutData () {
- Control [] children = layoutComposite.getChildren ();
- TableItem [] items = table.getItems ();
- FormData data;
- int width, height;
- String left, right, top, bottom;
- for (int i = 0; i < children.length; i++) {
- width = new Integer (items [i].getText (WIDTH_COL)).intValue ();
- height = new Integer (items [i].getText (HEIGHT_COL)).intValue ();
- data = new FormData ();
- if (width > 0) data.width = width;
- if (height > 0) data.height = height;
-
- left = items [i].getText (LEFT_COL);
- if (left.length () > 0) {
- data.left = setAttachment (left);
- if (data.left.control != null) {
- String attachment = checkAttachment (left, data.left);
- items [i].setText (LEFT_COL, attachment);
- }
- }
- right = items [i].getText (RIGHT_COL);
- if (right.length () > 0) {
- data.right = setAttachment (right);
- if (data.right.control != null) {
- String attachment = checkAttachment (right, data.right);
- items [i].setText (RIGHT_COL, attachment);
- }
- }
- top = items [i].getText (TOP_COL);
- if (top.length () > 0 ) {
- data.top = setAttachment (top);
- if (data.top.control != null) {
- String attachment = checkAttachment (top, data.top);
- items [i].setText (TOP_COL, attachment);
- }
- }
- bottom = items [i].getText (BOTTOM_COL);
- if (bottom.length () > 0) {
- data.bottom = setAttachment (bottom);
- if (data.bottom.control != null) {
- String attachment = checkAttachment (bottom, data.bottom);
- items [i].setText (BOTTOM_COL, attachment);
- }
- }
- children [i].setLayoutData (data);
- }
- }
-
- /**
- * Sets the state of the layout.
- */
- void setLayoutState () {
- /* Set the margins and spacing */
- try {
- formLayout.marginHeight = new Integer (marginHeight.getText ()).intValue ();
- } catch (NumberFormatException e) {
- formLayout.marginHeight = 0;
- marginHeight.select (0);
- }
- try {
- formLayout.marginWidth = new Integer (marginWidth.getText ()).intValue ();
- } catch (NumberFormatException e) {
- formLayout.marginWidth = 0;
- marginWidth.select (0);
- }
- }
-
-
- /**
- * <code>AttachDialog</code> is the class that creates a
- * dialog specific for this example. It creates a dialog
- * with controls to set the values in a FormAttachment.
- */
- public class AttachDialog extends Dialog {
- String result = "";
- String controlInput, positionInput, alignmentInput, offsetInput;
- int col = 0;
-
- public AttachDialog (Shell parent, int style) {
- super (parent, style);
- }
-
- public AttachDialog (Shell parent) {
- this (parent, 0);
- }
-
- public void setColumn (int col) {
- this.col = col;
- }
-
- public String open () {
- Shell parent = getParent ();
- final Shell shell = new Shell (parent, SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL);
- shell.setText (getText ());
- GridLayout layout = new GridLayout ();
- layout.numColumns = 3;
- layout.makeColumnsEqualWidth = true;
- shell.setLayout (layout);
-
- /* Find out what was previously set as an attachment */
- TableItem newItem = leftEditor.getItem ();
- result = newItem.getText (col);
- String oldAttach = result;
- String oldPos = "0", oldControl = "", oldAlign = "DEFAULT", oldOffset = "0";
- boolean isControl = false;
- if (oldAttach.length () != 0) {
- char first = oldAttach.charAt (0);
- if (Character.isLetter(first)) {
- /* We have a control */
- isControl = true;
- oldControl = oldAttach.substring (0, oldAttach.indexOf (','));
- oldAlign = oldAttach.substring (oldAttach.indexOf (':') + 1);
- oldOffset = oldAttach.substring (oldAttach.indexOf (',') + 1, oldAttach.indexOf (':'));
- } else {
- /* We have a position */
- oldPos = oldAttach.substring (0, oldAttach.indexOf (','));
- oldOffset = oldAttach.substring (oldAttach.indexOf (',') + 1);
- if (oldOffset.endsWith (")")) { // i.e. (Default)
- oldOffset = oldOffset.substring (0, oldOffset.indexOf (' '));
- }
- }
- }
-
- /* Add position field */
- final Button posButton = new Button (shell, SWT.RADIO);
- posButton.setText (LayoutExample.getResourceString ("Position"));
- posButton.setSelection (!isControl);
- final Combo position = new Combo (shell, SWT.NONE);
- position.setItems (new String [] {"0","25","50","75","100"});
- position.setText (oldPos);
- position.setEnabled (!isControl);
- GridData data = new GridData (GridData.FILL_HORIZONTAL);
- data.horizontalSpan = 2;
- position.setLayoutData (data);
-
- /* Add control field */
- final Button contButton = new Button (shell, SWT.RADIO);
- contButton.setText (LayoutExample.getResourceString ("Control"));
- contButton.setSelection (isControl);
- final Combo control = new Combo (shell, SWT.READ_ONLY);
- TableItem [] items = table.getItems ();
- TableItem currentItem = leftEditor.getItem ();
- for (int i = 0; i < table.getItemCount (); i++) {
- if (items [i].getText (0).length() > 0) {
- if (items [i] != currentItem) {
- control.add (items [i].getText (COMBO_COL) + i);
- }
- }
- }
- if (oldControl.length () != 0) control.setText (oldControl);
- else control.select (0);
- control.setEnabled (isControl);
- data = new GridData (GridData.FILL_HORIZONTAL);
- data.horizontalSpan = 2;
- control.setLayoutData (data);
-
- /* Add alignment field */
- new Label (shell, SWT.NONE).setText (LayoutExample.getResourceString ("Alignment"));
- final Combo alignment = new Combo (shell, SWT.NONE);
- String[] alignmentValues;
- if (col == LEFT_COL || col == RIGHT_COL) {
- alignmentValues = new String [] {"SWT.LEFT", "SWT.RIGHT", "SWT.CENTER", "SWT.DEFAULT"};
- } else {
- // col == TOP_COL || col == BOTTOM_COL
- alignmentValues = new String [] {"SWT.TOP", "SWT.BOTTOM", "SWT.CENTER", "SWT.DEFAULT"};
- }
- alignment.setItems (alignmentValues);
- alignment.setText ("SWT." + oldAlign);
- alignment.setEnabled (isControl);
- data = new GridData (GridData.FILL_HORIZONTAL);
- data.horizontalSpan = 2;
- alignment.setLayoutData (data);
-
- /* Add offset field */
- new Label (shell, SWT.NONE).setText (LayoutExample.getResourceString ("Offset"));
- final Text offset = new Text (shell, SWT.SINGLE | SWT.BORDER);
- offset.setText (oldOffset);
- data = new GridData (GridData.FILL_HORIZONTAL);
- data.horizontalSpan = 2;
- offset.setLayoutData (data);
-
- /* Add listeners for choosing between position and control */
- posButton.addSelectionListener (new SelectionAdapter () {
- public void widgetSelected (SelectionEvent e) {
- position.setEnabled (true);
- control.setEnabled (false);
- alignment.setEnabled(false);
- }
- });
- contButton.addSelectionListener (new SelectionAdapter () {
- public void widgetSelected (SelectionEvent e) {
- position.setEnabled (false);
- control.setEnabled (true);
- alignment.setEnabled(true);
- }
- });
-
- Button clear = new Button (shell, SWT.PUSH);
- clear.setText (LayoutExample.getResourceString ("Clear"));
- clear.setLayoutData (new GridData (GridData.HORIZONTAL_ALIGN_END));
- clear.addSelectionListener (new SelectionAdapter () {
- public void widgetSelected (SelectionEvent e) {
- result = "";
- shell.close ();
- }
- });
- /* OK button sets data into table */
- Button ok = new Button (shell, SWT.PUSH);
- ok.setText (LayoutExample.getResourceString ("OK"));
- ok.setLayoutData (new GridData (GridData.HORIZONTAL_ALIGN_CENTER));
- ok.addSelectionListener (new SelectionAdapter () {
- public void widgetSelected (SelectionEvent e) {
- controlInput = control.getText ();
- alignmentInput = alignment.getText ().substring (4);
- positionInput = position.getText ();
- if (positionInput.length () == 0) positionInput = "0";
- try {
- new Integer (positionInput).intValue ();
- } catch (NumberFormatException except) {
- positionInput = "0";
- }
- offsetInput = offset.getText ();
- if (offsetInput.length () == 0) offsetInput = "0";
- try {
- new Integer (offsetInput).intValue ();
- } catch (NumberFormatException except) {
- offsetInput = "0";
- }
- if (posButton.getSelection() || controlInput.length () == 0) {
- result = positionInput + "," + offsetInput;
- } else {
- result = controlInput + "," + offsetInput + ":" + alignmentInput;
- }
- shell.close ();
- }
- });
- Button cancel = new Button (shell, SWT.PUSH);
- cancel.setText (LayoutExample.getResourceString ("Cancel"));
- cancel.setLayoutData (new GridData (GridData.HORIZONTAL_ALIGN_BEGINNING));
- cancel.addSelectionListener (new SelectionAdapter () {
- public void widgetSelected (SelectionEvent e) {
- shell.close ();
- }
- });
-
- shell.setDefaultButton (ok);
- shell.pack ();
- /* Center the dialog */
- Point center = parent.getLocation ();
- center.x = center.x + (parent.getBounds ().width / 2) - (shell.getBounds ().width / 2);
- center.y = center.y + (parent.getBounds ().height / 2) - (shell.getBounds ().height / 2);
- shell.setLocation (center);
- shell.open ();
- Display display = shell.getDisplay ();
- while (!shell.isDisposed ()) {
- if (display.readAndDispatch ()) display.sleep ();
- }
-
- return result;
- }
- }
-}
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/layoutexample/GridLayoutTab.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/layoutexample/GridLayoutTab.java
deleted file mode 100644
index 3e9d5513a4..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/layoutexample/GridLayoutTab.java
+++ /dev/null
@@ -1,590 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.layoutexample;
-
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.custom.*;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.graphics.*;
-
-class GridLayoutTab extends Tab {
- /* Controls for setting layout parameters */
- Text numColumns;
- Button makeColumnsEqualWidth;
- Combo marginHeight, marginWidth, horizontalSpacing, verticalSpacing;
- /* The example layout instance */
- GridLayout gridLayout;
- /* TableEditors and related controls*/
- TableEditor comboEditor, widthEditor, heightEditor;
- TableEditor vAlignEditor, hAlignEditor, hIndentEditor;
- TableEditor hSpanEditor, vSpanEditor, hGrabEditor, vGrabEditor;
- CCombo combo, vAlign, hAlign, hGrab, vGrab;
- Text widthText, heightText, hIndent, hSpan, vSpan;
-
- /* Constants */
- final int COMBO_COL = 1;
- final int WIDTH_COL = 2;
- final int HEIGHT_COL = 3;
- final int HALIGN_COL = 4;
- final int VALIGN_COL = 5;
- final int HINDENT_COL = 6;
- final int HSPAN_COL = 7;
- final int VSPAN_COL = 8;
- final int HGRAB_COL = 9;
- final int VGRAB_COL = 10;
-
- final int TOTAL_COLS = 11;
-
- /**
- * Creates the Tab within a given instance of LayoutExample.
- */
- GridLayoutTab(LayoutExample instance) {
- super(instance);
- }
-
- /**
- * Creates the widgets in the "child" group.
- */
- void createChildWidgets () {
- /* Create the TraverseListener */
- final TraverseListener traverseListener = new TraverseListener () {
- public void keyTraversed (TraverseEvent e) {
- if (e.detail == SWT.TRAVERSE_RETURN || e.detail == SWT.TRAVERSE_TAB_NEXT)
- resetEditors ();
- if (e.detail == SWT.TRAVERSE_ESCAPE)
- disposeEditors ();
- };
- };
-
- /* Add common controls */
- super.createChildWidgets ();
-
- /* Add TableEditors */
- comboEditor = new TableEditor (table);
- widthEditor = new TableEditor (table);
- heightEditor = new TableEditor (table);
- vAlignEditor = new TableEditor (table);
- hAlignEditor = new TableEditor (table);
- hIndentEditor = new TableEditor (table);
- hSpanEditor = new TableEditor (table);
- vSpanEditor = new TableEditor (table);
- hGrabEditor = new TableEditor (table);
- vGrabEditor = new TableEditor (table);
- table.addMouseListener (new MouseAdapter () {
- public void mouseDown(MouseEvent e) {
- resetEditors();
- index = table.getSelectionIndex ();
- Point pt = new Point (e.x, e.y);
- newItem = table.getItem (pt);
- if (newItem == null) return;
- TableItem oldItem = comboEditor.getItem ();
- if (newItem == oldItem || newItem != lastSelected) {
- lastSelected = newItem;
- return;
- }
- table.showSelection ();
-
- combo = new CCombo (table, SWT.READ_ONLY);
- createComboEditor (combo, comboEditor);
-
- widthText = new Text (table, SWT.SINGLE);
- widthText.setText (((String [])data.elementAt (index)) [WIDTH_COL]);
- createTextEditor (widthText, widthEditor, WIDTH_COL);
-
- heightText = new Text (table, SWT.SINGLE);
- heightText.setText (((String [])data.elementAt (index)) [HEIGHT_COL]);
- createTextEditor (heightText, heightEditor, HEIGHT_COL);
- String [] alignValues = new String [] {"BEGINNING","CENTER","END","FILL"};
- hAlign = new CCombo (table, SWT.NONE);
- hAlign.setItems (alignValues);
- hAlign.setText (newItem.getText (HALIGN_COL));
- hAlignEditor.horizontalAlignment = SWT.LEFT;
- hAlignEditor.grabHorizontal = true;
- hAlignEditor.minimumWidth = 50;
- hAlignEditor.setEditor (hAlign, newItem, HALIGN_COL);
- hAlign.addTraverseListener (traverseListener);
-
- vAlign = new CCombo (table, SWT.NONE);
- vAlign.setItems (alignValues);
- vAlign.setText (newItem.getText (VALIGN_COL));
- vAlignEditor.horizontalAlignment = SWT.LEFT;
- vAlignEditor.grabHorizontal = true;
- vAlignEditor.minimumWidth = 50;
- vAlignEditor.setEditor (vAlign, newItem, VALIGN_COL);
- vAlign.addTraverseListener (traverseListener);
-
- hIndent = new Text (table, SWT.SINGLE);
- hIndent.setText (((String [])data.elementAt (index)) [HINDENT_COL]);
- createTextEditor (hIndent, hIndentEditor, HINDENT_COL);
-
- hSpan = new Text (table, SWT.SINGLE);
- hSpan.setText (((String [])data.elementAt (index)) [HSPAN_COL]);
- createTextEditor (hSpan, hSpanEditor, HSPAN_COL);
-
- vSpan = new Text (table, SWT.SINGLE);
- vSpan.setText (((String [])data.elementAt (index)) [VSPAN_COL]);
- createTextEditor (vSpan, vSpanEditor, VSPAN_COL);
-
- String [] boolValues = new String [] {"false","true"};
- hGrab = new CCombo (table, SWT.NONE);
- hGrab.setItems (boolValues);
- hGrab.setText (newItem.getText (HGRAB_COL));
- hGrabEditor.horizontalAlignment = SWT.LEFT;
- hGrabEditor.grabHorizontal = true;
- hGrabEditor.minimumWidth = 50;
- hGrabEditor.setEditor (hGrab, newItem, HGRAB_COL);
- hGrab.addTraverseListener (traverseListener);;
-
- vGrab = new CCombo (table, SWT.NONE);
- vGrab.setItems (boolValues);
- vGrab.setText (newItem.getText (VGRAB_COL));
- vGrabEditor.horizontalAlignment = SWT.LEFT;
- vGrabEditor.grabHorizontal = true;
- vGrabEditor.minimumWidth = 50;
- vGrabEditor.setEditor (vGrab, newItem, VGRAB_COL);
- vGrab.addTraverseListener (traverseListener);
-
- for (int i=0; i<table.getColumnCount (); i++) {
- Rectangle rect = newItem.getBounds (i);
- if (rect.contains (pt)) {
- switch (i) {
- case COMBO_COL :
- combo.setFocus ();
- break;
- case WIDTH_COL :
- widthText.setFocus ();
- break;
- case HEIGHT_COL :
- heightText.setFocus ();
- break;
- case HALIGN_COL :
- hAlign.setFocus ();
- break;
- case VALIGN_COL :
- vAlign.setFocus ();
- break;
- case HINDENT_COL :
- hIndent.setFocus ();
- break;
- case HSPAN_COL :
- hSpan.setFocus ();
- break;
- case VSPAN_COL :
- vSpan.setFocus ();
- break;
- case HGRAB_COL :
- hGrab.setFocus ();
- break;
- case VGRAB_COL :
- vGrab.setFocus ();
- break;
- default :
- resetEditors ();
- break;
- }
- }
- }
- }
- });
-
- /* Add listener to add an element to the table */
- add.addSelectionListener(new SelectionAdapter () {
- public void widgetSelected(SelectionEvent e) {
- TableItem item = new TableItem (table, 0);
- String [] insert = new String [] {
- String.valueOf (table.indexOf (item)), "Button",
- "-1","-1","BEGINNING","CENTER",
- "0","1","1","false","false"};
- item.setText (insert);
- data.addElement (insert);
- resetEditors ();
- }
- });
- }
-
- /**
- * Creates the control widgets.
- */
- void createControlWidgets () {
- /* Rearrange the layout of the control group */
- size.setLayoutData (new GridData ());
-
- /* Controls the margins and spacing of the GridLayout */
- String [] marginValues = new String [] {"0","3","5","10"};
- Group marginGroup = new Group (controlGroup, SWT.NONE);
- marginGroup.setText (LayoutExample.getResourceString ("Margins_Spacing"));
- GridData data = new GridData (GridData.FILL_HORIZONTAL);
- data.verticalSpan = 2;
- marginGroup.setLayoutData (data);
- GridLayout layout = new GridLayout ();
- layout.numColumns = 2;
- marginGroup.setLayout (layout);
- new Label (marginGroup, SWT.NONE).setText ("marginHeight");
- marginHeight = new Combo (marginGroup, SWT.NONE);
- marginHeight.setItems (marginValues);
- marginHeight.select (2);
- data = new GridData (GridData.FILL_HORIZONTAL);
- data.widthHint = 60;
- marginHeight.setLayoutData (data);
- marginHeight.addSelectionListener (selectionListener);
- marginHeight.addTraverseListener (traverseListener);
- new Label (marginGroup, SWT.NONE).setText ("marginWidth");
- marginWidth = new Combo (marginGroup, SWT.NONE);
- marginWidth.setItems (marginValues);
- marginWidth.select (2);
- data = new GridData (GridData.FILL_HORIZONTAL);
- data.widthHint = 60;
- marginWidth.setLayoutData (data);
- marginWidth.addSelectionListener (selectionListener);
- marginWidth.addTraverseListener (traverseListener);
- new Label (marginGroup, SWT.NONE).setText ("horizontalSpacing");
- horizontalSpacing = new Combo (marginGroup, SWT.NONE);
- horizontalSpacing.setItems (marginValues);
- horizontalSpacing.select (2);
- data = new GridData (GridData.FILL_HORIZONTAL);
- data.widthHint = 60;
- horizontalSpacing.setLayoutData (data);
- horizontalSpacing.addSelectionListener (selectionListener);
- horizontalSpacing.addTraverseListener (traverseListener);
- new Label (marginGroup, SWT.NONE).setText ("verticalSpacing");
- verticalSpacing = new Combo (marginGroup, SWT.NONE);
- verticalSpacing.setItems (marginValues);
- verticalSpacing.select (2);
- data = new GridData (GridData.FILL_HORIZONTAL);
- data.widthHint = 60;
- verticalSpacing.setLayoutData (data);
- verticalSpacing.addSelectionListener (selectionListener);
- verticalSpacing.addTraverseListener (traverseListener);
-
- /* Controls the columns in the GridLayout */
- Group columnGroup = new Group (controlGroup, SWT.NONE);
- columnGroup.setText (LayoutExample.getResourceString ("Columns"));
- layout = new GridLayout ();
- layout.numColumns = 2;
- columnGroup.setLayout (layout);
- data = new GridData (GridData.VERTICAL_ALIGN_FILL);
- columnGroup.setLayoutData (data);
- numColumns = new Text (columnGroup, SWT.BORDER);
- numColumns.setText ("1");
- numColumns.addSelectionListener (selectionListener);
- numColumns.addTraverseListener (traverseListener);
- data = new GridData (GridData.FILL_HORIZONTAL);
- data.widthHint = 15;
- numColumns.setLayoutData (data);
- new Label (columnGroup, SWT.NONE).setText ("numColumns");
- makeColumnsEqualWidth = new Button (columnGroup, SWT.CHECK);
- makeColumnsEqualWidth.setText ("makeColumnsEqualWidth");
- makeColumnsEqualWidth.addSelectionListener (selectionListener);
- data = new GridData (GridData.FILL_HORIZONTAL);
- data.horizontalSpan = 2;
- data.horizontalIndent = 14;
- makeColumnsEqualWidth.setLayoutData (data);
-
- /* Add common controls */
- super.createControlWidgets ();
- controlGroup.pack();
- }
-
- /**
- * Creates the example layout.
- */
- void createLayout () {
- gridLayout = new GridLayout ();
- layoutComposite.setLayout (gridLayout);
- }
-
- /**
- * Disposes the editors without placing their contents
- * into the table.
- */
- void disposeEditors () {
- comboEditor.setEditor (null, null, -1);
- combo.dispose ();
- widthText.dispose ();
- heightText.dispose ();
- hAlign.dispose ();
- vAlign.dispose ();
- hIndent.dispose ();
- hSpan.dispose ();
- vSpan.dispose ();
- hGrab.dispose ();
- vGrab.dispose ();
- }
-
- /**
- * Generates code for the example layout.
- */
- StringBuffer generateLayoutCode () {
- StringBuffer code = new StringBuffer ();
- code.append ("\t\tGridLayout gridLayout = new GridLayout ();\n");
- if (gridLayout.numColumns != 1) {
- code.append ("\t\tgridLayout.numColumns = " + gridLayout.numColumns + ";\n");
- }
- if (gridLayout.makeColumnsEqualWidth) {
- code.append ("\t\tgridLayout.makeColumnsEqualWidth = true;\n");
- }
- if (gridLayout.marginHeight != 5) {
- code.append ("\t\tgridLayout.marginHeight = " + gridLayout.marginHeight + ";\n");
- }
- if (gridLayout.marginWidth != 5) {
- code.append ("\t\tgridLayout.marginWidth = " + gridLayout.marginWidth + ";\n");
- }
- if (gridLayout.horizontalSpacing != 5) {
- code.append ("\t\tgridLayout.horizontalSpacing = " + gridLayout.horizontalSpacing + ";\n");
- }
- if (gridLayout.verticalSpacing != 5) {
- code.append ("\t\tgridLayout.verticalSpacing = " + gridLayout.verticalSpacing + ";\n");
- }
- code.append ("\t\tshell.setLayout (gridLayout);\n");
-
- boolean first = true;
- for (int i = 0; i < children.length; i++) {
- Control control = children [i];
- code.append (getChildCode (control, i));
- GridData data = (GridData) control.getLayoutData ();
- if (data != null) {
- code.append ("\t\t");
- if (first) {
- code.append ("GridData ");
- first = false;
- }
- code.append ("data = new GridData ();\n");
- if (data.widthHint != SWT.DEFAULT) {
- code.append ("\t\tdata.widthHint = " + data.widthHint + ";\n");
- }
- if (data.heightHint != SWT.DEFAULT) {
- code.append ("\t\tdata.heightHint = " + data.heightHint + ";\n");
- }
- if (data.horizontalAlignment != GridData.BEGINNING) {
- String alignment;
- int hAlignment = data.horizontalAlignment;
- if (hAlignment == GridData.CENTER) alignment = "GridData.CENTER";
- else if (hAlignment == GridData.END) alignment = "GridData.END";
- else alignment = "GridData.FILL";
- code.append ("\t\tdata.horizontalAlignment = " + alignment + ";\n");
- }
- if (data.verticalAlignment != GridData.CENTER) {
- String alignment;
- int vAlignment = data.verticalAlignment;
- if (vAlignment == GridData.BEGINNING) alignment = "GridData.BEGINNING";
- else if (vAlignment == GridData.END) alignment = "GridData.END";
- else alignment = "GridData.FILL";
- code.append ("\t\tdata.verticalAlignment = " + alignment + ";\n");
- }
- if (data.horizontalIndent != 0) {
- code.append ("\t\tdata.horizontalIndent = " + data.horizontalIndent + ";\n");
- }
- if (data.horizontalSpan != 1) {
- code.append ("\t\tdata.horizontalSpan = " + data.horizontalSpan + ";\n");
- }
- if (data.verticalSpan != 1) {
- code.append ("\t\tdata.verticalSpan = " + data.verticalSpan + ";\n");
- }
- if (data.grabExcessHorizontalSpace) {
- code.append ("\t\tdata.grabExcessHorizontalSpace = true;\n");
- }
- if (data.grabExcessVerticalSpace) {
- code.append ("\t\tdata.grabExcessVerticalSpace = true;\n");
- }
- if (code.substring (code.length () - 33).equals ("GridData data = new GridData ();\n")) {
- code.delete (code.length () - 33, code.length ());
- first = true;
- } else if (code.substring (code.length () - 24).equals ("data = new GridData ();\n")) {
- code.delete (code.length () - 24, code.length ());
- } else {
- code.append ("\t\t" + names [i] + ".setLayoutData (data);\n");
- }
- }
- }
- return code;
- }
-
- /**
- * Returns the layout data field names.
- */
- String [] getLayoutDataFieldNames() {
- return new String [] {
- "",
- "Control",
- "width",
- "height",
- "horizontalAlignment",
- "verticalAlignment",
- "horizontalIndent",
- "horizontalSpan",
- "verticalSpan",
- "grabExcessHorizontalSpace",
- "grabExcessVerticalSpace"
- };
- }
-
- /**
- * Gets the text for the tab folder item.
- */
- String getTabText () {
- return "GridLayout";
- }
-
- /**
- * Takes information from TableEditors and stores it.
- */
- void resetEditors () {
- resetEditors (false);
- }
-
- void resetEditors (boolean tab) {
- TableItem oldItem = comboEditor.getItem ();
- if (oldItem != null) {
- int row = table.indexOf (oldItem);
- try {
- new Integer (widthText.getText ()).intValue ();
- } catch (NumberFormatException e) {
- widthText.setText (oldItem.getText (WIDTH_COL));
- }
- try {
- new Integer (heightText.getText ()).intValue ();
- } catch (NumberFormatException e) {
- heightText.setText (oldItem.getText (HEIGHT_COL));
- }
- try {
- new Integer (hIndent.getText ()).intValue ();
- } catch (NumberFormatException e) {
- hIndent.setText (oldItem.getText (HINDENT_COL));
- }
- try {
- new Integer (hSpan.getText ()).intValue ();
- } catch (NumberFormatException e) {
- hSpan.setText (oldItem.getText (HSPAN_COL));
- }
- try {
- new Integer (vSpan.getText ()).intValue ();
- } catch (NumberFormatException e) {
- vSpan.setText (oldItem.getText (VSPAN_COL));
- }
- String [] insert = new String [] {
- String.valueOf (row), combo.getText (), widthText.getText (), heightText.getText (),
- hAlign.getText (), vAlign.getText (), hIndent.getText (),
- hSpan.getText (), vSpan.getText (), hGrab.getText (), vGrab.getText ()
- };
- data.setElementAt (insert, row);
- for (int i = 0; i < TOTAL_COLS; i++) {
- oldItem.setText (i, ((String [])data.elementAt (row)) [i]);
- }
- if (!tab) disposeEditors ();
- }
- setLayoutState ();
- refreshLayoutComposite ();
- setLayoutData ();
- layoutComposite.layout (true);
- layoutGroup.layout (true);
- }
-
- /**
- * Sets the layout data for the children of the layout.
- */
- void setLayoutData () {
- Control [] children = layoutComposite.getChildren ();
- TableItem [] items = table.getItems ();
- GridData data;
- int hIndent, hSpan, vSpan;
- String vAlign, hAlign, vGrab, hGrab;
- for (int i = 0; i < children.length; i++) {
- data = new GridData ();
- /* Set widthHint and heightHint */
- data.widthHint = new Integer (items [i].getText (WIDTH_COL)).intValue ();
- data.heightHint = new Integer (items [i].getText (HEIGHT_COL)).intValue ();
- /* Set vertical alignment and horizontal alignment */
- hAlign = items [i].getText (HALIGN_COL);
- if (hAlign.equals ("CENTER")) {
- data.horizontalAlignment = GridData.CENTER;
- } else if (hAlign.equals ("END")) {
- data.horizontalAlignment = GridData.END;
- } else if (hAlign.equals ("FILL")) {
- data.horizontalAlignment = GridData.FILL;
- } else {
- data.horizontalAlignment = GridData.BEGINNING;
- }
- vAlign = items [i].getText (VALIGN_COL);
- if (vAlign.equals ("BEGINNING")) {
- data.verticalAlignment = GridData.BEGINNING;
- } else if (vAlign.equals ("END")) {
- data.verticalAlignment = GridData.END;
- } else if (vAlign.equals ("FILL")) {
- data.verticalAlignment = GridData.FILL;
- } else {
- data.verticalAlignment = GridData.CENTER;
- }
- /* Set indents and spans */
- hIndent = new Integer (items [i].getText (HINDENT_COL)).intValue ();
- data.horizontalIndent = hIndent;
- hSpan = new Integer (items [i].getText (HSPAN_COL)).intValue ();
- data.horizontalSpan = hSpan;
- vSpan = new Integer (items [i].getText (VSPAN_COL)).intValue ();
- data.verticalSpan = vSpan;
- /* Set grabbers */
- hGrab = items [i].getText (HGRAB_COL);
- if (hGrab.equals ("true")) {
- data.grabExcessHorizontalSpace = true;
- } else {
- data.grabExcessHorizontalSpace = false;
- }
- vGrab = items [i].getText (VGRAB_COL);
- if (vGrab.equals ("true")) {
- data.grabExcessVerticalSpace = true;
- } else {
- data.grabExcessVerticalSpace = false;
- }
- children [i].setLayoutData (data);
- }
- }
-
- /**
- * Sets the state of the layout.
- */
- void setLayoutState () {
- /* Set the columns for the layout */
- try {
- gridLayout.numColumns = new Integer (numColumns.getText ()).intValue ();
- } catch (NumberFormatException e) {
- gridLayout.numColumns = 1;
- }
- gridLayout.makeColumnsEqualWidth = makeColumnsEqualWidth.getSelection ();
-
- /* Set the margins and spacing */
- try {
- gridLayout.marginHeight = new Integer (marginHeight.getText ()).intValue ();
- } catch (NumberFormatException e) {
- gridLayout.marginHeight = 5;
- marginHeight.select (2);
- }
- try {
- gridLayout.marginWidth = new Integer (marginWidth.getText ()).intValue ();
- } catch (NumberFormatException e) {
- gridLayout.marginWidth = 5;
- marginWidth.select (2);
- }
- try {
- gridLayout.horizontalSpacing = new Integer (horizontalSpacing.getText ()).intValue ();
- } catch (NumberFormatException e) {
- gridLayout.horizontalSpacing = 5;
- horizontalSpacing.select (2);
- }
- try {
- gridLayout.verticalSpacing = new Integer (verticalSpacing.getText ()).intValue ();
- } catch (NumberFormatException e) {
- gridLayout.verticalSpacing = 5;
- verticalSpacing.select (2);
- }
- }
-}
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/layoutexample/LayoutExample.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/layoutexample/LayoutExample.java
deleted file mode 100644
index 6f88135c9b..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/layoutexample/LayoutExample.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.layoutexample;
-
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.events.*;
-
-import java.text.*;
-import java.util.*;
-
-public class LayoutExample {
- private static ResourceBundle resourceBundle = ResourceBundle.getBundle("examples_layout");
- private TabFolder tabFolder;
-
- /**
- * Creates an instance of a LayoutExample embedded inside
- * the supplied parent Composite.
- *
- * @param parent the container of the example
- */
- public LayoutExample(Composite parent) {
- tabFolder = new TabFolder (parent, SWT.NULL);
- Tab [] tabs = new Tab [] {
- new FillLayoutTab (this),
- new RowLayoutTab (this),
- new GridLayoutTab (this),
- new FormLayoutTab (this),
- };
- for (int i=0; i<tabs.length; i++) {
- TabItem item = new TabItem (tabFolder, SWT.NULL);
- item.setText (tabs [i].getTabText ());
- item.setControl (tabs [i].createTabFolderPage (tabFolder));
- }
- }
-
- /**
- * Grabs input focus.
- */
- public void setFocus() {
- tabFolder.setFocus();
- }
-
- /**
- * Disposes of all resources associated with a particular
- * instance of the LayoutExample.
- */
- public void dispose() {
- tabFolder = null;
- }
-
- /**
- * Invokes as a standalone program.
- */
- public static void main(String[] args) {
- final Display display = new Display();
- final Shell shell = new Shell(display);
- shell.setLayout(new FillLayout());
- new LayoutExample(shell);
- shell.setText(getResourceString("window.title"));
- shell.addShellListener (new ShellAdapter () {
- public void shellClosed(ShellEvent e) {
- Shell [] shells = display.getShells();
- for (int i = 0; i < shells.length; i++) {
- if (shells [i] != shell) shells [i].close ();
- }
- }
- });
- shell.open();
- while (! shell.isDisposed()) {
- if (! display.readAndDispatch()) display.sleep();
- }
- }
-
- /**
- * Gets a string from the resource bundle.
- * We don't want to crash because of a missing String.
- * Returns the key if not found.
- */
- static String getResourceString(String key) {
- try {
- return resourceBundle.getString(key);
- } catch (MissingResourceException e) {
- return key;
- } catch (NullPointerException e) {
- return "!" + key + "!";
- }
- }
-
- /**
- * Gets a string from the resource bundle and binds it
- * with the given arguments. If the key is not found,
- * return the key.
- */
- static String getResourceString(String key, Object[] args) {
- try {
- return MessageFormat.format(getResourceString(key), args);
- } catch (MissingResourceException e) {
- return key;
- } catch (NullPointerException e) {
- return "!" + key + "!";
- }
- }
-}
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/layoutexample/RowLayoutTab.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/layoutexample/RowLayoutTab.java
deleted file mode 100644
index 6843ae551a..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/layoutexample/RowLayoutTab.java
+++ /dev/null
@@ -1,413 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.layoutexample;
-
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.custom.*;
-
-class RowLayoutTab extends Tab {
- /* Controls for setting layout parameters */
- Button horizontal, vertical;
- Button wrap, pack, justify;
- Combo marginRight, marginLeft, marginTop, marginBottom, spacing;
- /* The example layout instance */
- RowLayout rowLayout;
- /* TableEditors and related controls*/
- TableEditor comboEditor, widthEditor, heightEditor;
- CCombo combo;
- Text widthText, heightText;
-
- /* Constants */
- final int COMBO_COL = 1;
- final int WIDTH_COL = 2;
- final int HEIGHT_COL = 3;
-
- final int TOTAL_COLS = 4;
-
- /**
- * Creates the Tab within a given instance of LayoutExample.
- */
- RowLayoutTab(LayoutExample instance) {
- super(instance);
- }
-
- /**
- * Creates the widgets in the "child" group.
- */
- void createChildWidgets () {
- /* Add common controls */
- super.createChildWidgets ();
-
- /* Add TableEditors */
- comboEditor = new TableEditor (table);
- widthEditor = new TableEditor (table);
- heightEditor = new TableEditor (table);
- table.addMouseListener (new MouseAdapter () {
- public void mouseDown(MouseEvent e) {
- resetEditors();
- index = table.getSelectionIndex ();
- Point pt = new Point (e.x, e.y);
- newItem = table.getItem (pt);
- if (newItem == null) return;
- TableItem oldItem = comboEditor.getItem ();
- if (newItem == oldItem || newItem != lastSelected) {
- lastSelected = newItem;
- return;
- }
- table.showSelection ();
-
- combo = new CCombo (table, SWT.READ_ONLY);
- createComboEditor (combo, comboEditor);
-
- widthText = new Text (table, SWT.SINGLE);
- widthText.setText (((String [])data.elementAt (index)) [WIDTH_COL]);
- createTextEditor (widthText, widthEditor, WIDTH_COL);
-
- heightText = new Text (table, SWT.SINGLE);
- heightText.setText (((String [])data.elementAt (index)) [HEIGHT_COL]);
- createTextEditor (heightText, heightEditor, HEIGHT_COL);
-
- for (int i=0; i<table.getColumnCount (); i++) {
- Rectangle rect = newItem.getBounds (i);
- if (rect.contains (pt)) {
- switch (i) {
- case COMBO_COL :
- combo.setFocus ();
- break;
- case WIDTH_COL :
- widthText.setFocus ();
- break;
- case HEIGHT_COL :
- heightText.setFocus ();
- break;
- default :
- resetEditors ();
- break;
- }
- }
- }
- }
- });
-
- /* Add listener to add an element to the table */
- add.addSelectionListener(new SelectionAdapter () {
- public void widgetSelected(SelectionEvent e) {
- TableItem item = new TableItem (table, 0);
- String [] insert = new String [] {
- String.valueOf (table.indexOf (item)),
- "Button", "-1", "-1"};
- item.setText (insert);
- data.addElement (insert);
- resetEditors ();
- }
- });
- }
-
- /**
- * Creates the control widgets.
- */
- void createControlWidgets () {
- /* Controls the type of RowLayout */
- Group typeGroup = new Group (controlGroup, SWT.NONE);
- typeGroup.setText (LayoutExample.getResourceString ("Type"));
- typeGroup.setLayout (new GridLayout ());
- GridData data = new GridData (GridData.FILL_HORIZONTAL);
- typeGroup.setLayoutData (data);
- horizontal = new Button (typeGroup, SWT.RADIO);
- horizontal.setText ("SWT.HORIZONTAL");
- horizontal.setLayoutData (new GridData (GridData.FILL_HORIZONTAL));
- horizontal.setSelection(true);
- horizontal.addSelectionListener (selectionListener);
- vertical = new Button (typeGroup, SWT.RADIO);
- vertical.setText ("SWT.VERTICAL");
- vertical.setLayoutData (new GridData (GridData.FILL_HORIZONTAL));
- vertical.addSelectionListener (selectionListener);
-
- /* Controls the margins and spacing of the RowLayout */
- String [] marginValues = new String [] {"0","3","5","10"};
- Group marginGroup = new Group (controlGroup, SWT.NONE);
- marginGroup.setText (LayoutExample.getResourceString ("Margins_Spacing"));
- data = new GridData (GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_BEGINNING);
- data.verticalSpan = 2;
- marginGroup.setLayoutData (data);
- GridLayout layout = new GridLayout ();
- layout.numColumns = 2;
- marginGroup.setLayout (layout);
- new Label (marginGroup, SWT.NONE).setText ("marginRight");
- marginRight = new Combo (marginGroup, SWT.NONE);
- marginRight.setItems (marginValues);
- marginRight.select (1);
- marginRight.setLayoutData (new GridData(GridData.FILL_HORIZONTAL));
- marginRight.addSelectionListener (selectionListener);
- marginRight.addTraverseListener (traverseListener);
- new Label (marginGroup, SWT.NONE).setText ("marginLeft");
- marginLeft = new Combo (marginGroup, SWT.NONE);
- marginLeft.setItems (marginValues);
- marginLeft.select (1);
- marginLeft.setLayoutData (new GridData(GridData.FILL_HORIZONTAL));
- marginLeft.addSelectionListener (selectionListener);
- marginLeft.addTraverseListener(traverseListener);
- new Label (marginGroup, SWT.NONE).setText ("marginTop");
- marginTop = new Combo (marginGroup, SWT.NONE);
- marginTop.setItems (marginValues);
- marginTop.select (1);
- marginTop.setLayoutData (new GridData(GridData.FILL_HORIZONTAL));
- marginTop.addSelectionListener (selectionListener);
- marginTop.addTraverseListener(traverseListener);
- new Label (marginGroup, SWT.NONE).setText ("marginBottom");
- marginBottom = new Combo (marginGroup, SWT.NONE);
- marginBottom.setItems (marginValues);
- marginBottom.select (1);
- marginBottom.setLayoutData (new GridData(GridData.FILL_HORIZONTAL));
- marginBottom.addSelectionListener (selectionListener);
- marginBottom.addTraverseListener(traverseListener);
- new Label (marginGroup, SWT.NONE).setText ("spacing");
- spacing = new Combo (marginGroup, SWT.NONE);
- spacing.setItems (marginValues);
- spacing.select (1);
- spacing.setLayoutData (new GridData(GridData.FILL_HORIZONTAL));
- spacing.addSelectionListener (selectionListener);
- spacing.addTraverseListener(traverseListener);
-
- /* Controls other parameters of the RowLayout */
- Group specGroup = new Group (controlGroup, SWT.NONE);
- specGroup.setText (LayoutExample.getResourceString ("Properties"));
- specGroup.setLayoutData (new GridData (GridData.FILL_HORIZONTAL));
- specGroup.setLayout (new GridLayout ());
- wrap = new Button (specGroup, SWT.CHECK);
- wrap.setText ("wrap");
- wrap.setSelection (true);
- wrap.setLayoutData (new GridData (GridData.FILL_HORIZONTAL));
- wrap.addSelectionListener (selectionListener);
- pack = new Button (specGroup, SWT.CHECK);
- pack.setText ("pack");
- pack.setLayoutData (new GridData (GridData.FILL_HORIZONTAL));
- pack.setSelection (true);
- pack.addSelectionListener (selectionListener);
- justify = new Button (specGroup, SWT.CHECK);
- justify.setText ("justify");
- justify.setLayoutData (new GridData (GridData.FILL_HORIZONTAL));
- justify.addSelectionListener (selectionListener);
-
- /* Add common controls */
- super.createControlWidgets ();
-
- /* Position the sash */
- sash.setWeights (new int [] {6,5});
- }
-
- /**
- * Creates the example layout.
- */
- void createLayout () {
- rowLayout = new RowLayout ();
- layoutComposite.setLayout (rowLayout);
- }
-
- /**
- * Disposes the editors without placing their contents
- * into the table.
- */
- void disposeEditors () {
- comboEditor.setEditor (null, null, -1);
- combo.dispose ();
- widthText.dispose ();
- heightText.dispose ();
- }
-
- /**
- * Generates code for the example layout.
- */
- StringBuffer generateLayoutCode () {
- StringBuffer code = new StringBuffer ();
- code.append ("\t\tRowLayout rowLayout = new RowLayout ();\n");
- if (rowLayout.type == SWT.VERTICAL) {
- code.append ("\t\trowLayout.type = SWT.VERTICAL;\n");
- }
- if (rowLayout.wrap == false) {
- code.append ("\t\trowLayout.wrap = false;\n");
- }
- if (rowLayout.pack == false) {
- code.append ("\t\trowLayout.pack = false;\n");
- }
- if (rowLayout.justify == true) {
- code.append ("\t\trowLayout.justify = true;\n");
- }
- if (rowLayout.marginLeft != 3) {
- code.append ("\t\trowLayout.marginLeft = " + rowLayout.marginLeft + ";\n");
- }
- if (rowLayout.marginRight != 3) {
- code.append ("\t\trowLayout.marginRight = " + rowLayout.marginRight + ";\n");
- }
- if (rowLayout.marginTop != 3) {
- code.append ("\t\trowLayout.marginTop = " + rowLayout.marginTop + ";\n");
- }
- if (rowLayout.marginBottom != 3) {
- code.append ("\t\trowLayout.marginBottom = " + rowLayout.marginBottom + ";\n");
- }
- if (rowLayout.spacing != 3) {
- code.append ("\t\trowLayout.spacing = " + rowLayout.spacing + ";\n");
- }
- code.append ("\t\tshell.setLayout (rowLayout);\n");
-
- boolean first = true;
- for (int i = 0; i < children.length; i++) {
- Control control = children [i];
- code.append (getChildCode (control,i));
- RowData data = (RowData) control.getLayoutData ();
- if (data != null) {
- if (data.width != -1 || data.height != -1) {
- code.append ("\t\t");
- if (first) {
- code.append ("RowData ");
- first = false;
- }
- if (data.width == -1) {
- code.append ("data = new RowData (SWT.DEFAULT, " + data.height + ");\n");
- } else if (data.height == -1) {
- code.append ("data = new RowData (" + data.width + ", SWT.DEFAULT);\n");
- } else {
- code.append ("data = new RowData (" + data.width + ", " + data.height + ");\n");
- }
- code.append ("\t\t" + names [i] + ".setLayoutData (data);\n");
- }
- }
- }
- return code;
- }
-
- /**
- * Returns the layout data field names.
- */
- String [] getLayoutDataFieldNames() {
- return new String [] {
- "",
- "Control",
- "width",
- "height"
- };
- }
-
- /**
- * Gets the text for the tab folder item.
- */
- String getTabText () {
- return "RowLayout";
- }
-
- /**
- * Takes information from TableEditors and stores it.
- */
- void resetEditors () {
- resetEditors (false);
- }
-
- void resetEditors (boolean tab) {
- TableItem oldItem = comboEditor.getItem ();
- if (oldItem != null) {
- int row = table.indexOf (oldItem);
- /* Make sure user has entered valid data */
- try {
- new Integer (widthText.getText ()).intValue ();
- } catch (NumberFormatException e) {
- widthText.setText (oldItem.getText (WIDTH_COL));
- }
- try {
- new Integer (heightText.getText ()).intValue ();
- } catch (NumberFormatException e) {
- heightText.setText (oldItem.getText (HEIGHT_COL));
- }
- String [] insert = new String [] {
- String.valueOf (row), combo.getText (), widthText.getText (), heightText.getText ()};
- data.setElementAt (insert, row);
- for (int i = 0 ; i < TOTAL_COLS; i++) {
- oldItem.setText (i, ((String [])data.elementAt (row)) [i]);
- }
- if (!tab) disposeEditors ();
- }
- setLayoutState ();
- refreshLayoutComposite ();
- setLayoutData ();
- layoutComposite.layout (true);
- layoutGroup.layout (true);
- }
-
- /**
- * Sets the layout data for the children of the layout.
- */
- void setLayoutData () {
- Control [] children = layoutComposite.getChildren ();
- TableItem [] items = table.getItems ();
- RowData data;
- int width, height;
- for (int i = 0; i < children.length; i++) {
- width = new Integer (items [i].getText (WIDTH_COL)).intValue ();
- height = new Integer (items [i].getText (HEIGHT_COL)).intValue ();
- data = new RowData (width, height);
- children [i].setLayoutData (data);
- }
-
- }
-
- /**
- * Sets the state of the layout.
- */
- void setLayoutState () {
- /* Set the type of layout */
- if (vertical.getSelection ()) {
- rowLayout.type = SWT.VERTICAL;
- } else {
- rowLayout.type = SWT.HORIZONTAL;
- }
-
- /* Set the margins and spacing */
- try {
- rowLayout.marginRight = new Integer (marginRight.getText ()).intValue ();
- } catch (NumberFormatException e) {
- rowLayout.marginRight = 3;
- marginRight.select (1);
- }
- try {
- rowLayout.marginLeft = new Integer (marginLeft.getText ()).intValue ();
- } catch (NumberFormatException e) {
- rowLayout.marginLeft = 3;
- marginLeft.select (1);
- }
- try {
- rowLayout.marginTop = new Integer (marginTop.getText ()).intValue ();
- } catch (NumberFormatException e) {
- rowLayout.marginTop = 3;
- marginTop.select (1);
- }
- try {
- rowLayout.marginBottom = new Integer (marginBottom.getText ()).intValue ();
- } catch (NumberFormatException e) {
- rowLayout.marginBottom = 3;
- marginBottom.select (1);
- }
- try {
- rowLayout.spacing = new Integer (spacing.getText ()).intValue ();
- } catch (NumberFormatException e) {
- rowLayout.spacing = 3;
- spacing.select (1);
- }
-
- /* Set the other layout properties */
- rowLayout.wrap = wrap.getSelection ();
- rowLayout.pack = pack.getSelection ();
- rowLayout.justify = justify.getSelection ();
- }
-}
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/layoutexample/Tab.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/layoutexample/Tab.java
deleted file mode 100644
index 89c95794c7..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/layoutexample/Tab.java
+++ /dev/null
@@ -1,646 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.layoutexample;
-
-
-import java.util.Vector;
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.custom.*;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-
-/**
- * <code>Tab</code> is the abstract superclass of every page
- * in the example's tab folder. Each page in the tab folder
- * displays a layout, and allows the user to manipulate the
- * layout.
- *
- * A typical page in a Tab contains a two column composite.
- * The left column contains the layout group, which contains
- * the "layout composite" (the one that has the example layout).
- * The right column contains the "control" group. The "control"
- * group allows the user to interact with the example. Typical
- * operations are modifying layout parameters, adding children
- * to the "layout composite", and modifying child layout data.
- * The "Code" button in the "control" group opens a new window
- * containing code that will regenerate the layout. This code
- * (or parts of it) can be selected and copied to the clipboard.
- */
-abstract class Tab {
- /* Common groups and composites */
- Composite tabFolderPage;
- SashForm sash;
- Group layoutGroup, controlGroup, childGroup;
- /* The composite that contains the example layout */
- Composite layoutComposite;
- /* Common controls for modifying the example layout */
- String [] names;
- Control [] children;
- Button size, add, delete, clear, code;
- /* Common values for working with TableEditors */
- Table table;
- int index;
- TableItem newItem, lastSelected;
- Vector data = new Vector ();
- /* Controlling instance */
- final LayoutExample instance;
-
- /* Listeners */
- SelectionListener selectionListener = new SelectionAdapter () {
- public void widgetSelected (SelectionEvent e) {
- resetEditors ();
- };
- };
-
- TraverseListener traverseListener = new TraverseListener () {
- public void keyTraversed (TraverseEvent e) {
- if (e.detail == SWT.TRAVERSE_RETURN) {
- e.doit = false;
- resetEditors ();
- }
- };
- };
-
- /**
- * Creates the Tab within a given instance of LayoutExample.
- */
- Tab(LayoutExample instance) {
- this.instance = instance;
- }
-
- /**
- * Creates the "child" group. This is the group that allows
- * you to add children to the layout. It exists within the
- * controlGroup.
- */
- void createChildGroup () {
- childGroup = new Group (controlGroup, SWT.NONE);
- childGroup.setText (LayoutExample.getResourceString("Children"));
- GridLayout layout = new GridLayout ();
- layout.numColumns = 3;
- childGroup.setLayout (layout);
- GridData data = new GridData (GridData.FILL_BOTH);
- data.horizontalSpan = 2;
- childGroup.setLayoutData (data);
- createChildWidgets ();
- }
-
- /**
- * Creates the controls for modifying the "children"
- * table, and the table itself.
- * Subclasses override this method to augment the
- * standard table.
- */
- void createChildWidgets () {
- /* Controls for adding and removing children */
- add = new Button (childGroup, SWT.PUSH);
- add.setText (LayoutExample.getResourceString ("Add"));
- add.setLayoutData(new GridData (GridData.FILL_HORIZONTAL));
- delete = new Button (childGroup, SWT.PUSH);
- delete.setText (LayoutExample.getResourceString ("Delete"));
- delete.setLayoutData(new GridData (GridData.FILL_HORIZONTAL));
- delete.addSelectionListener (new SelectionAdapter () {
- public void widgetSelected (SelectionEvent e) {
- resetEditors ();
- int [] selected = table.getSelectionIndices ();
- table.remove (selected);
- /* Refresh the control indices of the table */
- for (int i = 0; i < table.getItemCount(); i++) {
- table.getItem (i).setText (0, String.valueOf (i));
- }
- refreshLayoutComposite ();
- layoutComposite.layout (true);
- layoutGroup.layout (true);
- }
- });
- clear = new Button (childGroup, SWT.PUSH);
- clear.setText (LayoutExample.getResourceString ("Clear"));
- clear.setLayoutData(new GridData (GridData.FILL_HORIZONTAL));
- clear.addSelectionListener (new SelectionAdapter () {
- public void widgetSelected (SelectionEvent e) {
- resetEditors ();
- children = layoutComposite.getChildren ();
- for (int i = 0; i < children.length; i++) {
- children [i].dispose ();
- }
- table.removeAll ();
- data.clear ();
- children = new Control [0];
- layoutGroup.layout (true);
- }
- });
- /* Create the "children" table */
- table = new Table (childGroup, SWT.MULTI | SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL | SWT.FULL_SELECTION | SWT.HIDE_SELECTION);
- table.setLinesVisible (true);
- table.setHeaderVisible (true);
- GridData gridData = new GridData (GridData.FILL_BOTH);
- gridData.horizontalSpan = 3;
- gridData.heightHint = 150;
- table.setLayoutData (gridData);
- table.addTraverseListener (traverseListener);
-
- /* Add columns to the table */
- String [] columnHeaders = getLayoutDataFieldNames ();
- for (int i = 0; i < columnHeaders.length; i++) {
- TableColumn column = new TableColumn(table, SWT.NONE);
- column.setText (columnHeaders [i]);
- if (i == 0) column.setWidth (20);
- else if (i == 1) column.setWidth (80);
- else column.pack ();
- }
- }
-
- /**
- * Creates the TableEditor with a CCombo in the first column
- * of the table. This CCombo lists all the controls that
- * the user can select to place on their layout.
- */
- void createComboEditor (CCombo combo, TableEditor comboEditor) {
- combo.setItems (new String [] {
- "Button", "Canvas", "Combo", "Composite",
- "CoolBar", "Group", "Label", "List",
- "ProgressBar", "Scale", "Slider", "StyledText",
- "Table", "Text", "ToolBar", "Tree"});
- combo.setText (newItem.getText (1));
-
- /* Set up editor */
- comboEditor.horizontalAlignment = SWT.LEFT;
- comboEditor.grabHorizontal = true;
- comboEditor.minimumWidth = 50;
- comboEditor.setEditor (combo, newItem, 1);
-
- /* Add listener */
- combo.addTraverseListener(new TraverseListener() {
- public void keyTraversed(TraverseEvent e) {
- if (e.detail == SWT.TRAVERSE_TAB_NEXT || e.detail == SWT.TRAVERSE_RETURN) {
- resetEditors ();
- }
- if (e.detail == SWT.TRAVERSE_ESCAPE) {
- disposeEditors ();
- }
- }
- });
- }
-
- /**
- * Creates the "control" group. This is the group on the
- * right half of each example tab. It contains controls
- * for adding new children to the layoutComposite, and
- * for modifying the children's layout data.
- */
- void createControlGroup () {
- controlGroup = new Group (sash, SWT.NONE);
- controlGroup.setText (LayoutExample.getResourceString("Parameters"));
- GridLayout layout = new GridLayout ();
- layout.numColumns = 2;
- controlGroup.setLayout (layout);
- size = new Button (controlGroup, SWT.CHECK);
- size.setText (LayoutExample.getResourceString ("Preferred_Size"));
- size.setSelection (false);
- size.addSelectionListener (new SelectionAdapter () {
- public void widgetSelected (SelectionEvent e) {
- resetEditors ();
- if (size.getSelection ()) {
- layoutComposite.setLayoutData (new GridData ());
- layoutGroup.layout (true);
- } else {
- layoutComposite.setLayoutData (new GridData (GridData.FILL_BOTH));
- layoutGroup.layout (true);
- }
- }
- });
- GridData data = new GridData (GridData.FILL_HORIZONTAL);
- data.horizontalSpan = 2;
- size.setLayoutData (data);
- createControlWidgets ();
- }
-
- /**
- * Creates the "control" widget children.
- * Subclasses override this method to augment
- * the standard controls created.
- */
- void createControlWidgets () {
- createChildGroup ();
- code = new Button (controlGroup, SWT.PUSH);
- code.setText (LayoutExample.getResourceString ("Code"));
- GridData gridData = new GridData (GridData.HORIZONTAL_ALIGN_CENTER | GridData.GRAB_HORIZONTAL);
- gridData.horizontalSpan = 2;
- code.setLayoutData (gridData);
- code.addSelectionListener (new SelectionAdapter () {
- public void widgetSelected (SelectionEvent e) {
- final Shell shell = new Shell ();
- shell.setText (LayoutExample.getResourceString ("Generated_Code"));
- shell.setLayout (new FillLayout ());
- final StyledText text = new StyledText (shell, SWT.BORDER | SWT.MULTI | SWT.V_SCROLL | SWT.H_SCROLL);
- String layoutCode = generateCode ().toString ();
- if (layoutCode.length () == 0) return;
- text.setText (layoutCode);
-
- Menu bar = new Menu (shell, SWT.BAR);
- shell.setMenuBar (bar);
- MenuItem editItem = new MenuItem (bar, SWT.CASCADE);
- editItem.setText (LayoutExample.getResourceString ("Edit"));
- Menu menu = new Menu (bar);
- MenuItem select = new MenuItem (menu, SWT.PUSH);
- select.setText (LayoutExample.getResourceString ("Select_All"));
- select.setAccelerator (SWT.MOD1 + 'A');
- select.addSelectionListener (new SelectionAdapter () {
- public void widgetSelected (SelectionEvent e) {
- text.selectAll ();
- }
- });
- MenuItem copy = new MenuItem (menu, SWT.PUSH);
- copy.setText (LayoutExample.getResourceString ("Copy"));
- copy.setAccelerator (SWT.MOD1 + 'C');
- copy.addSelectionListener (new SelectionAdapter () {
- public void widgetSelected (SelectionEvent e) {
- text.copy ();
- }
- });
- MenuItem exit = new MenuItem (menu, SWT.PUSH);
- exit.setText (LayoutExample.getResourceString ("Exit"));
- exit.addSelectionListener (new SelectionAdapter () {
- public void widgetSelected (SelectionEvent e) {
- shell.close ();
- }
- });
- editItem.setMenu (menu);
-
- shell.pack ();
- shell.setSize (400, 500);
- shell.open ();
- Display display = shell.getDisplay ();
- while (!shell.isDisposed ())
- if (!display.readAndDispatch ()) display.sleep ();
- }
- });
- }
-
- /**
- * Creates the example layout.
- * Subclasses override this method.
- */
- void createLayout () {
- }
-
- /**
- * Creates the composite that contains the example layout.
- */
- void createLayoutComposite () {
- layoutComposite = new Composite (layoutGroup, SWT.BORDER);
- layoutComposite.setLayoutData (new GridData (GridData.FILL_BOTH));
- createLayout ();
- }
-
- /**
- * Creates the layout group. This is the group on the
- * left half of each example tab.
- */
- void createLayoutGroup () {
- layoutGroup = new Group (sash, SWT.NONE);
- layoutGroup.setText (LayoutExample.getResourceString("Layout"));
- layoutGroup.setLayout (new GridLayout ());
- createLayoutComposite ();
- }
-
- /**
- * Creates the tab folder page.
- *
- * @param tabFolder org.eclipse.swt.widgets.TabFolder
- * @return the new page for the tab folder
- */
- Composite createTabFolderPage (TabFolder tabFolder) {
- /* Create a two column page with a SashForm*/
- tabFolderPage = new Composite (tabFolder, SWT.NULL);
- tabFolderPage.setLayout (new FillLayout ());
- sash = new SashForm (tabFolderPage, SWT.HORIZONTAL);
-
- /* Create the "layout" and "control" columns */
- createLayoutGroup ();
- createControlGroup ();
-
- return tabFolderPage;
- }
-
- /**
- * Creates the TableEditor with a Text in the given column
- * of the table.
- */
- void createTextEditor (Text text, TableEditor textEditor, int column) {
- text.setFont (table.getFont ());
- text.selectAll ();
- textEditor.horizontalAlignment = SWT.LEFT;
- textEditor.grabHorizontal = true;
- textEditor.setEditor (text, newItem, column);
-
- text.addTraverseListener(new TraverseListener() {
- public void keyTraversed(TraverseEvent e) {
- if (e.detail == SWT.TRAVERSE_TAB_NEXT) {
- resetEditors (true);
- }
- if (e.detail == SWT.TRAVERSE_ESCAPE) {
- disposeEditors ();
- }
- }
- });
- }
-
- /**
- * Disposes the editors without placing their contents
- * into the table.
- * Subclasses override this method.
- */
- void disposeEditors () {
- }
-
- /**
- * Generates the code needed to produce the example layout.
- */
- StringBuffer generateCode () {
- /* Make sure all information being entered is stored in the table */
- resetEditors ();
-
- /* Get names for controls in the layout */
- names = new String [children.length];
- for (int i = 0; i < children.length; i++) {
- Control control = children [i];
- String controlClass = control.getClass ().toString ();
- String controlType = controlClass.substring (controlClass.lastIndexOf ('.') + 1);
- names [i] = controlType.toLowerCase () + i;
- }
-
- /* Create StringBuffer containing the code */
- StringBuffer code = new StringBuffer ();
- code.append ("import org.eclipse.swt.*;\n");
- code.append ("import org.eclipse.swt.custom.*;\n");
- code.append ("import org.eclipse.swt.graphics.*;\n");
- code.append ("import org.eclipse.swt.layout.*;\n");
- code.append ("import org.eclipse.swt.widgets.*;\n\n");
- code.append ("public class MyLayout {\n");
- code.append ("\tpublic static void main (String [] args) {\n");
- code.append ("\t\tDisplay display = new Display ();\n");
- code.append ("\t\tShell shell = new Shell (display);\n");
-
- /* Get layout specific code */
- code.append (generateLayoutCode ());
-
- code.append ("\n\t\tshell.pack ();\n\t\tshell.open ();\n\n");
- code.append ("\t\twhile (!shell.isDisposed ()) {\n");
- code.append ("\t\t\tif (!display.readAndDispatch ())\n");
- code.append ("\t\t\t\tdisplay.sleep ();\n\t\t}\n\t\tdisplay.dispose ();\n\t}\n}");
-
- return code;
- }
-
- /**
- * Generates layout specific code for the example layout.
- * Subclasses override this method.
- */
- StringBuffer generateLayoutCode () {
- return new StringBuffer ();
- }
-
- /**
- * Returns the StringBuffer for the code which will
- * create a child control.
- */
- StringBuffer getChildCode (Control control, int i) {
- StringBuffer code = new StringBuffer ();
- /* Find the type of control */
- String controlClass = control.getClass().toString ();
- String controlType = controlClass.substring (controlClass.lastIndexOf ('.') + 1);
- /* Find the style of the control */
- String styleString;
- if (controlType.equals ("Button")) {
- styleString = "SWT.PUSH";
- } else if (controlType.equals ("Text")) {
- styleString = "SWT.BORDER";
- } else if (controlType.equals ("StyledText")) {
- styleString = "SWT.MULTI | SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL";
- } else if (controlType.equals ("Canvas") || controlType.equals ("Composite") ||
- controlType.equals ("Table") || controlType.equals ("StyledText") ||
- controlType.equals ("ToolBar") || controlType.equals ("Tree") ||
- controlType.equals ("List")) {
- styleString = "SWT.BORDER";
- } else styleString = "SWT.NONE";
- /* Write out the control being declared */
- code.append ("\n\t\t" + controlType + " " + names [i] +
- " = new " + controlType + " (shell, " + styleString + ");\n");
- /* Add items to those controls that need items */
- if (controlType.equals ("Combo") || controlType.equals ("List")) {
- code.append ("\t\t" + names [i] + ".setItems (new String [] {\"Item 1\", \"Item 2\", \"Item 2\"});\n");
- } else if (controlType.equals ("Table")) {
- code.append ("\t\t" + names [i] + ".setLinesVisible (true);\n");
- for (int j = 1; j < 3; j++) {
- code.append ("\t\tTableItem tableItem" + j + " = new TableItem (" + names [i] + ", SWT.NONE);\n");
- code.append ("\t\ttableItem" + j + ".setText (\"Item" + j + "\");\n");
- }
- } else if (controlType.equals ("Tree")) {
- for (int j = 1; j < 3; j++) {
- code.append ("\t\tTreeItem treeItem" + j + " = new TreeItem (" + names [i] + ", SWT.NONE);\n");
- code.append ("\t\ttreeItem" + j + ".setText (\"Item" + j + "\");\n");
- }
- } else if (controlType.equals ("ToolBar")) {
- for (int j = 1; j < 3; j++) {
- code.append ("\t\tToolItem toolItem" + j + " = new ToolItem (" + names [i] + ", SWT.NONE);\n");
- code.append ("\t\ttoolItem" + j + ".setText (\"Item" + j + "\");\n");
- }
- } else if (controlType.equals ("CoolBar")) {
- code.append ("\t\tToolBar coolToolBar = new ToolBar (" + names [i] + ", SWT.BORDER);\n");
- code.append ("\t\tToolItem coolToolItem = new ToolItem (coolToolBar, SWT.NONE);\n");
- code.append ("\t\tcoolToolItem.setText (\"Item 1\");\n");
- code.append ("\t\tcoolToolItem = new ToolItem (coolToolBar, SWT.NONE);\n");
- code.append ("\t\tcoolToolItem.setText (\"Item 2\");\n");
- code.append ("\t\tCoolItem coolItem1 = new CoolItem (" + names [i] + ", SWT.NONE);\n");
- code.append ("\t\tcoolItem1.setControl (coolToolBar);\n");
- code.append ("\t\tPoint size = coolToolBar.computeSize (SWT.DEFAULT, SWT.DEFAULT);\n");
- code.append ("\t\tcoolItem1.setSize (coolItem1.computeSize (size.x, size.y));\n");
- code.append ("\t\tcoolToolBar = new ToolBar (" + names [i] + ", SWT.BORDER);\n");
- code.append ("\t\tcoolToolItem = new ToolItem (coolToolBar, SWT.NONE);\n");
- code.append ("\t\tcoolToolItem.setText (\"Item 3\");\n");
- code.append ("\t\tcoolToolItem = new ToolItem (coolToolBar, SWT.NONE);\n");
- code.append ("\t\tcoolToolItem.setText (\"Item 4\");\n");
- code.append ("\t\tCoolItem coolItem2 = new CoolItem (" + names [i] + ", SWT.NONE);\n");
- code.append ("\t\tcoolItem2.setControl (coolToolBar);\n");
- code.append ("\t\tsize = coolToolBar.computeSize (SWT.DEFAULT, SWT.DEFAULT);\n");
- code.append ("\t\tcoolItem2.setSize (coolItem2.computeSize (size.x, size.y));\n");
- code.append ("\t\t" + names [i] + ".setSize (" + names [i] + ".computeSize (SWT.DEFAULT, SWT.DEFAULT));\n");
- } else if (controlType.equals ("ProgressBar")) {
- code.append ("\t\t" + names [i] + ".setSelection (50);\n");
- }
- /* Set text for those controls that support it */
- if (controlType.equals ("Button") ||
- controlType.equals ("Combo") ||
- controlType.equals ("Group") ||
- controlType.equals ("Label") ||
- controlType.equals ("StyledText") ||
- controlType.equals ("Text")) {
- code.append ("\t\t" + names [i] + ".setText (\"" + names [i] + "\");\n");
- }
- return code;
- }
-
- /**
- * Returns the layout data field names.
- * Subclasses override this method.
- */
- String [] getLayoutDataFieldNames () {
- return new String [] {};
- }
-
- /**
- * Gets the text for the tab folder item.
- * Subclasses override this method.
- */
- String getTabText () {
- return "";
- }
-
- /**
- * Refreshes the composite and draws all controls
- * in the layout example.
- */
- void refreshLayoutComposite () {
- /* Remove children that are already layed out */
- children = layoutComposite.getChildren ();
- for (int i = 0; i < children.length; i++) {
- children [i].dispose ();
- }
- /* Add all children listed in the table */
- TableItem [] items = table.getItems ();
- children = new Control [items.length];
- String [] itemValues = new String [] {
- LayoutExample.getResourceString ("Item",new String [] {"1"}),
- LayoutExample.getResourceString ("Item",new String [] {"2"}),
- LayoutExample.getResourceString ("Item",new String [] {"3"})};
- for (int i = 0; i < items.length; i++) {
- String control = items [i].getText (1);
- if (control.equals ("Button")) {
- Button button = new Button (layoutComposite, SWT.PUSH);
- button.setText (LayoutExample.getResourceString ("Button_Index", new String [] {new Integer (i).toString ()}));
- children [i] = button;
- } else if (control.equals ("Canvas")) {
- Canvas canvas = new Canvas (layoutComposite, SWT.BORDER);
- children [i] = canvas;
- } else if (control.equals ("Combo")) {
- Combo combo = new Combo (layoutComposite, SWT.NONE);
- combo.setItems (itemValues);
- combo.setText (LayoutExample.getResourceString ("Combo_Index", new String [] {new Integer (i).toString ()}));
- children [i] = combo;
- } else if (control.equals ("Composite")) {
- Composite composite = new Composite (layoutComposite, SWT.BORDER);
- children [i] = composite;
- } else if (control.equals ("CoolBar")) {
- CoolBar coolBar = new CoolBar (layoutComposite, SWT.NONE);
- ToolBar toolBar = new ToolBar (coolBar, SWT.BORDER);
- ToolItem item = new ToolItem (toolBar, 0);
- item.setText (LayoutExample.getResourceString ("Item",new String [] {"1"}));
- item = new ToolItem (toolBar, 0);
- item.setText (LayoutExample.getResourceString ("Item",new String [] {"2"}));
- CoolItem coolItem1 = new CoolItem (coolBar, 0);
- coolItem1.setControl (toolBar);
- toolBar = new ToolBar (coolBar, SWT.BORDER);
- item = new ToolItem (toolBar, 0);
- item.setText (LayoutExample.getResourceString ("Item",new String [] {"3"}));
- item = new ToolItem (toolBar, 0);
- item.setText (LayoutExample.getResourceString ("Item",new String [] {"4"}));
- CoolItem coolItem2 = new CoolItem (coolBar, 0);
- coolItem2.setControl (toolBar);
- Point size = toolBar.computeSize(SWT.DEFAULT, SWT.DEFAULT);
- coolItem1.setSize(coolItem1.computeSize (size.x, size.y));
- coolItem2.setSize(coolItem2.computeSize (size.x, size.y));
- coolBar.setSize(coolBar.computeSize(SWT.DEFAULT, SWT.DEFAULT));
- children [i] = coolBar;
- } else if (control.equals ("Group")) {
- Group group = new Group (layoutComposite, SWT.NONE);
- group.setText (LayoutExample.getResourceString ("Group_Index", new String [] {new Integer (i).toString ()}));
- children [i] = group;
- } else if (control.equals ("Label")) {
- Label label = new Label (layoutComposite, SWT.NONE);
- label.setText (LayoutExample.getResourceString ("Label_Index", new String [] {new Integer (i).toString ()}));
- children [i] = label;
- } else if (control.equals ("List")) {
- List list = new List (layoutComposite, SWT.BORDER);
- list.setItems (itemValues);
- children [i] = list;
- } else if (control.equals ("ProgressBar")) {
- ProgressBar progress = new ProgressBar (layoutComposite, SWT.NONE);
- progress.setSelection (50);
- children [i] = progress;
- } else if (control.equals ("Scale")) {
- Scale scale = new Scale (layoutComposite, SWT.NONE);
- children [i] = scale;
- } else if (control.equals ("Slider")) {
- Slider slider = new Slider (layoutComposite, SWT.NONE);
- children [i] = slider;
- } else if (control.equals ("StyledText")) {
- StyledText styledText = new StyledText (layoutComposite, SWT.MULTI | SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);
- styledText.setText (LayoutExample.getResourceString ("StyledText_Index", new String [] {new Integer (i).toString ()}));
- children [i] = styledText;
- } else if (control.equals ("Table")) {
- Table table = new Table (layoutComposite, SWT.BORDER);
- table.setLinesVisible (true);
- TableItem item1 = new TableItem (table, 0);
- item1.setText (LayoutExample.getResourceString ("Item",new String [] {"1"}));
- TableItem item2 = new TableItem (table, 0);
- item2.setText (LayoutExample.getResourceString ("Item",new String [] {"2"}));
- children [i] = table;
- } else if (control.equals ("Text")) {
- Text text = new Text (layoutComposite, SWT.BORDER);
- text.setText (LayoutExample.getResourceString ("Text_Index", new String [] {new Integer (i).toString ()}));
- children [i] = text;
- } else if (control.equals ("ToolBar")) {
- ToolBar toolBar = new ToolBar (layoutComposite, SWT.BORDER);
- ToolItem item1 = new ToolItem (toolBar, 0);
- item1.setText (LayoutExample.getResourceString ("Item",new String [] {"1"}));
- ToolItem item2 = new ToolItem (toolBar, 0);
- item2.setText (LayoutExample.getResourceString ("Item",new String [] {"2"}));
- children [i] = toolBar;
- } else {
- Tree tree = new Tree (layoutComposite, SWT.BORDER);
- TreeItem item1 = new TreeItem (tree, 0);
- item1.setText (LayoutExample.getResourceString ("Item",new String [] {"1"}));
- TreeItem item2 = new TreeItem (tree, 0);
- item2.setText (LayoutExample.getResourceString ("Item",new String [] {"2"}));
- children [i] = tree;
- }
- }
- }
-
- /**
- * Takes information from TableEditors and stores it.
- * Subclasses override this method.
- */
- void resetEditors () {
- resetEditors (false);
- }
-
- void resetEditors (boolean tab) {
- }
-
- /**
- * Sets the layout data for the children of the layout.
- * Subclasses override this method.
- */
- void setLayoutData () {
- }
-
- /**
- * Sets the state of the layout.
- * Subclasses override this method.
- */
- void setLayoutState () {
- }
-}
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/Images.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/Images.java
deleted file mode 100755
index fbab24c23b..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/Images.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.texteditor;
-
-
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.widgets.*;
-
-public class Images {
-
- // Bitmap Images
- public Image Bold;
- public Image Red;
- public Image Green;
- public Image Blue;
- public Image Erase;
-
- Image [] AllBitmaps;
-
-Images () {
-}
-
-public void freeAll () {
- for (int i=0; i<AllBitmaps.length; i++) AllBitmaps [i].dispose ();
- AllBitmaps = null;
-}
-
-Image createBitmapImage(Display display, String fileName) {
- ImageData source = new ImageData(Images.class.getResourceAsStream(fileName+".bmp"));
- ImageData mask = new ImageData(Images.class.getResourceAsStream(fileName+"_mask"+".bmp"));
- return new Image (display, source, mask);
-}
-
-public void loadAll (Display display) {
- // Bitmap Images
- Bold = createBitmapImage (display, "bold");
- Red = createBitmapImage (display, "red");
- Green = createBitmapImage (display, "green");
- Blue = createBitmapImage (display, "blue");
- Erase = createBitmapImage (display, "erase");
-
- AllBitmaps = new Image [] {
- Bold,
- Red,
- Green,
- Blue,
- Erase,
- };
-}
-}
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/TextEditor.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/TextEditor.java
deleted file mode 100755
index 1e55871502..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/TextEditor.java
+++ /dev/null
@@ -1,348 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.texteditor;
-
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.custom.*;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-import java.util.*;
-
-/**
- */
-public class TextEditor {
- Shell shell;
- ToolBar toolBar;
- StyledText text;
-
- Images images = new Images();
- Vector cachedStyles = new Vector();
- Color RED = null;
- Color BLUE = null;
- Color GREEN = null;
- Font font = null;
-
- boolean isBold = false;
-
- ExtendedModifyListener extendedModifyListener;
- static ResourceBundle resources = ResourceBundle.getBundle("examples_texteditor");
-
-Menu createEditMenu() {
- Menu bar = shell.getMenuBar ();
- Menu menu = new Menu (bar);
-
- MenuItem item = new MenuItem (menu, SWT.PUSH);
- item.setText (resources.getString("Cut_menuitem"));
- item.setAccelerator(SWT.MOD1 + 'X');
- item.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent event) {
- handleCutCopy();
- text.cut();
- }
- });
-
- item = new MenuItem (menu, SWT.PUSH);
- item.setText (resources.getString("Copy_menuitem"));
- item.setAccelerator(SWT.MOD1 + 'C');
- item.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent event) {
- handleCutCopy();
- text.copy();
- }
- });
-
- item = new MenuItem (menu, SWT.PUSH);
- item.setText (resources.getString("Paste_menuitem"));
- item.setAccelerator(SWT.MOD1 + 'V');
- item.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent event) {
- text.paste();
- }
- });
-
- new MenuItem (menu, SWT.SEPARATOR);
-
- item = new MenuItem (menu, SWT.PUSH);
- item.setText (resources.getString("Font_menuitem"));
- item.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent event) {
- setFont();
- }
- });
- return menu;
-}
-
-Menu createFileMenu() {
- Menu bar = shell.getMenuBar ();
- Menu menu = new Menu (bar);
-
- MenuItem item = new MenuItem (menu, SWT.PUSH);
- item.setText (resources.getString("Exit_menuitem"));
- item.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent event) {
- shell.close ();
- }
- });
-
- return menu;
-}
-
-/*
- * Set the text state to bold.
- */
-void bold(boolean bold) {
- isBold = bold;
- Point sel = text.getSelectionRange();
- if ((sel != null) && (sel.y != 0)) {
- StyleRange style;
- int fontStyle = SWT.NORMAL;
- if (isBold) fontStyle = SWT.BOLD;
- style = new StyleRange(sel.x, sel.y, null, null, fontStyle);
- text.setStyleRange(style);
- }
- text.setSelectionRange(sel.x + sel.y, 0);
-}
-/*
- * Clear all style data for the selected text.
- */
-void clear() {
- Point sel = text.getSelectionRange();
- if ((sel != null) && (sel.y != 0)) {
- StyleRange style;
- style = new StyleRange(sel.x, sel.y, null, null, SWT.NORMAL);
- text.setStyleRange(style);
- }
- text.setSelectionRange(sel.x + sel.y, 0);
-}
-/*
- * Set the foreground color for the selected text.
- */
-void fgColor(int color) {
- Point sel = text.getSelectionRange();
- if ((sel == null) || (sel.y == 0)) return;
- Color fg;
- if (color == SWT.COLOR_RED) {
- fg = RED;
- } else if (color == SWT.COLOR_GREEN) {
- fg = GREEN;
- } else if (color == SWT.COLOR_BLUE) {
- fg = BLUE;
- } else {
- fg = null;
- }
- StyleRange style;
- for (int i = sel.x; i<sel.x+sel.y; i++) {
- StyleRange range = text.getStyleRangeAtOffset(i);
- if (range == null) {style = new StyleRange(i, 1, fg, null, SWT.NORMAL);}
- else {style = new StyleRange(i, 1, fg, null, range.fontStyle);};
- text.setStyleRange(style);
- }
- text.setSelectionRange(sel.x + sel.y, 0);
-}
-void createMenuBar () {
- Menu bar = new Menu (shell, SWT.BAR);
- shell.setMenuBar (bar);
-
- MenuItem fileItem = new MenuItem (bar, SWT.CASCADE);
- fileItem.setText (resources.getString("File_menuitem"));
- fileItem.setMenu (createFileMenu ());
-
- MenuItem editItem = new MenuItem (bar, SWT.CASCADE);
- editItem.setText (resources.getString("Edit_menuitem"));
- editItem.setMenu (createEditMenu ());
-}
-
-void createShell (Display display) {
- shell = new Shell (display);
- shell.setText (resources.getString("Window_title"));
- images.loadAll (display);
- GridLayout layout = new GridLayout();
- layout.numColumns = 1;
- shell.setLayout(layout);
- shell.addDisposeListener (new DisposeListener () {
- public void widgetDisposed (DisposeEvent e) {
- if (font != null) font.dispose();
- images.freeAll ();
- RED.dispose();
- GREEN.dispose();
- BLUE.dispose();
- }
- });
-}
-void createStyledText() {
- initializeColors();
- text = new StyledText (shell, SWT.BORDER | SWT.MULTI | SWT.V_SCROLL | SWT.H_SCROLL);
- GridData spec = new GridData();
- spec.horizontalAlignment = GridData.FILL;
- spec.grabExcessHorizontalSpace = true;
- spec.verticalAlignment = GridData.FILL;
- spec.grabExcessVerticalSpace = true;
- text.setLayoutData(spec);
- extendedModifyListener = new ExtendedModifyListener() {
- public void modifyText(ExtendedModifyEvent e) {
- handleExtendedModify(e);
- }
- };
- text.addExtendedModifyListener(extendedModifyListener);
-}
-
-void createToolBar() {
- toolBar = new ToolBar(shell, SWT.NULL);
-
- ToolItem item = new ToolItem(toolBar, SWT.CHECK);
- item.setImage(images.Bold);
- item.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent event) {
- bold(((ToolItem)event.widget).getSelection());
- }
- });
-
- item = new ToolItem(toolBar, SWT.SEPARATOR);
-
- item = new ToolItem(toolBar, SWT.PUSH);
- item.setImage(images.Red);
- item.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent event) {
- fgColor(SWT.COLOR_RED);
- }
- });
- item = new ToolItem(toolBar, SWT.PUSH);
- item.setImage(images.Green);
- item.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent event) {
- fgColor(SWT.COLOR_GREEN);
- }
- });
- item = new ToolItem(toolBar, SWT.PUSH);
- item.setImage(images.Blue);
- item.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent event) {
- fgColor(SWT.COLOR_BLUE);
- }
- });
-
- item = new ToolItem(toolBar, SWT.SEPARATOR);
-
- item = new ToolItem(toolBar, SWT.PUSH);
- item.setImage(images.Erase);
- item.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent event) {
- clear();
- }
- });
-}
-void displayError(String msg) {
- MessageBox box = new MessageBox(shell, SWT.ICON_ERROR);
- box.setMessage(msg);
- box.open();
-}
-/*
- * Cache the style information for text that has been cut or copied.
- */
-void handleCutCopy() {
- // Save the cut/copied style info so that during paste we will maintain
- // the style information. Cut/copied text is put in the clipboard in
- // RTF format, but is not pasted in RTF format. The other way to
- // handle the pasting of styles would be to access the Clipboard directly and
- // parse the RTF text.
- cachedStyles = new Vector();
- Point sel = text.getSelectionRange();
- int startX = sel.x;
- for (int i=sel.x; i<=sel.x+sel.y-1; i++) {
- StyleRange style = text.getStyleRangeAtOffset(i);
- if (style != null) {
- style.start = style.start - startX;
- if (!cachedStyles.isEmpty()) {
- StyleRange lastStyle = (StyleRange)cachedStyles.lastElement();
- if (lastStyle.similarTo(style) && lastStyle.start + lastStyle.length == style.start) {
- lastStyle.length++;
- } else {
- cachedStyles.addElement(style);
- }
- } else {
- cachedStyles.addElement(style);
- }
- }
- }
-}
-void handleExtendedModify(ExtendedModifyEvent event) {
- if (event.length == 0) return;
- StyleRange style;
- if (event.length == 1 || text.getTextRange(event.start, event.length).equals(text.getLineDelimiter())) {
- // Have the new text take on the style of the text to its right (during
- // typing) if no style information is active.
- int caretOffset = text.getCaretOffset();
- style = null;
- if (caretOffset < text.getCharCount()) style = text.getStyleRangeAtOffset(caretOffset);
- if (style != null) {
- style.start = event.start;
- style.length = event.length;
- int fontStyle = SWT.NORMAL;
- if (isBold) fontStyle = SWT.BOLD;
- style.fontStyle = fontStyle;
- text.setStyleRange(style);
- } else if (isBold) {
- StyleRange newStyle = new StyleRange(event.start, event.length, null, null, SWT.BOLD);
- text.setStyleRange(newStyle);
- }
- } else {
- // paste occurring, have text take on the styles it had when it was
- // cut/copied
- for (int i=0; i<cachedStyles.size(); i++) {
- style = (StyleRange)cachedStyles.elementAt(i);
- StyleRange newStyle = (StyleRange)style.clone();
- newStyle.start = style.start + event.start;
- text.setStyleRange(newStyle);
- }
- }
-}
-
-public static void main (String [] args) {
- Display display = new Display ();
- TextEditor example = new TextEditor ();
- Shell shell = example.open (display);
- while (!shell.isDisposed ())
- if (!display.readAndDispatch ()) display.sleep ();
- display.dispose ();
-}
-
-public Shell open (Display display) {
- createShell (display);
- createMenuBar ();
- createToolBar ();
- createStyledText ();
- shell.setSize(500, 300);
- shell.open ();
- return shell;
-}
-
-void setFont() {
- FontDialog fontDialog = new FontDialog(shell);
- fontDialog.setFontList((text.getFont()).getFontData());
- FontData fontData = fontDialog.open();
- if(fontData != null) {
- if(font != null)
- font.dispose();
- font = new Font(shell.getDisplay(), fontData);
- text.setFont(font);
- }
-}
-
-void initializeColors() {
- Display display = Display.getDefault();
- RED = new Color (display, new RGB(255,0,0));
- BLUE = new Color (display, new RGB(0,0,255));
- GREEN = new Color (display, new RGB(0,255,0));
-}
-}
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/blue.bmp b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/blue.bmp
deleted file mode 100755
index 84c7ac9a46..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/blue.bmp
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/blue_mask.bmp b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/blue_mask.bmp
deleted file mode 100755
index 6ce92645e5..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/blue_mask.bmp
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/bold.bmp b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/bold.bmp
deleted file mode 100755
index a3184bb26c..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/bold.bmp
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/bold_mask.bmp b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/bold_mask.bmp
deleted file mode 100755
index 382751efa3..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/bold_mask.bmp
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/erase.bmp b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/erase.bmp
deleted file mode 100755
index 1d2ace7ee3..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/erase.bmp
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/erase_mask.bmp b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/erase_mask.bmp
deleted file mode 100755
index f6ab21e471..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/erase_mask.bmp
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/green.bmp b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/green.bmp
deleted file mode 100755
index cca023fd57..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/green.bmp
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/green_mask.bmp b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/green_mask.bmp
deleted file mode 100755
index 6ce92645e5..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/green_mask.bmp
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/red.bmp b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/red.bmp
deleted file mode 100755
index 88c63be336..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/red.bmp
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/red_mask.bmp b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/red_mask.bmp
deleted file mode 100755
index 6ce92645e5..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/red_mask.bmp
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.opengl.examples/.classpath b/examples/org.eclipse.swt.opengl.examples/.classpath
deleted file mode 100644
index 8437e3bb55..0000000000
--- a/examples/org.eclipse.swt.opengl.examples/.classpath
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="src" path="/org.eclipse.swt.opengl"/>
- <classpathentry kind="src" path="/org.eclipse.swt"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/examples/org.eclipse.swt.opengl.examples/.project b/examples/org.eclipse.swt.opengl.examples/.project
deleted file mode 100644
index 9112e8e738..0000000000
--- a/examples/org.eclipse.swt.opengl.examples/.project
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.swt.opengl.examples</name>
- <comment></comment>
- <projects>
- <project>org.eclipse.swt</project>
- <project>org.eclipse.swt.opengl</project>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/AntialiasingTab.java b/examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/AntialiasingTab.java
deleted file mode 100644
index 78a1fbb4a9..0000000000
--- a/examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/AntialiasingTab.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.opengl.examples;
-
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.graphics.RGB;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.opengl.*;
-import org.eclipse.swt.widgets.*;
-
-class AntialiasingTab extends OpenGLTab {
- private Button antiAliasButton;
- private float xPos = 0.0f, yPos = 0.0f, zPos = -6.0f;
-
- /**
- * @see OpenGLTab#createControls(Composite)
- */
- void createControls(Composite composite) {
- Group movementGroup = new Group(composite, SWT.NONE);
- movementGroup.setText("Translation");
- movementGroup.setLayout(new GridLayout(2, false));
-
- new Label(movementGroup, SWT.NONE).setText("X:");
- final Slider xMove = new Slider(movementGroup, SWT.NONE);
- xMove.setIncrement(1);
- xMove.setMaximum(12);
- xMove.setMinimum(0);
- xMove.setThumb(2);
- xMove.setPageIncrement(2);
- xMove.setSelection(5);
- xMove.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- xPos = xMove.getSelection() - 5;
- }
- });
-
- new Label(movementGroup, SWT.NONE).setText("Y:");
- final Slider yMove = new Slider(movementGroup, SWT.NONE);
- yMove.setIncrement(1);
- yMove.setMaximum(12);
- yMove.setMinimum(0);
- yMove.setThumb(2);
- yMove.setPageIncrement(2);
- yMove.setSelection(5);
- yMove.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- yPos = yMove.getSelection() - 5;
- }
- });
-
- new Label(movementGroup, SWT.NONE).setText("Z:");
- final Slider zMove = new Slider(movementGroup, SWT.NONE);
- zMove.setIncrement(1);
- zMove.setMaximum(12);
- zMove.setMinimum(0);
- zMove.setThumb(2);
- zMove.setPageIncrement(2);
- zMove.setSelection(5);
- zMove.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- zPos = zMove.getSelection() - 11;
- }
- });
-
- antiAliasButton = new Button(composite, SWT.CHECK);
- antiAliasButton.setText("Anti-Aliasing");
- antiAliasButton.setSelection(true);
- antiAliasButton.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- if (antiAliasButton.getSelection()) {
- GL.glEnable(GL.GL_LINE_SMOOTH);
- } else {
- GL.glDisable(GL.GL_LINE_SMOOTH);
- }
- }
- });
-
- ColorSelectionGroup colorGroup =
- new ColorSelectionGroup(composite, SWT.NONE);
- colorGroup.setText("Foreground color");
- colorGroup.addColorSelectionListener(new IColorSelectionListener() {
- public void handleColorSelection(RGB rgb) {
- GL.glColor3ub((byte) rgb.red, (byte) rgb.green, (byte) rgb.blue);
- }
- });
- }
-
- /**
- * @see OpenGLTab#dispose()
- */
- void dispose() {
- super.dispose();
- GL.glDeleteLists(1, 1);
- }
-
- /**
- * @see OpenGLTab#getTabText()
- */
- String getTabText() {
- return "Anti-aliasing";
- }
-
- /**
- * @see OpenGLTab#init()
- */
- void init() {
- GL.glClearColor(1.0f, 1.0f, 1.0f, 1.0f);
- GL.glColor3f(1.0f, 0.0f, 0.0f);
- final float[] BEZIER_POINTS = {
- -1.5f, -1.5f, 4.0f, -0.5f, -1.5f, 2.0f, 0.5f, -1.5f,
- -1.0f, 1.5f, -1.5f, 2.0f, -1.5f, -0.5f, 1.0f, -0.5f,
- -0.5f, 3.0f, 0.5f, -0.5f, 0.0f, 1.5f, -0.5f, -1.0f,
- -1.5f, 0.5f, 4.0f, -0.5f, 0.5f, 0.0f, 0.5f, 0.5f,
- 3.0f, 1.5f, 0.5f, 4.0f, -1.5f, 1.5f, -2.0f, -0.5f,
- 1.5f, -2.0f, 0.5f, 1.5f, 0.0f, 1.5f, 1.5f, -1.0f,
- };
- GL.glHint(GL.GL_LINE_SMOOTH_HINT, GL.GL_NICEST);
- GL.glBlendFunc(GL.GL_SRC_ALPHA, GL.GL_ONE_MINUS_SRC_ALPHA);
- GL.glMap2f(GL.GL_MAP2_VERTEX_3, 0, 1, 3, 4, 0, 1, 12, 4, BEZIER_POINTS);
- GL.glMapGrid2f(30, 0.0f, 1.0f, 30, 0.0f, 1.0f);
-
- GL.glEnable(GL.GL_AUTO_NORMAL);
- GL.glEnable(GL.GL_LINE_SMOOTH);
- GL.glEnable(GL.GL_LINE_STIPPLE);
- GL.glEnable(GL.GL_BLEND);
- GL.glEnable(GL.GL_MAP2_VERTEX_3);
-
- // create display lists
- GL.glNewList(1, GL.GL_COMPILE);
- GL.glEvalMesh2(GL.GL_LINE, 0, 30, 0, 30);
- GL.glEndList();
- }
-
- /**
- * @see OpenGLTab#renderScene()
- */
- void renderScene() {
- GL.glClear(GL.GL_COLOR_BUFFER_BIT);
- GL.glLoadIdentity();
- GL.glTranslatef(xPos, yPos, zPos);
- GL.glCallList(1); // draw the beizer surface
- }
-}
diff --git a/examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/AreaTab.java b/examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/AreaTab.java
deleted file mode 100644
index 5c6ffab751..0000000000
--- a/examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/AreaTab.java
+++ /dev/null
@@ -1,434 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.opengl.examples;
-
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.opengl.*;
-import org.eclipse.swt.widgets.*;
-
-class AreaTab extends OpenGLTab {
- abstract class Shape {
- abstract void draw();
- }
- class State {
- private String name;
- private int index;
- /**
- * Constructor.
- *
- * @param name the display name of this state
- * @param index the display list index corresponding to this state
- */
- State (String name, int index) {
- super();
- this.index = index;
- this.name = name;
- }
- void display() {
- GL.glCallList(index);
- }
- void dispose() {
- GL.glDeleteLists(index, 1);
- }
- String getName() {
- return name;
- }
- }
-
- private State[] states;
- private State currentState;
- private float xPos = 0.0f, yPos = 0.0f, zPos = -30.0f;
- private float xRot = 90.0f, yRot = 0.0f, zRot = 0.0f;
- private int quadratic, disk;
-
- /**
- * @see OpenGLTab#createControls(Composite)
- */
- void createControls(Composite composite) {
- Group movementGroup = new Group(composite, SWT.NONE);
- movementGroup.setText("Translation");
- movementGroup.setLayout(new GridLayout(2, false));
-
- new Label(movementGroup, SWT.NONE).setText("X:");
- final Slider xMove = new Slider(movementGroup, SWT.NONE);
- xMove.setIncrement(1);
- xMove.setMaximum(22);
- xMove.setMinimum(0);
- xMove.setThumb(2);
- xMove.setPageIncrement(2);
- xMove.setSelection(10);
- xMove.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- xPos = xMove.getSelection() - 10;
- }
- });
-
- new Label(movementGroup, SWT.NONE).setText("Y:");
- final Slider yMove = new Slider(movementGroup, SWT.NONE);
- yMove.setIncrement(1);
- yMove.setMaximum(22);
- yMove.setMinimum(0);
- yMove.setThumb(2);
- yMove.setPageIncrement(2);
- yMove.setSelection(10);
- yMove.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- yPos = yMove.getSelection() - 10;
- }
- });
-
- new Label(movementGroup, SWT.NONE).setText("Z:");
- final Slider zMove = new Slider(movementGroup, SWT.NONE);
- zMove.setIncrement(1);
- zMove.setMaximum(22);
- zMove.setMinimum(0);
- zMove.setThumb(2);
- zMove.setPageIncrement(2);
- zMove.setSelection(10);
- zMove.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- zPos = zMove.getSelection() - 40;
- }
- });
-
- Group rotationGroup = new Group(composite, SWT.NONE);
- rotationGroup.setText("Rotation");
- rotationGroup.setLayout(new GridLayout(2, false));
-
- new Label(rotationGroup, SWT.NONE).setText("X:");
- final Slider xRotation = new Slider(rotationGroup, SWT.NONE);
- xRotation.setIncrement(10);
- xRotation.setMaximum(362);
- xRotation.setMinimum(0);
- xRotation.setThumb(2);
- xRotation.setPageIncrement(20);
- xRotation.setSelection(90);
- xRotation.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- xRot = xRotation.getSelection();
- }
- });
-
- new Label(rotationGroup, SWT.NONE).setText("Y:");
- final Slider yRotation = new Slider(rotationGroup, SWT.NONE);
- yRotation.setIncrement(10);
- yRotation.setMaximum(362);
- yRotation.setMinimum(0);
- yRotation.setThumb(2);
- yRotation.setPageIncrement(20);
- yRotation.setSelection(0);
- yRotation.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- yRot = yRotation.getSelection();
- }
- });
-
- new Label(rotationGroup, SWT.NONE).setText("Z:");
- final Slider zRotation = new Slider(rotationGroup, SWT.NONE);
- zRotation.setIncrement(10);
- zRotation.setMaximum(362);
- zRotation.setMinimum(0);
- zRotation.setThumb(2);
- zRotation.setPageIncrement(20);
- zRotation.setSelection(0);
- zRotation.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- zRot = zRotation.getSelection();
- }
- });
-
- Composite optionsGroup = new Composite(composite, SWT.NONE);
- GridLayout layout = new GridLayout(2, false);
- layout.marginWidth = 0;
- optionsGroup.setLayout(layout);
-
- new Label(optionsGroup, SWT.NONE).setText("Shape:");
-
- final Combo statesCombo = new Combo(optionsGroup, SWT.READ_ONLY);
- for (int i = 0; i < states.length; i++) {
- statesCombo.add(states[i].getName());
- }
- statesCombo.select(0);
- statesCombo.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- currentState = states[statesCombo.getSelectionIndex()];
- }
- });
-
- final Button lightsButton = new Button(composite, SWT.CHECK);
- lightsButton.setText("Lights");
- lightsButton.setSelection(true);
- lightsButton.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- if (lightsButton.getSelection()) {
- GL.glEnable(GL.GL_LIGHTING);
- } else {
- GL.glDisable(GL.GL_LIGHTING);
- }
- }
- });
- }
-
- /**
- * @see OpenGLTab#dispose()
- */
- void dispose() {
- super.dispose();
- GLU.gluDeleteQuadric(quadratic);
- GLU.gluDeleteQuadric(disk);
- if (states != null) {
- for (int i = 0; i < states.length; i++) {
- states [i].dispose();
- }
- }
- }
-
- /**
- * Draws the logical AND of two shapes.
- *
- * @param a shape A
- * @param b shape B
- */
- void drawAandB(Shape a, Shape b) {
- // draw parts of B that are inside A
- drawAinsideB(a, b, GL.GL_BACK, GL.GL_NOTEQUAL);
- // we do not want the following to show up
- GL.glColorMask(false, false, false, false);
- // turn on depth testing
- GL.glEnable(GL.GL_DEPTH_TEST);
- GL.glDepthFunc(GL.GL_ALWAYS);
- // render the front face of B
- b.draw();
- // reset the depth function
- GL.glDepthFunc(GL.GL_LESS);
- // draw parts of A that are inside B
- drawAinsideB(b, a, GL.GL_BACK, GL.GL_NOTEQUAL);
- }
-
- /**
- * Draws the contents of one shape that appear within another.
- *
- * @param a the shape to draw
- * @param b the constraining shape
- * @param face
- * @param test
- */
- void drawAinsideB(Shape a, Shape b, int face, int test) {
- // turn off the color buffer
- GL.glColorMask(false, false, false, false);
- // clear the stencil buffer
- GL.glClearStencil(0);
- GL.glEnable(GL.GL_DEPTH_TEST);
- // set to proper Culling
- GL.glCullFace(face);
- // render shape A
- a.draw();
- // set depth mask
- GL.glDepthMask(false);
- // enable stencil test
- GL.glEnable(GL.GL_STENCIL_TEST);
- GL.glStencilFunc(GL.GL_ALWAYS, 0, 0);
- // set the stencil buffer to increment if the depth test passes
- GL.glStencilOp(GL.GL_KEEP, GL.GL_KEEP, GL.GL_INCR);
- // turn on back face culling
- GL.glCullFace(GL.GL_BACK);
- // render B
- b.draw();
- // set the stencil buffer to decrement if the depth test passes
- GL.glStencilOp(GL.GL_KEEP, GL.GL_KEEP, GL.GL_DECR);
- // cull the front face
- GL.glCullFace(GL.GL_FRONT);
- // render B again
- b.draw();
- // set depth mask
- GL.glDepthMask(true);
- GL.glColorMask(true, true, true, true);
- // set the stencil buffer
- GL.glStencilFunc(test, 0, 1);
- // turn off depth testing
- GL.glDisable(GL.GL_DEPTH_TEST);
- // set to proper culling
- GL.glCullFace(face);
- // render A
- a.draw();
- // disable stencil test
- GL.glDisable(GL.GL_STENCIL_TEST);
- }
-
- /**
- * Draws the logical OR of two shapes.
- *
- * @param a shape A
- * @param b shape B
- */
- void drawAorB(Shape a, Shape b) {
- GL.glEnable(GL.GL_DEPTH_TEST);
- a.draw();
- b.draw();
- GL.glDisable(GL.GL_DEPTH_TEST);
- }
-
- /**
- * Draws one shape subtracted from another.
- *
- * @param a the base shape
- * @param b the shape to subtract
- */
- void drawAsubB(Shape a, Shape b) {
- // draw back parts of B inside A
- drawAinsideB(b, a, GL.GL_FRONT, GL.GL_NOTEQUAL);
- // we do not want the following to show up
- GL.glColorMask(false, false, false, false);
- GL.glEnable(GL.GL_DEPTH_TEST);
- // change the depth test to GL_ALWAYS
- GL.glDepthFunc(GL.GL_ALWAYS);
- // render the front face of B
- a.draw();
- // reset the depth function
- GL.glDepthFunc(GL.GL_LESS);
- // draw front parts of A outside B
- drawAinsideB(a, b, GL.GL_BACK, GL.GL_EQUAL);
- }
-
- /**
- * Draws the specifed shape.
- *
- * @param shape the shape to draw
- */
- void drawShape(Shape shape) {
- GL.glEnable(GL.GL_DEPTH_TEST);
- shape.draw();
- GL.glDisable(GL.GL_DEPTH_TEST);
- }
-
- /**
- * @see OpenGLTab#getTabText()
- */
- String getTabText() {
- return "Area";
- }
-
- /**
- * @see OpenGLTab#init()
- */
- void init() {
- if (!hasStencilSupport()) return;
-
- GL.glClearColor(1.0f, 1.0f, 1.0f, 1.0f);
- float[] lightPos = { 0.0f, 5.0f, -10.0f, 1.0f };
- GL.glLightfv(GL.GL_LIGHT0, GL.GL_POSITION, lightPos);
- quadratic = GLU.gluNewQuadric();
- disk = GLU.gluNewQuadric();
-
- GL.glEnable(GL.GL_CULL_FACE);
- GL.glEnable(GL.GL_LIST_MODE);
- GL.glEnable(GL.GL_LIGHT0);
- GL.glEnable(GL.GL_LIGHTING);
- GL.glLightModeli(GL.GL_LIGHT_MODEL_TWO_SIDE, GL.GL_TRUE);
-
- final float[] sphereMaterial = { 0.0f, 1.0f, 0.0f, 1.0f };
- final float[] cylinderMaterial = { 1.0f, 0.0f, 0.0f, 1.0f };
-
- Shape sphere = new Shape() {
- public void draw() {
- GL.glMaterialfv(
- GL.GL_FRONT_AND_BACK,
- GL.GL_AMBIENT_AND_DIFFUSE,
- sphereMaterial);
- GL.glColor3f(0.0f, 1.0f, 0.0f);
- GLU.gluSphere(quadratic, 3, 32, 32);
- }
- };
- Shape cylinder = new Shape() {
- public void draw() {
- GL.glMaterialfv(
- GL.GL_FRONT_AND_BACK,
- GL.GL_AMBIENT_AND_DIFFUSE,
- cylinderMaterial);
- GL.glColor3f(1.0f, 0.0f, 0.0f);
- GLU.gluQuadricOrientation(disk, GLU.GLU_INSIDE);
- GL.glPushMatrix();
- GL.glTranslatef(1.0f, 1.0f, 0.0f);
- GLU.gluDisk(disk, 0, 3, 32, 32);
- GLU.gluCylinder(quadratic, 3, 3, 6, 32, 32);
- GL.glPushMatrix();
- GL.glTranslatef(0.0f, 0.0f, 6.0f);
- GLU.gluQuadricOrientation(disk, GLU.GLU_OUTSIDE);
- GLU.gluDisk(disk, 0, 3, 32, 32);
- GL.glPopMatrix();
- GL.glPopMatrix();
- }
- };
-
- // create the display lists and states
- states = new State[6];
- int index = 1;
-
- GL.glNewList(index, GL.GL_COMPILE);
- drawShape(cylinder);
- GL.glEndList();
- states[0] = new State("Cylinder",index++);
-
- GL.glNewList(index, GL.GL_COMPILE);
- drawShape(sphere);
- GL.glEndList();
- states[1] = new State("Sphere",index++);
-
- GL.glNewList(index, GL.GL_COMPILE);
- drawAorB(cylinder, sphere);
- GL.glEndList();
- states[2] = new State("Cylinder OR Sphere",index++);
-
- GL.glNewList(index, GL.GL_COMPILE);
- drawAandB(cylinder, sphere);
- GL.glEndList();
- states[3] = new State("Cylinder AND Sphere",index++);
-
- GL.glNewList(index, GL.GL_COMPILE);
- drawAsubB(cylinder, sphere);
- GL.glEndList();
- states[4] = new State("Cylinder SUB Sphere",index++);
-
- GL.glNewList(index, GL.GL_COMPILE);
- drawAsubB(sphere, cylinder);
- GL.glEndList();
- states[5] = new State("Sphere SUB Cylinder",index++);
-
- currentState = states[0];
- }
-
- /**
- * @see OpenGLTab#isStencilSupportNeeded
- */
- boolean isStencilSupportNeeded() {
- return true;
- }
-
- /**
- * @see OpenGLTab#renderScene()
- */
- void renderScene() {
- GL.glClear(
- GL.GL_COLOR_BUFFER_BIT
- | GL.GL_DEPTH_BUFFER_BIT
- | GL.GL_STENCIL_BUFFER_BIT);
-
- GL.glLoadIdentity();
- GL.glTranslatef(xPos, yPos, zPos);
- GL.glRotatef(xRot, 1.0f, 0.0f, 0.0f);
- GL.glRotatef(yRot, 0.0f, 1.0f, 0.0f);
- GL.glRotatef(zRot, 0.0f, 0.0f, 1.0f);
-
- currentState.display();
- }
-}
diff --git a/examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/BezierTab.java b/examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/BezierTab.java
deleted file mode 100644
index e66b8414c8..0000000000
--- a/examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/BezierTab.java
+++ /dev/null
@@ -1,211 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.opengl.examples;
-
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.opengl.*;
-import org.eclipse.swt.widgets.*;
-
-class BezierTab extends SelectionTab {
- private boolean showCtrlPoints = true;
- private Point offset;
- private int currentPoint = -1;
- private int lineDivisions = 30;
- private double[][] ctrlPts = {
- { 1.5, 0.5, 0.0, 0.6, 0.9, 0.0, 0.85, 0.12,
- 0.0, 1.1, 1.0, 0.0, 0.53, 1.4, 0.0
- },
- { 0.53, 1.4, 0.0, 1.03, 1.87, 0.0, 1.52, 0.26,
- 0.0, 1.86, 0.43, 0.0, 1.5, 0.5, 0.0
- }
- };
- private static final int LENGTH = 5;
- private static final int[][] PICK_NAMES = {
- { 1, 2, 3, 4, 5 },
- { 6, 7, 8, 9, 10 }
- };
-
- /**
- * @see OpenGLTab#createControls(Composite)
- */
- void createControls(Composite composite) {
- new Label(composite, SWT.NONE).setText("Click and drag points to adjust shape.");
- new Label(composite, SWT.NONE).setText("Line division count:");
- final Slider divisions = new Slider(composite, SWT.NONE);
- divisions.setIncrement(1);
- divisions.setMaximum(52);
- divisions.setMinimum(1);
- divisions.setThumb(2);
- divisions.setPageIncrement(2);
- divisions.setSelection(30);
- divisions.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- lineDivisions = divisions.getSelection();
- }
- });
-
- final Button showPointsButton = new Button(composite, SWT.CHECK);
- showPointsButton.setText("Show Points");
- showPointsButton.setSelection(true);
- showPointsButton.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- showCtrlPoints = showPointsButton.getSelection();
- }
- });
-
- final Button blendButton = new Button(composite, SWT.CHECK);
- blendButton.setText("Blend");
- blendButton.setSelection(true);
- blendButton.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- if (blendButton.getSelection()) {
- GL.glEnable(GL.GL_BLEND);
- } else {
- GL.glDisable(GL.GL_BLEND);
- }
- }
- });
-
- final Button smoothLineButton = new Button(composite, SWT.CHECK);
- smoothLineButton.setText("Smooth Line");
- smoothLineButton.setSelection(true);
- smoothLineButton.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- if (smoothLineButton.getSelection()) {
- GL.glEnable(GL.GL_LINE_SMOOTH);
- } else {
- GL.glDisable(GL.GL_LINE_SMOOTH);
- }
- }
- });
-
- final Canvas glCanvas = getGlCanvas();
- glCanvas.addMouseListener(new MouseAdapter() {
- public void mouseUp(MouseEvent e) {
- offset = null;
- }
-
- });
-
- glCanvas.addListener(SWT.MouseDown, new Listener() {
- public void handleEvent(Event e) {
- e.y = glCanvas.getClientArea().height - e.y;
- if (e.button == 1) {
- if (processSelection(e.x, e.y, 10) > 0) {
- offset = new Point(e.x, e.y);
- } else {
- currentPoint = 0;
- }
- }
- }
- });
-
- glCanvas.addListener(SWT.MouseMove, new Listener() {
- public void handleEvent(Event e) {
- if (offset == null) return;
- int currentSegment = (currentPoint - 1) / LENGTH;
- int current = (currentPoint - 1) * 3;
- if (currentPoint > LENGTH) {
- current = (currentPoint - 6) * 3;
- }
- Rectangle rect = glCanvas.getClientArea();
- e.y = rect.height - e.y;
- if (0 < e.x && e.x < rect.width && 0 < e.y && e.y < rect.height && currentPoint > 0) {
- ctrlPts[currentSegment][current] = (float) e.x / (float) 200;
- ctrlPts[currentSegment][current + 1] = (float) e.y / (float) 200;
- switch (currentPoint) {
- case 10 :
- ctrlPts[0][0] = (float) e.x / (float) 200;
- ctrlPts[0][1] = (float) e.y / (float) 200;
- break;
- case 6 :
- ctrlPts[0][12] = (float) e.x / (float) 200;
- ctrlPts[0][13] = (float) e.y / (float) 200;
- break;
- }
- }
- }
- });
- }
-
- /**
- * @see OpenGLTab#getTabText()
- */
- String getTabText() {
- return "Bezier";
- }
-
- /**
- * @see OpenGLTab#init()
- */
- void init() {
- GL.glClearColor(1.0f, 1.0f, 1.0f, 1.0f);
- GL.glHint(GL.GL_LINE_SMOOTH_HINT, GL.GL_NICEST);
- GL.glBlendFunc(GL.GL_SRC_ALPHA, GL.GL_ONE_MINUS_SRC_ALPHA);
- GL.glPointSize(7.0f);
- GL.glLineWidth(4.0f);
-
- GL.glEnable(GL.GL_AUTO_NORMAL);
- GL.glEnable(GL.GL_MAP1_VERTEX_3);
- GL.glEnable(GL.GL_LINE_SMOOTH);
- GL.glEnable(GL.GL_BLEND);
- }
-
- /**
- * @see SelectionTab.processPick (int[], int)
- */
- void processPick(int[] pSelectBuff, int hits) {
- int counter = 0;
- currentPoint = 0;
- for (int i = 0; i < hits; i++) {
- int count = pSelectBuff[counter];
- counter += 3;
- for (int j = 0; j < count; j++) {
- currentPoint = pSelectBuff[counter];
- counter++;
- }
- }
- }
-
- /**
- * @see OpenGLTab#renderScene()
- */
- void renderScene() {
- GL.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
- GL.glLoadIdentity();
- GL.glTranslatef(-1.0f, -1.0f, -2.45f);
- GL.glColor3f(0.0f, 0.0f, 1.0f);
- for (int i = 0; i < ctrlPts.length; i++) {
- GL.glMapGrid1d(lineDivisions, 0.0f, 1f);
- GL.glMap1d(GL.GL_MAP1_VERTEX_3, 0, 1, 3, LENGTH, ctrlPts[i]);
- GL.glEvalMesh1(GL.GL_LINE, 0, lineDivisions);
- }
- if (showCtrlPoints) {
- GL.glPushName(0);
- for (int j = 0; j < ctrlPts.length; j++) {
- for (int i = 0; i < LENGTH * 3; i += 3) {
- GL.glLoadName(PICK_NAMES[j][i / 3]);
- GL.glBegin(GL.GL_POINTS);
- if (PICK_NAMES[j][i / 3] == currentPoint) {
- GL.glColor3f(1.0f, 0.0f, 0.0f);
- } else {
- GL.glColor3f(0.0f, 0.0f, 0.0f);
- }
- GL.glVertex3d(ctrlPts[j][i], ctrlPts[j][i + 1], ctrlPts[j][i + 2]);
- GL.glEnd();
- }
- }
- }
- }
-}
diff --git a/examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/BitmapTextTab.java b/examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/BitmapTextTab.java
deleted file mode 100644
index 084f45a213..0000000000
--- a/examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/BitmapTextTab.java
+++ /dev/null
@@ -1,203 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.opengl.examples;
-
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.opengl.*;
-import org.eclipse.swt.widgets.*;
-
-class BitmapTextTab extends OpenGLTab {
- private Text messageText;
- private FontData fontData;
- private float[] textColor = { 1.0f, 0.0f, 0.0f };
- private float xPos = -130.0f, yPos = 0.0f;
- private int listIndexBase;
- private final static int LIST_INDEX_SIZE = 256;
- private final static int DEFAULT_FONT_SIZE = 24;
- private final static String DEFAULT_FONT_NAME = "Courier";
-
- /**
- * @see OpenGLTab#createControls(Composite)
- */
- void createControls(Composite composite) {
- Group movementGroup = new Group(composite, SWT.NONE);
- movementGroup.setText("Translation");
- movementGroup.setLayout(new GridLayout(2, false));
-
- new Label(movementGroup, SWT.NONE).setText("X:");
- final Slider xMove = new Slider(movementGroup, SWT.NONE);
- xMove.setIncrement(1);
- xMove.setMaximum(42);
- xMove.setMinimum(0);
- xMove.setThumb(2);
- xMove.setPageIncrement(2);
- xMove.setSelection(7);
- xMove.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- xPos = (xMove.getSelection() * 10) - 200;
- }
- });
-
- new Label(movementGroup, SWT.NONE).setText("Y:");
- final Slider yMove = new Slider(movementGroup, SWT.NONE);
- yMove.setIncrement(1);
- yMove.setMaximum(42);
- yMove.setMinimum(0);
- yMove.setThumb(2);
- yMove.setPageIncrement(2);
- yMove.setSelection(20);
- yMove.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- yPos = (yMove.getSelection() * 10) - 200;
- }
- });
-
- Composite textGroup = new Composite(composite,SWT.NONE);
- GridLayout layout = new GridLayout(2,false);
- layout.marginHeight = 0;
- layout.marginWidth = 0;
- textGroup.setLayout(layout);
- textGroup.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
-
- new Label(textGroup, SWT.NONE).setText("Text:");
- messageText = new Text(textGroup, SWT.BORDER);
- GridData data = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
- data.grabExcessHorizontalSpace = true;
- messageText.setLayoutData(data);
- messageText.setText("OpenGL - SWT");
-
- final Button fontSelectButton = new Button(composite, SWT.NONE);
- fontSelectButton.setText("Set Font");
-
- final ColorSelectionGroup colorGroup =
- new ColorSelectionGroup(composite, SWT.NONE);
- colorGroup.setText("Text color");
- colorGroup.addColorSelectionListener(new IColorSelectionListener() {
- public void handleColorSelection(RGB rgb) {
- GL.glColor3ub((byte) rgb.red, (byte) rgb.green, (byte) rgb.blue);
- }
- });
-
- fontSelectButton.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- FontDialog fontDialog = new FontDialog(fontSelectButton.getShell());
- fontDialog.setText("Choose Font Options");
- double[] currentColor = new double[4];
- GL.glGetDoublev(GL.GL_CURRENT_COLOR, currentColor);
- fontDialog.setRGB(
- new RGB(
- (int) currentColor[0] * 255,
- (int) currentColor[1] * 255,
- (int) currentColor[2] * 255));
- fontDialog.setFontData(fontData);
- FontData result = fontDialog.open();
- if (result != null) {
- fontData = result;
- RGB rgb = fontDialog.getRGB();
- GL.glColor3ub((byte) rgb.red, (byte) rgb.green, (byte) rgb.blue);
- colorGroup.setRGB(rgb);
- getContext().loadBitmapFont(fontData, null, listIndexBase, 32, 96);
- }
- }
- });
- }
-
- /**
- * @see OpenGLTab#dispose()
- */
- void dispose() {
- super.dispose();
- GL.glDeleteLists(listIndexBase, LIST_INDEX_SIZE);
- }
-
- /**
- * Draws the text to the screen
- *
- * @param string the text to draw
- */
- void drawText(String string) {
- char[] stringChars = string.toCharArray();
- int[] text = new int[stringChars.length];
- for (int i = 0; i < text.length; i++) {
- text[i] = (int) stringChars[i];
- }
- // pushes the display list bits
- GL.glPushAttrib(GL.GL_LIST_BIT);
- // sets the base character to 32
- GL.glListBase(listIndexBase - 32);
- GL.glCallLists(text.length, GL.GL_UNSIGNED_INT, text);
- // pops the display list bits
- GL.glPopAttrib();
- }
-
- /**
- * @see OpenGLTab#getTabText()
- */
- String getTabText() {
- return "Bitmap Text";
- }
-
- /**
- * @see OpenGLTab#init()
- */
- void init() {
- GL.glClearColor(1.0f, 1.0f, 1.0f, 1.0f);
- GL.glColor3fv(textColor);
- GL.glBlendFunc(GL.GL_SRC_ALPHA, GL.GL_ONE_MINUS_SRC_ALPHA);
- GL.glEnable(GL.GL_DEPTH_TEST);
- GL.glEnable(GL.GL_BLEND);
- // build the initial font
- listIndexBase = GL.glGenLists(LIST_INDEX_SIZE);
- fontData = new FontData();
- fontData.setHeight(DEFAULT_FONT_SIZE);
- fontData.setName(DEFAULT_FONT_NAME);
- getContext().loadBitmapFont(fontData, null, listIndexBase, 32, LIST_INDEX_SIZE);
- }
-
- /**
- * @see OpenGLTab#renderScene()
- */
- void renderScene() {
- GL.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
- GL.glLoadIdentity();
- GL.glRasterPos2f(xPos, yPos);
- drawText(messageText.getText());
- }
-
- /**
- * @see OpenGLTab#setupViewingArea()
- */
- void setupViewingArea() {
- // use ortho view since this tab does not need any depth
- Rectangle rect = getGlCanvas().getClientArea();
- int width = rect.width;
- int height = rect.height;
- width = Math.max(width, 1);
- GL.glViewport(0, 0, width, height);
- float nRange = 200.0f;
- GL.glMatrixMode(GL.GL_PROJECTION);
- GL.glLoadIdentity();
- if (width <= height) {
- GL.glOrtho(
- -nRange, nRange, -nRange * height / width,
- nRange * height / width, -nRange, nRange);
- } else {
- GL.glOrtho(
- -nRange * height / width, nRange * height / width, -nRange,
- nRange, -nRange, nRange);
- }
- GL.glMatrixMode(GL.GL_MODELVIEW);
- GL.glLoadIdentity();
- }
-}
diff --git a/examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/ColorSelectionGroup.java b/examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/ColorSelectionGroup.java
deleted file mode 100644
index f0c3cdde9d..0000000000
--- a/examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/ColorSelectionGroup.java
+++ /dev/null
@@ -1,166 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.opengl.examples;
-
-
-import java.util.Vector;
-import org.eclipse.swt.*;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.opengl.GL;
-import org.eclipse.swt.widgets.*;
-
-class ColorSelectionGroup implements Listener {
- private Color color;
- private Label label;
- private Image image;
- private Button button;
- private Vector listeners = new Vector();
-
- /**
- * Constructor.
- *
- * @param parent the parent composite
- * @param style style bits to be applied to the color group
- */
- ColorSelectionGroup(Composite parent, int style) {
- super();
- initColor(parent.getDisplay());
-
- Composite colorGroup = new Composite(parent, style);
- GridLayout layout = new GridLayout(2, false);
- layout.marginWidth = 0;
- layout.marginHeight = 0;
- colorGroup.setLayout(layout);
-// GridData data = new GridData(GridData.FILL_HORIZONTAL);
-// data.grabExcessHorizontalSpace = true;
-// colorGroup.setLayoutData(data);
-
- button = new Button(colorGroup, SWT.NONE);
- button.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
- image = new Image(button.getDisplay(), 12, 12);
- drawButtonImage();
- button.setImage(image);
- button.addListener(SWT.Selection, this);
- button.addDisposeListener(new DisposeListener() {
- public void widgetDisposed(DisposeEvent event) {
- if (image != null) image.dispose();
- if (color != null) color.dispose();
- }
- });
-
- label = new Label(colorGroup, SWT.NONE);
- label.setText("Color");
-// data = new GridData(GridData.FILL_HORIZONTAL);
-// data.grabExcessHorizontalSpace = true;
-// label.setLayoutData(data);
- }
-
- /**
- * Adds the argument to this group's collection of
- * color selection listeners.
- *
- * @param listener
- */
- void addColorSelectionListener(IColorSelectionListener listener) {
- listeners.addElement(listener);
- }
-
- /**
- * Draws the colored square on the selection button.
- */
- void drawButtonImage() {
- GC gc = new GC(image);
- gc.setBackground(color);
- Rectangle bounds = image.getBounds();
- gc.fillRectangle(0, 0, bounds.width, bounds.height);
- gc.drawRectangle(0, 0, bounds.width - 1, bounds.height - 1);
- gc.dispose();
- }
-
- /**
- * @see org.eclipse.swt.widgets.Listener#handleEvent(Event)
- */
- public void handleEvent(Event e) {
- Shell shell = button.getShell();
- ColorDialog colorDialog = new ColorDialog(shell);
- colorDialog.setRGB(
- new RGB(color.getRed(), color.getGreen(), color.getBlue()));
- RGB rgb = colorDialog.open();
- if (rgb == null) return;
- setRGB(rgb);
- notifyListeners(rgb);
- }
-
- /**
- * Initializes the color by querying for the current color.
- *
- * @param display
- */
- void initColor(Display display) {
- double[] currentColor = new double[4];
- GL.glGetDoublev(GL.GL_CURRENT_COLOR, currentColor);
- RGB rgb =
- new RGB(
- (int) currentColor[0] * 255,
- (int) currentColor[1] * 255,
- (int) currentColor[2] * 255);
- color = new Color(display, rgb);
- }
-
- /**
- * Notifies all registered color selection listeners.
- *
- * @param value
- */
- void notifyListeners(RGB rgb) {
- IColorSelectionListener[] listenersArr =
- new IColorSelectionListener[listeners.size()];
- listeners.copyInto(listenersArr);
- for (int i = 0; i < listenersArr.length; i++) {
- listenersArr [i].handleColorSelection(rgb);
- }
- }
-
- /**
- * Removes the argument from this group's collection of color selection
- * listeners. If the argument is not a registered listener then does
- * nothing.
- *
- * @param listener
- */
- void removeColorSelectionListener(IColorSelectionListener listener) {
- listeners.removeElement(listener);
- }
-
- /**
- * Sets the text for the group's label.
- *
- * @param text the new label text
- */
- void setText(String text) {
- label.setText(text);
- }
-
- /**
- * Sets the current color.
- *
- * @param rgb the rgb of the new color
- */
- void setRGB(RGB rgb) {
- Color oldColor = color;
- color = new Color(button.getDisplay(), rgb);
- drawButtonImage();
- button.setImage(image);
- if (oldColor != null) oldColor.dispose();
- }
-}
diff --git a/examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/FogTab.java b/examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/FogTab.java
deleted file mode 100644
index da017ed1db..0000000000
--- a/examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/FogTab.java
+++ /dev/null
@@ -1,254 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.opengl.examples;
-
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.opengl.*;
-import org.eclipse.swt.widgets.*;
-
-class FogTab extends OpenGLTab {
-
- private float rotY = 0.0f;
- private float yPos = 0.0f, xPos = 0.0f, zPos = -15.0f;
- private int cubeListIndexBase;
- private final static int[] FOG_TYPES = { GL.GL_LINEAR, GL.GL_EXP, GL.GL_EXP2 };
- private final static String[] FOG_NAMES = { "LINEAR", "GL_EXP", "GL_EXP2" };
- private final static int SLEEP_LENGTH = 0;
-
- /**
- * @see OpenGLTab#createControls(Composite)
- */
- void createControls(Composite composite) {
- Group movementGroup = new Group(composite, SWT.NONE);
- movementGroup.setText("Translation");
- movementGroup.setLayout(new GridLayout(2, false));
-
- new Label(movementGroup, SWT.NONE).setText("X:");
- final Slider xMove = new Slider(movementGroup, SWT.NONE);
- xMove.setIncrement(1);
- xMove.setMaximum(12);
- xMove.setMinimum(0);
- xMove.setThumb(2);
- xMove.setPageIncrement(2);
- xMove.setSelection(5);
- xMove.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- xPos = xMove.getSelection() - 5;
- }
- });
-
- new Label(movementGroup, SWT.NONE).setText("Y:");
- final Slider yMove = new Slider(movementGroup, SWT.NONE);
- yMove.setIncrement(1);
- yMove.setMaximum(12);
- yMove.setMinimum(0);
- yMove.setThumb(2);
- yMove.setPageIncrement(2);
- yMove.setSelection(5);
- yMove.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- yPos = yMove.getSelection() - 5;
- }
- });
-
- new Label(movementGroup, SWT.NONE).setText("Z:");
- final Slider zMove = new Slider(movementGroup, SWT.NONE);
- zMove.setIncrement(1);
- zMove.setMaximum(24);
- zMove.setMinimum(0);
- zMove.setThumb(4);
- zMove.setPageIncrement(2);
- zMove.setSelection(10);
- zMove.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- zPos = zMove.getSelection() - 25;
- }
- });
-
- Composite fogTypesGroup = new Composite(composite,SWT.NONE);
- GridLayout layout = new GridLayout(2,false);
- layout.marginHeight = 0;
- layout.marginWidth = 0;
- fogTypesGroup.setLayout(layout);
- fogTypesGroup.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
-
- new Label(fogTypesGroup, SWT.NONE).setText("Fog Types:");
- final Combo fogTypeCombo = new Combo(fogTypesGroup, SWT.READ_ONLY);
- GridData data = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
- data.grabExcessHorizontalSpace = true;
- fogTypeCombo.setLayoutData(data);
- fogTypeCombo.setItems(FOG_NAMES);
- fogTypeCombo.select(0);
-
- new Label(composite, SWT.NONE).setText("Fog Density:");
- final Slider fogDensitySlider = new Slider(composite, SWT.NONE);
- fogDensitySlider.setIncrement(1);
- fogDensitySlider.setMaximum(32);
- fogDensitySlider.setMinimum(0);
- fogDensitySlider.setThumb(2);
- fogDensitySlider.setPageIncrement(5);
- fogDensitySlider.setSelection(0);
- fogDensitySlider.setEnabled(false);
- fogDensitySlider.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- float fogDensity = ((float)fogDensitySlider.getSelection()) / 100;
- GL.glFogf(GL.GL_FOG_DENSITY, fogDensity);
- }
- });
- fogTypeCombo.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- int currentSelection = fogTypeCombo.getSelectionIndex();
- // fog type GL.GL_LINEAR does not utilize fogDensity, but the other fog types do
- fogDensitySlider.setEnabled(currentSelection != 0);
- GL.glFogf(GL.GL_FOG_MODE, FOG_TYPES[currentSelection]);
- }
- });
- }
-
- /**
- * Creates a cube at 0,0 in the viewport.
- */
- void createCube() {
- GL.glNewList(cubeListIndexBase, GL.GL_COMPILE);
- GL.glBegin(GL.GL_QUADS);
- // front
- GL.glColor3f(0.0f, 1.0f, 0.0f);
- GL.glVertex3f(-0.5f, -0.5f, 0.5f); // bottom left
- GL.glColor3f(0.0f, 0.0f, 1.0f);
- GL.glVertex3f(0.5f, -0.5f, 0.5f); // bottom right
- GL.glColor3f(1.0f, 1.0f, 0.0f);
- GL.glVertex3f(0.5f, 0.5f, 0.5f); // top right
- GL.glColor3f(1.0f, 0.0f, 0.0f);
- GL.glVertex3f(-0.5f, 0.5f, 0.5f); // top left
- // back
- GL.glColor3f(0.0f, 0.0f, 1.0f);
- GL.glVertex3f(-0.5f, -0.5f, -0.5f); // bottom left
- GL.glColor3f(0.0f, 1.0f, 0.0f);
- GL.glVertex3f(0.5f, -0.5f, -0.5f); // bottom right
- GL.glColor3f(1.0f, 0.0f, 0.0f);
- GL.glVertex3f(0.5f, 0.5f, -0.5f); // top right
- GL.glColor3f(1.0f, 1.0f, 0.0f);
- GL.glVertex3f(-0.5f, 0.5f, -0.5f); // top left
- // left
- GL.glColor3f(0.0f, 0.0f, 1.0f);
- GL.glVertex3f(-0.5f, -0.5f, -0.5f); // bottom left
- GL.glColor3f(0.0f, 1.0f, 0.0f);
- GL.glVertex3f(-0.5f, -0.5f, 0.5f); // bottom right
- GL.glColor3f(1.0f, 0.0f, 0.0f);
- GL.glVertex3f(-0.5f, 0.5f, 0.5f); // top right
- GL.glColor3f(1.0f, 1.0f, 0.0f);
- GL.glVertex3f(-0.5f, 0.5f, -0.5f); // top left
- // right
- GL.glColor3f(0.0f, 0.0f, 1.0f);
- GL.glVertex3f(0.5f, -0.5f, 0.5f); // bottom left
- GL.glColor3f(0.0f, 1.0f, 0.0f);
- GL.glVertex3f(0.5f, -0.5f, -0.5f); // bottom right
- GL.glColor3f(1.0f, 0.0f, 0.0f);
- GL.glVertex3f(0.5f, 0.5f, -0.5f); // top right
- GL.glColor3f(1.0f, 1.0f, 0.0f);
- GL.glVertex3f(0.5f, 0.5f, 0.5f); // top left
- // top
- GL.glColor3f(1.0f, 0.0f, 0.0f);
- GL.glVertex3f(0.5f, 0.5f, -0.5f);
- GL.glColor3f(1.0f, 1.0f, 0.0f);
- GL.glVertex3f(-0.5f, 0.5f, -0.5f);
- GL.glColor3f(1.0f, 0.0f, 0.0f);
- GL.glVertex3f(-0.5f, 0.5f, 0.5f);
- GL.glColor3f(1.0f, 1.0f, 0.0f);
- GL.glVertex3f(0.5f, 0.5f, 0.5f);
- // bottom
- GL.glColor3f(0.0f, 0.0f, 1.0f);
- GL.glVertex3f(0.5f, -0.5f, 0.5f);
- GL.glColor3f(0.0f, 1.0f, 0.0f);
- GL.glVertex3f(-0.5f, -0.5f, 0.5f);
- GL.glColor3f(0.0f, 0.0f, 1.0f);
- GL.glVertex3f(-0.5f, -0.5f, -0.5f);
- GL.glColor3f(0.0f, 1.0f, 0.0f);
- GL.glVertex3f(0.5f, -0.5f, -0.5f);
- GL.glEnd();
- GL.glEndList();
- }
-
- /**
- * @see OpenGLTab#dispose()
- */
- void dispose() {
- super.dispose();
- GL.glDeleteLists(cubeListIndexBase, 1);
- }
-
- /**
- * @see OpenGLTab#getSleepLength()
- */
- int getSleepLength() {
- return SLEEP_LENGTH;
- }
- /**
- * @see OpenGLTab#getTabText()
- */
- String getTabText() {
- return "Fog";
- }
-
- /**
- * @see OpenGLTab#init()
- */
- void init() {
- GL.glClearColor(1.0f, 1.0f, 1.0f, 1.0f);
- // fog color should be the same as the clear color
- // to look appropriate
- float[] fogColor = { 1.0f, 1.0f, 1.0f, 1.0f };
- GL.glFogfv(GL.GL_FOG_COLOR, fogColor);
- GL.glHint(GL.GL_FOG_HINT, GL.GL_DONT_CARE);
- GL.glFogf(GL.GL_FOG_START, 0);
- GL.glFogf(GL.GL_FOG_DENSITY, 0.0f);
- // set the end of the start distance; anything > 15
- // units from the camera will be covered in fog
- GL.glFogf(GL.GL_FOG_END, 15);
- GL.glFogf(GL.GL_FOG_MODE, FOG_TYPES[0]);
- GL.glEnable(GL.GL_FOG);
- GL.glEnable(GL.GL_DEPTH_TEST);
-
- cubeListIndexBase = GL.glGenLists(1);
- createCube();
- }
-
- /**
- * @see OpenGLTab#renderScene()
- */
- void renderScene() {
- GL.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
- GL.glLoadIdentity();
- GL.glTranslatef(xPos, yPos, zPos);
- GL.glRotatef(rotY, 0.0f, 1.0f, 0.0f);
-
- GL.glCallList(cubeListIndexBase);
-
- GL.glPushMatrix();
- GL.glTranslatef(3, 0, -3);
- GL.glCallList(cubeListIndexBase);
- GL.glPopMatrix();
-
- GL.glPushMatrix();
- GL.glTranslatef(-3, 0, -3);
- GL.glCallList(cubeListIndexBase);
- GL.glPopMatrix();
-
- GL.glPushMatrix();
- GL.glTranslatef(0, 0, 4);
- GL.glCallList(cubeListIndexBase);
- GL.glPopMatrix();
-
- rotY += 0.6f;
- }
-}
diff --git a/examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/GradientTab.java b/examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/GradientTab.java
deleted file mode 100644
index 61e93097d5..0000000000
--- a/examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/GradientTab.java
+++ /dev/null
@@ -1,233 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.opengl.examples;
-
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.opengl.*;
-import org.eclipse.swt.widgets.*;
-
-class GradientTab extends OpenGLTab {
- private float xPos = 0.0f, yPos = 0.0f, zPos = -7.0f;
- private float xRot = 180.0f, yRot = 180.0f, zRot = 180.0f;
- private int currentSelection = 1;
- private final static float[] BEZIER_COLORS = {
- 0.0f, 1.0f, 0.0f, 0.0f, 0.3f, 0.6f, 0.1f, 0.0f,
- 0.8f, 0.2f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f,
- 0.0f, 0.0f, 1.0f, 0.0f, 0.8f, 0.8f, 0.8f, 0.0f
- };
- private final static float[] BEZIER_POINTS = {
- -1.5f, -1.5f, 4.0f, -0.5f, -1.5f, 2.0f, 0.5f, -1.5f,
- -1.0f, 1.5f, -1.5f, 2.0f, -1.5f, -0.5f, 1.0f, -0.5f,
- -0.5f, 3.0f, 0.5f, -0.5f, 0.0f, 1.5f, -0.5f, -1.0f,
- -1.5f, 0.5f, 4.0f, -0.5f, 0.5f, 0.0f, 0.5f, 0.5f,
- 3.0f, 1.5f, 0.5f, 4.0f, -1.5f, 1.5f, -2.0f, -0.5f,
- 1.5f, -2.0f, 0.5f, 1.5f, 0.0f, 1.5f, 1.5f, -1.0f,
- };
- private final static String[] OBJECT_NAMES = { "Bezier", "Square" };
-
- /**
- * @see OpenGLTab#createControls(Composite)
- */
- void createControls(Composite composite) {
- Group movementGroup = new Group(composite, SWT.NONE);
- movementGroup.setText("Translation");
- movementGroup.setLayout(new GridLayout(2, false));
-
- new Label(movementGroup, SWT.NONE).setText("X:");
- final Slider xMove = new Slider(movementGroup, SWT.NONE);
- xMove.setIncrement(1);
- xMove.setMaximum(12);
- xMove.setMinimum(0);
- xMove.setThumb(2);
- xMove.setPageIncrement(2);
- xMove.setSelection(5);
- xMove.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- xPos = xMove.getSelection() - 5;
- }
- });
-
- new Label(movementGroup, SWT.NONE).setText("Y:");
- final Slider yMove = new Slider(movementGroup, SWT.NONE);
- yMove.setIncrement(1);
- yMove.setMaximum(12);
- yMove.setMinimum(0);
- yMove.setThumb(2);
- yMove.setPageIncrement(2);
- yMove.setSelection(5);
- yMove.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- yPos = yMove.getSelection() - 5;
- }
- });
-
- new Label(movementGroup, SWT.NONE).setText("Z:");
- final Slider zMove = new Slider(movementGroup, SWT.NONE);
- zMove.setIncrement(1);
- zMove.setMaximum(12);
- zMove.setMinimum(0);
- zMove.setThumb(2);
- zMove.setPageIncrement(2);
- zMove.setSelection(5);
- zMove.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- zPos = zMove.getSelection() - 12;
- }
- });
-
- Group rotationGroup = new Group(composite, SWT.NONE);
- rotationGroup.setText("Rotation");
- rotationGroup.setLayout(new GridLayout(2, false));
-
- new Label(rotationGroup, SWT.NONE).setText("X:");
- final Slider xRotation = new Slider(rotationGroup, SWT.NONE);
- xRotation.setIncrement(10);
- xRotation.setMaximum(362);
- xRotation.setMinimum(0);
- xRotation.setThumb(2);
- xRotation.setPageIncrement(20);
- xRotation.setSelection(180);
- xRotation.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- xRot = xRotation.getSelection();
- }
- });
-
- new Label(rotationGroup, SWT.NONE).setText("Y:");
- final Slider yRotation = new Slider(rotationGroup, SWT.NONE);
- yRotation.setIncrement(10);
- yRotation.setMaximum(362);
- yRotation.setMinimum(0);
- yRotation.setThumb(2);
- yRotation.setPageIncrement(20);
- yRotation.setSelection(180);
- yRotation.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- yRot = yRotation.getSelection();
- }
- });
-
- new Label(rotationGroup, SWT.NONE).setText("Z:");
- final Slider zRotation = new Slider(rotationGroup, SWT.NONE);
- zRotation.setIncrement(10);
- zRotation.setMaximum(362);
- zRotation.setMinimum(0);
- zRotation.setThumb(2);
- zRotation.setPageIncrement(20);
- zRotation.setSelection(180);
- zRotation.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- zRot = zRotation.getSelection();
- }
- });
-
- Composite objectGroup = new Composite(composite,SWT.NONE);
- GridLayout layout = new GridLayout(2,false);
- layout.marginHeight = 0;
- layout.marginWidth = 0;
- objectGroup.setLayout(layout);
- objectGroup.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
-
- new Label(objectGroup, SWT.NONE).setText("Object:");
- final Combo objectCombo = new Combo(objectGroup, SWT.READ_ONLY);
- GridData data = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
- data.grabExcessHorizontalSpace = true;
- objectCombo.setLayoutData(data);
- objectCombo.setItems(OBJECT_NAMES);
- objectCombo.select(0);
- objectCombo.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- currentSelection = objectCombo.getSelectionIndex() + 1;
- }
- });
- }
-
- /**
- * @see OpenGLTab#dispose()
- */
- void dispose() {
- super.dispose();
- GL.glDeleteLists(1, 2);
- }
-
- /**
- * @see OpenGLTab#getTabText()
- */
- String getTabText() {
- return "Gradients";
- }
-
- /**
- * @see OpenGLTab#init()
- */
- void init() {
- GL.glClearColor(1.0f, 1.0f, 1.0f, 1.0f);
- GL.glHint(GL.GL_LINE_SMOOTH_HINT, GL.GL_NICEST);
- GL.glBlendFunc(GL.GL_SRC_ALPHA, GL.GL_ONE_MINUS_SRC_ALPHA);
- GL.glPolygonMode(GL.GL_FRONT_AND_BACK, GL.GL_FILL);
- GL.glMap2f(GL.GL_MAP2_VERTEX_3, 0, 1, 3, 4, 0, 1, 12, 4, BEZIER_POINTS);
- GL.glMap2f(GL.GL_MAP2_COLOR_4, 0, 1, 4, 1, 0, 1, 4, 6, BEZIER_COLORS);
- GL.glMapGrid2f(20, 0.0f, 1.0f, 20, 0.0f, 1.0f);
- GL.glShadeModel(GL.GL_SMOOTH);
- GL.glEnable(GL.GL_LINE_SMOOTH);
- GL.glEnable(GL.GL_LINE_STIPPLE);
- GL.glEnable(GL.GL_BLEND);
- GL.glEnable(GL.GL_MAP2_COLOR_4);
- GL.glEnable(GL.GL_MAP2_VERTEX_3);
- GL.glEnable(GL.GL_DEPTH_TEST);
-
- // create display lists
- GL.glNewList(1, GL.GL_COMPILE);
- GL.glEvalMesh2(GL.GL_FILL, 0, 20, 0, 20);
- GL.glEndList();
- GL.glNewList(2, GL.GL_COMPILE);
- GL.glBegin(GL.GL_TRIANGLE_FAN);
- GL.glColor3f(0.0f, 1.0f, 0.0f);
- GL.glVertex3f(0.0f, 0.0f, 0.0f);
- GL.glColor3f(1.0f, 0.0f, 0.0f);
- GL.glVertex3f(0.0f, 2.0f, 0.0f);
- GL.glColor3f(0.0f, 1.0f, 0.0f);
- GL.glVertex3f(-2.0f, 2.0f, 0.0f);
- GL.glColor3f(0.0f, 0.0f, 1.0f);
- GL.glVertex3f(-2.0f, 0.0f, 0.0f);
- GL.glColor3f(0.0f, 1.0f, 0.0f);
- GL.glVertex3f(-2.0f, -2.0f, 0.0f);
- GL.glColor3f(1.0f, 0.0f, 0.0f);
- GL.glVertex3f(0.0f, -2.0f, 0.0f);
- GL.glColor3f(0.0f, 1.0f, 0.0f);
- GL.glVertex3f(2.0f, -2.0f, 0.0f);
- GL.glColor3f(0.0f, 0.0f, 1.0f);
- GL.glVertex3f(2.0f, 0.0f, 0.0f);
- GL.glColor3f(0.0f, 1.0f, 0.0f);
- GL.glVertex3f(2.0f, 2.0f, 0.0f);
- GL.glColor3f(1.0f, 0.0f, 0.0f);
- GL.glVertex3f(0.0f, 2.0f, 0.0f);
- GL.glEnd();
- GL.glEndList();
- }
-
- /**
- * @see OpenGLTab#renderScene()
- */
- void renderScene() {
- GL.glClear(GL.GL_COLOR_BUFFER_BIT);
- GL.glLoadIdentity();
- GL.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
- GL.glTranslatef(xPos, yPos, zPos);
- GL.glRotatef(xRot, 1.0f, 0.0f, 0.0f);
- GL.glRotatef(yRot, 0.0f, 1.0f, 0.0f);
- GL.glRotatef(zRot, 0.0f, 0.0f, 1.0f);
- GL.glColor3f(1.0f, 0.0f, 0.0f);
- GL.glCallList(currentSelection);
- }
-} \ No newline at end of file
diff --git a/examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/IColorSelectionListener.java b/examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/IColorSelectionListener.java
deleted file mode 100644
index 346b5639dc..0000000000
--- a/examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/IColorSelectionListener.java
+++ /dev/null
@@ -1,18 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.opengl.examples;
-
-import org.eclipse.swt.graphics.RGB;
-
-
-public interface IColorSelectionListener {
- public void handleColorSelection(RGB rgb);
-}
diff --git a/examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/LightTab.java b/examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/LightTab.java
deleted file mode 100644
index 701eb9cefa..0000000000
--- a/examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/LightTab.java
+++ /dev/null
@@ -1,354 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.opengl.examples;
-
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.opengl.*;
-import org.eclipse.swt.widgets.*;
-
-class LightTab extends OpenGLTab {
- private float[] materialShininess = { 25.0f };
- private float[] lightPosition = { 0.0f, 0.0f, 0.0f, 1.0f };
- private float[][] colorValues = {
- { 1.0f, 1.0f, 1.0f, 1.0f }, // light diffuse
- { 1.0f, 1.0f, 1.0f, 1.0f }, // light ambient
- { 1.0f, 1.0f, 1.0f, 1.0f }, // light specular
- { 0.5f, 0.5f, 0.5f, 1.0f }, // light main ambient
- { 0.0f, 0.0f, 1.0f, 1.0f }, // material diffuse
- { 0.3f, 0.3f, 0.3f, 1.0f }, // material ambient
- { 1.0f, 1.0f, 1.0f, 1.0f } // material specular
- };
- private float yPos = 0.0f, xPos = 0.0f, zPos = -20.0f;
- private int quadratic, sphere;
- // sourceType values: 0 = light, 1 = material
- private int sourceType;
- // lightType values: 0 = diffuse, 1 = ambient, 2 = specular, 3 = main ambient
- private int lightType = 0;
-
- /**
- * @see OpenGLTab#createControls(Composite)
- */
- void createControls(Composite composite) {
- Group movementGroup = new Group(composite, SWT.NONE);
- movementGroup.setText("Translation");
- movementGroup.setLayout(new GridLayout(2, false));
-
- new Label(movementGroup, SWT.NONE).setText("X:");
- final Slider xMove = new Slider(movementGroup, SWT.NONE);
- xMove.setIncrement(1);
- xMove.setMaximum(22);
- xMove.setMinimum(0);
- xMove.setThumb(2);
- xMove.setPageIncrement(2);
- xMove.setSelection(10);
- xMove.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- xPos = xMove.getSelection() - 10;
- }
- });
-
- new Label(movementGroup, SWT.NONE).setText("Y:");
- final Slider yMove = new Slider(movementGroup, SWT.NONE);
- yMove.setIncrement(1);
- yMove.setMaximum(22);
- yMove.setMinimum(0);
- yMove.setThumb(2);
- yMove.setPageIncrement(2);
- yMove.setSelection(10);
- yMove.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- yPos = yMove.getSelection() - 10;
- }
- });
-
- new Label(movementGroup, SWT.NONE).setText("Z:");
- final Slider zMove = new Slider(movementGroup, SWT.NONE);
- zMove.setIncrement(1);
- zMove.setMaximum(22);
- zMove.setMinimum(0);
- zMove.setThumb(2);
- zMove.setPageIncrement(2);
- zMove.setSelection(10);
- zMove.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- zPos = zMove.getSelection() - 30;
- }
- });
-
- Group positionGroup = new Group(composite, SWT.NONE);
- positionGroup.setText("Light Position");
- positionGroup.setLayout(new GridLayout(2, false));
-
- new Label(positionGroup, SWT.NONE).setText("X:");
- final Slider lightX = new Slider(positionGroup, SWT.NONE);
- lightX.setIncrement(1);
- lightX.setMaximum(22);
- lightX.setMinimum(0);
- lightX.setThumb(2);
- lightX.setPageIncrement(2);
- lightX.setSelection(10);
- lightX.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- lightPosition[0] = ((float) lightX.getSelection() * 10) - 100;
- }
- });
-
- new Label(positionGroup, SWT.NONE).setText("Y:");
- final Slider lightY = new Slider(positionGroup, SWT.NONE);
- lightY.setIncrement(1);
- lightY.setMaximum(22);
- lightY.setMinimum(0);
- lightY.setThumb(2);
- lightY.setPageIncrement(2);
- lightY.setSelection(10);
- lightY.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- lightPosition[1] = ((float) lightY.getSelection() * 10) - 100;
- }
- });
-
- new Label(positionGroup, SWT.NONE).setText("Z:");
- final Slider lightZ = new Slider(positionGroup, SWT.NONE);
- lightZ.setIncrement(1);
- lightZ.setMaximum(22);
- lightZ.setMinimum(0);
- lightZ.setThumb(2);
- lightZ.setPageIncrement(2);
- lightZ.setSelection(10);
- lightZ.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- lightPosition[2] = ((float) lightZ.getSelection() * 10) - 20;
- }
- });
-
- Group lightColorsGroup = new Group(composite, SWT.NONE);
- lightColorsGroup.setText("Light Colors");
- lightColorsGroup.setLayout(new GridLayout());
- GridData data = new GridData(GridData.FILL_BOTH);
- lightColorsGroup.setLayoutData(data);
-
- ColorSelectionGroup lightDiffuseButton =
- new ColorSelectionGroup(lightColorsGroup, SWT.NONE);
- lightDiffuseButton.setText("Diffuse");
- lightDiffuseButton.setRGB(
- new RGB(
- (int) (colorValues[0][0] * 255),
- (int) (colorValues[0][1] * 255),
- (int) (colorValues[0][2] * 255)));
- lightDiffuseButton
- .addColorSelectionListener(new IColorSelectionListener() {
- public void handleColorSelection(RGB rgb) {
- colorValues[0][0] = ((float) rgb.red) / 255;
- colorValues[0][1] = ((float) rgb.green) / 255;
- colorValues[0][2] = ((float) rgb.blue) / 255;
- setColorValues();
- }
- });
-
- ColorSelectionGroup lightAmbientButton =
- new ColorSelectionGroup(lightColorsGroup, SWT.NONE);
- lightAmbientButton.setText("Ambient");
- lightAmbientButton.setRGB(
- new RGB(
- (int) (colorValues[1][0] * 255),
- (int) (colorValues[1][1] * 255),
- (int) (colorValues[1][2] * 255)));
- lightAmbientButton
- .addColorSelectionListener(new IColorSelectionListener() {
- public void handleColorSelection(RGB rgb) {
- colorValues[1][0] = ((float) rgb.red) / 255;
- colorValues[1][1] = ((float) rgb.green) / 255;
- colorValues[1][2] = ((float) rgb.blue) / 255;
- setColorValues();
- }
- });
-
- ColorSelectionGroup lightSpecularButton =
- new ColorSelectionGroup(lightColorsGroup, SWT.NONE);
- lightSpecularButton.setText("Specular");
- lightSpecularButton.setRGB(
- new RGB(
- (int) (colorValues[2][0] * 255),
- (int) (colorValues[2][1] * 255),
- (int) (colorValues[2][2] * 255)));
- lightSpecularButton
- .addColorSelectionListener(new IColorSelectionListener() {
- public void handleColorSelection(RGB rgb) {
- colorValues[2][0] = ((float) rgb.red) / 255;
- colorValues[2][1] = ((float) rgb.green) / 255;
- colorValues[2][2] = ((float) rgb.blue) / 255;
- setColorValues();
- }
- });
-
- ColorSelectionGroup lightMainAmbientButton =
- new ColorSelectionGroup(lightColorsGroup, SWT.NONE);
- lightMainAmbientButton.setText("Main Ambient");
- lightMainAmbientButton.setRGB(
- new RGB(
- (int) (colorValues[3][0] * 255),
- (int) (colorValues[3][1] * 255),
- (int) (colorValues[3][2] * 255)));
- lightMainAmbientButton
- .addColorSelectionListener(new IColorSelectionListener() {
- public void handleColorSelection(RGB rgb) {
- colorValues[3][0] = ((float) rgb.red) / 255;
- colorValues[3][1] = ((float) rgb.green) / 255;
- colorValues[3][2] = ((float) rgb.blue) / 255;
- setColorValues();
- }
- });
-
- Group materialColorsGroup = new Group(composite, SWT.NONE);
- materialColorsGroup.setText("Material Colors");
- materialColorsGroup.setLayout(new GridLayout());
- data = new GridData(GridData.FILL_BOTH);
- materialColorsGroup.setLayoutData(data);
-
- ColorSelectionGroup materialDiffuseButton =
- new ColorSelectionGroup(materialColorsGroup, SWT.NONE);
- materialDiffuseButton.setText("Diffuse");
- materialDiffuseButton.setRGB(
- new RGB(
- (int) (colorValues[4][0] * 255),
- (int) (colorValues[4][1] * 255),
- (int) (colorValues[4][2] * 255)));
- materialDiffuseButton
- .addColorSelectionListener(new IColorSelectionListener() {
- public void handleColorSelection(RGB rgb) {
- colorValues[4][0] = ((float) rgb.red) / 255;
- colorValues[4][1] = ((float) rgb.green) / 255;
- colorValues[4][2] = ((float) rgb.blue) / 255;
- setColorValues();
- }
- });
-
- ColorSelectionGroup materialAmbientButton =
- new ColorSelectionGroup(materialColorsGroup, SWT.NONE);
- materialAmbientButton.setText("Ambient");
- materialAmbientButton.setRGB(
- new RGB(
- (int) (colorValues[5][0] * 255),
- (int) (colorValues[5][1] * 255),
- (int) (colorValues[5][2] * 255)));
- materialAmbientButton
- .addColorSelectionListener(new IColorSelectionListener() {
- public void handleColorSelection(RGB rgb) {
- colorValues[5][0] = ((float) rgb.red) / 255;
- colorValues[5][1] = ((float) rgb.green) / 255;
- colorValues[5][2] = ((float) rgb.blue) / 255;
- setColorValues();
- }
- });
-
- ColorSelectionGroup materialSpecularButton =
- new ColorSelectionGroup(materialColorsGroup, SWT.NONE);
- materialSpecularButton.setText("Specular");
- materialSpecularButton.setRGB(
- new RGB(
- (int) (colorValues[6][0] * 255),
- (int) (colorValues[6][1] * 255),
- (int) (colorValues[6][2] * 255)));
- materialSpecularButton
- .addColorSelectionListener(new IColorSelectionListener() {
- public void handleColorSelection(RGB rgb) {
- colorValues[6][0] = ((float) rgb.red) / 255;
- colorValues[6][1] = ((float) rgb.green) / 255;
- colorValues[6][2] = ((float) rgb.blue) / 255;
- setColorValues();
- }
- });
-
- new Label(composite, SWT.NONE).setText("Material Shininess:");
- final Slider shineSlider = new Slider(composite, SWT.NONE);
- shineSlider.setIncrement(5);
- shineSlider.setMaximum(102);
- shineSlider.setMinimum(0);
- shineSlider.setThumb(2);
- shineSlider.setPageIncrement(10);
- shineSlider.setSelection(25);
- shineSlider.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- materialShininess[0] = shineSlider.getSelection();
- GL.glMaterialfv(GL.GL_FRONT_AND_BACK,
- GL.GL_SHININESS,
- materialShininess);
- }
- });
- }
-
- /**
- * @see OpenGLTab#dispose()
- */
- void dispose() {
- super.dispose();
- GLU.gluDeleteQuadric(quadratic);
- GL.glDeleteLists(sphere, 1);
- }
-
- /**
- * @see OpenGLTab#getTabText()
- */
- String getTabText() {
- return "Light";
- }
-
- /**
- * @see OpenGLTab#init()
- */
- void init() {
- GL.glClearColor(1.0f, 1.0f, 1.0f, 1.0f);
- GL.glClearDepth(1.0);
- setColorValues();
- GL.glMaterialfv(GL.GL_FRONT_AND_BACK, GL.GL_SHININESS, materialShininess);
- quadratic = GLU.gluNewQuadric();
- GLU.gluQuadricNormals(quadratic, GLU.GLU_SMOOTH);
- GL.glHint(GL.GL_LINE_SMOOTH_HINT, GL.GL_NICEST);
- GL.glHint(GL.GL_PERSPECTIVE_CORRECTION_HINT, GL.GL_NICEST);
- GL.glBlendFunc(GL.GL_SRC_ALPHA, GL.GL_ONE_MINUS_SRC_ALPHA);
- GL.glPointSize(2.0f);
- GL.glEnable(GL.GL_LIGHTING);
- GL.glEnable(GL.GL_LIGHT0);
- GL.glEnable(GL.GL_DEPTH_TEST);
- sphere = GL.glGenLists(1);
- GL.glNewList(sphere, GL.GL_COMPILE);
- GLU.gluSphere(quadratic, 3, 32, 32);
- GL.glEndList();
- }
-
- /**
- * @see OpenGLTab#renderScene()
- */
- void renderScene() {
- GL.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
- GL.glLoadIdentity();
- GL.glLightfv(GL.GL_LIGHT0, GL.GL_POSITION, lightPosition);
- GL.glTranslatef(xPos, yPos, zPos);
- GL.glCallList(sphere);
- }
-
- /**
- * Sets the current color values into the rendered display.
- */
- void setColorValues() {
- GL.glLightfv(GL.GL_LIGHT0, GL.GL_DIFFUSE, colorValues[0]);
- GL.glMaterialfv(GL.GL_FRONT_AND_BACK, GL.GL_DIFFUSE, colorValues[4]);
- GL.glMaterialfv(GL.GL_FRONT_AND_BACK, GL.GL_AMBIENT, colorValues[5]);
- GL.glLightfv(GL.GL_LIGHT0, GL.GL_AMBIENT, colorValues[1]);
- GL.glLightfv(GL.GL_LIGHT0, GL.GL_SPECULAR, colorValues[2]);
- GL.glMaterialfv(GL.GL_FRONT_AND_BACK, GL.GL_SPECULAR, colorValues[6]);
- GL.glLightModelfv(GL.GL_LIGHT_MODEL_AMBIENT, colorValues[3]);
- GL.glMaterialfv(GL.GL_FRONT_AND_BACK, GL.GL_SHININESS, materialShininess);
- }
-}
diff --git a/examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/NurbTab.java b/examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/NurbTab.java
deleted file mode 100644
index c25e8c6647..0000000000
--- a/examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/NurbTab.java
+++ /dev/null
@@ -1,294 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.opengl.examples;
-
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.opengl.*;
-import org.eclipse.swt.widgets.*;
-
-class NurbTab extends OpenGLTab {
- private float xPos = -5.0f, yPos = -5.0f, zPos = -25.0f;
- private float xRot = 330.0f, yRot = 0.0f, zRot = 0.0f;
- private int nurb;
-
- /**
- * Returns a 3 dimensional array to store vertex points for the nurb
- * surface.
- *
- * @return the array
- */
- float[][][] buildNurb() {
- float[][][] ctrl = new float[4][4][3];
- for (int i = 0; i < 4; i++) {
- for (int j = 0; j < 4; j++) {
- // set the x value
- ctrl[i][j][0] = 2 * (i + (float) Math.cos(i + j));
- // set the y value
- ctrl[i][j][1] = 2 * (j + (float) Math.cos(i + j));
- // set the z value
- if ((i == 1 && j == 1) || (i == 2 && j == 2)) {
- // this makes the hill
- ctrl[i][j][2] = 6.0f;
- } else {
- ctrl[i][j][2] = 0.0f;
- }
- }
- }
- // sets this particular z value to a large number to make a high
- // hill
- ctrl[2][2][2] = 8.0f;
-
- return ctrl;
- }
-
- /**
- * Returns a 1 dimensional array representing the 3 dimensional
- * argument. This result can be passed to the nurb renderer
- *
- * @param ctrl source 3D array
- * @return 1D array
- */
- float[] convert(float[][][] ctrl) {
- float[] pts =
- new float[ctrl.length * ctrl[0].length * ctrl[0][0].length];
- int row = 0;
- int col = 0;
- // set rowIncr to number of columns * depth
- int rowIncr = ctrl[0].length * ctrl[0][0].length;
- // set colIncr to depth
- int colIncr = ctrl[0][0].length;
- // loop through rows
- for (int i = 0; i < ctrl.length; i++) {
- col = 0;
- // loop through columns
- for (int j = 0; j < ctrl[0].length; j++) {
- // loop through to get the depth values
- for (int k = 0; k < ctrl[0][0].length; k++) {
- pts[row + col + k] = ctrl[i][j][k];
- }
- col += colIncr;
- }
- row += rowIncr;
- }
- return pts;
- }
-
- /**
- * @see OpenGLTab#createControls(Composite)
- */
- void createControls(final Composite composite) {
- Group movementGroup = new Group(composite, SWT.NONE);
- movementGroup.setText("Translation");
- movementGroup.setLayout(new GridLayout(2, false));
-
- new Label(movementGroup, SWT.NONE).setText("X:");
- final Slider xMove = new Slider(movementGroup, SWT.NONE);
- xMove.setIncrement(1);
- xMove.setMaximum(12);
- xMove.setMinimum(0);
- xMove.setThumb(2);
- xMove.setPageIncrement(2);
- xMove.setSelection(5);
- xMove.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- xPos = xMove.getSelection() - 10;
- }
- });
-
- new Label(movementGroup, SWT.NONE).setText("Y:");
- final Slider yMove = new Slider(movementGroup, SWT.NONE);
- yMove.setIncrement(1);
- yMove.setMaximum(12);
- yMove.setMinimum(0);
- yMove.setThumb(2);
- yMove.setPageIncrement(2);
- yMove.setSelection(5);
- yMove.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- yPos = yMove.getSelection() - 10;
- }
- });
-
- new Label(movementGroup, SWT.NONE).setText("Z:");
- final Slider zMove = new Slider(movementGroup, SWT.NONE);
- zMove.setIncrement(1);
- zMove.setMaximum(12);
- zMove.setMinimum(0);
- zMove.setThumb(2);
- zMove.setPageIncrement(2);
- zMove.setSelection(5);
- zMove.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- zPos = zMove.getSelection() - 30;
- }
- });
-
- Group rotationGroup = new Group(composite, SWT.NONE);
- rotationGroup.setText("Rotation");
- rotationGroup.setLayout(new GridLayout(2, false));
-
- new Label(rotationGroup, SWT.NONE).setText("X:");
- final Slider xRotation = new Slider(rotationGroup, SWT.NONE);
- xRotation.setIncrement(10);
- xRotation.setMaximum(362);
- xRotation.setMinimum(0);
- xRotation.setThumb(2);
- xRotation.setPageIncrement(20);
- xRotation.setSelection(330);
- xRotation.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- xRot = xRotation.getSelection();
- }
- });
-
- new Label(rotationGroup, SWT.NONE).setText("Y:");
- final Slider yRotation = new Slider(rotationGroup, SWT.NONE);
- yRotation.setIncrement(10);
- yRotation.setMaximum(362);
- yRotation.setMinimum(0);
- yRotation.setThumb(2);
- yRotation.setPageIncrement(20);
- yRotation.setSelection(0);
- yRotation.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- yRot = yRotation.getSelection();
- }
- });
-
- new Label(rotationGroup, SWT.NONE).setText("Z:");
- final Slider zRotation = new Slider(rotationGroup, SWT.NONE);
- zRotation.setIncrement(10);
- zRotation.setMaximum(362);
- zRotation.setMinimum(0);
- zRotation.setThumb(2);
- zRotation.setPageIncrement(20);
- zRotation.setSelection(0);
- zRotation.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- zRot = zRotation.getSelection();
- }
- });
-
- new Label(composite, SWT.NONE).setText("Sampling Tolerance:");
- final Slider sSlider = new Slider(composite, SWT.NONE);
- sSlider.setIncrement(1);
- sSlider.setMaximum(101);
- sSlider.setMinimum(0);
- sSlider.setThumb(2);
- sSlider.setPageIncrement(2);
- sSlider.setSelection(75);
- sSlider.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- GLU.gluNurbsProperty(
- nurb,
- GLU.GLU_SAMPLING_TOLERANCE,
- sSlider.getSelection() + 1);
- }
- });
-
- final Button fillButton = new Button(composite, SWT.CHECK);
- fillButton.setText("Fill");
- fillButton.setSelection(true);
- fillButton.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- if (fillButton.getSelection()) {
- GLU.gluNurbsProperty(
- nurb,
- GLU.GLU_DISPLAY_MODE,
- GLU.GLU_FILL);
- } else {
- GLU.gluNurbsProperty(
- nurb,
- GLU.GLU_DISPLAY_MODE,
- GLU.GLU_OUTLINE_POLYGON);
- }
- }
- });
-
- ColorSelectionGroup colorGroup =
- new ColorSelectionGroup(composite, SWT.NONE);
- colorGroup.setText("Foreground color");
- colorGroup.addColorSelectionListener(new IColorSelectionListener() {
- public void handleColorSelection(RGB rgb) {
- GL.glColor3ub((byte) rgb.red, (byte) rgb.green, (byte) rgb.blue);
- }
- });
- }
-
- /**
- * @see OpenGLTab#dispose()
- */
- void dispose() {
- super.dispose();
- GLU.gluDeleteNurbsRenderer(nurb);
- }
-
- /**
- * @see OpenGLTab#getTabText()
- */
- String getTabText() {
- return "Nurb";
- }
-
- /**
- * @see OpenGLTab#init()
- */
- void init() {
- GL.glClearColor(1.0f, 1.0f, 1.0f, 1.0f);
- GL.glColor3f(1.0f, 0.0f, 0.0f);
- // set up material color which helps show curves
- float mat_specular[] = { 1.0f, 1.0f, 1.0f, 1.0f };
- float mat_shininess[] = { 100.0f };
- GL.glMaterialfv(GL.GL_FRONT_AND_BACK, GL.GL_SPECULAR, mat_specular);
- GL.glMaterialfv(GL.GL_FRONT_AND_BACK, GL.GL_SHININESS, mat_shininess);
- GL.glColorMaterial(GL.GL_FRONT_AND_BACK, GL.GL_AMBIENT_AND_DIFFUSE);
-
- GL.glEnable(GL.GL_LIGHTING);
- GL.glEnable(GL.GL_LIGHT0);
- GL.glEnable(GL.GL_COLOR_MATERIAL);
- GL.glEnable(GL.GL_DEPTH_TEST);
- GL.glEnable(GL.GL_AUTO_NORMAL);
- GL.glEnable(GL.GL_NORMALIZE);
-
- nurb = GLU.gluNewNurbsRenderer();
-
- GLU.gluNurbsProperty(
- nurb,
- GLU.GLU_SAMPLING_METHOD,
- GLU.GLU_PATH_LENGTH);
- // sampling tolerance is specific for GLU.GLU_PATH_LENGTH
- GLU.gluNurbsProperty(nurb, GLU.GLU_SAMPLING_TOLERANCE, 75.0f);
- GLU.gluNurbsProperty(nurb, GLU.GLU_DISPLAY_MODE, GLU.GLU_FILL);
- }
-
- /**
- * @see OpenGLTab#renderScene()
- */
- void renderScene() {
- GL.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
- GL.glLoadIdentity();
- // do translation and rotation
- GL.glTranslatef(xPos, yPos, zPos);
- GL.glRotatef(xRot, 1.0f, 0.0f, 0.0f);
- GL.glRotatef(yRot, 0.0f, 1.0f, 0.0f);
- GL.glRotatef(zRot, 0.0f, 0.0f, 1.0f);
- // define nurbs surface
- float[] knots = { 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 1.0f };
- GLU.gluBeginSurface(nurb);
- GLU.gluNurbsSurface(
- nurb, 8, knots, 8, knots, 12, 3,
- convert(buildNurb()), 4, 4, GL.GL_MAP2_VERTEX_3);
- GLU.gluEndSurface(nurb);
- }
-}
diff --git a/examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/ObjectsTab.java b/examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/ObjectsTab.java
deleted file mode 100644
index 3ef288e451..0000000000
--- a/examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/ObjectsTab.java
+++ /dev/null
@@ -1,376 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.opengl.examples;
-
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.opengl.*;
-import org.eclipse.swt.widgets.*;
-
-class ObjectsTab extends OpenGLTab {
- private class Shape {
- private String name;
- private int index;
- /**
- * Constructor.
- *
- * @param name the display name of this shape
- * @param index the display list index corresponding to this shape
- */
- Shape(String name, int index) {
- super();
- this.index = index;
- this.name = name;
- }
- void dispose() {
- GL.glDeleteLists(index, 1);
- }
- void draw() {
- GL.glCallList(index);
- }
- String getName() {
- return name;
- }
- }
-
- private Shape[] shapes;
- private Shape currentShape;
- private float xRot = 0.0f, yRot = 0.0f;
- private boolean fill = true;
- private int quadratic;
- private final static int SLEEP_LENGTH = 50;
-
- /**
- * @see OpenGLTab#createControls(Composite)
- */
- void createControls(final Composite composite) {
- GridLayout layout = new GridLayout(2, false);
- layout.marginWidth = 0;
- Composite controls = new Composite(composite, SWT.NONE);
- controls.setLayout(layout);
-
- new Label(controls, SWT.NONE).setText("Object:");
- final Combo objectsCombo = new Combo(controls, SWT.READ_ONLY);
- for (int i = 0; i < shapes.length; i++) {
- objectsCombo.add(shapes[i].getName());
- }
- objectsCombo.select(0);
- objectsCombo.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- currentShape = shapes[objectsCombo.getSelectionIndex()];
- }
- });
-
- final Button fillToggleButton = new Button(controls, SWT.CHECK);
- fillToggleButton.setText("Fill");
- fillToggleButton.setSelection(true);
- fillToggleButton.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- fill = fillToggleButton.getSelection();
- }
- });
-
- ColorSelectionGroup colorGroup =
- new ColorSelectionGroup(composite, SWT.NONE);
- colorGroup.setText("Foreground color");
- colorGroup.addColorSelectionListener(new IColorSelectionListener() {
- public void handleColorSelection(RGB rgb) {
- GL.glColor3ub((byte) rgb.red, (byte) rgb.green, (byte) rgb.blue);
- }
- });
- }
-
- /**
- * @see OpenGLTab#dispose()
- */
- void dispose() {
- super.dispose();
- GLU.gluDeleteQuadric(quadratic);
- for (int i = 0; i < shapes.length; i++) {
- shapes [i].dispose();
- }
- }
-
- /**
- * Creates a circle centered at 0,0 in the viewport.
- *
- * @param radius
- * @param xShrink
- * @param yShrink
- */
- void drawCircle(float radius, float xShrink, float yShrink) {
- GL.glBegin(GL.GL_POLYGON);
- float dia = (float) 2.0 * (float) Math.PI;
- for (float angle = 0.0f; angle <= dia; angle += 0.1f) {
- GL.glVertex2d(radius * Math.cos(angle), radius * Math.sin(angle));
- }
- GL.glEnd();
- }
-
- /**
- * Creates a cube centered at 0,0 in the viewport.
- *
- * @param width
- * @param height
- * @param depth
- */
- void drawCube(float width, float height, float depth) {
- GL.glBegin(GL.GL_QUADS);
- // front
- GL.glVertex3f(-width, -height, depth); // bottom left
- GL.glVertex3f(width, -height, depth); // bottom right
- GL.glVertex3f(width, height, depth); // top right
- GL.glVertex3f(-width, height, depth); // top left
- // back
- GL.glVertex3f(-width, -height, -depth); // bottom left
- GL.glVertex3f(width, -height, -depth); // bottom right
- GL.glVertex3f(width, height, -depth); // top right
- GL.glVertex3f(-width, height, -depth); // top left
- // left
- GL.glVertex3f(-width, -height, -depth); // bottom left
- GL.glVertex3f(-width, -height, depth); // bottom right
- GL.glVertex3f(-width, height, depth); // top right
- GL.glVertex3f(-width, height, -depth); // top left
- // right
- GL.glVertex3f(width, -height, depth); // bottom left
- GL.glVertex3f(width, -height, -depth); // bottom right
- GL.glVertex3f(width, height, -depth); // top right
- GL.glVertex3f(width, height, depth); // top left
- // top
- GL.glVertex3f(width, height, -depth); // back right
- GL.glVertex3f(-width, height, -depth); // back left
- GL.glVertex3f(-width, height, depth); // front left
- GL.glVertex3f(width, height, depth); // front right
- // bottom
- GL.glVertex3f(width, -height, depth); // front right
- GL.glVertex3f(-width, -height, depth); // front left
- GL.glVertex3f(-width, -height, -depth); // back left
- GL.glVertex3f(width, -height, -depth); // back right
- GL.glEnd();
- }
-
- /**
- * Creates a pyramid centered at 0,0 in the viewport.
- *
- * @param width
- * @param height
- * @param depth
- */
- void drawPyramid(float width, float height, float depth) {
- GL.glBegin(GL.GL_TRIANGLES);
- // front
- GL.glVertex3f(0.0f, height, 0.0f); // top
- GL.glVertex3f(-width, -height, depth); // left
- GL.glVertex3f(width, -height, depth); // right
- // left
- GL.glVertex3f(0.0f, height, 0.0f); // top
- GL.glVertex3f(-width, -height, -depth); // left
- GL.glVertex3f(-width, -height, depth); // right
- // front
- GL.glVertex3f(-width, -height, -depth); // left
- GL.glVertex3f(0.0f, height, 0.0f); // top
- GL.glVertex3f(width, -height, -depth); // right
- // right
- GL.glVertex3f(0.0f, height, 0.0f); // top
- GL.glVertex3f(width, -height, depth); // left
- GL.glVertex3f(width, -height, -depth); // right
- GL.glEnd();
- GL.glBegin(GL.GL_QUADS);
- // bottom
- GL.glVertex3f(-width, -height, depth); // front left
- GL.glVertex3f(-width, -height, -depth); // back left
- GL.glVertex3f(width, -height, -depth); // back right
- GL.glVertex3f(width, -height, depth); // front right
- GL.glEnd();
- }
-
- /**
- * Creates a square centered at 0,0 in the viewport.
- *
- * @param width
- * @param height
- */
- void drawSquare(float width, float height) {
- GL.glBegin(GL.GL_QUADS);
- GL.glVertex3f(-width, -height, 0.0f); // bottom left
- GL.glVertex3f(width, -height, 0.0f); // bottom right
- GL.glVertex3f(width, height, 0.0f); // top right
- GL.glVertex3f(-width, height, 0.0f); // top left
- GL.glEnd();
- }
-
- /**
- * This method is from glut_shapes.c .
- *
- * @param r
- * @param R
- * @param nsides
- * @param rings
- */
- void drawTorus(float r, float R, int nsides, int rings) {
- float ringDelta = 2.0f * (float) Math.PI / rings;
- float sideDelta = 2.0f * (float) Math.PI / nsides;
- float theta = 0.0f;
- float cosTheta = 1.0f;
- float sinTheta = 0.0f;
-
- for (int i = rings - 1; i >= 0; i--) {
- float theta1 = theta + ringDelta;
- float cosTheta1 = (float) Math.cos(theta1);
- float sinTheta1 = (float) Math.sin(theta1);
- GL.glBegin(GL.GL_QUAD_STRIP);
- float phi = 0.0f;
-
- for (int j = nsides; j >= 0; j--) {
- phi += sideDelta;
- float cosPhi = (float) Math.cos(phi);
- float sinPhi = (float) Math.sin(phi);
- float dist = R + r * cosPhi;
- GL.glNormal3f(cosTheta1 * cosPhi, -sinTheta1 * cosPhi, sinPhi);
- GL.glVertex3f(cosTheta1 * dist, -sinTheta1 * dist, r * sinPhi);
- GL.glNormal3f(cosTheta * cosPhi, -sinTheta * cosPhi, sinPhi);
- GL.glVertex3f(cosTheta * dist, -sinTheta * dist, r * sinPhi);
- }
-
- GL.glEnd();
- theta = theta1;
- cosTheta = cosTheta1;
- sinTheta = sinTheta1;
- }
- }
-
- /**
- * Creates a triangle centered at 0,0 in the viewport.
- *
- * @param width
- * @param height
- */
- void drawTriangle(float width, float height) {
- GL.glBegin(GL.GL_TRIANGLES);
- GL.glVertex3f(0.0f, height, 0.0f); // middle
- GL.glVertex3f(-width, -height, 0.0f); // left
- GL.glVertex3f(width, -height, 0.0f); // right
- GL.glEnd();
- }
-
- /**
- * @see OpenGLTab#getSleepLength()
- */
- int getSleepLength() {
- return SLEEP_LENGTH;
- }
-
- /**
- * @see OpenGLTab#getTabText()
- */
- String getTabText() {
- return "Objects";
- }
-
- /**
- * @see OpenGLTab#init()
- */
- void init() {
- GL.glClearColor(1.0f, 1.0f, 1.0f, 1.0f);
- GL.glColor3f(1.0f, 0.0f, 0.0f);
- GL.glHint(GL.GL_PERSPECTIVE_CORRECTION_HINT, GL.GL_NICEST);
- GL.glClearDepth(1.0);
- quadratic = GLU.gluNewQuadric();
- GLU.gluQuadricNormals(quadratic, GLU.GLU_SMOOTH);
- GL.glLineWidth(2);
-
- GL.glEnable(GL.GL_DEPTH_TEST);
-
- // create the display lists and shapes
- shapes = new Shape[11];
- int index = 1;
-
- GL.glNewList(index, GL.GL_COMPILE);
- drawTriangle(2.0f, 2.0f);
- GL.glEndList();
- shapes[0] = new Shape("Triangle", index++);
-
- GL.glNewList(index, GL.GL_COMPILE);
- drawPyramid(2.0f, 2.0f, 2.0f);
- GL.glEndList();
- shapes[1] = new Shape("Pyramid", index++);
-
- GL.glNewList(index, GL.GL_COMPILE);
- drawSquare(2.0f, 2.0f);
- GL.glEndList();
- shapes[2] = new Shape("Square", index++);
-
- GL.glNewList(index, GL.GL_COMPILE);
- drawCube(2.0f, 2.0f, 2.0f);
- GL.glEndList();
- shapes[3] = new Shape("Cube", index++);
-
- GL.glNewList(index, GL.GL_COMPILE);
- drawCircle(2.0f, 0.0f, 0.0f);
- GL.glEndList();
- shapes[4] = new Shape("Circle", index++);
-
- GL.glNewList(index, GL.GL_COMPILE);
- GLU.gluPartialDisk(quadratic, 0.5, 2.0, 18, 18, 90, 125);
- GL.glEndList();
- shapes[5] = new Shape("Partial Disk", index++);
-
- GL.glNewList(index, GL.GL_COMPILE);
- GLU.gluDisk(quadratic, 0.5, 2.0, 18, 18);
- GL.glEndList();
- shapes[6] = new Shape("Disk", index++);
-
- GL.glNewList(index, GL.GL_COMPILE);
- drawTorus(1, 2, 18, 18);
- GL.glEndList();
- shapes[7] = new Shape("Torus", index++);
-
- GL.glNewList(index, GL.GL_COMPILE);
- GLU.gluSphere(quadratic, 2.0, 18, 18);
- GL.glEndList();
- shapes[8] = new Shape("Sphere", index++);
-
- GL.glNewList(index, GL.GL_COMPILE);
- GLU.gluCylinder(quadratic, 2.0, 2.0, 4, 18, 18);
- GL.glEndList();
- shapes[9] = new Shape("Cylinder", index++);
-
- GL.glNewList(index, GL.GL_COMPILE);
- GLU.gluCylinder(quadratic, 0, 2.0, 4, 18, 18);
- GL.glEndList();
- shapes[10] = new Shape("Cone", index++);
-
- currentShape = shapes[0];
- }
-
- /**
- * @see OpenGLTab#renderScene()
- */
- void renderScene() {
- GL.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
- GL.glLoadIdentity();
- GL.glTranslatef(0.0f, 0.0f, -14.0f);
- // rotate around X and Y axis
- GL.glRotatef(yRot, 0.0f, 1.0f, 0.0f);
- GL.glRotatef(xRot, 1.0f, 0.0f, 0.0f);
- // sets polygon fill mode
- if (fill) {
- GL.glPolygonMode(GL.GL_FRONT_AND_BACK, GL.GL_FILL);
- } else {
- GL.glPolygonMode(GL.GL_FRONT_AND_BACK, GL.GL_LINE);
- }
- currentShape.draw();
- yRot += 1.5;
- xRot += 1.5;
- }
-}
diff --git a/examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/OpenGLExample.java b/examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/OpenGLExample.java
deleted file mode 100644
index 9e7e10d53f..0000000000
--- a/examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/OpenGLExample.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.opengl.examples;
-
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-
-public class OpenGLExample {
- private TabFolder tabFolder;
- private OpenGLTab[] tabs;
- private int sleep;
-
- /**
- * Renders the scene of the current tab.
- */
- void display() {
- int index = tabFolder.getSelectionIndex();
- tabs[index].render();
- tabs[index].swap();
- }
-
- /**
- * Disposes of all contained tabs.
- */
- void dispose() {
- tabFolder = null;
- for (int i = 0; i < tabs.length; i++) {
- tabs[i].dispose();
- }
- }
-
- /**
- * Runs the OpenGL example
- */
- void run() {
- final Display display = new Display();
- final Shell shell =
- new Shell(display, SWT.SHELL_TRIM | SWT.NO_BACKGROUND);
- shell.setLayout(new FillLayout());
-
- tabFolder = new TabFolder(shell, SWT.NONE);
- tabs =
- new OpenGLTab[] {
- new AntialiasingTab(),
- new AreaTab(),
- new BezierTab(),
- new BitmapTextTab(),
- new FogTab(),
- new GradientTab(),
- new LightTab(),
- new NurbTab(),
- new ObjectsTab(),
- // outline tab is windows specific
- new OutlineTextTab (),
- new ReflectionTab(),
- new StencilTab(),
- new TextureTab(),
- new TransparencyTab()};
-
- for (int i = 0; i < tabs.length; i++) {
- TabItem item = new TabItem(tabFolder, SWT.NONE);
- item.setText(tabs[i].getTabText());
- item.setControl(tabs[i].createTabFolderPage(tabFolder));
- }
-
- tabFolder.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- OpenGLTab tab = tabs[tabFolder.getSelectionIndex()];
- tab.setCurrent();
- sleep = tab.getSleepLength();
- }
- });
- if (tabs.length > 0) {
- tabs[0].setCurrent();
- sleep = tabs[0].getSleepLength();
- }
-
- shell.setText("OpenGL Example");
- Runnable timer = new Runnable() {
- public void run() {
- if (shell.isDisposed()) return;
- display();
- display.timerExec(sleep, this);
- }
- };
- timer.run();
- shell.addListener(SWT.Dispose, new Listener() {
- public void handleEvent(Event e) {
- dispose();
- }
- });
- shell.open();
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch()) {
- display.sleep();
- }
- }
- }
-
- /**
- * Invokes as a standalone program.
- */
- public static void main(String[] args) {
- new OpenGLExample().run();
- }
-}
diff --git a/examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/OpenGLTab.java b/examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/OpenGLTab.java
deleted file mode 100644
index d8523b9e0c..0000000000
--- a/examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/OpenGLTab.java
+++ /dev/null
@@ -1,243 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.opengl.examples;
-
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.opengl.*;
-
-/**
- * <code>OpenGLTab</code> is the abstract superclass of every page
- * in the example's tab folder. Each page in the tab folder
- * displays a different example.
- *
- * An OpenGLTab itself is not a control but instead provides a hierarchy
- * with which to share code that is common to every page in the folder.
- */
-abstract class OpenGLTab {
- private Canvas glCanvas;
- private Composite tabFolderPage;
- private GLContext context;
- private boolean stencilSupport;
- private final static int DEFAULT_SLEEP_LENGTH = 100;
-
- /**
- * Creates this tab's controls. Subclasses must override.
- *
- * @param composite the parent composite
- */
- abstract void createControls(Composite composite);
-
- /**
- * Creates the OpenGL canvas on which all drawing is done.
- */
- void createOpenGLContext() {
- context = new GLContext(glCanvas);
- setCurrent();
- setupViewingArea();
- }
-
- /**
- * Creates the tab folder page.
- *
- * @param tabFolder the parent tab folder
- * @return the new page
- */
- Composite createTabFolderPage(TabFolder tabFolder) {
- tabFolderPage = new Composite(tabFolder, SWT.NONE);
- tabFolderPage.setLayout(new GridLayout(2, false));
-
- GridData gridData = new GridData();
- gridData.heightHint = 400;
- gridData.widthHint = 400;
- gridData.verticalAlignment = GridData.BEGINNING;
- glCanvas = new Canvas(tabFolderPage, SWT.NONE);
- glCanvas.setLayout(new GridLayout());
- glCanvas.setLayoutData(gridData);
- glCanvas.setSize(400, 400); // needed for windows
-
- gridData = new GridData();
- gridData.verticalAlignment = GridData.BEGINNING;
- Composite controlComposite = new Composite(tabFolderPage, SWT.NONE);
- controlComposite.setLayout(new GridLayout());
- controlComposite.setLayoutData(gridData);
-
- // create the OpenGL Screen and controls
- createOpenGLContext();
-
- // determine if native stencil support is available
- int[] param = new int[1];
- GL.glGetIntegerv(GL.GL_STENCIL_BITS, param);
- stencilSupport = param[0] != 0;
-
- init();
-
- if (!isStencilSupportNeeded() || hasStencilSupport()) {
- createControls(controlComposite);
- } else {
- Label label = new Label(controlComposite, SWT.NONE);
- label.setText("This tab requires native stencil support.");
- }
-
- return tabFolderPage;
- }
-
- /**
- * Disposes all resources allocated by this tab.
- */
- void dispose() {
- context.dispose();
- }
-
- /**
- * Returns the context for this tab.
- *
- * @return GLContext
- */
- GLContext getContext() {
- return context;
- }
-
- /**
- * Returns the glCanvas for this tab.
- *
- * @return Canvas
- */
- Canvas getGlCanvas() {
- return glCanvas;
- }
-
- /**
- * Returns the length of time in milliseconds that the example
- * should sleep between animation redraws. As this length
- * increases, user responsiveness increases and the frequency of
- * animation redraws decreases. Subclasses with moving animations
- * may wish to override this default implementation to return a
- * smaller value if their animations do not occur frequently enough.
- *
- * @return the length of time in milliseconds to sleep between redraws
- */
- int getSleepLength() {
- return DEFAULT_SLEEP_LENGTH;
- }
-
- /**
- * Returns the text for this tab. Subclasses must override.
- *
- * @return the text for the tab item
- */
- abstract String getTabText();
-
- /**
- * Returns whether this machine has native stencils support.
- *
- * @return boolean
- */
- boolean hasStencilSupport() {
- return stencilSupport;
- }
-
- /**
- * Initialize OpenGL resources for this tab. Subclasses must override.
- */
- abstract void init();
-
- /**
- * Loads a texture.
- *
- * @param context
- * @param fileName
- * @param index
- * @param texture[]
- */
- static void loadTexture(GLContext context, String fileName, int index, int[] texture) {
- GL.glBindTexture(GL.GL_TEXTURE_2D, texture[index]);
- ImageData source =
- new ImageData(OpenGLTab.class.getResourceAsStream(fileName));
- Image image = new Image(Display.getCurrent(), source);
- Image newImage = new Image(Display.getCurrent(), 256, 256);
- GC gc = new GC(newImage);
- gc.drawImage(image, 0, 0, source.width, source.height, 0, 0, 256, 256);
- source = newImage.getImageData();
- gc.dispose();
- source = context.convertImageData(source);
- newImage.dispose();
- image.dispose();
- GL.glTexImage2D(
- GL.GL_TEXTURE_2D, 0, 3,
- source.width, source.height, 0,
- GL.GL_RGB, GL.GL_UNSIGNED_BYTE, source.data);
- GL.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_MIN_FILTER, GL.GL_LINEAR);
- GL.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_MAG_FILTER, GL.GL_LINEAR);
- }
-
- /**
- * Renders this tab.
- */
- void render() {
- if (!isStencilSupportNeeded() || hasStencilSupport()) {
- renderScene();
- } else {
- GL.glClear(GL.GL_COLOR_BUFFER_BIT);
- }
- }
-
- /**
- * Renders the scene for this tab. Subclasses must override.
- */
- abstract void renderScene();
-
- /**
- * Returns whether this tab requires stencil support in order to display
- * properly. Subclasses may wish to override this method.
- *
- * @return boolean
- */
- boolean isStencilSupportNeeded() {
- return false;
- }
-
- /**
- * Sets this rendering context to be current.
- */
- void setCurrent() {
- context.setCurrent();
- }
-
- /**
- * Sets up the viewing area for the OpenGL screen. The default
- * behavior is to use a perspective view, but there also exist frustrum
- * and ortho views. Subclasses may wish to override this method.
- */
- void setupViewingArea() {
- Rectangle rect = glCanvas.getClientArea();
- int width = rect.width;
- int height = rect.height;
- height = Math.max(height, 1);
- GL.glViewport(0, 0, width, height);
- GL.glMatrixMode(GL.GL_PROJECTION); // select the projection matrix
- GL.glLoadIdentity(); // reset the projection matrix
- float fAspect = (float) width / (float) height;
- GLU.gluPerspective(45.0f, fAspect, 0.5f, 400.0f);
- GL.glMatrixMode(GL.GL_MODELVIEW); // select the modelview matrix
- GL.glLoadIdentity();
- }
-
- /**
- * Swaps the buffers.
- */
- void swap() {
- context.swapBuffers();
- }
-}
diff --git a/examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/OutlineTextTab.java b/examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/OutlineTextTab.java
deleted file mode 100644
index 0742f0056d..0000000000
--- a/examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/OutlineTextTab.java
+++ /dev/null
@@ -1,251 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.opengl.examples;
-
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.opengl.*;
-import org.eclipse.swt.widgets.*;
-
-class OutlineTextTab extends OpenGLTab {
- private Text messageText;
- private FontData fontData;
- private float[] textColor = { 1.0f, 0.0f, 0.0f };
- private boolean fill = true;
- private float extrude = 0.0f;
- private float xPos = 0.0f, yPos = 0.0f, zPos = -10.0f;
- private float xRot = 0.0f;
- private int listIndexBase;
- private final static int LIST_INDEX_SIZE = 256;
- private final static int DEFAULT_FONT_SIZE = 24;
- private final static String DEFAULT_FONT_NAME = "Arial";
- private final static int SLEEP_LENGTH = 50;
-
- /**
- * @see OpenGLTab#createControls(Composite)
- */
- void createControls(final Composite composite) {
- if (!SWT.getPlatform().startsWith("win32")) {
- new Label(composite, SWT.NONE).setText("This tab requires win32.");
- return;
- }
-
- Group movementGroup = new Group(composite, SWT.NONE);
- movementGroup.setText("Translation");
- movementGroup.setLayout(new GridLayout(2, false));
-
- new Label(movementGroup, SWT.NONE).setText("X:");
- final Slider xMove = new Slider(movementGroup, SWT.NONE);
- xMove.setIncrement(1);
- xMove.setMaximum(22);
- xMove.setMinimum(0);
- xMove.setThumb(2);
- xMove.setPageIncrement(2);
- xMove.setSelection(10);
- xMove.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- xPos = xMove.getSelection() - 10;
- }
- });
-
- new Label(movementGroup, SWT.NONE).setText("Y:");
- final Slider yMove = new Slider(movementGroup, SWT.NONE);
- yMove.setIncrement(1);
- yMove.setMaximum(22);
- yMove.setMinimum(0);
- yMove.setThumb(2);
- yMove.setPageIncrement(2);
- yMove.setSelection(10);
- yMove.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- yPos = yMove.getSelection() - 10;
- }
- });
-
- new Label(movementGroup, SWT.NONE).setText("Z:");
- final Slider zMove = new Slider(movementGroup, SWT.NONE);
- zMove.setIncrement(1);
- zMove.setMaximum(22);
- zMove.setMinimum(0);
- zMove.setThumb(2);
- zMove.setPageIncrement(2);
- zMove.setSelection(10);
- zMove.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- zPos = zMove.getSelection() - 20;
- }
- });
-
- Composite textGroup = new Composite(composite,SWT.NONE);
- GridLayout layout = new GridLayout(2,false);
- layout.marginHeight = 0;
- layout.marginWidth = 0;
- textGroup.setLayout(layout);
- textGroup.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
-
- new Label(textGroup, SWT.NONE).setText("Text:");
- messageText = new Text(textGroup, SWT.BORDER);
- GridData data = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
- data.grabExcessHorizontalSpace = true;
- messageText.setLayoutData(data);
- messageText.setText("OpenGL - SWT");
-
- new Label(composite, SWT.NONE).setText("Extrude:");
- final Slider extrudeSlider = new Slider(composite, SWT.NONE);
- extrudeSlider.setIncrement(1);
- extrudeSlider.setMaximum(22);
- extrudeSlider.setMinimum(0);
- extrudeSlider.setThumb(2);
- extrudeSlider.setPageIncrement(2);
- extrudeSlider.setSelection(0);
- extrudeSlider.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- extrude = (float) extrudeSlider.getSelection() / 10;
- getContext().loadOutlineFont(
- fontData, extrudeSlider.getDisplay(),
- listIndexBase, 0, 255, 0.0f, extrude,
- fill ? GL.GL_POLYGON : GL.GL_LINE,
- null);
- }
- });
-
- final Button fontSelectButton = new Button(composite, SWT.NONE);
- fontSelectButton.setText("Set Font");
- final ColorSelectionGroup colorGroup =
- new ColorSelectionGroup(composite, SWT.NONE);
- colorGroup.setText("Text color");
- colorGroup.addColorSelectionListener(new IColorSelectionListener() {
- public void handleColorSelection(RGB rgb) {
- GL.glColor3ub((byte) rgb.red, (byte) rgb.green, (byte) rgb.blue);
- }
- });
-
- fontSelectButton.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- FontDialog fontDialog = new FontDialog(fontSelectButton.getShell());
- fontDialog.setText("Choose Font Options");
- double[] currentColor = new double[4];
- GL.glGetDoublev(GL.GL_CURRENT_COLOR, currentColor);
- fontDialog.setRGB(
- new RGB(
- (int) currentColor[0] * 255,
- (int) currentColor[1] * 255,
- (int) currentColor[2] * 255));
- fontDialog.setFontData(fontData);
- FontData result = fontDialog.open();
- if (result != null) {
- fontData = result;
- RGB rgb = fontDialog.getRGB();
- GL.glColor3ub((byte) rgb.red, (byte) rgb.green, (byte) rgb.blue);
- colorGroup.setRGB(rgb);
- getContext().loadOutlineFont(
- fontData, fontSelectButton.getDisplay(),
- listIndexBase, 0, 255, 0.0f, extrude,
- fill ? GL.GL_POLYGON : GL.GL_LINE,
- null);
- }
- }
- });
-
- final Button fillButton = new Button(composite, SWT.CHECK);
- fillButton.setText("Fill");
- fillButton.setSelection(true);
- fillButton.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- fill = fillButton.getSelection();
- getContext().loadOutlineFont(
- fontData, fillButton.getDisplay(),
- listIndexBase, 0, 255, 0.0f, extrude,
- fill ? GL.GL_POLYGON : GL.GL_LINE,
- null);
- }
- });
- }
-
- /**
- * @see OpenGLTab#dispose()
- */
- void dispose() {
- super.dispose();
- GL.glDeleteLists(listIndexBase, LIST_INDEX_SIZE);
- }
-
- /**
- * Draws the text to the screen
- *
- * @param string the text to draw
- */
- void drawText(String string) {
- char[] stringChars = string.toCharArray();
- int[] text = new int[stringChars.length];
- for (int i = 0; i < text.length; i++) {
- text[i] = (int) stringChars[i];
- }
- GL.glPushAttrib(GL.GL_LIST_BIT);
- GL.glListBase(listIndexBase);
- GL.glCallLists(text.length, GL.GL_UNSIGNED_INT, text);
- GL.glPopAttrib();
- }
-
- /**
- * @see OpenGLTab#getSleepLength()
- */
- int getSleepLength() {
- return SLEEP_LENGTH;
- }
-
- /**
- * @see OpenGLTab#getTabText()
- */
- String getTabText() {
- return "Outline Text";
- }
-
- /**
- * @see OpenGLTab#init()
- */
- void init() {
- GL.glClearColor(1.0f, 1.0f, 1.0f, 1.0f);
- GL.glColor3fv(textColor);
- GL.glBlendFunc(GL.GL_SRC_ALPHA, GL.GL_ONE_MINUS_SRC_ALPHA);
- GL.glEnable(GL.GL_DEPTH_TEST);
- GL.glEnable(GL.GL_BLEND);
- // build the initial font
- listIndexBase = GL.glGenLists(LIST_INDEX_SIZE);
- fontData = new FontData();
- fontData.setHeight(DEFAULT_FONT_SIZE);
- fontData.setName(DEFAULT_FONT_NAME);
- getContext().loadOutlineFont(
- fontData, getGlCanvas().getDisplay(),
- listIndexBase, 0, 255, 0f, extrude,
- fill ? GL.GL_POLYGON : GL.GL_LINE,
- null);
- }
-
- /**
- * @see OpenGLTab#renderScene()
- */
- void renderScene() {
- GL.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
- GL.glLoadIdentity();
- GL.glTranslatef(xPos, yPos, zPos);
- GL.glRotatef(xRot, 1.0f, 0.0f, 0.0f); // rotate on X axis
- // use GL.glScalef to change size since outline fonts
- // don't support size
- float size = (float) fontData.getHeight() / 24;
- GL.glScalef(size, size, 1.0f);
- // draw the text, assuming that we're running on win32
- if (messageText != null) drawText(messageText.getText());
- xRot += 1.2f;
- }
-}
diff --git a/examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/ReflectionTab.java b/examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/ReflectionTab.java
deleted file mode 100644
index 883bda00f6..0000000000
--- a/examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/ReflectionTab.java
+++ /dev/null
@@ -1,556 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.opengl.examples;
-
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.opengl.*;
-import org.eclipse.swt.widgets.*;
-
-class ReflectionTab extends OpenGLTab {
- private float ballY = 0.0f;
- private float ballZ = 1.6666666f;
- private float ballX = 0.0f;
- private float ballRot = 0.0f;
- private float cubeX = 2.5f;
- private float cubeY = -2.0f;
- private float cubeZ = 2.0f;
- private float xPos = 0.0f;
- private float yPos = 0.0f;
- private float zPos = 22.0f;
- private float ballRotSpeed = 0.0f;
- private int quadratic;
- private int[] textures = new int[3];
- private final static int
- LIST_INDEX_BALL = 1,LIST_INDEX_BOX = 2,
- LIST_INDEX_MIRROR = 3, LIST_INDEX_ROOM = 4;
- private final static int
- TEXTURE_INDEX_BALL = 0, TEXTURE_INDEX_FLOOR = 1,
- TEXTURE_INDEX_BOX = 2;
- private final static String[] IMAGES = {
- "images/Ball.jpg", "images/Floor.jpg", "images/Box.bmp" };
- private final static int SLEEP_LENGTH = 50;
-
- /**
- * Draws the ball
- */
- void createBall() {
- GL.glNewList(LIST_INDEX_BALL, GL.GL_COMPILE);
- GL.glColor3f(1.0f, 1.0f, 1.0f);
- GL.glBindTexture(GL.GL_TEXTURE_2D, textures[TEXTURE_INDEX_BALL]);
- GLU.gluSphere(quadratic, 0.35f, 32, 16);
- GL.glDisable(GL.GL_BLEND);
- GL.glEndList();
- }
-
- /**
- * Draws the box
- */
- void createBox() {
- float size = 1.0f;
- GL.glNewList(LIST_INDEX_BOX, GL.GL_COMPILE);
- GL.glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
- GL.glBindTexture(GL.GL_TEXTURE_2D, textures[TEXTURE_INDEX_BOX]);
- GL.glBegin(GL.GL_QUADS);
- // front
- GL.glNormal3f(0.0f, 0.0f, 1.0f);
- GL.glTexCoord2f(0.0f, 0.0f);
- GL.glVertex3f(-size, -size, size);
- GL.glTexCoord2f(1.0f, 0.0f);
- GL.glVertex3f(size, -size, size);
- GL.glTexCoord2f(1.0f, 1.0f);
- GL.glVertex3f(size, size, size);
- GL.glTexCoord2f(0.0f, 1.0f);
- GL.glVertex3f(-size, size, size);
- // back
- GL.glNormal3f(0.0f, 0.0f, -1.0f);
- GL.glTexCoord2f(0.0f, 0.0f);
- GL.glVertex3f(-size, -size, -size);
- GL.glTexCoord2f(1.0f, 0.0f);
- GL.glVertex3f(size, -size, -size);
- GL.glTexCoord2f(1.0f, 1.0f);
- GL.glVertex3f(size, size, -size);
- GL.glTexCoord2f(0.0f, 1.0f);
- GL.glVertex3f(-size, size, -size);
- // left
- GL.glNormal3f(-1.0f, 0.0f, 0.0f);
- GL.glTexCoord2f(0.0f, 0.0f);
- GL.glVertex3f(-size, -size, -size);
- GL.glTexCoord2f(1.0f, 0.0f);
- GL.glVertex3f(-size, -size, size);
- GL.glTexCoord2f(1.0f, 1.0f);
- GL.glVertex3f(-size, size, size);
- GL.glTexCoord2f(0.0f, 1.0f);
- GL.glVertex3f(-size, size, -size);
- // right
- GL.glNormal3f(1.0f, 0.0f, 0.0f);
- GL.glTexCoord2f(0.0f, 0.0f);
- GL.glVertex3f(size, -size, -size);
- GL.glTexCoord2f(1.0f, 0.0f);
- GL.glVertex3f(size, -size, size);
- GL.glTexCoord2f(1.0f, 1.0f);
- GL.glVertex3f(size, size, size);
- GL.glTexCoord2f(0.0f, 1.0f);
- GL.glVertex3f(size, size, -size);
- // top
- GL.glNormal3f(0.0f, 1.0f, 0.0f);
- GL.glTexCoord2f(0.0f, 0.0f);
- GL.glVertex3f(size, size, -size);
- GL.glTexCoord2f(1.0f, 0.0f);
- GL.glVertex3f(-size, size, -size);
- GL.glTexCoord2f(1.0f, 1.0f);
- GL.glVertex3f(-size, size, size);
- GL.glTexCoord2f(0.0f, 1.0f);
- GL.glVertex3f(size, size, size);
- // bottom
- GL.glNormal3f(0.0f, -1.0f, 0.0f);
- GL.glTexCoord2f(0.0f, 0.0f);
- GL.glVertex3f(size, -size, -size);
- GL.glTexCoord2f(1.0f, 0.0f);
- GL.glVertex3f(-size, -size, -size);
- GL.glTexCoord2f(1.0f, 1.0f);
- GL.glVertex3f(-size, -size, size);
- GL.glTexCoord2f(0.0f, 1.0f);
- GL.glVertex3f(size, -size, size);
- GL.glEnd();
- GL.glEndList();
- }
-
- /**
- * @see OpenGLTab#createControls(Composite)
- */
- void createControls(Composite composite) {
- Group ballTranslation = new Group(composite, SWT.NONE);
- ballTranslation.setLayout(new GridLayout(2, false));
- ballTranslation.setText("Ball Translation");
-
- new Label(ballTranslation, SWT.NONE).setText("X:");
- final Slider ballXPosSlider = new Slider(ballTranslation, SWT.NONE);
- ballXPosSlider.setIncrement(1);
- ballXPosSlider.setMaximum(38);
- ballXPosSlider.setMinimum(0);
- ballXPosSlider.setThumb(2);
- ballXPosSlider.setPageIncrement(2);
- ballXPosSlider.setSelection(18);
- ballXPosSlider.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- ballX = (float) (ballXPosSlider.getSelection() - 18) / 5;
- }
- });
-
- new Label(ballTranslation, SWT.NONE).setText("Y:");
- final Slider ballYPosSlider = new Slider(ballTranslation, SWT.NONE);
- ballYPosSlider.setIncrement(1);
- ballYPosSlider.setMaximum(38);
- ballYPosSlider.setMinimum(0);
- ballYPosSlider.setThumb(2);
- ballYPosSlider.setPageIncrement(2);
- ballYPosSlider.setSelection(18);
- ballYPosSlider.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- ballY = (float) (ballYPosSlider.getSelection() - 18) / 5;
- }
- });
-
- new Label(ballTranslation, SWT.NONE).setText("Z:");
- final Slider ballZPosSlider = new Slider(ballTranslation, SWT.NONE);
- ballZPosSlider.setIncrement(1);
- ballZPosSlider.setMaximum(24);
- ballZPosSlider.setMinimum(0);
- ballZPosSlider.setThumb(1);
- ballZPosSlider.setPageIncrement(2);
- ballZPosSlider.setSelection(4);
- ballZPosSlider.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- ballZ = (float) (ballZPosSlider.getSelection() + 1) / 3;
- }
- });
-
- Group cubeTranslation = new Group(composite, SWT.NONE);
- cubeTranslation.setLayout(new GridLayout(2, false));
- cubeTranslation.setText("Cube Translation");
-
- new Label(cubeTranslation, SWT.NONE).setText("X:");
- final Slider cubeXPosSlider = new Slider(cubeTranslation, SWT.NONE);
- cubeXPosSlider.setIncrement(1);
- cubeXPosSlider.setMaximum(14);
- cubeXPosSlider.setMinimum(0);
- cubeXPosSlider.setThumb(2);
- cubeXPosSlider.setPageIncrement(2);
- cubeXPosSlider.setSelection(11);
- cubeXPosSlider.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- cubeX = (float) (cubeXPosSlider.getSelection() - 6) / 2;
- }
- });
-
- new Label(cubeTranslation, SWT.NONE).setText("Y:");
- final Slider cubeYPosSlider = new Slider(cubeTranslation, SWT.NONE);
- cubeYPosSlider.setIncrement(1);
- cubeYPosSlider.setMaximum(14);
- cubeYPosSlider.setMinimum(0);
- cubeYPosSlider.setThumb(2);
- cubeYPosSlider.setPageIncrement(2);
- cubeYPosSlider.setSelection(2);
- cubeYPosSlider.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- cubeY = (float) (cubeYPosSlider.getSelection() - 6) / 2;
- }
- });
-
- new Label(cubeTranslation, SWT.NONE).setText("Z:");
- final Slider cubeZPosSlider = new Slider(cubeTranslation, SWT.NONE);
- cubeZPosSlider.setIncrement(1);
- cubeZPosSlider.setMaximum(10);
- cubeZPosSlider.setMinimum(1);
- cubeZPosSlider.setThumb(1);
- cubeZPosSlider.setPageIncrement(2);
- cubeZPosSlider.setSelection(2);
- cubeZPosSlider.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- cubeZ = (float) (cubeZPosSlider.getSelection() + 2) / 2;
- }
- });
-
- Group movementGroup = new Group(composite, SWT.NONE);
- movementGroup.setLayout(new GridLayout(2, false));
- movementGroup.setText("Room Rotation");
-
- new Label(movementGroup, SWT.NONE).setText("X:");
- final Slider screenXPosSlider = new Slider(movementGroup, SWT.NONE);
- screenXPosSlider.setIncrement(1);
- screenXPosSlider.setMaximum(42);
- screenXPosSlider.setMinimum(0);
- screenXPosSlider.setThumb(2);
- screenXPosSlider.setPageIncrement(2);
- screenXPosSlider.setSelection(20);
- screenXPosSlider.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- xPos = screenXPosSlider.getSelection() - 20;
- }
- });
-
- new Label(movementGroup, SWT.NONE).setText("Y:");
- final Slider screenYPosSlider = new Slider(movementGroup, SWT.NONE);
- screenYPosSlider.setIncrement(1);
- screenYPosSlider.setMaximum(42);
- screenYPosSlider.setMinimum(0);
- screenYPosSlider.setThumb(2);
- screenYPosSlider.setPageIncrement(2);
- screenYPosSlider.setSelection(20);
- screenYPosSlider.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- yPos = screenYPosSlider.getSelection() - 20;
- }
- });
-
- new Label(movementGroup, SWT.NONE).setText("Z:");
- final Slider screenZPosSlider = new Slider(movementGroup, SWT.NONE);
- screenZPosSlider.setIncrement(1);
- screenZPosSlider.setMaximum(42);
- screenZPosSlider.setMinimum(0);
- screenZPosSlider.setThumb(2);
- screenZPosSlider.setPageIncrement(2);
- screenZPosSlider.setSelection(20);
- screenZPosSlider.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- zPos = screenZPosSlider.getSelection() + 2;
- }
- });
-
- new Label(composite, SWT.NONE).setText("Ball Rotation Speed:");
- final Slider ballRotSlider = new Slider(composite, SWT.NONE);
- ballRotSlider.setIncrement(1);
- ballRotSlider.setMaximum(22);
- ballRotSlider.setMinimum(0);
- ballRotSlider.setThumb(2);
- ballRotSlider.setPageIncrement(2);
- ballRotSlider.setSelection(0);
- ballRotSlider.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- ballRotSpeed = ballRotSlider.getSelection();
- }
- });
- }
-
- /**
- * Draws the mirror
- */
- void createMirror() {
- GL.glNewList(LIST_INDEX_MIRROR, GL.GL_COMPILE);
- GL.glDisable(GL.GL_TEXTURE_2D);
- GL.glColor4f(1.0f, 1.0f, 1.0f, 0.4f);
- GL.glNormal3f(0.0f, 0.0f, 1.0f);
- GL.glBegin(GL.GL_QUADS);
- GL.glTexCoord2f(0.0f, 0.0f);
- GL.glVertex3f(-2.0f, 2.0f, 0.0f);
- GL.glTexCoord2f(1.0f, 0.0f);
- GL.glVertex3f(-2.0f, -2.0f, 0.0f);
- GL.glTexCoord2f(1.0f, 1.0f);
- GL.glVertex3f(2.0f, -2.0f, 0.0f);
- GL.glTexCoord2f(0.0f, 1.0f);
- GL.glVertex3f(2.0f, 2.0f, 0.0f);
- GL.glEnd();
- GL.glEnable(GL.GL_TEXTURE_2D);
- GL.glEndList();
- }
-
- /**
- * Draws the room
- */
- void createRoom() {
- GL.glNewList(LIST_INDEX_ROOM, GL.GL_COMPILE);
- GL.glDisable(GL.GL_TEXTURE_2D);
- GL.glBegin(GL.GL_QUADS);
- // left wall
- GL.glNormal3f(1.0f, 0.0f, 0.0f);
- GL.glVertex3f(-4.0f, 4.0f, 0.0f);
- GL.glVertex3f(-4.0f, 4.0f, 6.0f);
- GL.glVertex3f(-4.0f, -4.0f, 6.0f);
- GL.glVertex3f(-4.0f, -4.0f, 0.0f);
- // right wall
- GL.glNormal3f(-1.0f, 0.0f, 01.0f);
- GL.glVertex3f(4.0f, 4.0f, 0.0f);
- GL.glVertex3f(4.0f, 4.0f, 6.0f);
- GL.glVertex3f(4.0f, -4.0f, 6.0f);
- GL.glVertex3f(4.0f, -4.0f, 0.0f);
- // ceiling
- GL.glNormal3f(0.0f, -1.0f, 0.0f);
- GL.glColor3f(0.9f, 0.9f, 0.9f);
- GL.glVertex3f(-4.0f, 4.0f, 0.0f);
- GL.glVertex3f(-4.0f, 4.0f, 6.0f);
- GL.glVertex3f(4.0f, 4.0f, 6.0f);
- GL.glVertex3f(4.0f, 4.0f, 0.0f);
- GL.glEnd();
- // back wall with triangle strip to illiminate t-intersections
- GL.glBegin(GL.GL_TRIANGLE_STRIP);
- GL.glNormal3f(0.0f, 0.0f, 1.0f);
- GL.glVertex3d(-4.0, -4.0, 0.0);
- GL.glVertex3d(-2.2, -4.0, 0.0);
- GL.glVertex3d(-2.2, -2.2, 0.0);
- GL.glVertex3d(2.2, -4.0, 0.0);
- GL.glVertex3d(2.2, -2.2, 0.0);
- GL.glVertex3d(4.0, -4.0, 0.0);
- GL.glVertex3d(2.2, -2.2, 0.0);
- GL.glVertex3d(4.0, -2.2, 0.0);
- GL.glVertex3d(2.2, 2.2, 0.0);
- GL.glVertex3d(4.0, 2.2, 0.0);
- GL.glVertex3d(2.2, 2.2, 0.0);
- GL.glVertex3d(4.0, 4.0, 0.0);
- GL.glVertex3d(2.2, 2.2, 0.0);
- GL.glVertex3d(2.2, 4.0, 0.0);
- GL.glVertex3d(-2.2, 2.2, 0.0);
- GL.glVertex3d(-2.2, 4.0, 0.0);
- GL.glVertex3d(-4.0, 4.0, 0.0);
- GL.glVertex3d(-2.2, 2.2, 0.0);
- GL.glVertex3d(-4.0, 2.2, 0.0);
- GL.glVertex3d(-2.2, -2.2, 0.0);
- GL.glVertex3d(-4.0, -2.2, 0.0);
- GL.glVertex3d(-4.0, -4.0, 0.0);
- GL.glEnd();
- GL.glEnable(GL.GL_TEXTURE_2D);
- // draw floor
- GL.glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
- GL.glBindTexture(GL.GL_TEXTURE_2D, textures[TEXTURE_INDEX_FLOOR]);
- GL.glNormal3f(0.0f, 1.0f, 0.0f);
- GL.glBegin(GL.GL_QUADS);
- // floor
- GL.glTexCoord2f(0.0f, 0.0f);
- GL.glVertex3f(-4.0f, -4.0f, 6.0f);
- GL.glTexCoord2f(1.0f, 0.0f);
- GL.glVertex3f(-4.0f, -4.0f, 0.0f);
- GL.glTexCoord2f(1.0f, 1.0f);
- GL.glVertex3f(4.0f, -4.0f, 0.0f);
- GL.glTexCoord2f(0.0f, 1.0f);
- GL.glVertex3f(4.0f, -4.0f, 6.0f);
- GL.glEnd();
- // draw mirror frame
- GL.glBindTexture(GL.GL_TEXTURE_2D, textures[TEXTURE_INDEX_BOX]);
- GL.glNormal3f(0.0f, 0.0f, 1.0f);
- GL.glBegin(GL.GL_QUADS);
- // top
- GL.glTexCoord2f(0.0f, 0.0f);
- GL.glVertex3f(-2.2f, 2.0f, 0.0f);
- GL.glTexCoord2f(1.0f, 0.0f);
- GL.glVertex3f(2.2f, 2.0f, 0.0f);
- GL.glTexCoord2f(1.0f, 1.0f);
- GL.glVertex3f(2.2f, 2.2f, 0.0f);
- GL.glTexCoord2f(0.0f, 1.0f);
- GL.glVertex3f(-2.2f, 2.2f, 0.0f);
- // right
- GL.glTexCoord2f(0.0f, 0.0f);
- GL.glVertex3f(2.0f, 2.0f, 0.0f);
- GL.glTexCoord2f(1.0f, 0.0f);
- GL.glVertex3f(2.0f, -2.0f, 0.0f);
- GL.glTexCoord2f(1.0f, 1.0f);
- GL.glVertex3f(2.2f, -2.0f, 0.0f);
- GL.glTexCoord2f(0.0f, 1.0f);
- GL.glVertex3f(2.2f, 2.0f, 0.0f);
- // bottom
- GL.glTexCoord2f(0.0f, 0.0f);
- GL.glVertex3f(-2.2f, -2.0f, 0.0f);
- GL.glTexCoord2f(1.0f, 0.0f);
- GL.glVertex3f(2.2f, -2.0f, 0.0f);
- GL.glTexCoord2f(1.0f, 1.0f);
- GL.glVertex3f(2.2f, -2.2f, 0.0f);
- GL.glTexCoord2f(0.0f, 1.0f);
- GL.glVertex3f(-2.2f, -2.2f, 0.0f);
- // left
- GL.glTexCoord2f(0.0f, 0.0f);
- GL.glVertex3f(-2.0f, 2.0f, 0.0f);
- GL.glTexCoord2f(1.0f, 0.0f);
- GL.glVertex3f(-2.0f, -2.0f, 0.0f);
- GL.glTexCoord2f(1.0f, 1.0f);
- GL.glVertex3f(-2.2f, -2.0f, 0.0f);
- GL.glTexCoord2f(0.0f, 1.0f);
- GL.glVertex3f(-2.2f, 2.0f, 0.0f);
- GL.glEnd();
- GL.glEndList();
- }
-
- /**
- * @see OpenGLTab#dispose()
- */
- void dispose() {
- super.dispose();
- GLU.gluDeleteQuadric(quadratic);
- GL.glDeleteLists(LIST_INDEX_BALL, 1);
- GL.glDeleteLists(LIST_INDEX_BOX, 1);
- GL.glDeleteLists(LIST_INDEX_MIRROR, 1);
- GL.glDeleteLists(LIST_INDEX_ROOM, 1);
- }
-
- /**
- * @see OpenGLTab#getSleepLength()
- */
- int getSleepLength() {
- return SLEEP_LENGTH;
- }
-
- /**
- * @see OpenGLTab#getTabText()
- */
- String getTabText() {
- return "Reflection";
- }
-
- /**
- * @see OpenGLTab#init()
- */
- void init() {
- if (!hasStencilSupport()) return;
-
- GL.glClearColor(1.0f, 1.0f, 1.0f, 1.0f);
- GL.glClearDepth(1.0f);
- GL.glClearStencil(0);
- GL.glGenTextures(IMAGES.length, textures);
- for (int i = 0; i < IMAGES.length; i++) {
- loadTexture(getContext(), IMAGES[i], i, textures);
- }
-
- GL.glShadeModel(GL.GL_SMOOTH);
- quadratic = GLU.gluNewQuadric();
- GLU.gluQuadricNormals(quadratic, GL.GL_SMOOTH);
- GLU.gluQuadricTexture(quadratic, true);
- GL.glDepthFunc(GL.GL_LEQUAL);
- GL.glBlendFunc(GL.GL_SRC_ALPHA, GL.GL_ONE_MINUS_SRC_ALPHA);
- GL.glHint(GL.GL_PERSPECTIVE_CORRECTION_HINT, GL.GL_NICEST);
-
- // set up the lights
- float[] LightAmb = { 0.7f, 0.7f, 0.7f, 1.0f };
- float[] LightDif = { 1.0f, 1.0f, 1.0f, 1.0f };
- float[] lightsAmbient = { 0.5f, 0.5f, 0.5f, 1.0f };
- GL.glLightModelfv(GL.GL_LIGHT_MODEL_AMBIENT, lightsAmbient);
- GL.glLightfv(GL.GL_LIGHT0, GL.GL_AMBIENT, LightAmb);
- GL.glLightfv(GL.GL_LIGHT0, GL.GL_DIFFUSE, LightDif);
-
- GL.glEnable(GL.GL_LIGHT0);
- GL.glEnable(GL.GL_LIGHTING);
- GL.glEnable(GL.GL_LINE_SMOOTH);
- GL.glEnable(GL.GL_DEPTH_TEST);
- GL.glEnable(GL.GL_TEXTURE_2D);
- GL.glEnable(GL.GL_BLEND);
-
- createRoom();
- createBall();
- createBox();
- createMirror();
- }
-
- /**
- * @see OpenGLTab#isStencilSupportNeeded
- */
- boolean isStencilSupportNeeded() {
- return true;
- }
-
- /**
- * @see OpenGLTab#renderScene()
- */
- void renderScene() {
- GL.glClear(
- GL.GL_COLOR_BUFFER_BIT
- | GL.GL_DEPTH_BUFFER_BIT
- | GL.GL_STENCIL_BUFFER_BIT);
-
- GL.glLoadIdentity();
- GLU.gluLookAt(xPos, yPos, zPos, 0, 0, 0, 0, 1, 0);
- // clip plane equation
- double clipEquation[] = { 0.0f, 0.0f, -1.0f, 0.0f };
- float[] LightPos = { 0.0f, 2.0f, 7.0f, 1.0f };
- GL.glColorMask(false, false, false, false);
- // enable stencil buffer for "marking" the mirror
- GL.glEnable(GL.GL_STENCIL_TEST);
- // set the stencil buffer to 1 where a polygon is drawn
- GL.glStencilFunc(GL.GL_ALWAYS, 1, 1);
- GL.glStencilOp(GL.GL_KEEP, GL.GL_KEEP, GL.GL_REPLACE);
- GL.glDisable(GL.GL_DEPTH_TEST);
- GL.glCallList(LIST_INDEX_MIRROR);
- GL.glEnable(GL.GL_DEPTH_TEST);
- GL.glColorMask(true, true, true, true);
- GL.glStencilFunc(GL.GL_EQUAL, 1, 1);
- // draw where the stencil is 1
- GL.glStencilOp(GL.GL_KEEP, GL.GL_KEEP, GL.GL_KEEP);
- GL.glEnable(GL.GL_CLIP_PLANE0);
- GL.glClipPlane(GL.GL_CLIP_PLANE0, clipEquation);
- GL.glPushMatrix();
- GL.glScalef(1.0f, 1.0f, -1.0f);
- GL.glLightfv(GL.GL_LIGHT0, GL.GL_POSITION, LightPos);
- GL.glCallList(LIST_INDEX_ROOM); // reflection
- GL.glPushMatrix();
- GL.glTranslatef(cubeX, cubeY, cubeZ);
- GL.glCallList(LIST_INDEX_BOX); // reflection
- GL.glPopMatrix();
- GL.glTranslatef(ballX, ballY, ballZ);
- GL.glRotatef(ballRot, 1.0f, 0.0f, 0.0f);
- GL.glCallList(LIST_INDEX_BALL); // reflection
- GL.glPopMatrix();
- GL.glDisable(GL.GL_CLIP_PLANE0);
- GL.glDisable(GL.GL_STENCIL_TEST);
- GL.glLightfv(GL.GL_LIGHT0, GL.GL_POSITION, LightPos);
- GL.glEnable(GL.GL_BLEND);
- GL.glDisable(GL.GL_LIGHTING);
- GL.glBlendFunc(GL.GL_SRC_ALPHA, GL.GL_ONE_MINUS_SRC_ALPHA);
- GL.glCallList(LIST_INDEX_MIRROR);
- GL.glEnable(GL.GL_LIGHTING);
- GL.glDisable(GL.GL_BLEND);
- GL.glCallList(LIST_INDEX_ROOM);
- GL.glPushMatrix();
- GL.glTranslatef(cubeX, cubeY, cubeZ);
- GL.glCallList(LIST_INDEX_BOX);
- GL.glPopMatrix();
- GL.glTranslatef(ballX, ballY, ballZ);
- GL.glRotatef(ballRot, 1.0f, 0.0f, 0.0f);
- GL.glCallList(LIST_INDEX_BALL);
- ballRot += ballRotSpeed;
- }
-}
diff --git a/examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/SelectionTab.java b/examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/SelectionTab.java
deleted file mode 100644
index e4c8fa8859..0000000000
--- a/examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/SelectionTab.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.opengl.examples;
-
-
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.opengl.*;
-
-abstract class SelectionTab extends OpenGLTab {
- private final static int BUFFER_LENGTH = 64;
-
- /**
- * Sets the selected object. Subclasses must override this method.
- */
- abstract void processPick(int[] pSelectBuff, int hits);
-
- /**
- * Invoke processPick for the object at the specified coordinate.
- */
- int processSelection(int xPos, int yPos, int pointSize) {
- int[] selectBuffer = new int[BUFFER_LENGTH];
- int[] viewport = new int[4];
- // new fix for sun jre
- int ptr = getContext().getSelectBufferPtr(selectBuffer);
-
- GL.glSelectBuffer(BUFFER_LENGTH, ptr);
- GL.glGetIntegerv(GL.GL_VIEWPORT, viewport);
- GL.glRenderMode(GL.GL_SELECT);
- GL.glMatrixMode(GL.GL_PROJECTION);
- GL.glPushMatrix();
- GL.glLoadIdentity();
- GLU.gluPickMatrix(xPos, yPos, pointSize, pointSize, viewport);
- Rectangle rect = getGlCanvas().getClientArea();
- float fAspect = (float) rect.width / (float) rect.height;
- GLU.gluPerspective(45.0f, fAspect, 0.5f, 600.0f);
- GL.glMatrixMode(GL.GL_MODELVIEW);
- GL.glInitNames();
- render();
- int hits = GL.glRenderMode(GL.GL_RENDER);
- // new fix for sun jre
- // must be called after render mode is switched
- getContext().getSelectBuffer(ptr, selectBuffer);
- if (hits != 0) processPick(selectBuffer, hits);
- GL.glMatrixMode(GL.GL_PROJECTION);
- GL.glPopMatrix();
- GL.glMatrixMode(GL.GL_MODELVIEW);
- return hits;
- }
-}
diff --git a/examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/StencilTab.java b/examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/StencilTab.java
deleted file mode 100644
index be5f4a4063..0000000000
--- a/examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/StencilTab.java
+++ /dev/null
@@ -1,230 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.opengl.examples;
-
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.opengl.*;
-import org.eclipse.swt.widgets.*;
-
-class StencilTab extends OpenGLTab {
- private abstract class Shape {
- private String name;
- /**
- * Constructor
- *
- * @param name the shape's name
- */
- Shape(String name) {
- super();
- this.name = name;
- }
- /**
- * Draws this shape.
- */
- abstract void draw();
- /**
- * Returns the name.
- *
- * @return String
- */
- String getName() {
- return name;
- }
- }
-
- private Shape[] shapes = new Shape[5];
- private Shape currentShape;
- private float xPos = 0, yPos = 0;
- private float size = 0.45f;
- private int texture;
- private int quadratic;
- private final static String IMAGE = "images/splash.bmp";
- private final static int SLEEP_LENGTH = 50;
-
- /**
- * @see OpenGLTab#createControls(Composite)
- */
- void createControls(Composite composite) {
- Composite controls = new Composite(composite, SWT.NONE);
- GridLayout layout = new GridLayout(2, false);
- layout.marginHeight = 0;
- layout.marginWidth = 0;
- controls.setLayout(layout);
- new Label(controls, SWT.NONE).setText("Object:");
- final Combo shapeCombo = new Combo(controls, SWT.READ_ONLY);
- for (int i = 0; i < shapes.length; i++) {
- shapeCombo.add(shapes[i].getName());
- }
- shapeCombo.select(0);
- shapeCombo.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- currentShape = shapes[shapeCombo.getSelectionIndex()];
- }
- });
-
- new Label(composite, SWT.NONE).setText("Size:");
- final Slider sizeSlider = new Slider(composite, SWT.HORIZONTAL);
- sizeSlider.setValues(0, 15, 75, 5, 5, 10);
- sizeSlider.setSelection(45);
- sizeSlider.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- size = ((float) sizeSlider.getSelection()) / 100;
- }
- });
- }
-
- /**
- * @see OpenGLTab#dispose()
- */
- void dispose() {
- super.dispose();
- GLU.gluDeleteQuadric(quadratic);
- }
-
- /**
- * @see OpenGLTab#getSleepLength()
- */
- int getSleepLength() {
- return SLEEP_LENGTH;
- }
-
- /**
- * @see OpenGLTab#getTabText()
- */
- String getTabText() {
- return "Stencil";
- }
-
- /**
- * @see OpenGLTab#init()
- */
- void init() {
- if (!hasStencilSupport()) return;
-
- GL.glClearColor(1.0f, 1.0f, 1.0f, 1.0f);
- GL.glClearDepth(1.0f);
- int[] textureOut = new int[1];
- GL.glGenTextures(1, textureOut);
- loadTexture(getContext(), IMAGE, 0, textureOut);
- this.texture = textureOut[0];
- quadratic = GLU.gluNewQuadric();
- GLU.gluQuadricNormals(quadratic, GLU.GLU_SMOOTH);
- GL.glDepthFunc(GL.GL_LEQUAL);
- GL.glEnable(GL.GL_STENCIL_TEST);
- GL.glEnable(GL.GL_TEXTURE_2D);
- GL.glEnable(GL.GL_DEPTH_TEST);
- // create shapes
- shapes[0] = new Shape("Triangle") {
- public void draw() {
- GL.glBegin(GL.GL_TRIANGLES);
- GL.glVertex3f(0.0f, size, 0.0f);
- GL.glVertex3f(-size, -size, 0.0f);
- GL.glVertex3f(size, -size, 0.0f);
- GL.glEnd();
- }
- };
-
- shapes[1] = new Shape("Disk") {
- public void draw() {
- GLU.gluDisk(quadratic, 0.0f, size, 32, 32);
- }
- };
-
- shapes[2] = new Shape("Square") {
- public void draw() {
- GL.glRectf(-size, -size, size, size);
- }
- };
-
- shapes[3] = new Shape("Hour Glass") {
- public void draw() {
- GL.glBegin(GL.GL_TRIANGLES);
- GL.glVertex3f(0.0f, size, 0.0f);
- GL.glVertex3f(-size, -size, 0.0f);
- GL.glVertex3f(size, -size, 0.0f);
- GL.glVertex3f(0.0f, -size, 0.0f);
- GL.glVertex3f(size, size, 0.0f);
- GL.glVertex3f(-size, size, 0.0f);
- GL.glEnd();
- }
- };
-
- shapes[4] = new Shape("Star") {
- public void draw() {
- GL.glBegin(GL.GL_TRIANGLES);
- GL.glVertex3f(-0.3f, 0, 0.0f);
- GL.glVertex3f(2 * size - 0.3f, 0, 0.0f);
- GL.glVertex3f(size - 0.3f, 2 * size * 0.85f, 0.0f);
- GL.glVertex3f(2 * size - 0.3f, size, 0.0f);
- GL.glVertex3f(0 - 0.3f, size, 0.0f);
- GL.glVertex3f(size - 0.3f, -size * 0.85f, 0.0f);
- GL.glEnd();
- }
- };
-
- currentShape = shapes[0];
- }
-
- /**
- * @see OpenGLTab#isStencilSupportNeeded
- */
- boolean isStencilSupportNeeded() {
- return true;
- }
-
- /**
- * @see OpenGLTab#renderScene()
- */
- void renderScene() {
- GL.glClear(
- GL.GL_COLOR_BUFFER_BIT
- | GL.GL_DEPTH_BUFFER_BIT
- | GL.GL_STENCIL_BUFFER_BIT);
-
- GL.glLoadIdentity();
- GL.glTranslatef(
- (float) (1.5 * Math.cos(xPos)),
- (float) (1.0 * Math.sin(yPos)),
- -3.0f);
- xPos += 0.15f;
- yPos += 0.3f;
-
- GL.glColorMask(false, false, false, false);
- GL.glStencilFunc(GL.GL_ALWAYS, 1, 1);
- GL.glStencilOp(GL.GL_KEEP, GL.GL_KEEP, GL.GL_REPLACE);
- GL.glDisable(GL.GL_DEPTH_TEST);
- GL.glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
-
- currentShape.draw();
-
- GL.glEnable(GL.GL_DEPTH_TEST);
- GL.glColorMask(true, true, true, true);
- GL.glStencilFunc(GL.GL_EQUAL, 1, 1);
- GL.glStencilOp(GL.GL_KEEP, GL.GL_KEEP, GL.GL_KEEP);
-
- GL.glLoadIdentity();
- // load the texture behind the stencil object
- GL.glTranslatef(0.0f, 0.0f, -3.1f);
- GL.glBindTexture(GL.GL_TEXTURE_2D, texture);
- GL.glBegin(GL.GL_QUADS);
- GL.glTexCoord2f(0.0f, 0.0f);
- GL.glVertex3f(-0.85f, -0.85f, 1.0f);
- GL.glTexCoord2f(1.0f, 0.0f);
- GL.glVertex3f(0.85f, -0.85f, 1.0f);
- GL.glTexCoord2f(1.0f, 1.0f);
- GL.glVertex3f(0.85f, 0.85f, 1.0f);
- GL.glTexCoord2f(0.0f, 1.0f);
- GL.glVertex3f(-0.85f, 0.85f, 1.0f);
- GL.glEnd();
- }
-}
diff --git a/examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/TextureTab.java b/examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/TextureTab.java
deleted file mode 100644
index 1375b6fdca..0000000000
--- a/examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/TextureTab.java
+++ /dev/null
@@ -1,176 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.opengl.examples;
-
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.opengl.*;
-import org.eclipse.swt.widgets.*;
-
-class TextureTab extends OpenGLTab {
- private float yrot = 0, zrot = 0;
- private float xPos = 0.0f, yPos = 0.0f, zPos = -20;
- private int texture = 0;
- private float[][][] points = new float[45][45][3];
- private final static String IMAGE = "images/splash.bmp";
- private final static int SLEEP_LENGTH = 50;
-
- /**
- * @see OpenGLTab#createControls(Composite)
- */
- void createControls(Composite composite) {
- Group movementGroup = new Group(composite, SWT.NONE);
- movementGroup.setText("Translation");
- movementGroup.setLayout(new GridLayout(2, false));
-
- new Label(movementGroup, SWT.NONE).setText("X:");
- final Slider xMove = new Slider(movementGroup, SWT.NONE);
- xMove.setIncrement(1);
- xMove.setMaximum(12);
- xMove.setMinimum(0);
- xMove.setThumb(2);
- xMove.setPageIncrement(2);
- xMove.setSelection(5);
- xMove.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- xPos = xMove.getSelection() - 5;
- }
- });
-
- new Label(movementGroup, SWT.NONE).setText("Y:");
- final Slider yMove = new Slider(movementGroup, SWT.NONE);
- yMove.setIncrement(1);
- yMove.setMaximum(12);
- yMove.setMinimum(0);
- yMove.setThumb(2);
- yMove.setPageIncrement(2);
- yMove.setSelection(5);
- yMove.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- yPos = yMove.getSelection() - 5;
- }
- });
-
- new Label(movementGroup, SWT.NONE).setText("Z:");
- final Slider zMove = new Slider(movementGroup, SWT.NONE);
- zMove.setIncrement(1);
- zMove.setMaximum(24);
- zMove.setMinimum(0);
- zMove.setThumb(4);
- zMove.setPageIncrement(2);
- zMove.setSelection(10);
- zMove.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- zPos = zMove.getSelection() - 30;
- }
- });
- }
-
- /**
- * @see OpenGLTab#getSleepLength()
- */
- int getSleepLength() {
- return SLEEP_LENGTH;
- }
-
- /**
- * @see OpenGLTab#getTabText()
- */
- String getTabText() {
- return "Texture";
- }
-
- /**
- * @see OpenGLTab#init()
- */
- void init() {
- //GL.glClearColor(0.0f, 0.0f, 0.3f, 1.0f);
- GL.glClearColor(1.0f, 1.0f, 1.0f, 1.0f);
- GL.glClearDepth(1.0f);
- int[] textureOut = new int[1];
- GL.glGenTextures(1, textureOut);
- loadTexture(getContext(), IMAGE, 0, textureOut);
- texture = textureOut[0];
- GL.glDepthFunc(GL.GL_LEQUAL);
- GL.glPolygonMode(GL.GL_BACK, GL.GL_FILL);
- GL.glPolygonMode(GL.GL_FRONT, GL.GL_LINE);
- GL.glEnable(GL.GL_LIST_MODE);
- GL.glEnable(GL.GL_TEXTURE_2D);
- GL.glEnable(GL.GL_DEPTH_TEST);
- // initialize points
- for (int x = 0; x < 45; x++) {
- for (int y = 0; y < 45; y++) {
- points[x][y][0] = x / 5.0f - 4.5f;
- points[x][y][1] = y / 5.0f - 4.5f;
- points[x][y][2] =
- (float) Math.sin(
- (((x / 5.0f) * 40.0f) / 360.0f) * Math.PI * 2);
- }
- }
- }
-
- /**
- * @see OpenGLTab#renderScene()
- */
- void renderScene() {
- GL.glClear(
- GL.GL_COLOR_BUFFER_BIT
- | GL.GL_DEPTH_BUFFER_BIT
- | GL.GL_STENCIL_BUFFER_BIT);
- GL.glLoadIdentity();
- GL.glTranslatef(xPos, yPos, zPos);
- GL.glRotatef(yrot, 0.0f, 1.0f, 0.0f);
- GL.glRotatef(zrot, 0.0f, 0.0f, 1.0f);
- GL.glBindTexture(GL.GL_TEXTURE_2D, texture);
-
- GL.glBegin(GL.GL_QUADS);
- for (int x = 0; x < 44; x++) {
- for (int y = 0; y < 44; y++) {
- float fx = x / 44.0f;
- float fy = y / 44.0f;
- float fxb = (x + 1) / 44.0f;
- float fyb = (y + 1) / 44.0f;
- GL.glTexCoord2f(fx, fy);
- GL.glVertex3f(
- points[x][y][0],
- points[x][y][1],
- points[x][y][2]);
- GL.glTexCoord2f(fx, fyb);
- GL.glVertex3f(
- points[x][y + 1][0],
- points[x][y + 1][1],
- points[x][y + 1][2]);
- GL.glTexCoord2f(fxb, fyb);
- GL.glVertex3f(
- points[x + 1][y + 1][0],
- points[x + 1][y + 1][1],
- points[x + 1][y + 1][2]);
- GL.glTexCoord2f(fxb, fy);
- GL.glVertex3f(
- points[x + 1][y][0],
- points[x + 1][y][1],
- points[x + 1][y][2]);
- }
- }
- GL.glEnd();
- // perform wave motion
- for (int y = 0; y < 45; y++) {
- float hold = points[0][y][2];
- for (int x = 0; x < 44; x++) {
- points[x][y][2] = points[x + 1][y][2];
- }
- points[44][y][2] = hold;
- }
- yrot += 0.9f;
- zrot += 0.6f;
- }
-} \ No newline at end of file
diff --git a/examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/TransparencyTab.java b/examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/TransparencyTab.java
deleted file mode 100644
index 11f39fbe63..0000000000
--- a/examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/TransparencyTab.java
+++ /dev/null
@@ -1,197 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.opengl.examples;
-
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.opengl.*;
-import org.eclipse.swt.widgets.*;
-
-class TransparencyTab extends SelectionTab {
- private float[] alphas = { 0.3f, 0.5f, 1.0f };
- private int quadratic;
- private int currentSelection = 1;
- private final static int
- INDEX_TRIANGLE = 1, INDEX_SPHERE = 2, INDEX_DISK = 3;
- private final static String[] OBJECTS = {"Triangle", "Sphere", "Disk" };
-
- /**
- * @see OpenGLTab#createControls(Composite)
- */
- void createControls(Composite composite) {
- Composite objectGroup = new Composite(composite, SWT.NONE);
- GridLayout layout = new GridLayout(2, false);
- layout.marginHeight = 0;
- layout.marginWidth = 0;
- objectGroup.setLayout(layout);
- objectGroup.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
-
- new Label(objectGroup, SWT.NONE).setText("Object:");
- final Combo objectCombo = new Combo(objectGroup, SWT.READ_ONLY);
- GridData data = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
- data.grabExcessHorizontalSpace = true;
- objectCombo.setLayoutData(data);
- objectCombo.setItems(OBJECTS);
- objectCombo.select(0);
-
- new Label(composite, SWT.NONE).setText("Transparency:");
- final Slider transparencySlider = new Slider(composite, SWT.HORIZONTAL);
- transparencySlider.setValues(0, 0, 11, 1, 1, 2);
- transparencySlider.setSelection(7);
- transparencySlider.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- float alpha = transparencySlider.getSelection();
- alpha = 1.0f - alpha / 10;
- alphas[currentSelection - 1] = alpha;
- }
- });
- objectCombo.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- currentSelection = objectCombo.getSelectionIndex() + 1;
- transparencySlider.setSelection(
- (int) ((1.0f - alphas[currentSelection - 1]) * 10));
- }
- });
-
- final Canvas glCanvas = getGlCanvas();
- glCanvas.addMouseListener(new MouseAdapter() {
- public void mouseUp(MouseEvent e) {
- Rectangle rect = glCanvas.getClientArea();
- e.y = rect.height - e.y;
- if (e.button == 1) {
- processSelection(e.x, e.y, 2);
- transparencySlider.setSelection(
- (int) ((1.0f - alphas[currentSelection - 1]) * 10));
- objectCombo.select(currentSelection - 1);
- }
- }
- });
- }
-
- /**
- * @see OpenGLTab#dispose()
- */
- void dispose() {
- super.dispose();
- GLU.gluDeleteQuadric(quadratic);
- GL.glDeleteLists(INDEX_DISK, 1);
- GL.glDeleteLists(INDEX_SPHERE, 1);
- GL.glDeleteLists(INDEX_TRIANGLE, 1);
- }
-
- /**
- * @see OpenGLTab#getTabText()
- */
- String getTabText() {
- return "Transparency";
- }
-
- /**
- * @see OpenGLTab#init()
- */
- void init() {
- GL.glClearColor(1.0f, 1.0f, 1.0f, 1.0f);
- GL.glBlendFunc(GL.GL_SRC_ALPHA, GL.GL_ONE_MINUS_SRC_ALPHA);
- quadratic = GLU.gluNewQuadric();
- GLU.gluQuadricNormals(quadratic, GLU.GLU_SMOOTH);
- GL.glEnable(GL.GL_CULL_FACE);
- GL.glEnable(GL.GL_DEPTH_TEST);
- GL.glEnable(GL.GL_BLEND);
- // create display lists
- GL.glNewList(INDEX_SPHERE, GL.GL_COMPILE);
- GLU.gluQuadricDrawStyle(quadratic, GLU.GLU_FILL);
- GLU.gluSphere(quadratic, 1.5, 32, 32);
- GL.glEndList();
- GL.glNewList(INDEX_DISK, GL.GL_COMPILE);
- GLU.gluQuadricDrawStyle(quadratic, GLU.GLU_FILL);
- GLU.gluDisk(quadratic, 1.0, 3, 32, 32);
- GL.glEndList();
- GL.glNewList(INDEX_TRIANGLE, GL.GL_COMPILE);
- GL.glBegin(GL.GL_TRIANGLES);
- GL.glVertex3f(0.0f, 2.0f, 0.0f);
- GL.glVertex3f(-2.0f, -2.0f, 2.0f);
- GL.glVertex3f(2.0f, -2.0f, 2.0f);
- GL.glEnd();
- GL.glEndList();
- }
-
- /**
- * @see SelectionTab.processPick (int[], int)
- */
- void processPick(int[] pSelectBuff, int hits) {
- int count, zDepth;
- int tempSelection = pSelectBuff[3];
- zDepth = pSelectBuff[2];
- // pick object with largest z value
- for (int i = 4; i <= 4 * (hits - 1); i = i + 4) {
- if (zDepth > pSelectBuff[i + 2]) {
- zDepth = pSelectBuff[i + 2];
- tempSelection = pSelectBuff[i + 3];
- }
- }
- if (tempSelection > 0) currentSelection = tempSelection;
- }
-
- /**
- * @see OpenGLTab#renderScene()
- */
- void renderScene() {
- // draw items with transparent qualities in reverse Z order
- GL.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
- GL.glLoadIdentity();
- GL.glTranslatef(0.0f, 0.0f, -14.0f);
- GL.glPushName(0);
-
- // draw disk
- GL.glPushMatrix();
- GL.glTranslatef(-1.0f, 0.0f, 1.0f);
- GL.glColor4f(0.0f, 1.0f, 0.0f, alphas[2]);
- GL.glLoadName(INDEX_DISK);
- GL.glCallList(INDEX_DISK);
- if (currentSelection == INDEX_DISK) {
- GL.glColor3f(1.0f, 0.0f, 0.0f);
- GLU.gluQuadricDrawStyle(quadratic, GLU.GLU_LINE);
- GLU.gluDisk(quadratic, 0.98, 3.02, 32, 32);
- }
- GL.glPopMatrix();
-
- // draw triangle
- GL.glTranslatef(0.0f, 0.0f, +3.0f);
- GL.glLoadName(INDEX_TRIANGLE);
- GL.glColor4f(1.0f, 0.0f, 0.0f, alphas[0]);
- GL.glCallList(INDEX_TRIANGLE);
- GL.glPointSize(5.0f);
- if (currentSelection == INDEX_TRIANGLE) {
- GL.glBegin(GL.GL_POINTS);
- GL.glColor3f(1.0f, 0.0f, 0.0f);
- GL.glVertex3f(0.0f, 2.0f, 0.0f);
- GL.glVertex3f(-2.0f, -2.0f, 2.0f);
- GL.glVertex3f(2.0f, -2.0f, 2.0f);
- GL.glEnd();
- }
-
- // draw sphere
- GL.glPushMatrix();
- GL.glTranslatef(1.0f, 0.0f, +3.0f);
- GL.glColor4f(0.0f, 0.0f, 1.0f, alphas[1]);
- GL.glLoadName(INDEX_SPHERE);
- GL.glCallList(INDEX_SPHERE);
- if (currentSelection == INDEX_SPHERE) {
- GL.glColor3f(1.0f, 0.0f, 0.0f);
- GLU.gluQuadricDrawStyle(quadratic, GLU.GLU_LINE);
- GLU.gluSphere(quadratic, 1.51, 8, 8);
- }
- GL.glPopMatrix();
- }
-}
diff --git a/examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/images/Ball.jpg b/examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/images/Ball.jpg
deleted file mode 100644
index 6890d26807..0000000000
--- a/examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/images/Ball.jpg
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/images/Box.bmp b/examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/images/Box.bmp
deleted file mode 100644
index 5eef6630d3..0000000000
--- a/examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/images/Box.bmp
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/images/Floor.jpg b/examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/images/Floor.jpg
deleted file mode 100644
index 4934c9c82a..0000000000
--- a/examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/images/Floor.jpg
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/images/splash.bmp b/examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/images/splash.bmp
deleted file mode 100644
index 6ec75da1a8..0000000000
--- a/examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/images/splash.bmp
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/images/untitled.jpg b/examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/images/untitled.jpg
deleted file mode 100644
index f5d6aa11d5..0000000000
--- a/examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/images/untitled.jpg
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.swt.snippets/.classpath b/examples/org.eclipse.swt.snippets/.classpath
deleted file mode 100644
index 065ac06e19..0000000000
--- a/examples/org.eclipse.swt.snippets/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/examples/org.eclipse.swt.snippets/.cvsignore b/examples/org.eclipse.swt.snippets/.cvsignore
deleted file mode 100644
index c5e82d7458..0000000000
--- a/examples/org.eclipse.swt.snippets/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin \ No newline at end of file
diff --git a/examples/org.eclipse.swt.snippets/.project b/examples/org.eclipse.swt.snippets/.project
deleted file mode 100644
index 069b3a1b00..0000000000
--- a/examples/org.eclipse.swt.snippets/.project
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.swt.examples</name>
- <comment></comment>
- <projects>
- <project>org.eclipse.swt</project>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.PluginNature</nature>
- </natures>
-</projectDescription>
diff --git a/examples/org.eclipse.swt.snippets/about.html b/examples/org.eclipse.swt.snippets/about.html
deleted file mode 100644
index 9db411aab9..0000000000
--- a/examples/org.eclipse.swt.snippets/about.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<title>About</title>
-<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>20th June, 2002</p>
-<h3>License</h3>
-<p>Eclipse.org makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise indicated below, the Content is provided to you under the terms and conditions of the
-Common Public License Version 1.0 (&quot;CPL&quot;). A copy of the CPL is available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>.
-For purposes of the CPL, &quot;Program&quot; will mean the Content.</p>
-
-<h3>Contributions</h3>
-
-<p>If this Content is licensed to you under the terms and conditions of the CPL, any Contributions, as defined in the CPL, uploaded, submitted, or otherwise
-made available to Eclipse.org, members of Eclipse.org and/or the host of Eclipse.org web site, by you that relate to such
-Content are provided under the terms and conditions of the CPL and can be made available to others under the terms of the CPL.</p>
-
-<p>If this Content is licensed to you under license terms and conditions other than the CPL (&quot;Other License&quot;), any modifications, enhancements and/or
-other code and/or documentation (&quot;Modifications&quot;) uploaded, submitted, or otherwise made available to Eclipse.org, members of Eclipse.org and/or the
-host of Eclipse.org, by you that relate to such Content are provided under terms and conditions of the Other License and can be made available
-to others under the terms of the Other License. In addition, with regard to Modifications for which you are the copyright holder, you are also
-providing the Modifications under the terms and conditions of the CPL and such Modifications can be made available to others under the terms of
-the CPL.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/examples/org.eclipse.swt.snippets/build.properties b/examples/org.eclipse.swt.snippets/build.properties
deleted file mode 100644
index 6bd494b6cb..0000000000
--- a/examples/org.eclipse.swt.snippets/build.properties
+++ /dev/null
@@ -1,11 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2004 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Common Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/cpl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-source.swtsnippets.jar = src/
diff --git a/examples/org.eclipse.swt.snippets/plugin.properties b/examples/org.eclipse.swt.snippets/plugin.properties
deleted file mode 100644
index cfc2a843ce..0000000000
--- a/examples/org.eclipse.swt.snippets/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2004 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Common Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/cpl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-pluginName = SWT Snippets
-providerName = Eclipse.org
diff --git a/examples/org.eclipse.swt.snippets/plugin.xml b/examples/org.eclipse.swt.snippets/plugin.xml
deleted file mode 100644
index 1190339a0a..0000000000
--- a/examples/org.eclipse.swt.snippets/plugin.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<plugin
- id="org.eclipse.swt.snippets"
- name="%pluginName"
- version="3.1.0"
- provider-name="%providerName">
-
- <requires>
- <import plugin="org.eclipse.swt" export="true"/>
- </requires>
-
-</plugin>
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet1.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet1.java
deleted file mode 100644
index 9492aba36d..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet1.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * example snippet: Hello World
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.widgets.*;
-
-public class Snippet1 {
-
-public static void main (String [] args) {
- Display display = new Display ();
- Shell shell = new Shell(display);
- shell.open ();
- while (!shell.isDisposed ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose ();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet10.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet10.java
deleted file mode 100644
index 7205af668e..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet10.java
+++ /dev/null
@@ -1,15 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-public class Snippet10 {
-
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet100.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet100.java
deleted file mode 100644
index bbb1c4d92c..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet100.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * Font example snippet: create a large font for use by a text widget
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet100 {
-
-public static void main(String[] args) {
- Display display = new Display();
- Shell shell = new Shell(display);
- shell.setBounds(10, 10, 200, 200);
- Text text = new Text(shell, SWT.MULTI);
- text.setBounds(10, 10, 150, 150);
- Font initialFont = text.getFont();
- FontData[] fontData = initialFont.getFontData();
- for (int i = 0; i < fontData.length; i++) {
- fontData[i].setHeight(24);
- }
- Font newFont = new Font(display, fontData);
- text.setFont(newFont);
- shell.open();
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch())
- display.sleep();
- }
- newFont.dispose();
- display.dispose();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet101.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet101.java
deleted file mode 100644
index 6a94d7de5c..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet101.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * Table example snippet: insert a table item (at an index)
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet101 {
-
-public static void main (String [] args) {
- Display display = new Display ();
- Shell shell = new Shell (display);
- Table table = new Table (shell, SWT.BORDER | SWT.MULTI);
- table.setSize (200, 200);
- for (int i=0; i<12; i++) {
- TableItem item = new TableItem (table, SWT.NONE);
- item.setText ("Item " + i);
- }
- TableItem item = new TableItem (table, SWT.NONE, 1);
- item.setText ("*** New Item " + table.indexOf (item) + " ***");
- shell.pack ();
- shell.open ();
- while (!shell.isDisposed ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose ();
-}
-
-}
-
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet102.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet102.java
deleted file mode 100644
index 881a72a031..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet102.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * Tree example snippet: insert a tree item (at an index)
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet102 {
-
-public static void main (String [] args) {
- Display display = new Display ();
- Shell shell = new Shell (display);
- Tree tree = new Tree (shell, SWT.BORDER | SWT.MULTI);
- tree.setSize (200, 200);
- for (int i=0; i<12; i++) {
- TreeItem item = new TreeItem (tree, SWT.NONE);
- item.setText ("Item " + i);
- }
- TreeItem item = new TreeItem (tree, SWT.NONE, 1);
- TreeItem [] items = tree.getItems ();
- int index = 0;
- while (index < items.length && items [index] != item) index++;
- item.setText ("*** New Item " + index + " ***");
- shell.pack ();
- shell.open ();
- while (!shell.isDisposed ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose ();
-}
-
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet103.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet103.java
deleted file mode 100644
index a75a7c4858..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet103.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * Table example snippet: update table item text
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet103 {
-
-static char content = 'a';
-public static void main(String[] args) {
- final Display display = new Display();
- Shell shell = new Shell(display);
- shell.setBounds(10, 10, 200, 240);
- Table table = new Table(shell, SWT.NONE);
- table.setBounds(10, 10, 160, 160);
-
- final TableItem[] items = new TableItem[4];
- for (int i = 0; i < 4; i++) {
- new TableColumn(table, SWT.NONE).setWidth(40);
- }
- for (int i = 0; i < 4; i++) {
- items[i] = new TableItem(table, SWT.NONE);
- populateItem(items[i]);
- }
-
- Button button = new Button(shell, SWT.PUSH);
- button.setBounds(10, 180, 50, 30);
- button.setText("Change");
- button.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event event) {
- for (int i = 0; i < 4; i++) {
- populateItem(items[i]);
- }
- }
- });
-
- shell.open();
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch()) display.sleep();
- }
- display.dispose();
-}
-
-static void populateItem(TableItem item) {
- String stringContent = String.valueOf(content);
- item.setText(
- new String[] {
- stringContent,
- stringContent,
- stringContent,
- stringContent });
- content++;
- if (content > 'z') content = 'a';
-}
-
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet104.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet104.java
deleted file mode 100644
index e40d1c59e6..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet104.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * Shell example snippet: create a splash screen
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.layout.*;
-
-public class Snippet104 {
-
-public static void main(String[] args) {
- final Display display = new Display();
- final int [] count = new int [] {4};
- final Image image = new Image(display, 300, 300);
- final Shell splash = new Shell(SWT.ON_TOP);
- final ProgressBar bar = new ProgressBar(splash, SWT.NONE);
- bar.setMaximum(count[0]);
- Label label = new Label(splash, SWT.NONE);
- label.setImage(image);
- FormLayout layout = new FormLayout();
- splash.setLayout(layout);
- FormData labelData = new FormData ();
- labelData.right = new FormAttachment (100, 0);
- labelData.bottom = new FormAttachment (100, 0);
- label.setLayoutData(labelData);
- FormData progressData = new FormData ();
- progressData.left = new FormAttachment (0, 5);
- progressData.right = new FormAttachment (100, -5);
- progressData.bottom = new FormAttachment (100, -5);
- bar.setLayoutData(progressData);
- splash.pack();
- Rectangle splashRect = splash.getBounds();
- Rectangle displayRect = display.getBounds();
- int x = (displayRect.width - splashRect.width) / 2;
- int y = (displayRect.height - splashRect.height) / 2;
- splash.setLocation(x, y);
- splash.open();
- display.asyncExec(new Runnable() {
- public void run() {
- Shell [] shells = new Shell[count[0]];
- for (int i=0; i<count[0]; i++) {
- shells [i] = new Shell(display);
- shells [i].setSize (300, 300);
- shells [i].addListener(SWT.Close, new Listener() {
- public void handleEvent (Event e) {
- --count[0];
- }
- });
- bar.setSelection(i+1);
- try {Thread.sleep(1000);} catch (Throwable e) {}
- }
- splash.close();
- image.dispose();
- for (int i=0; i<count[0]; i++) {
- shells [i].open();
- }
- }
- });
- while (count [0] != 0) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose();
-}
-
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet105.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet105.java
deleted file mode 100644
index c22fa12335..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet105.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * Program example snippet: invoke an external batch file
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.program.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet105 {
-
-public static void main(String[] args) {
- Display display = new Display ();
- Program.launch("c:\\cygwin\\cygwin.bat");
- display.dispose ();
-}
-
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet106.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet106.java
deleted file mode 100644
index fe1cecc3ee..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet106.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * Table example snippet: insert a table column (at an index)
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet106 {
-
-public static void main (String [] args) {
- Display display = new Display ();
- Shell shell = new Shell (display);
- shell.setLayout (new RowLayout (SWT.VERTICAL));
- final Table table = new Table (shell, SWT.BORDER | SWT.MULTI);
- table.setHeaderVisible (true);
- for (int i=0; i<4; i++) {
- TableColumn column = new TableColumn (table, SWT.NONE);
- column.setText ("Column " + i);
- }
- final TableColumn [] columns = table.getColumns ();
- for (int i=0; i<12; i++) {
- TableItem item = new TableItem (table, SWT.NONE);
- for (int j=0; j<columns.length; j++) {
- item.setText (j, "Item " + i);
- }
- }
- for (int i=0; i<columns.length; i++) columns [i].pack ();
- Button button = new Button (shell, SWT.PUSH);
- final int index = 1;
- button.setText ("Insert Column " + index + "a");
- button.addListener (SWT.Selection, new Listener () {
- public void handleEvent (Event e) {
- TableColumn column = new TableColumn (table, SWT.NONE, index);
- column.setText ("Column " + index + "a");
- TableItem [] items = table.getItems ();
- for (int i=0; i<items.length; i++) {
- items [i].setText (index, "Item " + i + "a");
- }
- column.pack ();
- }
- });
- shell.pack ();
- shell.open ();
- while (!shell.isDisposed ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose ();
-}
-
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet107.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet107.java
deleted file mode 100644
index 4a511697da..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet107.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-/*
- * Sash example snippet: implement a simple splitter (with a 20 pixel limit)
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.layout.*;
-
-public class Snippet107 {
-
-public static void main (String [] args) {
- Display display = new Display ();
- final Shell shell = new Shell (display);
- Button button1 = new Button (shell, SWT.PUSH);
- button1.setText ("Button 1");
- final Sash sash = new Sash (shell, SWT.VERTICAL);
- Button button2 = new Button (shell, SWT.PUSH);
- button2.setText ("Button 2");
-
- final FormLayout form = new FormLayout ();
- shell.setLayout (form);
-
- FormData button1Data = new FormData ();
- button1Data.left = new FormAttachment (0, 0);
- button1Data.right = new FormAttachment (sash, 0);
- button1Data.top = new FormAttachment (0, 0);
- button1Data.bottom = new FormAttachment (100, 0);
- button1.setLayoutData (button1Data);
-
- final int limit = 20, percent = 50;
- final FormData sashData = new FormData ();
- sashData.left = new FormAttachment (percent, 0);
- sashData.top = new FormAttachment (0, 0);
- sashData.bottom = new FormAttachment (100, 0);
- sash.setLayoutData (sashData);
- sash.addListener (SWT.Selection, new Listener () {
- public void handleEvent (Event e) {
- Rectangle sashRect = sash.getBounds ();
- Rectangle shellRect = shell.getClientArea ();
- int right = shellRect.width - sashRect.width - limit;
- e.x = Math.max (Math.min (e.x, right), limit);
- if (e.x != sashRect.x) {
- sashData.left = new FormAttachment (0, e.x);
- shell.layout ();
- }
- }
- });
-
- FormData button2Data = new FormData ();
- button2Data.left = new FormAttachment (sash, 0);
- button2Data.right = new FormAttachment (100, 0);
- button2Data.top = new FormAttachment (0, 0);
- button2Data.bottom = new FormAttachment (100, 0);
- button2.setLayoutData (button2Data);
-
- shell.pack ();
- shell.open ();
- while (!shell.isDisposed ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose ();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet108.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet108.java
deleted file mode 100644
index 1bb0d314f2..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet108.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * Button example snippet: set the default button
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.layout.*;
-
-public class Snippet108 {
-
-public static void main (String [] args) {
- Display display = new Display ();
- Shell shell = new Shell (display);
- Label label = new Label (shell, SWT.NONE);
- label.setText ("Enter your name:");
- Text text = new Text (shell, SWT.BORDER);
- text.setLayoutData (new RowData (100, SWT.DEFAULT));
- Button ok = new Button (shell, SWT.PUSH);
- ok.setText ("Ok");
- Button cancel = new Button (shell, SWT.PUSH);
- cancel.setText ("Cancel");
- shell.setDefaultButton (cancel);
- shell.setLayout (new RowLayout ());
- shell.pack ();
- shell.open ();
- while (!shell.isDisposed ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose ();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet109.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet109.java
deleted file mode 100644
index 7e8d35cf68..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet109.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * SashForm example snippet: create a sash form with three children
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.custom.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet109 {
-
-public static void main (String [] args) {
- final Display display = new Display ();
- Shell shell = new Shell(display);
- shell.setLayout (new FillLayout());
-
- SashForm form = new SashForm(shell,SWT.HORIZONTAL);
- form.setLayout(new FillLayout());
-
- Composite child1 = new Composite(form,SWT.NONE);
- child1.setLayout(new FillLayout());
- new Label(child1,SWT.NONE).setText("Label in pane 1");
-
- Composite child2 = new Composite(form,SWT.NONE);
- child2.setLayout(new FillLayout());
- new Button(child2,SWT.PUSH).setText("Button in pane2");
-
- Composite child3 = new Composite(form,SWT.NONE);
- child3.setLayout(new FillLayout());
- new Label(child3,SWT.PUSH).setText("Label in pane3");
-
- form.setWeights(new int[] {30,40,30});
- shell.open ();
- while (!shell.isDisposed ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose ();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet11.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet11.java
deleted file mode 100644
index 11137b0204..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet11.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * Text example snippet: set the selection (i-beam)
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet11 {
-
-public static void main (String [] args) {
- Display display = new Display ();
- Shell shell = new Shell (display);
- Text text = new Text (shell, SWT.BORDER | SWT.V_SCROLL);
- text.setBounds (10, 10, 100, 100);
- for (int i=0; i<16; i++) {
- text.append ("Line " + i + "\n");
- }
- shell.open ();
- text.setSelection (30);
- System.out.println (text.getCaretLocation ());
- while (!shell.isDisposed ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose ();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet110.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet110.java
deleted file mode 100644
index 714a111e10..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet110.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * Table example snippet: find a table cell from mouse down (works for any table style)
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.graphics.*;
-
-public class Snippet110 {
-
-public static void main (String [] args) {
- Display display = new Display ();
- Shell shell = new Shell (display);
- final Table table = new Table (shell, SWT.BORDER | SWT.V_SCROLL);
- table.setHeaderVisible (true);
- table.setLinesVisible (true);
- final int rowCount = 64, columnCount = 4;
- for (int i=0; i < columnCount; i++) {
- TableColumn column = new TableColumn (table, SWT.NULL);
- column.setText ("Column " + i);
- }
- for (int i=0; i < rowCount; i++) {
- TableItem item = new TableItem (table, SWT.NULL);
- for (int j=0; j < columnCount; j++) {
- item.setText (j, "Item " + i + "-" + j);
- }
- }
- for (int i=0; i < columnCount; i++) {
- table.getColumn (i).pack ();
- }
- Point size = table.computeSize (SWT.DEFAULT, 200);
- table.setSize (size);
- shell.pack ();
- table.addListener (SWT.MouseDown, new Listener () {
- public void handleEvent (Event event) {
- Rectangle clientArea = table.getClientArea ();
- Point pt = new Point (event.x, event.y);
- int index = table.getTopIndex ();
- while (index < table.getItemCount ()) {
- boolean visible = false;
- TableItem item = table.getItem (index);
- for (int i=0; i < columnCount; i++) {
- Rectangle rect = item.getBounds (i);
- if (rect.contains (pt)) {
- System.out.println ("Item " + index + "-" + i);
- }
- if (!visible && rect.intersects (clientArea)) {
- visible = true;
- }
- }
- if (!visible) return;
- index++;
- }
- }
- });
- shell.open ();
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose ();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet111.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet111.java
deleted file mode 100644
index 20d1c5e77a..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet111.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * TreeEditor example snippet: edit the text of a tree item (in place, fancy)
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.custom.*;
-
-public class Snippet111 {
-
-public static void main (String [] args) {
- final Display display = new Display ();
- final Color black = display.getSystemColor (SWT.COLOR_BLACK);
- Shell shell = new Shell (display);
- shell.setLayout (new FillLayout ());
- final Tree tree = new Tree (shell, SWT.BORDER);
- for (int i=0; i<16; i++) {
- TreeItem itemI = new TreeItem (tree, SWT.NONE);
- itemI.setText ("Item " + i);
- for (int j=0; j<16; j++) {
- TreeItem itemJ = new TreeItem (itemI, SWT.NONE);
- itemJ.setText ("Item " + j);
- }
- }
- final TreeItem [] lastItem = new TreeItem [1];
- final TreeEditor editor = new TreeEditor (tree);
- tree.addListener (SWT.Selection, new Listener () {
- public void handleEvent (Event e) {
- final TreeItem item = (TreeItem) e.item;
- if (item != null && item == lastItem [0]) {
- final Composite composite = new Composite (tree, SWT.NONE);
- composite.setBackground (black);
- final Text text = new Text (composite, SWT.NONE);
- composite.addListener (SWT.Resize, new Listener () {
- public void handleEvent (Event e) {
- Rectangle rect = composite.getClientArea ();
- text.setBounds (rect.x + 1, rect.y + 1, rect.width - 2, rect.height - 2);
- }
- });
- Listener textListener = new Listener () {
- public void handleEvent (final Event e) {
- switch (e.type) {
- case SWT.FocusOut:
- item.setText (text.getText ());
- composite.dispose ();
- break;
- case SWT.Verify:
- String newText = text.getText ();
- String leftText = newText.substring (0, e.start);
- String rightText = newText.substring (e.end, newText.length ());
- GC gc = new GC (text);
- Point size = gc.textExtent (leftText + e.text + rightText);
- gc.dispose ();
- size = text.computeSize (size.x, SWT.DEFAULT);
- editor.horizontalAlignment = SWT.LEFT;
- Rectangle itemRect = item.getBounds (), rect = tree.getClientArea ();
- editor.minimumWidth = Math.max (size.x, itemRect.width) + 2;
- int left = itemRect.x, right = rect.x + rect.width;
- editor.minimumWidth = Math.min (editor.minimumWidth, right - left);
- editor.layout ();
- break;
- case SWT.Traverse:
- switch (e.detail) {
- case SWT.TRAVERSE_RETURN:
- item.setText (text.getText ());
- //FALL THROUGH
- case SWT.TRAVERSE_ESCAPE:
- composite.dispose ();
- e.doit = false;
- }
- break;
- }
- }
- };
- text.addListener (SWT.FocusOut, textListener);
- text.addListener (SWT.Traverse, textListener);
- text.addListener (SWT.Verify, textListener);
- editor.setEditor (composite, item);
- text.setText (item.getText ());
- text.selectAll ();
- text.setFocus ();
- }
- lastItem [0] = item;
- }
- });
- shell.pack ();
- shell.open ();
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose ();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet112.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet112.java
deleted file mode 100644
index 41eedd5e3d..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet112.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * Image example snippet: display an image in a group
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet112 {
-
-public static void main (String [] args) {
- Display display = new Display ();
- final Image image = new Image (display, 20, 20);
- Color color = display.getSystemColor (SWT.COLOR_RED);
- GC gc = new GC (image);
- gc.setBackground (color);
- gc.fillRectangle (image.getBounds ());
- gc.dispose ();
- color.dispose ();
-
- Shell shell = new Shell (display);
- shell.setLayout (new FillLayout ());
- Group group = new Group (shell, SWT.NONE);
- group.setLayout (new FillLayout ());
- group.setText ("a square");
- Canvas canvas = new Canvas (group, SWT.NONE);
- canvas.addPaintListener (new PaintListener () {
- public void paintControl (PaintEvent e) {
- e.gc.drawImage (image, 0, 0);
- }
- });
-
- shell.pack ();
- shell.open ();
- while (!shell.isDisposed ()) {
- if (!display.readAndDispatch ())
- display.sleep ();
- }
- image.dispose ();
- display.dispose ();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet113.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet113.java
deleted file mode 100644
index a997987e55..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet113.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * Table example snippet: detect a selection or check event in a table (SWT.CHECK)
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet113 {
-
-public static void main (String [] args) {
- Display display = new Display ();
- Shell shell = new Shell (display);
- Table table = new Table (shell, SWT.CHECK | SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);
- for (int i=0; i<12; i++) {
- TableItem item = new TableItem (table, SWT.NONE);
- item.setText ("Item " + i);
- }
- table.setSize (100, 100);
- table.addListener (SWT.Selection, new Listener () {
- public void handleEvent (Event event) {
- String string = event.detail == SWT.CHECK ? "Checked" : "Selected";
- System.out.println (event.item + " " + string);
- }
- });
- shell.setSize (200, 200);
- shell.open ();
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose ();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet114.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet114.java
deleted file mode 100644
index a7284fb24d..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet114.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * Tree example snippet: detect a selection or check event in a tree (SWT.CHECK)
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet114 {
-
-public static void main (String [] args) {
- Display display = new Display ();
- Shell shell = new Shell (display);
- Tree tree = new Tree (shell, SWT.CHECK | SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);
- for (int i=0; i<12; i++) {
- TreeItem item = new TreeItem (tree, SWT.NONE);
- item.setText ("Item " + i);
- }
- tree.setSize (100, 100);
- tree.addListener (SWT.Selection, new Listener () {
- public void handleEvent (Event event) {
- String string = event.detail == SWT.CHECK ? "Checked" : "Selected";
- System.out.println (event.item + " " + string);
- }
- });
- shell.setSize (200, 200);
- shell.open ();
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose ();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet115.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet115.java
deleted file mode 100644
index 118ea2d5d6..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet115.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * Composite example snippet: force radio behavior on two different composites
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.layout.*;
-
-public class Snippet115 {
-
-public static void main (String [] args) {
- Display display = new Display ();
- Shell shell = new Shell (display);
- shell.setLayout (new RowLayout (SWT.VERTICAL));
- Composite c1 = new Composite (shell, SWT.BORDER | SWT.NO_RADIO_GROUP);
- c1.setLayout (new RowLayout ());
- Composite c2 = new Composite (shell, SWT.BORDER | SWT.NO_RADIO_GROUP);
- c2.setLayout (new RowLayout ());
- final Composite [] composites = new Composite [] {c1, c2};
- Listener radioGroup = new Listener () {
- public void handleEvent (Event event) {
- for (int i=0; i<composites.length; i++) {
- Composite composite = composites [i];
- Control [] children = composite.getChildren ();
- for (int j=0; j<children.length; j++) {
- Control child = children [j];
- if (child instanceof Button) {
- Button button = (Button) child;
- if ((button.getStyle () & SWT.RADIO) != 0) button.setSelection (false);
- }
- }
- }
- Button button = (Button) event.widget;
- button.setSelection (true);
- }
- };
- for (int i=0; i<4; i++) {
- Button button = new Button (c1, SWT.RADIO);
- button.setText ("Button " + i);
- button.addListener (SWT.Selection, radioGroup);
- }
- for (int i=0; i<4; i++) {
- Button button = new Button (c2, SWT.RADIO);
- button.setText ("Button " + (i + 4));
- button.addListener (SWT.Selection, radioGroup);
- }
- shell.pack ();
- shell.open ();
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose ();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet116.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet116.java
deleted file mode 100644
index 9263b53348..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet116.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * Text example snippet: stop CR from going to the default button
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet116 {
-public static void main(String[] args) {
- Display display = new Display();
- Shell shell = new Shell(display);
- shell.setLayout(new GridLayout());
- Text text = new Text(shell, SWT.SINGLE | SWT.BORDER);
- text.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- text.setText("Here is some text");
- text.addSelectionListener(new SelectionAdapter() {
- public void widgetDefaultSelected(SelectionEvent e) {
- System.out.println("Text default selected (overrides default button)");
- }
- });
- text.addTraverseListener(new TraverseListener() {
- public void keyTraversed(TraverseEvent e) {
- if (e.detail == SWT.TRAVERSE_RETURN) {
- e.doit = false;
- e.detail = SWT.TRAVERSE_NONE;
- }
- }
- });
- Button button = new Button(shell, SWT.PUSH);
- button.setText("Ok");
- button.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- System.out.println("Button selected");
- }
- });
- shell.setDefaultButton(button);
- shell.pack();
- shell.open();
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch())
- display.sleep();
- }
- display.dispose();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet117.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet117.java
deleted file mode 100644
index d49fced851..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet117.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * Text example snippet: add a select all menu item to the control
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet117 {
-public static void main(String[] args) {
- Display display = new Display();
- Shell shell = new Shell(display);
- shell.setLayout(new FillLayout());
- final Text t = new Text(shell, SWT.BORDER | SWT.MULTI);
-
- Menu bar = new Menu (shell, SWT.BAR);
- shell.setMenuBar (bar);
- MenuItem editItem = new MenuItem (bar, SWT.CASCADE);
- editItem.setText ("Edit");
- Menu submenu = new Menu (shell, SWT.DROP_DOWN);
- editItem.setMenu (submenu);
-
- MenuItem item = new MenuItem (submenu, SWT.PUSH);
- item.addListener (SWT.Selection, new Listener () {
- public void handleEvent (Event e) {
- t.selectAll();
- }
- });
- item.setText ("Select &All\tCtrl+A");
- item.setAccelerator (SWT.CTRL + 'A');
-
- // Note that as long as your application has not overridden
- // the global accelerators for copy, paste, and cut
- //(CTRL+C or CTRL+INSERT, CTRL+V or SHIFT+INSERT, and CTRL+X or SHIFT+DELETE)
- // these behaviours are already available by default.
- // If your application overrides these accelerators,
- // you will need to call Text.copy(), Text.paste() and Text.cut()
- // from the Selection callback for the accelerator when the
- // text widget has focus.
-
- shell.setSize(200, 200);
- shell.open();
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch())
- display.sleep();
- }
- display.dispose();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet118.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet118.java
deleted file mode 100644
index 899faa9bd2..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet118.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * Cursor example snippet: create a color cursor from an image file
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet118 {
-
-public static void main (String [] args) {
- final Display display = new Display();
- final Shell shell = new Shell(display);
- shell.setSize(150, 150);
- final Cursor[] cursor = new Cursor[1];
- Button button = new Button(shell, SWT.PUSH);
- button.setText("Change cursor");
- Point size = button.computeSize(SWT.DEFAULT, SWT.DEFAULT);
- button.setSize(size);
- button.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- FileDialog dialog = new FileDialog(shell);
- dialog.setFilterExtensions(new String[] {"*.ico", "*.gif", "*.*"});
- String name = dialog.open();
- if (name == null) return;
- ImageData image = new ImageData(name);
- Cursor oldCursor = cursor[0];
- cursor[0] = new Cursor(display, image, 0, 0);
- shell.setCursor(cursor[0]);
- if (oldCursor != null) oldCursor.dispose();
- }
- });
- shell.open();
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch())
- display.sleep();
- }
- if (cursor[0] != null) cursor[0].dispose();
- display.dispose();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet119.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet119.java
deleted file mode 100644
index ec981025f3..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet119.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * Cursor example snippet: create a color cursor from a source and a mask
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet119 {
-
-static byte[] source = {
- (byte)0x11, (byte)0x11, (byte)0x11, (byte)0x00, (byte)0x00, (byte)0x11, (byte)0x11, (byte)0x11,
- (byte)0x11, (byte)0x10, (byte)0x00, (byte)0x01, (byte)0x10, (byte)0x00, (byte)0x01, (byte)0x11,
- (byte)0x11, (byte)0x00, (byte)0x22, (byte)0x01, (byte)0x10, (byte)0x33, (byte)0x00, (byte)0x11,
- (byte)0x10, (byte)0x02, (byte)0x22, (byte)0x01, (byte)0x10, (byte)0x33, (byte)0x30, (byte)0x01,
- (byte)0x10, (byte)0x22, (byte)0x22, (byte)0x01, (byte)0x10, (byte)0x33, (byte)0x33, (byte)0x01,
- (byte)0x10, (byte)0x22, (byte)0x22, (byte)0x01, (byte)0x10, (byte)0x33, (byte)0x33, (byte)0x01,
- (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00,
- (byte)0x01, (byte)0x11, (byte)0x11, (byte)0x01, (byte)0x10, (byte)0x11, (byte)0x11, (byte)0x10,
- (byte)0x01, (byte)0x11, (byte)0x11, (byte)0x01, (byte)0x10, (byte)0x11, (byte)0x11, (byte)0x10,
- (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00,
- (byte)0x10, (byte)0x44, (byte)0x44, (byte)0x01, (byte)0x10, (byte)0x55, (byte)0x55, (byte)0x01,
- (byte)0x10, (byte)0x44, (byte)0x44, (byte)0x01, (byte)0x10, (byte)0x55, (byte)0x55, (byte)0x01,
- (byte)0x10, (byte)0x04, (byte)0x44, (byte)0x01, (byte)0x10, (byte)0x55, (byte)0x50, (byte)0x01,
- (byte)0x11, (byte)0x00, (byte)0x44, (byte)0x01, (byte)0x10, (byte)0x55, (byte)0x00, (byte)0x11,
- (byte)0x11, (byte)0x10, (byte)0x00, (byte)0x01, (byte)0x10, (byte)0x00, (byte)0x01, (byte)0x11,
- (byte)0x11, (byte)0x11, (byte)0x11, (byte)0x00, (byte)0x00, (byte)0x11, (byte)0x11, (byte)0x11,
-};
-
-static byte[] mask = {
- (byte)0x03, (byte)0xc0,
- (byte)0x1f, (byte)0xf8,
- (byte)0x3f, (byte)0xfc,
- (byte)0x7f, (byte)0xfe,
- (byte)0x7f, (byte)0xfe,
- (byte)0x7f, (byte)0xfe,
- (byte)0xff, (byte)0xff,
- (byte)0xfe, (byte)0x7f,
- (byte)0xfe, (byte)0x7f,
- (byte)0xff, (byte)0xff,
- (byte)0x7f, (byte)0xfe,
- (byte)0x7f, (byte)0xfe,
- (byte)0x7f, (byte)0xfe,
- (byte)0x3f, (byte)0xfc,
- (byte)0x1f, (byte)0xf8,
- (byte)0x03, (byte)0xc0
-};
-
-public static void main (String [] args) {
- Display display = new Display();
- Color white = display.getSystemColor (SWT.COLOR_WHITE);
- Color black = display.getSystemColor (SWT.COLOR_BLACK);
- Color yellow = display.getSystemColor (SWT.COLOR_YELLOW);
- Color red = display.getSystemColor (SWT.COLOR_RED);
- Color green = display.getSystemColor (SWT.COLOR_GREEN);
- Color blue = display.getSystemColor (SWT.COLOR_BLUE);
-
- //Create a source ImageData of depth 4
- PaletteData palette = new PaletteData (new RGB[] {
- black.getRGB(), white.getRGB(), yellow.getRGB(),
- red.getRGB(), blue.getRGB(), green.getRGB()});
- ImageData sourceData = new ImageData (16, 16, 4, palette, 1, source);
-
- //Create a mask ImageData of depth 1 (monochrome)
- palette = new PaletteData (new RGB [] {black.getRGB(), white.getRGB(),});
- ImageData maskData = new ImageData (16, 16, 1, palette, 1, mask);
-
- //Set mask
- sourceData.maskData = maskData.data;
- sourceData.maskPad = maskData.scanlinePad;
-
- //Create cursor
- Cursor cursor = new Cursor(display, sourceData, 10, 10);
-
- //Remove mask to draw them separately just to show what they look like
- sourceData.maskData = null;
- sourceData.maskPad = -1;
-
- Shell shell = new Shell(display);
- final Image source = new Image (display,sourceData);
- final Image mask = new Image (display, maskData);
- shell.addPaintListener(new PaintListener() {
- public void paintControl(PaintEvent e) {
- GC gc = e.gc;
- int x = 10, y = 10;
- String stringSource = "source: ";
- String stringMask = "mask: ";
- gc.drawString(stringSource, x, y);
- gc.drawString(stringMask, x, y + 30);
- x += Math.max(gc.stringExtent(stringSource).x, gc.stringExtent(stringMask).x);
- gc.drawImage(source, x, y);
- gc.drawImage(mask, x, y + 30);
- }
- });
- shell.setSize(150, 150);
- shell.open();
- shell.setCursor(cursor);
-
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch())
- display.sleep();
- }
- cursor.dispose();
- source.dispose();
- mask.dispose();
- display.dispose();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet12.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet12.java
deleted file mode 100644
index be408691c7..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet12.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * Text example snippet: set the selection (start, end)
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet12 {
-
-public static void main (String [] args) {
- Display display = new Display ();
- Shell shell = new Shell (display);
- Text text = new Text (shell, SWT.BORDER | SWT.V_SCROLL);
- text.setBounds (10, 10, 100, 100);
- for (int i=0; i<16; i++) {
- text.append ("Line " + i + "\n");
- }
- shell.open ();
- text.setSelection (30, 32);
- System.out.println (text.getCaretLocation ());
- while (!shell.isDisposed ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose ();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet120.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet120.java
deleted file mode 100644
index 01b31a98c1..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet120.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * Monitor example snippet: center a shell on the primary monitor
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet120 {
-
-public static void main (String [] args) {
- Display display = new Display ();
- Shell shell = new Shell (display);
- shell.setSize (200, 200);
- Monitor primary = display.getPrimaryMonitor ();
- Rectangle bounds = primary.getBounds ();
- Rectangle rect = shell.getBounds ();
- int x = bounds.x + (bounds.width - rect.width) / 2;
- int y = bounds.y + (bounds.height - rect.height) / 2;
- shell.setLocation (x, y);
- shell.open ();
- while (!shell.isDisposed ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose ();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet121.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet121.java
deleted file mode 100644
index ecba3c80ba..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet121.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * Text example snippet: prompt for a password (set the echo character)
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet121 {
-
-public static void main (String [] args) {
- Display display = new Display ();
- Shell shell = new Shell (display);
- shell.setLayout (new FillLayout ());
- Text text = new Text (shell, SWT.SINGLE | SWT.BORDER);
- text.setEchoChar ('*');
- shell.pack ();
- shell.open ();
- while (!shell.isDisposed ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose ();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet122.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet122.java
deleted file mode 100644
index d2a3c3023f..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet122.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * Clipboard example snippet: enable/disable menu depending on clipboard content availability
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.dnd.*;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet122 {
-
-public static void main(String[] args) {
- Display display = new Display();
- final Clipboard cb = new Clipboard(display);
- Shell shell = new Shell(display);
- shell.setLayout(new FillLayout());
- final Text text = new Text(shell, SWT.BORDER | SWT.MULTI | SWT.WRAP);
- Menu menu = new Menu(shell, SWT.POP_UP);
- final MenuItem copyItem = new MenuItem(menu, SWT.PUSH);
- copyItem.setText("Copy");
- copyItem.addSelectionListener(new SelectionAdapter(){
- public void widgetSelected(SelectionEvent e) {
- String selection = text.getSelectionText();
- if (selection == null) return;
- Object[] data = new Object[]{selection};
- Transfer[] types = new Transfer[] {TextTransfer.getInstance()};
- cb.setContents(data, types);
- }
- });
- final MenuItem pasteItem = new MenuItem(menu, SWT.PUSH);
- pasteItem.setText ("Paste");
- pasteItem.addSelectionListener(new SelectionAdapter(){
- public void widgetSelected(SelectionEvent e) {
- String string = (String)(cb.getContents(TextTransfer.getInstance()));
- if (string != null) {
- text.insert(string);
- }
- }
- });
- menu.addMenuListener(new MenuAdapter() {
- public void menuShown(MenuEvent e) {
- TransferData[] available = cb.getAvailableTypes();
- boolean enabled = false;
- for (int i = 0; i < available.length; i++) {
- if (TextTransfer.getInstance().isSupportedType(available[i])) {
- enabled = true;
- break;
- }
- }
- pasteItem.setEnabled(enabled);
- }
- });
- text.setMenu (menu);
-
- shell.setSize(200, 200);
- shell.open();
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch())
- display.sleep();
- }
- cb.dispose();
- display.dispose();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet123.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet123.java
deleted file mode 100644
index b606063ffc..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet123.java
+++ /dev/null
@@ -1,189 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * OLE and ActiveX example snippet: get events from IE control
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.ole.win32.*;
-import org.eclipse.swt.internal.ole.win32.*;
-
-public class Snippet123 {
-
-public static void main(String[] args) {
- final Display display = new Display();
- Shell shell = new Shell(display);
- shell.setLayout(new FillLayout());
- OleControlSite controlSite;
- try {
- OleFrame frame = new OleFrame(shell, SWT.NONE);
- controlSite = new OleControlSite(frame, SWT.NONE, "Shell.Explorer");
- controlSite.doVerb(OLE.OLEIVERB_INPLACEACTIVATE);
- } catch (SWTError e) {
- System.out.println("Unable to open activeX control");
- return;
- }
- shell.open();
-
- // IWebBrowser
- final OleAutomation webBrowser = new OleAutomation(controlSite);
-
- // When a new document is loaded, access the document object for the new page.
- int DownloadComplete = 104;
- controlSite.addEventListener(DownloadComplete, new OleListener() {
- public void handleEvent(OleEvent event) {
- int[] htmlDocumentID = webBrowser.getIDsOfNames(new String[]{"Document"});
- if (htmlDocumentID == null) return;
- Variant pVarResult = webBrowser.getProperty(htmlDocumentID[0]);
- if (pVarResult == null || pVarResult.getType() == 0) return;
- //IHTMLDocument2
- OleAutomation htmlDocument = pVarResult.getAutomation();
-
- // Request to be notified of click, double click and key down events
- EventDispatch myDispatch = new EventDispatch(EventDispatch.onclick);
- IDispatch idispatch = new IDispatch(myDispatch.getAddress());
- Variant dispatch = new Variant(idispatch);
- htmlDocument.setProperty(EventDispatch.onclick, dispatch);
-
- myDispatch = new EventDispatch(EventDispatch.ondblclick);
- idispatch = new IDispatch(myDispatch.getAddress());
- dispatch = new Variant(idispatch);
- htmlDocument.setProperty(EventDispatch.ondblclick, dispatch);
-
- myDispatch = new EventDispatch(EventDispatch.onkeydown);
- idispatch = new IDispatch(myDispatch.getAddress());
- dispatch = new Variant(idispatch);
- htmlDocument.setProperty(EventDispatch.onkeydown, dispatch);
-
- //Remember to release OleAutomation Object
- htmlDocument.dispose();
- }
- });
-
- // Navigate to a web site
- int[] ids = webBrowser.getIDsOfNames(new String[]{"Navigate", "URL"});
- Variant[] rgvarg = new Variant[] {new Variant("http://www.google.com")};
- int[] rgdispidNamedArgs = new int[]{ids[1]};
- webBrowser.invoke(ids[0], rgvarg, rgdispidNamedArgs);
-
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch())
- display.sleep();
- }
- //Remember to release OleAutomation Object
- webBrowser.dispose();
- display.dispose();
-
-}
-}
-// EventDispatch implements a simple IDispatch interface which will be called
-// when the event is fired.
-class EventDispatch {
- private COMObject iDispatch;
- private int refCount = 0;
- private int eventID;
-
- final static int onhelp = 0x8001177d;
- final static int onclick = 0x80011778;
- final static int ondblclick = 0x80011779;
- final static int onkeyup = 0x80011776;
- final static int onkeydown = 0x80011775;
- final static int onkeypress = 0x80011777;
- final static int onmouseup = 0x80011773;
- final static int onmousedown = 0x80011772;
- final static int onmousemove = 0x80011774;
- final static int onmouseout = 0x80011771;
- final static int onmouseover = 0x80011770;
- final static int onreadystatechange = 0x80011789;
- final static int onafterupdate = 0x80011786;
- final static int onrowexit= 0x80011782;
- final static int onrowenter = 0x80011783;
- final static int ondragstart = 0x80011793;
- final static int onselectstart = 0x80011795;
-
- EventDispatch(int eventID) {
- this.eventID = eventID;
- createCOMInterfaces();
- }
- int getAddress() {
- return iDispatch.getAddress();
- }
- private void createCOMInterfaces() {
- iDispatch = new COMObject(new int[]{2, 0, 0, 1, 3, 4, 8}){
- public int method0(int[] args) {return QueryInterface(args[0], args[1]);}
- public int method1(int[] args) {return AddRef();}
- public int method2(int[] args) {return Release();}
- // method3 GetTypeInfoCount - not implemented
- // method4 GetTypeInfo - not implemented
- // method5 GetIDsOfNames - not implemented
- public int method6(int[] args) {return Invoke(args[0], args[1], args[2], args[3], args[4], args[5], args[6], args[7]);}
- };
- }
- private void disposeCOMInterfaces() {
- if (iDispatch != null)
- iDispatch.dispose();
- iDispatch = null;
-
- }
- private int AddRef() {
- refCount++;
- return refCount;
- }
- private int Invoke(int dispIdMember, int riid, int lcid, int dwFlags, int pDispParams, int pVarResult, int pExcepInfo, int pArgErr) {
- switch (eventID) {
- case onhelp: System.out.println("onhelp"); break;
- case onclick: System.out.println("onclick"); break;
- case ondblclick: System.out.println("ondblclick"); break;
- case onkeyup: System.out.println("onkeyup"); break;
- case onkeydown: System.out.println("onkeydown"); break;
- case onkeypress: System.out.println("onkeypress"); break;
- case onmouseup: System.out.println("onmouseup"); break;
- case onmousedown: System.out.println("onmousedown"); break;
- case onmousemove: System.out.println("onmousemove"); break;
- case onmouseout: System.out.println("onmouseout"); break;
- case onmouseover: System.out.println("onmouseover"); break;
- case onreadystatechange: System.out.println("onreadystatechange"); break;
- case onafterupdate: System.out.println("onafterupdate"); break;
- case onrowexit: System.out.println("onrowexit"); break;
- case onrowenter: System.out.println("onrowenter"); break;
- case ondragstart: System.out.println("ondragstart"); break;
- case onselectstart: System.out.println("onselectstart"); break;
- }
- return COM.S_OK;
- }
- private int QueryInterface(int riid, int ppvObject) {
- if (riid == 0 || ppvObject == 0) return COM.E_INVALIDARG;
- GUID guid = new GUID();
- COM.MoveMemory(guid, riid, GUID.sizeof);
-
- if ( COM.IsEqualGUID(guid, COM.IIDIUnknown) || COM.IsEqualGUID(guid, COM.IIDIDispatch)) {
- COM.MoveMemory(ppvObject, new int[] {iDispatch.getAddress()}, 4);
- AddRef();
- return COM.S_OK;
- }
- COM.MoveMemory(ppvObject, new int[] {0}, 4);
- return COM.E_NOINTERFACE;
- }
- int Release() {
- refCount--;
- if (refCount == 0) {
- disposeCOMInterfaces();
- }
- return refCount;
- }
-}
-
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet124.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet124.java
deleted file mode 100644
index bd863ac4ce..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet124.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * TableEditor example snippet: edit a cell in a table (in place, fancy)
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.custom.*;
-
-public class Snippet124 {
-public static void main (String[] args) {
- Display display = new Display ();
- Shell shell = new Shell (display);
- shell.setLayout (new FillLayout ());
- final Table table = new Table(shell, SWT.BORDER | SWT.MULTI);
- table.setLinesVisible (true);
- for (int i=0; i<3; i++) {
- TableColumn column = new TableColumn (table, SWT.NONE);
- column.setWidth(100);
- }
- for (int i=0; i<3; i++) {
- TableItem item = new TableItem (table, SWT.NONE);
- item.setText(new String [] {"" + i, "" + i , "" + i});
- }
- final TableEditor editor = new TableEditor (table);
- editor.horizontalAlignment = SWT.LEFT;
- editor.grabHorizontal = true;
- table.addListener (SWT.MouseDown, new Listener () {
- public void handleEvent (Event event) {
- Rectangle clientArea = table.getClientArea ();
- Point pt = new Point (event.x, event.y);
- int index = table.getTopIndex ();
- while (index < table.getItemCount ()) {
- boolean visible = false;
- final TableItem item = table.getItem (index);
- for (int i=0; i<table.getColumnCount (); i++) {
- Rectangle rect = item.getBounds (i);
- if (rect.contains (pt)) {
- final int column = i;
- final Text text = new Text (table, SWT.NONE);
- Listener textListener = new Listener () {
- public void handleEvent (final Event e) {
- switch (e.type) {
- case SWT.FocusOut:
- item.setText (column, text.getText ());
- text.dispose ();
- break;
- case SWT.Traverse:
- switch (e.detail) {
- case SWT.TRAVERSE_RETURN:
- item.setText (column, text.getText ());
- //FALL THROUGH
- case SWT.TRAVERSE_ESCAPE:
- text.dispose ();
- e.doit = false;
- }
- break;
- }
- }
- };
- text.addListener (SWT.FocusOut, textListener);
- text.addListener (SWT.Traverse, textListener);
- editor.setEditor (text, item, i);
- text.setText (item.getText (i));
- text.selectAll ();
- text.setFocus ();
- return;
- }
- if (!visible && rect.intersects (clientArea)) {
- visible = true;
- }
- }
- if (!visible) return;
- index++;
- }
- }
- });
- shell.pack ();
- shell.open ();
- while (!shell.isDisposed ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose ();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet125.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet125.java
deleted file mode 100644
index 55e035f8f9..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet125.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * Tool Tips example snippet: create fake tool tips for items in a table
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet125 {
-
-public static void main (String[] args) {
- final Display display = new Display ();
- final Shell shell = new Shell (display);
- shell.setLayout (new FillLayout ());
- final Table table = new Table (shell, SWT.BORDER);
- for (int i = 0; i < 20; i++) {
- TableItem item = new TableItem (table, SWT.NONE);
- item.setText ("item " + i);
- }
- // Disable native tooltip
- table.setToolTipText ("");
-
- // Implement a "fake" tooltip
- final Listener labelListener = new Listener () {
- public void handleEvent (Event event) {
- Label label = (Label)event.widget;
- Shell shell = label.getShell ();
- switch (event.type) {
- case SWT.MouseDown:
- Event e = new Event ();
- e.item = (TableItem) label.getData ("_TABLEITEM");
- // Assuming table is single select, set the selection as if
- // the mouse down event went through to the table
- table.setSelection (new TableItem [] {(TableItem) e.item});
- table.notifyListeners (SWT.Selection, e);
- // fall through
- case SWT.MouseExit:
- shell.dispose ();
- break;
- }
- }
- };
-
- Listener tableListener = new Listener () {
- Shell tip = null;
- Label label = null;
- public void handleEvent (Event event) {
- switch (event.type) {
- case SWT.Dispose:
- case SWT.KeyDown:
- case SWT.MouseMove: {
- if (tip == null) break;
- tip.dispose ();
- tip = null;
- label = null;
- break;
- }
- case SWT.MouseHover: {
- TableItem item = table.getItem (new Point (event.x, event.y));
- if (item != null) {
- if (tip != null && !tip.isDisposed ()) tip.dispose ();
- tip = new Shell (shell, SWT.ON_TOP);
- tip.setLayout (new FillLayout ());
- label = new Label (tip, SWT.NONE);
- label.setForeground (display.getSystemColor (SWT.COLOR_INFO_FOREGROUND));
- label.setBackground (display.getSystemColor (SWT.COLOR_INFO_BACKGROUND));
- label.setData ("_TABLEITEM", item);
- label.setText ("tooltip "+item.getText ());
- label.addListener (SWT.MouseExit, labelListener);
- label.addListener (SWT.MouseDown, labelListener);
- Point size = tip.computeSize (SWT.DEFAULT, SWT.DEFAULT);
- Rectangle rect = item.getBounds (0);
- Point pt = table.toDisplay (rect.x, rect.y);
- tip.setBounds (pt.x, pt.y, size.x, size.y);
- tip.setVisible (true);
- }
- }
- }
- }
- };
- table.addListener (SWT.Dispose, tableListener);
- table.addListener (SWT.KeyDown, tableListener);
- table.addListener (SWT.MouseMove, tableListener);
- table.addListener (SWT.MouseHover, tableListener);
- shell.open();
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch())
- display.sleep();
- }
- display.dispose();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet126.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet126.java
deleted file mode 100644
index aa565bacc5..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet126.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * Table example snippet: place arbitrary controls in a table
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.custom.*;
-
-public class Snippet126 {
-public static void main(String[] args) {
- Display display = new Display ();
- Shell shell = new Shell (display);
- shell.setLayout (new FillLayout ());
- Table table = new Table (shell, SWT.BORDER | SWT.MULTI);
- table.setLinesVisible (true);
- for (int i=0; i<3; i++) {
- TableColumn column = new TableColumn(table, SWT.NONE);
- column.setWidth (100);
- }
- for (int i=0; i<12; i++) {
- TableItem item = new TableItem (table, SWT.NONE);
- }
- TableItem [] items = table.getItems ();
- for (int i=0; i<items.length; i++) {
- TableEditor editor = new TableEditor (table);
- CCombo combo = new CCombo (table, SWT.NONE);
- editor.grabHorizontal = true;
- editor.setEditor(combo, items[i], 0);
- editor = new TableEditor (table);
- Text text = new Text (table, SWT.NONE);
- editor.grabHorizontal = true;
- editor.setEditor(text, items[i], 1);
- editor = new TableEditor (table);
- Button button = new Button (table, SWT.CHECK);
- button.pack ();
- editor.minimumWidth = button.getSize ().x;
- editor.horizontalAlignment = SWT.LEFT;
- editor.setEditor (button, items[i], 2);
- }
- shell.pack ();
- shell.open ();
- while (!shell.isDisposed ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose ();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet127.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet127.java
deleted file mode 100644
index f54d712ed1..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet127.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * Control example snippet: prevent Tab from traversing out of a control
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet127 {
-public static void main (String [] args) {
- Display display = new Display ();
- Shell shell = new Shell (display);
- Button button1 = new Button(shell, SWT.PUSH);
- button1.setBounds(10,10,80,30);
- button1.setText("no traverse");
- button1.addTraverseListener(new TraverseListener () {
- public void keyTraversed(TraverseEvent e) {
- switch (e.detail) {
- case SWT.TRAVERSE_TAB_NEXT:
- case SWT.TRAVERSE_TAB_PREVIOUS: {
- e.doit = false;
- }
- }
- }
- });
- Button button2 = new Button (shell, SWT.PUSH);
- button2.setBounds(100,10,80,30);
- button2.setText("can traverse");
- shell.pack ();
- shell.open();
- while (!shell.isDisposed ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose ();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet128.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet128.java
deleted file mode 100644
index 26f2894ade..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet128.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * Browser example snippet: bring up a browser
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.browser.*;
-
-public class Snippet128 {
- public static void main(String [] args) {
- Display display = new Display();
- final Shell shell = new Shell(display);
- GridLayout gridLayout = new GridLayout();
- gridLayout.numColumns = 3;
- shell.setLayout(gridLayout);
- ToolBar toolbar = new ToolBar(shell, SWT.NONE);
- ToolItem itemBack = new ToolItem(toolbar, SWT.PUSH);
- itemBack.setText("Back");
- ToolItem itemForward = new ToolItem(toolbar, SWT.PUSH);
- itemForward.setText("Forward");
- ToolItem itemStop = new ToolItem(toolbar, SWT.PUSH);
- itemStop.setText("Stop");
- ToolItem itemRefresh = new ToolItem(toolbar, SWT.PUSH);
- itemRefresh.setText("Refresh");
- ToolItem itemGo = new ToolItem(toolbar, SWT.PUSH);
- itemGo.setText("Go");
-
- GridData data = new GridData();
- data.horizontalSpan = 3;
- toolbar.setLayoutData(data);
-
- Label labelAddress = new Label(shell, SWT.NONE);
- labelAddress.setText("Address");
-
- final Text location = new Text(shell, SWT.BORDER);
- data = new GridData();
- data.horizontalAlignment = GridData.FILL;
- data.horizontalSpan = 2;
- data.grabExcessHorizontalSpace = true;
- location.setLayoutData(data);
-
- final Browser browser = new Browser(shell, SWT.NONE);
- data = new GridData();
- data.horizontalAlignment = GridData.FILL;
- data.verticalAlignment = GridData.FILL;
- data.horizontalSpan = 3;
- data.grabExcessHorizontalSpace = true;
- data.grabExcessVerticalSpace = true;
- browser.setLayoutData(data);
-
- final Label status = new Label(shell, SWT.NONE);
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan = 2;
- status.setLayoutData(data);
-
- final ProgressBar progressBar = new ProgressBar(shell, SWT.NONE);
- data = new GridData();
- data.horizontalAlignment = GridData.END;
- progressBar.setLayoutData(data);
-
- /* event handling */
- Listener listener = new Listener() {
- public void handleEvent(Event event) {
- ToolItem item = (ToolItem)event.widget;
- String string = item.getText();
- if (string.equals("Back")) browser.back();
- else if (string.equals("Forward")) browser.forward();
- else if (string.equals("Stop")) browser.stop();
- else if (string.equals("Refresh")) browser.refresh();
- else if (string.equals("Go")) browser.setUrl(location.getText());
- }
- };
- browser.addProgressListener(new ProgressListener() {
- public void changed(ProgressEvent event) {
- if (event.total == 0) return;
- int ratio = event.current * 100 / event.total;
- progressBar.setSelection(ratio);
- }
- public void completed(ProgressEvent event) {
- progressBar.setSelection(0);
- }
- });
- browser.addStatusTextListener(new StatusTextListener() {
- public void changed(StatusTextEvent event) {
- status.setText(event.text);
- }
- });
- browser.addLocationListener(new LocationListener() {
- public void changed(LocationEvent event) {
- if (event.top) location.setText(event.location);
- }
- public void changing(LocationEvent event) {
- }
- });
- itemBack.addListener(SWT.Selection, listener);
- itemForward.addListener(SWT.Selection, listener);
- itemStop.addListener(SWT.Selection, listener);
- itemRefresh.addListener(SWT.Selection, listener);
- itemGo.addListener(SWT.Selection, listener);
- location.addListener(SWT.DefaultSelection, new Listener() {
- public void handleEvent(Event e) {
- browser.setUrl(location.getText());
- }
- });
-
- shell.open();
- browser.setUrl("http://eclipse.org");
-
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch())
- display.sleep();
- }
- display.dispose();
- }
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet129.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet129.java
deleted file mode 100644
index c6f3b05123..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet129.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * Table example snippet: color cells and rows in table
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet129 {
-
-public static void main(String[] args) {
- Display display = new Display();
- Color red = display.getSystemColor(SWT.COLOR_RED);
- Color blue = display.getSystemColor(SWT.COLOR_BLUE);
- Color white = display.getSystemColor(SWT.COLOR_WHITE);
- Color gray = display.getSystemColor(SWT.COLOR_GRAY);
- Shell shell = new Shell(display);
- shell.setLayout(new FillLayout());
- Table table = new Table(shell, SWT.BORDER);
- table.setBackground(gray);
- TableColumn column1 = new TableColumn(table, SWT.NONE);
- TableColumn column2 = new TableColumn(table, SWT.NONE);
- TableColumn column3 = new TableColumn(table, SWT.NONE);
- TableItem item = new TableItem(table, SWT.NONE);
- item.setText(new String[] {"entire","row","red foreground"});
- item.setForeground(red);
- item = new TableItem(table, SWT.NONE);
- item.setText(new String[] {"entire","row","red background"});
- item.setBackground(red);
- item = new TableItem(table, SWT.NONE);
- item.setText(new String[] {"entire","row","white fore/red back"});
- item.setForeground(white);
- item.setBackground(red);
- item = new TableItem(table, SWT.NONE);
- item.setText(new String[] {"normal","blue foreground","red foreground"});
- item.setForeground(1, blue);
- item.setForeground(2, red);
- item = new TableItem(table, SWT.NONE);
- item.setText(new String[] {"normal","blue background","red background"});
- item.setBackground(1, blue);
- item.setBackground(2, red);
- item = new TableItem(table, SWT.NONE);
- item.setText(new String[] {"white fore/blue back","normal","white fore/red back"});
- item.setForeground(0, white);
- item.setBackground(0, blue);
- item.setForeground(2, white);
- item.setBackground(2, red);
-
- column1.pack();
- column2.pack();
- column3.pack();
-
- shell.pack();
- shell.open();
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch())
- display.sleep();
- }
- display.dispose();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet13.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet13.java
deleted file mode 100644
index 4a87ca1564..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet13.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * GC example snippet: draw a thick line
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet13 {
-
-public static void main (String [] args) {
- Display display = new Display ();
- Shell shell = new Shell (display);
- shell.open ();
- GC gc = new GC (shell);
- gc.setLineWidth (4);
- gc.drawRectangle (20, 20, 100, 100);
- gc.dispose ();
- while (!shell.isDisposed ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose ();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet130.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet130.java
deleted file mode 100644
index d7a7060b6b..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet130.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * BusyIndicator example snippet: display busy cursor during long running task
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.custom.*;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet130 {
-
- public static void main(String[] args) {
- final Display display = new Display();
- final Shell shell = new Shell(display);
- shell.setLayout(new GridLayout());
- final Text text = new Text(shell, SWT.MULTI | SWT.BORDER | SWT.V_SCROLL);
- text.setLayoutData(new GridData(GridData.FILL_BOTH));
- final int[] nextId = new int[1];
- Button b = new Button(shell, SWT.PUSH);
- b.setText("invoke long running job");
- b.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- Runnable longJob = new Runnable() {
- boolean done = false;
- int id;
- public void run() {
- Thread thread = new Thread(new Runnable() {
- public void run() {
- id = nextId[0]++;
- display.syncExec(new Runnable() {
- public void run() {
- if (text.isDisposed()) return;
- text.append("\nStart long running task "+id);
- }
- });
- for (int i = 0; i < 100000; i++) {
- if (display.isDisposed()) return;
- System.out.println("do task that takes a long time in a separate thread "+id);
- }
- if (display.isDisposed()) return;
- display.syncExec(new Runnable() {
- public void run() {
- if (text.isDisposed()) return;
- text.append("\nCompleted long running task "+id);
- }
- });
- done = true;
- display.wake();
- }
- });
- thread.start();
- while (!done && !shell.isDisposed()) {
- if (!display.readAndDispatch())
- display.sleep();
- }
- }
- };
- BusyIndicator.showWhile(display, longJob);
- }
- });
- shell.setSize(250, 150);
- shell.open();
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch())
- display.sleep();
- }
- display.dispose();
- }
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet131.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet131.java
deleted file mode 100644
index 0fc210e020..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet131.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * Menu example snippet: show a popup menu (wait for it to close)
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet131 {
-public static void main (String [] args) {
- final Display display = new Display ();
- final Shell shell = new Shell (display);
- shell.addListener (SWT.MenuDetect, new Listener () {
- public void handleEvent (Event event) {
- Menu menu = new Menu (shell, SWT.POP_UP);
- MenuItem item = new MenuItem (menu, SWT.PUSH);
- item.setText ("Menu Item");
- item.addListener (SWT.Selection, new Listener () {
- public void handleEvent (Event e) {
- System.out.println ("Item Selected");
- }
- });
- menu.setLocation (event.x, event.y);
- menu.setVisible (true);
- while (!menu.isDisposed () && menu.isVisible ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- menu.dispose ();
- }
- });
- shell.pack ();
- shell.open ();
- while (!shell.isDisposed ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose ();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet132.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet132.java
deleted file mode 100644
index 92f871e0d6..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet132.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * Printing example snippet: print "Hello World!" in black, outlined in red, to default printer
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.printing.*;
-
-public class Snippet132 {
-
-public static void main (String [] args) {
- Display display = new Display();
- Shell shell = new Shell(display);
- shell.open ();
- PrinterData data = Printer.getDefaultPrinterData();
- if (data == null) {
- System.out.println("Warning: No default printer.");
- return;
- }
- Printer printer = new Printer(data);
- if (printer.startJob("SWT Printing Snippet")) {
- Color black = printer.getSystemColor(SWT.COLOR_BLACK);
- Color white = printer.getSystemColor(SWT.COLOR_WHITE);
- Color red = printer.getSystemColor(SWT.COLOR_RED);
- Rectangle trim = printer.computeTrim(0, 0, 0, 0);
- Point dpi = printer.getDPI();
- int leftMargin = dpi.x + trim.x; // one inch from left side of paper
- int topMargin = dpi.y / 2 + trim.y; // one-half inch from top edge of paper
- GC gc = new GC(printer);
- Font font = gc.getFont(); // example just uses printer's default font
- if (printer.startPage()) {
- gc.setBackground(white);
- gc.setForeground(black);
- String testString = "Hello World!";
- Point extent = gc.stringExtent(testString);
- gc.drawString(testString, leftMargin, topMargin + font.getFontData()[0].getHeight());
- gc.setForeground(red);
- gc.drawRectangle(leftMargin, topMargin, extent.x, extent.y);
- printer.endPage();
- }
- gc.dispose();
- printer.endJob();
- }
- printer.dispose();
- while (!shell.isDisposed ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose();
- }
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet133.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet133.java
deleted file mode 100644
index c1b5bf834e..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet133.java
+++ /dev/null
@@ -1,323 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * Printing example snippet: print text to printer, with word wrap and pagination
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import java.io.*;
-import org.eclipse.swt.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.printing.*;
-
-public class Snippet133 {
- Display display;
- Shell shell;
- Text text;
- Font font;
- Color foregroundColor, backgroundColor;
-
- Printer printer;
- GC gc;
- Font printerFont;
- Color printerForegroundColor, printerBackgroundColor;
-
- int lineHeight = 0;
- int tabWidth = 0;
- int leftMargin, rightMargin, topMargin, bottomMargin;
- int x, y;
- int index, end;
- String textToPrint;
- String tabs;
- StringBuffer wordBuffer;
-
- public static void main(String[] args) {
- new Snippet133().open();
- }
-
- void open() {
- display = new Display();
- font = new Font(display, "Courier", 10, SWT.NORMAL);
- foregroundColor = display.getSystemColor(SWT.COLOR_BLACK);
- backgroundColor = display.getSystemColor(SWT.COLOR_WHITE);
- shell = new Shell(display);
- shell.setLayout(new FillLayout());
- shell.setText("Print Text");
- shell.setMaximized(true);
- text = new Text(shell, SWT.BORDER | SWT.MULTI | SWT.V_SCROLL | SWT.H_SCROLL);
- text.setFont(font);
- text.setForeground(foregroundColor);
- text.setBackground(backgroundColor);
-
- Menu menuBar = new Menu(shell, SWT.BAR);
- shell.setMenuBar(menuBar);
- MenuItem item = new MenuItem(menuBar, SWT.CASCADE);
- item.setText("&File");
- Menu fileMenu = new Menu(shell, SWT.DROP_DOWN);
- item.setMenu(fileMenu);
- item = new MenuItem(fileMenu, SWT.PUSH);
- item.setText("&Open...");
- item.setAccelerator(SWT.CTRL + 'O');
- item.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent event) {
- menuOpen();
- }
- });
- item = new MenuItem(fileMenu, SWT.PUSH);
- item.setText("Font...");
- item.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent event) {
- menuFont();
- }
- });
- item = new MenuItem(fileMenu, SWT.PUSH);
- item.setText("Foreground Color...");
- item.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent event) {
- menuForegroundColor();
- }
- });
- item = new MenuItem(fileMenu, SWT.PUSH);
- item.setText("Background Color...");
- item.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent event) {
- menuBackgroundColor();
- }
- });
- item = new MenuItem(fileMenu, SWT.PUSH);
- item.setText("&Print...");
- item.setAccelerator(SWT.CTRL + 'P');
- item.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent event) {
- menuPrint();
- }
- });
- new MenuItem(fileMenu, SWT.SEPARATOR);
- item = new MenuItem(fileMenu, SWT.PUSH);
- item.setText("E&xit");
- item.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent event) {
- System.exit(0);
- }
- });
-
- shell.pack();
- shell.open();
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch()) display.sleep();
- }
- if (font != null) font.dispose();
- if (foregroundColor != null) foregroundColor.dispose();
- if (backgroundColor != null) backgroundColor.dispose();
- }
-
- void menuOpen() {
- final String textString;
- FileDialog dialog = new FileDialog(shell, SWT.OPEN);
- dialog.setFilterExtensions(new String[] {"*.java", "*.*"});
- String name = dialog.open();
- if ((name == null) || (name.length() == 0)) return;
-
- try {
- File file = new File(name);
- FileInputStream stream= new FileInputStream(file.getPath());
- try {
- Reader in = new BufferedReader(new InputStreamReader(stream));
- char[] readBuffer= new char[2048];
- StringBuffer buffer= new StringBuffer((int) file.length());
- int n;
- while ((n = in.read(readBuffer)) > 0) {
- buffer.append(readBuffer, 0, n);
- }
- textString = buffer.toString();
- stream.close();
- } catch (IOException e) {
- MessageBox box = new MessageBox(shell, SWT.ICON_ERROR);
- box.setMessage("Error reading file:\n" + name);
- box.open();
- return;
- }
- } catch (FileNotFoundException e) {
- MessageBox box = new MessageBox(shell, SWT.ICON_ERROR);
- box.setMessage("File not found:\n" + name);
- box.open();
- return;
- }
- text.setText(textString);
- }
-
- void menuFont() {
- FontDialog fontDialog = new FontDialog(shell);
- fontDialog.setFontList(font.getFontData());
- FontData fontData = fontDialog.open();
- if (fontData != null) {
- if (font != null) font.dispose();
- font = new Font(display, fontData);
- text.setFont(font);
- }
- }
-
- void menuForegroundColor() {
- ColorDialog colorDialog = new ColorDialog(shell);
- colorDialog.setRGB(foregroundColor.getRGB());
- RGB rgb = colorDialog.open();
- if (rgb != null) {
- if (foregroundColor != null) foregroundColor.dispose();
- foregroundColor = new Color(display, rgb);
- text.setForeground(foregroundColor);
- }
- }
-
- void menuBackgroundColor() {
- ColorDialog colorDialog = new ColorDialog(shell);
- colorDialog.setRGB(backgroundColor.getRGB());
- RGB rgb = colorDialog.open();
- if (rgb != null) {
- if (backgroundColor != null) backgroundColor.dispose();
- backgroundColor = new Color(display, rgb);
- text.setBackground(backgroundColor);
- }
- }
-
- void menuPrint() {
- PrintDialog dialog = new PrintDialog(shell, SWT.NULL);
- PrinterData data = dialog.open();
- if (data == null) return;
- if (data.printToFile) {
- data.fileName = "print.out"; // you probably want to ask the user for a filename
- }
-
- /* Get the text to print from the Text widget (you could get it from anywhere, i.e. your java model) */
- textToPrint = text.getText();
-
- /* Do the printing in a background thread so that spooling does not freeze the UI. */
- printer = new Printer(data);
- Thread printingThread = new Thread("Printing") {
- public void run() {
- print(printer);
- printer.dispose();
- }
- };
- printingThread.start();
- }
-
- void print(Printer printer) {
- if (printer.startJob("Text")) { // the string is the job name - shows up in the printer's job list
- Rectangle clientArea = printer.getClientArea();
- Rectangle trim = printer.computeTrim(0, 0, 0, 0);
- Point dpi = printer.getDPI();
- leftMargin = dpi.x + trim.x; // one inch from left side of paper
- rightMargin = clientArea.width - dpi.x + trim.x + trim.width; // one inch from right side of paper
- topMargin = dpi.y + trim.y; // one inch from top edge of paper
- bottomMargin = clientArea.height - dpi.y + trim.y + trim.height; // one inch from bottom edge of paper
-
- /* Create a buffer for computing tab width. */
- int tabSize = 4; // is tab width a user setting in your UI?
- StringBuffer tabBuffer = new StringBuffer(tabSize);
- for (int i = 0; i < tabSize; i++) tabBuffer.append(' ');
- tabs = tabBuffer.toString();
-
- /* Create printer GC, and create and set the printer font & foreground color. */
- gc = new GC(printer);
-
- FontData fontData = font.getFontData()[0];
- printerFont = new Font(printer, fontData.getName(), fontData.getHeight(), fontData.getStyle());
- gc.setFont(printerFont);
- tabWidth = gc.stringExtent(tabs).x;
- lineHeight = gc.getFontMetrics().getHeight();
-
- RGB rgb = foregroundColor.getRGB();
- printerForegroundColor = new Color(printer, rgb);
- gc.setForeground(printerForegroundColor);
-
- rgb = backgroundColor.getRGB();
- printerBackgroundColor = new Color(printer, rgb);
- gc.setBackground(printerBackgroundColor);
-
- /* Print text to current gc using word wrap */
- printText();
- printer.endJob();
-
- /* Cleanup graphics resources used in printing */
- printerFont.dispose();
- printerForegroundColor.dispose();
- printerBackgroundColor.dispose();
- gc.dispose();
- }
- }
-
- void printText() {
- printer.startPage();
- wordBuffer = new StringBuffer();
- x = leftMargin;
- y = topMargin;
- index = 0;
- end = textToPrint.length();
- while (index < end) {
- char c = textToPrint.charAt(index);
- index++;
- if (c != 0) {
- if (c == 0x0a || c == 0x0d) {
- if (c == 0x0d && index < end && textToPrint.charAt(index) == 0x0a) {
- index++; // if this is cr-lf, skip the lf
- }
- printWordBuffer();
- newline();
- } else {
- if (c != '\t') {
- wordBuffer.append(c);
- }
- if (Character.isWhitespace(c)) {
- printWordBuffer();
- if (c == '\t') {
- x += tabWidth;
- }
- }
- }
- }
- }
- if (y + lineHeight <= bottomMargin) {
- printer.endPage();
- }
- }
-
- void printWordBuffer() {
- if (wordBuffer.length() > 0) {
- String word = wordBuffer.toString();
- int wordWidth = gc.stringExtent(word).x;
- if (x + wordWidth > rightMargin) {
- /* word doesn't fit on current line, so wrap */
- newline();
- }
- gc.drawString(word, x, y, false);
- x += wordWidth;
- wordBuffer = new StringBuffer();
- }
- }
-
- void newline() {
- x = leftMargin;
- y += lineHeight;
- if (y + lineHeight > bottomMargin) {
- printer.endPage();
- if (index + 1 < end) {
- y = topMargin;
- printer.startPage();
- }
- }
- }
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet134.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet134.java
deleted file mode 100644
index cfeeade297..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet134.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * Shell example snippet: create a non-rectangular window
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet134 {
-
-static int[] circle(int r, int offsetX, int offsetY) {
- int[] polygon = new int[8 * r + 4];
- //x^2 + y^2 = r^2
- for (int i = 0; i < 2 * r + 1; i++) {
- int x = i - r;
- int y = (int)Math.sqrt(r*r - x*x);
- polygon[2*i] = offsetX + x;
- polygon[2*i+1] = offsetY + y;
- polygon[8*r - 2*i - 2] = offsetX + x;
- polygon[8*r - 2*i - 1] = offsetY - y;
- }
- return polygon;
-}
-
-public static void main(String[] args) {
- final Display display = new Display();
- //Shell must be created with style SWT.NO_TRIM
- final Shell shell = new Shell(display, SWT.NO_TRIM | SWT.ON_TOP);
- shell.setBackground(display.getSystemColor(SWT.COLOR_RED));
- //define a region that looks like a key hole
- Region region = new Region();
- region.add(circle(67, 67, 67));
- region.subtract(circle(20, 67, 50));
- region.subtract(new int[]{67, 50, 55, 105, 79, 105});
- //define the shape of the shell using setRegion
- shell.setRegion(region);
- Rectangle size = region.getBounds();
- shell.setSize(size.width, size.height);
- //add ability to move shell around
- Listener l = new Listener() {
- Point origin;
- public void handleEvent(Event e) {
- switch (e.type) {
- case SWT.MouseDown:
- origin = new Point(e.x, e.y);
- break;
- case SWT.MouseUp:
- origin = null;
- break;
- case SWT.MouseMove:
- if (origin != null) {
- Point p = display.map(shell, null, e.x, e.y);
- shell.setLocation(p.x - origin.x, p.y - origin.y);
- }
- break;
- }
- }
- };
- shell.addListener(SWT.MouseDown, l);
- shell.addListener(SWT.MouseUp, l);
- shell.addListener(SWT.MouseMove, l);
- //add ability to close shell
- Button b = new Button(shell, SWT.PUSH);
- b.setBackground(shell.getBackground());
- b.setText("close");
- b.pack();
- b.setLocation(10, 68);
- b.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- shell.close();
- }
- });
- shell.open();
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch())
- display.sleep();
- }
- region.dispose();
- display.dispose();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet135.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet135.java
deleted file mode 100644
index 7f8e7a56e2..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet135.java
+++ /dev/null
@@ -1,274 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * example snippet: embed Swing/AWT in SWT
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import java.awt.EventQueue;
-import java.io.*;
-import java.util.*;
-import javax.swing.*;
-import javax.swing.table.*;
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.awt.SWT_AWT;
-
-public class Snippet135 {
-
- static class FileTableModel extends AbstractTableModel {
- File[] files;
- String[] columnsName = {"Name", "Size", "Date Modified"};
-
- public FileTableModel (File[] files) {
- this.files = files;
- }
- public int getColumnCount () {
- return columnsName.length;
- }
- public Class getColumnClass (int col) {
- if (col == 1) return Long.class;
- if (col == 2) return Date.class;
- return String.class;
- }
- public int getRowCount () {
- return files == null ? 0 : files.length;
- }
- public Object getValueAt (int row, int col) {
- if (col == 0) return files[row].getName();
- if (col == 1) return new Long(files[row].length());
- if (col == 2) return new Date(files[row].lastModified());
- return "";
- }
- public String getColumnName (int col) {
- return columnsName[col];
- }
- }
-
- public static void main(String[] args) {
- final Display display = new Display();
- final Shell shell = new Shell(display);
- shell.setText("SWT and Swing/AWT Example");
-
- Listener exitListener = new Listener() {
- public void handleEvent(Event e) {
- MessageBox dialog = new MessageBox(shell, SWT.OK | SWT.CANCEL | SWT.ICON_QUESTION);
- dialog.setText("Question");
- dialog.setMessage("Exit?");
- if (e.type == SWT.Close) e.doit = false;
- if (dialog.open() != SWT.OK) return;
- shell.dispose();
- }
- };
- Listener aboutListener = new Listener() {
- public void handleEvent(Event e) {
- final Shell s = new Shell(shell, SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL);
- s.setText("About");
- GridLayout layout = new GridLayout(1, false);
- layout.verticalSpacing = 20;
- layout.marginHeight = layout.marginWidth = 10;
- s.setLayout(layout);
- Label label = new Label(s, SWT.NONE);
- label.setText("SWT and AWT Example.");
- Button button = new Button(s, SWT.PUSH);
- button.setText("OK");
- GridData data = new GridData();
- data.horizontalAlignment = GridData.CENTER;
- button.setLayoutData(data);
- button.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- s.dispose();
- }
- });
- s.pack();
- Rectangle parentBounds = shell.getBounds();
- Rectangle bounds = s.getBounds();
- int x = parentBounds.x + (parentBounds.width - bounds.width) / 2;
- int y = parentBounds.y + (parentBounds.height - bounds.height) / 2;
- s.setLocation(x, y);
- s.open();
- while (!s.isDisposed()) {
- if (!display.readAndDispatch()) display.sleep();
- }
- }
- };
- shell.addListener(SWT.Close, exitListener);
- Menu mb = new Menu(shell, SWT.BAR);
- MenuItem fileItem = new MenuItem(mb, SWT.CASCADE);
- fileItem.setText("&File");
- Menu fileMenu = new Menu(shell, SWT.DROP_DOWN);
- fileItem.setMenu(fileMenu);
- MenuItem exitItem = new MenuItem(fileMenu, SWT.PUSH);
- exitItem.setText("&Exit\tCtrl+X");
- exitItem.setAccelerator(SWT.CONTROL + 'X');
- exitItem.addListener(SWT.Selection, exitListener);
- MenuItem aboutItem = new MenuItem(fileMenu, SWT.PUSH);
- aboutItem.setText("&About\tCtrl+A");
- aboutItem.setAccelerator(SWT.CONTROL + 'A');
- aboutItem.addListener(SWT.Selection, aboutListener);
- shell.setMenuBar(mb);
-
- RGB color = shell.getBackground().getRGB();
- Label separator1 = new Label(shell, SWT.SEPARATOR | SWT.HORIZONTAL);
- Label locationLb = new Label(shell, SWT.NONE);
- locationLb.setText("Location:");
- Composite locationComp = new Composite(shell, SWT.EMBEDDED);
- ToolBar toolBar = new ToolBar(shell, SWT.FLAT);
- ToolItem exitToolItem = new ToolItem(toolBar, SWT.PUSH);
- exitToolItem.setText("&Exit");
- exitToolItem.addListener(SWT.Selection, exitListener);
- ToolItem aboutToolItem = new ToolItem(toolBar, SWT.PUSH);
- aboutToolItem.setText("&About");
- aboutToolItem.addListener(SWT.Selection, aboutListener);
- Label separator2 = new Label(shell, SWT.SEPARATOR | SWT.HORIZONTAL);
- final Composite comp = new Composite(shell, SWT.NONE);
- final Tree fileTree = new Tree(comp, SWT.SINGLE | SWT.BORDER);
- Sash sash = new Sash(comp, SWT.VERTICAL);
- Composite tableComp = new Composite(comp, SWT.EMBEDDED);
- Label separator3 = new Label(shell, SWT.SEPARATOR | SWT.HORIZONTAL);
- Composite statusComp = new Composite(shell, SWT.EMBEDDED);
-
- java.awt.Frame locationFrame = SWT_AWT.new_Frame(locationComp);
- final java.awt.TextField locationText = new java.awt.TextField();
- locationFrame.add(locationText);
-
- java.awt.Frame fileTableFrame = SWT_AWT.new_Frame(tableComp);
- java.awt.Panel panel = new java.awt.Panel(new java.awt.BorderLayout());
- fileTableFrame.add(panel);
- final JTable fileTable = new JTable(new FileTableModel(null));
- fileTable.setDoubleBuffered(true);
- fileTable.setShowGrid(false);
- fileTable.createDefaultColumnsFromModel();
- JScrollPane scrollPane = new JScrollPane(fileTable);
- panel.add(scrollPane);
-
- java.awt.Frame statusFrame = SWT_AWT.new_Frame(statusComp);
- statusFrame.setBackground(new java.awt.Color(color.red, color.green, color.blue));
- final java.awt.Label statusLabel = new java.awt.Label();
- statusFrame.add(statusLabel);
- statusLabel.setText("Select a file");
-
- sash.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- if (e.detail == SWT.DRAG) return;
- GridData data = (GridData)fileTree.getLayoutData();
- Rectangle trim = fileTree.computeTrim(0, 0, 0, 0);
- data.widthHint = e.x - trim.width;
- comp.layout();
- }
- });
-
- File[] roots = File.listRoots();
- for (int i = 0; i < roots.length; i++) {
- File file = roots[i];
- TreeItem treeItem = new TreeItem(fileTree, SWT.NONE);
- treeItem.setText(file.getAbsolutePath());
- treeItem.setData(file);
- TreeItem dumyItem = new TreeItem(treeItem, SWT.NONE);
- }
- fileTree.addListener(SWT.Expand, new Listener() {
- public void handleEvent(Event e) {
- TreeItem item = (TreeItem)e.item;
- if (item == null) return;
- if (item.getItemCount() == 1) {
- TreeItem firstItem = item.getItems()[0];
- if (firstItem.getData() != null) return;
- firstItem.dispose();
- } else {
- return;
- }
- File root = (File)item.getData();
- File[] files = root.listFiles();
- if (files == null) return;
- for (int i = 0; i < files.length; i++) {
- File file = files[i];
- if (file.isDirectory()) {
- TreeItem treeItem = new TreeItem(item, SWT.NONE);
- treeItem.setText(file.getName());
- treeItem.setData(file);
- TreeItem dumyItem = new TreeItem(treeItem, SWT.NONE);
- }
- }
- }
- });
- fileTree.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- TreeItem item = (TreeItem)e.item;
- if (item == null) return;
- final File root = (File)item.getData();
- EventQueue.invokeLater(new Runnable() {
- public void run() {
- statusLabel.setText(root.getAbsolutePath());
- locationText.setText(root.getAbsolutePath());
- fileTable.setModel(new FileTableModel(root.listFiles()));
- }
- });
- }
- });
-
- GridLayout layout = new GridLayout(4, false);
- layout.marginWidth = layout.marginHeight = 0;
- layout.horizontalSpacing = layout.verticalSpacing = 1;
- shell.setLayout(layout);
- GridData data;
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan = 4;
- separator1.setLayoutData(data);
- data = new GridData();
- data.horizontalSpan = 1;
- data.horizontalIndent = 10;
- locationLb.setLayoutData(data);
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan = 2;
- data.heightHint = locationText.getPreferredSize().height;
- locationComp.setLayoutData(data);
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan = 1;
- toolBar.setLayoutData(data);
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan = 4;
- separator2.setLayoutData(data);
- data = new GridData(GridData.FILL_BOTH);
- data.horizontalSpan = 4;
- comp.setLayoutData(data);
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan = 4;
- separator3.setLayoutData(data);
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan = 4;
- data.heightHint = statusLabel.getPreferredSize().height;
- statusComp.setLayoutData(data);
-
- layout = new GridLayout(3, false);
- layout.marginWidth = layout.marginHeight = 0;
- layout.horizontalSpacing = layout.verticalSpacing = 1;
- comp.setLayout(layout);
- data = new GridData(GridData.FILL_VERTICAL);
- data.widthHint = 200;
- fileTree.setLayoutData(data);
- data = new GridData(GridData.FILL_VERTICAL);
- sash.setLayoutData(data);
- data = new GridData(GridData.FILL_BOTH);
- tableComp.setLayoutData(data);
-
- shell.open();
- while(!shell.isDisposed()) {
- if (!display.readAndDispatch()) display.sleep();
- }
- display.dispose();
- }
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet136.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet136.java
deleted file mode 100644
index 99b6510ac1..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet136.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * Browser example snippet: render HTML from memory
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.browser.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet136 {
- public static void main(String [] args) {
- String html = "<HTML><HEAD><TITLE>HTML Test</TITLE></HEAD><BODY>";
- for (int i = 0; i < 100; i++) html += "<P>This is line "+i+"</P>";
- html += "</BODY></HTML>";
-
- Display display = new Display();
- Shell shell = new Shell(display);
- shell.setLayout(new FillLayout());
- Browser browser = new Browser(shell, SWT.NONE);
- browser.setText(html);
- shell.open();
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch())
- display.sleep();
- }
- display.dispose();
- }
-}
-
-
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet137.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet137.java
deleted file mode 100644
index 06b54feeca..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet137.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * Browser example snippet: render HTML that includes relative links from memory
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.browser.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet137 {
-
-public static void main(String [] args) {
- /* Relative links: use the HTML base tag */
- String html = "<html><head>"+
- "<base href=\"http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/\" >"+
- "<title>HTML Test</title></head>"+
- "<body><a href=\"dev.html\">local link</a></body></html>";
-
- Display display = new Display();
- Shell shell = new Shell(display);
- shell.setLayout(new FillLayout());
- Browser browser = new Browser(shell, SWT.NONE);
- browser.setText(html);
- shell.open();
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch())
- display.sleep();
- }
- display.dispose();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet138.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet138.java
deleted file mode 100644
index 841dc592aa..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet138.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * example snippet: set icons with different resolutions
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet138 {
- public static void main(String[] args) {
- Display display = new Display();
-
- Image small = new Image(display, 16, 16);
- GC gc = new GC(small);
- gc.setBackground(display.getSystemColor(SWT.COLOR_RED));
- gc.fillArc(0, 0, 16, 16, 45, 270);
- gc.dispose();
-
- Image large = new Image(display, 32, 32);
- gc = new GC(large);
- gc.setBackground(display.getSystemColor(SWT.COLOR_RED));
- gc.fillArc(0, 0, 32, 32, 45, 270);
- gc.dispose();
-
- /* Provide different resolutions for icons to get
- * high quality rendering wherever the OS needs
- * large icons. For example, the ALT+TAB window
- * on certain systems uses a larger icon.
- */
- Shell shell = new Shell(display);
- shell.setText("Small and Large icons");
- shell.setImages(new Image[] {small, large});
-
- /* No large icon: the OS will scale up the
- * small icon when it needs a large one.
- */
- Shell shell2 = new Shell(display);
- shell2.setText("Small icon");
- shell2.setImage(small);
-
- shell.open();
- shell2.open();
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch())
- display.sleep();
- }
- display.dispose();
- }
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet139.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet139.java
deleted file mode 100644
index 028e580d86..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet139.java
+++ /dev/null
@@ -1,137 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * This snippet was adapted from org.eclipse.draw2d.ImageUtilities in
- * http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.draw2d/?cvsroot=Tools_Project
- * by Pratik Shah.
- *
- * example snippet: rotate and flip an image
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet139 {
-
-static ImageData rotate(ImageData srcData, int direction) {
- int bytesPerPixel = srcData.bytesPerLine / srcData.width;
- int destBytesPerLine = (direction == SWT.DOWN)? srcData.width * bytesPerPixel : srcData.height * bytesPerPixel;
- byte[] newData = new byte[srcData.data.length];
- int width = 0, height = 0;
- for (int srcY = 0; srcY < srcData.height; srcY++) {
- for (int srcX = 0; srcX < srcData.width; srcX++) {
- int destX = 0, destY = 0, destIndex = 0, srcIndex = 0;
- switch (direction){
- case SWT.LEFT: // left 90 degrees
- destX = srcY;
- destY = srcData.width - srcX - 1;
- width = srcData.height;
- height = srcData.width;
- break;
- case SWT.RIGHT: // right 90 degrees
- destX = srcData.height - srcY - 1;
- destY = srcX;
- width = srcData.height;
- height = srcData.width;
- break;
- case SWT.DOWN: // 180 degrees
- destX = srcData.width - srcX - 1;
- destY = srcData.height - srcY - 1;
- width = srcData.width;
- height = srcData.height;
- break;
- }
- destIndex = (destY * destBytesPerLine) + (destX * bytesPerPixel);
- srcIndex = (srcY * srcData.bytesPerLine) + (srcX * bytesPerPixel);
- System.arraycopy(srcData.data, srcIndex, newData, destIndex, bytesPerPixel);
- }
- }
- // destBytesPerLine is used as scanlinePad to ensure that no padding is required
- return new ImageData(width, height, srcData.depth, srcData.palette, destBytesPerLine, newData);
-}
-static ImageData flip(ImageData srcData, boolean vertical) {
- int bytesPerPixel = srcData.bytesPerLine / srcData.width;
- int destBytesPerLine = srcData.width * bytesPerPixel;
- byte[] newData = new byte[srcData.data.length];
- for (int srcY = 0; srcY < srcData.height; srcY++) {
- for (int srcX = 0; srcX < srcData.width; srcX++) {
- int destX = 0, destY = 0, destIndex = 0, srcIndex = 0;
- if (vertical){
- destX = srcX;
- destY = srcData.height - srcY - 1;
- } else {
- destX = srcData.width - srcX - 1;
- destY = srcY;
- }
- destIndex = (destY * destBytesPerLine) + (destX * bytesPerPixel);
- srcIndex = (srcY * srcData.bytesPerLine) + (srcX * bytesPerPixel);
- System.arraycopy(srcData.data, srcIndex, newData, destIndex, bytesPerPixel);
- }
- }
- // destBytesPerLine is used as scanlinePad to ensure that no padding is required
- return new ImageData(srcData.width, srcData.height, srcData.depth, srcData.palette, destBytesPerLine, newData);
-}
-
-public static void main(String[] args) {
- Display display = new Display();
-
- // create an image with the word "hello" on it
- final Image image0 = new Image(display, 50, 30);
- GC gc = new GC(image0);
- gc.setBackground(display.getSystemColor(SWT.COLOR_RED));
- gc.fillRectangle(image0.getBounds());
- gc.drawString("hello", 5, 5, true);
- gc.dispose();
-
- ImageData data = image0.getImageData();
- // rotate and flip this image
- final Image image1 = new Image(display, rotate(data, SWT.LEFT));
- final Image image2 = new Image(display, rotate(data, SWT.RIGHT));
- final Image image3 = new Image(display, rotate(data, SWT.DOWN));
- final Image image4 = new Image(display, flip(data, true));
- final Image image5 = new Image(display, flip(data, false));
-
- Shell shell = new Shell(display);
- // draw the results on the shell
- shell.addPaintListener(new PaintListener(){
- public void paintControl(PaintEvent e) {
- e.gc.drawText("Original Image:", 10, 10, true);
- e.gc.drawImage(image0, 10, 40);
- e.gc.drawText("Left, Right, 180:", 10, 80, true);
- e.gc.drawImage(image1, 10, 110);
- e.gc.drawImage(image2, 50, 110);
- e.gc.drawImage(image3, 90, 110);
- e.gc.drawText("Flipped Vertical, Horizontal:", 10, 170, true);
- e.gc.drawImage(image4, 10, 200);
- e.gc.drawImage(image5, 70, 200);
- }
- });
- shell.setSize(300, 300);
- shell.open();
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch())
- display.sleep();
- }
- image0.dispose();
- image1.dispose();
- image2.dispose();
- image3.dispose();
- image4.dispose();
- image5.dispose();
- display.dispose();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet14.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet14.java
deleted file mode 100644
index ff0109bfbc..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet14.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * Control example snippet: detect mouse enter, exit and hover events
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet14 {
-
-public static void main (String [] args) {
- Display display = new Display ();
- Shell shell = new Shell (display);
- shell.setSize (100, 100);
- shell.addListener (SWT.MouseEnter, new Listener () {
- public void handleEvent (Event e) {
- System.out.println ("ENTER");
- }
- });
- shell.addListener (SWT.MouseExit, new Listener () {
- public void handleEvent (Event e) {
- System.out.println ("EXIT");
- }
- });
- shell.addListener (SWT.MouseHover, new Listener () {
- public void handleEvent (Event e) {
- System.out.println ("HOVER");
- }
- });
- shell.open ();
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose ();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet140.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet140.java
deleted file mode 100644
index 40c8b27c81..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet140.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * CoolBar example snippet: drop-down a chevron menu containing hidden tool items
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.layout.*;
-
-public class Snippet140 {
- static Display display;
- static Shell shell;
- static CoolBar coolBar;
- static Menu chevronMenu = null;
-
-public static void main (String [] args) {
- display = new Display ();
- shell = new Shell (display);
- shell.setLayout(new GridLayout());
- coolBar = new CoolBar(shell, SWT.FLAT | SWT.BORDER);
- coolBar.setLayoutData(new GridData(GridData.FILL_BOTH));
- ToolBar toolBar = new ToolBar(coolBar, SWT.FLAT | SWT.WRAP);
- int minWidth = 0;
- for (int j = 0; j < 5; j++) {
- int width = 0;
- ToolItem item = new ToolItem(toolBar, SWT.PUSH);
- item.setText("B" + j);
- width = item.getWidth();
- /* find the width of the widest tool */
- if (width > minWidth) minWidth = width;
- }
- CoolItem coolItem = new CoolItem(coolBar, SWT.DROP_DOWN);
- coolItem.setControl(toolBar);
- Point size = toolBar.computeSize(SWT.DEFAULT, SWT.DEFAULT);
- Point coolSize = coolItem.computeSize (size.x, size.y);
- coolItem.setMinimumSize(minWidth, coolSize.y);
- coolItem.setPreferredSize(coolSize);
- coolItem.setSize(coolSize);
- coolItem.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent event) {
- if (event.detail == SWT.ARROW) {
- CoolItem item = (CoolItem) event.widget;
- Rectangle itemBounds = item.getBounds ();
- Point pt = coolBar.toDisplay(new Point(itemBounds.x, itemBounds.y));
- itemBounds.x = pt.x;
- itemBounds.y = pt.y;
- ToolBar toolBar = (ToolBar) item.getControl ();
- ToolItem[] tools = toolBar.getItems ();
-
- int i = 0;
- while (i < tools.length) {
- Rectangle toolBounds = tools[i].getBounds ();
- pt = toolBar.toDisplay(new Point(toolBounds.x, toolBounds.y));
- toolBounds.x = pt.x;
- toolBounds.y = pt.y;
-
- /* Figure out the visible portion of the tool by looking at the
- * intersection of the tool bounds with the cool item bounds. */
- Rectangle intersection = itemBounds.intersection (toolBounds);
-
- /* If the tool is not completely within the cool item bounds, then it
- * is partially hidden, and all remaining tools are completely hidden. */
- if (!intersection.equals (toolBounds)) break;
- i++;
- }
-
- /* Create a menu with items for each of the completely hidden buttons. */
- if (chevronMenu != null) chevronMenu.dispose();
- chevronMenu = new Menu (coolBar);
- for (int j = i; j < tools.length; j++) {
- MenuItem menuItem = new MenuItem (chevronMenu, SWT.PUSH);
- menuItem.setText (tools[j].getText());
- }
-
- /* Drop down the menu below the chevron, with the left edges aligned. */
- pt = coolBar.toDisplay(new Point(event.x, event.y));
- chevronMenu.setLocation (pt.x, pt.y);
- chevronMenu.setVisible (true);
- }
- }
- });
-
- shell.pack();
- shell.open ();
- while (!shell.isDisposed ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose ();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet141.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet141.java
deleted file mode 100644
index 476ccb6414..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet141.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * Image example snippet: display an animated GIF
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet141 {
- static Display display;
- static Shell shell;
- static GC shellGC;
- static Color shellBackground;
- static ImageLoader loader;
- static ImageData[] imageDataArray;
- static Thread animateThread;
- static Image image;
- static final boolean useGIFBackground = false;
-
- public static void main(String[] args) {
- display = new Display();
- shell = new Shell(display);
- shell.setSize(300, 300);
- shell.open();
- shellGC = new GC(shell);
- shellBackground = shell.getBackground();
-
- FileDialog dialog = new FileDialog(shell);
- dialog.setFilterExtensions(new String[] {"*.gif"});
- String fileName = dialog.open();
- if (fileName != null) {
- loader = new ImageLoader();
- try {
- imageDataArray = loader.load(fileName);
- if (imageDataArray.length > 1) {
- animateThread = new Thread("Animation") {
- public void run() {
- /* Create an off-screen image to draw on, and fill it with the shell background. */
- Image offScreenImage = new Image(display, loader.logicalScreenWidth, loader.logicalScreenHeight);
- GC offScreenImageGC = new GC(offScreenImage);
- offScreenImageGC.setBackground(shellBackground);
- offScreenImageGC.fillRectangle(0, 0, loader.logicalScreenWidth, loader.logicalScreenHeight);
-
- try {
- /* Create the first image and draw it on the off-screen image. */
- int imageDataIndex = 0;
- ImageData imageData = imageDataArray[imageDataIndex];
- if (image != null && !image.isDisposed()) image.dispose();
- image = new Image(display, imageData);
- offScreenImageGC.drawImage(
- image,
- 0,
- 0,
- imageData.width,
- imageData.height,
- imageData.x,
- imageData.y,
- imageData.width,
- imageData.height);
-
- /* Now loop through the images, creating and drawing each one
- * on the off-screen image before drawing it on the shell. */
- int repeatCount = loader.repeatCount;
- while (loader.repeatCount == 0 || repeatCount > 0) {
- switch (imageData.disposalMethod) {
- case SWT.DM_FILL_BACKGROUND:
- /* Fill with the background color before drawing. */
- Color bgColor = null;
- if (useGIFBackground && loader.backgroundPixel != -1) {
- bgColor = new Color(display, imageData.palette.getRGB(loader.backgroundPixel));
- }
- offScreenImageGC.setBackground(bgColor != null ? bgColor : shellBackground);
- offScreenImageGC.fillRectangle(imageData.x, imageData.y, imageData.width, imageData.height);
- if (bgColor != null) bgColor.dispose();
- break;
- case SWT.DM_FILL_PREVIOUS:
- /* Restore the previous image before drawing. */
- offScreenImageGC.drawImage(
- image,
- 0,
- 0,
- imageData.width,
- imageData.height,
- imageData.x,
- imageData.y,
- imageData.width,
- imageData.height);
- break;
- }
-
- imageDataIndex = (imageDataIndex + 1) % imageDataArray.length;
- imageData = imageDataArray[imageDataIndex];
- image.dispose();
- image = new Image(display, imageData);
- offScreenImageGC.drawImage(
- image,
- 0,
- 0,
- imageData.width,
- imageData.height,
- imageData.x,
- imageData.y,
- imageData.width,
- imageData.height);
-
- /* Draw the off-screen image to the shell. */
- shellGC.drawImage(offScreenImage, 0, 0);
-
- /* Sleep for the specified delay time (adding commonly-used slow-down fudge factors). */
- try {
- int ms = imageData.delayTime * 10;
- if (ms < 20) ms += 30;
- if (ms < 30) ms += 10;
- Thread.sleep(ms);
- } catch (InterruptedException e) {
- }
-
- /* If we have just drawn the last image, decrement the repeat count and start again. */
- if (imageDataIndex == imageDataArray.length - 1) repeatCount--;
- }
- } catch (SWTException ex) {
- System.out.println("There was an error animating the GIF");
- } finally {
- if (offScreenImage != null && !offScreenImage.isDisposed()) offScreenImage.dispose();
- if (offScreenImageGC != null && !offScreenImageGC.isDisposed()) offScreenImageGC.dispose();
- if (image != null && !image.isDisposed()) image.dispose();
- }
- }
- };
- animateThread.setDaemon(true);
- animateThread.start();
- }
- } catch (SWTException ex) {
- System.out.println("There was an error loading the GIF");
- }
- }
-
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch()) display.sleep();
- }
- display.dispose();
- }
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet142.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet142.java
deleted file mode 100644
index 90cd4125f2..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet142.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * UI Automation (for testing tools) snippet: post mouse events
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet142 {
-
-public static void main(String[] args) {
- final Display display = new Display();
- final Shell shell = new Shell(display);
- final Button button = new Button(shell,SWT.NONE);
- button.setSize(100,100);
- button.setText("Click");
- shell.pack();
- shell.open();
- button.addListener(SWT.MouseDown, new Listener() {
- public void handleEvent(Event e){
- System.out.println("Mouse Down (button: " + e.button + " x: " + e.x + " y: " + e.y + ")");
- }
- });
- final Point pt = display.map(shell, null, 50, 50);
- new Thread(){
- Event event;
- public void run(){
- try {
- Thread.sleep(300);
- } catch (InterruptedException e) {}
- event = new Event();
- event.type = SWT.MouseMove;
- event.x = pt.x;
- event.y = pt.y;
- display.post(event);
- try {
- Thread.sleep(300);
- } catch (InterruptedException e) {}
- event.type = SWT.MouseDown;
- event.button = 1;
- display.post(event);
- try {
- Thread.sleep(300);
- } catch (InterruptedException e) {}
- event.type = SWT.MouseUp;
- display.post(event);
- }
- }.start();
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch()) display.sleep();
- }
- display.dispose();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet143.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet143.java
deleted file mode 100644
index d513439c01..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet143.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * Tray example snippet: place an icon with a popup menu on the system tray
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet143 {
-
-public static void main(String[] args) {
- Display display = new Display ();
- Shell shell = new Shell (display);
- Image image = new Image (display, 16, 16);
- final Tray tray = display.getSystemTray ();
- final TrayItem item = new TrayItem (tray, SWT.NONE);
- item.setToolTipText("SWT TrayItem");
- item.addListener (SWT.Show, new Listener () {
- public void handleEvent (Event event) {
- System.out.println("show");
- }
- });
- item.addListener (SWT.Hide, new Listener () {
- public void handleEvent (Event event) {
- System.out.println("hide");
- }
- });
- item.addListener (SWT.Selection, new Listener () {
- public void handleEvent (Event event) {
- System.out.println("selection");
- }
- });
- item.addListener (SWT.DefaultSelection, new Listener () {
- public void handleEvent (Event event) {
- System.out.println("default selection");
- }
- });
- final Menu menu = new Menu (shell, SWT.POP_UP);
- for (int i = 0; i < 8; i++) {
- MenuItem mi = new MenuItem (menu, SWT.PUSH);
- mi.setText ("Item" + i);
- }
- item.addListener (SWT.MenuDetect, new Listener () {
- public void handleEvent (Event event) {
- menu.setVisible (true);
- }
- });
- item.setImage (image);
- shell.setBounds(50, 50, 300, 200);
- shell.open ();
- while (!shell.isDisposed ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- image.dispose ();
- display.dispose ();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet144.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet144.java
deleted file mode 100644
index 4970babf4c..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet144.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * Virtual Table example snippet: create a table with 1,000,000 items
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.layout.*;
-
-public class Snippet144 {
-
-static final int COUNT = 1000000;
-
-public static void main(String[] args) {
- Display display = new Display ();
- final Shell shell = new Shell (display);
- shell.setLayout (new RowLayout (SWT.VERTICAL));
- final Table table = new Table (shell, SWT.VIRTUAL | SWT.BORDER);
- table.addListener (SWT.SetData, new Listener () {
- public void handleEvent (Event event) {
- TableItem item = (TableItem) event.item;
- int index = table.indexOf (item);
- item.setText ("Item " + index);
- System.out.println (item.getText ());
- }
- });
- table.setLayoutData (new RowData (200, 200));
- Button button = new Button (shell, SWT.PUSH);
- button.setText ("Add Items");
- final Label label = new Label(shell, SWT.NONE);
- button.addListener (SWT.Selection, new Listener () {
- public void handleEvent (Event event) {
- long t1 = System.currentTimeMillis ();
- table.setItemCount (COUNT);
- long t2 = System.currentTimeMillis ();
- label.setText ("Items: " + COUNT + ", Time: " + (t2 - t1) + " (ms)");
- shell.layout ();
- }
- });
- shell.pack ();
- shell.open ();
- while (!shell.isDisposed ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose ();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet145.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet145.java
deleted file mode 100644
index eee2f9770a..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet145.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * TextLayout example snippet: draw internationalized styled text on a shell
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.graphics.*;
-
-public class Snippet145 {
-
- public static void main(String[] args) {
- Display display = new Display();
- Shell shell = new Shell (display);
-
- Font font1 = new Font(display, "Tahoma", 14, SWT.BOLD);
- Font font2 = new Font(display, "MS Mincho", 20, SWT.ITALIC);
- Font font3 = new Font(display, "Arabic Transparent", 18, SWT.NORMAL);
-
- Color blue = display.getSystemColor(SWT.COLOR_BLUE);
- Color green = display.getSystemColor(SWT.COLOR_GREEN);
- Color yellow = display.getSystemColor(SWT.COLOR_YELLOW);
- Color gray = display.getSystemColor(SWT.COLOR_GRAY);
-
- final TextLayout layout = new TextLayout(display);
- TextStyle style1 = new TextStyle(font1, yellow, blue);
- TextStyle style2 = new TextStyle(font2, green, null);
- TextStyle style3 = new TextStyle(font3, blue, gray);
-
- layout.setText("English \u65E5\u672C\u8A9E \u0627\u0644\u0639\u0631\u0628\u064A\u0651\u0629");
- layout.setStyle(style1, 0, 6);
- layout.setStyle(style2, 8, 10);
- layout.setStyle(style3, 13, 21);
-
- shell.setBackground(display.getSystemColor(SWT.COLOR_WHITE));
- shell.addListener(SWT.Paint, new Listener() {
- public void handleEvent (Event event) {
- layout.draw(event.gc, 10, 10);
- }
- });
- shell.open();
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch()) display.sleep();
- }
- font1.dispose();
- font2.dispose();
- font3.dispose();
- layout.dispose();
- display.dispose();
- }
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet146.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet146.java
deleted file mode 100644
index f461762676..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet146.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * UI Automation (for testing tools) snippet: post key events
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet146 {
-
-public static void main(String[] args) {
- final Display display = new Display();
- final Shell shell = new Shell(display);
- final Text text = new Text(shell, SWT.BORDER);
- text.setSize(text.computeSize(150, SWT.DEFAULT));
- shell.pack();
- shell.open();
- new Thread(){
- public void run(){
- String string = "Love the method.";
- for (int i = 0; i < string.length(); i++) {
- char ch = string.charAt(i);
- boolean shift = Character.isUpperCase(ch);
- ch = Character.toLowerCase(ch);
- if (shift) {
- Event event = new Event();
- event.type = SWT.KeyDown;
- event.keyCode = SWT.SHIFT;
- display.post(event);
- }
- Event event = new Event();
- event.type = SWT.KeyDown;
- event.character = ch;
- display.post(event);
- try {
- Thread.sleep(10);
- } catch (InterruptedException e) {}
- event.type = SWT.KeyUp;
- display.post(event);
- try {
- Thread.sleep(100);
- } catch (InterruptedException e) {}
- if (shift) {
- event = new Event();
- event.type = SWT.KeyUp;
- event.keyCode = SWT.SHIFT;
- display.post(event);
- }
- }
- }
- }.start();
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch()) display.sleep();
- }
- display.dispose();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet147.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet147.java
deleted file mode 100644
index 57857b0520..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet147.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * Text example snippet: stop CR from going to the default button
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet147 {
-public static void main(String[] args) {
- Display display = new Display();
- Shell shell = new Shell(display);
- shell.setLayout(new GridLayout());
- Combo combo = new Combo(shell, SWT.NONE);
- combo.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- combo.setText("Here is some text");
- combo.addSelectionListener(new SelectionAdapter() {
- public void widgetDefaultSelected(SelectionEvent e) {
- System.out.println("Combo default selected (overrides default button)");
- }
- });
- combo.addTraverseListener(new TraverseListener() {
- public void keyTraversed(TraverseEvent e) {
- if (e.detail == SWT.TRAVERSE_RETURN) {
- e.doit = false;
- e.detail = SWT.TRAVERSE_NONE;
- }
- }
- });
- Button button = new Button(shell, SWT.PUSH);
- button.setText("Ok");
- button.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- System.out.println("Button selected");
- }
- });
- shell.setDefaultButton(button);
- shell.pack();
- shell.open();
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch())
- display.sleep();
- }
- display.dispose();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet148.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet148.java
deleted file mode 100644
index 0de0f3388c..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet148.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * Text example snippet: check if the browser is available or not
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.browser.*;
-
-public class Snippet148 {
-
- public static void main(String[] args) {
- final Display display = new Display();
- Shell shell = new Shell(display);
- shell.setLayout(new FillLayout());
- Browser browser = null;
- try {
- browser = new Browser(shell, SWT.NONE);
- } catch (SWTError e) {
- /* The Browser widget throws an SWTError if it fails to
- * instantiate properly. Application code should catch
- * this SWTError and disable any feature requiring the
- * Browser widget.
- * Platform requirements for the SWT Browser widget are available
- * from the SWT FAQ website.
- */
- }
- if (browser != null) {
- /* The Browser widget can be used */
- browser.setUrl("http://www.eclipse.org");
- }
- shell.open();
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch())
- display.sleep();
- }
- display.dispose();
- }
-}
-
-
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet149.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet149.java
deleted file mode 100644
index a79726b944..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet149.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * TableEditor example snippet: place a progress bar in a table
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.custom.*;
-
-public class Snippet149 {
- public static void main(String[] args) {
- Display display = new Display();
- Shell shell = new Shell(display);
- shell.setLayout (new FillLayout ());
- Table table = new Table (shell, SWT.BORDER);
- table.setHeaderVisible (true);
- for (int i=0; i<2; i++) {
- TableColumn column = new TableColumn (table, SWT.NONE);
- }
- table.getColumn (0).setText ("Task");
- table.getColumn (1).setText ("Progress");
- for (int i=0; i<4; i++) {
- TableItem item = new TableItem (table, SWT.NONE);
- item.setText ("Task " + i);
- ProgressBar bar = new ProgressBar (table, SWT.NONE);
- bar.setSelection (i * 25);
- TableEditor editor = new TableEditor (table);
- editor.grabHorizontal = editor.grabVertical = true;
- editor.setEditor (bar, item, 1);
- }
- table.getColumn (0).pack ();
- table.getColumn (1).setWidth (128);
- shell.pack ();
- shell.open();
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch()) {
- display.sleep();
- }
- }
- }
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet15.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet15.java
deleted file mode 100644
index 5328052fc7..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet15.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * Tree example snippet: create a tree
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet15 {
-
-public static void main (String [] args) {
- Display display = new Display ();
- Shell shell = new Shell (display);
- final Tree tree = new Tree (shell, SWT.BORDER);
- tree.setSize (100, 100);
- shell.setSize (200, 200);
- for (int i=0; i<4; i++) {
- TreeItem iItem = new TreeItem (tree, 0);
- iItem.setText ("TreeItem (0) -" + i);
- for (int j=0; j<4; j++) {
- TreeItem jItem = new TreeItem (iItem, 0);
- jItem.setText ("TreeItem (1) -" + j);
- for (int k=0; k<4; k++) {
- TreeItem kItem = new TreeItem (jItem, 0);
- kItem.setText ("TreeItem (2) -" + k);
- for (int l=0; l<4; l++) {
- TreeItem lItem = new TreeItem (kItem, 0);
- lItem.setText ("TreeItem (3) -" + l);
- }
- }
- }
- }
- shell.open ();
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose ();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet150.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet150.java
deleted file mode 100644
index 54fb72092b..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet150.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * CoolBar example snippet: create a coolbar (relayout when resized)
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.layout.*;
-
-public class Snippet150 {
-
-static int itemCount;
-static CoolItem createItem(CoolBar coolBar, int count) {
- ToolBar toolBar = new ToolBar(coolBar, SWT.FLAT);
- for (int i = 0; i < count; i++) {
- ToolItem item = new ToolItem(toolBar, SWT.PUSH);
- item.setText(itemCount++ +"");
- }
- toolBar.pack();
- Point size = toolBar.getSize();
- CoolItem item = new CoolItem(coolBar, SWT.NONE);
- item.setControl(toolBar);
- Point preferred = item.computeSize(size.x, size.y);
- item.setPreferredSize(preferred);
- return item;
-}
-
-public static void main(String[] args) {
- Display display = new Display();
- final Shell shell = new Shell(display);
- CoolBar coolBar = new CoolBar(shell, SWT.NONE);
- createItem(coolBar, 3);
- createItem(coolBar, 2);
- createItem(coolBar, 3);
- createItem(coolBar, 4);
- int style = SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL;
- Text text = new Text(shell, style);
- FormLayout layout = new FormLayout();
- shell.setLayout(layout);
- FormData coolData = new FormData();
- coolData.left = new FormAttachment(0);
- coolData.right = new FormAttachment(100);
- coolData.top = new FormAttachment(0);
- coolBar.setLayoutData(coolData);
- coolBar.addListener(SWT.Resize, new Listener() {
- public void handleEvent(Event event) {
- shell.layout();
- }
- });
- FormData textData = new FormData();
- textData.left = new FormAttachment(0);
- textData.right = new FormAttachment(100);
- textData.top = new FormAttachment(coolBar);
- textData.bottom = new FormAttachment(100);
- text.setLayoutData(textData);
- shell.open();
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch()) display.sleep();
- }
- display.dispose();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet151.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet151.java
deleted file mode 100644
index 41017c7568..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet151.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * Create a virtual table and add 1000 entries to it every 500 ms.
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import java.util.*;
-import org.eclipse.swt.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet151 {
-
-static int[] values = new int[0];
-static Thread thread;
-
-public static void main (String [] args) {
- final Display display = new Display ();
- Shell shell = new Shell (display);
- shell.setLayout(new FillLayout());
- final Table table = new Table(shell, SWT.BORDER | SWT.VIRTUAL);
- table.addListener(SWT.SetData, new Listener() {
- public void handleEvent(Event e) {
- TableItem item = (TableItem)e.item;
- int index = table.indexOf(item);
- item.setText("item "+values[index]);
- }
- });
- final Random random = new Random();
- thread = new Thread() {
- public void run() {
- int count = 0;
- while (count++ < 2000) {
- if (table.isDisposed()) return;
- // add 1000 random numbers to a sorted array
- for (int j = 0; j < 1000; j++) {
- int next = random.nextInt();
- int[] newItems = new int[values.length + 1];
- int index = 0;
- for (int i = 0; i < values.length; i++) {
- if (values[i] > next) break;
- index++;
- }
- System.arraycopy(values, 0, newItems, 0, index);
- newItems[index] = next;
- System.arraycopy(values, index, newItems, index+1, values.length-index);
- values = newItems;
- }
- display.syncExec(new Runnable() {
- public void run() {
- if (table.isDisposed()) return;
- table.setItemCount(values.length);
- table.clearAll();
- // bug 69398 on Windows
- table.redraw();
- }
- });
- try {Thread.sleep(500);} catch (Throwable t) {}
- }
- }
- };
- thread.start();
- shell.open ();
- while (!shell.isDisposed ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose ();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet152.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet152.java
deleted file mode 100644
index 92ef6cc11c..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet152.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * Control example snippet: update a status line when an item is armed
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.layout.*;
-
-public class Snippet152 {
-
-public static void main(String[] args) {
- Display display = new Display();
- Shell shell = new Shell(display);
- FormLayout layout = new FormLayout();
- shell.setLayout(layout);
- final Label label = new Label(shell, SWT.BORDER);
- Listener armListener = new Listener() {
- public void handleEvent(Event event) {
- MenuItem item = (MenuItem) event.widget;
- label.setText(item.getText());
- label.update();
- }
- };
- Listener showListener = new Listener() {
- public void handleEvent(Event event) {
- Menu menu = (Menu) event.widget;
- MenuItem item = menu.getParentItem();
- if (item != null) {
- label.setText(item.getText());
- label.update();
- }
- }
- };
- Listener hideListener = new Listener() {
- public void handleEvent(Event event) {
- label.setText("");
- label.update();
- }
- };
- FormData labelData = new FormData();
- labelData.left = new FormAttachment(0);
- labelData.right = new FormAttachment(100);
- labelData.bottom = new FormAttachment(100);
- label.setLayoutData(labelData);
- Menu menuBar = new Menu(shell, SWT.BAR);
- shell.setMenuBar(menuBar);
- MenuItem fileItem = new MenuItem(menuBar, SWT.CASCADE);
- fileItem.setText("File");
- fileItem.addListener(SWT.Arm, armListener);
- MenuItem editItem = new MenuItem(menuBar, SWT.CASCADE);
- editItem.setText("Edit");
- editItem.addListener(SWT.Arm, armListener);
- Menu fileMenu = new Menu(shell, SWT.DROP_DOWN);
- fileMenu.addListener(SWT.Hide, hideListener);
- fileMenu.addListener(SWT.Show, showListener);
- fileItem.setMenu(fileMenu);
- String[] fileStrings = { "New", "Close", "Exit" };
- for (int i = 0; i < fileStrings.length; i++) {
- MenuItem item = new MenuItem(fileMenu, SWT.PUSH);
- item.setText(fileStrings[i]);
- item.addListener(SWT.Arm, armListener);
- }
- Menu editMenu = new Menu(shell, SWT.DROP_DOWN);
- editMenu.addListener(SWT.Hide, hideListener);
- editMenu.addListener(SWT.Show, showListener);
- String[] editStrings = { "Cut", "Copy", "Paste" };
- editItem.setMenu(editMenu);
- for (int i = 0; i < editStrings.length; i++) {
- MenuItem item = new MenuItem(editMenu, SWT.PUSH);
- item.setText(editStrings[i]);
- item.addListener(SWT.Arm, armListener);
- }
- shell.open();
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch()) display.sleep();
- }
- display.dispose();
-}
-
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet153.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet153.java
deleted file mode 100644
index 39818d0915..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet153.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * ToolBar example snippet: update a status line when the pointer enters a ToolItem
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet153 {
-
-static String statusText = "";
-public static void main(String[] args) {
- final Display display = new Display();
- Shell shell = new Shell(display);
- shell.setBounds(10, 10, 200, 200);
- final ToolBar bar = new ToolBar(shell, SWT.BORDER);
- bar.setBounds(10, 10, 150, 50);
- final Label statusLine = new Label(shell, SWT.BORDER);
- statusLine.setBounds(10, 90, 150, 30);
- new ToolItem(bar, SWT.NONE).setText("item 1");
- new ToolItem(bar, SWT.NONE).setText("item 2");
- new ToolItem(bar, SWT.NONE).setText("item 3");
- bar.addMouseMoveListener(new MouseMoveListener() {
- public void mouseMove(MouseEvent e) {
- ToolItem item = bar.getItem(new Point(e.x, e.y));
- String name = "";
- if (item != null) {
- name = item.getText();
- }
- if (!statusText.equals(name)) {
- statusLine.setText(name);
- statusText = name;
- }
- }
- });
- shell.open();
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch()) display.sleep();
- }
- display.dispose();
-}
-
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet154.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet154.java
deleted file mode 100644
index 2f9cb186c8..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet154.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * example snippet: embed a JTable in SWT (no flicker)
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import java.awt.BorderLayout;
-import java.awt.Frame;
-import java.awt.Panel;
-import javax.swing.*;
-import java.util.Vector;
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.awt.SWT_AWT;
-
-public class Snippet154 {
-
- public static void main(String[] args) {
- final Display display = new Display();
- final Shell shell = new Shell(display);
- shell.setLayout(new FillLayout());
-
- Composite composite = new Composite(shell, SWT.NO_BACKGROUND | SWT.EMBEDDED);
-
- /* Create and setting up frame */
- Frame frame = SWT_AWT.new_Frame(composite);
- Panel panel = new Panel(new BorderLayout());
- frame.add(panel);
- JPanel root = new JPanel();
- root.setLayout(new BorderLayout());
- panel.add(root);
-
- /* Creating components */
- int nrows = 1000, ncolumns = 10;
- Vector rows = new Vector();
- for (int i = 0; i < nrows; i++) {
- Vector row = new Vector();
- for (int j = 0; j < ncolumns; j++) {
- row.addElement("Item " + i + "-" + j);
- }
- rows.addElement(row);
- }
- Vector columns = new Vector();
- for (int i = 0; i < ncolumns; i++) {
- columns.addElement("Column " + i);
- }
- JTable table = new JTable(rows, columns);
- table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
- table.createDefaultColumnsFromModel();
- JScrollPane scrollPane = new JScrollPane(table);
- root.add(scrollPane);
-
- shell.open();
- while(!shell.isDisposed()) {
- if (!display.readAndDispatch()) display.sleep();
- }
- display.dispose();
- }
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet155.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet155.java
deleted file mode 100644
index 09f7aebbf0..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet155.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * example snippet: draw an X using AWT Graphics
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import java.awt.Frame;
-import java.awt.Canvas;
-import java.awt.Graphics;
-import java.awt.Dimension;
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.awt.SWT_AWT;
-
-public class Snippet155 {
-
- public static void main(String[] args) {
- final Display display = new Display();
- final Shell shell = new Shell(display);
- shell.setLayout(new FillLayout());
- Composite composite = new Composite(shell, SWT.EMBEDDED);
-
- /* Draw an X using AWT */
- Frame frame = SWT_AWT.new_Frame(composite);
- Canvas canvas = new Canvas() {
- public void paint (Graphics g) {
- Dimension d = getSize();
- g.drawLine(0, 0, d.width, d.height);
- g.drawLine(d.width, 0, 0, d.height);
- }
- };
- frame.add(canvas);
-
- shell.open();
- while(!shell.isDisposed()) {
- if (!display.readAndDispatch()) display.sleep();
- }
- display.dispose();
- }
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet156.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet156.java
deleted file mode 100644
index 8698e33e20..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet156.java
+++ /dev/null
@@ -1,197 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * example snippet: convert between SWT Image and AWT BufferedImage
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import java.awt.Frame;
-import java.awt.Graphics;
-import java.awt.Insets;
-import java.awt.image.BufferedImage;
-import java.awt.image.ColorModel;
-import java.awt.image.DirectColorModel;
-import java.awt.image.IndexColorModel;
-import java.awt.image.WritableRaster;
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.graphics.*;
-
-public class Snippet156 {
-
-static BufferedImage convertToAWT(ImageData data) {
- ColorModel colorModel = null;
- PaletteData palette = data.palette;
- if (palette.isDirect) {
- colorModel = new DirectColorModel(data.depth, palette.redMask, palette.greenMask, palette.blueMask);
- BufferedImage bufferedImage = new BufferedImage(colorModel, colorModel.createCompatibleWritableRaster(data.width, data.height), false, null);
- WritableRaster raster = bufferedImage.getRaster();
- int[] pixelArray = new int[3];
- for (int y = 0; y < data.height; y++) {
- for (int x = 0; x < data.width; x++) {
- int pixel = data.getPixel(x, y);
- RGB rgb = palette.getRGB(pixel);
- pixelArray[0] = rgb.red;
- pixelArray[1] = rgb.green;
- pixelArray[2] = rgb.blue;
- raster.setPixels(x, y, 1, 1, pixelArray);
- }
- }
- return bufferedImage;
- } else {
- RGB[] rgbs = palette.getRGBs();
- byte[] red = new byte[rgbs.length];
- byte[] green = new byte[rgbs.length];
- byte[] blue = new byte[rgbs.length];
- for (int i = 0; i < rgbs.length; i++) {
- RGB rgb = rgbs[i];
- red[i] = (byte)rgb.red;
- green[i] = (byte)rgb.green;
- blue[i] = (byte)rgb.blue;
- }
- if (data.transparentPixel != -1) {
- colorModel = new IndexColorModel(data.depth, rgbs.length, red, green, blue, data.transparentPixel);
- } else {
- colorModel = new IndexColorModel(data.depth, rgbs.length, red, green, blue);
- }
- BufferedImage bufferedImage = new BufferedImage(colorModel, colorModel.createCompatibleWritableRaster(data.width, data.height), false, null);
- WritableRaster raster = bufferedImage.getRaster();
- int[] pixelArray = new int[1];
- for (int y = 0; y < data.height; y++) {
- for (int x = 0; x < data.width; x++) {
- int pixel = data.getPixel(x, y);
- pixelArray[0] = pixel;
- raster.setPixel(x, y, pixelArray);
- }
- }
- return bufferedImage;
- }
-}
-
-static ImageData convertToSWT(BufferedImage bufferedImage) {
- if (bufferedImage.getColorModel() instanceof DirectColorModel) {
- DirectColorModel colorModel = (DirectColorModel)bufferedImage.getColorModel();
- PaletteData palette = new PaletteData(colorModel.getRedMask(), colorModel.getGreenMask(), colorModel.getBlueMask());
- ImageData data = new ImageData(bufferedImage.getWidth(), bufferedImage.getHeight(), colorModel.getPixelSize(), palette);
- WritableRaster raster = bufferedImage.getRaster();
- int[] pixelArray = new int[3];
- for (int y = 0; y < data.height; y++) {
- for (int x = 0; x < data.width; x++) {
- raster.getPixel(x, y, pixelArray);
- int pixel = palette.getPixel(new RGB(pixelArray[0], pixelArray[1], pixelArray[2]));
- data.setPixel(x, y, pixel);
- }
- }
- return data;
- } else if (bufferedImage.getColorModel() instanceof IndexColorModel) {
- IndexColorModel colorModel = (IndexColorModel)bufferedImage.getColorModel();
- int size = colorModel.getMapSize();
- byte[] reds = new byte[size];
- byte[] greens = new byte[size];
- byte[] blues = new byte[size];
- colorModel.getReds(reds);
- colorModel.getGreens(greens);
- colorModel.getBlues(blues);
- RGB[] rgbs = new RGB[size];
- for (int i = 0; i < rgbs.length; i++) {
- rgbs[i] = new RGB(reds[i] & 0xFF, greens[i] & 0xFF, blues[i] & 0xFF);
- }
- PaletteData palette = new PaletteData(rgbs);
- ImageData data = new ImageData(bufferedImage.getWidth(), bufferedImage.getHeight(), colorModel.getPixelSize(), palette);
- data.transparentPixel = colorModel.getTransparentPixel();
- WritableRaster raster = bufferedImage.getRaster();
- int[] pixelArray = new int[1];
- for (int y = 0; y < data.height; y++) {
- for (int x = 0; x < data.width; x++) {
- raster.getPixel(x, y, pixelArray);
- data.setPixel(x, y, pixelArray[0]);
- }
- }
- return data;
- }
- return null;
-}
-
-static ImageData createSampleImage(Display display) {
- Image image = new Image(display, 100, 100);
- Rectangle bounds = image.getBounds();
- GC gc = new GC(image);
- gc.setBackground(display.getSystemColor(SWT.COLOR_BLUE));
- gc.fillRectangle(bounds);
- gc.setBackground(display.getSystemColor(SWT.COLOR_GREEN));
- gc.fillOval(0, 0, bounds.width, bounds.height);
- gc.setForeground(display.getSystemColor(SWT.COLOR_RED));
- gc.drawLine(0, 0, bounds.width, bounds.height);
- gc.drawLine(bounds.width, 0, 0, bounds.height);
- gc.dispose();
- ImageData data = image.getImageData();
- image.dispose();
- return data;
-}
-
-public static void main(String[] args) {
- Display display = new Display();
- Shell shell = new Shell(display);
- shell.setText("SWT Image");
- ImageData data;
- if (args.length > 0) {
- String fileName = args[0];
- data = new ImageData(fileName);
- } else {
- data = createSampleImage(display);
- }
- final Image swtImage = new Image(display, data);
- final BufferedImage awtImage = convertToAWT(data);
- final Image swtImage2 = new Image(display, convertToSWT(awtImage));
- shell.addListener(SWT.Paint, new Listener() {
- public void handleEvent(Event e) {
- int y = 10;
- if (swtImage != null) {
- e.gc.drawImage(swtImage, 10, y);
- y += swtImage.getBounds().height + 10;
- }
- if (swtImage2 != null) {
- e.gc.drawImage(swtImage2, 10, y);
- }
- }
- });
- Frame frame = new Frame() {
- public void paint(Graphics g) {
- Insets insets = getInsets();
- if (awtImage != null) {
- g.drawImage(awtImage, 10 + insets.left, 10 + insets.top, null);
- }
- }
- };
- frame.setTitle("AWT Image");
- shell.setLocation(50, 50);
- Rectangle bounds = swtImage.getBounds();
- shell.setSize(bounds.width + 50, bounds.height * 2 + 100);
- Point size = shell.getSize();
- Point location = shell.getLocation();
- Insets insets = frame.getInsets();
- frame.setLocation(location.x + size.x + 10, location.y);
- frame.setSize(size.x - (insets.left + insets.right), size.y - (insets.top + insets.bottom));
- frame.setVisible(true);
- shell.open();
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch()) display.sleep();
- }
- if (swtImage != null) swtImage.dispose();
- if (swtImage2 != null) swtImage.dispose();
- frame.dispose();
- System.exit(0);
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet16.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet16.java
deleted file mode 100644
index aeaf9bf1f8..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet16.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * Display example snippet: create one repeating timer (every 500 ms)
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet16 {
-
-public static void main (String [] args) {
- final Display display = new Display ();
- final Shell shell = new Shell (display);
- final int time = 500;
- Runnable timer = new Runnable () {
- public void run () {
- Point point = display.getCursorLocation ();
- Rectangle rect = shell.getBounds ();
- if (rect.contains (point)) {
- System.out.println ("In");
- } else {
- System.out.println ("Out");
- }
- display.timerExec (time, this);
- }
- };
- display.timerExec (time, timer);
- shell.setSize (200, 200);
- shell.open ();
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose ();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet17.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet17.java
deleted file mode 100644
index 8d94ec5518..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet17.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * Slider example snippet: print scroll event details
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet17 {
-
-public static void main (String [] args) {
- Display display = new Display ();
- Shell shell = new Shell (display);
- Slider slider = new Slider (shell, SWT.HORIZONTAL);
- slider.setBounds (10, 10, 200, 32);
- slider.addListener (SWT.Selection, new Listener () {
- public void handleEvent (Event event) {
- String string = "SWT.NONE";
- switch (event.detail) {
- case SWT.DRAG: string = "SWT.DRAG"; break;
- case SWT.HOME: string = "SWT.HOME"; break;
- case SWT.END: string = "SWT.END"; break;
- case SWT.ARROW_DOWN: string = "SWT.ARROW_DOWN"; break;
- case SWT.ARROW_UP: string = "SWT.ARROW_UP"; break;
- case SWT.PAGE_DOWN: string = "SWT.PAGE_DOWN"; break;
- case SWT.PAGE_UP: string = "SWT.PAGE_UP"; break;
- }
- System.out.println ("Scroll detail -> " + string);
- }
- });
- shell.open ();
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose ();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet18.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet18.java
deleted file mode 100644
index f82cd1b106..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet18.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * ToolBar example snippet: create a tool bar (text)
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet18 {
-
-public static void main (String [] args) {
- Shell shell = new Shell ();
- ToolBar bar = new ToolBar (shell, SWT.BORDER);
- for (int i=0; i<8; i++) {
- ToolItem item = new ToolItem (bar, SWT.PUSH);
- item.setText ("Item " + i);
- }
- bar.pack ();
- shell.open ();
- Display display = shell.getDisplay ();
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose ();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet19.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet19.java
deleted file mode 100644
index 54c34e6a46..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet19.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * Text example snippet: verify input (only allow digits)
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet19 {
-
-public static void main (String [] args) {
- Display display = new Display ();
- Shell shell = new Shell (display);
- Text text = new Text (shell, SWT.BORDER | SWT.V_SCROLL);
- text.setBounds (10, 10, 200, 200);
- text.addListener (SWT.Verify, new Listener () {
- public void handleEvent (Event e) {
- String text = e.text;
- char [] chars = new char [text.length ()];
- text.getChars (0, chars.length, chars, 0);
- for (int i=0; i<chars.length; i++) {
- if (!('0' <= chars [i] && chars [i] <= '9')) {
- e.doit = false;
- return;
- }
- }
- }
- });
- shell.open ();
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose ();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet2.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet2.java
deleted file mode 100644
index 4bb8d964fe..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet2.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * Table example snippet: sort a table by column
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.layout.*;
-import java.text.*;
-import java.util.*;
-
-public class Snippet2 {
-
-public static void main (String [] args) {
- Display display = new Display ();
- Shell shell = new Shell (display);
- shell.setLayout(new FillLayout());
- final Table table = new Table(shell, SWT.BORDER);
- table.setHeaderVisible(true);
- TableColumn column1 = new TableColumn(table, SWT.NONE);
- column1.setText("Column 1");
- TableColumn column2 = new TableColumn(table, SWT.NONE);
- column2.setText("Column 2");
- TableItem item = new TableItem(table, SWT.NONE);
- item.setText(new String[] {"a", "3"});
- item = new TableItem(table, SWT.NONE);
- item.setText(new String[] {"b", "2"});
- item = new TableItem(table, SWT.NONE);
- item.setText(new String[] {"c", "1"});
- column1.pack();
- column2.pack();
- column1.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- // sort column 1
- TableItem[] items = table.getItems();
- Collator collator = Collator.getInstance(Locale.getDefault());
- for (int i = 1; i < items.length; i++) {
- String value1 = items[i].getText(0);
- for (int j = 0; j < i; j++){
- String value2 = items[j].getText(0);
- if (collator.compare(value1, value2) < 0) {
- String[] values = {items[i].getText(0), items[i].getText(1)};
- items[i].dispose();
- TableItem item = new TableItem(table, SWT.NONE, j);
- item.setText(values);
- break;
- }
- }
- }
- }
- });
- column2.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- // sort column 2
- TableItem[] items = table.getItems();
- Collator collator = Collator.getInstance(Locale.getDefault());
- for (int i = 1; i < items.length; i++) {
- String value1 = items[i].getText(1);
- for (int j = 0; j < i; j++){
- String value2 = items[j].getText(1);
- if (collator.compare(value1, value2) < 0) {
- String[] values = {items[i].getText(0), items[i].getText(1)};
- items[i].dispose();
- TableItem item = new TableItem(table, SWT.NONE, j);
- item.setText(values);
- break;
- }
- }
- }
- }
- });
- shell.open ();
- while (!shell.isDisposed ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose ();
-}
-
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet20.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet20.java
deleted file mode 100644
index 17655ec941..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet20.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * CoolBar example snippet: create a cool bar
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet20 {
-
-public static void main (String [] args) {
- Display display = new Display ();
- Shell shell = new Shell (display);
- CoolBar bar = new CoolBar (shell, SWT.BORDER);
- for (int i=0; i<2; i++) {
- CoolItem item = new CoolItem (bar, SWT.NONE);
- Button button = new Button (bar, SWT.PUSH);
- button.setText ("Button " + i);
- Point size = button.computeSize (SWT.DEFAULT, SWT.DEFAULT);
- item.setPreferredSize (item.computeSize (size.x, size.y));
- item.setControl (button);
- }
- bar.pack ();
- shell.open ();
- while (!shell.isDisposed ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose ();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet21.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet21.java
deleted file mode 100644
index af11694424..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet21.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * Canvas example snippet: implement tab traversal (behave like a tab group)
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet21 {
-
-public static void main (String [] args) {
- Display display = new Display ();
- final Color red = display.getSystemColor (SWT.COLOR_RED);
- final Color blue = display.getSystemColor (SWT.COLOR_BLUE);
- Shell shell = new Shell (display);
- Button b = new Button (shell, SWT.PUSH);
- b.setBounds (10, 10, 100, 32);
- b.setText ("Button");
- shell.setDefaultButton (b);
- final Canvas c = new Canvas (shell, SWT.BORDER);
- c.setBounds (10, 50, 100, 32);
- c.addListener (SWT.Traverse, new Listener () {
- public void handleEvent (Event e) {
- switch (e.detail) {
- /* Do tab group traversal */
- case SWT.TRAVERSE_ESCAPE:
- case SWT.TRAVERSE_RETURN:
- case SWT.TRAVERSE_TAB_NEXT:
- case SWT.TRAVERSE_TAB_PREVIOUS:
- case SWT.TRAVERSE_PAGE_NEXT:
- case SWT.TRAVERSE_PAGE_PREVIOUS:
- e.doit = true;
- break;
- }
- }
- });
- c.addListener (SWT.FocusIn, new Listener () {
- public void handleEvent (Event e) {
- c.setBackground (red);
- }
- });
- c.addListener (SWT.FocusOut, new Listener () {
- public void handleEvent (Event e) {
- c.setBackground (blue);
- }
- });
- c.addListener (SWT.KeyDown, new Listener () {
- public void handleEvent (Event e) {
- System.out.println ("KEY");
- for (int i=0; i<64; i++) {
- Color c1 = red, c2 = blue;
- if (c.isFocusControl ()) {
- c1 = blue; c2 = red;
- }
- c.setBackground (c1);
- c.update ();
- c.setBackground (c2);
- }
- }
- });
- Text t = new Text (shell, SWT.SINGLE | SWT.BORDER);
- t.setBounds (10, 85, 100, 32);
-
- Text r = new Text (shell, SWT.MULTI | SWT.BORDER);
- r.setBounds (10, 120, 100, 32);
-
- c.setFocus ();
- shell.setSize (200, 200);
- shell.open ();
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose ();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet22.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet22.java
deleted file mode 100644
index 04bf92f0cd..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet22.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * Text example snippet: select all the text in the control
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.widgets.*;
-
-public class Snippet22 {
-
-public static void main (String [] args) {
- Display display = new Display ();
- Shell shell = new Shell (display);
- Text text = new Text (shell, 0);
- text.setText ("ASDF");
- text.setSize (64, 32);
- text.selectAll ();
- shell.pack ();
- shell.open ();
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose ();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet23.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet23.java
deleted file mode 100644
index 795a339a5d..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet23.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * Tracker example snippet: create a tracker (drag on mouse down)
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet23 {
-
-public static void main (String [] args) {
- Display display = new Display ();
- final Shell shell = new Shell (display);
- shell.open ();
- shell.addListener (SWT.MouseDown, new Listener () {
- public void handleEvent (Event e) {
- Tracker tracker = new Tracker (shell, 0);
- tracker.setRectangles (new Rectangle [] {
- new Rectangle (e.x, e.y, 100, 100),
- });
- tracker.open ();
- }
- });
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose ();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet24.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet24.java
deleted file mode 100644
index 1cdba3d925..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet24.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * example snippet: detect CR in a text control (default selelection)
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.layout.*;
-
-public class Snippet24 {
-
-public static void main (String [] args) {
- Display display = new Display ();
- Shell shell = new Shell (display);
- shell.setLayout (new RowLayout ());
- Combo combo = new Combo (shell, SWT.NULL);
- combo.setItems (new String [] {"A-1", "B-1", "C-1"});
- Text text = new Text (shell, SWT.SINGLE | SWT.BORDER);
- text.setText ("some text");
- combo.addListener (SWT.DefaultSelection, new Listener () {
- public void handleEvent (Event e) {
- System.out.println (e.widget + " - Default Selection");
- }
- });
- text.addListener (SWT.DefaultSelection, new Listener () {
- public void handleEvent (Event e) {
- System.out.println (e.widget + " - Default Selection");
- }
- });
- shell.pack ();
- shell.open ();
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose ();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet25.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet25.java
deleted file mode 100644
index f1dfc297bb..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet25.java
+++ /dev/null
@@ -1,143 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * Control example snippet: print key state, code and character
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet25 {
-
-static String stateMask (int stateMask) {
- String string = "";
- if ((stateMask & SWT.CTRL) != 0) string += " CTRL";
- if ((stateMask & SWT.ALT) != 0) string += " ALT";
- if ((stateMask & SWT.SHIFT) != 0) string += " SHIFT";
- if ((stateMask & SWT.COMMAND) != 0) string += " COMMAND";
- return string;
-}
-
-static String character (char character) {
- switch (character) {
- case 0: return "'\\0'";
- case SWT.BS: return "'\\b'";
- case SWT.CR: return "'\\r'";
- case SWT.DEL: return "DEL";
- case SWT.ESC: return "ESC";
- case SWT.LF: return "'\\n'";
- case SWT.TAB: return "'\\t'";
- }
- return "'" + character +"'";
-}
-
-static String keyCode (int keyCode) {
- switch (keyCode) {
-
- /* Keyboard and Mouse Masks */
- case SWT.ALT: return "ALT";
- case SWT.SHIFT: return "SHIFT";
- case SWT.CONTROL: return "CONTROL";
- case SWT.COMMAND: return "COMMAND";
-
- /* Non-Numeric Keypad Keys */
- case SWT.ARROW_UP: return "ARROW_UP";
- case SWT.ARROW_DOWN: return "ARROW_DOWN";
- case SWT.ARROW_LEFT: return "ARROW_LEFT";
- case SWT.ARROW_RIGHT: return "ARROW_RIGHT";
- case SWT.PAGE_UP: return "PAGE_UP";
- case SWT.PAGE_DOWN: return "PAGE_DOWN";
- case SWT.HOME: return "HOME";
- case SWT.END: return "END";
- case SWT.INSERT: return "INSERT";
-
- /* Virtual and Ascii Keys */
- case SWT.BS: return "BS";
- case SWT.CR: return "CR";
- case SWT.DEL: return "DEL";
- case SWT.ESC: return "ESC";
- case SWT.LF: return "LF";
- case SWT.TAB: return "TAB";
-
- /* Functions Keys */
- case SWT.F1: return "F1";
- case SWT.F2: return "F2";
- case SWT.F3: return "F3";
- case SWT.F4: return "F4";
- case SWT.F5: return "F5";
- case SWT.F6: return "F6";
- case SWT.F7: return "F7";
- case SWT.F8: return "F8";
- case SWT.F9: return "F9";
- case SWT.F10: return "F10";
- case SWT.F11: return "F11";
- case SWT.F12: return "F12";
- case SWT.F13: return "F13";
- case SWT.F14: return "F14";
- case SWT.F15: return "F15";
-
- /* Numeric Keypad Keys */
- case SWT.KEYPAD_ADD: return "KEYPAD_ADD";
- case SWT.KEYPAD_SUBTRACT: return "KEYPAD_SUBTRACT";
- case SWT.KEYPAD_MULTIPLY: return "KEYPAD_MULTIPLY";
- case SWT.KEYPAD_DIVIDE: return "KEYPAD_DIVIDE";
- case SWT.KEYPAD_DECIMAL: return "KEYPAD_DECIMAL";
- case SWT.KEYPAD_CR: return "KEYPAD_CR";
- case SWT.KEYPAD_0: return "KEYPAD_0";
- case SWT.KEYPAD_1: return "KEYPAD_1";
- case SWT.KEYPAD_2: return "KEYPAD_2";
- case SWT.KEYPAD_3: return "KEYPAD_3";
- case SWT.KEYPAD_4: return "KEYPAD_4";
- case SWT.KEYPAD_5: return "KEYPAD_5";
- case SWT.KEYPAD_6: return "KEYPAD_6";
- case SWT.KEYPAD_7: return "KEYPAD_7";
- case SWT.KEYPAD_8: return "KEYPAD_8";
- case SWT.KEYPAD_9: return "KEYPAD_9";
- case SWT.KEYPAD_EQUAL: return "KEYPAD_EQUAL";
-
- /* Other keys */
- case SWT.CAPS_LOCK: return "CAPS_LOCK";
- case SWT.NUM_LOCK: return "NUM_LOCK";
- case SWT.SCROLL_LOCK: return "SCROLL_LOCK";
- case SWT.PAUSE: return "PAUSE";
- case SWT.BREAK: return "BREAK";
- case SWT.PRINT_SCREEN: return "PRINT_SCREEN";
- case SWT.HELP: return "HELP";
- }
- return character ((char) keyCode);
-}
-
-public static void main (String [] args) {
- Display display = new Display ();
- Shell shell = new Shell (display);
- Listener listener = new Listener () {
- public void handleEvent (Event e) {
- String string = e.type == SWT.KeyDown ? "DOWN:" : "UP :";
- string += " stateMask=0x" + Integer.toHexString (e.stateMask) + stateMask (e.stateMask) + ",";
- string += " keyCode=0x" + Integer.toHexString (e.keyCode) + " " + keyCode (e.keyCode) + ",";
- string += " character=0x" + Integer.toHexString (e.character) + " " + character (e.character);
- System.out.println (string);
- }
- };
- shell.addListener (SWT.KeyDown, listener);
- shell.addListener (SWT.KeyUp, listener);
- shell.setSize (200, 200);
- shell.open ();
- while (!shell.isDisposed ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose ();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet26.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet26.java
deleted file mode 100644
index fa74413580..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet26.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * Combo example snippet: create a combo box (non-editable)
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet26 {
-
-public static void main (String [] args) {
- Display display = new Display ();
- Shell shell = new Shell (display);
- Combo combo = new Combo (shell, SWT.READ_ONLY);
- combo.setItems (new String [] {"A", "B", "C"});
- combo.setSize (200, 200);
- shell.pack ();
- shell.open ();
- while (!shell.isDisposed ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose ();
-}
-
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet27.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet27.java
deleted file mode 100644
index f701a4fc2d..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet27.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * Shell example snippet: open a shell minimized (iconified)
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.widgets.*;
-
-public class Snippet27 {
-
-public static void main (String [] args) {
- Display display = new Display ();
- Shell shell = new Shell (display);
- shell.setMinimized (true);
- shell.open ();
- while (!shell.isDisposed ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose ();
-}
-
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet28.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet28.java
deleted file mode 100644
index b7c2767fc3..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet28.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * Shell example snippet: open a shell maximized (full screen)
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.widgets.*;
-
-public class Snippet28 {
-
-public static void main (String [] args) {
- Display display = new Display ();
- Shell shell = new Shell (display);
- shell.setMaximized (true);
- shell.open ();
- while (!shell.isDisposed ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose ();
-}
-
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet29.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet29.java
deleted file mode 100644
index e6d9bfd129..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet29.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * Menu example snippet: create a bar and pull down menu (accelerators, mnemonics)
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet29 {
-
-public static void main (String [] args) {
- Display display = new Display ();
- Shell shell = new Shell (display);
- Menu bar = new Menu (shell, SWT.BAR);
- shell.setMenuBar (bar);
- MenuItem fileItem = new MenuItem (bar, SWT.CASCADE);
- fileItem.setText ("File");
- Menu submenu = new Menu (shell, SWT.DROP_DOWN);
- fileItem.setMenu (submenu);
- MenuItem item = new MenuItem (submenu, SWT.PUSH);
- item.addListener (SWT.Selection, new Listener () {
- public void handleEvent (Event e) {
- System.out.println ("Select All");
- }
- });
- item.setText ("Select &All\tCtrl+A");
- item.setAccelerator (SWT.CTRL + 'A');
- shell.setSize (200, 200);
- shell.open ();
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose ();
-}
-
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet3.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet3.java
deleted file mode 100644
index de21522081..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet3.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * Table example snippet: find a table cell from mouse down (SWT.FULL_SELECTION)
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.graphics.*;
-
-public class Snippet3 {
-
-public static void main (String [] args) {
- Display display = new Display ();
- Shell shell = new Shell (display);
- final Table table = new Table (shell, SWT.BORDER | SWT.V_SCROLL | SWT.FULL_SELECTION);
- table.setHeaderVisible (true);
- table.setLinesVisible (true);
- final int rowCount = 64, columnCount = 4;
- for (int i=0; i < columnCount; i++) {
- TableColumn column = new TableColumn (table, SWT.NULL);
- column.setText ("Column " + i);
- }
- for (int i=0; i < rowCount; i++) {
- TableItem item = new TableItem (table, SWT.NULL);
- for (int j=0; j < columnCount; j++) {
- item.setText (j, "Item " + i + "-" + j);
- }
- }
- for (int i=0; i < columnCount; i++) {
- table.getColumn (i).pack ();
- }
- Point size = table.computeSize (SWT.DEFAULT, 200);
- table.setSize (size);
- shell.pack ();
- table.addListener (SWT.MouseDown, new Listener () {
- public void handleEvent (Event event) {
- Point pt = new Point (event.x, event.y);
- TableItem item = table.getItem (pt);
- if (item == null) return;
- for (int i=0; i < columnCount; i++) {
- Rectangle rect = item.getBounds (i);
- if (rect.contains (pt)) {
- int index = table.indexOf (item);
- System.out.println ("Item " + index + "-" + i);
- }
- }
- }
- });
- shell.open ();
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose ();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet30.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet30.java
deleted file mode 100644
index 47c72f4279..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet30.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * Program example snippet: invoke the system text editor on autoexec.bat
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.program.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet30 {
-
-public static void main (String [] args) {
- Display display = new Display ();
- Program p = Program.findProgram (".txt");
- if (p != null) p.execute ("c:\\autoexec.bat");
- display.dispose ();
-}
-
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet31.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet31.java
deleted file mode 100644
index 0f856921ac..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet31.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * Tracker example snippet: create a tracker (drag when "torn off")
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet31 {
-
-public static void main (String [] args) {
- final Display display = new Display ();
- final Shell shell = new Shell (display);
- shell.setSize (200, 200);
- shell.open ();
- Listener listener = new Listener () {
- Point point = null;
- static final int JITTER = 8;
- public void handleEvent (Event event) {
- switch (event.type) {
- case SWT.MouseDown:
- point = new Point (event.x, event.y);
- break;
- case SWT.MouseMove:
- if (point == null) return;
- int deltaX = point.x - event.x, deltaY = point.y - event.y;
- if (Math.abs (deltaX) < JITTER && Math.abs (deltaY) < JITTER) {
- return;
- }
- Tracker tracker = new Tracker (display, SWT.NONE);
- Rectangle rect = display.map (shell, null, shell.getClientArea ());
- rect.x -= deltaX;
- rect.y -= deltaY;
- tracker.setRectangles (new Rectangle [] {rect});
- tracker.open ();
- //FALL THROUGH
- case SWT.MouseUp:
- point = null;
- break;
- }
- }
- };
- shell.addListener (SWT.MouseDown, listener);
- shell.addListener (SWT.MouseMove, listener);
- shell.addListener (SWT.MouseUp, listener);
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose ();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet32.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet32.java
deleted file mode 100644
index 8eb0cf3f41..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet32.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * Program example snippet: find the icon of the program that edits .bmp files
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.program.*;
-
-public class Snippet32 {
-
-public static void main (String [] args) {
- Display display = new Display ();
- Shell shell = new Shell (display);
- Label label = new Label (shell, SWT.NONE);
- label.setText ("Can't find icon for .bmp");
- Image image = null;
- Program p = Program.findProgram (".bmp");
- if (p != null) {
- ImageData data = p.getImageData ();
- if (data != null) {
- image = new Image (display, data);
- label.setImage (image);
- }
- }
- label.pack ();
- shell.pack ();
- shell.open ();
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- if (image != null) image.dispose ();
- display.dispose ();
-}
-
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet33.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet33.java
deleted file mode 100644
index d47b098174..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet33.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * DirectoryDialog example snippet: prompt for a directory
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.widgets.*;
-
-public class Snippet33 {
-
-public static void main (String [] args) {
- Display display = new Display ();
- Shell shell = new Shell (display);
- shell.open ();
- DirectoryDialog dialog = new DirectoryDialog (shell);
- dialog.setFilterPath ("c:\\"); //Windows specific
- System.out.println ("RESULT=" + dialog.open ());
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose ();
-}
-
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet34.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet34.java
deleted file mode 100644
index 67a60896d4..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet34.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * Label example snippet: create a label (with an image)
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet34 {
-
-public static void main (String[] args) {
- Display display = new Display();
- Image image = new Image (display, 16, 16);
- Color color = display.getSystemColor (SWT.COLOR_RED);
- GC gc = new GC (image);
- gc.setBackground (color);
- gc.fillRectangle (image.getBounds ());
- gc.dispose ();
- Shell shell = new Shell (display);
- Label label = new Label (shell, SWT.BORDER);
- label.setImage (image);
- label.pack ();
- shell.pack ();
- shell.open ();
- while (!shell.isDisposed ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- image.dispose ();
- display.dispose ();
-}
-
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet35.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet35.java
deleted file mode 100644
index eba3ed9505..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet35.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * Table example snippet: create a table (no columns, no headers)
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet35 {
-
-public static void main (String [] args) {
- Display display = new Display ();
- Shell shell = new Shell (display);
- Table table = new Table (shell, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);
- for (int i=0; i<12; i++) {
- TableItem item = new TableItem (table, 0);
- item.setText ("Item " + i);
- }
- table.setSize (100, 100);
- shell.setSize (200, 200);
- shell.open ();
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose ();
-}
-
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet36.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet36.java
deleted file mode 100644
index df6cc629ee..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet36.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * ToolBar example snippet: create a flat tool bar (images)
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet36 {
-
-public static void main (String [] args) {
- Display display = new Display();
- Image image = new Image (display, 16, 16);
- Color color = display.getSystemColor (SWT.COLOR_RED);
- GC gc = new GC (image);
- gc.setBackground (color);
- gc.fillRectangle (image.getBounds ());
- gc.dispose ();
- Shell shell = new Shell (display);
- ToolBar toolBar = new ToolBar (shell, SWT.FLAT | SWT.BORDER);
- for (int i=0; i<12; i++) {
- ToolItem item = new ToolItem (toolBar, SWT.DROP_DOWN);
- item.setImage (image);
- }
- toolBar.pack ();
- shell.open ();
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- image.dispose ();
- display.dispose ();
-}
-
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet37.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet37.java
deleted file mode 100644
index a680deb58f..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet37.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * Label example snippet: create a label (a separator)
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.layout.*;
-
-public class Snippet37 {
-
-public static void main (String [] args) {
- Display display = new Display ();
- Shell shell = new Shell (display);
- shell.setLayout (new FillLayout ());
- Label label1 = new Label (shell, SWT.SEPARATOR | SWT.HORIZONTAL);
- Label label2 = new Label (shell, SWT.SEPARATOR | SWT.VERTICAL);
- shell.setSize (200, 200);
- shell.open ();
- while (!shell.isDisposed ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose ();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet38.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet38.java
deleted file mode 100644
index 83eb2fc046..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet38.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * Table example snippet: create a table (columns, headers, lines)
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet38 {
-
-public static void main (String [] args) {
- Display display = new Display ();
- Shell shell = new Shell (display);
- Table table = new Table (shell, SWT.MULTI | SWT.BORDER | SWT.FULL_SELECTION);
- table.setLinesVisible (true);
- table.setHeaderVisible (true);
- String[] titles = {" ", "C", "!", "Description", "Resource", "In Folder", "Location"};
- for (int i=0; i<titles.length; i++) {
- TableColumn column = new TableColumn (table, SWT.NULL);
- column.setText (titles [i]);
- }
- int count = 128;
- for (int i=0; i<count; i++) {
- TableItem item = new TableItem (table, SWT.NULL);
- item.setText (0, "x");
- item.setText (1, "y");
- item.setText (2, "!");
- item.setText (3, "this stuff behaves the way I expect");
- item.setText (4, "almost everywhere");
- item.setText (5, "some.folder");
- item.setText (6, "line " + i + " in nowhere");
- }
- for (int i=0; i<titles.length; i++) {
- table.getColumn (i).pack ();
- }
- table.setSize (table.computeSize (SWT.DEFAULT, 200));
- shell.pack ();
- shell.open ();
- while (!shell.isDisposed ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose ();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet39.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet39.java
deleted file mode 100644
index c8475b28f4..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet39.java
+++ /dev/null
@@ -1,15 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-public class Snippet39 {
-
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet4.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet4.java
deleted file mode 100644
index 6a6c762cf4..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet4.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * Shell example snippet: prevent escape from closing a dialog
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet4 {
-
- public static void main(String[] args) {
- Display display = new Display();
- final Shell shell = new Shell(display);
- Button b = new Button(shell, SWT.PUSH);
- b.setText("Open Dialog ...");
- b.pack();
- b.setLocation(10, 10);
- b.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- Shell dialog = new Shell(shell, SWT.DIALOG_TRIM);
- dialog.addListener(SWT.Traverse, new Listener() {
- public void handleEvent(Event e) {
- if (e.detail == SWT.TRAVERSE_ESCAPE) {
- e.doit = false;
- }
- }
- });
- dialog.open();
- }
- });
- shell.open();
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch())
- display.sleep();
- }
- display.dispose();
- }
-
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet40.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet40.java
deleted file mode 100644
index eb25de03c7..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet40.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * Menu example snippet: create a popup menu (set in multiple controls)
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet40 {
-
-public static void main (String [] args) {
- Display display = new Display ();
- Shell shell = new Shell (display);
- Composite c1 = new Composite (shell, SWT.BORDER);
- c1.setSize (100, 100);
- Composite c2 = new Composite (shell, SWT.BORDER);
- c2.setBounds (100, 0, 100, 100);
- Menu menu = new Menu (shell, SWT.POP_UP);
- MenuItem item = new MenuItem (menu, SWT.PUSH);
- item.setText ("Popup");
- c1.setMenu (menu);
- c2.setMenu (menu);
- shell.setMenu (menu);
- shell.setSize (300, 300);
- shell.open ();
- while (!shell.isDisposed ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose ();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet41.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet41.java
deleted file mode 100644
index 47e0cf794f..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet41.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * Tool Tips example snippet: create tool tips for a tab folder, tool bar and control
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet41 {
-
-public static void main (String [] args) {
- String string = "This is a string\nwith a new line.";
- Display display = new Display ();
- Shell shell = new Shell (display);
- shell.open ();
- TabFolder folder = new TabFolder (shell, SWT.BORDER);
- folder.setSize (200, 200);
- TabItem item0 = new TabItem (folder, 0);
- item0.setToolTipText (string);
- ToolBar bar = new ToolBar (shell, SWT.BORDER);
- bar.setBounds (0, 200, 200, 64);
- ToolItem item1 = new ToolItem (bar, 0);
- item1.setToolTipText (string);
- shell.setToolTipText (string);
- while (!shell.isDisposed ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose ();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet42.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet42.java
deleted file mode 100644
index ba6ca8fb0d..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet42.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * Display example snippet: get the bounds and client area of a display
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.widgets.*;
-
-public class Snippet42 {
-
-public static void main (String [] args) {
- Display display = new Display ();
- System.out.println ("BOUNDS=" + display.getBounds () + " CLIENT=" + display.getClientArea ());
- display.dispose ();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet43.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet43.java
deleted file mode 100644
index 6f4f24597e..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet43.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * Caret example snippet: create a caret (using an image)
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet43 {
-
-public static void main (String [] args) {
- Display display = new Display ();
- Shell shell = new Shell (display);
- shell.open ();
- Caret caret = new Caret (shell, SWT.NONE);
- Color white = display.getSystemColor (SWT.COLOR_WHITE);
- Color black = display.getSystemColor (SWT.COLOR_BLACK);
- Color red = display.getSystemColor (SWT.COLOR_RED);
- Image image = new Image (display, 20, 20);
- GC gc = new GC (image);
- gc.setBackground (black);
- gc.fillRectangle (0, 0, 20, 20);
- gc.setForeground (white);
- gc.drawLine (0, 0, 19, 19);
- gc.drawLine (19, 0, 0, 19);
- gc.dispose ();
- caret.setLocation (10, 10);
- caret.setImage (image);
- gc = new GC (shell);
- gc.drawImage (image, 10, 64);
- caret.setVisible (false);
- gc.drawString ("Test", 12, 12);
- caret.setVisible (true);
- gc.dispose ();
- while (!shell.isDisposed ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- image.dispose ();
- display.dispose ();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet44.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet44.java
deleted file mode 100644
index a67c591d54..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet44.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * Cursor example snippet: set the hand cursor into a control
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet44 {
-
-public static void main (String [] args) {
- Display display = new Display ();
- final Cursor cursor = new Cursor (display, SWT.CURSOR_HAND);
- Shell shell = new Shell (display);
- shell.open ();
- final Button b = new Button (shell, 0);
- b.setBounds (10, 10, 200, 200);
- b.addListener (SWT.Selection, new Listener () {
- public void handleEvent (Event e) {
- b.setCursor (cursor);
- }
- });
- while (!shell.isDisposed ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- cursor.dispose ();
- display.dispose ();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet45.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet45.java
deleted file mode 100644
index 307361e239..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet45.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * Scale example snippet: create a scale (maximum 40, page increment 5)
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet45 {
-
-public static void main (String [] args) {
- Display display = new Display ();
- Shell shell = new Shell (display);
- Scale scale = new Scale (shell, SWT.BORDER);
- scale.setSize (200, 64);
- scale.setMaximum (40);
- scale.setPageIncrement (5);
- shell.open ();
- while (!shell.isDisposed ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose ();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet46.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet46.java
deleted file mode 100644
index 4d01ff25c1..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet46.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * Composite example snippet: intercept mouse events (drag a button with the mouse)
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.layout.*;
-
-public class Snippet46 {
-public static void main (String [] args) {
- Display display = new Display ();
- final Shell shell = new Shell (display);
- final Composite composite = new Composite (shell, SWT.NULL);
- composite.setEnabled (false);
- composite.setLayout (new FillLayout ());
- Button button = new Button (composite, SWT.PUSH);
- button.setText ("Button");
- composite.pack ();
- composite.setLocation (10, 10);
- final Point [] offset = new Point [1];
- Listener listener = new Listener () {
- public void handleEvent (Event event) {
- switch (event.type) {
- case SWT.MouseDown:
- Rectangle rect = composite.getBounds ();
- if (rect.contains (event.x, event.y)) {
- Point pt1 = composite.toDisplay (0, 0);
- Point pt2 = shell.toDisplay (event.x, event.y);
- offset [0] = new Point (pt2.x - pt1.x, pt2.y - pt1.y);
- }
- break;
- case SWT.MouseMove:
- if (offset [0] != null) {
- Point pt = offset [0];
- composite.setLocation (event.x - pt.x, event.y - pt.y);
- }
- break;
- case SWT.MouseUp:
- offset [0] = null;
- break;
- }
- }
- };
- shell.addListener (SWT.MouseDown, listener);
- shell.addListener (SWT.MouseUp, listener);
- shell.addListener (SWT.MouseMove, listener);
- shell.setSize (300, 300);
- shell.open ();
- while (!shell.isDisposed ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose ();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet47.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet47.java
deleted file mode 100644
index 5e4d5afc76..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet47.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * ToolBar example snippet: create tool bar (normal, hot and disabled images)
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet47 {
-
-public static void main (String [] args) {
- Display display = new Display ();
- Shell shell = new Shell (display);
-
- Image image = new Image (display, 20, 20);
- Color color = display.getSystemColor (SWT.COLOR_BLUE);
- GC gc = new GC (image);
- gc.setBackground (color);
- gc.fillRectangle (image.getBounds ());
- gc.dispose ();
-
- Image disabledImage = new Image (display, 20, 20);
- color = display.getSystemColor (SWT.COLOR_GREEN);
- gc = new GC (disabledImage);
- gc.setBackground (color);
- gc.fillRectangle (disabledImage.getBounds ());
- gc.dispose ();
-
- Image hotImage = new Image (display, 20, 20);
- color = display.getSystemColor (SWT.COLOR_RED);
- gc = new GC (hotImage);
- gc.setBackground (color);
- gc.fillRectangle (hotImage.getBounds ());
- gc.dispose ();
-
- ToolBar bar = new ToolBar (shell, SWT.BORDER | SWT.FLAT);
- bar.setSize (200, 32);
- for (int i=0; i<12; i++) {
- ToolItem item = new ToolItem (bar, 0);
- item.setImage (image);
- item.setDisabledImage (disabledImage);
- item.setHotImage (hotImage);
- if (i % 3 == 0) item.setEnabled (false);
- }
-
- shell.open ();
- bar.getItems () [1].setImage (disabledImage);
- while (!shell.isDisposed ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- image.dispose ();
- disabledImage.dispose ();
- hotImage.dispose ();
- display.dispose ();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet48.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet48.java
deleted file mode 100644
index 4c9285364d..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet48.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-/*
- * Copyright (c) 2000, 2003 IBM Corp. All rights reserved.
- * This file is made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- */
-
-/*
- * Canvas example snippet: scroll an image (flicker free, no double buffering)
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet48 {
-
-public static void main (String [] args) {
- Display display = new Display ();
- final Shell shell = new Shell (display,
- SWT.SHELL_TRIM | SWT.NO_BACKGROUND |
- SWT.NO_REDRAW_RESIZE | SWT.V_SCROLL | SWT.H_SCROLL);
- Image originalImage = null;
- FileDialog dialog = new FileDialog (shell, SWT.OPEN);
- dialog.setText ("Open an image file or cancel");
- String string = dialog.open ();
- if (string != null) {
- originalImage = new Image (display, string);
- }
- if (originalImage == null) {
- int width = 150, height = 200;
- originalImage = new Image (display, width, height);
- GC gc = new GC (originalImage);
- gc.fillRectangle (0, 0, width, height);
- gc.drawLine (0, 0, width, height);
- gc.drawLine (0, height, width, 0);
- gc.drawText ("Default Image", 10, 10);
- gc.dispose ();
- }
- final Image image = originalImage;
- final Point origin = new Point (0, 0);
- final ScrollBar hBar = shell.getHorizontalBar ();
- hBar.addListener (SWT.Selection, new Listener () {
- public void handleEvent (Event e) {
- int hSelection = hBar.getSelection ();
- int destX = -hSelection - origin.x;
- Rectangle rect = image.getBounds ();
- shell.scroll (destX, 0, 0, 0, rect.width, rect.height, false);
- origin.x = -hSelection;
- }
- });
- final ScrollBar vBar = shell.getVerticalBar ();
- vBar.addListener (SWT.Selection, new Listener () {
- public void handleEvent (Event e) {
- int vSelection = vBar.getSelection ();
- int destY = -vSelection - origin.y;
- Rectangle rect = image.getBounds ();
- shell.scroll (0, destY, 0, 0, rect.width, rect.height, false);
- origin.y = -vSelection;
- }
- });
- shell.addListener (SWT.Resize, new Listener () {
- public void handleEvent (Event e) {
- Rectangle rect = image.getBounds ();
- Rectangle client = shell.getClientArea ();
- hBar.setMaximum (rect.width);
- vBar.setMaximum (rect.height);
- hBar.setThumb (Math.min (rect.width, client.width));
- vBar.setThumb (Math.min (rect.height, client.height));
- int hPage = rect.width - client.width;
- int vPage = rect.height - client.height;
- int hSelection = hBar.getSelection ();
- int vSelection = vBar.getSelection ();
- if (hSelection >= hPage) {
- if (hPage <= 0) hSelection = 0;
- origin.x = -hSelection;
- }
- if (vSelection >= vPage) {
- if (vPage <= 0) vSelection = 0;
- origin.y = -vSelection;
- }
- shell.redraw ();
- }
- });
- shell.addListener (SWT.Paint, new Listener () {
- public void handleEvent (Event e) {
- GC gc = e.gc;
- gc.drawImage (image, origin.x, origin.y);
- Rectangle rect = image.getBounds ();
- Rectangle client = shell.getClientArea ();
- int marginWidth = client.width - rect.width;
- if (marginWidth > 0) {
- gc.fillRectangle (rect.width, 0, marginWidth, client.height);
- }
- int marginHeight = client.height - rect.height;
- if (marginHeight > 0) {
- gc.fillRectangle (0, rect.height, client.width, marginHeight);
- }
- }
- });
- shell.setSize (200, 150);
- shell.open ();
- while (!shell.isDisposed ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose ();
-}
-
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet49.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet49.java
deleted file mode 100644
index d23f4db5b1..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet49.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * ToolBar example snippet: create tool bar (wrap on resize)
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet49 {
-
-public static void main (String [] args) {
- Display display = new Display ();
- final Shell shell = new Shell (display);
- final ToolBar toolBar = new ToolBar (shell, SWT.WRAP);
- for (int i=0; i<12; i++) {
- ToolItem item = new ToolItem (toolBar, SWT.PUSH);
- item.setText ("Item " + i);
- }
- shell.addListener (SWT.Resize, new Listener () {
- public void handleEvent (Event e) {
- Rectangle rect = shell.getClientArea ();
- Point size = toolBar.computeSize (rect.width, SWT.DEFAULT);
- toolBar.setSize (size);
- }
- });
- toolBar.pack ();
- shell.pack ();
- shell.open ();
- while (!shell.isDisposed ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose ();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet5.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet5.java
deleted file mode 100644
index a6f64aa1e1..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet5.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * ScrolledComposite example snippet: scroll a control in a scrolled composite
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.custom.*;
-
-public class Snippet5 {
-
-public static void main (String [] args)
-{
- Display display = new Display ();
- Shell shell = new Shell (display);
- shell.setLayout(new FillLayout());
-
- // this button is always 400 x 400. Scrollbars appear if the window is resized to be
- // too small to show part of the button
- ScrolledComposite c1 = new ScrolledComposite(shell, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
- Button b1 = new Button(c1, SWT.PUSH);
- b1.setText("fixed size button");
- b1.setSize(400, 400);
- c1.setContent(b1);
-
- // this button has a minimum size of 400 x 400. If the window is resized to be big
- // enough to show more than 400 x 400, the button will grow in size. If the window
- // is made too small to show 400 x 400, scrollbars will appear.
- ScrolledComposite c2 = new ScrolledComposite(shell, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
- Button b2 = new Button(c2, SWT.PUSH);
- b2.setText("expanding button");
- c2.setContent(b2);
- c2.setExpandHorizontal(true);
- c2.setExpandVertical(true);
- c2.setMinWidth(400);
- c2.setMinHeight(400);
-
- shell.setSize(600, 300);
- shell.open ();
- while (!shell.isDisposed ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose ();
-}
-
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet50.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet50.java
deleted file mode 100644
index 9009af18fb..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet50.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * Shell example snippet: create a dialog shell
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.widgets.*;
-
-public class Snippet50 {
-
-public static void main (String [] args) {
- Display display = new Display ();
- Shell shell = new Shell (display);
- shell.setText ("Shell");
- shell.setSize (200, 200);
- shell.open ();
- Shell dialog = new Shell (shell);
- dialog.setText ("Dialog");
- dialog.setSize (200, 200);
- dialog.open ();
- while (!shell.isDisposed ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose ();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet51.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet51.java
deleted file mode 100644
index a81a0c083a..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet51.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * Table example snippet: scroll a table (set the top index)
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet51 {
-
-public static void main (String [] args) {
- Display display = new Display ();
- Shell shell = new Shell (display);
- Table table = new Table (shell, SWT.BORDER | SWT.MULTI);
- table.setSize (200, 200);
- for (int i=0; i<128; i++) {
- TableItem item = new TableItem (table, SWT.NONE);
- item.setText ("Item " + i);
- }
- table.setTopIndex (95);
- shell.pack ();
- shell.open ();
- while (!shell.isDisposed ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose ();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet52.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet52.java
deleted file mode 100644
index a04f0f727d..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet52.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * Table example snippet: select an index (select and scroll)
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet52 {
-
-public static void main (String [] args) {
- Display display = new Display ();
- Shell shell = new Shell (display);
- Table table = new Table (shell, SWT.BORDER | SWT.MULTI);
- table.setSize (200, 200);
- for (int i=0; i<128; i++) {
- TableItem item = new TableItem (table, SWT.NONE);
- item.setText ("Item " + i);
- }
- table.setSelection (95);
- shell.pack ();
- shell.open ();
- while (!shell.isDisposed ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose ();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet53.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet53.java
deleted file mode 100644
index 4280520936..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet53.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * Table example snippet: remove selected items
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet53 {
-
-public static void main (String [] args) {
- Display display = new Display ();
- Shell shell = new Shell (display);
- final Table table = new Table (shell, SWT.BORDER | SWT.MULTI);
- table.setSize (200, 200);
- for (int i=0; i<128; i++) {
- TableItem item = new TableItem (table, SWT.NONE);
- item.setText ("Item " + i);
- }
- Menu menu = new Menu (shell, SWT.POP_UP);
- table.setMenu (menu);
- MenuItem item = new MenuItem (menu, SWT.PUSH);
- item.setText ("Delete Selection");
- item.addListener (SWT.Selection, new Listener () {
- public void handleEvent (Event event) {
- table.remove (table.getSelectionIndices ());
- }
- });
- shell.pack ();
- shell.open ();
- while (!shell.isDisposed ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose ();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet54.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet54.java
deleted file mode 100644
index 1b99c19db9..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet54.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * Sash example snippet: create a sash (allow it to be moved)
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet54 {
-
-public static void main (String [] args) {
- Display display = new Display ();
- Shell shell = new Shell (display);
- final Sash sash = new Sash (shell, SWT.BORDER | SWT.VERTICAL);
- sash.setBounds (10, 10, 32, 100);
- sash.addListener (SWT.Selection, new Listener () {
- public void handleEvent (Event e) {
- sash.setBounds (e.x, e.y, e.width, e.height);
- }
- });
- shell.open ();
- sash.setFocus ();
- while (!shell.isDisposed ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose ();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet55.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet55.java
deleted file mode 100644
index 78dc86e8cf..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet55.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * Text example snippet: resize a text control (show about 10 characters)
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet55 {
-
-public static void main (String [] args) {
- Display display = new Display ();
- Shell shell = new Shell (display);
- Text text = new Text (shell, SWT.BORDER);
- int columns = 10;
- GC gc = new GC (text);
- FontMetrics fm = gc.getFontMetrics ();
- int width = columns * fm.getAverageCharWidth ();
- int height = fm.getHeight ();
- gc.dispose ();
- text.setSize (text.computeSize (width, height));
- shell.pack ();
- shell.open ();
- while (!shell.isDisposed ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose ();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet56.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet56.java
deleted file mode 100644
index 2becb5ac15..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet56.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * ProgressBar example snippet: update a progress bar (from another thread)
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet56 {
-
- public static void main(String[] args) {
- final Display display = new Display();
- Shell shell = new Shell(display);
- final ProgressBar bar = new ProgressBar(shell, SWT.SMOOTH);
- bar.setBounds(10, 10, 200, 32);
- shell.open();
- final int maximum = bar.getMaximum();
- new Thread() {
- public void run() {
- for (final int[] i = new int[1]; i[0] <= maximum; i[0]++) {
- try {Thread.sleep (100);} catch (Throwable th) {}
- if (display.isDisposed()) return;
- display.asyncExec(new Runnable() {
- public void run() {
- if (bar.isDisposed ()) return;
- bar.setSelection(i[0]);
- }
- });
- }
- }
- }.start();
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose();
- }
-} \ No newline at end of file
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet57.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet57.java
deleted file mode 100644
index d4c16a49a9..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet57.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * ProgressBar example snippet: update a progress bar (from the UI thread)
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet57 {
-
-public static void main (String [] args) {
- Display display = new Display ();
- Shell shell = new Shell (display);
- ProgressBar bar = new ProgressBar (shell, SWT.SMOOTH);
- bar.setBounds (10, 10, 200, 32);
- shell.open ();
- for (int i=0; i<=bar.getMaximum (); i++) {
- try {Thread.sleep (100);} catch (Throwable th) {}
- bar.setSelection (i);
- }
- while (!shell.isDisposed ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose ();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet58.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet58.java
deleted file mode 100644
index 3a01609b2e..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet58.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * ToolBar example snippet: place a combo box in a tool bar
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet58 {
-
-public static void main (String [] args) {
- Display display = new Display ();
- Shell shell = new Shell (display);
- ToolBar bar = new ToolBar (shell, SWT.BORDER);
- for (int i=0; i<4; i++) {
- ToolItem item = new ToolItem (bar, 0);
- item.setText ("Item " + i);
- }
- ToolItem sep = new ToolItem (bar, SWT.SEPARATOR);
- int start = bar.getItemCount ();
- for (int i=start; i<start+4; i++) {
- ToolItem item = new ToolItem (bar, 0);
- item.setText ("Item " + i);
- }
- Combo combo = new Combo (bar, SWT.READ_ONLY);
- for (int i=0; i<4; i++) {
- combo.add ("Item " + i);
- }
- combo.pack ();
- sep.setWidth (combo.getSize ().x);
- sep.setControl (combo);
- bar.pack ();
- shell.pack ();
- shell.open ();
- while (!shell.isDisposed ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose ();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet59.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet59.java
deleted file mode 100644
index 54f19976c6..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet59.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * List example snippet: print selected items in a list
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet59 {
-
-public static void main (String [] args) {
- Display display = new Display ();
- Shell shell = new Shell (display);
- final List list = new List (shell, SWT.BORDER | SWT.MULTI | SWT.V_SCROLL);
- for (int i=0; i<128; i++) list.add ("Item " + i);
- list.setBounds (0, 0, 100, 100);
- list.addListener (SWT.Selection, new Listener () {
- public void handleEvent (Event e) {
- String string = "";
- int [] selection = list.getSelectionIndices ();
- for (int i=0; i<selection.length; i++) string += selection [i] + " ";
- System.out.println ("Selection={" + string + "}");
- }
- });
- list.addListener (SWT.DefaultSelection, new Listener () {
- public void handleEvent (Event e) {
- String string = "";
- int [] selection = list.getSelectionIndices ();
- for (int i=0; i<selection.length; i++) string += selection [i] + " ";
- System.out.println ("DefaultSelection={" + string + "}");
- }
- });
- shell.pack ();
- shell.open ();
- while (!shell.isDisposed ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose ();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet6.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet6.java
deleted file mode 100644
index 0af4470ef3..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet6.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * GridLayout example snippet: insert widgets into a grid layout
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet6 {
-
-public static void main (String [] args) {
- Display display = new Display ();
- final Shell shell = new Shell (display);
- shell.setLayout(new GridLayout());
- final Composite c = new Composite(shell, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.numColumns = 3;
- c.setLayout(layout);
- for (int i = 0; i < 10; i++) {
- Button b = new Button(c, SWT.PUSH);
- b.setText("Button "+i);
- }
-
- Button b = new Button(shell, SWT.PUSH);
- b.setText("add a new button at row 2 column 1");
- final int[] index = new int[1];
- b.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- Button b = new Button(c, SWT.PUSH);
- b.setText("Special "+index[0]);
- index[0]++;
- Control[] children = c.getChildren();
- b.moveAbove(children[3]);
- shell.layout(true);
- }
- });
-
- shell.open ();
- while (!shell.isDisposed ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose ();
-}
-
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet60.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet60.java
deleted file mode 100644
index 9d449591db..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet60.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * Display example snippet: create two one shot timers (5000 ms, 2000 ms)
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.widgets.*;
-
-public class Snippet60 {
-
-public static void main (String [] args) {
- Display display = new Display ();
- Shell shell = new Shell (display);
- shell.setSize (200, 200);
- shell.open ();
- display.timerExec (5000, new Runnable () {
- public void run () {
- System.out.println ("5000");
- }
- });
- display.timerExec (2000, new Runnable () {
- public void run () {
- System.out.println ("2000");
- }
- });
- while (!shell.isDisposed ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose ();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet61.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet61.java
deleted file mode 100644
index af5fa42dc3..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet61.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * Tree example snippet: print selected items in a tree
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet61 {
-
-public static void main (String [] args) {
- Display display = new Display ();
- Shell shell = new Shell (display);
- final Tree tree = new Tree (shell, SWT.BORDER | SWT.MULTI | SWT.V_SCROLL);
- for (int i=0; i<4; i++) {
- TreeItem item0 = new TreeItem (tree, 0);
- item0.setText ("Item " + i);
- for (int j=0; j<4; j++) {
- TreeItem item1 = new TreeItem (item0, 0);
- item1.setText ("SubItem " + i + " " + j);
- for (int k=0; k<4; k++) {
- TreeItem item2 = new TreeItem (item1, 0);
- item2.setText ("SubItem " + i + " " + j + " " + k);
- }
- }
- }
- tree.setBounds (0, 0, 100, 100);
- tree.addListener (SWT.Selection, new Listener () {
- public void handleEvent (Event e) {
- String string = "";
- TreeItem [] selection = tree.getSelection ();
- for (int i=0; i<selection.length; i++) string += selection [i] + " ";
- System.out.println ("Selection={" + string + "}");
- }
- });
- tree.addListener (SWT.DefaultSelection, new Listener () {
- public void handleEvent (Event e) {
- String string = "";
- TreeItem [] selection = tree.getSelection ();
- for (int i=0; i<selection.length; i++) string += selection [i] + " ";
- System.out.println ("DefaultSelection={" + string + "}");
- }
- });
- tree.addListener (SWT.Expand, new Listener () {
- public void handleEvent (Event e) {
- String string = "";
- System.out.println ("Expand={" + e.item + "}");
- }
- });
- tree.addListener (SWT.Collapse, new Listener () {
- public void handleEvent (Event e) {
- String string = "";
- System.out.println ("Collapse={" + e.item + "}");
- }
- });
- tree.getItems () [0].setExpanded (true);
- shell.pack ();
- shell.open ();
- while (!shell.isDisposed ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose ();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet62.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet62.java
deleted file mode 100644
index 2f7ff21bc8..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet62.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * Control example snippet: print mouse state and button (down, move, up)
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet62 {
-
-public static void main (String [] args) {
- Display display = new Display ();
- final Shell shell = new Shell (display);
- Listener listener = new Listener () {
- public void handleEvent (Event e) {
- String string = "Unknown";
- switch (e.type) {
- case SWT.MouseDown: string = "DOWN"; break;
- case SWT.MouseMove: string = "MOVE"; break;
- case SWT.MouseUp: string = "UP"; break;
- }
- string +=": button: " + e.button + ", ";
- string += "stateMask=0x" + Integer.toHexString (e.stateMask);
- if ((e.stateMask & SWT.BUTTON1) != 0) string += " BUTTON1";
- if ((e.stateMask & SWT.BUTTON2) != 0) string += " BUTTON2";
- if ((e.stateMask & SWT.BUTTON3) != 0) string += " BUTTON3";
- System.out.println (string);
- }
- };
- shell.addListener (SWT.MouseDown, listener);
- shell.addListener (SWT.MouseMove, listener);
- shell.addListener (SWT.MouseUp, listener);
- shell.pack ();
- shell.open ();
- while (!shell.isDisposed ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose ();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet63.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet63.java
deleted file mode 100644
index 129eff83c5..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet63.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * Shell example snippet: create a dialog shell (prompt for a value)
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.layout.*;
-
-public class Snippet63 {
-
-public static void main (String [] args) {
- Display display = new Display ();
- Shell shell = new Shell (display);
- shell.pack ();
- shell.open ();
- final boolean [] result = new boolean [1];
- final Shell dialog = new Shell (shell, SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL);
- dialog.setLayout (new RowLayout ());
- final Button ok = new Button (dialog, SWT.PUSH);
- ok.setText ("Ok");
- Button cancel = new Button (dialog, SWT.PUSH);
- cancel.setText ("Cancel");
- Listener listener =new Listener () {
- public void handleEvent (Event event) {
- result [0] = event.widget == ok;
- dialog.close ();
- }
- };
- ok.addListener (SWT.Selection, listener);
- cancel.addListener (SWT.Selection, listener);
- dialog.pack ();
- dialog.open ();
- System.out.println ("Prompt ...");
- while (!dialog.isDisposed ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- System.out.println ("Result: " + result [0]);
- while (!shell.isDisposed ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose ();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet64.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet64.java
deleted file mode 100644
index 96f4feb066..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet64.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * Table example snippet: print selected items in a table
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet64 {
-
-public static void main (String [] args) {
- Display display = new Display ();
- Shell shell = new Shell (display);
- final Table table = new Table (shell, SWT.BORDER | SWT.MULTI | SWT.V_SCROLL);
- for (int i=0; i<16; i++) {
- TableItem item = new TableItem (table, 0);
- item.setText ("Item " + i);
- }
- table.setBounds (0, 0, 100, 100);
- table.addListener (SWT.Selection, new Listener () {
- public void handleEvent (Event e) {
- String string = "";
- TableItem [] selection = table.getSelection ();
- for (int i=0; i<selection.length; i++) string += selection [i] + " ";
- System.out.println ("Selection={" + string + "}");
- }
- });
- table.addListener (SWT.DefaultSelection, new Listener () {
- public void handleEvent (Event e) {
- String string = "";
- TableItem [] selection = table.getSelection ();
- for (int i=0; i<selection.length; i++) string += selection [i] + " ";
- System.out.println ("DefaultSelection={" + string + "}");
- }
- });
- shell.pack ();
- shell.open ();
- while (!shell.isDisposed ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose ();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet65.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet65.java
deleted file mode 100644
index 840fcdb728..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet65.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * FormLayout example snippet: create a simple dialog using form layout
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.layout.*;
-
-public class Snippet65 {
-
-public static void main (String [] args) {
- Display display = new Display ();
- final Shell shell = new Shell (display);
- Label label = new Label (shell, SWT.WRAP);
- label.setText ("This is a long text string that will wrap when the dialog is resized.");
- List list = new List (shell, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
- list.setItems (new String [] {"Item 1", "Item2"});
- Button button1 = new Button (shell, SWT.PUSH);
- button1.setText ("Ok");
- Button button2 = new Button (shell, SWT.PUSH);
- button2.setText ("Cancel");
-
- final int insetX = 4, insetY = 4;
- FormLayout formLayout = new FormLayout ();
- formLayout.marginWidth = insetX;
- formLayout.marginHeight = insetY;
- shell.setLayout (formLayout);
-
- Point size = label.computeSize (SWT.DEFAULT, SWT.DEFAULT);
- final FormData labelData = new FormData (size.x, SWT.DEFAULT);
- labelData.left = new FormAttachment (0, 0);
- labelData.right = new FormAttachment (100, 0);
- label.setLayoutData (labelData);
- shell.addListener (SWT.Resize, new Listener () {
- public void handleEvent (Event e) {
- Rectangle rect = shell.getClientArea ();
- labelData.width = rect.width - insetX * 2;
- shell.layout ();
- }
- });
-
- FormData button2Data = new FormData ();
- button2Data.right = new FormAttachment (100, -insetX);
- button2Data.bottom = new FormAttachment (100, 0);
- button2.setLayoutData (button2Data);
-
- FormData button1Data = new FormData ();
- button1Data.right = new FormAttachment (button2, -insetX);
- button1Data.bottom = new FormAttachment (100, 0);
- button1.setLayoutData (button1Data);
-
- FormData listData = new FormData ();
- listData.left = new FormAttachment (0, 0);
- listData.right = new FormAttachment (100, 0);
- listData.top = new FormAttachment (label, insetY);
- listData.bottom = new FormAttachment (button2, -insetY);
- list.setLayoutData (listData);
-
- shell.pack ();
- shell.open ();
- while (!shell.isDisposed ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose ();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet66.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet66.java
deleted file mode 100644
index 8762bd9302..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet66.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * GC example snippet: implement a simple scribble program
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet66 {
-
-public static void main (String [] args) {
- Display display = new Display ();
- final Shell shell = new Shell (display);
- Listener listener = new Listener () {
- int lastX = 0, lastY = 0;
- public void handleEvent (Event event) {
- switch (event.type) {
- case SWT.MouseMove:
- if ((event.stateMask & SWT.BUTTON1) == 0) break;
- GC gc = new GC (shell);
- gc.drawLine (lastX, lastY, event.x, event.y);
- gc.dispose ();
- //FALL THROUGH
- case SWT.MouseDown:
- lastX = event.x;
- lastY = event.y;
- break;
- }
- }
- };
- shell.addListener (SWT.MouseDown, listener);
- shell.addListener (SWT.MouseMove, listener);
- shell.open ();
- while (!shell.isDisposed ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose ();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet67.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet67.java
deleted file mode 100644
index 714fcb4ec8..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet67.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * ToolBar example snippet: place a drop down menu in a tool bar
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet67 {
-
-public static void main (String [] args) {
- final Display display = new Display ();
- final Shell shell = new Shell (display);
- final ToolBar toolBar = new ToolBar (shell, SWT.NONE);
- final Menu menu = new Menu (shell, SWT.POP_UP);
- for (int i=0; i<8; i++) {
- MenuItem item = new MenuItem (menu, SWT.PUSH);
- item.setText ("Item " + i);
- }
- final ToolItem item = new ToolItem (toolBar, SWT.DROP_DOWN);
- item.addListener (SWT.Selection, new Listener () {
- public void handleEvent (Event event) {
- if (event.detail == SWT.ARROW) {
- Rectangle rect = item.getBounds ();
- Point pt = new Point (rect.x, rect.y + rect.height);
- pt = toolBar.toDisplay (pt);
- menu.setLocation (pt.x, pt.y);
- menu.setVisible (true);
- }
- }
- });
- toolBar.pack ();
- shell.pack ();
- shell.open ();
- while (!shell.isDisposed ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- menu.dispose ();
- display.dispose ();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet68.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet68.java
deleted file mode 100644
index 2400454837..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet68.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * Display example snippet: stop a repeating timer when a button is pressed
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.layout.*;
-
-public class Snippet68 {
-
-public static void main (String [] args) {
- final Display display = new Display ();
- final Color red = display.getSystemColor (SWT.COLOR_RED);
- final Color blue = display.getSystemColor (SWT.COLOR_BLUE);
- Shell shell = new Shell (display);
- shell.setLayout (new RowLayout ());
- Button button = new Button (shell, SWT.PUSH);
- button.setText ("Stop Timer");
- final Label label = new Label (shell, SWT.BORDER);
- label.setBackground (red);
- final int time = 500;
- final Runnable timer = new Runnable () {
- public void run () {
- if (label.isDisposed ()) return;
- Color color = label.getBackground ().equals (red) ? blue : red;
- label.setBackground (color);
- display.timerExec (time, this);
- }
- };
- display.timerExec (time, timer);
- button.addListener (SWT.Selection, new Listener () {
- public void handleEvent (Event event) {
- display.timerExec (-1, timer);
- }
- });
- button.pack ();
- label.setLayoutData (new RowData (button.getSize ()));
- shell.pack ();
- shell.open ();
- while (!shell.isDisposed ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose ();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet69.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet69.java
deleted file mode 100644
index 5379edabee..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet69.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * FormLayout example snippet: center a label and single line text using a form layout
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.layout.*;
-
-public class Snippet69 {
-
-public static void main (String [] args) {
- Display display = new Display ();
- Shell shell = new Shell (display);
- Label label = new Label (shell, SWT.NONE | SWT.BORDER);
- label.setText ("Name");
- Text text = new Text (shell, SWT.NONE);
-
- FormLayout layout = new FormLayout ();
- layout.marginWidth = layout.marginHeight = 5;
- shell.setLayout (layout);
-
- GC gc = new GC (text);
- FontMetrics fm = gc.getFontMetrics ();
- int charWidth = fm.getAverageCharWidth ();
- int width = text.computeSize (charWidth * 8, SWT.DEFAULT).x;
- gc.dispose ();
- FormData data = new FormData (width, SWT.DEFAULT);
- text.setLayoutData (data);
- data.left = new FormAttachment (label, 5);
- data.top = new FormAttachment (label, 0, SWT.CENTER);
-
- shell.open ();
- while (!shell.isDisposed ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose ();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet7.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet7.java
deleted file mode 100644
index 48fa373f83..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet7.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * example snippet: create a table (lazy)
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet7 {
-
-public static void main (String [] args) {
- final Display display = new Display ();
- final Image image = new Image (display, 16, 16);
- GC gc = new GC (image);
- gc.setBackground (display.getSystemColor (SWT.COLOR_RED));
- gc.fillRectangle (image.getBounds ());
- gc.dispose ();
- final Shell shell = new Shell (display);
- shell.setText ("Lazy Table");
- shell.setLayout (new FillLayout ());
- final Table table = new Table (shell, SWT.BORDER | SWT.MULTI);
- table.setSize (200, 200);
- Thread thread = new Thread () {
- public void run () {
- for (int i=0; i<20000; i++) {
- if (table.isDisposed ()) return;
- final int [] index = new int [] {i};
- display.syncExec (new Runnable () {
- public void run () {
- if (table.isDisposed ()) return;
- TableItem item = new TableItem (table, SWT.NULL);
- item.setText ("Table Item " + index [0]);
- item.setImage (image);
- }
- });
- }
- }
- };
- thread.start ();
- shell.setSize (200, 200);
- shell.open ();
- while (!shell.isDisposed ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- image.dispose ();
- display.dispose ();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet70.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet70.java
deleted file mode 100644
index 4c1f59842c..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet70.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * GC example snippet: create an icon (in memory)
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet70 {
-
-public static void main (String [] args) {
- Display display = new Display ();
- Color red = display.getSystemColor (SWT.COLOR_RED);
- Color white = display.getSystemColor (SWT.COLOR_WHITE);
- Color black = display.getSystemColor (SWT.COLOR_BLACK);
-
- Image image = new Image (display, 20, 20);
- GC gc = new GC (image);
- gc.setBackground (red);
- gc.fillRectangle (5, 5, 10, 10);
- gc.dispose ();
- ImageData imageData = image.getImageData ();
-
- PaletteData palette = new PaletteData (
- new RGB [] {
- new RGB (0, 0, 0),
- new RGB (0xFF, 0xFF, 0xFF),
- });
- ImageData maskData = new ImageData (20, 20, 1, palette);
- Image mask = new Image (display, maskData);
- gc = new GC (mask);
- gc.setBackground (black);
- gc.fillRectangle (0, 0, 20, 20);
- gc.setBackground (white);
- gc.fillRectangle (5, 5, 10, 10);
- gc.dispose ();
- maskData = mask.getImageData ();
-
- Image icon = new Image (display, imageData, maskData);
- Shell shell = new Shell (display);
- Button button = new Button (shell, SWT.PUSH);
- button.setImage (icon);
- button.setSize (60, 60);
- shell.open ();
- while (!shell.isDisposed ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- icon.dispose ();
- image.dispose ();
- mask.dispose ();
- display.dispose ();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet71.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet71.java
deleted file mode 100644
index 6bef937528..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet71.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * FormLayout example snippet: create a simple OK/CANCEL dialog using form layout
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.layout.*;
-
-public class Snippet71 {
-
-public static void main (String [] args) {
- Display display = new Display ();
- Shell shell = new Shell (display);
- shell.pack ();
- shell.open ();
- Shell dialog = new Shell (shell, SWT.DIALOG_TRIM);
- Label label = new Label (dialog, SWT.NONE);
- label.setText ("Exit the application?");
- Button okButton = new Button (dialog, SWT.PUSH);
- okButton.setText ("&OK");
- Button cancelButton = new Button (dialog, SWT.PUSH);
- cancelButton.setText ("&Cancel");
-
- FormLayout form = new FormLayout ();
- form.marginWidth = form.marginHeight = 8;
- dialog.setLayout (form);
- FormData okData = new FormData ();
- okData.top = new FormAttachment (label, 8);
- okButton.setLayoutData (okData);
- FormData cancelData = new FormData ();
- cancelData.left = new FormAttachment (okButton, 8);
- cancelData.top = new FormAttachment (okButton, 0, SWT.TOP);
- cancelButton.setLayoutData (cancelData);
-
- dialog.setDefaultButton (okButton);
- dialog.pack ();
- dialog.open ();
-
- while (!shell.isDisposed ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose ();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet72.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet72.java
deleted file mode 100644
index 4397358dc1..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet72.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * FileDialog example snippet: prompt for a file name (to save)
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet72 {
-
-public static void main (String [] args) {
- Display display = new Display ();
- Shell shell = new Shell (display);
- shell.open ();
- FileDialog dialog = new FileDialog (shell, SWT.SAVE);
- dialog.setFilterNames (new String [] {"Batch Files", "All Files (*.*)"});
- dialog.setFilterExtensions (new String [] {"*.bat", "*.*"}); //Windows wild cards
- dialog.setFilterPath ("c:\\"); //Windows path
- dialog.setFileName ("fred.bat");
- System.out.println ("Save to: " + dialog.open ());
- while (!shell.isDisposed ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose ();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet73.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet73.java
deleted file mode 100644
index ccefbbff0f..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet73.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * Menu example snippet: enable menu items dynamically (when menu shown)
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet73 {
-
-public static void main (String [] args) {
- Display display = new Display ();
- Shell shell = new Shell (display);
- final Tree tree = new Tree (shell, SWT.BORDER | SWT.MULTI);
- final Menu menu = new Menu (shell, SWT.POP_UP);
- tree.setMenu (menu);
- for (int i=0; i<12; i++) {
- TreeItem treeItem = new TreeItem (tree, SWT.NULL);
- treeItem.setText ("Item " + i);
- MenuItem menuItem = new MenuItem (menu, SWT.PUSH);
- menuItem.setText (treeItem.getText ());
- }
- menu.addListener (SWT.Show, new Listener () {
- public void handleEvent (Event event) {
- MenuItem [] menuItems = menu.getItems ();
- TreeItem [] treeItems = tree.getSelection ();
- for (int i=0; i<menuItems.length; i++) {
- String text = menuItems [i].getText ();
- int index = 0;
- while (index<treeItems.length) {
- if (treeItems [index].getText ().equals (text)) break;
- index++;
- }
- menuItems [i].setEnabled (index != treeItems.length);
- }
- }
- });
- tree.setSize (200, 200);
- shell.setSize (300, 300);
- shell.open ();
- while (!shell.isDisposed ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose ();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet74.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet74.java
deleted file mode 100644
index ed511163f4..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet74.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * Caret example snippet: create a caret
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet74 {
-
-public static void main (String [] args) {
- Display display = new Display ();
- Shell shell = new Shell (display);
- Caret caret = new Caret (shell, SWT.NONE);
- caret.setBounds (10, 10, 2, 32);
- shell.open ();
- while (!shell.isDisposed ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose ();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet75.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet75.java
deleted file mode 100644
index c2ed8928f3..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet75.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * Composite example snippet: set the tab traversal order of children
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.layout.*;
-
-public class Snippet75 {
-
-public static void main (String [] args) {
- Display display = new Display ();
- Shell shell = new Shell (display);
- shell.setLayout (new RowLayout ());
-
- Composite c1 = new Composite (shell, SWT.BORDER);
- c1.setLayout (new RowLayout ());
- Button b1 = new Button (c1, SWT.PUSH);
- b1.setText ("B1");
- Button [] radios = new Button [3];
- for (int i=0; i<radios.length; i++) {
- radios [i] = new Button (c1, SWT.RADIO);
- radios [i].setText ("R" + (i ==1 ? "&" : "") + i);
- }
- Button b2 = new Button (c1, SWT.PUSH);
- b2.setText ("B2");
- List l1 = new List (c1, SWT.SINGLE | SWT.BORDER);
- l1.setItems (new String [] {"L1"});
- Button b3 = new Button (c1, SWT.PUSH);
- b3.setText ("B&3");
- Button b3_1 = new Button (c1, SWT.PUSH);
- b3_1.setText ("B3_1");
-
- Composite c2 = new Composite (shell, SWT.BORDER);
- c2.setLayout (new RowLayout ());
- Button b4 = new Button (c2, SWT.PUSH);
- b4.setText ("B&4");
- Button b5 = new Button (c2, SWT.PUSH);
- b5.setText ("B&5");
-
- List l2 = new List (shell, SWT.SINGLE | SWT.BORDER);
- l2.setItems (new String [] {"L2"});
-
- ToolBar tb1 = new ToolBar (shell, SWT.FLAT | SWT.BORDER);
- ToolItem i1 = new ToolItem (tb1, SWT.RADIO);
- i1.setText ("I1");
- ToolItem i2 = new ToolItem (tb1, SWT.RADIO);
- i2.setText ("I&2");
- Combo combo1 = new Combo (tb1, SWT.READ_ONLY | SWT.BORDER);
- combo1.setItems (new String [] {"C1"});
- combo1.setText ("C1");
- combo1.pack ();
- ToolItem i3 = new ToolItem (tb1, SWT.SEPARATOR);
- i3.setWidth (combo1.getSize ().x);
- i3.setControl (combo1);
- i3.setText ("I3");
- ToolItem i4 = new ToolItem (tb1, SWT.PUSH);
- i4.setText ("I4");
- ToolItem i5 = new ToolItem (tb1, SWT.CHECK);
- i5.setText ("I5");
-
- Button b6 = new Button (shell, SWT.PUSH);
- b6.setText ("B&6");
-
- Composite c4 = new Composite (shell, SWT.BORDER);
- c4.setSize (32, 32);
- Composite c5 = new Composite (c4, SWT.BORDER);
- c5.setSize (20, 20);
-
- Control [] list1 = new Control [] {b2, b1, b3_1, b3};
- c1.setTabList (list1);
- Control [] list2 = new Control [] {c1, b6, tb1, c4, c2, l2};
- shell.setTabList (list2);
-
- shell.pack ();
- shell.open ();
-
- Control [] x = c1.getChildren ();
- while (!shell.isDisposed ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose ();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet76.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet76.java
deleted file mode 100644
index 171c2089da..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet76.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * TabFolder example snippet: create a tab folder (six pages)
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet76 {
-
-public static void main (String [] args) {
- Display display = new Display ();
- final Shell shell = new Shell (display);
- final TabFolder tabFolder = new TabFolder (shell, SWT.BORDER);
- for (int i=0; i<6; i++) {
- TabItem item = new TabItem (tabFolder, SWT.NULL);
- item.setText ("TabItem " + i);
- Button button = new Button (tabFolder, SWT.PUSH);
- button.setText ("Page " + i);
- item.setControl (button);
- }
- tabFolder.setSize (400, 200);
- shell.pack ();
- shell.open ();
- while (!shell.isDisposed ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose ();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet77.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet77.java
deleted file mode 100644
index 88e04f3d71..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet77.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * Table example snippet: resize columns as table resizes
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet77 {
-
-public static void main(String[] args) {
- Display display = new Display();
- Shell shell = new Shell(display);
- shell.setLayout(new FillLayout());
-
- final Composite comp = new Composite(shell, SWT.NONE);
- final Table table = new Table(comp, SWT.BORDER | SWT.V_SCROLL);
- table.setHeaderVisible(true);
- table.setLinesVisible(true);
- final TableColumn column1 = new TableColumn(table, SWT.NONE);
- column1.setText("Column 1");
- final TableColumn column2 = new TableColumn(table, SWT.NONE);
- column2.setText("Column 2");
- for (int i = 0; i < 10; i++) {
- TableItem item = new TableItem(table, SWT.NONE);
- item.setText(new String[] {"item 0" + i, "item 1"+i});
- }
- comp.addControlListener(new ControlAdapter() {
- public void controlResized(ControlEvent e) {
- Rectangle area = comp.getClientArea();
- Point preferredSize = table.computeSize(SWT.DEFAULT, SWT.DEFAULT);
- int width = area.width - 2*table.getBorderWidth();
- if (preferredSize.y > area.height) {
- // Subtract the scrollbar width from the total column width
- // if a vertical scrollbar will be required
- Point vBarSize = table.getVerticalBar().getSize();
- width -= vBarSize.x;
- }
- Point oldSize = table.getSize();
- if (oldSize.x > area.width) {
- // table is getting smaller so make the columns
- // smaller first and then resize the table to
- // match the client area width
- column1.setWidth(width/3);
- column2.setWidth(width - column1.getWidth());
- table.setSize(area.width, area.height);
- } else {
- // table is getting bigger so make the table
- // bigger first and then make the columns wider
- // to match the client area width
- table.setSize(area.width, area.height);
- column1.setWidth(width/3);
- column2.setWidth(width - column1.getWidth());
- }
- }
- });
-
- shell.open();
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch())
- display.sleep();
- }
- display.dispose();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet78.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet78.java
deleted file mode 100644
index bb4301ffe8..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet78.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * Drag and Drop example snippet: drag text between two labels
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.dnd.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet78 {
-
-public static void main (String [] args) {
-
- Display display = Display.getDefault ();
- final Shell shell = new Shell (display);
- shell.setLayout(new FillLayout());
- final Label label1 = new Label (shell, SWT.BORDER);
- label1.setText ("TEXT");
- final Label label2 = new Label (shell, SWT.BORDER);
- setDragDrop (label1);
- setDragDrop (label2);
- shell.setSize (200, 200);
- shell.open ();
- while (!shell.isDisposed ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose ();
-}
-public static void setDragDrop (final Label label) {
-
- Transfer[] types = new Transfer[] {TextTransfer.getInstance()};
- int operations = DND.DROP_MOVE | DND.DROP_COPY | DND.DROP_LINK;
-
- final DragSource source = new DragSource (label, operations);
- source.setTransfer(types);
- source.addDragListener (new DragSourceListener () {
- public void dragStart(DragSourceEvent event) {
- event.doit = (label.getText ().length () != 0);
- };
- public void dragSetData (DragSourceEvent event) {
- event.data = label.getText ();
- }
- public void dragFinished(DragSourceEvent event) {
- if (event.detail == DND.DROP_MOVE)
- label.setText ("");
- }
- });
-
- DropTarget target = new DropTarget(label, operations);
- target.setTransfer(types);
- target.addDropListener (new DropTargetAdapter() {
- public void drop(DropTargetEvent event) {
- if (event.data == null) {
- event.detail = DND.DROP_NONE;
- return;
- }
- label.setText ((String) event.data);
- }
- });
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet79.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet79.java
deleted file mode 100644
index 46714a233d..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet79.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * Drag and Drop example snippet: define my own data transfer type
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import java.io.*;
-import org.eclipse.swt.dnd.*;
-
-public class Snippet79 extends ByteArrayTransfer {
-
- /* The data being transferred is an array of type MyType which is define as: */
- public static class MyType {
- String fileName;
- long fileLength;
- long lastModified;
- }
-
- private static final String MYTYPENAME = "name_for_my_type";
- private static final int MYTYPEID = registerType(MYTYPENAME);
- private static Snippet79 _instance = new Snippet79();
-
-public static Snippet79 getInstance () {
- return _instance;
-}
-public void javaToNative (Object object, TransferData transferData) {
- if (object == null || !(object instanceof MyType[])) return;
-
- if (isSupportedType(transferData)) {
- MyType[] myTypes = (MyType[]) object;
- try {
- // write data to a byte array and then ask super to convert to pMedium
- ByteArrayOutputStream out = new ByteArrayOutputStream();
- DataOutputStream writeOut = new DataOutputStream(out);
- for (int i = 0, length = myTypes.length; i < length; i++){
- byte[] buffer = myTypes[i].fileName.getBytes();
- writeOut.writeInt(buffer.length);
- writeOut.write(buffer);
- writeOut.writeLong(myTypes[i].fileLength);
- writeOut.writeLong(myTypes[i].lastModified);
- }
- byte[] buffer = out.toByteArray();
- writeOut.close();
-
- super.javaToNative(buffer, transferData);
-
- } catch (IOException e) {
- }
- }
-}
-public Object nativeToJava(TransferData transferData){
-
- if (isSupportedType(transferData)) {
-
- byte[] buffer = (byte[])super.nativeToJava(transferData);
- if (buffer == null) return null;
-
- MyType[] myData = new MyType[0];
- try {
- ByteArrayInputStream in = new ByteArrayInputStream(buffer);
- DataInputStream readIn = new DataInputStream(in);
- while(readIn.available() > 20) {
- MyType datum = new MyType();
- int size = readIn.readInt();
- byte[] name = new byte[size];
- readIn.read(name);
- datum.fileName = new String(name);
- datum.fileLength = readIn.readLong();
- datum.lastModified = readIn.readLong();
- MyType[] newMyData = new MyType[myData.length + 1];
- System.arraycopy(myData, 0, newMyData, 0, myData.length);
- newMyData[myData.length] = datum;
- myData = newMyData;
- }
- readIn.close();
- } catch (IOException ex) {
- return null;
- }
- return myData;
- }
-
- return null;
-}
-protected String[] getTypeNames(){
- return new String[]{MYTYPENAME};
-}
-protected int[] getTypeIds(){
- return new int[] {MYTYPEID};
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet8.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet8.java
deleted file mode 100644
index 59f54da6be..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet8.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * Tree example snippet: create a tree (lazy)
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.widgets.*;
-
-import java.io.*;
-
-public class Snippet8 {
-
-public static void main (String [] args) {
- final Display display = new Display ();
- final Shell shell = new Shell (display);
- shell.setText ("Lazy Tree");
- shell.setLayout (new FillLayout ());
- final Tree tree = new Tree (shell, SWT.BORDER);
- File [] roots = File.listRoots ();
- for (int i=0; i<roots.length; i++) {
- TreeItem root = new TreeItem (tree, 0);
- root.setText (roots [i].toString ());
- root.setData (roots [i]);
- new TreeItem (root, 0);
- }
- tree.addListener (SWT.Expand, new Listener () {
- public void handleEvent (final Event event) {
- final TreeItem root = (TreeItem) event.item;
- TreeItem [] items = root.getItems ();
- for (int i= 0; i<items.length; i++) {
- if (items [i].getData () != null) return;
- items [i].dispose ();
- }
- File file = (File) root.getData ();
- File [] files = file.listFiles ();
- if (files == null) return;
- for (int i= 0; i<files.length; i++) {
- TreeItem item = new TreeItem (root, 0);
- item.setText (files [i].getName ());
- item.setData (files [i]);
- if (files [i].isDirectory()) {
- new TreeItem (item, 0);
- root.setExpanded (false);
- }
- }
- }
- });
- Point size = tree.computeSize (300, SWT.DEFAULT);
- int width = Math.max (300, size.x);
- int height = Math.max (300, size.y);
- shell.setSize (shell.computeSize (width, height));
- shell.open ();
- while (!shell.isDisposed ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose ();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet80.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet80.java
deleted file mode 100644
index 15aa03cf57..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet80.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * Tree example snippet: limit selection to items that match a pattern
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet80 {
-
-public static void main(String[] args) {
- final Display display = new Display();
- final Shell shell = new Shell(display);
- shell.setLayout(new FillLayout());
- final Tree tree = new Tree(shell, SWT.BORDER | SWT.MULTI);
- for (int i = 0; i < 2; i++) {
- TreeItem item = new TreeItem(tree, SWT.NONE);
- item.setText("item " + i);
- for (int j = 0; j < 2; j++) {
- TreeItem subItem = new TreeItem(item, SWT.NONE);
- subItem.setText("item " + j);
- for (int k = 0; k < 2; k++) {
- TreeItem subsubItem = new TreeItem(subItem, SWT.NONE);
- subsubItem.setText("item " + k);
- }
- }
- }
-
- tree.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- TreeItem[] selection = tree.getSelection();
- TreeItem[] revisedSelection = new TreeItem[0];
- for (int i = 0; i < selection.length; i++) {
- String text = selection[i].getText();
- if (text.indexOf("1") > 0) {
- TreeItem[] newSelection = new TreeItem[revisedSelection.length + 1];
- System.arraycopy(revisedSelection, 0, newSelection, 0, revisedSelection.length);
- newSelection[revisedSelection.length] = selection[i];
- revisedSelection = newSelection;
- }
- }
- tree.setSelection(revisedSelection);
- }
- });
-
- shell.setSize(300, 300);
- shell.open();
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch())
- display.sleep();
- }
- display.dispose();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet81.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet81.java
deleted file mode 100644
index ce49638e32..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet81.java
+++ /dev/null
@@ -1,149 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * OLE and ActiveX example snippet: browse the typelibinfo for a program id
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.internal.ole.win32.*;
-import org.eclipse.swt.ole.win32.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet81 {
-
-public static void main(String[] args) {
-
- if (args.length == 0) {
- System.out.println("Usage: java Main <program id>");
- return;
- }
-
- String progID = args[0];
-
- Shell shell = new Shell();
-
- OleFrame frame = new OleFrame(shell, SWT.NONE);
- OleControlSite site = null;
- OleAutomation auto = null;
- try {
- site = new OleControlSite(frame, SWT.NONE, progID);
- auto = new OleAutomation(site);
- } catch (SWTException ex) {
- System.out.println("Unable to open type library for "+progID);
- return;
- }
-
- TYPEATTR typeattr = auto.getTypeInfoAttributes();
- if (typeattr != null) {
- if (typeattr.cFuncs > 0) System.out.println("Functions for "+progID+" :\n");
- for (int i = 0; i < typeattr.cFuncs; i++) {
- OleFunctionDescription data = auto.getFunctionDescription(i);
- String argList = "";
- int firstOptionalArgIndex = data.args.length - data.optionalArgCount;
- for (int j = 0; j < data.args.length; j++) {
- argList += "[";
- if (j >= firstOptionalArgIndex) argList += "optional, ";
- argList += getDirection(data.args[j].flags)+"] "+getTypeName(data.args[j].type)+" "+data.args[j].name;
- if ( j < data.args.length - 1) argList += ", ";
- }
- System.out.println(getInvokeKind(data.invokeKind)+" (id = "+data.id+") : "
- +"\n\tSignature : "+getTypeName(data.returnType)+" "+data.name+"("+argList+")"
- +"\n\tDescription : "+data.documentation
- +"\n\tHelp File : "+data.helpFile+"\n");
- }
-
- if (typeattr.cVars > 0) System.out.println("\n\nVariables for "+progID+" :\n");
- for (int i = 0; i < typeattr.cVars; i++) {
- OlePropertyDescription data = auto.getPropertyDescription(i);
- System.out.println("PROPERTY (id = "+data.id+") :"
- +"\n\tName : "+data.name
- +"\n\tType : "+getTypeName(data.type)+"\n");
- }
- }
-
- auto.dispose();
- shell.dispose();
-
-}
-private static String getTypeName(int type) {
- switch (type) {
- case OLE.VT_BOOL : return "boolean";
- case OLE.VT_R4 : return "float";
- case OLE.VT_R8 : return "double";
- case OLE.VT_I4 : return "int";
- case OLE.VT_DISPATCH : return "IDispatch";
- case OLE.VT_UNKNOWN : return "IUnknown";
- case OLE.VT_I2 : return "short";
- case OLE.VT_BSTR : return "String";
- case OLE.VT_VARIANT : return "Variant";
- case OLE.VT_CY : return "Currency";
- case OLE.VT_DATE : return "Date";
- case OLE.VT_UI1 : return "unsigned char";
- case OLE.VT_UI4 : return "unsigned int";
- case OLE.VT_USERDEFINED : return "UserDefined";
- case OLE.VT_HRESULT : return "int";
- case OLE.VT_VOID : return "void";
-
- case OLE.VT_BYREF | OLE.VT_BOOL : return "boolean *";
- case OLE.VT_BYREF | OLE.VT_R4 : return "float *";
- case OLE.VT_BYREF | OLE.VT_R8 : return "double *";
- case OLE.VT_BYREF | OLE.VT_I4 : return "int *";
- case OLE.VT_BYREF | OLE.VT_DISPATCH : return "IDispatch *";
- case OLE.VT_BYREF | OLE.VT_UNKNOWN : return "IUnknown *";
- case OLE.VT_BYREF | OLE.VT_I2 : return "short *";
- case OLE.VT_BYREF | OLE.VT_BSTR : return "String *";
- case OLE.VT_BYREF | OLE.VT_VARIANT : return "Variant *";
- case OLE.VT_BYREF | OLE.VT_CY : return "Currency *";
- case OLE.VT_BYREF | OLE.VT_DATE : return "Date *";
- case OLE.VT_BYREF | OLE.VT_UI1 : return "unsigned char *";
- case OLE.VT_BYREF | OLE.VT_UI4 : return "unsigned int *";
- case OLE.VT_BYREF | OLE.VT_USERDEFINED : return "UserDefined *";
- }
- return "unknown "+ type;
-}
-private static String getDirection(int direction){
- String dirString = "";
- boolean comma = false;
- if ((direction & OLE.IDLFLAG_FIN) != 0) {
- dirString += "in";
- comma = true;
- }
- if ((direction & OLE.IDLFLAG_FOUT) != 0){
- if (comma) dirString += ", ";
- dirString += "out";
- comma = true;
- }
- if ((direction & OLE.IDLFLAG_FLCID) != 0){
- if (comma) dirString += ", ";
- dirString += "lcid";
- comma = true;
- }
- if ((direction & OLE.IDLFLAG_FRETVAL) != 0){
- if (comma) dirString += ", ";
- dirString += "retval";
- }
-
- return dirString;
-}
-private static String getInvokeKind(int invKind) {
- switch (invKind) {
- case OLE.INVOKE_FUNC : return "METHOD";
- case OLE.INVOKE_PROPERTYGET : return "PROPERTY GET";
- case OLE.INVOKE_PROPERTYPUT : return "PROPERTY PUT";
- case OLE.INVOKE_PROPERTYPUTREF : return "PROPERTY PUT BY REF";
- }
- return "unknown "+invKind;
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet82.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet82.java
deleted file mode 100644
index aff7291240..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet82.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * CTabFolder example snippet: prevent an item from closing
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.custom.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet82 {
-
-public static void main(String[] args) {
- Display display = new Display();
- Shell shell = new Shell(display);
- shell.setLayout(new FillLayout());
- CTabFolder folder = new CTabFolder(shell, SWT.CLOSE);
- for (int i = 0; i < 4; i++) {
- CTabItem item = new CTabItem(folder, SWT.NONE);
- item.setText("Item "+i);
- Text text = new Text(folder, SWT.BORDER | SWT.MULTI);
- text.setText("Content for Item "+i);
- item.setControl(text);
- }
-
- final CTabItem specialItem = new CTabItem(folder, SWT.NONE);
- specialItem.setText("Don't Close Me");
- Text text = new Text(folder, SWT.BORDER | SWT.MULTI);
- text.setText("This tab can never be closed");
- specialItem.setControl(text);
-
- folder.addCTabFolder2Listener(new CTabFolder2Adapter() {
- public void close(CTabFolderEvent event) {
- if (event.item.equals(specialItem)) {
- event.doit = false;
- }
- }
- });
- shell.setSize(400, 400);
- shell.open();
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch())
- display.sleep();
- }
- display.dispose();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet83.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet83.java
deleted file mode 100644
index d8618eee68..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet83.java
+++ /dev/null
@@ -1,153 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * Drag and Drop example snippet: determine data types available (win32 only)
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.dnd.*;
-import org.eclipse.swt.internal.ole.win32.*;
-import org.eclipse.swt.internal.win32.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet83 extends ByteArrayTransfer {
-
-private static Snippet83 _instance = new Snippet83();
-private int[] ids;
-private String[] names;
-
-public static void main(String[] args) {
- Display display = new Display();
- Shell shell = new Shell(display);
- shell.setLayout(new FillLayout());
- Canvas canvas = new Canvas(shell, SWT.NONE);
- DropTarget target = new DropTarget(canvas, DND.DROP_DEFAULT | DND.DROP_LINK);
- target.setTransfer(new Transfer[] {Snippet83.getInstance()});
- target.addDropListener(new DropTargetAdapter() {
- public void dragEnter(DropTargetEvent event) {
- String ops = null;
- if ((event.operations & DND.DROP_COPY) != 0) ops += "Copy;";
- if ((event.operations & DND.DROP_MOVE) != 0) ops += "Move;";
- if ((event.operations & DND.DROP_LINK) != 0) ops += "Link;";
- System.out.println("Allowed Operations are "+ops);
-
- TransferData[] data = event.dataTypes;
- for (int i = 0; i < data.length; i++) {
- int id = data[i].type;
- String name = getNameFromId(id);
- System.out.println("Data type is "+id+" "+name);
- }
- }
- });
-
- shell.setSize(400, 400);
- shell.open();
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch())
- display.sleep();
- }
- display.dispose();
-}
-
-public static Snippet83 getInstance () {
- return _instance;
-}
-Snippet83() {
- ids = new int[50000];
- names = new String[50000];
- for (int i = 0; i < ids.length; i++) {
- ids[i] = i;
- names[i] = getNameFromId(i);
- }
-}
-public void javaToNative (Object object, TransferData transferData) {
-}
-public Object nativeToJava(TransferData transferData){
- return "Hello World";
-}
-protected String[] getTypeNames(){
- return names;
-}
-protected int[] getTypeIds(){
- return ids;
-}
-static String getNameFromId(int id) {
- String name = null;
- int maxSize = 128;
- TCHAR buffer = new TCHAR(0, maxSize);
- int size = COM.GetClipboardFormatName(id, buffer, maxSize);
- String type = null;
- if (size != 0) {
- name = buffer.toString(0, size);
- } else {
- switch (id) {
- case COM.CF_HDROP:
- name = "CF_HDROP";
- break;
- case COM.CF_TEXT:
- name = "CF_TEXT";
- break;
- case COM.CF_BITMAP:
- name = "CF_BITMAP";
- break;
- case COM.CF_METAFILEPICT:
- name = "CF_METAFILEPICT";
- break;
- case COM.CF_SYLK:
- name = "CF_SYLK";
- break;
- case COM.CF_DIF:
- name = "CF_DIF";
- break;
- case COM.CF_TIFF:
- name = "CF_TIFF";
- break;
- case COM.CF_OEMTEXT:
- name = "CF_OEMTEXT";
- break;
- case COM.CF_DIB:
- name = "CF_DIB";
- break;
- case COM.CF_PALETTE:
- name = "CF_PALETTE";
- break;
- case COM.CF_PENDATA:
- name = "CF_PENDATA";
- break;
- case COM.CF_RIFF:
- name = "CF_RIFF";
- break;
- case COM.CF_WAVE:
- name = "CF_WAVE";
- break;
- case COM.CF_UNICODETEXT:
- name = "CF_UNICODETEXT";
- break;
- case COM.CF_ENHMETAFILE:
- name = "CF_ENHMETAFILE";
- break;
- case COM.CF_LOCALE:
- name = "CF_LOCALE";
- break;
- case COM.CF_MAX:
- name = "CF_MAX";
- break;
- }
-
- }
- return name;
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet84.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet84.java
deleted file mode 100644
index 03c67e1278..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet84.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * Drag and Drop example snippet: define a default operation (in this example, Copy)
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.dnd.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet84 {
-
-public static void main(String[] args) {
- Display display = new Display();
- Shell shell = new Shell(display);
- shell.setLayout(new FillLayout());
- final Text text = new Text(shell, SWT.BORDER | SWT.MULTI);
- DropTarget target = new DropTarget(text, DND.DROP_DEFAULT | DND.DROP_COPY);
- target.setTransfer(new Transfer[] {TextTransfer.getInstance()});
- target.addDropListener(new DropTargetAdapter() {
- public void dragEnter(DropTargetEvent event) {
- if (event.detail == DND.DROP_DEFAULT) event.detail = DND.DROP_COPY;
- }
- public void dragOperationChanged(DropTargetEvent event) {
- if (event.detail == DND.DROP_DEFAULT) event.detail = DND.DROP_COPY;
- }
- public void drop(DropTargetEvent event) {
- text.setText((String)event.data);
- }
- });
-
- shell.setSize(400, 400);
- shell.open();
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch())
- display.sleep();
- }
- display.dispose();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet85.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet85.java
deleted file mode 100644
index eb6abfd7f7..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet85.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * PocketPC example snippet: Hello World
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet85 {
-
-public static void main(String[] args) {
- Display display = new Display();
-
- /*
- * Create a Shell with the default style
- * i.e. full screen, no decoration on PocketPC.
- */
- Shell shell = new Shell(display);
-
- /*
- * Set a text so that the top level Shell
- * also appears in the PocketPC task list
- */
- shell.setText("Main");
-
- /*
- * Set a menubar to follow UI guidelines
- * on PocketPC
- */
- Menu mb = new Menu(shell, SWT.BAR);
- shell.setMenuBar(mb);
-
- shell.open();
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch())
- display.sleep();
- }
- display.dispose();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet86.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet86.java
deleted file mode 100644
index 74b30bb231..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet86.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * PocketPC Shell example snippet: 'Ok' button
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet86 {
-
-public static void main(String[] args) {
- Display display = new Display();
- Shell shell = new Shell(display, SWT.CLOSE);
- shell.setText("Main");
- Menu mb = new Menu(shell, SWT.BAR);
- shell.setMenuBar(mb);
- shell.open();
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch())
- display.sleep();
- }
- display.dispose();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet87.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet87.java
deleted file mode 100644
index a829f08f76..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet87.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * PocketPC Shell example snippet: resize automatically as SIP is on or off
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.layout.*;
-
-public class Snippet87 {
-
-public static void main(String[] args) {
- Display display = new Display();
- Shell shell = new Shell(display, SWT.RESIZE);
- shell.setText("Main");
- Menu mb = new Menu(shell, SWT.BAR);
- shell.setMenuBar(mb);
- /* Add a button to make the resize more visual */
- FillLayout layout = new FillLayout();
- shell.setLayout(layout);
- Button button = new Button(shell, SWT.PUSH);
- button.setText("Main");
- shell.open();
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch())
- display.sleep();
- }
- display.dispose();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet88.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet88.java
deleted file mode 100644
index 3b89f60363..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet88.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * TableEditor example snippet: edit the text of a table item (in place)
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.custom.*;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet88 {
-
-public static void main(String[] args) {
- Display display = new Display();
- Shell shell = new Shell(display);
- shell.setLayout(new FillLayout());
- final Table table = new Table(shell, SWT.FULL_SELECTION | SWT.HIDE_SELECTION);
- TableColumn column1 = new TableColumn(table, SWT.NONE);
- TableColumn column2 = new TableColumn(table, SWT.NONE);
- for (int i = 0; i < 10; i++) {
- TableItem item = new TableItem(table, SWT.NONE);
- item.setText(new String[] {"item " + i, "edit this value"});
- }
- column1.pack();
- column2.pack();
-
- final TableEditor editor = new TableEditor(table);
- //The editor must have the same size as the cell and must
- //not be any smaller than 50 pixels.
- editor.horizontalAlignment = SWT.LEFT;
- editor.grabHorizontal = true;
- editor.minimumWidth = 50;
- // editing the second column
- final int EDITABLECOLUMN = 1;
-
- table.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- // Clean up any previous editor control
- Control oldEditor = editor.getEditor();
- if (oldEditor != null) oldEditor.dispose();
-
- // Identify the selected row
- TableItem item = (TableItem)e.item;
- if (item == null) return;
-
- // The control that will be the editor must be a child of the Table
- Text newEditor = new Text(table, SWT.NONE);
- newEditor.setText(item.getText(EDITABLECOLUMN));
- newEditor.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- Text text = (Text)editor.getEditor();
- editor.getItem().setText(EDITABLECOLUMN, text.getText());
- }
- });
- newEditor.selectAll();
- newEditor.setFocus();
- editor.setEditor(newEditor, item, EDITABLECOLUMN);
- }
- });
- shell.setSize(300, 300);
- shell.open();
-
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch())
- display.sleep();
- }
- display.dispose();
-}
-
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet89.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet89.java
deleted file mode 100644
index 011186409a..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet89.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * Menu example snippet: create a menu with radio items
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.events.*;
-
-public class Snippet89 {
-public static void main (String [] args) {
- Display display = new Display ();
- Shell shell = new Shell (display);
- Menu menu = new Menu (shell, SWT.POP_UP);
- for (int i=0; i<4; i++) {
- MenuItem item = new MenuItem (menu, SWT.RADIO);
- item.setText ("Item " + i);
- item.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- MenuItem item = (MenuItem)e.widget;
- if (item.getSelection ()) {
- System.out.println (item + " selected");
- } else {
- System.out.println (item + " unselected");
- }
- }
- });
- }
- shell.setMenu (menu);
- shell.setSize (300, 300);
- shell.open ();
- while (!shell.isDisposed ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose ();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet9.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet9.java
deleted file mode 100644
index 4dae67c730..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet9.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * Composite example snippet: scroll a child control automatically
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet9 {
-
-public static void main (String [] args) {
- Display display = new Display ();
- final Shell shell = new Shell (display, SWT.SHELL_TRIM | SWT.H_SCROLL | SWT.V_SCROLL);
- final Composite composite = new Composite (shell, SWT.BORDER);
- composite.setSize (200, 400);
- final ScrollBar hBar = shell.getHorizontalBar ();
- hBar.addListener (SWT.Selection, new Listener () {
- public void handleEvent (Event e) {
- Point location = composite.getLocation ();
- location.x = -hBar.getSelection ();
- composite.setLocation (location);
- }
- });
- final ScrollBar vBar = shell.getVerticalBar ();
- vBar.addListener (SWT.Selection, new Listener () {
- public void handleEvent (Event e) {
- Point location = composite.getLocation ();
- location.y = -vBar.getSelection ();
- composite.setLocation (location);
- }
- });
- shell.addListener (SWT.Resize, new Listener () {
- public void handleEvent (Event e) {
- Point size = composite.getSize ();
- Rectangle rect = shell.getClientArea ();
- hBar.setMaximum (size.x);
- vBar.setMaximum (size.y);
- hBar.setThumb (Math.min (size.x, rect.width));
- vBar.setThumb (Math.min (size.y, rect.height));
- int hPage = size.x - rect.width;
- int vPage = size.y - rect.height;
- int hSelection = hBar.getSelection ();
- int vSelection = vBar.getSelection ();
- Point location = composite.getLocation ();
- if (hSelection >= hPage) {
- if (hPage <= 0) hSelection = 0;
- location.x = -hSelection;
- }
- if (vSelection >= vPage) {
- if (vPage <= 0) vSelection = 0;
- location.y = -vSelection;
- }
- composite.setLocation (location);
- }
- });
- shell.open ();
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose ();
-}
-
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet90.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet90.java
deleted file mode 100644
index 0511208abb..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet90.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * Tree example snippet: detect mouse down in a tree item
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet90 {
-
-public static void main (String [] args) {
- Display display = new Display ();
- Shell shell = new Shell (display);
- final Tree tree = new Tree (shell, SWT.BORDER | SWT.MULTI);
- for (int i=0; i<12; i++) {
- TreeItem treeItem = new TreeItem (tree, SWT.NULL);
- treeItem.setText ("Item " + i);
- }
- tree.addListener (SWT.MouseDown, new Listener () {
- public void handleEvent (Event event) {
- Point point = new Point (event.x, event.y);
- TreeItem item = tree.getItem (point);
- if (item != null) {
- System.out.println ("Mouse down: " + item);
- }
- }
- });
- tree.setSize (200, 200);
- shell.setSize (300, 300);
- shell.open ();
- while (!shell.isDisposed ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose ();
-}
-
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet91.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet91.java
deleted file mode 100644
index bbc8f6d8f4..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet91.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * Drag and Drop example snippet: drag leaf items in a tree
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.dnd.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet91 {
-
-public static void main (String [] args) {
-
- Display display = Display.getDefault ();
- final Shell shell = new Shell (display);
- shell.setLayout(new FillLayout());
- final Tree tree = new Tree(shell, SWT.BORDER);
- for (int i = 0; i < 3; i++) {
- TreeItem item = new TreeItem(tree, SWT.NONE);
- item.setText("item "+i);
- for (int j = 0; j < 3; j++) {
- TreeItem subItem = new TreeItem(item, SWT.NONE);
- subItem.setText("item "+i+" "+j);
- for (int k = 0; k < 3; k++) {
- TreeItem subsubItem = new TreeItem(subItem, SWT.NONE);
- subsubItem.setText("item "+i+" "+j+" "+k);
- }
- }
- }
-
- Transfer[] types = new Transfer[] {TextTransfer.getInstance()};
- int operations = DND.DROP_MOVE | DND.DROP_COPY | DND.DROP_LINK;
-
- final DragSource source = new DragSource (tree, operations);
- source.setTransfer(types);
- final TreeItem[] dragSourceItem = new TreeItem[1];
- source.addDragListener (new DragSourceListener () {
- public void dragStart(DragSourceEvent event) {
- TreeItem[] selection = tree.getSelection();
- if (selection.length > 0 && selection[0].getItemCount() == 0) {
- event.doit = true;
- dragSourceItem[0] = selection[0];
- } else {
- event.doit = false;
- }
- };
- public void dragSetData (DragSourceEvent event) {
- event.data = dragSourceItem[0].getText();
- }
- public void dragFinished(DragSourceEvent event) {
- if (event.detail == DND.DROP_MOVE)
- dragSourceItem[0].dispose();
- dragSourceItem[0] = null;
- }
- });
-
- DropTarget target = new DropTarget(tree, operations);
- target.setTransfer(types);
- target.addDropListener (new DropTargetAdapter() {
- public void dragOver(DropTargetEvent event) {
- event.feedback = DND.FEEDBACK_EXPAND | DND.FEEDBACK_SCROLL | DND.FEEDBACK_SELECT;
- }
- public void drop(DropTargetEvent event) {
- if (event.data == null) {
- event.detail = DND.DROP_NONE;
- return;
- }
- String text = (String)event.data;
- if (event.item == null) {
- TreeItem item = new TreeItem(tree, SWT.NONE);
- item.setText(text);
- } else {
- TreeItem parent = (TreeItem)event.item;
- TreeItem item = new TreeItem(parent, SWT.NONE);
- item.setText(text);
- }
- }
- });
-
- shell.setSize (400, 400);
- shell.open ();
- while (!shell.isDisposed ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose ();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet92.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet92.java
deleted file mode 100644
index 1dbd768fd1..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet92.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * Cursor example snippet: create a cursor from a source and a mask
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet92 {
-
-public static void main (String [] args) {
- Display display = new Display();
- Color white = display.getSystemColor (SWT.COLOR_WHITE);
- Color black = display.getSystemColor (SWT.COLOR_BLACK);
-
- //Create a source ImageData of depth 1 (monochrome)
- PaletteData palette = new PaletteData (new RGB [] {white.getRGB(), black.getRGB(),});
- ImageData sourceData = new ImageData (20, 20, 1, palette);
- for (int i = 0; i < 10; i ++) {
- for (int j = 0; j < 20; j++) {
- sourceData.setPixel(i, j, 1);
- }
- }
-
- //Create a mask ImageData of depth 1 (monochrome)
- palette = new PaletteData (new RGB [] {white.getRGB(), black.getRGB(),});
- ImageData maskData = new ImageData (20, 20, 1, palette);
- for (int i = 0; i < 20; i ++) {
- for (int j = 0; j < 10; j++) {
- maskData.setPixel(i, j, 1);
- }
- }
- //Create cursor
- Cursor cursor = new Cursor(display, sourceData, maskData, 10, 10);
-
- Shell shell = new Shell(display);
- final Image source = new Image (display,sourceData);
- final Image mask = new Image (display, maskData);
- //Draw source and mask just to show what they look like
- shell.addPaintListener(new PaintListener() {
- public void paintControl(PaintEvent e) {
- GC gc = e.gc;
- gc.drawString("source: ", 10, 10);
- gc.drawImage(source, 0, 0, 20, 20, 50, 10, 20, 20);
- gc.drawString("mask: ",10, 40);
- gc.drawImage(mask, 0, 0, 20, 20, 50, 40, 20, 20);
- }
- });
- shell.setSize(150, 150);
- shell.open();
- shell.setCursor(cursor);
-
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch())
- display.sleep();
- }
- cursor.dispose();
- source.dispose();
- mask.dispose();
- display.dispose();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet93.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet93.java
deleted file mode 100644
index 617182fe06..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet93.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * GC example snippet: measure a string
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.layout.*;
-
-public class Snippet93 {
-
-public static void main (String [] args) {
- Display display = new Display ();
- Shell shell = new Shell (display);
- shell.setLayout (new RowLayout ());
- Label label = new Label (shell, SWT.NULL);
- GC gc = new GC (label);
- Point size = gc.textExtent ("Hello");
- gc.dispose ();
- label.setText ("Hello -> " + size);
- shell.pack ();
- shell.open ();
- while (!shell.isDisposed ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose ();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet94.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet94.java
deleted file mode 100644
index 7ac0764dec..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet94.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * Clipboard example snippet: copy and paste data with the clipboard
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.dnd.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet94 {
-
-public static void main( String[] args) {
- Display display = Display.getDefault ();
- final Clipboard cb = new Clipboard(display);
- final Shell shell = new Shell (display);
- shell.setLayout(new FormLayout());
- final Text text = new Text(shell, SWT.BORDER | SWT.MULTI | SWT.V_SCROLL | SWT.H_SCROLL);
-
- Button copy = new Button(shell, SWT.PUSH);
- copy.setText("Copy");
- copy.addListener (SWT.Selection, new Listener () {
- public void handleEvent (Event e) {
- String textData = text.getSelectionText();
- TextTransfer textTransfer = TextTransfer.getInstance();
- cb.setContents(new Object[]{textData}, new Transfer[]{textTransfer});
- }
- });
-
- Button paste = new Button(shell, SWT.PUSH);
- paste.setText("Paste");
- paste.addListener (SWT.Selection, new Listener () {
- public void handleEvent (Event e) {
- TextTransfer transfer = TextTransfer.getInstance();
- String data = (String)cb.getContents(transfer);
- if (data != null) {
- text.insert(data);
- }
- }
- });
-
- FormData data = new FormData();
- data.right = new FormAttachment(100, -5);
- data.top = new FormAttachment(0, 5);
- copy.setLayoutData(data);
-
- data = new FormData();
- data.right = new FormAttachment(100, -5);
- data.top = new FormAttachment(copy, 5);
- paste.setLayoutData(data);
-
- data = new FormData();
- data.left = new FormAttachment(0, 5);
- data.top = new FormAttachment(0, 5);
- data.right = new FormAttachment(copy, -5);
- data.bottom = new FormAttachment(100, -5);
- text.setLayoutData(data);
-
- shell.setSize(200, 200);
- shell.open();
- while (!shell.isDisposed ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- cb.dispose();
- display.dispose();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet95.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet95.java
deleted file mode 100644
index aa2b627368..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet95.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * GC example snippet: capture a widget image with a GC
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet95 {
-
-public static void main(String[] args) {
- final Display display = new Display();
- final Shell shell = new Shell(display);
- shell.setText("Widget");
- shell.setBounds(10, 10, 200, 200);
-
- final Table table = new Table(shell, SWT.MULTI);
- table.setLinesVisible(true);
- table.setBounds(10, 10, 100, 100);
- for (int i = 0; i < 9; i++) {
- new TableItem(table, SWT.NONE).setText("item" + i);
- }
-
- Button button = new Button(shell, SWT.PUSH);
- button.setText("Capture");
- button.setBounds(10, 140, 50, 20);
- button.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event event) {
- Point tableSize = table.getSize();
- GC gc = new GC(table);
- final Image image =
- new Image(display, tableSize.x, tableSize.y);
- gc.copyArea(image, 0, 0);
- gc.dispose();
-
- Shell popup = new Shell(shell);
- popup.setText("Image");
- popup.setBounds(50, 50, 200, 200);
- popup.addListener(SWT.Close, new Listener() {
- public void handleEvent(Event event) {
- image.dispose();
- }
- });
-
- Canvas canvas = new Canvas(popup, SWT.NONE);
- canvas.setBounds(10, 10, 150, 150);
- canvas.addPaintListener(new PaintListener() {
- public void paintControl(PaintEvent e) {
- e.gc.drawImage(image, 0, 0);
- }
- });
- popup.open();
- }
- });
-
- shell.open();
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch()) display.sleep();
- }
- display.dispose();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet96.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet96.java
deleted file mode 100644
index d6688c0658..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet96.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * TableCursor example snippet: navigate a table cells with arrow keys.
- * Edit when user hits Return key. Exit edit mode by hitting Escape (cancels edit)
- * or Return (applies edit to table).
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.custom.*;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet96 {
-
-public static void main(String[] args) {
- Display display = new Display();
- Shell shell = new Shell(display);
- shell.setLayout(new GridLayout());
-
- // create a a table with 3 columns and fill with data
- final Table table = new Table(shell, SWT.BORDER | SWT.MULTI | SWT.FULL_SELECTION);
- table.setLayoutData(new GridData(GridData.FILL_BOTH));
- TableColumn column1 = new TableColumn(table, SWT.NONE);
- TableColumn column2 = new TableColumn(table, SWT.NONE);
- TableColumn column3 = new TableColumn(table, SWT.NONE);
- for (int i = 0; i < 100; i++) {
- TableItem item = new TableItem(table, SWT.NONE);
- item.setText(new String[] {"cell " + i + " 0", "cell " + i + " 1", "cell " + i + " 2" });
- }
- column1.pack();
- column2.pack();
- column3.pack();
-
- // create a TableCursor to navigate around the table
- final TableCursor cursor = new TableCursor(table, SWT.NONE);
- // create an editor to edit the cell when the user hits "ENTER"
- // while over a cell in the table
- final ControlEditor editor = new ControlEditor(cursor);
- editor.grabHorizontal = true;
- editor.grabVertical = true;
-
- cursor.addSelectionListener(new SelectionAdapter() {
- // when the TableEditor is over a cell, select the corresponding row in
- // the table
- public void widgetSelected(SelectionEvent e) {
- table.setSelection(new TableItem[] { cursor.getRow()});
- }
- // when the user hits "ENTER" in the TableCursor, pop up a text editor so that
- // they can change the text of the cell
- public void widgetDefaultSelected(SelectionEvent e) {
- final Text text = new Text(cursor, SWT.NONE);
- TableItem row = cursor.getRow();
- int column = cursor.getColumn();
- text.setText(row.getText(column));
- text.addKeyListener(new KeyAdapter() {
- public void keyPressed(KeyEvent e) {
- // close the text editor and copy the data over
- // when the user hits "ENTER"
- if (e.character == SWT.CR) {
- TableItem row = cursor.getRow();
- int column = cursor.getColumn();
- row.setText(column, text.getText());
- text.dispose();
- }
- // close the text editor when the user hits "ESC"
- if (e.character == SWT.ESC) {
- text.dispose();
- }
- }
- });
- editor.setEditor(text);
- text.setFocus();
- }
- });
- // Hide the TableCursor when the user hits the "CTRL" or "SHIFT" key.
- // This alows the user to select multiple items in the table.
- cursor.addKeyListener(new KeyAdapter() {
- public void keyPressed(KeyEvent e) {
- if (e.keyCode == SWT.CTRL
- || e.keyCode == SWT.SHIFT
- || (e.stateMask & SWT.CONTROL) != 0
- || (e.stateMask & SWT.SHIFT) != 0) {
- cursor.setVisible(false);
- }
- }
- });
- // Show the TableCursor when the user releases the "SHIFT" or "CTRL" key.
- // This signals the end of the multiple selection task.
- table.addKeyListener(new KeyAdapter() {
- public void keyReleased(KeyEvent e) {
- if (e.keyCode == SWT.CONTROL && (e.stateMask & SWT.SHIFT) != 0)
- return;
- if (e.keyCode == SWT.SHIFT && (e.stateMask & SWT.CONTROL) != 0)
- return;
- if (e.keyCode != SWT.CONTROL
- && (e.stateMask & SWT.CONTROL) != 0)
- return;
- if (e.keyCode != SWT.SHIFT && (e.stateMask & SWT.SHIFT) != 0)
- return;
-
- TableItem[] selection = table.getSelection();
- TableItem row = (selection.length == 0) ? table.getItem(table.getTopIndex()) : selection[0];
- table.showItem(row);
- cursor.setSelection(row, 0);
- cursor.setVisible(true);
- cursor.setFocus();
- }
- });
-
- shell.open();
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch())
- display.sleep();
- }
- display.dispose();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet97.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet97.java
deleted file mode 100644
index 2fdbc59df6..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet97.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * Menu example snippet: fill a menu dynamically (when menu shown)
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet97 {
-
-public static void main (String [] args) {
- final Display display = new Display ();
- Shell shell = new Shell (display);
- final Tree tree = new Tree (shell, SWT.BORDER | SWT.MULTI);
- final Menu menu = new Menu (shell, SWT.POP_UP);
- tree.setMenu (menu);
- for (int i=0; i<12; i++) {
- TreeItem item = new TreeItem (tree, SWT.NULL);
- item.setText ("Item " + i);
- }
- menu.addListener (SWT.Show, new Listener () {
- public void handleEvent (Event event) {
- MenuItem [] menuItems = menu.getItems ();
- for (int i=0; i<menuItems.length; i++) {
- menuItems [i].dispose ();
- }
- TreeItem [] treeItems = tree.getSelection ();
- for (int i=0; i<treeItems.length; i++) {
- MenuItem menuItem = new MenuItem (menu, SWT.PUSH);
- menuItem.setText (treeItems [i].getText ());
- }
- }
- });
- tree.setSize (200, 200);
- shell.setSize (300, 300);
- shell.open ();
- while (!shell.isDisposed ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose ();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet98.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet98.java
deleted file mode 100644
index 8bcdadc87c..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet98.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * Composite example snippet: create and dispose children of a composite
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet98 {
-
-static int pageNum = 0;
-static Composite pageComposite;
-
-public static void main(String args[]) {
- Display display = new Display();
- final Shell shell = new Shell(display);
- shell.setLayout(new GridLayout());
- Button button = new Button(shell, SWT.PUSH);
- button.setText("Push");
- pageComposite = new Composite(shell, SWT.NONE);
- pageComposite.setLayout(new GridLayout());
- pageComposite.setLayoutData(new GridData());
-
- button.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event event) {
- if ((pageComposite != null) && (!pageComposite.isDisposed())) {
- pageComposite.dispose();
- }
- pageComposite = new Composite(shell, SWT.NONE);
- pageComposite.setLayout(new GridLayout());
- pageComposite.setLayoutData(new GridData());
- if (pageNum++ % 2 == 0) {
- Table table = new Table(pageComposite, SWT.BORDER);
- table.setLayoutData(new GridData());
- for (int i = 0; i < 5; i++) {
- new TableItem(table, SWT.NONE).setText("table item " + i);
- }
- } else {
- new Button(pageComposite, SWT.RADIO).setText("radio");
- }
- shell.layout(true);
- }
- });
-
- shell.open();
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch())
- display.sleep();
- }
- display.dispose();
-}
-}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet99.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet99.java
deleted file mode 100644
index cefcdb6101..0000000000
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet99.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.snippets;
-
-/*
- * Shell example snippet: prevent a shell from closing (prompt the user)
- *
- * For a list of all SWT example snippets see
- * http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html#snippets
- */
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-
-public class Snippet99 {
-
-public static void main (String [] args) {
- Display display = new Display ();
- final Shell shell = new Shell (display);
- shell.addListener (SWT.Close, new Listener () {
- public void handleEvent (Event event) {
- int style = SWT.APPLICATION_MODAL | SWT.YES | SWT.NO;
- MessageBox messageBox = new MessageBox (shell, style);
- messageBox.setText ("Information");
- messageBox.setMessage ("Close the shell?");
- event.doit = messageBox.open () == SWT.YES;
- }
- });
- shell.pack ();
- shell.open();
- while (!shell.isDisposed ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose ();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/.classpath b/tests/org.eclipse.swt.tests/.classpath
deleted file mode 100644
index 94b121f7f3..0000000000
--- a/tests/org.eclipse.swt.tests/.classpath
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="JUnit Tests/"/>
- <classpathentry kind="src" path="data"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/tests/org.eclipse.swt.tests/.cvsignore b/tests/org.eclipse.swt.tests/.cvsignore
deleted file mode 100644
index c5e82d7458..0000000000
--- a/tests/org.eclipse.swt.tests/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin \ No newline at end of file
diff --git a/tests/org.eclipse.swt.tests/.project b/tests/org.eclipse.swt.tests/.project
deleted file mode 100644
index aa88cfea6f..0000000000
--- a/tests/org.eclipse.swt.tests/.project
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.swt.tests</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/AllBrowserTests.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/AllBrowserTests.java
deleted file mode 100644
index 1fc5617e60..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/AllBrowserTests.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Suite for testing all of the graphics test cases.
- */
-public class AllBrowserTests {
-
-public static void main(String[] args) {
- TestRunner.run (suite());
-}
-public static Test suite() {
- TestSuite suite = new TestSuite();
- suite.addTest(Test_org_eclipse_swt_browser_Browser.suite());
- suite.addTest(Test_org_eclipse_swt_browser_CloseWindowListener.suite());
- suite.addTest(Test_org_eclipse_swt_browser_LocationAdapter.suite());
- suite.addTest(Test_org_eclipse_swt_browser_LocationListener.suite());
- suite.addTest(Test_org_eclipse_swt_browser_OpenWindowListener.suite());
- suite.addTest(Test_org_eclipse_swt_browser_ProgressAdapter.suite());
- suite.addTest(Test_org_eclipse_swt_browser_ProgressListener.suite());
- suite.addTest(Test_org_eclipse_swt_browser_StatusTextListener.suite());
- suite.addTest(Test_org_eclipse_swt_browser_TitleListener.suite());
- suite.addTest(Test_org_eclipse_swt_browser_VisibilityWindowAdapter.suite());
- suite.addTest(Test_org_eclipse_swt_browser_VisibilityWindowListener.suite());
- suite.addTest(org.eclipse.swt.tests.junit.browser.Test_BrowserSuite.suite());
-
- return suite;
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/AllGraphicsTests.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/AllGraphicsTests.java
deleted file mode 100644
index ef013c9906..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/AllGraphicsTests.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Suite for testing all of the graphics test cases.
- */
-public class AllGraphicsTests {
-public static void main(String[] args) {
- TestRunner.run (suite());
-}
-public static Test suite() {
- TestSuite suite = new TestSuite();
-
- suite.addTest(Test_org_eclipse_swt_graphics_Color.suite());
- suite.addTest(Test_org_eclipse_swt_graphics_Cursor.suite());
- suite.addTest(Test_org_eclipse_swt_graphics_DeviceData.suite());
- suite.addTest(Test_org_eclipse_swt_graphics_Font.suite());
- suite.addTest(Test_org_eclipse_swt_graphics_FontData.suite());
- suite.addTest(Test_org_eclipse_swt_graphics_FontMetrics.suite());
- suite.addTest(Test_org_eclipse_swt_graphics_GC.suite());
- suite.addTest(Test_org_eclipse_swt_graphics_GCData.suite());
- suite.addTest(Test_org_eclipse_swt_graphics_Image.suite());
- suite.addTest(Test_org_eclipse_swt_graphics_ImageData.suite());
- suite.addTest(Test_org_eclipse_swt_graphics_PaletteData.suite());
- suite.addTest(Test_org_eclipse_swt_graphics_Point.suite());
- suite.addTest(Test_org_eclipse_swt_graphics_Rectangle.suite());
- suite.addTest(Test_org_eclipse_swt_graphics_Region.suite());
- suite.addTest(Test_org_eclipse_swt_graphics_RGB.suite());
-
-
- suite.addTest(Test_org_eclipse_swt_graphics_ImageLoader.suite());
- suite.addTest(Test_org_eclipse_swt_graphics_ImageLoaderEvent.suite());
-
- return suite;
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/AllTests.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/AllTests.java
deleted file mode 100644
index 423c1ed84d..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/AllTests.java
+++ /dev/null
@@ -1,229 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Suite for running all SWT test cases.
- */
-public class AllTests extends TestSuite {
-
-public static void main(String[] args) {
- SwtTestCase.unimplementedMethods = 0;
- TestRunner.run(suite());
- if (SwtTestCase.unimplementedMethods > 0) {
- System.out.println("\nCalls to warnUnimpl: " + SwtTestCase.unimplementedMethods);
- }
-}
-public static Test suite() {
- return new AllTests();
-}
-
-public AllTests() {
- super();
- /* The logical order to run the tests in is:
- * - SWT, SWTError, SWTException
- * - Display
- * - graphics classes
- * - items and Caret, etc
- * - widgets
- * - dialogs
- * - layout
- * - custom widgets
- * - printing and program
- * - events
- * - drag & drop
- * - accessibility
- * - OLE
- * - browser
- */
- addTest(Test_org_eclipse_swt_SWT.suite());
- addTest(Test_org_eclipse_swt_SWTException.suite());
- addTest(Test_org_eclipse_swt_SWTError.suite());
-
- /* NOTE: If the Display test suite is run, it must be run
- * before any other tests that need a display (i.e. graphics
- * or widget tests, etc). Otherwise, an InvalidThreadAccess
- * exception will be thrown for each Display test.
- */
- addTest(Test_org_eclipse_swt_widgets_Display.suite());
-
- addTest(Test_org_eclipse_swt_graphics_Image.suite());
- addTest(Test_org_eclipse_swt_graphics_Cursor.suite());
- addTest(Test_org_eclipse_swt_graphics_DeviceData.suite());
- addTest(Test_org_eclipse_swt_graphics_ImageLoaderEvent.suite());
- addTest(Test_org_eclipse_swt_graphics_RGB.suite());
- addTest(Test_org_eclipse_swt_graphics_Font.suite());
- addTest(Test_org_eclipse_swt_graphics_Rectangle.suite());
- addTest(Test_org_eclipse_swt_graphics_FontData.suite());
- addTest(Test_org_eclipse_swt_graphics_GC.suite());
- addTest(Test_org_eclipse_swt_graphics_ImageData.suite());
- addTest(Test_org_eclipse_swt_graphics_Region.suite());
- addTest(Test_org_eclipse_swt_graphics_GCData.suite());
- addTest(Test_org_eclipse_swt_graphics_FontMetrics.suite());
- addTest(Test_org_eclipse_swt_graphics_Color.suite());
- addTest(Test_org_eclipse_swt_graphics_Point.suite());
- addTest(Test_org_eclipse_swt_graphics_PaletteData.suite());
- addTest(Test_org_eclipse_swt_graphics_ImageLoader.suite());
-
- addTest(Test_org_eclipse_swt_widgets_MenuItem.suite());
- addTest(Test_org_eclipse_swt_widgets_ToolItem.suite());
- //addTest(Test_org_eclipse_swt_widgets_CoolItem.suite());
- addTest(Test_org_eclipse_swt_widgets_TabItem.suite());
- addTest(Test_org_eclipse_swt_widgets_TableItem.suite());
- addTest(Test_org_eclipse_swt_widgets_TableColumn.suite());
- addTest(Test_org_eclipse_swt_widgets_TreeItem.suite());
- addTest(Test_org_eclipse_swt_widgets_Caret.suite());
- addTest(Test_org_eclipse_swt_widgets_Event.suite());
- addTest(Test_org_eclipse_swt_widgets_TypedListener.suite());
- addTest(Test_org_eclipse_swt_widgets_Menu.suite());
- //addTest(Test_org_eclipse_swt_widgets_Tracker.suite());
- addTest(Test_org_eclipse_swt_widgets_Synchronizer.suite());
-
- addTest(Test_org_eclipse_swt_widgets_Shell.suite());
- //addTest(Test_org_eclipse_swt_widgets_Decorations.suite());
- addTest(Test_org_eclipse_swt_widgets_Label.suite());
- addTest(Test_org_eclipse_swt_widgets_Button.suite());
- addTest(Test_org_eclipse_swt_widgets_List.suite());
- addTest(Test_org_eclipse_swt_widgets_Text.suite());
- addTest(Test_org_eclipse_swt_widgets_ScrollBar.suite());
- addTest(Test_org_eclipse_swt_widgets_Sash.suite());
- addTest(Test_org_eclipse_swt_widgets_Tree.suite());
- addTest(Test_org_eclipse_swt_widgets_TabFolder.suite());
- addTest(Test_org_eclipse_swt_widgets_Combo.suite());
- addTest(Test_org_eclipse_swt_widgets_Group.suite());
- addTest(Test_org_eclipse_swt_widgets_ToolBar.suite());
- addTest(Test_org_eclipse_swt_widgets_Table.suite());
- addTest(Test_org_eclipse_swt_widgets_Canvas.suite());
- addTest(Test_org_eclipse_swt_widgets_Scale.suite());
- addTest(Test_org_eclipse_swt_widgets_Slider.suite());
- addTest(Test_org_eclipse_swt_widgets_ProgressBar.suite());
- addTest(Test_org_eclipse_swt_widgets_Composite.suite());
- //addTest(Test_org_eclipse_swt_widgets_CoolBar.suite());
-
- addTest(Test_org_eclipse_swt_widgets_ColorDialog.suite());
- addTest(Test_org_eclipse_swt_widgets_FileDialog.suite());
- addTest(Test_org_eclipse_swt_widgets_DirectoryDialog.suite());
- addTest(Test_org_eclipse_swt_widgets_FontDialog.suite());
- addTest(Test_org_eclipse_swt_widgets_MessageBox.suite());
- addTest(Test_org_eclipse_swt_widgets_Monitor.suite());
- addTest(Test_org_eclipse_swt_layout_GridData.suite());
- addTest(Test_org_eclipse_swt_layout_RowData.suite());
- addTest(Test_org_eclipse_swt_layout_GridLayout.suite());
- addTest(Test_org_eclipse_swt_layout_FillLayout.suite());
- addTest(Test_org_eclipse_swt_layout_RowLayout.suite());
- addTest(Test_org_eclipse_swt_layout_FormLayout.suite());
-
- addTest(Test_org_eclipse_swt_custom_TableTree.suite());
- addTest(Test_org_eclipse_swt_custom_BidiSegmentEvent.suite());
- addTest(Test_org_eclipse_swt_custom_LineBackgroundEvent.suite());
- addTest(Test_org_eclipse_swt_custom_LineStyleEvent.suite());
- addTest(Test_org_eclipse_swt_custom_SashForm.suite());
- addTest(Test_org_eclipse_swt_custom_TableEditor.suite());
- addTest(Test_org_eclipse_swt_custom_AnimatedProgress.suite());
- addTest(Test_org_eclipse_swt_custom_StyleRange.suite());
- addTest(Test_org_eclipse_swt_custom_TextChangedEvent.suite());
- addTest(Test_org_eclipse_swt_custom_StackLayout.suite());
- addTest(Test_org_eclipse_swt_custom_CTabFolderEvent.suite());
- addTest(Test_org_eclipse_swt_custom_ExtendedModifyEvent.suite());
- addTest(Test_org_eclipse_swt_custom_CCombo.suite());
- addTest(Test_org_eclipse_swt_custom_TableTreeItem.suite());
- addTest(Test_org_eclipse_swt_custom_ViewForm.suite());
- addTest(Test_org_eclipse_swt_custom_CTabFolderAdapter.suite());
- addTest(Test_org_eclipse_swt_custom_CLabel.suite());
- addTest(Test_org_eclipse_swt_custom_TableTreeEditor.suite());
- addTest(Test_org_eclipse_swt_custom_TextChangingEvent.suite());
- addTest(Test_org_eclipse_swt_custom_ScrolledComposite.suite());
- addTest(Test_org_eclipse_swt_custom_TreeEditor.suite());
- addTest(Test_org_eclipse_swt_custom_PopupList.suite());
- addTest(Test_org_eclipse_swt_custom_CTabItem.suite());
- addTest(Test_org_eclipse_swt_custom_BusyIndicator.suite());
- addTest(Test_org_eclipse_swt_custom_StyledText.suite());
- addTest(Test_org_eclipse_swt_custom_ControlEditor.suite());
- addTest(Test_org_eclipse_swt_custom_ST.suite());
- addTest(Test_org_eclipse_swt_custom_CTabFolder.suite());
-
- addTest(Test_org_eclipse_swt_events_ControlEvent.suite());
- addTest(Test_org_eclipse_swt_events_ModifyEvent.suite());
- addTest(Test_org_eclipse_swt_events_ArmEvent.suite());
- addTest(Test_org_eclipse_swt_events_ShellEvent.suite());
- addTest(Test_org_eclipse_swt_events_TypedEvent.suite());
- addTest(Test_org_eclipse_swt_events_PaintEvent.suite());
- addTest(Test_org_eclipse_swt_events_VerifyEvent.suite());
- addTest(Test_org_eclipse_swt_events_KeyEvent.suite());
- addTest(Test_org_eclipse_swt_events_TraverseEvent.suite());
- addTest(Test_org_eclipse_swt_events_MouseTrackAdapter.suite());
- addTest(Test_org_eclipse_swt_events_DisposeEvent.suite());
- addTest(Test_org_eclipse_swt_events_SelectionEvent.suite());
- addTest(Test_org_eclipse_swt_events_HelpEvent.suite());
- addTest(Test_org_eclipse_swt_events_FocusEvent.suite());
- addTest(Test_org_eclipse_swt_events_MouseEvent.suite());
- addTest(Test_org_eclipse_swt_events_MenuEvent.suite());
- addTest(Test_org_eclipse_swt_events_TreeEvent.suite());
-
- addTest(Test_org_eclipse_swt_printing_PrintDialog.suite());
- addTest(Test_org_eclipse_swt_printing_PrinterData.suite());
- addTest(Test_org_eclipse_swt_printing_Printer.suite());
-
- addTest(Test_org_eclipse_swt_program_Program.suite());
-
-// addTest(Test_org_eclipse_swt_dnd_FileTransfer.suite());
-// addTest(Test_org_eclipse_swt_dnd_DragSourceAdapter.suite());
-// addTest(Test_org_eclipse_swt_dnd_DropTargetAdapter.suite());
-// addTest(Test_org_eclipse_swt_dnd_TextTransfer.suite());
-// addTest(Test_org_eclipse_swt_dnd_DragSourceEvent.suite());
-// addTest(Test_org_eclipse_swt_dnd_DragSource.suite());
-// addTest(Test_org_eclipse_swt_dnd_DND.suite());
-// addTest(Test_org_eclipse_swt_dnd_TransferData.suite());
-// addTest(Test_org_eclipse_swt_dnd_RTFTransfer.suite());
-// addTest(Test_org_eclipse_swt_dnd_Clipboard.suite());
-// addTest(Test_org_eclipse_swt_dnd_DropTargetEvent.suite());
-// addTest(Test_org_eclipse_swt_dnd_DropTarget.suite());
-
- addTest(Test_org_eclipse_swt_accessibility_ACC.suite());
- addTest(Test_org_eclipse_swt_accessibility_Accessible.suite());
- addTest(Test_org_eclipse_swt_accessibility_AccessibleAdapter.suite());
- addTest(Test_org_eclipse_swt_accessibility_AccessibleControlAdapter.suite());
- addTest(Test_org_eclipse_swt_accessibility_AccessibleControlEvent.suite());
- addTest(Test_org_eclipse_swt_accessibility_AccessibleControlListener.suite());
- addTest(Test_org_eclipse_swt_accessibility_AccessibleEvent.suite());
- addTest(Test_org_eclipse_swt_accessibility_AccessibleListener.suite());
-
- addTest(Test_org_eclipse_swt_ole_win32_OLE.suite());
- addTest(Test_org_eclipse_swt_ole_win32_OleAutomation.suite());
- addTest(Test_org_eclipse_swt_ole_win32_OleClientSite.suite());
- addTest(Test_org_eclipse_swt_ole_win32_OleControlSite.suite());
- addTest(Test_org_eclipse_swt_ole_win32_OleEvent.suite());
- addTest(Test_org_eclipse_swt_ole_win32_OleFrame.suite());
- addTest(Test_org_eclipse_swt_ole_win32_OleFunctionDescription.suite());
- addTest(Test_org_eclipse_swt_ole_win32_OleListener.suite());
- addTest(Test_org_eclipse_swt_ole_win32_OleParameterDescription.suite());
- addTest(Test_org_eclipse_swt_ole_win32_Variant.suite());
-
- addTest(Test_org_eclipse_swt_browser_Browser.suite());
- addTest(Test_org_eclipse_swt_browser_CloseWindowListener.suite());
- addTest(Test_org_eclipse_swt_browser_LocationAdapter.suite());
- addTest(Test_org_eclipse_swt_browser_LocationListener.suite());
- addTest(Test_org_eclipse_swt_browser_OpenWindowListener.suite());
- addTest(Test_org_eclipse_swt_browser_ProgressAdapter.suite());
- addTest(Test_org_eclipse_swt_browser_ProgressListener.suite());
- addTest(Test_org_eclipse_swt_browser_StatusTextListener.suite());
- addTest(Test_org_eclipse_swt_browser_TitleListener.suite());
- addTest(Test_org_eclipse_swt_browser_VisibilityWindowAdapter.suite());
- addTest(Test_org_eclipse_swt_browser_VisibilityWindowListener.suite());
- addTest(org.eclipse.swt.tests.junit.browser.Test_BrowserSuite.suite());
-
-
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/AllWidgetTests.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/AllWidgetTests.java
deleted file mode 100644
index aa4fe37277..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/AllWidgetTests.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Suite for testing all of the widget test cases.
- */
-public class AllWidgetTests {
-public static void main(String[] args) {
- TestRunner.run (suite());
-}
-public static Test suite() {
- TestSuite suite = new TestSuite();
-
- suite.addTest(Test_org_eclipse_swt_widgets_MenuItem.suite());
- suite.addTest(Test_org_eclipse_swt_widgets_ToolItem.suite());
- suite.addTest(Test_org_eclipse_swt_widgets_CoolItem.suite());
- suite.addTest(Test_org_eclipse_swt_widgets_TabItem.suite());
- suite.addTest(Test_org_eclipse_swt_widgets_TableItem.suite());
- suite.addTest(Test_org_eclipse_swt_widgets_TableColumn.suite());
- suite.addTest(Test_org_eclipse_swt_widgets_TreeItem.suite());
- suite.addTest(Test_org_eclipse_swt_widgets_Caret.suite());
- suite.addTest(Test_org_eclipse_swt_widgets_Event.suite());
- suite.addTest(Test_org_eclipse_swt_widgets_TypedListener.suite());
- suite.addTest(Test_org_eclipse_swt_widgets_Menu.suite());
- //suite.addTest(Test_org_eclipse_swt_widgets_Tracker.suite());
- suite.addTest(Test_org_eclipse_swt_widgets_Synchronizer.suite());
-
- suite.addTest(Test_org_eclipse_swt_widgets_Shell.suite());
- //suite.addTest(Test_org_eclipse_swt_widgets_Decorations.suite());
- suite.addTest(Test_org_eclipse_swt_widgets_Label.suite());
- suite.addTest(Test_org_eclipse_swt_widgets_Button.suite());
- suite.addTest(Test_org_eclipse_swt_widgets_List.suite());
- suite.addTest(Test_org_eclipse_swt_widgets_Text.suite());
- suite.addTest(Test_org_eclipse_swt_widgets_ScrollBar.suite());
- suite.addTest(Test_org_eclipse_swt_widgets_Sash.suite());
- suite.addTest(Test_org_eclipse_swt_widgets_Tree.suite());
- suite.addTest(Test_org_eclipse_swt_widgets_TabFolder.suite());
- suite.addTest(Test_org_eclipse_swt_widgets_Combo.suite());
- suite.addTest(Test_org_eclipse_swt_widgets_Group.suite());
- suite.addTest(Test_org_eclipse_swt_widgets_ToolBar.suite());
- suite.addTest(Test_org_eclipse_swt_widgets_Table.suite());
- suite.addTest(Test_org_eclipse_swt_widgets_Canvas.suite());
- suite.addTest(Test_org_eclipse_swt_widgets_Scale.suite());
- suite.addTest(Test_org_eclipse_swt_widgets_Slider.suite());
- suite.addTest(Test_org_eclipse_swt_widgets_ProgressBar.suite());
- suite.addTest(Test_org_eclipse_swt_widgets_Composite.suite());
- suite.addTest(Test_org_eclipse_swt_widgets_CoolBar.suite());
-
- suite.addTest(Test_org_eclipse_swt_widgets_ColorDialog.suite());
- suite.addTest(Test_org_eclipse_swt_widgets_FileDialog.suite());
- suite.addTest(Test_org_eclipse_swt_widgets_DirectoryDialog.suite());
- suite.addTest(Test_org_eclipse_swt_widgets_FontDialog.suite());
- suite.addTest(Test_org_eclipse_swt_widgets_MessageBox.suite());
- suite.addTest(Test_org_eclipse_swt_widgets_Monitor.suite());
-
- return suite;
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/EmulatedWidgetsTests.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/EmulatedWidgetsTests.java
deleted file mode 100644
index fa41b951a0..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/EmulatedWidgetsTests.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Suite for testing widgets that have been emulated on Motif.
- */
-public class EmulatedWidgetsTests {
-
-public static void main(String[] args) {
- TestRunner.run (suite());
-}
-public static Test suite() {
- TestSuite suite = new TestSuite();
-
- suite.addTest(Test_org_eclipse_swt_widgets_ColorDialog.suite());
- suite.addTest(Test_org_eclipse_swt_widgets_FontDialog.suite());
- suite.addTest(Test_org_eclipse_swt_widgets_TabFolder.suite());
- suite.addTest(Test_org_eclipse_swt_widgets_TabItem.suite());
- suite.addTest(Test_org_eclipse_swt_widgets_Table.suite());
- suite.addTest(Test_org_eclipse_swt_widgets_TableItem.suite());
- suite.addTest(Test_org_eclipse_swt_widgets_TableColumn.suite());
- suite.addTest(Test_org_eclipse_swt_widgets_Tree.suite());
- suite.addTest(Test_org_eclipse_swt_widgets_TreeItem.suite());
-
- return suite;
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/StyledTextContentSpec.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/StyledTextContentSpec.java
deleted file mode 100644
index 4a6f6c9c59..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/StyledTextContentSpec.java
+++ /dev/null
@@ -1,1026 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-/**
- * Use this test class to validate an implementation of the StyledTextContent
- * interface. To perform the validation, copy this class to the package where
- * your StyledTextContent implementation lives. Then specify the fully qualified
- * name of your StyledTextContent class as an argument to the main method of this
- * class.
- *
- * NOTE: This test class assumes that your StyledTextContent implementation
- * handles the following delimiters:
- *
- * /r
- * /n
- * /r/n
- */
-import org.eclipse.swt.custom.*;
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.layout.*;
-import java.lang.reflect.*;
-public class StyledTextContentSpec implements TextChangeListener {
- static String contentClassName;
- static int failCount = 0;
- static int errorCount = 0;
- Class contentClass = null;
- StyledTextContent contentInstance = null;
- int verify = 0;
- Method currentMethod = null;
- boolean failed = false;
- StyledText widget = null;
- Shell shell = null;
-
-public StyledTextContentSpec() {
-}
-public void assertTrue(String message, boolean condition) {
- System.out.print("\t" + currentMethod.getName() + " " + message);
- if (!condition)
- fail(message);
- else
- System.out.println(" passed");
-}
-public void fail(String message) {
- failed = true;
- System.out.println(" FAILED: " + message);
- failCount++;
-}
-public StyledTextContent getContentInstance() {
- contentInstance.setText("");
- widget.setContent(contentInstance);
- return contentInstance;
-}
-public static String getTestText() {
- return
- "This is the first line.\r\n" +
- "This is the second line.\r\n" +
- "This is the third line.\r\n" +
- "This is the fourth line.\r\n" +
- "This is the fifth line.\r\n" +
- "\r\n" +
- "This is the first line again.\r\n" +
- "This is the second line again.\r\n" +
- "This is the third line again.\r\n" +
- "This is the fourth line again.\r\n" +
- "This is the fifth line again.\r\n" +
- "\r\n" +
- "This is the first line once again.\r\n" +
- "This is the second line once again.\r\n" +
- "This is the third line once again.\r\n" +
- "This is the fourth line once again.\r\n" +
- "This is the fifth line once again.";
-}
-public static void main(String[] args) {
- StyledTextContentSpec spec = new StyledTextContentSpec();
- if (args.length > 0) {
- contentClassName = args[0];
- } else {
- MessageBox box = new MessageBox(Display.getDefault().getActiveShell(), SWT.ICON_ERROR);
- box.setMessage("Content class must be specified as an execution argument."); //$NON-NLS-1$
- box.open();
- return;
- }
- spec.run();
- System.out.println();
- System.out.println(failCount + " TEST FAILURES.");
- System.out.println(errorCount + " UNEXPECTED ERRORS.");
-}
-public void run() {
- if (contentClassName.equals("")) {
- MessageBox box = new MessageBox(Display.getDefault().getActiveShell(), SWT.ICON_ERROR);
- box.setMessage("Content class must be specified as an execution argument."); //$NON-NLS-1$
- box.open();
- return;
- }
- if (contentClass == null) {
- try {
- contentClass = Class.forName(contentClassName);
- } catch (ClassNotFoundException e) {
- MessageBox box = new MessageBox(Display.getDefault().getActiveShell(), SWT.ICON_ERROR);
- box.setMessage("Content class:\n" + contentClassName + "\nnot found"); //$NON-NLS-1$
- box.open();
- return;
- }
- }
- try {
- contentInstance = (StyledTextContent)contentClass.newInstance();
- } catch (IllegalAccessException e) {
- MessageBox box = new MessageBox(Display.getDefault().getActiveShell(), SWT.ICON_ERROR);
- box.setMessage("Unable to access content class:\n" + contentClassName); //$NON-NLS-1$
- box.open();
- return;
- } catch (InstantiationException e) {
- MessageBox box = new MessageBox(Display.getDefault().getActiveShell(), SWT.ICON_ERROR);
- box.setMessage("Unable to instantiate content class:\n" + contentClassName); //$NON-NLS-1$
- box.open();
- return;
- }
- Class clazz;
- clazz = this.getClass();
- Method[] methods = clazz.getDeclaredMethods();
- for (int i=0; i<methods.length; i++) {
- setUp();
- currentMethod = methods[i];
- failed = false;
- try {
- if (currentMethod.getName().startsWith("test_")) {
- System.out.println();
- System.out.println(currentMethod.getName() + "...");
- currentMethod.invoke(this, new Object[0]);
- if (!failed) {
- System.out.println("PASSED.");
- } else {
- System.out.println("FAILED");
- }
- }
- } catch (InvocationTargetException ex) {
- System.out.println("\t" + currentMethod.getName() + " ERROR ==> " + ex.getTargetException().toString());
- System.out.println("FAILED");
- errorCount++;
- } catch (Exception ex) {
- System.out.println("\t" + currentMethod.getName() + " ERROR ==> " + ex.toString());
- System.out.println("FAILED");
- errorCount++;
- }
- if (verify != 0) {
- verify = 0;
- contentInstance.removeTextChangeListener(this);
- }
- tearDown();
- }
-}
-public void textSet(TextChangedEvent event) {
-}
-public void textChanged(TextChangedEvent event) {
-}
-public void textChanging(TextChangingEvent event) {
- switch (verify) {
- case 1 : {
- assertTrue(":1a:", event.replaceLineCount == 0);
- assertTrue(":1b:", event.newLineCount == 1);
- break;
- }
- case 2 : {
- assertTrue(":2a:", event.replaceLineCount == 2);
- assertTrue(":2b:", event.newLineCount == 0);
- break;
- }
- case 3 : {
- assertTrue(":3a:", event.replaceLineCount == 0);
- assertTrue(":3b:", event.newLineCount == 2);
- break;
- }
- case 4: {
- assertTrue(":4:", false);
- break;
- }
- case 5 : {
- assertTrue(":5a:", event.replaceLineCount == 0);
- assertTrue(":5b:", event.newLineCount == 1);
- break;
- }
- case 6 : {
- assertTrue(":6a:", event.replaceLineCount == 1);
- assertTrue(":6b:", event.newLineCount == 0);
- break;
- }
- case 8 : {
- assertTrue(":8a:", event.replaceLineCount == 1);
- assertTrue(":8b:", event.newLineCount == 0);
- break;
- }
- case 9 : {
- assertTrue(":9a:", event.replaceLineCount == 1);
- assertTrue(":9b:", event.newLineCount == 0);
- break;
- }
- case 10:{
- assertTrue(":10:", false);
- break;
- }
- case 11: {
- assertTrue(":11:", false);
- break;
- }
- case 12: {
- assertTrue(":12a:", event.replaceLineCount == 0);
- assertTrue(":12b:", event.newLineCount == 1);
- break;
- }
- case 13: {
- assertTrue(":13a:", event.replaceLineCount == 0);
- assertTrue(":13b:", event.newLineCount == 1);
- break;
- }
- case 14: {
- assertTrue(":14:", false);
- break;
- }
- case 15: {
- assertTrue(":15a:", event.replaceLineCount == 1);
- assertTrue(":15b:", event.newLineCount == 2);
- break;
- }
- case 16:{
- assertTrue(":16:", false);
- break;
- }
- case 17: {
- assertTrue(":17:", false);
- break;
- }
- case 18: {
- assertTrue(":18a:", event.replaceLineCount == 0);
- assertTrue(":18b:", event.newLineCount == 2);
- break;
- }
- case 19: {
- assertTrue(":19a:", event.replaceLineCount == 0);
- assertTrue(":19b:", event.newLineCount == 3);
- break;
- }
- case 20: {
- assertTrue(":20:", false);
- break;
- }
- }
-}
-public void test_Insert() {
- StyledTextContent content = getContentInstance();
- String newText;
-
- content.setText("This\nis a test\r");
- content.replaceTextRange(0, 0, "test\n ");
- newText = content.getTextRange(0, content.getCharCount());
- assertTrue(":1a:", newText.equals("test\n This\nis a test\r"));
- assertTrue(":1b:", content.getLineCount() == 4);
- assertTrue(":1c:", content.getLine(0).equals("test"));
- assertTrue(":1d:", content.getLine(1).equals(" This"));
- assertTrue(":1e:", content.getLine(2).equals("is a test"));
- assertTrue(":1f:", content.getLine(3).equals(""));
-
- content.setText("This\nis a test\r");
- content.replaceTextRange(5, 0, "*** ");
- newText = content.getTextRange(0, content.getCharCount());
- assertTrue(":2a:", newText.equals("This\n*** is a test\r"));
- assertTrue(":2b:", content.getLineCount() == 3);
- assertTrue(":2c:", content.getLine(0).equals("This"));
- assertTrue(":2d:", content.getLine(1).equals("*** is a test"));
- assertTrue(":2e:", content.getLine(2).equals(""));
-
- content.setText("Line 1\r\nLine 2");
- content.replaceTextRange(0, 0, "\r");
- newText = content.getTextRange(0, content.getCharCount());
- assertTrue(":3a:", newText.equals("\rLine 1\r\nLine 2"));
- assertTrue(":3b:", content.getLineCount() == 3);
- assertTrue(":3c:", content.getLine(0).equals(""));
- assertTrue(":3d:", content.getLine(1).equals("Line 1"));
- assertTrue(":3e:", content.getLine(2).equals("Line 2"));
- content.replaceTextRange(9, 0, "\r");
- newText = content.getTextRange(0, content.getCharCount());
- assertTrue(":3f:", newText.equals("\rLine 1\r\n\rLine 2"));
- assertTrue(":3g:", content.getLineCount() == 4);
- assertTrue(":3h:", content.getLine(0).equals(""));
- assertTrue(":3i:", content.getLine(1).equals("Line 1"));
- assertTrue(":3j:", content.getLine(2).equals(""));
- assertTrue(":3k:", content.getLine(3).equals("Line 2"));
-
- content.setText("This\nis a test\r");
- content.replaceTextRange(0, 0, "\n");
- newText = content.getTextRange(0, content.getCharCount());
- assertTrue(":4a:", newText.equals("\nThis\nis a test\r"));
- assertTrue(":4b:", content.getLineCount() == 4);
- assertTrue(":4c:", content.getLine(0).equals(""));
- assertTrue(":4d:", content.getLine(1).equals("This"));
- assertTrue(":4e:", content.getLine(2).equals("is a test"));
- assertTrue(":4f:", content.getLine(3).equals(""));
-
- content.setText("This\nis a test\r");
- content.replaceTextRange(7, 0, "\r\nnewLine");
- newText = content.getTextRange(0, content.getCharCount());
- assertTrue(":5a:", newText.equals("This\nis\r\nnewLine a test\r"));
- assertTrue(":5b:", content.getLineCount() == 4);
- assertTrue(":5c:", content.getLine(0).equals("This"));
- assertTrue(":5d:", content.getLine(1).equals("is"));
- assertTrue(":5e:", content.getLine(2).equals("newLine a test"));
- assertTrue(":5f:", content.getLine(3).equals(""));
-
- content.setText("");
- content.replaceTextRange(0, 0, "This\nis\r\nnewLine a test\r");
- newText = content.getTextRange(0, content.getCharCount());
- assertTrue(":6a:", newText.equals("This\nis\r\nnewLine a test\r"));
- assertTrue(":6b:", content.getLineCount() == 4);
- assertTrue(":6c:", content.getLine(0).equals("This"));
- assertTrue(":6d:", content.getLine(1).equals("is"));
- assertTrue(":6e:", content.getLine(2).equals("newLine a test"));
- assertTrue(":6f:", content.getLine(3).equals(""));
-
- // insert at end
- content.setText("This");
- content.replaceTextRange(4, 0, "\n ");
- newText = content.getTextRange(0, content.getCharCount());
- assertTrue(":7a:", newText.equals("This\n "));
- assertTrue(":7b:", content.getLineCount() == 2);
- assertTrue(":7c:", content.getLine(0).equals("This"));
- assertTrue(":7d:", content.getLine(1).equals(" "));
- content.setText("This\n");
- content.replaceTextRange(5, 0, "\n");
- newText = content.getTextRange(0, content.getCharCount());
- assertTrue(":7e:", newText.equals("This\n\n"));
- assertTrue(":7f:", content.getLineCount() == 3);
- assertTrue(":7g:", content.getLine(0).equals("This"));
- assertTrue(":7h:", content.getLine(1).equals(""));
- assertTrue(":7i:", content.getLine(2).equals(""));
-
- // insert at beginning
- content.setText("This");
- content.replaceTextRange(0, 0, "\n");
- newText = content.getTextRange(0, content.getCharCount());
- assertTrue(":8a:", newText.equals("\nThis"));
- assertTrue(":8b:", content.getLineCount() == 2);
- assertTrue(":8c:", content.getLine(0).equals(""));
- assertTrue(":8d:", content.getLine(1).equals("This"));
-
- // insert text
- content.setText("This\nis a test\r");
- content.replaceTextRange(5, 0, "*** ");
- newText = content.getTextRange(0, content.getCharCount());
- assertTrue(":9a:", newText.equals("This\n*** is a test\r"));
- assertTrue(":9b:", content.getLineCount() == 3);
- assertTrue(":9c:", content.getLine(0).equals("This"));
- assertTrue(":9d:", content.getLine(1).equals("*** is a test"));
- assertTrue(":9e:", content.getLine(2).equals(""));
-
- content.setText("This\n");
- content.replaceTextRange(5, 0, "line");
- newText = content.getTextRange(0, content.getCharCount());
- assertTrue(":10a:", newText.equals("This\nline"));
- assertTrue(":10b:", content.getLineCount() == 2);
- assertTrue(":10c:", content.getLine(0).equals("This"));
- assertTrue(":10d:", content.getLine(1).equals("line"));
- assertTrue(":10e:", content.getLineAtOffset(8) == 1);
- assertTrue(":10f:", content.getLineAtOffset(9) == 1);
-
- // insert at beginning
- content.setText("This\n");
- content.replaceTextRange(0, 0, "line\n");
- newText = content.getTextRange(0, content.getCharCount());
- assertTrue(":11a:", newText.equals("line\nThis\n"));
- assertTrue(":11b:", content.getLineCount() == 3);
- assertTrue(":11c:", content.getLine(0).equals("line"));
- assertTrue(":11d:", content.getLine(1).equals("This"));
- assertTrue(":11e:", content.getLineAtOffset(5) == 1);
-
- content.setText("Line 1\r\nLine 2\r\nLine 3");
- content.replaceTextRange(0, 0, "\r");
- newText = content.getTextRange(0, content.getCharCount());
- assertTrue(":12a:", newText.equals("\rLine 1\r\nLine 2\r\nLine 3"));
- assertTrue(":12b:", content.getLineCount() == 4);
- assertTrue(":12c:", content.getLine(0).equals(""));
- assertTrue(":12d:", content.getLine(1).equals("Line 1"));
- assertTrue(":12e:", content.getLine(2).equals("Line 2"));
- assertTrue(":12f:", content.getLine(3).equals("Line 3"));
-
- content.setText("Line 1\nLine 2\nLine 3");
- content.replaceTextRange(7, 0, "Line1a\nLine1b\n");
- newText = content.getTextRange(0, content.getCharCount());
- assertTrue(":13a:", newText.equals("Line 1\nLine1a\nLine1b\nLine 2\nLine 3"));
- assertTrue(":13b:", content.getLineCount() == 5);
- assertTrue(":13c:", content.getLine(0).equals("Line 1"));
- assertTrue(":13d:", content.getLine(1).equals("Line1a"));
- assertTrue(":13e:", content.getLine(2).equals("Line1b"));
- assertTrue(":13f:", content.getLine(3).equals("Line 2"));
- assertTrue(":13g:", content.getLine(4).equals("Line 3"));
-
- content.setText("Line 1\nLine 2\nLine 3");
- content.replaceTextRange(11, 0, "l1a");
- newText = content.getTextRange(0, content.getCharCount());
- assertTrue(":14a:", newText.equals("Line 1\nLinel1a 2\nLine 3"));
- assertTrue(":14b:", content.getLineCount() == 3);
- assertTrue(":14c:", content.getLine(0).equals("Line 1"));
- assertTrue(":14d:", content.getLine(1).equals("Linel1a 2"));
- assertTrue(":14e:", content.getLine(2).equals("Line 3"));
-
- content.setText("Line 1\nLine 2 is a very long line that spans many words\nLine 3");
- content.replaceTextRange(19, 0, "very, very, ");
- newText = content.getTextRange(0, content.getCharCount());
- assertTrue(":15a:", newText.equals("Line 1\nLine 2 is a very, very, very long line that spans many words\nLine 3"));
- assertTrue(":15b:", content.getLineCount() == 3);
- assertTrue(":15c:", content.getLine(0).equals("Line 1"));
- assertTrue(":15d:", content.getLine(1).equals("Line 2 is a very, very, very long line that spans many words"));
- assertTrue(":15e:", content.getLine(2).equals("Line 3"));
-}
-
-public void test_Empty() {
- StyledTextContent content = getContentInstance();
- assertTrue(":1a:", content.getLineCount() == 1);
- assertTrue(":1b:", content.getLine(0).equals(""));
-
- content.setText("test");
- content.replaceTextRange(0,4,"");
- assertTrue(":2a:", content.getLineCount() == 1);
- assertTrue(":2b:", content.getLine(0).equals(""));
-}
-public void test_Line_Conversion() {
- StyledTextContent content = getContentInstance();
-
- content.setText("This\nis a test\rrepeat\nend\r");
- assertTrue(":1a:", content.getLineCount() == 5);
- assertTrue(":1b:", content.getLine(0).equals("This"));
- assertTrue(":1c:", content.getOffsetAtLine(0) == 0);
- assertTrue(":1d:", content.getLine(1).equals("is a test"));
- assertTrue(":1e:", content.getLineAtOffset(4) == 0);
- assertTrue(":1f:", content.getOffsetAtLine(1) == 5);
- assertTrue(":1g:", content.getLine(2).equals("repeat"));
- assertTrue(":1h:", content.getOffsetAtLine(2) == 15);
- assertTrue(":1i:", content.getLine(3).equals("end"));
- assertTrue(":1j:", content.getOffsetAtLine(3) == 22);
- assertTrue(":1k:", content.getLine(4).equals(""));
- assertTrue(":1l:", content.getOffsetAtLine(4) == 26);
-
- content.setText("This\r\nis a test");
- assertTrue(":2a:", content.getLineCount() == 2);
- assertTrue(":2b:", content.getLine(1).equals("is a test"));
- assertTrue(":2c:", content.getLineAtOffset(4) == 0);
- assertTrue(":2d:", content.getLineAtOffset(5) == 0);
-
- content.setText("This\r\nis a test\r");
- assertTrue(":3a:", content.getLineCount() == 3);
- assertTrue(":3b:", content.getLine(1).equals("is a test"));
- assertTrue(":3c:", content.getLineAtOffset(15) == 1);
-
- content.setText("\r\n");
- assertTrue(":4a:", content.getLineCount() == 2);
- assertTrue(":4b:", content.getLine(0).equals(""));
- assertTrue(":4c:", content.getLine(1).equals(""));
- assertTrue(":4d:", content.getLineAtOffset(0) == 0);
- assertTrue(":4e:", content.getLineAtOffset(1) == 0);
- assertTrue(":4f:", content.getLineAtOffset(2) == 1);
-
- content.setText("\r\n\n\r\r\n");
- assertTrue(":5a:", content.getLineCount() == 5);
- assertTrue(":5b:", content.getLine(0).equals(""));
- assertTrue(":5c:", content.getOffsetAtLine(0) == 0);
- assertTrue(":5d:", content.getLine(1).equals(""));
- assertTrue(":5e:", content.getOffsetAtLine(1) == 2);
- assertTrue(":5f:", content.getLine(2).equals(""));
- assertTrue(":5g:", content.getOffsetAtLine(2) == 3);
- assertTrue(":5h:", content.getLine(3).equals(""));
- assertTrue(":5i:", content.getOffsetAtLine(3) == 4);
- assertTrue(":5j:", content.getLine(4).equals(""));
- assertTrue(":5k:", content.getOffsetAtLine(4) == 6);
-
- content.setText("test\r\rtest2\r\r");
- assertTrue(":6a:", content.getLineCount() == 5);
- assertTrue(":6b:", content.getLine(0).equals("test"));
- assertTrue(":6c:", content.getOffsetAtLine(0) == 0);
- assertTrue(":6d:", content.getLine(1).equals(""));
- assertTrue(":6e:", content.getOffsetAtLine(1) == 5);
- assertTrue(":6f:", content.getLine(2).equals("test2"));
- assertTrue(":6g:", content.getOffsetAtLine(2) == 6);
- assertTrue(":6h:", content.getLine(3).equals(""));
- assertTrue(":6i:", content.getOffsetAtLine(3) == 12);
- assertTrue(":6j:", content.getLine(4).equals(""));
- assertTrue(":6k:", content.getOffsetAtLine(4) == 13);
-}
-public void test_Offset_To_Line() {
- StyledTextContent content = getContentInstance();
-
- content.setText("This\nis a test\rrepeat\nend\r");
- assertTrue(":1a:", content.getLineAtOffset(0) == 0);
- assertTrue(":1b:", content.getLineAtOffset(3) == 0);
- assertTrue(":1c:", content.getLineAtOffset(4) == 0);
- assertTrue(":1d:", content.getLineAtOffset(25) == 3);
- assertTrue(":1e:", content.getLineAtOffset(26) == 4);
-
- content.setText("This\r\nis a test");
- assertTrue(":2a:", content.getLineAtOffset(5) == 0);
- assertTrue(":2b:", content.getLineAtOffset(6) == 1);
- assertTrue(":2c:", content.getLineAtOffset(10) == 1);
-
- content.setText("\r\n");
- assertTrue(":3a:", content.getLineAtOffset(0) == 0);
- assertTrue(":3b:", content.getLineAtOffset(1) == 0);
- assertTrue(":3c:", content.getLineAtOffset(2) == 1);
-
- content.setText("\r\n\n\r\r\n");
- assertTrue(":4a:", content.getLineAtOffset(0) == 0);
- assertTrue(":4b:", content.getLineAtOffset(1) == 0);
- assertTrue(":4c:", content.getLineAtOffset(2) == 1);
- assertTrue(":4d:", content.getLineAtOffset(3) == 2);
- assertTrue(":4e:", content.getLineAtOffset(4) == 3);
- assertTrue(":4f:", content.getLineAtOffset(5) == 3);
- assertTrue(":4g:", content.getLineAtOffset(6) == 4);
-
- content.setText("\r\n\r\n");
- assertTrue(":5a:", content.getLineAtOffset(0) == 0);
- assertTrue(":5b:", content.getLineAtOffset(1) == 0);
- assertTrue(":5c:", content.getLineAtOffset(2) == 1);
- assertTrue(":5d:", content.getLineAtOffset(3) == 1);
- assertTrue(":5e:", content.getLineAtOffset(4) == 2);
-
- content.setText("\r\r\r\n\r\n");
- assertTrue(":6a:", content.getLineAtOffset(0) == 0);
- assertTrue(":6b:", content.getLineAtOffset(1) == 1);
- assertTrue(":6c:", content.getLineAtOffset(2) == 2);
- assertTrue(":6d:", content.getLineAtOffset(4) == 3);
-
- content.setText("");
- assertTrue(":7a:", content.getLineAtOffset(0) == 0);
-
- content = getContentInstance();
- assertTrue(":8a:", content.getLineAtOffset(0) == 0);
-}
-
-public void test_Line_To_Offset() {
- StyledTextContent content = getContentInstance();
-
- content.setText("This\nis a test\rrepeat\nend\r");
- assertTrue(":1a:", content.getOffsetAtLine(0) == 0);
- assertTrue(":1b:", content.getOffsetAtLine(1) == 5);
- assertTrue(":1c:", content.getOffsetAtLine(2) == 15);
- assertTrue(":1d:", content.getOffsetAtLine(3) == 22);
- assertTrue(":1e:", content.getOffsetAtLine(4) == 26);
-
- content.setText("This\r\nis a test");
- assertTrue(":2a:", content.getOffsetAtLine(0) == 0);
- assertTrue(":2b:", content.getOffsetAtLine(1) == 6);
-
- content.setText("\r\n");
- assertTrue(":3a:", content.getOffsetAtLine(0) == 0);
- assertTrue(":3b:", content.getOffsetAtLine(1) == 2);
-
- content.setText("\r\n\n\r\r\n");
- assertTrue(":4a:", content.getOffsetAtLine(0) == 0);
- assertTrue(":4b:", content.getOffsetAtLine(1) == 2);
- assertTrue(":4c:", content.getOffsetAtLine(2) == 3);
- assertTrue(":4d:", content.getOffsetAtLine(3) == 4);
- assertTrue(":4e:", content.getOffsetAtLine(4) == 6);
-
- content.setText("\r\ntest\r\n");
- assertTrue(":5a:", content.getOffsetAtLine(0) == 0);
- assertTrue(":5b:", content.getOffsetAtLine(1) == 2);
- assertTrue(":5c:", content.getOffsetAtLine(2) == 8);
-}
-
-public void test_Delete() {
- StyledTextContent content = getContentInstance();
- String newText;
-
- content.setText("This\nis a test\r");
- content.replaceTextRange(6, 2, "");
- newText = content.getTextRange(0, content.getCharCount());
- assertTrue(":1a:", newText.equals("This\nia test\r"));
- assertTrue(":1b:", content.getLine(0).equals("This"));
- assertTrue(":1c:", content.getLine(1).equals("ia test"));
-
- content.setText("This\nis a test\r");
- content.replaceTextRange(5, 9, "");
- newText = content.getTextRange(0, content.getCharCount());
- assertTrue(":2a:", newText.equals("This\n\r"));
- assertTrue(":2b:",content.getLineCount() == 3);
- assertTrue(":2c:", content.getLine(0).equals("This"));
- assertTrue(":2d:", content.getLine(1).equals(""));
- assertTrue(":2e:", content.getLine(2).equals(""));
-
- content.setText("This\nis a test\nline 3\nline 4");
- content.replaceTextRange(21, 7, "");
- newText = content.getTextRange(0, content.getCharCount());
- assertTrue(":3a:", newText.equals("This\nis a test\nline 3"));
- assertTrue(":3b:", content.getLineCount() == 3);
- assertTrue(":3c:", content.getLine(0).equals("This"));
- assertTrue(":3d:", content.getLine(1).equals("is a test"));
- assertTrue(":3e:", content.getLine(2).equals("line 3"));
-
- content.setText("This\nis a test\nline 3\nline 4");
- content.replaceTextRange(0, 5, "");
- newText = content.getTextRange(0, content.getCharCount());
- assertTrue(":4a:", newText.equals("is a test\nline 3\nline 4"));
- assertTrue(":4b:", content.getLineCount() == 3);
- assertTrue(":4c:", content.getLine(0).equals("is a test"));
- assertTrue(":4d:", content.getLine(1).equals("line 3"));
- assertTrue(":4e:", content.getLine(2).equals("line 4"));
- content.replaceTextRange(16, 7, "");
- newText = content.getTextRange(0, content.getCharCount());
- assertTrue(":4f:", newText.equals("is a test\nline 3"));
- assertTrue(":4g:", content.getLine(0).equals("is a test"));
- assertTrue(":4h:", content.getLine(1).equals("line 3"));
- content.replaceTextRange(9, 7, "");
- newText = content.getTextRange(0, content.getCharCount());
- assertTrue(":4i:", newText.equals("is a test"));
- assertTrue(":4j:", content.getLine(0).equals("is a test"));
- content.replaceTextRange(1, 8, "");
- newText = content.getTextRange(0, content.getCharCount());
- assertTrue(":4k:", newText.equals("i"));
- assertTrue(":4l:", content.getLine(0).equals("i"));
- content.replaceTextRange(0, 1, "");
- newText = content.getTextRange(0, content.getCharCount());
- assertTrue(":4m:", newText.equals(""));
- assertTrue(":4n:", content.getLine(0).equals(""));
-
- content.setText("This\nis a test\r");
- content.replaceTextRange(5, 9, "");
- newText = content.getTextRange(0, content.getCharCount());
- assertTrue(":5a:", newText.equals("This\n\r"));
- assertTrue(":5b:",content.getLineCount() == 3);
- assertTrue(":5c:", content.getLine(0).equals("This"));
- assertTrue(":5d:", content.getLine(1).equals(""));
- assertTrue(":5e:", content.getLine(2).equals(""));
-
- content.setText("L1\r\nL2\r\nL3\r\nL4\r\n");
- content.replaceTextRange(4, 8, "");
- newText = content.getTextRange(0, content.getCharCount());
- assertTrue(":6a:", newText.equals("L1\r\nL4\r\n"));
- assertTrue(":6b:",content.getLineCount() == 3);
- assertTrue(":6c:", content.getLine(0).equals("L1"));
- assertTrue(":6d:", content.getLine(1).equals("L4"));
- assertTrue(":6e:", content.getLine(2).equals(""));
-
- content.setText("\nL1\r\nL2");
- content.replaceTextRange(0, 1, "");
- newText = content.getTextRange(0, content.getCharCount());
- assertTrue(":7a:", newText.equals("L1\r\nL2"));
- assertTrue(":7b:",content.getLineCount() == 2);
- assertTrue(":7c:", content.getLine(0).equals("L1"));
- assertTrue(":7d:", content.getLine(1).equals("L2"));
-
- content.setText("\nL1\r\nL2\r\n");
- content.replaceTextRange(7, 2, "");
- newText = content.getTextRange(0, content.getCharCount());
- assertTrue(":8a:", newText.equals("\nL1\r\nL2"));
- assertTrue(":8b:",content.getLineCount() == 3);
- assertTrue(":8c:", content.getLine(0).equals(""));
- assertTrue(":8d:", content.getLine(1).equals("L1"));
- assertTrue(":8e:", content.getLine(2).equals("L2"));
-
- content.setText("\nLine 1\nLine 2\n");
- content.replaceTextRange(0, 7, "");
- newText = content.getTextRange(0, content.getCharCount());
- assertTrue(":9a:", newText.equals("\nLine 2\n"));
- assertTrue(":9b:", content.getLineCount() == 3);
- assertTrue(":9c:", content.getLine(0).equals(""));
- assertTrue(":9d:", content.getLine(1).equals("Line 2"));
- assertTrue(":9e:", content.getLine(2).equals(""));
-
- content.setText("Line 1\nLine 2\n");
- content.replaceTextRange(6, 8, "");
- newText = content.getTextRange(0, content.getCharCount());
- assertTrue(":10a:", newText.equals("Line 1"));
- assertTrue(":10b:", content.getLineCount() == 1);
- assertTrue(":10c:", content.getLine(0).equals("Line 1"));
-
- content.setText("Line one is short\r\nLine 2 is a longer line\r\nLine 3\n");
- content.replaceTextRange(12, 17, "");
- newText = content.getTextRange(0, content.getCharCount());
- assertTrue(":11a:", newText.equals("Line one is a longer line\r\nLine 3\n"));
- assertTrue(":11b:", content.getLineCount() == 3);
- assertTrue(":11c:", content.getLine(0).equals("Line one is a longer line"));
- assertTrue(":11d:", content.getLine(1).equals("Line 3"));
- assertTrue(":11e:", content.getLine(2).equals(""));
-
-}
-public void test_Replace() {
- StyledTextContent content = getContentInstance();
- String newText;
-
- content.setText("This\nis a test\r");
- content.replaceTextRange(5, 4, "a");
- newText = content.getTextRange(0, content.getCharCount());
- assertTrue(":1a:", newText.equals("This\na test\r"));
- assertTrue(":1b:",content.getLineCount() == 3);
- assertTrue(":1c:", content.getLine(0).equals("This"));
- assertTrue(":1d:", content.getLine(1).equals("a test"));
- assertTrue(":1e:", content.getLine(2).equals(""));
-
- content.setText("This\nis a test\r");
- content.replaceTextRange(5, 2, "was");
- newText = content.getTextRange(0, content.getCharCount());
- assertTrue(":2a:", newText.equals("This\nwas a test\r"));
- assertTrue(":2b:",content.getLineCount() == 3);
- assertTrue(":2c:", content.getLine(0).equals("This"));
- assertTrue(":2d:", content.getLine(1).equals("was a test"));
- assertTrue(":2e:", content.getLine(2).equals(""));
-
- content.setText("This is a test\r");
- content.replaceTextRange(5, 2, "was");
- newText = content.getTextRange(0, content.getCharCount());
- assertTrue(":3a:", newText.equals("This was a test\r"));
- assertTrue(":3b:",content.getLineCount() == 2);
- assertTrue(":3c:", content.getLine(0).equals("This was a test"));
- assertTrue(":3d:", content.getLineAtOffset(15) == 0);
-
- content.setText("Line 1\nLine 2\nLine 3");
- content.replaceTextRange(0, 7, "La\nLb\n");
- newText = content.getTextRange(0, content.getCharCount());
- assertTrue(":4a:", newText.equals("La\nLb\nLine 2\nLine 3"));
- assertTrue(":4b:", content.getLine(0).equals("La"));
- assertTrue(":4c:", content.getLine(1).equals("Lb"));
- assertTrue(":4d:", content.getLine(2).equals("Line 2"));
- assertTrue(":4e:", content.getLine(3).equals("Line 3"));
-
- content.setText(getTestText());
- newText = content.getTextRange(0, content.getCharCount());
- int start = content.getOffsetAtLine(6);
- int end = content.getOffsetAtLine(11);
- content.replaceTextRange(start, end - start, "");
- newText = content.getTextRange(0, content.getCharCount());
- assertTrue(":5a:", content.getLineCount() == 12);
- assertTrue(":5a:", content.getLine(5).equals(""));
- assertTrue(":5a:", content.getLine(6).equals(""));
- start = content.getOffsetAtLine(7);
- content.replaceTextRange(start, content.getCharCount() - start, "");
- newText = content.getTextRange(0, content.getCharCount());
- assertTrue(":5a:", content.getLineCount() == 8);
- assertTrue(":5a:", content.getLine(5).equals(""));
- assertTrue(":5a:", content.getLine(6).equals(""));
- assertTrue(":5a:", content.getLine(7).equals(""));
-
-}
-public void test_Special_Cases() {
- String newText;
- StyledTextContent content = getContentInstance();
- assertTrue(":0a:", content.getLineCount() == 1);
- assertTrue(":0b:", content.getOffsetAtLine(0) == 0);
-
- content.setText("This is the input/output text component.");
- content.replaceTextRange(0, 0, "\n");
- assertTrue(":1a:", content.getLine(0).equals(""));
- content.replaceTextRange(1, 0, "\n");
- assertTrue(":1b:",content.getLine(0).equals(""));
- content.replaceTextRange(2, 0, "\n");
- assertTrue(":1c:",content.getLine(0).equals(""));
- content.replaceTextRange(3, 0, "\n");
- assertTrue(":1d:",content.getLine(0).equals(""));
- content.replaceTextRange(4, 0, "\n");
- assertTrue(":1e:",content.getLine(0).equals(""));
- content.replaceTextRange(5, 0, "\n");
- assertTrue(":1f:",content.getLine(0).equals(""));
- content.replaceTextRange(6, 0, "\n");
- assertTrue(":1g:",content.getLine(0).equals(""));
- content.replaceTextRange(7, 0, "\n");
- assertTrue(":1h:",content.getLine(0).equals(""));
-
- content.setText("This is the input/output text component.");
- content.replaceTextRange(0, 0, "\n");
- newText = content.getTextRange(0, content.getCharCount());
- assertTrue(":2a:", newText.equals("\nThis is the input/output text component."));
- assertTrue(":2b:", content.getLine(0).equals(""));
- assertTrue(":2c:", content.getLine(1).equals("This is the input/output text component."));
- content.replaceTextRange(1, 0, "\n");
- newText = content.getTextRange(0, content.getCharCount());
- assertTrue(":2d:", newText.equals("\n\nThis is the input/output text component."));
- assertTrue(":2e:", content.getLine(0).equals(""));
- assertTrue(":2f:", content.getLine(1).equals(""));
- assertTrue(":2g:", content.getLine(2).equals("This is the input/output text component."));
-
- content.replaceTextRange(2, 0, "\n");
- newText = content.getTextRange(0, content.getCharCount());
- assertTrue(":3a:", newText.equals("\n\n\nThis is the input/output text component."));
- assertTrue(":3b:", content.getLine(0).equals(""));
- assertTrue(":3c:", content.getLine(1).equals(""));
- assertTrue(":3d:", content.getLine(2).equals(""));
- assertTrue(":3e:", content.getLine(3).equals("This is the input/output text component."));
- content.replaceTextRange(3, 0, "\n");
- newText = content.getTextRange(0, content.getCharCount());
- assertTrue(":3f:", newText.equals("\n\n\n\nThis is the input/output text component."));
- assertTrue(":3g:", content.getLine(0).equals(""));
- assertTrue(":3h:", content.getLine(1).equals(""));
- assertTrue(":3i:", content.getLine(2).equals(""));
- assertTrue(":3j:", content.getLine(3).equals(""));
- assertTrue(":3k:", content.getLine(4).equals("This is the input/output text component."));
-
- content.replaceTextRange(3, 1, "");
- newText = content.getTextRange(0, content.getCharCount());
- assertTrue(":4a:", newText.equals("\n\n\nThis is the input/output text component."));
- assertTrue(":4b:", content.getLine(0).equals(""));
- assertTrue(":4c:", content.getLine(1).equals(""));
- assertTrue(":4d:", content.getLine(2).equals(""));
- assertTrue(":4e:", content.getLine(3).equals("This is the input/output text component."));
- content.replaceTextRange(2, 1, "");
- newText = content.getTextRange(0, content.getCharCount());
- assertTrue(":4f:", newText.equals("\n\nThis is the input/output text component."));
- assertTrue(":4g:", content.getLine(0).equals(""));
- assertTrue(":4h:", content.getLine(1).equals(""));
- assertTrue(":4i:", content.getLine(2).equals("This is the input/output text component."));
-
- content.replaceTextRange(2, 0, "a");
- newText = content.getTextRange(0, content.getCharCount());
- assertTrue(":5a:", newText.equals("\n\naThis is the input/output text component."));
- assertTrue(":5b:", content.getLine(0).equals(""));
- assertTrue(":5c:", content.getLine(1).equals(""));
- assertTrue(":5d:", content.getLine(2).equals("aThis is the input/output text component."));
-
- content.setText("abc\r\ndef");
- content.replaceTextRange(1, 1, "");
- newText = content.getTextRange(0, content.getCharCount());
- assertTrue(":6a:", newText.equals("ac\r\ndef"));
- assertTrue(":6b:", content.getLineCount() == 2);
- assertTrue(":6c:", content.getLine(0).equals("ac"));
- assertTrue(":6d:", content.getLine(1).equals("def"));
- content.replaceTextRange(1, 1, "");
- newText = content.getTextRange(0, content.getCharCount());
- assertTrue(":6e:", newText.equals("a\r\ndef"));
- assertTrue(":6f:", content.getLineCount() == 2);
- assertTrue(":6g:", content.getLine(0).equals("a"));
- assertTrue(":6h:", content.getLine(1).equals("def"));
- content.replaceTextRange(1, 2, "");
- newText = content.getTextRange(0, content.getCharCount());
- assertTrue(":6i:", newText.equals("adef"));
- assertTrue(":6j:", content.getLineCount() == 1);
- assertTrue(":6k:", content.getLine(0).equals("adef"));
- content.replaceTextRange(1, 1, "");
- newText = content.getTextRange(0, content.getCharCount());
- assertTrue(":6l:", newText.equals("aef"));
- assertTrue(":6m:", content.getLineCount() == 1);
- assertTrue(":6n:", content.getLine(0).equals("aef"));
- content.replaceTextRange(1, 1, "");
- newText = content.getTextRange(0, content.getCharCount());
- assertTrue(":6o:", newText.equals("af"));
- assertTrue(":6p:", content.getLineCount() == 1);
- assertTrue(":6q:", content.getLine(0).equals("af"));
-
- content.setText("abc");
- content.replaceTextRange(0, 1, "1");
- newText = content.getTextRange(0, content.getCharCount());
- assertTrue(":7a:", content.getLineCount() == 1);
- assertTrue(":7b:", newText.equals("1bc"));
- assertTrue(":7c:", content.getLine(0).equals("1bc"));
- content.replaceTextRange(0, 0, "\n");
- newText = content.getTextRange(0, content.getCharCount());
- assertTrue(":7d:", newText.equals("\n1bc"));
- assertTrue(":7e:", content.getLineCount() == 2);
- assertTrue(":7f:", content.getLine(0).equals(""));
- assertTrue(":7g:", content.getLine(1).equals("1bc"));
-
- content = getContentInstance();
- content.replaceTextRange(0,0,"a");
-
- content.setText("package test;\n/* Line 1\n * Line 2\n */\npublic class SimpleClass {\n}");
- content.replaceTextRange(14, 23, "\t/*Line 1\n\t * Line 2\n\t */");
- newText = content.getTextRange(0, content.getCharCount());
- assertTrue(":8a:", newText.equals("package test;\n\t/*Line 1\n\t * Line 2\n\t */\npublic class SimpleClass {\n}"));
- assertTrue(":8b:", content.getLineCount() == 6);
- assertTrue(":8c:", content.getLine(0).equals("package test;"));
- assertTrue(":8d:", content.getLine(1).equals("\t/*Line 1"));
- assertTrue(":8e:", content.getLine(2).equals("\t * Line 2"));
- assertTrue(":8f:", content.getLine(3).equals("\t */"));
- assertTrue(":8g:", content.getLine(4).equals("public class SimpleClass {"));
- assertTrue(":8h:", content.getLine(5).equals("}"));
-}
-public void test_Text_Changed_Event() {
- StyledTextContent content = getContentInstance();
- content.addTextChangeListener(this);
- verify = 1;
- content.setText("testing");
- content.replaceTextRange(0, 0, "\n");
-
- verify = 2;
- content.setText("\n\n");
- content.replaceTextRange(0, 2, "a");
-
- verify = 3;
- content.setText("a");
- content.replaceTextRange(0, 1, "\n\n");
-
- verify = 4;
- content.setText("L1\r\nL2\r\nL3\r\nL4\r\n");
- try {content.replaceTextRange(3, 1, "test\n");}
- catch (IllegalArgumentException ex) {assertTrue(":4:", true);}
-
- verify = 5;
- content.setText("Line 1\r\nLine 2");
- content.replaceTextRange(0, 0, "\r");
-
- verify = 6;
- content.setText("This\nis a test\nline 3\nline 4");
- content.replaceTextRange(21, 7, "");
-
- verify = 7;
- content.setText("This\nis a test\r");
- content.replaceTextRange(5, 9, "");
-
- verify = 8;
- content.setText("\nL1\r\nL2\r\n");
- content.replaceTextRange(7, 2, "");
-
- verify = 9;
- content.setText("L1\r\n");
- content.replaceTextRange(2, 2, "test");
-
- verify = 10;
- content.setText("L1\r\n");
- try {content.replaceTextRange(3, 1, "");}
- catch (IllegalArgumentException ex) {assertTrue(":10:", true);}
-
- verify = 11;
- content.setText("L1\r\nL2\r\nL3\r\nL4\r\n");
- try {content.replaceTextRange(1, 2, "");}
- catch (IllegalArgumentException ex) {assertTrue(":11:", true);}
-
- verify = 12;
- content.setText("L1\r");
- content.replaceTextRange(3, 0, "\n");
-
- verify = 13;
- content.setText("L1\n");
- content.replaceTextRange(2, 0, "\r");
-
- verify = 14;
- content.setText("L1\r\n");
- try {content.replaceTextRange(3, 0, "test");}
- catch (IllegalArgumentException ex) {assertTrue(":14:", true);}
-
- verify = 15;
- content.setText("L1\r\n");
- content.replaceTextRange(2, 2, "test\n\n");
-
- verify = 16;
- content.setText("L1\r\n");
- try {content.replaceTextRange(3, 1, "test\r\n");}
- catch (IllegalArgumentException ex) {assertTrue(":16:", true);}
-
- verify = 17;
- content.setText("L1\r\nL2\r\nL3\r\nL4\r\n");
- try {content.replaceTextRange(1, 2, "test\n\n");}
- catch (IllegalArgumentException ex) {assertTrue(":17:", true);}
-
- verify = 18;
- content.setText("L1\r");
- content.replaceTextRange(3, 0, "\ntest\r\n");
-
- verify = 19;
- content.setText("L1\n");
- content.replaceTextRange(2, 0, "test\r\r\r");
- verify = 20;
- content.setText("L1\r\nL2\r\nL3\r\nL4\r\n");
- try {content.replaceTextRange(3, 1, "test\n");}
- catch (IllegalArgumentException ex) {assertTrue(":20:", true);}
-
-
- verify = 0;
- content.removeTextChangeListener(this);
-}
-public void test_Delimiter_Special_Cases() {
- StyledTextContent content = getContentInstance();
- String newText;
-
- content.setText("\nL1\r\nL2\r\n");
- content.replaceTextRange(7, 2, "");
- newText = content.getTextRange(0, content.getCharCount());
- assertTrue(":1:", newText.equals("\nL1\r\nL2"));
-
- content.setText("L1\r\n");
- content.replaceTextRange(2, 2, "test\n\n");
- newText = content.getTextRange(0, content.getCharCount());
- assertTrue(":2:", newText.equals("L1test\n\n"));
-
-// content.setText("L1\r\n");
-// content.replaceTextRange(3, 1, "test\r\n");
-// newText = content.getTextRange(0, content.getCharCount());
-// assertTrue(":3:", newText.equals("L1\rtest\r\n"));
-
-// content.setText("L1\r\nL2\r\nL3\r\nL4\r\n");
-// content.replaceTextRange(1, 2, "test\n\n");
-// newText = content.getTextRange(0, content.getCharCount());
-// assertTrue(":4:", newText.equals("Ltest\n\n\nL2\r\nL3\r\nL4\r\n"));
-
- content.setText("L1\n");
- content.replaceTextRange(2, 0, "test\r\r\r");
- newText = content.getTextRange(0, content.getCharCount());
- assertTrue(":3:", newText.equals("L1test\r\r\r\n"));
-}
-protected void setUp() {
- // create shell
- shell = new Shell ();
- GridLayout layout = new GridLayout();
- layout.numColumns = 1;
- shell.setSize(500, 300);
- shell.setLayout(layout);
- // create widget
- widget = new StyledText (shell, SWT.BORDER | SWT.MULTI | SWT.V_SCROLL | SWT.H_SCROLL);
- GridData spec = new GridData();
- spec.horizontalAlignment = GridData.FILL;
- spec.grabExcessHorizontalSpace = true;
- spec.verticalAlignment = GridData.FILL;
- spec.grabExcessVerticalSpace = true;
- widget.setLayoutData(spec);
- shell.open ();
-}
-protected void tearDown() {
- if (shell != null && !shell.isDisposed ())
- shell.dispose ();
- shell = null;
-
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/SwtJunit.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/SwtJunit.java
deleted file mode 100644
index 3389409b96..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/SwtJunit.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-/**
- * Platform-specific constants used in SWT test cases.
- */
-public class SwtJunit {
-
- public static final String testFontName;
- public final static boolean isWindows = System.getProperty("os.name").startsWith("Win");
- public final static boolean isLinux = System.getProperty("os.name").equals("Linux");
- public final static boolean isAIX = System.getProperty("os.name").equals("AIX");
- public final static boolean isSolaris = System.getProperty("os.name").equals("Solaris") || System.getProperty("os.name").equals("SunOS");
- public final static boolean isHPUX = System.getProperty("os.name").equals("HP-UX");
- public final static boolean isCarbon = System.getProperty("os.name").startsWith("Mac");
-
- public final static boolean isMotif = /*!isGTK &&*/ isLinux || isAIX || isSolaris || isHPUX;
-
- static {
- if (isMotif) {
- testFontName = "misc-fixed";
- }
- else {
- testFontName = "Helvetica";
- }
- }
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/SwtTestCase.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/SwtTestCase.java
deleted file mode 100644
index c8d5943c3a..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/SwtTestCase.java
+++ /dev/null
@@ -1,222 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import java.io.*;
-import junit.framework.*;
-import org.eclipse.swt.*;
-import org.eclipse.swt.internal.*;
-
-public class SwtTestCase extends TestCase {
- /**
- * The following flags are used to mark test cases that
- * are not handled correctly by SWT at this time, or test
- * cases that maybe themselves dubious (eg. when the correct
- * behaviour may not be clear). Most of these flagged test
- * cases involve handling error conditions.
- *
- * Setting these flags to true will run those tests. As api
- * is implemented this gives us a convenient way to include
- * it in the junit tests.
- */
-
- // run test cases that may themselves be dubious
- // these should be eventually checked to see if
- // there is a valid failure or the test is bogus
- public static boolean fCheckBogusTestCases = false;
-
- // check visibility api (eg in menu)
- public static boolean fCheckVisibility = false;
-
- // run test cases that check SWT policy not covered by the flags above
- public static boolean fCheckSWTPolicy = false;
-
- // make dialog open calls, operator must then close them
- public static boolean fTestDialogOpen = false;
-
- // variable to keep track of the number of unimplemented methods
- public static int unimplementedMethods;
-
- // variable to keep track of the number of unimplemented API methods
- public static int unimplementedAPI;
-
- // used to specify verbose mode, if true unimplemented warning messages will
- // be written to System.out
- public static boolean verbose = false;
-
- // allow specific image formats to be tested
- public static String[] imageFormats = new String[] {"bmp", "jpg", "gif", "png"};
- public static String[] imageFilenames = new String[] {"folder", "folderOpen", "target"};
- public static String[] invalidImageFilenames = new String[] {"corrupt", "corruptBadBitDepth.png"};
- public static String[] transparentImageFilenames = new String[] {"transparent.png"};
-
- // specify reparentable platforms
- public static String[] reparentablePlatforms = new String[] {"win32", "gtk"};
-
-public SwtTestCase(String name) {
- super(name);
-}
-static public void assertSame(String message, Object expected[], Object actual[]) {
- if (expected == null && actual == null) return;
- boolean same = false;
- if (expected != null && actual != null && expected.length == actual.length) {
- if (expected.length == 0) return;
- same = true;
- boolean[] matched = new boolean[expected.length];
- for (int i = 0; i < actual.length; i++) {
- boolean match = false;
- for (int j = 0; j < expected.length; j++) {
- if (!matched[j]) {
- if ((actual[i] == null && expected [j] == null) ||
- (actual[i] != null && actual[i].equals(expected[j]))) {
- match = true;
- matched[j] = true;
- break;
- }
- }
- }
- if (!match) {
- same = false;
- break;
- }
- }
- }
- if (!same) {
- failNotEquals(message, expected, actual);
- }
-}
-static public void assertSame(Object expected[], Object actual[]) {
- assertSame(null, expected, actual);
-}
-static public void assertSame(String message, int expected[], int actual[]) {
- if (expected == null && actual == null) return;
- boolean same = false;
- if (expected != null && actual != null && expected.length == actual.length) {
- if (expected.length == 0) return;
- same = true;
- boolean[] matched = new boolean[expected.length];
- for (int i = 0; i < actual.length; i++) {
- boolean match = false;
- for (int j = 0; j < expected.length; j++) {
- if (!matched[j] && actual[i] == expected[j]) {
- match = true;
- matched[j] = true;
- break;
- }
- }
- if (!match) {
- same = false;
- break;
- }
- }
- }
- if (!same) {
- failNotEquals(message, expected, actual);
- }
-}
-static public void assertSame(int expected[], int actual[]) {
- assertSame(null, expected, actual);
-}
-static public void assertEquals(String message, Object expected[], Object actual[]) {
- if (expected == null && actual == null)
- return;
- boolean equal = false;
- if (expected != null && actual != null && expected.length == actual.length) {
- if (expected.length == 0)
- return;
- equal = true;
- for (int i = 0; i < expected.length; i++) {
- if (!expected[i].equals(actual[i])) {
- equal = false;
- }
- }
- }
- if (!equal) {
- failNotEquals(message, expected, actual);
- }
-}
-static public void assertEquals(String message, int expectedCode, Throwable actualThrowable) {
- if (actualThrowable instanceof SWTError) {
- SWTError error = (SWTError) actualThrowable;
- assertEquals(message, expectedCode, error.code);
- } else if (actualThrowable instanceof SWTException) {
- SWTException exception = (SWTException) actualThrowable;
- assertEquals(message, expectedCode, exception.code);
- } else {
- try {
- SWT.error(expectedCode);
- } catch (Throwable expectedThrowable) {
- assertEquals(message, expectedThrowable.getMessage(), actualThrowable.getMessage());
- }
- }
-}
-static public void assertEquals(Object expected[], Object actual[]) {
- assertEquals(null, expected, actual);
-}
-static public void assertEquals(String message, int expected[], int actual[]) {
- if (expected == null && actual == null)
- return;
- boolean equal = false;
- if (expected != null && actual != null && expected.length == actual.length) {
- if (expected.length == 0)
- return;
- equal = true;
- for (int i = 0; i < expected.length; i++) {
- if (expected[i] != actual[i]) {
- equal = false;
- }
- }
- }
- if (!equal) {
- failNotEquals(message, expected, actual);
- }
-}
-static public void assertEquals(int expected[], int actual[]) {
- assertEquals(null, expected, actual);
-}
-// copied exactly from junit.framework.TestCase so that it can be called from here even though private
-static private void failNotEquals(String message, Object expected, Object actual) {
- String formatted= "";
- if (message != null)
- formatted= message+" ";
- fail(formatted+"expected:<"+expected+"> but was:<"+actual+">");
-}
-protected boolean isJ2ME() {
- try {
- Compatibility.newFileInputStream("");
- } catch (FileNotFoundException e) {
- return false;
- } catch (IOException e) {
- }
- return true;
-}
-protected boolean isReparentablePlatform() {
- String platform = SWT.getPlatform();
- for (int i=0; i<reparentablePlatforms.length; i++) {
- if (reparentablePlatforms[i].equals(platform)) return true;
- }
- return false;
-}
-
-protected void warnUnimpl(String message) {
- if (verbose) {
- System.out.println(this.getClass() + ": " + message);
- }
- unimplementedMethods++;
-}
-protected void warnUnimplAPI(String message) {
- if (verbose) {
- System.out.println("API not implemented " + this.getClass() + " " + getName());
- }
- unimplementedAPI++;
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_SWT.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_SWT.java
deleted file mode 100644
index eb214de7e2..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_SWT.java
+++ /dev/null
@@ -1,159 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-import org.eclipse.swt.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.SWT
- *
- * @see org.eclipse.swt.SWT
- */
-public class Test_org_eclipse_swt_SWT extends SwtTestCase {
-
-public Test_org_eclipse_swt_SWT(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
-}
-
-protected void tearDown() {
-}
-
-public void test_Constructor() {
- // Do nothing. Class SWT is not intended to be subclassed.
-}
-
-public void test_errorI() {
- // Test that we throw the expected kinds of errors for the given error types.
- boolean passed = false;
- try {
- SWT.error(SWT.ERROR_NULL_ARGUMENT);
- } catch (IllegalArgumentException ex) {
- passed = true;
- } catch (Throwable t) { }
- assertTrue ("did not correctly throw exception for ERROR_NULL_ARGUMENT", passed);
- passed = false;
- try {
- SWT.error(SWT.ERROR_FAILED_EXEC);
- } catch (SWTException ex) {
- passed = true;
- } catch (Throwable t) { }
- assertTrue ("did not correctly throw exception for ERROR_FAILED_EXEC", passed);
- passed = false;
- try {
- SWT.error(SWT.ERROR_NO_HANDLES);
- } catch (SWTError ex) {
- passed = true;
- } catch (Throwable t) { }
- assertTrue ("did not correctly throw exception for ERROR_NO_HANDLES", passed);
- passed = false;
- try {
- SWT.error(-1);
- } catch (SWTError ex) {
- passed = true;
- } catch (Throwable t) { }
- assertTrue ("did not correctly throw exception for error(-1)", passed);
-}
-
-public void test_errorILjava_lang_Throwable() {
- // Test that the causing throwable is filled in.
- Throwable cause = new RuntimeException("Just for testing");
- boolean passed = false;
- try {
- SWT.error(SWT.ERROR_UNSUPPORTED_FORMAT, cause);
- } catch (SWTException ex) {
- passed = ex.throwable == cause;
- } catch (Throwable t) { }
- assertTrue ("did not correctly throw exception for ERROR_UNSUPPORTED_FORMAT", passed);
- passed = false;
- try {
- SWT.error(SWT.ERROR_NOT_IMPLEMENTED, cause);
- } catch (SWTError ex) {
- passed = ex.throwable == cause;
- } catch (Throwable t) { }
- assertTrue ("did not correctly throw exception for ERROR_NOT_IMPLEMENTED", passed);
- passed = false;
- try {
- SWT.error(-1, cause);
- } catch (SWTError ex) {
- passed = ex.throwable == cause;
- } catch (Throwable t) { }
- assertTrue ("did not correctly throw exception for error(-1)", passed);
-}
-
-public void test_getMessageLjava_lang_String() {
- boolean passed = false;
- try {
- passed = false;
- SWT.getMessage(null);
- } catch (IllegalArgumentException ex) {
- passed = true;
- }
- assertTrue ("did not correctly throw exception with null argument", passed);
- try {
- SWT.getMessage("SWT_Yes");
- } catch (Throwable t) {
- fail ("exception " + t + " generated for SWT_Yes");
- }
- assertTrue (
- "invalid key did not return as itself",
- "_NOT_FOUND_IN_PROPERTIES_".equals(SWT.getMessage("_NOT_FOUND_IN_PROPERTIES_")));
-
-}
-
-public void test_getPlatform() {
- // Can't test the list of platforms, since this may change,
- // so just test to see it returns something.
- assertTrue ("returned null platform name", SWT.getPlatform() != null);
-}
-
-public void test_getVersion() {
- // Test that the version number which is returned is reasonable.
- int ver = SWT.getVersion();
- assertTrue ("unreasonable value returned", ver > 0 && ver < 1000000);
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_SWT((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_Constructor");
- methodNames.addElement("test_errorI");
- methodNames.addElement("test_errorILjava_lang_Throwable");
- methodNames.addElement("test_getMessageLjava_lang_String");
- methodNames.addElement("test_getPlatform");
- methodNames.addElement("test_getVersion");
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_Constructor")) test_Constructor();
- else if (getName().equals("test_errorI")) test_errorI();
- else if (getName().equals("test_errorILjava_lang_Throwable")) test_errorILjava_lang_Throwable();
- else if (getName().equals("test_getMessageLjava_lang_String")) test_getMessageLjava_lang_String();
- else if (getName().equals("test_getPlatform")) test_getPlatform();
- else if (getName().equals("test_getVersion")) test_getVersion();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_SWTError.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_SWTError.java
deleted file mode 100644
index 385ee65a4d..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_SWTError.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import java.io.*;
-import junit.framework.*;
-import junit.textui.*;
-import org.eclipse.swt.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.SWTError
- *
- * @see org.eclipse.swt.SWTError
- */
-public class Test_org_eclipse_swt_SWTError extends SwtTestCase {
-
-public Test_org_eclipse_swt_SWTError(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
-}
-
-protected void tearDown() {
-}
-
-public void test_Constructor() {
- assertTrue (
- "did not fill in code properly",
- new SWTError().code == SWT.ERROR_UNSPECIFIED);
-}
-
-public void test_ConstructorI() {
- assertTrue (
- "did not fill in code properly",
- new SWTError(SWT.ERROR_CANNOT_BE_ZERO).code == SWT.ERROR_CANNOT_BE_ZERO);
-}
-
-public void test_ConstructorILjava_lang_String() {
- assertTrue (
- "did not fill in code properly",
- new SWTError(SWT.ERROR_CANNOT_BE_ZERO, "An uninteresting message").code
- == SWT.ERROR_CANNOT_BE_ZERO);
-}
-
-public void test_ConstructorLjava_lang_String() {
- assertTrue (
- "did not fill in code properly",
- new SWTError("An uninteresting message").code == SWT.ERROR_UNSPECIFIED);
-}
-
-public void test_getMessage() {
- assertTrue (
- "did not include creation string in result",
- new SWTError(SWT.ERROR_CANNOT_BE_ZERO, "An interesting message").getMessage()
- .indexOf("An interesting message") >= 0);
-}
-
-public void test_printStackTrace() {
-
- // WARNING: this test is not CLDC safe, because it requires java.io.PrintStream
-
- try {
- Class.forName("java.io.PrintStream");
- } catch (ClassNotFoundException e) {
- // ignore test if running on CLDC
- return;
- }
-
- // test default SWTError
-
- ByteArrayOutputStream out = new ByteArrayOutputStream();
- System.setErr(new PrintStream(out));
- SWTError error = new SWTError();
- error.printStackTrace();
- assertTrue(out.size() > 0);
- assertTrue(new String(out.toByteArray()).indexOf("test_printStackTrace") != -1);
-
- // test SWTError with code
-
- out = new ByteArrayOutputStream();
- System.setErr(new PrintStream(out));
- error = new SWTError(SWT.ERROR_INVALID_ARGUMENT);
- error.printStackTrace();
- assertTrue(out.size() > 0);
- assertTrue(new String(out.toByteArray()).indexOf("test_printStackTrace") != -1);
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_SWTError((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_Constructor");
- methodNames.addElement("test_ConstructorI");
- methodNames.addElement("test_ConstructorILjava_lang_String");
- methodNames.addElement("test_ConstructorLjava_lang_String");
- methodNames.addElement("test_getMessage");
- methodNames.addElement("test_printStackTrace");
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_Constructor")) test_Constructor();
- else if (getName().equals("test_ConstructorI")) test_ConstructorI();
- else if (getName().equals("test_ConstructorILjava_lang_String")) test_ConstructorILjava_lang_String();
- else if (getName().equals("test_ConstructorLjava_lang_String")) test_ConstructorLjava_lang_String();
- else if (getName().equals("test_getMessage")) test_getMessage();
- else if (getName().equals("test_printStackTrace")) test_printStackTrace();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_SWTException.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_SWTException.java
deleted file mode 100644
index a3bbebf675..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_SWTException.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import java.io.*;
-import junit.framework.*;
-import junit.textui.*;
-import org.eclipse.swt.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.SWTException
- *
- * @see org.eclipse.swt.SWTException
- */
-public class Test_org_eclipse_swt_SWTException extends SwtTestCase {
-
-public Test_org_eclipse_swt_SWTException(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
-}
-
-protected void tearDown() {
-}
-
-public void test_Constructor() {
- assertTrue (
- "did not fill in code properly",
- new SWTException().code == SWT.ERROR_UNSPECIFIED);
-}
-
-public void test_ConstructorI() {
- assertTrue (
- "did not fill in code properly",
- new SWTException(SWT.ERROR_CANNOT_BE_ZERO).code == SWT.ERROR_CANNOT_BE_ZERO);
-}
-
-public void test_ConstructorILjava_lang_String() {
- assertTrue (
- "did not fill in code properly",
- new SWTException(SWT.ERROR_CANNOT_BE_ZERO, "An uninteresting message").code
- == SWT.ERROR_CANNOT_BE_ZERO);
-}
-
-public void test_ConstructorLjava_lang_String() {
- assertTrue (
- "did not fill in code properly",
- new SWTException("An uninteresting message").code == SWT.ERROR_UNSPECIFIED);
-}
-
-public void test_getMessage() {
- assertTrue (
- "did not include creation string in result",
- new SWTException(SWT.ERROR_CANNOT_BE_ZERO, "An interesting message").getMessage()
- .indexOf("An interesting message") >= 0);
-}
-
-public void test_printStackTrace() {
-
- // WARNING: this test is not CLDC safe, because it requires java.io.PrintStream
-
- try {
- Class.forName("java.io.PrintStream");
- } catch (ClassNotFoundException e) {
- // ignore test if running on CLDC
- return;
- }
-
- // test default SWTException
-
- ByteArrayOutputStream out = new ByteArrayOutputStream();
- System.setErr(new PrintStream(out));
- SWTException error = new SWTException();
- error.printStackTrace();
- assertTrue(out.size() > 0);
- assertTrue(new String(out.toByteArray()).indexOf("test_printStackTrace") != -1);
-
- // test SWTException with code
-
- out = new ByteArrayOutputStream();
- System.setErr(new PrintStream(out));
- error = new SWTException(SWT.ERROR_INVALID_ARGUMENT);
- error.printStackTrace();
- assertTrue(out.size() > 0);
- assertTrue(new String(out.toByteArray()).indexOf("test_printStackTrace") != -1);
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_SWTException((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_Constructor");
- methodNames.addElement("test_ConstructorI");
- methodNames.addElement("test_ConstructorILjava_lang_String");
- methodNames.addElement("test_ConstructorLjava_lang_String");
- methodNames.addElement("test_getMessage");
- methodNames.addElement("test_printStackTrace");
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_Constructor")) test_Constructor();
- else if (getName().equals("test_ConstructorI")) test_ConstructorI();
- else if (getName().equals("test_ConstructorILjava_lang_String")) test_ConstructorILjava_lang_String();
- else if (getName().equals("test_ConstructorLjava_lang_String")) test_ConstructorLjava_lang_String();
- else if (getName().equals("test_getMessage")) test_getMessage();
- else if (getName().equals("test_printStackTrace")) test_printStackTrace();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_accessibility_ACC.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_accessibility_ACC.java
deleted file mode 100644
index cccdd4e8a5..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_accessibility_ACC.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.accessibility.ACC
- *
- * @see org.eclipse.swt.accessibility.ACC
- */
-public class Test_org_eclipse_swt_accessibility_ACC extends SwtTestCase {
-
-public Test_org_eclipse_swt_accessibility_ACC(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
-}
-
-protected void tearDown() {
-}
-
-public void test_Constructor() {
- warnUnimpl("Test test_Constructor not written");
-}
-
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_accessibility_ACC((String)e.nextElement()));
- }
- return suite;
-}
-
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_Constructor");
- return methodNames;
-}
-
-protected void runTest() throws Throwable {
- if (getName().equals("test_Constructor")) test_Constructor();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_accessibility_Accessible.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_accessibility_Accessible.java
deleted file mode 100644
index f08876ae0f..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_accessibility_Accessible.java
+++ /dev/null
@@ -1,198 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.accessibility.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.accessibility.Accessible
- *
- * @see org.eclipse.swt.accessibility.Accessible
- */
-public class Test_org_eclipse_swt_accessibility_Accessible extends SwtTestCase {
-
-public Test_org_eclipse_swt_accessibility_Accessible(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- shell = new Shell();
- accessible = shell.getAccessible();
-}
-
-protected void tearDown() {
- assertEquals(false, shell.isDisposed());
- shell.dispose();
- assertTrue(shell.isDisposed());
-}
-
-public void test_addAccessibleControlListenerLorg_eclipse_swt_accessibility_AccessibleControlListener() {
- AccessibleControlListener listener = new AccessibleControlListener() {
- public void getValue(AccessibleControlEvent e) {
- }
- public void getChild(AccessibleControlEvent e) {
- }
- public void getChildAtPoint(AccessibleControlEvent e) {
- }
- public void getChildCount(AccessibleControlEvent e) {
- }
- public void getChildren(AccessibleControlEvent e) {
- }
- public void getDefaultAction(AccessibleControlEvent e) {
- }
- public void getFocus(AccessibleControlEvent e) {
- }
- public void getLocation(AccessibleControlEvent e) {
- }
- public void getRole(AccessibleControlEvent e) {
- }
- public void getSelection(AccessibleControlEvent e) {
- }
- public void getState(AccessibleControlEvent e) {
- }
- };
- accessible.addAccessibleControlListener(listener);
- accessible.removeAccessibleControlListener(listener);
-}
-
-public void test_addAccessibleListenerLorg_eclipse_swt_accessibility_AccessibleListener() {
- AccessibleListener listener = new AccessibleListener() {
- public void getName(AccessibleEvent e) {
- }
- public void getDescription(AccessibleEvent e) {
- }
- public void getHelp(AccessibleEvent e) {
- }
- public void getKeyboardShortcut(AccessibleEvent e) {
- }
- };
- accessible.addAccessibleListener(listener);
- accessible.removeAccessibleListener(listener);
-}
-
-public void test_addAccessibleTextListenerLorg_eclipse_swt_accessibility_AccessibleTextListener() {
- AccessibleTextListener listener = new AccessibleTextListener() {
- public void getSelectionRange(AccessibleTextEvent e) {
- }
- public void getCaretOffset(AccessibleTextEvent e) {
- }
- };
- accessible.addAccessibleTextListener(listener);
- accessible.removeAccessibleTextListener(listener);
-}
-
-public void test_getControl() {
- assertEquals(shell, accessible.getControl());
-}
-
-public void test_internal_WM_GETOBJECTII() {
- warnUnimpl("Test test_internal_WM_GETOBJECTII not written");
-}
-
-public void test_internal_dispose_Accessible() {
- warnUnimpl("Test test_internal_dispose_Accessible not written");
-}
-
-public void test_internal_new_AccessibleLorg_eclipse_swt_widgets_Control() {
- warnUnimpl("Test test_internal_new_AccessibleLorg_eclipse_swt_widgets_Control not written");
-}
-
-public void test_removeAccessibleControlListenerLorg_eclipse_swt_accessibility_AccessibleControlListener() {
- // Tested in test_addAccessibleControlListenerLorg_eclipse_swt_accessibility_AccessibleControlListener.
-}
-
-public void test_removeAccessibleListenerLorg_eclipse_swt_accessibility_AccessibleListener() {
- // Tested in test_addAccessibleListenerLorg_eclipse_swt_accessibility_AccessibleListener.
-}
-
-public void test_removeAccessibleTextListenerLorg_eclipse_swt_accessibility_AccessibleTextListener() {
- // Tested in test_addAccessibleTextListenerLorg_eclipse_swt_accessibility_AccessibleTextListener.
-}
-
-public void test_selectionChanged() {
- warnUnimpl("Test test_selectionChanged not written");
-}
-
-public void test_setFocusI() {
- warnUnimpl("Test test_setFocusI not written");
-}
-
-public void test_textCaretMovedI() {
- warnUnimpl("Test test_textCaretMovedI not written");
-}
-
-public void test_textChangedIII() {
- warnUnimpl("Test test_textChangedIII not written");
-}
-
-public void test_textSelectionChanged() {
- warnUnimpl("Test test_textSelectionChanged not written");
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_accessibility_Accessible((String)e.nextElement()));
- }
- return suite;
-}
-
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_addAccessibleControlListenerLorg_eclipse_swt_accessibility_AccessibleControlListener");
- methodNames.addElement("test_addAccessibleListenerLorg_eclipse_swt_accessibility_AccessibleListener");
- methodNames.addElement("test_addAccessibleTextListenerLorg_eclipse_swt_accessibility_AccessibleTextListener");
- methodNames.addElement("test_getControl");
- methodNames.addElement("test_internal_WM_GETOBJECTII");
- methodNames.addElement("test_internal_dispose_Accessible");
- methodNames.addElement("test_internal_new_AccessibleLorg_eclipse_swt_widgets_Control");
- methodNames.addElement("test_removeAccessibleControlListenerLorg_eclipse_swt_accessibility_AccessibleControlListener");
- methodNames.addElement("test_removeAccessibleListenerLorg_eclipse_swt_accessibility_AccessibleListener");
- methodNames.addElement("test_removeAccessibleTextListenerLorg_eclipse_swt_accessibility_AccessibleTextListener");
- methodNames.addElement("test_selectionChanged");
- methodNames.addElement("test_setFocusI");
- methodNames.addElement("test_textCaretMovedI");
- methodNames.addElement("test_textChangedIII");
- methodNames.addElement("test_textSelectionChanged");
- return methodNames;
-}
-
-protected void runTest() throws Throwable {
- if (getName().equals("test_addAccessibleControlListenerLorg_eclipse_swt_accessibility_AccessibleControlListener")) test_addAccessibleControlListenerLorg_eclipse_swt_accessibility_AccessibleControlListener();
- else if (getName().equals("test_addAccessibleListenerLorg_eclipse_swt_accessibility_AccessibleListener")) test_addAccessibleListenerLorg_eclipse_swt_accessibility_AccessibleListener();
- else if (getName().equals("test_addAccessibleTextListenerLorg_eclipse_swt_accessibility_AccessibleTextListener")) test_addAccessibleTextListenerLorg_eclipse_swt_accessibility_AccessibleTextListener();
- else if (getName().equals("test_getControl")) test_getControl();
- else if (getName().equals("test_internal_WM_GETOBJECTII")) test_internal_WM_GETOBJECTII();
- else if (getName().equals("test_internal_dispose_Accessible")) test_internal_dispose_Accessible();
- else if (getName().equals("test_internal_new_AccessibleLorg_eclipse_swt_widgets_Control")) test_internal_new_AccessibleLorg_eclipse_swt_widgets_Control();
- else if (getName().equals("test_removeAccessibleControlListenerLorg_eclipse_swt_accessibility_AccessibleControlListener")) test_removeAccessibleControlListenerLorg_eclipse_swt_accessibility_AccessibleControlListener();
- else if (getName().equals("test_removeAccessibleListenerLorg_eclipse_swt_accessibility_AccessibleListener")) test_removeAccessibleListenerLorg_eclipse_swt_accessibility_AccessibleListener();
- else if (getName().equals("test_removeAccessibleTextListenerLorg_eclipse_swt_accessibility_AccessibleTextListener")) test_removeAccessibleTextListenerLorg_eclipse_swt_accessibility_AccessibleTextListener();
- else if (getName().equals("test_selectionChanged")) test_selectionChanged();
- else if (getName().equals("test_setFocusI")) test_setFocusI();
- else if (getName().equals("test_textCaretMovedI")) test_textCaretMovedI();
- else if (getName().equals("test_textChangedIII")) test_textChangedIII();
- else if (getName().equals("test_textSelectionChanged")) test_textSelectionChanged();
-}
-
-/* custom */
-private Shell shell;
-private Accessible accessible;
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_accessibility_AccessibleAdapter.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_accessibility_AccessibleAdapter.java
deleted file mode 100644
index cf41b889ff..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_accessibility_AccessibleAdapter.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.accessibility.AccessibleAdapter
- *
- * @see org.eclipse.swt.accessibility.AccessibleAdapter
- */
-public class Test_org_eclipse_swt_accessibility_AccessibleAdapter extends SwtTestCase {
-
-public Test_org_eclipse_swt_accessibility_AccessibleAdapter(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
-}
-
-protected void tearDown() {
-}
-
-public void test_Constructor() {
- warnUnimpl("Test test_Constructor not written");
-}
-
-public void test_getDescriptionLorg_eclipse_swt_accessibility_AccessibleEvent() {
- warnUnimpl("Test test_getDescriptionLorg_eclipse_swt_accessibility_AccessibleEvent not written");
-}
-
-public void test_getHelpLorg_eclipse_swt_accessibility_AccessibleEvent() {
- warnUnimpl("Test test_getHelpLorg_eclipse_swt_accessibility_AccessibleEvent not written");
-}
-
-public void test_getKeyboardShortcutLorg_eclipse_swt_accessibility_AccessibleEvent() {
- warnUnimpl("Test test_getKeyboardShortcutLorg_eclipse_swt_accessibility_AccessibleEvent not written");
-}
-
-public void test_getNameLorg_eclipse_swt_accessibility_AccessibleEvent() {
- warnUnimpl("Test test_getNameLorg_eclipse_swt_accessibility_AccessibleEvent not written");
-}
-
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_accessibility_AccessibleAdapter((String)e.nextElement()));
- }
- return suite;
-}
-
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_Constructor");
- methodNames.addElement("test_getDescriptionLorg_eclipse_swt_accessibility_AccessibleEvent");
- methodNames.addElement("test_getHelpLorg_eclipse_swt_accessibility_AccessibleEvent");
- methodNames.addElement("test_getKeyboardShortcutLorg_eclipse_swt_accessibility_AccessibleEvent");
- methodNames.addElement("test_getNameLorg_eclipse_swt_accessibility_AccessibleEvent");
- return methodNames;
-}
-
-protected void runTest() throws Throwable {
- if (getName().equals("test_Constructor")) test_Constructor();
- else if (getName().equals("test_getDescriptionLorg_eclipse_swt_accessibility_AccessibleEvent")) test_getDescriptionLorg_eclipse_swt_accessibility_AccessibleEvent();
- else if (getName().equals("test_getHelpLorg_eclipse_swt_accessibility_AccessibleEvent")) test_getHelpLorg_eclipse_swt_accessibility_AccessibleEvent();
- else if (getName().equals("test_getKeyboardShortcutLorg_eclipse_swt_accessibility_AccessibleEvent")) test_getKeyboardShortcutLorg_eclipse_swt_accessibility_AccessibleEvent();
- else if (getName().equals("test_getNameLorg_eclipse_swt_accessibility_AccessibleEvent")) test_getNameLorg_eclipse_swt_accessibility_AccessibleEvent();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_accessibility_AccessibleControlAdapter.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_accessibility_AccessibleControlAdapter.java
deleted file mode 100644
index a905c260f0..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_accessibility_AccessibleControlAdapter.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.accessibility.AccessibleControlAdapter
- *
- * @see org.eclipse.swt.accessibility.AccessibleControlAdapter
- */
-public class Test_org_eclipse_swt_accessibility_AccessibleControlAdapter extends SwtTestCase {
-
-public Test_org_eclipse_swt_accessibility_AccessibleControlAdapter(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
-}
-
-protected void tearDown() {
-}
-
-public void test_Constructor() {
- warnUnimpl("Test test_Constructor not written");
-}
-
-public void test_getChildAtPointLorg_eclipse_swt_accessibility_AccessibleControlEvent() {
- warnUnimpl("Test test_getChildAtPointLorg_eclipse_swt_accessibility_AccessibleControlEvent not written");
-}
-
-public void test_getChildCountLorg_eclipse_swt_accessibility_AccessibleControlEvent() {
- warnUnimpl("Test test_getChildCountLorg_eclipse_swt_accessibility_AccessibleControlEvent not written");
-}
-
-public void test_getChildLorg_eclipse_swt_accessibility_AccessibleControlEvent() {
- warnUnimpl("Test test_getChildLorg_eclipse_swt_accessibility_AccessibleControlEvent not written");
-}
-
-public void test_getChildrenLorg_eclipse_swt_accessibility_AccessibleControlEvent() {
- warnUnimpl("Test test_getChildrenLorg_eclipse_swt_accessibility_AccessibleControlEvent not written");
-}
-
-public void test_getDefaultActionLorg_eclipse_swt_accessibility_AccessibleControlEvent() {
- warnUnimpl("Test test_getDefaultActionLorg_eclipse_swt_accessibility_AccessibleControlEvent not written");
-}
-
-public void test_getFocusLorg_eclipse_swt_accessibility_AccessibleControlEvent() {
- warnUnimpl("Test test_getFocusLorg_eclipse_swt_accessibility_AccessibleControlEvent not written");
-}
-
-public void test_getLocationLorg_eclipse_swt_accessibility_AccessibleControlEvent() {
- warnUnimpl("Test test_getLocationLorg_eclipse_swt_accessibility_AccessibleControlEvent not written");
-}
-
-public void test_getRoleLorg_eclipse_swt_accessibility_AccessibleControlEvent() {
- warnUnimpl("Test test_getRoleLorg_eclipse_swt_accessibility_AccessibleControlEvent not written");
-}
-
-public void test_getSelectionLorg_eclipse_swt_accessibility_AccessibleControlEvent() {
- warnUnimpl("Test test_getSelectionLorg_eclipse_swt_accessibility_AccessibleControlEvent not written");
-}
-
-public void test_getStateLorg_eclipse_swt_accessibility_AccessibleControlEvent() {
- warnUnimpl("Test test_getStateLorg_eclipse_swt_accessibility_AccessibleControlEvent not written");
-}
-
-public void test_getValueLorg_eclipse_swt_accessibility_AccessibleControlEvent() {
- warnUnimpl("Test test_getValueLorg_eclipse_swt_accessibility_AccessibleControlEvent not written");
-}
-
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_accessibility_AccessibleControlAdapter((String)e.nextElement()));
- }
- return suite;
-}
-
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_Constructor");
- methodNames.addElement("test_getChildAtPointLorg_eclipse_swt_accessibility_AccessibleControlEvent");
- methodNames.addElement("test_getChildCountLorg_eclipse_swt_accessibility_AccessibleControlEvent");
- methodNames.addElement("test_getChildLorg_eclipse_swt_accessibility_AccessibleControlEvent");
- methodNames.addElement("test_getChildrenLorg_eclipse_swt_accessibility_AccessibleControlEvent");
- methodNames.addElement("test_getDefaultActionLorg_eclipse_swt_accessibility_AccessibleControlEvent");
- methodNames.addElement("test_getFocusLorg_eclipse_swt_accessibility_AccessibleControlEvent");
- methodNames.addElement("test_getLocationLorg_eclipse_swt_accessibility_AccessibleControlEvent");
- methodNames.addElement("test_getRoleLorg_eclipse_swt_accessibility_AccessibleControlEvent");
- methodNames.addElement("test_getSelectionLorg_eclipse_swt_accessibility_AccessibleControlEvent");
- methodNames.addElement("test_getStateLorg_eclipse_swt_accessibility_AccessibleControlEvent");
- methodNames.addElement("test_getValueLorg_eclipse_swt_accessibility_AccessibleControlEvent");
- return methodNames;
-}
-
-protected void runTest() throws Throwable {
- if (getName().equals("test_Constructor")) test_Constructor();
- else if (getName().equals("test_getChildAtPointLorg_eclipse_swt_accessibility_AccessibleControlEvent")) test_getChildAtPointLorg_eclipse_swt_accessibility_AccessibleControlEvent();
- else if (getName().equals("test_getChildCountLorg_eclipse_swt_accessibility_AccessibleControlEvent")) test_getChildCountLorg_eclipse_swt_accessibility_AccessibleControlEvent();
- else if (getName().equals("test_getChildLorg_eclipse_swt_accessibility_AccessibleControlEvent")) test_getChildLorg_eclipse_swt_accessibility_AccessibleControlEvent();
- else if (getName().equals("test_getChildrenLorg_eclipse_swt_accessibility_AccessibleControlEvent")) test_getChildrenLorg_eclipse_swt_accessibility_AccessibleControlEvent();
- else if (getName().equals("test_getDefaultActionLorg_eclipse_swt_accessibility_AccessibleControlEvent")) test_getDefaultActionLorg_eclipse_swt_accessibility_AccessibleControlEvent();
- else if (getName().equals("test_getFocusLorg_eclipse_swt_accessibility_AccessibleControlEvent")) test_getFocusLorg_eclipse_swt_accessibility_AccessibleControlEvent();
- else if (getName().equals("test_getLocationLorg_eclipse_swt_accessibility_AccessibleControlEvent")) test_getLocationLorg_eclipse_swt_accessibility_AccessibleControlEvent();
- else if (getName().equals("test_getRoleLorg_eclipse_swt_accessibility_AccessibleControlEvent")) test_getRoleLorg_eclipse_swt_accessibility_AccessibleControlEvent();
- else if (getName().equals("test_getSelectionLorg_eclipse_swt_accessibility_AccessibleControlEvent")) test_getSelectionLorg_eclipse_swt_accessibility_AccessibleControlEvent();
- else if (getName().equals("test_getStateLorg_eclipse_swt_accessibility_AccessibleControlEvent")) test_getStateLorg_eclipse_swt_accessibility_AccessibleControlEvent();
- else if (getName().equals("test_getValueLorg_eclipse_swt_accessibility_AccessibleControlEvent")) test_getValueLorg_eclipse_swt_accessibility_AccessibleControlEvent();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_accessibility_AccessibleControlEvent.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_accessibility_AccessibleControlEvent.java
deleted file mode 100644
index 61e680320e..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_accessibility_AccessibleControlEvent.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.accessibility.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.accessibility.AccessibleControlEvent
- *
- * @see org.eclipse.swt.accessibility.AccessibleControlEvent
- */
-public class Test_org_eclipse_swt_accessibility_AccessibleControlEvent extends SwtTestCase {
-
-public Test_org_eclipse_swt_accessibility_AccessibleControlEvent(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- shell = new Shell();
-}
-
-protected void tearDown() {
- shell.dispose();
-}
-
-public void test_ConstructorLjava_lang_Object() {
- // Object will typically be a widget.
- AccessibleControlEvent event = new AccessibleControlEvent(shell);
- assertNotNull(event);
-
- // Test with some other object also.
- event = new AccessibleControlEvent(new Integer(5));
- assertNotNull(event);
-}
-
-public void test_toString() {
- AccessibleControlEvent event = new AccessibleControlEvent(shell);
- assertNotNull(event.toString());
- assertTrue(event.toString().length() > 0);
-}
-
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_accessibility_AccessibleControlEvent((String)e.nextElement()));
- }
- return suite;
-}
-
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLjava_lang_Object");
- methodNames.addElement("test_toString");
- return methodNames;
-}
-
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLjava_lang_Object")) test_ConstructorLjava_lang_Object();
- else if (getName().equals("test_toString")) test_toString();
-}
-
-/* custom */
-public Shell shell;
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_accessibility_AccessibleControlListener.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_accessibility_AccessibleControlListener.java
deleted file mode 100644
index 06dd19a476..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_accessibility_AccessibleControlListener.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.accessibility.AccessibleControlListener
- *
- * @see org.eclipse.swt.accessibility.AccessibleControlListener
- */
-public class Test_org_eclipse_swt_accessibility_AccessibleControlListener extends SwtTestCase {
-
-public Test_org_eclipse_swt_accessibility_AccessibleControlListener(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
-}
-
-protected void tearDown() {
-}
-
-public void test_getChildAtPointLorg_eclipse_swt_accessibility_AccessibleControlEvent() {
- warnUnimpl("Test test_getChildAtPointLorg_eclipse_swt_accessibility_AccessibleControlEvent not written");
-}
-
-public void test_getChildCountLorg_eclipse_swt_accessibility_AccessibleControlEvent() {
- warnUnimpl("Test test_getChildCountLorg_eclipse_swt_accessibility_AccessibleControlEvent not written");
-}
-
-public void test_getChildLorg_eclipse_swt_accessibility_AccessibleControlEvent() {
- warnUnimpl("Test test_getChildLorg_eclipse_swt_accessibility_AccessibleControlEvent not written");
-}
-
-public void test_getChildrenLorg_eclipse_swt_accessibility_AccessibleControlEvent() {
- warnUnimpl("Test test_getChildrenLorg_eclipse_swt_accessibility_AccessibleControlEvent not written");
-}
-
-public void test_getDefaultActionLorg_eclipse_swt_accessibility_AccessibleControlEvent() {
- warnUnimpl("Test test_getDefaultActionLorg_eclipse_swt_accessibility_AccessibleControlEvent not written");
-}
-
-public void test_getFocusLorg_eclipse_swt_accessibility_AccessibleControlEvent() {
- warnUnimpl("Test test_getFocusLorg_eclipse_swt_accessibility_AccessibleControlEvent not written");
-}
-
-public void test_getLocationLorg_eclipse_swt_accessibility_AccessibleControlEvent() {
- warnUnimpl("Test test_getLocationLorg_eclipse_swt_accessibility_AccessibleControlEvent not written");
-}
-
-public void test_getRoleLorg_eclipse_swt_accessibility_AccessibleControlEvent() {
- warnUnimpl("Test test_getRoleLorg_eclipse_swt_accessibility_AccessibleControlEvent not written");
-}
-
-public void test_getSelectionLorg_eclipse_swt_accessibility_AccessibleControlEvent() {
- warnUnimpl("Test test_getSelectionLorg_eclipse_swt_accessibility_AccessibleControlEvent not written");
-}
-
-public void test_getStateLorg_eclipse_swt_accessibility_AccessibleControlEvent() {
- warnUnimpl("Test test_getStateLorg_eclipse_swt_accessibility_AccessibleControlEvent not written");
-}
-
-public void test_getValueLorg_eclipse_swt_accessibility_AccessibleControlEvent() {
- warnUnimpl("Test test_getValueLorg_eclipse_swt_accessibility_AccessibleControlEvent not written");
-}
-
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_accessibility_AccessibleControlListener((String)e.nextElement()));
- }
- return suite;
-}
-
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_getChildAtPointLorg_eclipse_swt_accessibility_AccessibleControlEvent");
- methodNames.addElement("test_getChildCountLorg_eclipse_swt_accessibility_AccessibleControlEvent");
- methodNames.addElement("test_getChildLorg_eclipse_swt_accessibility_AccessibleControlEvent");
- methodNames.addElement("test_getChildrenLorg_eclipse_swt_accessibility_AccessibleControlEvent");
- methodNames.addElement("test_getDefaultActionLorg_eclipse_swt_accessibility_AccessibleControlEvent");
- methodNames.addElement("test_getFocusLorg_eclipse_swt_accessibility_AccessibleControlEvent");
- methodNames.addElement("test_getLocationLorg_eclipse_swt_accessibility_AccessibleControlEvent");
- methodNames.addElement("test_getRoleLorg_eclipse_swt_accessibility_AccessibleControlEvent");
- methodNames.addElement("test_getSelectionLorg_eclipse_swt_accessibility_AccessibleControlEvent");
- methodNames.addElement("test_getStateLorg_eclipse_swt_accessibility_AccessibleControlEvent");
- methodNames.addElement("test_getValueLorg_eclipse_swt_accessibility_AccessibleControlEvent");
- return methodNames;
-}
-
-protected void runTest() throws Throwable {
- if (getName().equals("test_getChildAtPointLorg_eclipse_swt_accessibility_AccessibleControlEvent")) test_getChildAtPointLorg_eclipse_swt_accessibility_AccessibleControlEvent();
- else if (getName().equals("test_getChildCountLorg_eclipse_swt_accessibility_AccessibleControlEvent")) test_getChildCountLorg_eclipse_swt_accessibility_AccessibleControlEvent();
- else if (getName().equals("test_getChildLorg_eclipse_swt_accessibility_AccessibleControlEvent")) test_getChildLorg_eclipse_swt_accessibility_AccessibleControlEvent();
- else if (getName().equals("test_getChildrenLorg_eclipse_swt_accessibility_AccessibleControlEvent")) test_getChildrenLorg_eclipse_swt_accessibility_AccessibleControlEvent();
- else if (getName().equals("test_getDefaultActionLorg_eclipse_swt_accessibility_AccessibleControlEvent")) test_getDefaultActionLorg_eclipse_swt_accessibility_AccessibleControlEvent();
- else if (getName().equals("test_getFocusLorg_eclipse_swt_accessibility_AccessibleControlEvent")) test_getFocusLorg_eclipse_swt_accessibility_AccessibleControlEvent();
- else if (getName().equals("test_getLocationLorg_eclipse_swt_accessibility_AccessibleControlEvent")) test_getLocationLorg_eclipse_swt_accessibility_AccessibleControlEvent();
- else if (getName().equals("test_getRoleLorg_eclipse_swt_accessibility_AccessibleControlEvent")) test_getRoleLorg_eclipse_swt_accessibility_AccessibleControlEvent();
- else if (getName().equals("test_getSelectionLorg_eclipse_swt_accessibility_AccessibleControlEvent")) test_getSelectionLorg_eclipse_swt_accessibility_AccessibleControlEvent();
- else if (getName().equals("test_getStateLorg_eclipse_swt_accessibility_AccessibleControlEvent")) test_getStateLorg_eclipse_swt_accessibility_AccessibleControlEvent();
- else if (getName().equals("test_getValueLorg_eclipse_swt_accessibility_AccessibleControlEvent")) test_getValueLorg_eclipse_swt_accessibility_AccessibleControlEvent();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_accessibility_AccessibleEvent.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_accessibility_AccessibleEvent.java
deleted file mode 100644
index 633d896680..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_accessibility_AccessibleEvent.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.accessibility.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.accessibility.AccessibleEvent
- *
- * @see org.eclipse.swt.accessibility.AccessibleEvent
- */
-public class Test_org_eclipse_swt_accessibility_AccessibleEvent extends SwtTestCase {
-
-public Test_org_eclipse_swt_accessibility_AccessibleEvent(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- shell = new Shell();
-}
-
-protected void tearDown() {
- shell.dispose();
-}
-
-public void test_ConstructorLjava_lang_Object() {
- // Object will typically be a widget.
- AccessibleEvent event = new AccessibleEvent(shell);
- assertNotNull(event);
-
- // Test with some other object also.
- event = new AccessibleEvent(new Integer(5));
- assertNotNull(event);
-}
-
-public void test_toString() {
- AccessibleEvent event = new AccessibleEvent(shell);
- assertNotNull(event.toString());
- assertTrue(event.toString().length() > 0);
-}
-
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_accessibility_AccessibleEvent((String)e.nextElement()));
- }
- return suite;
-}
-
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLjava_lang_Object");
- methodNames.addElement("test_toString");
- return methodNames;
-}
-
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLjava_lang_Object")) test_ConstructorLjava_lang_Object();
- else if (getName().equals("test_toString")) test_toString();
-}
-
-/* custom */
-public Shell shell;
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_accessibility_AccessibleListener.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_accessibility_AccessibleListener.java
deleted file mode 100644
index d93344fad6..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_accessibility_AccessibleListener.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.accessibility.AccessibleListener
- *
- * @see org.eclipse.swt.accessibility.AccessibleListener
- */
-public class Test_org_eclipse_swt_accessibility_AccessibleListener extends SwtTestCase {
-
-public Test_org_eclipse_swt_accessibility_AccessibleListener(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
-}
-
-protected void tearDown() {
-}
-
-public void test_getDescriptionLorg_eclipse_swt_accessibility_AccessibleEvent() {
- warnUnimpl("Test test_getDescriptionLorg_eclipse_swt_accessibility_AccessibleEvent not written");
-}
-
-public void test_getHelpLorg_eclipse_swt_accessibility_AccessibleEvent() {
- warnUnimpl("Test test_getHelpLorg_eclipse_swt_accessibility_AccessibleEvent not written");
-}
-
-public void test_getKeyboardShortcutLorg_eclipse_swt_accessibility_AccessibleEvent() {
- warnUnimpl("Test test_getKeyboardShortcutLorg_eclipse_swt_accessibility_AccessibleEvent not written");
-}
-
-public void test_getNameLorg_eclipse_swt_accessibility_AccessibleEvent() {
- warnUnimpl("Test test_getNameLorg_eclipse_swt_accessibility_AccessibleEvent not written");
-}
-
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_accessibility_AccessibleListener((String)e.nextElement()));
- }
- return suite;
-}
-
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_getDescriptionLorg_eclipse_swt_accessibility_AccessibleEvent");
- methodNames.addElement("test_getHelpLorg_eclipse_swt_accessibility_AccessibleEvent");
- methodNames.addElement("test_getKeyboardShortcutLorg_eclipse_swt_accessibility_AccessibleEvent");
- methodNames.addElement("test_getNameLorg_eclipse_swt_accessibility_AccessibleEvent");
- return methodNames;
-}
-
-protected void runTest() throws Throwable {
- if (getName().equals("test_getDescriptionLorg_eclipse_swt_accessibility_AccessibleEvent")) test_getDescriptionLorg_eclipse_swt_accessibility_AccessibleEvent();
- else if (getName().equals("test_getHelpLorg_eclipse_swt_accessibility_AccessibleEvent")) test_getHelpLorg_eclipse_swt_accessibility_AccessibleEvent();
- else if (getName().equals("test_getKeyboardShortcutLorg_eclipse_swt_accessibility_AccessibleEvent")) test_getKeyboardShortcutLorg_eclipse_swt_accessibility_AccessibleEvent();
- else if (getName().equals("test_getNameLorg_eclipse_swt_accessibility_AccessibleEvent")) test_getNameLorg_eclipse_swt_accessibility_AccessibleEvent();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_accessibility_AccessibleTextAdapter.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_accessibility_AccessibleTextAdapter.java
deleted file mode 100644
index 28cdb15a1b..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_accessibility_AccessibleTextAdapter.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.accessibility.AccessibleTextAdapter
- *
- * @see org.eclipse.swt.accessibility.AccessibleTextAdapter
- */
-public class Test_org_eclipse_swt_accessibility_AccessibleTextAdapter extends SwtTestCase {
-
-public Test_org_eclipse_swt_accessibility_AccessibleTextAdapter(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
-}
-
-protected void tearDown() {
-}
-
-public void test_Constructor() {
- warnUnimpl("Test test_Constructor not written");
-}
-
-public void test_getCaretOffsetLorg_eclipse_swt_accessibility_AccessibleTextEvent() {
- warnUnimpl("Test test_getCaretOffsetLorg_eclipse_swt_accessibility_AccessibleTextEvent not written");
-}
-
-public void test_getSelectionRangeLorg_eclipse_swt_accessibility_AccessibleTextEvent() {
- warnUnimpl("Test test_getSelectionRangeLorg_eclipse_swt_accessibility_AccessibleTextEvent not written");
-}
-
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_accessibility_AccessibleTextAdapter((String)e.nextElement()));
- }
- return suite;
-}
-
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_Constructor");
- methodNames.addElement("test_getCaretOffsetLorg_eclipse_swt_accessibility_AccessibleTextEvent");
- methodNames.addElement("test_getSelectionRangeLorg_eclipse_swt_accessibility_AccessibleTextEvent");
- return methodNames;
-}
-
-protected void runTest() throws Throwable {
- if (getName().equals("test_Constructor")) test_Constructor();
- else if (getName().equals("test_getCaretOffsetLorg_eclipse_swt_accessibility_AccessibleTextEvent")) test_getCaretOffsetLorg_eclipse_swt_accessibility_AccessibleTextEvent();
- else if (getName().equals("test_getSelectionRangeLorg_eclipse_swt_accessibility_AccessibleTextEvent")) test_getSelectionRangeLorg_eclipse_swt_accessibility_AccessibleTextEvent();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_accessibility_AccessibleTextEvent.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_accessibility_AccessibleTextEvent.java
deleted file mode 100644
index 98687b5e3a..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_accessibility_AccessibleTextEvent.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.accessibility.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.accessibility.AccessibleTextEvent
- *
- * @see org.eclipse.swt.accessibility.AccessibleTextEvent
- */
-public class Test_org_eclipse_swt_accessibility_AccessibleTextEvent extends SwtTestCase {
-
-public Test_org_eclipse_swt_accessibility_AccessibleTextEvent(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- shell = new Shell();
-}
-
-protected void tearDown() {
- shell.dispose();
-}
-
-public void test_ConstructorLjava_lang_Object() {
- // Object will typically be a widget.
- AccessibleTextEvent event = new AccessibleTextEvent(shell);
- assertNotNull(event);
-
- // Test with some other object also.
- event = new AccessibleTextEvent(new Integer(5));
- assertNotNull(event);
-}
-
-public void test_toString() {
- AccessibleTextEvent event = new AccessibleTextEvent(shell);
- assertNotNull(event.toString());
- assertTrue(event.toString().length() > 0);
-}
-
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_accessibility_AccessibleTextEvent((String)e.nextElement()));
- }
- return suite;
-}
-
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLjava_lang_Object");
- methodNames.addElement("test_toString");
- return methodNames;
-}
-
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLjava_lang_Object")) test_ConstructorLjava_lang_Object();
- else if (getName().equals("test_toString")) test_toString();
-}
-
-/* custom */
-public Shell shell;
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_accessibility_AccessibleTextListener.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_accessibility_AccessibleTextListener.java
deleted file mode 100644
index 4922d02b0c..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_accessibility_AccessibleTextListener.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.accessibility.AccessibleTextListener
- *
- * @see org.eclipse.swt.accessibility.AccessibleTextListener
- */
-public class Test_org_eclipse_swt_accessibility_AccessibleTextListener extends SwtTestCase {
-
-public Test_org_eclipse_swt_accessibility_AccessibleTextListener(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
-}
-
-protected void tearDown() {
-}
-
-public void test_getCaretOffsetLorg_eclipse_swt_accessibility_AccessibleTextEvent() {
- warnUnimpl("Test test_getCaretOffsetLorg_eclipse_swt_accessibility_AccessibleTextEvent not written");
-}
-
-public void test_getSelectionRangeLorg_eclipse_swt_accessibility_AccessibleTextEvent() {
- warnUnimpl("Test test_getSelectionRangeLorg_eclipse_swt_accessibility_AccessibleTextEvent not written");
-}
-
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_accessibility_AccessibleTextListener((String)e.nextElement()));
- }
- return suite;
-}
-
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_getCaretOffsetLorg_eclipse_swt_accessibility_AccessibleTextEvent");
- methodNames.addElement("test_getSelectionRangeLorg_eclipse_swt_accessibility_AccessibleTextEvent");
- return methodNames;
-}
-
-protected void runTest() throws Throwable {
- if (getName().equals("test_getCaretOffsetLorg_eclipse_swt_accessibility_AccessibleTextEvent")) test_getCaretOffsetLorg_eclipse_swt_accessibility_AccessibleTextEvent();
- else if (getName().equals("test_getSelectionRangeLorg_eclipse_swt_accessibility_AccessibleTextEvent")) test_getSelectionRangeLorg_eclipse_swt_accessibility_AccessibleTextEvent();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_awt_SWT_AWT.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_awt_SWT_AWT.java
deleted file mode 100644
index e9e1eb2520..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_awt_SWT_AWT.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.awt.SWT_AWT
- *
- * @see org.eclipse.swt.awt.SWT_AWT
- */
-public class Test_org_eclipse_swt_awt_SWT_AWT extends SwtTestCase {
-
-public Test_org_eclipse_swt_awt_SWT_AWT(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
-}
-
-protected void tearDown() {
-}
-
-public void test_Constructor() {
- warnUnimpl("Test test_Constructor not written");
-}
-
-public void test_new_FrameLorg_eclipse_swt_widgets_Composite() {
- warnUnimpl("Test test_new_FrameLorg_eclipse_swt_widgets_Composite not written");
-}
-
-public void test_new_ShellLorg_eclipse_swt_widgets_DisplayLjava_awt_Canvas() {
- warnUnimpl("Test test_new_ShellLorg_eclipse_swt_widgets_DisplayLjava_awt_Canvas not written");
-}
-
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_awt_SWT_AWT((String)e.nextElement()));
- }
- return suite;
-}
-
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_Constructor");
- methodNames.addElement("test_new_FrameLorg_eclipse_swt_widgets_Composite");
- methodNames.addElement("test_new_ShellLorg_eclipse_swt_widgets_DisplayLjava_awt_Canvas");
- return methodNames;
-}
-
-protected void runTest() throws Throwable {
- if (getName().equals("test_Constructor")) test_Constructor();
- else if (getName().equals("test_new_FrameLorg_eclipse_swt_widgets_Composite")) test_new_FrameLorg_eclipse_swt_widgets_Composite();
- else if (getName().equals("test_new_ShellLorg_eclipse_swt_widgets_DisplayLjava_awt_Canvas")) test_new_ShellLorg_eclipse_swt_widgets_DisplayLjava_awt_Canvas();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_browser_Browser.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_browser_Browser.java
deleted file mode 100644
index 5d9207b8f2..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_browser_Browser.java
+++ /dev/null
@@ -1,456 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-import org.eclipse.swt.*;
-import org.eclipse.swt.browser.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.browser.Browser
- *
- * @see org.eclipse.swt.browser.Browser
- */
-public class Test_org_eclipse_swt_browser_Browser extends Test_org_eclipse_swt_widgets_Composite {
-
-public Test_org_eclipse_swt_browser_Browser(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- super.setUp();
- shell.setLayout(new FillLayout());
- browser = new Browser(shell, SWT.NONE);
-}
-
-protected void tearDown() {
- super.tearDown();
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_CompositeI() {
- shell.setText("test_ConstructorLorg_eclipse_swt_widgets_CompositeI");
- Browser browser = new Browser(shell, SWT.NONE);
- browser.dispose();
- browser = new Browser(shell, SWT.BORDER);
- browser.dispose();
- try {
- browser = new Browser(null, SWT.NONE);
- fail("No exception thrown for parent == null");
- } catch (IllegalArgumentException e) {
- }
-}
-
-public void test_addCloseWindowListenerLorg_eclipse_swt_browser_CloseWindowListener() {
- shell.setText("test_addCloseWindowListenerLorg_eclipse_swt_browser_CloseWindowListener");
- try {
- browser.addCloseWindowListener(null);
- fail("No exception thrown for listener == null");
- }
- catch (IllegalArgumentException e) {
- }
-
- CloseWindowListener listener = new CloseWindowListener() {
- public void close(WindowEvent event) {
- }
- };
- for (int i = 0; i < 100; i++) browser.addCloseWindowListener(listener);
- for (int i = 0; i < 100; i++) browser.removeCloseWindowListener(listener);
-}
-
-public void test_addLocationListenerLorg_eclipse_swt_browser_LocationListener() {
- shell.setText("test_addLocationListenerLorg_eclipse_swt_browser_LocationListener");
- try {
- browser.addLocationListener(null);
- fail("No exception thrown for listener == null");
- }
- catch (IllegalArgumentException e) {
- }
-
- LocationListener listener = new LocationListener() {
- public void changed(LocationEvent event) {
- }
- public void changing(LocationEvent event) {
- }
- };
- for (int i = 0; i < 100; i++) browser.addLocationListener(listener);
- for (int i = 0; i < 100; i++) browser.removeLocationListener(listener);
-}
-
-public void test_addOpenWindowListenerLorg_eclipse_swt_browser_OpenWindowListener() {
- shell.setText("test_addOpenWindowListenerLorg_eclipse_swt_browser_OpenWindowListener");
- try {
- browser.addOpenWindowListener(null);
- fail("No exception thrown for listener == null");
- }
- catch (IllegalArgumentException e) {
- }
-
- OpenWindowListener listener = new OpenWindowListener() {
- public void open(WindowEvent event) {
- }
- };
- for (int i = 0; i < 100; i++) browser.addOpenWindowListener(listener);
- for (int i = 0; i < 100; i++) browser.removeOpenWindowListener(listener);
-}
-
-public void test_addProgressListenerLorg_eclipse_swt_browser_ProgressListener() {
- shell.setText("test_addProgressListenerLorg_eclipse_swt_browser_ProgressListener");
- try {
- browser.addProgressListener(null);
- fail("No exception thrown for listener == null");
- }
- catch (IllegalArgumentException e) {
- }
-
- ProgressListener listener = new ProgressListener() {
- public void changed(ProgressEvent event) {
- }
- public void completed(ProgressEvent event) {
- }
- };
- for (int i = 0; i < 100; i++) browser.addProgressListener(listener);
- for (int i = 0; i < 100; i++) browser.removeProgressListener(listener);
-}
-
-public void test_addStatusTextListenerLorg_eclipse_swt_browser_StatusTextListener() {
- shell.setText("test_addStatusTextListenerLorg_eclipse_swt_browser_StatusTextListener");
- try {
- browser.addStatusTextListener(null);
- fail("No exception thrown for listener == null");
- }
- catch (IllegalArgumentException e) {
- }
-
- StatusTextListener listener = new StatusTextListener() {
- public void changed(StatusTextEvent event) {
- }
- };
- for (int i = 0; i < 100; i++) browser.addStatusTextListener(listener);
- for (int i = 0; i < 100; i++) browser.removeStatusTextListener(listener);
-}
-
-public void test_addTitleListenerLorg_eclipse_swt_browser_TitleListener() {
- shell.setText("test_addTitleLorg_eclipse_swt_browser_TitleListener");
- try {
- browser.addTitleListener(null);
- fail("No exception thrown for listener == null");
- }
- catch (IllegalArgumentException e) {
- }
-
- TitleListener listener = new TitleListener() {
- public void changed(TitleEvent event) {
- }
- };
- for (int i = 0; i < 100; i++) browser.addTitleListener(listener);
- for (int i = 0; i < 100; i++) browser.removeTitleListener(listener);
-}
-
-public void test_addVisibilityWindowListenerLorg_eclipse_swt_browser_VisibilityWindowListener() {
- shell.setText("test_addVisibilityWindowListenerLorg_eclipse_swt_browser_VisibilityWindowListener");
- try {
- browser.addVisibilityWindowListener(null);
- fail("No exception thrown for listener == null");
- }
- catch (IllegalArgumentException e) {
- }
-
- VisibilityWindowListener listener = new VisibilityWindowListener() {
- public void hide(WindowEvent event) {
- }
- public void show(WindowEvent event) {
- }
- };
- for (int i = 0; i < 100; i++) browser.addVisibilityWindowListener(listener);
- for (int i = 0; i < 100; i++) browser.removeVisibilityWindowListener(listener);
-}
-
-public void test_back() {
- shell.setText("test_back");
- for (int i = 0; i < 10; i++) {
- browser.back();
- runLoopTimer(1);
- }
- /* returning 10 times in history - expecting false is returned */
- boolean result = browser.back();
- assertFalse(result);
-}
-
-public void test_forward() {
- shell.setText("test_forward");
- for (int i = 0; i < 10; i++) {
- browser.forward();
- runLoopTimer(1);
- }
- /* going forward 10 times in history - expecting false is returned */
- boolean result = browser.forward();
- assertFalse(result);
-}
-
-public void test_getUrl() {
- shell.setText("test_getUrl");
- String string = browser.getUrl();
- assertTrue(string != null);
-}
-
-public void test_isBackEnabled() {
- shell.setText("test_isBackEnabled");
-
- /* back should return the same value that isBackEnabled previously returned */
- assertEquals(browser.isBackEnabled(), browser.back());
-
- for (int i = 0; i < 10; i++) {
- browser.back();
- runLoopTimer(1);
- }
- /* going back 10 times in history - expecting false is returned */
- boolean result = browser.isBackEnabled();
- assertFalse(result);
-}
-
-public void test_isForwardEnabled() {
- shell.setText("test_isForwardEnabled");
-
- /* forward should return the same value that isForwardEnabled previously returned */
- assertEquals(browser.isForwardEnabled(), browser.forward());
-
- for (int i = 0; i < 10; i++) {
- browser.forward();
- runLoopTimer(1);
- }
- /* going forward 10 times in history - expecting false is returned */
- boolean result = browser.isForwardEnabled();
- assertFalse(result);
-}
-
-public void test_refresh() {
- shell.setText("test_refresh");
- for (int i = 0; i < 10; i++) {
- browser.refresh();
- runLoopTimer(1);
- }
-}
-
-public void test_removeCloseWindowListenerLorg_eclipse_swt_browser_CloseWindowListener() {
- try {
- browser.removeCloseWindowListener(null);
- fail("No exception thrown for listener == null");
- }
- catch (IllegalArgumentException e) {
- }
- // tested in addCloseWindowListener
-}
-
-public void test_removeLocationListenerLorg_eclipse_swt_browser_LocationListener() {
- try {
- browser.removeLocationListener(null);
- fail("No exception thrown for listener == null");
- }
- catch (IllegalArgumentException e) {
- }
- // tested in addLocationListener
-}
-
-public void test_removeOpenWindowListenerLorg_eclipse_swt_browser_OpenWindowListener() {
- try {
- browser.removeOpenWindowListener(null);
- fail("No exception thrown for listener == null");
- }
- catch (IllegalArgumentException e) {
- }
- // tested in addOpenWindowListener
-}
-
-public void test_removeProgressListenerLorg_eclipse_swt_browser_ProgressListener() {
- try {
- browser.removeProgressListener(null);
- fail("No exception thrown for listener == null");
- }
- catch (IllegalArgumentException e) {
- }
- // tested in addProgressListener
-}
-
-public void test_removeStatusTextListenerLorg_eclipse_swt_browser_StatusTextListener() {
- try {
- browser.removeStatusTextListener(null);
- fail("No exception thrown for listener == null");
- }
- catch (IllegalArgumentException e) {
- }
- // tested in addStatusTextListener
-}
-
-public void test_removeTitleListenerLorg_eclipse_swt_browser_TitleListener() {
- try {
- browser.removeTitleListener(null);
- fail("No exception thrown for listener == null");
- }
- catch (IllegalArgumentException e) {
- }
- // tested in addTitleListener
-}
-
-public void test_removeVisibilityWindowListenerLorg_eclipse_swt_browser_VisibilityWindowListener() {
- try {
- browser.removeVisibilityWindowListener(null);
- fail("No exception thrown for listener == null");
- }
- catch (IllegalArgumentException e) {
- }
- // tested in addVisibilityWindowListener
-}
-
-public void test_setTextLjava_lang_String() {
- shell.setText("test_setTextLjava_lang_String");
-
- String html = "<HTML><HEAD><TITLE>HTML example 2</TITLE></HEAD><BODY><H1>HTML example 2</H1>";
- for (int i = 0; i < 1000; i++) {
- html +="<P>That is a test line with the number "+i+"</P>";
- }
- html += "</BODY></HTML>";
- boolean result = browser.setText(html);
- assertTrue(result);
- runLoopTimer(10);
-
- try {
- browser.setText(null);
- fail("No exception thrown for text == null");
- }
- catch (IllegalArgumentException e) {
- }
-}
-
-public void test_setUrlLjava_lang_String() {
- shell.setText("test_setUrlLjava_lang_String");
- try {
- browser.setUrl(null);
- fail("No exception thrown for url == null");
- }
- catch (IllegalArgumentException e) {
- }
-
-
- /* THIS TEST REQUIRES WEB ACCESS! How else can we really test the http:// part of a browser widget? */
- browser.setUrl("http://www.eclipse.org/swt");
- runLoopTimer(10);
-}
-
-public void test_stop() {
- shell.setText("test_stop");
- /* THIS TEST REQUIRES WEB ACCESS! How else can we really test the http:// part of a browser widget? */
- browser.setUrl("http://www.eclipse.org/swt");
- runLoopTimer(1);
- browser.stop();
- runLoopTimer(10);
-}
-
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_browser_Browser((String)e.nextElement()));
- }
- return suite;
-}
-
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_CompositeI");
- methodNames.addElement("test_addCloseWindowListenerLorg_eclipse_swt_browser_CloseWindowListener");
- methodNames.addElement("test_addLocationListenerLorg_eclipse_swt_browser_LocationListener");
- methodNames.addElement("test_addOpenWindowListenerLorg_eclipse_swt_browser_OpenWindowListener");
- methodNames.addElement("test_addProgressListenerLorg_eclipse_swt_browser_ProgressListener");
- methodNames.addElement("test_addStatusTextListenerLorg_eclipse_swt_browser_StatusTextListener");
- methodNames.addElement("test_addTitleListenerLorg_eclipse_swt_browser_TitleListener");
- methodNames.addElement("test_addVisibilityWindowListenerLorg_eclipse_swt_browser_VisibilityWindowListener");
- methodNames.addElement("test_back");
- methodNames.addElement("test_forward");
- methodNames.addElement("test_getUrl");
- methodNames.addElement("test_isBackEnabled");
- methodNames.addElement("test_isForwardEnabled");
- methodNames.addElement("test_refresh");
- methodNames.addElement("test_removeCloseWindowListenerLorg_eclipse_swt_browser_CloseWindowListener");
- methodNames.addElement("test_removeLocationListenerLorg_eclipse_swt_browser_LocationListener");
- methodNames.addElement("test_removeOpenWindowListenerLorg_eclipse_swt_browser_OpenWindowListener");
- methodNames.addElement("test_removeProgressListenerLorg_eclipse_swt_browser_ProgressListener");
- methodNames.addElement("test_removeStatusTextListenerLorg_eclipse_swt_browser_StatusTextListener");
- methodNames.addElement("test_removeTitleListenerLorg_eclipse_swt_browser_TitleListener");
- methodNames.addElement("test_removeVisibilityWindowListenerLorg_eclipse_swt_browser_VisibilityWindowListener");
- methodNames.addElement("test_setTextLjava_lang_String");
- methodNames.addElement("test_setUrlLjava_lang_String");
- methodNames.addElement("test_stop");
- methodNames.addAll(Test_org_eclipse_swt_widgets_Composite.methodNames()); // add superclass method names
- return methodNames;
-}
-
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_CompositeI")) test_ConstructorLorg_eclipse_swt_widgets_CompositeI();
- else if (getName().equals("test_addCloseWindowListenerLorg_eclipse_swt_browser_CloseWindowListener")) test_addCloseWindowListenerLorg_eclipse_swt_browser_CloseWindowListener();
- else if (getName().equals("test_addLocationListenerLorg_eclipse_swt_browser_LocationListener")) test_addLocationListenerLorg_eclipse_swt_browser_LocationListener();
- else if (getName().equals("test_addOpenWindowListenerLorg_eclipse_swt_browser_OpenWindowListener")) test_addOpenWindowListenerLorg_eclipse_swt_browser_OpenWindowListener();
- else if (getName().equals("test_addProgressListenerLorg_eclipse_swt_browser_ProgressListener")) test_addProgressListenerLorg_eclipse_swt_browser_ProgressListener();
- else if (getName().equals("test_addStatusTextListenerLorg_eclipse_swt_browser_StatusTextListener")) test_addStatusTextListenerLorg_eclipse_swt_browser_StatusTextListener();
- else if (getName().equals("test_addTitleListenerLorg_eclipse_swt_browser_TitleListener")) test_addTitleListenerLorg_eclipse_swt_browser_TitleListener();
- else if (getName().equals("test_addVisibilityWindowListenerLorg_eclipse_swt_browser_VisibilityWindowListener")) test_addVisibilityWindowListenerLorg_eclipse_swt_browser_VisibilityWindowListener();
- else if (getName().equals("test_back")) test_back();
- else if (getName().equals("test_forward")) test_forward();
- else if (getName().equals("test_getUrl")) test_getUrl();
- else if (getName().equals("test_isBackEnabled")) test_isBackEnabled();
- else if (getName().equals("test_isForwardEnabled")) test_isForwardEnabled();
- else if (getName().equals("test_refresh")) test_refresh();
- else if (getName().equals("test_removeCloseWindowListenerLorg_eclipse_swt_browser_CloseWindowListener")) test_removeCloseWindowListenerLorg_eclipse_swt_browser_CloseWindowListener();
- else if (getName().equals("test_removeLocationListenerLorg_eclipse_swt_browser_LocationListener")) test_removeLocationListenerLorg_eclipse_swt_browser_LocationListener();
- else if (getName().equals("test_removeOpenWindowListenerLorg_eclipse_swt_browser_OpenWindowListener")) test_removeOpenWindowListenerLorg_eclipse_swt_browser_OpenWindowListener();
- else if (getName().equals("test_removeProgressListenerLorg_eclipse_swt_browser_ProgressListener")) test_removeProgressListenerLorg_eclipse_swt_browser_ProgressListener();
- else if (getName().equals("test_removeStatusTextListenerLorg_eclipse_swt_browser_StatusTextListener")) test_removeStatusTextListenerLorg_eclipse_swt_browser_StatusTextListener();
- else if (getName().equals("test_removeTitleListenerLorg_eclipse_swt_browser_TitleListener")) test_removeTitleListenerLorg_eclipse_swt_browser_TitleListener();
- else if (getName().equals("test_removeVisibilityWindowListenerLorg_eclipse_swt_browser_VisibilityWindowListener")) test_removeVisibilityWindowListenerLorg_eclipse_swt_browser_VisibilityWindowListener();
- else if (getName().equals("test_setTextLjava_lang_String")) test_setTextLjava_lang_String();
- else if (getName().equals("test_setUrlLjava_lang_String")) test_setUrlLjava_lang_String();
- else if (getName().equals("test_stop")) test_stop();
- else super.runTest();
-}
-
-/* custom */
-Browser browser;
-
-void runLoopTimer(final int seconds) {
- final boolean[] exit = {false};
- new Thread() {
- public void run() {
- try {Thread.sleep(seconds * 1000);} catch (Exception e) {}
- exit[0] = true;
- /* wake up the event loop */
- Display display = Display.getDefault();
- if (!display.isDisposed()) {
- display.asyncExec(new Runnable() {
- public void run() {
- if (!shell.isDisposed()) shell.redraw();
- }
- });
- }
- }
- }.start();
- shell.open();
- Display display = Display.getCurrent();
- while (!exit[0] && !shell.isDisposed()) if (!display.readAndDispatch()) display.sleep();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_browser_CloseWindowListener.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_browser_CloseWindowListener.java
deleted file mode 100644
index 7c5da2509a..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_browser_CloseWindowListener.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-import org.eclipse.swt.*;
-import org.eclipse.swt.browser.*;
-import org.eclipse.swt.widgets.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.browser.CloseWindowListener
- *
- * @see org.eclipse.swt.browser.CloseWindowListener
- */
-public class Test_org_eclipse_swt_browser_CloseWindowListener extends SwtTestCase {
-
-public Test_org_eclipse_swt_browser_CloseWindowListener(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
-}
-
-protected void tearDown() {
-}
-
-public void test_closeLorg_eclipse_swt_browser_WindowEvent() {
- Display display = Display.getCurrent();
- Shell shell = new Shell(display);
- Browser browser = new Browser(shell, SWT.NONE);
- browser.addCloseWindowListener(new CloseWindowListener() {
- public void close(WindowEvent event) {
- }
- });
- shell.close();
-}
-
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_browser_CloseWindowListener((String)e.nextElement()));
- }
- return suite;
-}
-
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_closeLorg_eclipse_swt_browser_WindowEvent");
- return methodNames;
-}
-
-protected void runTest() throws Throwable {
- if (getName().equals("test_closeLorg_eclipse_swt_browser_WindowEvent")) test_closeLorg_eclipse_swt_browser_WindowEvent();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_browser_LocationAdapter.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_browser_LocationAdapter.java
deleted file mode 100644
index 78397933f3..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_browser_LocationAdapter.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-import org.eclipse.swt.*;
-import org.eclipse.swt.browser.*;
-import org.eclipse.swt.widgets.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.browser.LocationAdapter
- *
- * @see org.eclipse.swt.browser.LocationAdapter
- */
-public class Test_org_eclipse_swt_browser_LocationAdapter extends SwtTestCase {
-
-public Test_org_eclipse_swt_browser_LocationAdapter(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
-}
-
-protected void tearDown() {
-}
-
-public void test_Constructor() {
- LocationAdapter adapter = new LocationAdapter() {};
-}
-
-public void test_changedLorg_eclipse_swt_browser_LocationEvent() {
- Display display = Display.getCurrent();
- Shell shell = new Shell(display);
- Browser browser = new Browser(shell, SWT.NONE);
- LocationAdapter adapter = new LocationAdapter() {
- };
- browser.addLocationListener(adapter);
- shell.close();
-}
-
-public void test_changingLorg_eclipse_swt_browser_LocationEvent() {
- // tested in test_changedLorg_eclipse_swt_browser_LocationEvent
-}
-
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_browser_LocationAdapter((String)e.nextElement()));
- }
- return suite;
-}
-
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_Constructor");
- methodNames.addElement("test_changedLorg_eclipse_swt_browser_LocationEvent");
- methodNames.addElement("test_changingLorg_eclipse_swt_browser_LocationEvent");
- return methodNames;
-}
-
-protected void runTest() throws Throwable {
- if (getName().equals("test_Constructor")) test_Constructor();
- else if (getName().equals("test_changedLorg_eclipse_swt_browser_LocationEvent")) test_changedLorg_eclipse_swt_browser_LocationEvent();
- else if (getName().equals("test_changingLorg_eclipse_swt_browser_LocationEvent")) test_changingLorg_eclipse_swt_browser_LocationEvent();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_browser_LocationListener.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_browser_LocationListener.java
deleted file mode 100644
index c5dcfb88b2..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_browser_LocationListener.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-import org.eclipse.swt.*;
-import org.eclipse.swt.browser.*;
-import org.eclipse.swt.widgets.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.browser.LocationListener
- *
- * @see org.eclipse.swt.browser.LocationListener
- */
-public class Test_org_eclipse_swt_browser_LocationListener extends SwtTestCase {
-
-public Test_org_eclipse_swt_browser_LocationListener(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
-}
-
-protected void tearDown() {
-}
-
-public void test_changedLorg_eclipse_swt_browser_LocationEvent() {
- Display display = Display.getCurrent();
- Shell shell = new Shell(display);
- Browser browser = new Browser(shell, SWT.NONE);
- browser.addLocationListener(new LocationListener() {
- public void changed(LocationEvent event) {
- }
- public void changing(LocationEvent event) {
- }
- });
- shell.close();
-}
-
-public void test_changingLorg_eclipse_swt_browser_LocationEvent() {
- // tested in test_changedLorg_eclipse_swt_browser_LocationEvent
-}
-
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_browser_LocationListener((String)e.nextElement()));
- }
- return suite;
-}
-
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_changedLorg_eclipse_swt_browser_LocationEvent");
- methodNames.addElement("test_changingLorg_eclipse_swt_browser_LocationEvent");
- return methodNames;
-}
-
-protected void runTest() throws Throwable {
- if (getName().equals("test_changedLorg_eclipse_swt_browser_LocationEvent")) test_changedLorg_eclipse_swt_browser_LocationEvent();
- else if (getName().equals("test_changingLorg_eclipse_swt_browser_LocationEvent")) test_changingLorg_eclipse_swt_browser_LocationEvent();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_browser_OpenWindowListener.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_browser_OpenWindowListener.java
deleted file mode 100644
index 021ffd2286..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_browser_OpenWindowListener.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-import org.eclipse.swt.*;
-import org.eclipse.swt.browser.*;
-import org.eclipse.swt.widgets.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.browser.OpenWindowListener
- *
- * @see org.eclipse.swt.browser.OpenWindowListener
- */
-public class Test_org_eclipse_swt_browser_OpenWindowListener extends SwtTestCase {
-
-public Test_org_eclipse_swt_browser_OpenWindowListener(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
-}
-
-protected void tearDown() {
-}
-
-public void test_openWindowLorg_eclipse_swt_browser_WindowEvent() {
- Display display = Display.getCurrent();
- Shell shell = new Shell(display);
- Browser browser = new Browser(shell, SWT.NONE);
- browser.addOpenWindowListener(new OpenWindowListener() {
- public void open(WindowEvent event) {
- }
- });
- shell.close();
-}
-
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_browser_OpenWindowListener((String)e.nextElement()));
- }
- return suite;
-}
-
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_openWindowLorg_eclipse_swt_browser_WindowEvent");
- return methodNames;
-}
-
-protected void runTest() throws Throwable {
- if (getName().equals("test_openWindowLorg_eclipse_swt_browser_WindowEvent")) test_openWindowLorg_eclipse_swt_browser_WindowEvent();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_browser_ProgressAdapter.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_browser_ProgressAdapter.java
deleted file mode 100644
index 70db06c6ed..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_browser_ProgressAdapter.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-import org.eclipse.swt.*;
-import org.eclipse.swt.browser.*;
-import org.eclipse.swt.widgets.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.browser.ProgressAdapter
- *
- * @see org.eclipse.swt.browser.ProgressAdapter
- */
-public class Test_org_eclipse_swt_browser_ProgressAdapter extends SwtTestCase {
-
-public Test_org_eclipse_swt_browser_ProgressAdapter(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
-}
-
-protected void tearDown() {
-}
-
-public void test_Constructor() {
- ProgressAdapter adapter = new ProgressAdapter() {};
-}
-
-public void test_changedLorg_eclipse_swt_browser_ProgressEvent() {
- Display display = Display.getCurrent();
- Shell shell = new Shell(display);
- Browser browser = new Browser(shell, SWT.NONE);
- browser.addProgressListener(new ProgressAdapter() {});
- shell.close();
-}
-
-public void test_completedLorg_eclipse_swt_browser_ProgressEvent() {
- warnUnimpl("Test test_completedLorg_eclipse_swt_browser_ProgressEvent not written");
-}
-
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_browser_ProgressAdapter((String)e.nextElement()));
- }
- return suite;
-}
-
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_Constructor");
- methodNames.addElement("test_changedLorg_eclipse_swt_browser_ProgressEvent");
- methodNames.addElement("test_completedLorg_eclipse_swt_browser_ProgressEvent");
- return methodNames;
-}
-
-protected void runTest() throws Throwable {
- if (getName().equals("test_Constructor")) test_Constructor();
- else if (getName().equals("test_changedLorg_eclipse_swt_browser_ProgressEvent")) test_changedLorg_eclipse_swt_browser_ProgressEvent();
- else if (getName().equals("test_completedLorg_eclipse_swt_browser_ProgressEvent")) test_completedLorg_eclipse_swt_browser_ProgressEvent();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_browser_ProgressListener.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_browser_ProgressListener.java
deleted file mode 100644
index c41ca3d712..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_browser_ProgressListener.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-import org.eclipse.swt.*;
-import org.eclipse.swt.browser.*;
-import org.eclipse.swt.widgets.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.browser.ProgressListener
- *
- * @see org.eclipse.swt.browser.ProgressListener
- */
-public class Test_org_eclipse_swt_browser_ProgressListener extends SwtTestCase {
-
-public Test_org_eclipse_swt_browser_ProgressListener(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
-}
-
-protected void tearDown() {
-}
-
-public void test_changedLorg_eclipse_swt_browser_ProgressEvent() {
- Display display = Display.getCurrent();
- Shell shell = new Shell(display);
- Browser browser = new Browser(shell, SWT.NONE);
- browser.addProgressListener(new ProgressListener() {
- public void changed(ProgressEvent event) {
- }
- public void completed(ProgressEvent event) {
- }
- });
- shell.close();
-}
-
-public void test_completedLorg_eclipse_swt_browser_ProgressEvent() {
- // tested in test_changedLorg_eclipse_swt_browser_ProgressEvent
-}
-
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_browser_ProgressListener((String)e.nextElement()));
- }
- return suite;
-}
-
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_changedLorg_eclipse_swt_browser_ProgressEvent");
- methodNames.addElement("test_completedLorg_eclipse_swt_browser_ProgressEvent");
- return methodNames;
-}
-
-protected void runTest() throws Throwable {
- if (getName().equals("test_changedLorg_eclipse_swt_browser_ProgressEvent")) test_changedLorg_eclipse_swt_browser_ProgressEvent();
- else if (getName().equals("test_completedLorg_eclipse_swt_browser_ProgressEvent")) test_completedLorg_eclipse_swt_browser_ProgressEvent();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_browser_StatusTextListener.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_browser_StatusTextListener.java
deleted file mode 100644
index 9d74dd851b..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_browser_StatusTextListener.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-import org.eclipse.swt.*;
-import org.eclipse.swt.browser.*;
-import org.eclipse.swt.widgets.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.browser.StatusTextListener
- *
- * @see org.eclipse.swt.browser.StatusTextListener
- */
-public class Test_org_eclipse_swt_browser_StatusTextListener extends SwtTestCase {
-
-public Test_org_eclipse_swt_browser_StatusTextListener(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
-}
-
-protected void tearDown() {
-}
-
-public void test_changedLorg_eclipse_swt_browser_StatusTextEvent() {
- Display display = Display.getCurrent();
- Shell shell = new Shell(display);
- Browser browser = new Browser(shell, SWT.NONE);
- browser.addStatusTextListener(new StatusTextListener() {
- public void changed(StatusTextEvent event) {
- }
- });
- shell.close();
-}
-
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_browser_StatusTextListener((String)e.nextElement()));
- }
- return suite;
-}
-
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_changedLorg_eclipse_swt_browser_StatusTextEvent");
- return methodNames;
-}
-
-protected void runTest() throws Throwable {
- if (getName().equals("test_changedLorg_eclipse_swt_browser_StatusTextEvent")) test_changedLorg_eclipse_swt_browser_StatusTextEvent();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_browser_TitleListener.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_browser_TitleListener.java
deleted file mode 100644
index 40d6b46e70..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_browser_TitleListener.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import junit.framework.*;
-import junit.textui.*;
-import org.eclipse.swt.*;
-import org.eclipse.swt.browser.*;
-import org.eclipse.swt.widgets.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.browser.TitleListener
- *
- * @see org.eclipse.swt.browser.TitleListener
- */
-public class Test_org_eclipse_swt_browser_TitleListener extends SwtTestCase {
-
-public Test_org_eclipse_swt_browser_TitleListener(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
-}
-
-protected void tearDown() {
-}
-
-public void test_changedLorg_eclipse_swt_browser_TitleEvent() {
- Display display = Display.getCurrent();
- Shell shell = new Shell(display);
- Browser browser = new Browser(shell, SWT.NONE);
- browser.addTitleListener(new TitleListener() {
- public void changed(TitleEvent event) {
- }
- });
- shell.close();
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_browser_TitleListener((String)e.nextElement()));
- }
- return suite;
-}
-
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_changedLorg_eclipse_swt_browser_TitleEvent");
- return methodNames;
-}
-
-protected void runTest() throws Throwable {
- if (getName().equals("test_changedLorg_eclipse_swt_browser_TitleEvent")) test_changedLorg_eclipse_swt_browser_TitleEvent();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_browser_VisibilityWindowAdapter.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_browser_VisibilityWindowAdapter.java
deleted file mode 100644
index 3bfe0fa640..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_browser_VisibilityWindowAdapter.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-import org.eclipse.swt.*;
-import org.eclipse.swt.browser.*;
-import org.eclipse.swt.widgets.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.browser.VisibilityWindowAdapter
- *
- * @see org.eclipse.swt.browser.VisibilityWindowAdapter
- */
-public class Test_org_eclipse_swt_browser_VisibilityWindowAdapter extends SwtTestCase {
-
-public Test_org_eclipse_swt_browser_VisibilityWindowAdapter(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
-}
-
-protected void tearDown() {
-}
-
-public void test_Constructor() {
- new VisibilityWindowAdapter() {};
-}
-
-public void test_hideLorg_eclipse_swt_browser_WindowEvent() {
- Display display = Display.getCurrent();
- Shell shell = new Shell(display);
- Browser browser = new Browser(shell, SWT.NONE);
- browser.addVisibilityWindowListener(new VisibilityWindowAdapter(){});
- shell.close();
-}
-
-public void test_showLorg_eclipse_swt_browser_WindowEvent() {
- // tested in test_hideLorg_eclipse_swt_browser_WindowEvent
-}
-
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_browser_VisibilityWindowAdapter((String)e.nextElement()));
- }
- return suite;
-}
-
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_Constructor");
- methodNames.addElement("test_hideLorg_eclipse_swt_browser_WindowEvent");
- methodNames.addElement("test_showLorg_eclipse_swt_browser_WindowEvent");
- return methodNames;
-}
-
-protected void runTest() throws Throwable {
- if (getName().equals("test_Constructor")) test_Constructor();
- else if (getName().equals("test_hideLorg_eclipse_swt_browser_WindowEvent")) test_hideLorg_eclipse_swt_browser_WindowEvent();
- else if (getName().equals("test_showLorg_eclipse_swt_browser_WindowEvent")) test_showLorg_eclipse_swt_browser_WindowEvent();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_browser_VisibilityWindowListener.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_browser_VisibilityWindowListener.java
deleted file mode 100644
index ab344c1566..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_browser_VisibilityWindowListener.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-import org.eclipse.swt.*;
-import org.eclipse.swt.browser.*;
-import org.eclipse.swt.widgets.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.browser.VisibilityWindowListener
- *
- * @see org.eclipse.swt.browser.VisibilityWindowListener
- */
-public class Test_org_eclipse_swt_browser_VisibilityWindowListener extends SwtTestCase {
-
-public Test_org_eclipse_swt_browser_VisibilityWindowListener(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
-}
-
-protected void tearDown() {
-}
-
-public void test_hideLorg_eclipse_swt_browser_WindowEvent() {
- Display display = Display.getCurrent();
- Shell shell = new Shell(display);
- Browser browser = new Browser(shell, SWT.NONE);
- browser.addVisibilityWindowListener(new VisibilityWindowListener() {
- public void hide(WindowEvent event) {
- }
- public void show(WindowEvent event) {
- }
- });
- shell.close();
-}
-
-public void test_showLorg_eclipse_swt_browser_WindowEvent() {
- // tested in test_hideLorg_eclipse_swt_browser_WindowEvent
-}
-
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_browser_VisibilityWindowListener((String)e.nextElement()));
- }
- return suite;
-}
-
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_hideLorg_eclipse_swt_browser_WindowEvent");
- methodNames.addElement("test_showLorg_eclipse_swt_browser_WindowEvent");
- return methodNames;
-}
-
-protected void runTest() throws Throwable {
- if (getName().equals("test_hideLorg_eclipse_swt_browser_WindowEvent")) test_hideLorg_eclipse_swt_browser_WindowEvent();
- else if (getName().equals("test_showLorg_eclipse_swt_browser_WindowEvent")) test_showLorg_eclipse_swt_browser_WindowEvent();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_AnimatedProgress.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_AnimatedProgress.java
deleted file mode 100644
index 7d80cb2b30..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_AnimatedProgress.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.custom.AnimatedProgress
- *
- * @see org.eclipse.swt.custom.AnimatedProgress
- */
-public class Test_org_eclipse_swt_custom_AnimatedProgress extends Test_org_eclipse_swt_widgets_Canvas {
-
-public Test_org_eclipse_swt_custom_AnimatedProgress(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- super.setUp();
-}
-
-protected void tearDown() {
- super.tearDown();
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_CompositeI() {
- warnUnimpl("Test test_ConstructorLorg_eclipse_swt_widgets_CompositeI not written");
-}
-
-public void test_clear() {
- warnUnimpl("Test test_clear not written");
-}
-
-public void test_computeSizeIIZ() {
- warnUnimpl("Test test_computeSizeIIZ not written");
-}
-
-public void test_start() {
- warnUnimpl("Test test_start not written");
-}
-
-public void test_stop() {
- warnUnimpl("Test test_stop not written");
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_custom_AnimatedProgress((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_CompositeI");
- methodNames.addElement("test_clear");
- methodNames.addElement("test_computeSizeIIZ");
- methodNames.addElement("test_start");
- methodNames.addElement("test_stop");
- methodNames.addAll(Test_org_eclipse_swt_widgets_Canvas.methodNames()); // add superclass method names
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_CompositeI")) test_ConstructorLorg_eclipse_swt_widgets_CompositeI();
- else if (getName().equals("test_clear")) test_clear();
- else if (getName().equals("test_computeSizeIIZ")) test_computeSizeIIZ();
- else if (getName().equals("test_start")) test_start();
- else if (getName().equals("test_stop")) test_stop();
- else super.runTest();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_BidiSegmentEvent.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_BidiSegmentEvent.java
deleted file mode 100644
index 64840e7e12..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_BidiSegmentEvent.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.custom.BidiSegmentEvent
- *
- * @see org.eclipse.swt.custom.BidiSegmentEvent
- */
-public class Test_org_eclipse_swt_custom_BidiSegmentEvent extends Test_org_eclipse_swt_events_TypedEvent {
-
-public Test_org_eclipse_swt_custom_BidiSegmentEvent(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- super.setUp();
-}
-
-protected void tearDown() {
- super.tearDown();
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_custom_BidiSegmentEvent((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addAll(Test_org_eclipse_swt_events_TypedEvent.methodNames()); // add superclass method names
- return methodNames;
-}
-protected void runTest() throws Throwable {
- super.runTest();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_BidiSegmentListener.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_BidiSegmentListener.java
deleted file mode 100644
index 85919e6460..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_BidiSegmentListener.java
+++ /dev/null
@@ -1,190 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-import junit.textui.TestRunner;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.BidiSegmentEvent;
-import org.eclipse.swt.custom.BidiSegmentListener;
-import org.eclipse.swt.custom.StyleRange;
-import org.eclipse.swt.custom.StyledText;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.internal.BidiUtil;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.custom.BidiSegmentListener
- *
- * @see org.eclipse.swt.custom.BidiSegmentListener
- */
-public class Test_org_eclipse_swt_custom_BidiSegmentListener extends SwtTestCase {
- Shell shell;
- StyledText text;
- boolean listenerCalled;
- String line = "Line1";
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-public Test_org_eclipse_swt_custom_BidiSegmentListener(String name) {
- super(name);
-}
-
-private boolean isBidi() {
- return BidiUtil.isBidiPlatform();
-}
-protected void setUp() {
- shell = new Shell();
- text = new StyledText(shell, SWT.NULL);
-}
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_custom_BidiSegmentListener((String)e.nextElement()));
- }
- return suite;
-}
-protected void tearDown() {
- shell.dispose();
-}
-private void testListener(final String message, final int[] segments, boolean exceptionExpected) {
- boolean exceptionThrown = false;
- BidiSegmentListener listener = new BidiSegmentListener() {
- public void lineGetSegments(BidiSegmentEvent event) {
- assertEquals(message + " incorrect BidiSegmentEvent", 0, event.lineOffset);
- assertEquals(message + " incorrect BidiSegmentEvent", line, event.lineText);
-
- event.segments = segments;
- listenerCalled = true;
- }
- };
-
- listenerCalled = false;
- try {
- text.addBidiSegmentListener(listener);
- text.getLocationAtOffset(0);
- }
- catch (IllegalArgumentException e) {
- exceptionThrown = true;
- }
- finally {
- text.removeBidiSegmentListener(listener);
- }
- if (exceptionExpected) {
- assertTrue(message + " expected exception not thrown", exceptionThrown);
- }
- else {
- assertTrue(message + " unexpected exception thrown", exceptionThrown == false);
- }
- if (isBidi()) {
- assertTrue(message + " listener not called", listenerCalled);
- }
- else {
- assertTrue(message + " listener called when it shouldn't be", listenerCalled == false);
- }
-}
-private void testStyleRangeSegmenting(final int[] segments, int[] boldRanges) {
- boolean exceptionThrown = false;
- BidiSegmentListener listener = new BidiSegmentListener() {
- public void lineGetSegments(BidiSegmentEvent event) {
- assertEquals(" incorrect BidiSegmentEvent", 0, event.lineOffset);
- assertEquals(" incorrect BidiSegmentEvent", line, event.lineText);
-
- event.segments = segments;
- listenerCalled = true;
- }
- };
-
- listenerCalled = false;
- try {
- text.addBidiSegmentListener(listener);
- text.setStyleRange(null);
- for (int i=0; i<boldRanges.length; i+=2) {
- StyleRange styleRange = new StyleRange(boldRanges[i], boldRanges[i+1], null, null, SWT.BOLD);
- text.setStyleRange(styleRange);
- };
- text.getLocationAtOffset(0);
- }
- catch (IllegalArgumentException e) {
- exceptionThrown = true;
- }
- finally {
- text.removeBidiSegmentListener(listener);
- }
- assertTrue(" unexpected exception thrown", exceptionThrown == false);
- if (isBidi()) {
- assertTrue(" listener not called", listenerCalled);
- }
- else {
- assertTrue(" listener called when it shouldn't be", listenerCalled == false);
- }
-}
-
-public void test_lineGetSegmentsLorg_eclipse_swt_custom_BidiSegmentEvent() {
- int lineLength = line.length();
-
- text.setText(line);
- // should not cause an exception
- testListener(":a:", null, false);
- testListener(":b:", new int[] {0, lineLength / 2, lineLength}, false);
- testListener(":c:", new int[] {0, lineLength / 2}, false);
-
- // should all cause an exception on a bidi platform
- if (isBidi()) {
- testListener(":d:", new int[] {lineLength / 2}, true);
- testListener(":e:", new int[] {0, 1, 1, lineLength / 2}, true);
- testListener(":f:", new int[] {0, 1, 2, lineLength + 1}, true);
- testListener(":g:", new int[] {0, 1, lineLength + 1, lineLength + 1}, true);
- testListener(":h:", new int[] {0, 2, 1}, true);
- testListener(":i:", new int[] {0, -1, 2}, true);
- testListener(":j:", new int[] {0, -1, 2}, true);
- }
-
- // test bold segmenting
- line = "this is a line with 50 chars - **** **** **** ****";
- text.setText(line);
- // should segment as int[] {0,5,5,2,12,3,20,5}
- testStyleRangeSegmenting(new int[] {0,5,10,15,20,25}, new int[] {0,5,5,2,12,3,20,5});
- // should segment as int[] {0,5,5,1,7,3,10,3,15,5,20,5}
- testStyleRangeSegmenting(new int[] {0,5,10,15,20,25}, new int[] {0,6,7,6,15,10});
- // should segment as int[] {0,5,5,5,10,5}
- testStyleRangeSegmenting(new int[] {0,5,10,15}, new int[] {0,15});
- // should segment as int[] {0,5}
- testStyleRangeSegmenting(new int[] {0,5}, new int[] {0,5});
- // should segment as int[] {2,3}
- testStyleRangeSegmenting(new int[] {0,5}, new int[] {2,3});
- // should segment as int[] {0,2}
- testStyleRangeSegmenting(new int[] {0,5}, new int[] {0,2});
- // should segment as int[] {10,5}
- testStyleRangeSegmenting(new int[] {0,5,10,15}, new int[] {10,5});
- // should segment as int[] {12,3}
- testStyleRangeSegmenting(new int[] {0,5,10,15}, new int[] {12,3});
- // should segment as int[] {3,2,5,5,10,3,21,4,25,3}
- testStyleRangeSegmenting(new int[] {0,5,10,15,20,25,30}, new int[] {3,10,21,7});
- // should segment as int[] {10,2}
- line = "test1test2/r/n";
- text.setText(line);
- testStyleRangeSegmenting(new int[] {0,5}, new int[] {10,2});
-}
-
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_lineGetSegmentsLorg_eclipse_swt_custom_BidiSegmentEvent");
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_lineGetSegmentsLorg_eclipse_swt_custom_BidiSegmentEvent")) test_lineGetSegmentsLorg_eclipse_swt_custom_BidiSegmentEvent();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_BusyIndicator.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_BusyIndicator.java
deleted file mode 100644
index 6c07f50960..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_BusyIndicator.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.custom.BusyIndicator
- *
- * @see org.eclipse.swt.custom.BusyIndicator
- */
-public class Test_org_eclipse_swt_custom_BusyIndicator extends SwtTestCase {
-
-public Test_org_eclipse_swt_custom_BusyIndicator(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
-}
-
-protected void tearDown() {
-}
-
-public void test_Constructor() {
- warnUnimpl("Test test_Constructor not written");
-}
-
-public void test_showWhileLorg_eclipse_swt_widgets_DisplayLjava_lang_Runnable() {
- warnUnimpl("Test test_showWhileLorg_eclipse_swt_widgets_DisplayLjava_lang_Runnable not written");
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_custom_BusyIndicator((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_Constructor");
- methodNames.addElement("test_showWhileLorg_eclipse_swt_widgets_DisplayLjava_lang_Runnable");
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_Constructor")) test_Constructor();
- else if (getName().equals("test_showWhileLorg_eclipse_swt_widgets_DisplayLjava_lang_Runnable")) test_showWhileLorg_eclipse_swt_widgets_DisplayLjava_lang_Runnable();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_CCombo.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_CCombo.java
deleted file mode 100644
index 76d3299e70..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_CCombo.java
+++ /dev/null
@@ -1,335 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.custom.CCombo
- *
- * @see org.eclipse.swt.custom.CCombo
- */
-public class Test_org_eclipse_swt_custom_CCombo extends Test_org_eclipse_swt_widgets_Composite {
-
-public Test_org_eclipse_swt_custom_CCombo(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- super.setUp();
-}
-
-protected void tearDown() {
- super.tearDown();
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_CompositeI() {
- warnUnimpl("Test test_ConstructorLorg_eclipse_swt_widgets_CompositeI not written");
-}
-
-public void test_addLjava_lang_String() {
- warnUnimpl("Test test_addLjava_lang_String not written");
-}
-
-public void test_addLjava_lang_StringI() {
- warnUnimpl("Test test_addLjava_lang_StringI not written");
-}
-
-public void test_addModifyListenerLorg_eclipse_swt_events_ModifyListener() {
- warnUnimpl("Test test_addModifyListenerLorg_eclipse_swt_events_ModifyListener not written");
-}
-
-public void test_addSelectionListenerLorg_eclipse_swt_events_SelectionListener() {
- warnUnimpl("Test test_addSelectionListenerLorg_eclipse_swt_events_SelectionListener not written");
-}
-
-public void test_clearSelection() {
- warnUnimpl("Test test_clearSelection not written");
-}
-
-public void test_computeSizeIIZ() {
- warnUnimpl("Test test_computeSizeIIZ not written");
-}
-
-public void test_deselectAll() {
- warnUnimpl("Test test_deselectAll not written");
-}
-
-public void test_deselectI() {
- warnUnimpl("Test test_deselectI not written");
-}
-
-public void test_getChildren() {
- warnUnimpl("Test test_getChildren not written");
-}
-
-public void test_getEditable() {
- warnUnimpl("Test test_getEditable not written");
-}
-
-public void test_getItemCount() {
- warnUnimpl("Test test_getItemCount not written");
-}
-
-public void test_getItemHeight() {
- warnUnimpl("Test test_getItemHeight not written");
-}
-
-public void test_getItemI() {
- warnUnimpl("Test test_getItemI not written");
-}
-
-public void test_getItems() {
- warnUnimpl("Test test_getItems not written");
-}
-
-public void test_getSelection() {
- warnUnimpl("Test test_getSelection not written");
-}
-
-public void test_getSelectionIndex() {
- warnUnimpl("Test test_getSelectionIndex not written");
-}
-
-public void test_getStyle() {
- warnUnimpl("Test test_getStyle not written");
-}
-
-public void test_getText() {
- warnUnimpl("Test test_getText not written");
-}
-
-public void test_getTextHeight() {
- warnUnimpl("Test test_getTextHeight not written");
-}
-
-public void test_getTextLimit() {
- warnUnimpl("Test test_getTextLimit not written");
-}
-
-public void test_indexOfLjava_lang_String() {
- warnUnimpl("Test test_indexOfLjava_lang_String not written");
-}
-
-public void test_indexOfLjava_lang_StringI() {
- warnUnimpl("Test test_indexOfLjava_lang_StringI not written");
-}
-
-public void test_isFocusControl() {
- warnUnimpl("Test test_isFocusControl not written");
-}
-
-public void test_redraw() {
- warnUnimpl("Test test_redraw not written");
-}
-
-public void test_redrawIIIIZ() {
- warnUnimpl("Test test_redrawIIIIZ not written");
-}
-
-public void test_removeAll() {
- warnUnimpl("Test test_removeAll not written");
-}
-
-public void test_removeI() {
- warnUnimpl("Test test_removeI not written");
-}
-
-public void test_removeII() {
- warnUnimpl("Test test_removeII not written");
-}
-
-public void test_removeLjava_lang_String() {
- warnUnimpl("Test test_removeLjava_lang_String not written");
-}
-
-public void test_removeModifyListenerLorg_eclipse_swt_events_ModifyListener() {
- warnUnimpl("Test test_removeModifyListenerLorg_eclipse_swt_events_ModifyListener not written");
-}
-
-public void test_removeSelectionListenerLorg_eclipse_swt_events_SelectionListener() {
- warnUnimpl("Test test_removeSelectionListenerLorg_eclipse_swt_events_SelectionListener not written");
-}
-
-public void test_selectI() {
- warnUnimpl("Test test_selectI not written");
-}
-
-public void test_setBackgroundLorg_eclipse_swt_graphics_Color() {
- warnUnimpl("Test test_setBackgroundLorg_eclipse_swt_graphics_Color not written");
-}
-
-public void test_setEditableZ() {
- warnUnimpl("Test test_setEditableZ not written");
-}
-
-public void test_setEnabledZ() {
- warnUnimpl("Test test_setEnabledZ not written");
-}
-
-public void test_setFocus() {
- warnUnimpl("Test test_setFocus not written");
-}
-
-public void test_setFontLorg_eclipse_swt_graphics_Font() {
- warnUnimpl("Test test_setFontLorg_eclipse_swt_graphics_Font not written");
-}
-
-public void test_setForegroundLorg_eclipse_swt_graphics_Color() {
- warnUnimpl("Test test_setForegroundLorg_eclipse_swt_graphics_Color not written");
-}
-
-public void test_setItemILjava_lang_String() {
- warnUnimpl("Test test_setItemILjava_lang_String not written");
-}
-
-public void test_setItems$Ljava_lang_String() {
- warnUnimpl("Test test_setItems$Ljava_lang_String not written");
-}
-
-public void test_setSelectionLorg_eclipse_swt_graphics_Point() {
- warnUnimpl("Test test_setSelectionLorg_eclipse_swt_graphics_Point not written");
-}
-
-public void test_setTextLimitI() {
- warnUnimpl("Test test_setTextLimitI not written");
-}
-
-public void test_setTextLjava_lang_String() {
- warnUnimpl("Test test_setTextLjava_lang_String not written");
-}
-
-public void test_setToolTipTextLjava_lang_String() {
- warnUnimpl("Test test_setToolTipTextLjava_lang_String not written");
-}
-
-public void test_setVisibleZ() {
- warnUnimpl("Test test_setVisibleZ not written");
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_custom_CCombo((String)e.nextElement()));
- }
- return suite;
-}
-
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_CompositeI");
- methodNames.addElement("test_addLjava_lang_String");
- methodNames.addElement("test_addLjava_lang_StringI");
- methodNames.addElement("test_addModifyListenerLorg_eclipse_swt_events_ModifyListener");
- methodNames.addElement("test_addSelectionListenerLorg_eclipse_swt_events_SelectionListener");
- methodNames.addElement("test_clearSelection");
- methodNames.addElement("test_computeSizeIIZ");
- methodNames.addElement("test_deselectAll");
- methodNames.addElement("test_deselectI");
- methodNames.addElement("test_getChildren");
- methodNames.addElement("test_getEditable");
- methodNames.addElement("test_getItemCount");
- methodNames.addElement("test_getItemHeight");
- methodNames.addElement("test_getItemI");
- methodNames.addElement("test_getItems");
- methodNames.addElement("test_getSelection");
- methodNames.addElement("test_getSelectionIndex");
- methodNames.addElement("test_getStyle");
- methodNames.addElement("test_getText");
- methodNames.addElement("test_getTextHeight");
- methodNames.addElement("test_getTextLimit");
- methodNames.addElement("test_indexOfLjava_lang_String");
- methodNames.addElement("test_indexOfLjava_lang_StringI");
- methodNames.addElement("test_isFocusControl");
- methodNames.addElement("test_redraw");
- methodNames.addElement("test_redrawIIIIZ");
- methodNames.addElement("test_removeAll");
- methodNames.addElement("test_removeI");
- methodNames.addElement("test_removeII");
- methodNames.addElement("test_removeLjava_lang_String");
- methodNames.addElement("test_removeModifyListenerLorg_eclipse_swt_events_ModifyListener");
- methodNames.addElement("test_removeSelectionListenerLorg_eclipse_swt_events_SelectionListener");
- methodNames.addElement("test_selectI");
- methodNames.addElement("test_setBackgroundLorg_eclipse_swt_graphics_Color");
- methodNames.addElement("test_setEditableZ");
- methodNames.addElement("test_setEnabledZ");
- methodNames.addElement("test_setFocus");
- methodNames.addElement("test_setFontLorg_eclipse_swt_graphics_Font");
- methodNames.addElement("test_setForegroundLorg_eclipse_swt_graphics_Color");
- methodNames.addElement("test_setItemILjava_lang_String");
- methodNames.addElement("test_setItems$Ljava_lang_String");
- methodNames.addElement("test_setSelectionLorg_eclipse_swt_graphics_Point");
- methodNames.addElement("test_setTextLimitI");
- methodNames.addElement("test_setTextLjava_lang_String");
- methodNames.addElement("test_setToolTipTextLjava_lang_String");
- methodNames.addElement("test_setVisibleZ");
- methodNames.addAll(Test_org_eclipse_swt_widgets_Composite.methodNames()); // add superclass method names
- return methodNames;
-}
-
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_CompositeI")) test_ConstructorLorg_eclipse_swt_widgets_CompositeI();
- else if (getName().equals("test_addLjava_lang_String")) test_addLjava_lang_String();
- else if (getName().equals("test_addLjava_lang_StringI")) test_addLjava_lang_StringI();
- else if (getName().equals("test_addModifyListenerLorg_eclipse_swt_events_ModifyListener")) test_addModifyListenerLorg_eclipse_swt_events_ModifyListener();
- else if (getName().equals("test_addSelectionListenerLorg_eclipse_swt_events_SelectionListener")) test_addSelectionListenerLorg_eclipse_swt_events_SelectionListener();
- else if (getName().equals("test_clearSelection")) test_clearSelection();
- else if (getName().equals("test_computeSizeIIZ")) test_computeSizeIIZ();
- else if (getName().equals("test_deselectAll")) test_deselectAll();
- else if (getName().equals("test_deselectI")) test_deselectI();
- else if (getName().equals("test_getChildren")) test_getChildren();
- else if (getName().equals("test_getEditable")) test_getEditable();
- else if (getName().equals("test_getItemCount")) test_getItemCount();
- else if (getName().equals("test_getItemHeight")) test_getItemHeight();
- else if (getName().equals("test_getItemI")) test_getItemI();
- else if (getName().equals("test_getItems")) test_getItems();
- else if (getName().equals("test_getSelection")) test_getSelection();
- else if (getName().equals("test_getSelectionIndex")) test_getSelectionIndex();
- else if (getName().equals("test_getStyle")) test_getStyle();
- else if (getName().equals("test_getText")) test_getText();
- else if (getName().equals("test_getTextHeight")) test_getTextHeight();
- else if (getName().equals("test_getTextLimit")) test_getTextLimit();
- else if (getName().equals("test_indexOfLjava_lang_String")) test_indexOfLjava_lang_String();
- else if (getName().equals("test_indexOfLjava_lang_StringI")) test_indexOfLjava_lang_StringI();
- else if (getName().equals("test_isFocusControl")) test_isFocusControl();
- else if (getName().equals("test_redraw")) test_redraw();
- else if (getName().equals("test_redrawIIIIZ")) test_redrawIIIIZ();
- else if (getName().equals("test_removeAll")) test_removeAll();
- else if (getName().equals("test_removeI")) test_removeI();
- else if (getName().equals("test_removeII")) test_removeII();
- else if (getName().equals("test_removeLjava_lang_String")) test_removeLjava_lang_String();
- else if (getName().equals("test_removeModifyListenerLorg_eclipse_swt_events_ModifyListener")) test_removeModifyListenerLorg_eclipse_swt_events_ModifyListener();
- else if (getName().equals("test_removeSelectionListenerLorg_eclipse_swt_events_SelectionListener")) test_removeSelectionListenerLorg_eclipse_swt_events_SelectionListener();
- else if (getName().equals("test_selectI")) test_selectI();
- else if (getName().equals("test_setBackgroundLorg_eclipse_swt_graphics_Color")) test_setBackgroundLorg_eclipse_swt_graphics_Color();
- else if (getName().equals("test_setEditableZ")) test_setEditableZ();
- else if (getName().equals("test_setEnabledZ")) test_setEnabledZ();
- else if (getName().equals("test_setFocus")) test_setFocus();
- else if (getName().equals("test_setFontLorg_eclipse_swt_graphics_Font")) test_setFontLorg_eclipse_swt_graphics_Font();
- else if (getName().equals("test_setForegroundLorg_eclipse_swt_graphics_Color")) test_setForegroundLorg_eclipse_swt_graphics_Color();
- else if (getName().equals("test_setItemILjava_lang_String")) test_setItemILjava_lang_String();
- else if (getName().equals("test_setItems$Ljava_lang_String")) test_setItems$Ljava_lang_String();
- else if (getName().equals("test_setSelectionLorg_eclipse_swt_graphics_Point")) test_setSelectionLorg_eclipse_swt_graphics_Point();
- else if (getName().equals("test_setTextLimitI")) test_setTextLimitI();
- else if (getName().equals("test_setTextLjava_lang_String")) test_setTextLjava_lang_String();
- else if (getName().equals("test_setToolTipTextLjava_lang_String")) test_setToolTipTextLjava_lang_String();
- else if (getName().equals("test_setVisibleZ")) test_setVisibleZ();
- else super.runTest();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_CLabel.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_CLabel.java
deleted file mode 100644
index e67ac9a1df..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_CLabel.java
+++ /dev/null
@@ -1,141 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.custom.CLabel
- *
- * @see org.eclipse.swt.custom.CLabel
- */
-public class Test_org_eclipse_swt_custom_CLabel extends Test_org_eclipse_swt_widgets_Canvas {
-
-public Test_org_eclipse_swt_custom_CLabel(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- super.setUp();
-}
-
-protected void tearDown() {
- super.tearDown();
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_CompositeI() {
- warnUnimpl("Test test_ConstructorLorg_eclipse_swt_widgets_CompositeI not written");
-}
-
-public void test_computeSizeIIZ() {
- warnUnimpl("Test test_computeSizeIIZ not written");
-}
-
-public void test_getAlignment() {
- warnUnimpl("Test test_getAlignment not written");
-}
-
-public void test_getImage() {
- warnUnimpl("Test test_getImage not written");
-}
-
-public void test_getText() {
- warnUnimpl("Test test_getText not written");
-}
-
-public void test_getToolTipText() {
- warnUnimpl("Test test_getToolTipText not written");
-}
-
-public void test_setAlignmentI() {
- warnUnimpl("Test test_setAlignmentI not written");
-}
-
-public void test_setBackground$Lorg_eclipse_swt_graphics_Color$I() {
- warnUnimpl("Test test_setBackground$Lorg_eclipse_swt_graphics_Color$I not written");
-}
-
-public void test_setBackgroundLorg_eclipse_swt_graphics_Color() {
- warnUnimpl("Test test_setBackgroundLorg_eclipse_swt_graphics_Color not written");
-}
-
-public void test_setBackgroundLorg_eclipse_swt_graphics_Image() {
- warnUnimpl("Test test_setBackgroundLorg_eclipse_swt_graphics_Image not written");
-}
-
-public void test_setFontLorg_eclipse_swt_graphics_Font() {
- warnUnimpl("Test test_setFontLorg_eclipse_swt_graphics_Font not written");
-}
-
-public void test_setImageLorg_eclipse_swt_graphics_Image() {
- warnUnimpl("Test test_setImageLorg_eclipse_swt_graphics_Image not written");
-}
-
-public void test_setTextLjava_lang_String() {
- warnUnimpl("Test test_setTextLjava_lang_String not written");
-}
-
-public void test_setToolTipTextLjava_lang_String() {
- warnUnimpl("Test test_setToolTipTextLjava_lang_String not written");
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_custom_CLabel((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_CompositeI");
- methodNames.addElement("test_computeSizeIIZ");
- methodNames.addElement("test_getAlignment");
- methodNames.addElement("test_getImage");
- methodNames.addElement("test_getText");
- methodNames.addElement("test_getToolTipText");
- methodNames.addElement("test_setAlignmentI");
- methodNames.addElement("test_setBackground$Lorg_eclipse_swt_graphics_Color$I");
- methodNames.addElement("test_setBackgroundLorg_eclipse_swt_graphics_Color");
- methodNames.addElement("test_setBackgroundLorg_eclipse_swt_graphics_Image");
- methodNames.addElement("test_setFontLorg_eclipse_swt_graphics_Font");
- methodNames.addElement("test_setImageLorg_eclipse_swt_graphics_Image");
- methodNames.addElement("test_setTextLjava_lang_String");
- methodNames.addElement("test_setToolTipTextLjava_lang_String");
- methodNames.addAll(Test_org_eclipse_swt_widgets_Canvas.methodNames()); // add superclass method names
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_CompositeI")) test_ConstructorLorg_eclipse_swt_widgets_CompositeI();
- else if (getName().equals("test_computeSizeIIZ")) test_computeSizeIIZ();
- else if (getName().equals("test_getAlignment")) test_getAlignment();
- else if (getName().equals("test_getImage")) test_getImage();
- else if (getName().equals("test_getText")) test_getText();
- else if (getName().equals("test_getToolTipText")) test_getToolTipText();
- else if (getName().equals("test_setAlignmentI")) test_setAlignmentI();
- else if (getName().equals("test_setBackground$Lorg_eclipse_swt_graphics_Color$I")) test_setBackground$Lorg_eclipse_swt_graphics_Color$I();
- else if (getName().equals("test_setBackgroundLorg_eclipse_swt_graphics_Color")) test_setBackgroundLorg_eclipse_swt_graphics_Color();
- else if (getName().equals("test_setBackgroundLorg_eclipse_swt_graphics_Image")) test_setBackgroundLorg_eclipse_swt_graphics_Image();
- else if (getName().equals("test_setFontLorg_eclipse_swt_graphics_Font")) test_setFontLorg_eclipse_swt_graphics_Font();
- else if (getName().equals("test_setImageLorg_eclipse_swt_graphics_Image")) test_setImageLorg_eclipse_swt_graphics_Image();
- else if (getName().equals("test_setTextLjava_lang_String")) test_setTextLjava_lang_String();
- else if (getName().equals("test_setToolTipTextLjava_lang_String")) test_setToolTipTextLjava_lang_String();
- else super.runTest();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_CTabFolder.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_CTabFolder.java
deleted file mode 100644
index e0276cd77d..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_CTabFolder.java
+++ /dev/null
@@ -1,244 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.custom.CTabFolder
- *
- * @see org.eclipse.swt.custom.CTabFolder
- */
-public class Test_org_eclipse_swt_custom_CTabFolder extends Test_org_eclipse_swt_widgets_Composite {
-
-public Test_org_eclipse_swt_custom_CTabFolder(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- super.setUp();
-}
-
-protected void tearDown() {
- super.tearDown();
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_CompositeI() {
- warnUnimpl("Test test_ConstructorLorg_eclipse_swt_widgets_CompositeI not written");
-}
-
-public void test_addCTabFolderListenerLorg_eclipse_swt_custom_CTabFolderListener() {
- warnUnimpl("Test test_addCTabFolderListenerLorg_eclipse_swt_custom_CTabFolderListener not written");
-}
-
-public void test_addSelectionListenerLorg_eclipse_swt_events_SelectionListener() {
- warnUnimpl("Test test_addSelectionListenerLorg_eclipse_swt_events_SelectionListener not written");
-}
-
-public void test_computeSizeIIZ() {
- warnUnimpl("Test test_computeSizeIIZ not written");
-}
-
-public void test_computeTrimIIII() {
- warnUnimpl("Test test_computeTrimIIII not written");
-}
-
-public void test_getClientArea() {
- warnUnimpl("Test test_getClientArea not written");
-}
-
-public void test_getItemCount() {
- warnUnimpl("Test test_getItemCount not written");
-}
-
-public void test_getItemI() {
- warnUnimpl("Test test_getItemI not written");
-}
-
-public void test_getItemLorg_eclipse_swt_graphics_Point() {
- warnUnimpl("Test test_getItemLorg_eclipse_swt_graphics_Point not written");
-}
-
-public void test_getItems() {
- warnUnimpl("Test test_getItems not written");
-}
-
-public void test_getSelection() {
- warnUnimpl("Test test_getSelection not written");
-}
-
-public void test_getSelectionIndex() {
- warnUnimpl("Test test_getSelectionIndex not written");
-}
-
-public void test_getTabHeight() {
- warnUnimpl("Test test_getTabHeight not written");
-}
-
-public void test_getTopRight() {
- warnUnimpl("Test test_getTopRight not written");
-}
-
-public void test_indexOfLorg_eclipse_swt_custom_CTabItem() {
- warnUnimpl("Test test_indexOfLorg_eclipse_swt_custom_CTabItem not written");
-}
-
-public void test_removeCTabFolderListenerLorg_eclipse_swt_custom_CTabFolderListener() {
- warnUnimpl("Test test_removeCTabFolderListenerLorg_eclipse_swt_custom_CTabFolderListener not written");
-}
-
-public void test_removeSelectionListenerLorg_eclipse_swt_events_SelectionListener() {
- warnUnimpl("Test test_removeSelectionListenerLorg_eclipse_swt_events_SelectionListener not written");
-}
-
-public void test_setBackgroundLorg_eclipse_swt_graphics_Color() {
- warnUnimpl("Test test_setBackgroundLorg_eclipse_swt_graphics_Color not written");
-}
-
-public void test_setBorderVisibleZ() {
- warnUnimpl("Test test_setBorderVisibleZ not written");
-}
-
-public void test_setFontLorg_eclipse_swt_graphics_Font() {
- warnUnimpl("Test test_setFontLorg_eclipse_swt_graphics_Font not written");
-}
-
-public void test_setInsertMarkIZ() {
- warnUnimpl("Test test_setInsertMarkIZ not written");
-}
-
-public void test_setInsertMarkLorg_eclipse_swt_custom_CTabItemZ() {
- warnUnimpl("Test test_setInsertMarkLorg_eclipse_swt_custom_CTabItemZ not written");
-}
-
-public void test_setSelectionBackground$Lorg_eclipse_swt_graphics_Color$I() {
- warnUnimpl("Test test_setSelectionBackground$Lorg_eclipse_swt_graphics_Color$I not written");
-}
-
-public void test_setSelectionBackgroundLorg_eclipse_swt_graphics_Image() {
- warnUnimpl("Test test_setSelectionBackgroundLorg_eclipse_swt_graphics_Image not written");
-}
-
-public void test_setSelectionForegroundLorg_eclipse_swt_graphics_Color() {
- warnUnimpl("Test test_setSelectionForegroundLorg_eclipse_swt_graphics_Color not written");
-}
-
-public void test_setSelectionI() {
- warnUnimpl("Test test_setSelectionI not written");
-}
-
-public void test_setSelectionLorg_eclipse_swt_custom_CTabItem() {
- warnUnimpl("Test test_setSelectionLorg_eclipse_swt_custom_CTabItem not written");
-}
-
-public void test_setTabHeightI() {
- warnUnimpl("Test test_setTabHeightI not written");
-}
-
-public void test_setTopRightLorg_eclipse_swt_widgets_Control() {
- warnUnimpl("Test test_setTopRightLorg_eclipse_swt_widgets_Control not written");
-}
-
-public void test_showItemLorg_eclipse_swt_custom_CTabItem() {
- warnUnimpl("Test test_showItemLorg_eclipse_swt_custom_CTabItem not written");
-}
-
-public void test_showSelection() {
- warnUnimpl("Test test_showSelection not written");
-}
-
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_custom_CTabFolder((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_CompositeI");
- methodNames.addElement("test_addCTabFolderListenerLorg_eclipse_swt_custom_CTabFolderListener");
- methodNames.addElement("test_addSelectionListenerLorg_eclipse_swt_events_SelectionListener");
- methodNames.addElement("test_computeSizeIIZ");
- methodNames.addElement("test_computeTrimIIII");
- methodNames.addElement("test_getClientArea");
- methodNames.addElement("test_getItemCount");
- methodNames.addElement("test_getItemI");
- methodNames.addElement("test_getItemLorg_eclipse_swt_graphics_Point");
- methodNames.addElement("test_getItems");
- methodNames.addElement("test_getSelection");
- methodNames.addElement("test_getSelectionIndex");
- methodNames.addElement("test_getTabHeight");
- methodNames.addElement("test_getTopRight");
- methodNames.addElement("test_indexOfLorg_eclipse_swt_custom_CTabItem");
- methodNames.addElement("test_removeCTabFolderListenerLorg_eclipse_swt_custom_CTabFolderListener");
- methodNames.addElement("test_removeSelectionListenerLorg_eclipse_swt_events_SelectionListener");
- methodNames.addElement("test_setBackgroundLorg_eclipse_swt_graphics_Color");
- methodNames.addElement("test_setBorderVisibleZ");
- methodNames.addElement("test_setFontLorg_eclipse_swt_graphics_Font");
- methodNames.addElement("test_setInsertMarkIZ");
- methodNames.addElement("test_setInsertMarkLorg_eclipse_swt_custom_CTabItemZ");
- methodNames.addElement("test_setSelectionBackground$Lorg_eclipse_swt_graphics_Color$I");
- methodNames.addElement("test_setSelectionBackgroundLorg_eclipse_swt_graphics_Image");
- methodNames.addElement("test_setSelectionForegroundLorg_eclipse_swt_graphics_Color");
- methodNames.addElement("test_setSelectionI");
- methodNames.addElement("test_setSelectionLorg_eclipse_swt_custom_CTabItem");
- methodNames.addElement("test_setTabHeightI");
- methodNames.addElement("test_setTopRightLorg_eclipse_swt_widgets_Control");
- methodNames.addElement("test_showItemLorg_eclipse_swt_custom_CTabItem");
- methodNames.addElement("test_showSelection");
- methodNames.addAll(Test_org_eclipse_swt_widgets_Composite.methodNames()); // add superclass method names
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_CompositeI")) test_ConstructorLorg_eclipse_swt_widgets_CompositeI();
- else if (getName().equals("test_addCTabFolderListenerLorg_eclipse_swt_custom_CTabFolderListener")) test_addCTabFolderListenerLorg_eclipse_swt_custom_CTabFolderListener();
- else if (getName().equals("test_addSelectionListenerLorg_eclipse_swt_events_SelectionListener")) test_addSelectionListenerLorg_eclipse_swt_events_SelectionListener();
- else if (getName().equals("test_computeSizeIIZ")) test_computeSizeIIZ();
- else if (getName().equals("test_computeTrimIIII")) test_computeTrimIIII();
- else if (getName().equals("test_getClientArea")) test_getClientArea();
- else if (getName().equals("test_getItemCount")) test_getItemCount();
- else if (getName().equals("test_getItemI")) test_getItemI();
- else if (getName().equals("test_getItemLorg_eclipse_swt_graphics_Point")) test_getItemLorg_eclipse_swt_graphics_Point();
- else if (getName().equals("test_getItems")) test_getItems();
- else if (getName().equals("test_getSelection")) test_getSelection();
- else if (getName().equals("test_getSelectionIndex")) test_getSelectionIndex();
- else if (getName().equals("test_getTabHeight")) test_getTabHeight();
- else if (getName().equals("test_getTopRight")) test_getTopRight();
- else if (getName().equals("test_indexOfLorg_eclipse_swt_custom_CTabItem")) test_indexOfLorg_eclipse_swt_custom_CTabItem();
- else if (getName().equals("test_removeCTabFolderListenerLorg_eclipse_swt_custom_CTabFolderListener")) test_removeCTabFolderListenerLorg_eclipse_swt_custom_CTabFolderListener();
- else if (getName().equals("test_removeSelectionListenerLorg_eclipse_swt_events_SelectionListener")) test_removeSelectionListenerLorg_eclipse_swt_events_SelectionListener();
- else if (getName().equals("test_setBackgroundLorg_eclipse_swt_graphics_Color")) test_setBackgroundLorg_eclipse_swt_graphics_Color();
- else if (getName().equals("test_setBorderVisibleZ")) test_setBorderVisibleZ();
- else if (getName().equals("test_setFontLorg_eclipse_swt_graphics_Font")) test_setFontLorg_eclipse_swt_graphics_Font();
- else if (getName().equals("test_setInsertMarkIZ")) test_setInsertMarkIZ();
- else if (getName().equals("test_setInsertMarkLorg_eclipse_swt_custom_CTabItemZ")) test_setInsertMarkLorg_eclipse_swt_custom_CTabItemZ();
- else if (getName().equals("test_setSelectionBackground$Lorg_eclipse_swt_graphics_Color$I")) test_setSelectionBackground$Lorg_eclipse_swt_graphics_Color$I();
- else if (getName().equals("test_setSelectionBackgroundLorg_eclipse_swt_graphics_Image")) test_setSelectionBackgroundLorg_eclipse_swt_graphics_Image();
- else if (getName().equals("test_setSelectionForegroundLorg_eclipse_swt_graphics_Color")) test_setSelectionForegroundLorg_eclipse_swt_graphics_Color();
- else if (getName().equals("test_setSelectionI")) test_setSelectionI();
- else if (getName().equals("test_setSelectionLorg_eclipse_swt_custom_CTabItem")) test_setSelectionLorg_eclipse_swt_custom_CTabItem();
- else if (getName().equals("test_setTabHeightI")) test_setTabHeightI();
- else if (getName().equals("test_setTopRightLorg_eclipse_swt_widgets_Control")) test_setTopRightLorg_eclipse_swt_widgets_Control();
- else if (getName().equals("test_showItemLorg_eclipse_swt_custom_CTabItem")) test_showItemLorg_eclipse_swt_custom_CTabItem();
- else if (getName().equals("test_showSelection")) test_showSelection();
- else super.runTest();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_CTabFolderAdapter.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_CTabFolderAdapter.java
deleted file mode 100644
index 058fae56e3..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_CTabFolderAdapter.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.custom.CTabFolderAdapter
- *
- * @see org.eclipse.swt.custom.CTabFolderAdapter
- */
-public class Test_org_eclipse_swt_custom_CTabFolderAdapter extends SwtTestCase {
-
-public Test_org_eclipse_swt_custom_CTabFolderAdapter(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
-}
-
-protected void tearDown() {
-}
-
-public void test_Constructor() {
- warnUnimpl("Test test_Constructor not written");
-}
-
-public void test_itemClosedLorg_eclipse_swt_custom_CTabFolderEvent() {
- warnUnimpl("Test test_itemClosedLorg_eclipse_swt_custom_CTabFolderEvent not written");
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_custom_CTabFolderAdapter((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_Constructor");
- methodNames.addElement("test_itemClosedLorg_eclipse_swt_custom_CTabFolderEvent");
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_Constructor")) test_Constructor();
- else if (getName().equals("test_itemClosedLorg_eclipse_swt_custom_CTabFolderEvent")) test_itemClosedLorg_eclipse_swt_custom_CTabFolderEvent();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_CTabFolderEvent.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_CTabFolderEvent.java
deleted file mode 100644
index 7ab9667578..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_CTabFolderEvent.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.custom.CTabFolderEvent
- *
- * @see org.eclipse.swt.custom.CTabFolderEvent
- */
-public class Test_org_eclipse_swt_custom_CTabFolderEvent extends Test_org_eclipse_swt_events_TypedEvent {
-
-public Test_org_eclipse_swt_custom_CTabFolderEvent(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- super.setUp();
-}
-
-protected void tearDown() {
- super.tearDown();
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_custom_CTabFolderEvent((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addAll(Test_org_eclipse_swt_events_TypedEvent.methodNames()); // add superclass method names
- return methodNames;
-}
-protected void runTest() throws Throwable {
- super.runTest();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_CTabFolderListener.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_CTabFolderListener.java
deleted file mode 100644
index 6c78461bfb..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_CTabFolderListener.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.custom.CTabFolderListener
- *
- * @see org.eclipse.swt.custom.CTabFolderListener
- */
-public class Test_org_eclipse_swt_custom_CTabFolderListener extends SwtTestCase {
-
-public Test_org_eclipse_swt_custom_CTabFolderListener(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
-}
-
-protected void tearDown() {
-}
-
-public void test_itemClosedLorg_eclipse_swt_custom_CTabFolderEvent() {
- warnUnimpl("Test test_itemClosedLorg_eclipse_swt_custom_CTabFolderEvent not written");
-}
-
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_custom_CTabFolderListener((String)e.nextElement()));
- }
- return suite;
-}
-
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_itemClosedLorg_eclipse_swt_custom_CTabFolderEvent");
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_itemClosedLorg_eclipse_swt_custom_CTabFolderEvent")) test_itemClosedLorg_eclipse_swt_custom_CTabFolderEvent();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_CTabItem.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_CTabItem.java
deleted file mode 100644
index c6dcfe868f..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_CTabItem.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.custom.*;
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.custom.CTabItem
- *
- * @see org.eclipse.swt.custom.CTabItem
- */
-public class Test_org_eclipse_swt_custom_CTabItem extends Test_org_eclipse_swt_widgets_Item {
-
- CTabFolder cTabFolder;
- CTabItem cTabItem;
-
-public Test_org_eclipse_swt_custom_CTabItem(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- super.setUp();
- cTabFolder = new CTabFolder(shell, SWT.NONE);
- cTabItem = new CTabItem(cTabFolder, SWT.NONE);
- setWidget(cTabItem);
-}
-
-protected void tearDown() {
- super.tearDown();
-}
-
-public void test_ConstructorLorg_eclipse_swt_custom_CTabFolderI() {
- warnUnimpl("Test test_ConstructorLorg_eclipse_swt_custom_CTabFolderI not written");
-}
-
-public void test_ConstructorLorg_eclipse_swt_custom_CTabFolderII() {
- warnUnimpl("Test test_ConstructorLorg_eclipse_swt_custom_CTabFolderII not written");
-}
-
-public void test_dispose() {
- warnUnimpl("Test test_dispose not written");
-}
-
-public void test_getBounds() {
- warnUnimpl("Test test_getBounds not written");
-}
-
-public void test_getControl() {
- warnUnimpl("Test test_getControl not written");
-}
-
-public void test_getDisabledImage() {
- warnUnimpl("Test test_getDisabledImage not written");
-}
-
-public void test_getParent() {
- warnUnimpl("Test test_getParent not written");
-}
-
-public void test_getToolTipText() {
- warnUnimpl("Test test_getToolTipText not written");
-}
-
-public void test_setControlLorg_eclipse_swt_widgets_Control() {
- warnUnimpl("Test test_setControlLorg_eclipse_swt_widgets_Control not written");
-}
-
-public void test_setDisabledImageLorg_eclipse_swt_graphics_Image() {
- warnUnimpl("Test test_setDisabledImageLorg_eclipse_swt_graphics_Image not written");
-}
-
-public void test_setImageLorg_eclipse_swt_graphics_Image() {
- warnUnimpl("Test test_setImageLorg_eclipse_swt_graphics_Image not written");
-}
-
-public void test_setTextLjava_lang_String() {
- warnUnimpl("Test test_setTextLjava_lang_String not written");
-}
-
-public void test_setToolTipTextLjava_lang_String() {
- warnUnimpl("Test test_setToolTipTextLjava_lang_String not written");
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_custom_CTabItem((String)e.nextElement()));
- }
- return suite;
-}
-
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_custom_CTabFolderI");
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_custom_CTabFolderII");
- methodNames.addElement("test_dispose");
- methodNames.addElement("test_getBounds");
- methodNames.addElement("test_getControl");
- methodNames.addElement("test_getDisabledImage");
- methodNames.addElement("test_getParent");
- methodNames.addElement("test_getToolTipText");
- methodNames.addElement("test_setControlLorg_eclipse_swt_widgets_Control");
- methodNames.addElement("test_setDisabledImageLorg_eclipse_swt_graphics_Image");
- methodNames.addElement("test_setImageLorg_eclipse_swt_graphics_Image");
- methodNames.addElement("test_setTextLjava_lang_String");
- methodNames.addElement("test_setToolTipTextLjava_lang_String");
- methodNames.addAll(Test_org_eclipse_swt_widgets_Item.methodNames()); // add superclass method names
- return methodNames;
-}
-
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLorg_eclipse_swt_custom_CTabFolderI")) test_ConstructorLorg_eclipse_swt_custom_CTabFolderI();
- else if (getName().equals("test_ConstructorLorg_eclipse_swt_custom_CTabFolderII")) test_ConstructorLorg_eclipse_swt_custom_CTabFolderII();
- else if (getName().equals("test_dispose")) test_dispose();
- else if (getName().equals("test_getBounds")) test_getBounds();
- else if (getName().equals("test_getControl")) test_getControl();
- else if (getName().equals("test_getDisabledImage")) test_getDisabledImage();
- else if (getName().equals("test_getParent")) test_getParent();
- else if (getName().equals("test_getToolTipText")) test_getToolTipText();
- else if (getName().equals("test_setControlLorg_eclipse_swt_widgets_Control")) test_setControlLorg_eclipse_swt_widgets_Control();
- else if (getName().equals("test_setDisabledImageLorg_eclipse_swt_graphics_Image")) test_setDisabledImageLorg_eclipse_swt_graphics_Image();
- else if (getName().equals("test_setImageLorg_eclipse_swt_graphics_Image")) test_setImageLorg_eclipse_swt_graphics_Image();
- else if (getName().equals("test_setTextLjava_lang_String")) test_setTextLjava_lang_String();
- else if (getName().equals("test_setToolTipTextLjava_lang_String")) test_setToolTipTextLjava_lang_String();
- else super.runTest();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_ControlEditor.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_ControlEditor.java
deleted file mode 100644
index ed4b089683..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_ControlEditor.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.custom.ControlEditor
- *
- * @see org.eclipse.swt.custom.ControlEditor
- */
-public class Test_org_eclipse_swt_custom_ControlEditor extends SwtTestCase {
-
-public Test_org_eclipse_swt_custom_ControlEditor(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
-}
-
-protected void tearDown() {
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_Composite() {
- warnUnimpl("Test test_ConstructorLorg_eclipse_swt_widgets_Composite not written");
-}
-
-public void test_dispose() {
- warnUnimpl("Test test_dispose not written");
-}
-
-public void test_getEditor() {
- warnUnimpl("Test test_getEditor not written");
-}
-
-public void test_layout() {
- warnUnimpl("Test test_layout not written");
-}
-
-public void test_setEditorLorg_eclipse_swt_widgets_Control() {
- warnUnimpl("Test test_setEditorLorg_eclipse_swt_widgets_Control not written");
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_custom_ControlEditor((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_Composite");
- methodNames.addElement("test_dispose");
- methodNames.addElement("test_getEditor");
- methodNames.addElement("test_layout");
- methodNames.addElement("test_setEditorLorg_eclipse_swt_widgets_Control");
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_Composite")) test_ConstructorLorg_eclipse_swt_widgets_Composite();
- else if (getName().equals("test_dispose")) test_dispose();
- else if (getName().equals("test_getEditor")) test_getEditor();
- else if (getName().equals("test_layout")) test_layout();
- else if (getName().equals("test_setEditorLorg_eclipse_swt_widgets_Control")) test_setEditorLorg_eclipse_swt_widgets_Control();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_ExtendedModifyEvent.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_ExtendedModifyEvent.java
deleted file mode 100644
index 8a5631acae..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_ExtendedModifyEvent.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.custom.ExtendedModifyEvent
- *
- * @see org.eclipse.swt.custom.ExtendedModifyEvent
- */
-public class Test_org_eclipse_swt_custom_ExtendedModifyEvent extends Test_org_eclipse_swt_events_TypedEvent {
-
-public Test_org_eclipse_swt_custom_ExtendedModifyEvent(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- super.setUp();
-}
-
-protected void tearDown() {
- super.tearDown();
-}
-
-public void test_ConstructorLorg_eclipse_swt_custom_StyledTextEvent() {
- // this method tested by other test classes
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_custom_ExtendedModifyEvent((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_custom_StyledTextEvent");
- methodNames.addAll(Test_org_eclipse_swt_events_TypedEvent.methodNames()); // add superclass method names
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLorg_eclipse_swt_custom_StyledTextEvent")) test_ConstructorLorg_eclipse_swt_custom_StyledTextEvent();
- else super.runTest();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_ExtendedModifyListener.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_ExtendedModifyListener.java
deleted file mode 100644
index a745ab7a2e..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_ExtendedModifyListener.java
+++ /dev/null
@@ -1,325 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.custom.*;
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.custom.ExtendedModifyListener
- *
- * @see org.eclipse.swt.custom.ExtendedModifyListener
- */
-public class Test_org_eclipse_swt_custom_ExtendedModifyListener extends SwtTestCase {
- Shell shell;
- StyledText styledText;
- int verify = -1;
-
-public Test_org_eclipse_swt_custom_ExtendedModifyListener(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-protected void setUp() {
- shell = new Shell();
- styledText = new StyledText(shell, SWT.NULL);
- shell.open();
-}
-
-protected void tearDown() {
-}
-
-public void test_modifyTextLorg_eclipse_swt_custom_ExtendedModifyEvent() {
- ExtendedModifyListener listener = new ExtendedModifyListener() {
- public void modifyText(ExtendedModifyEvent event) {
- switch(verify) {
- case 1 : {
- assertTrue(":1a:", event.start == 0);
- assertTrue(":1b:", event.length == 1);
- assertTrue(":1c:", event.replacedText.equals(""));
- break;
- }
- case 2 : {
- assertTrue(":2a:", event.start == 0);
- assertTrue(":2b:", event.length == 1);
- assertTrue(":2c:", event.replacedText.equals("\n\n"));
- break;
- }
- case 3 : {
- assertTrue(":3a:", event.start == 0);
- assertTrue(":3b:", event.length == 2);
- assertTrue(":3c:", event.replacedText.equals("a"));
- break;
- }
- case 4: {
- assertTrue(":4:", false);
- break;
- }
- case 5 : {
- assertTrue(":5a:", event.start == 0);
- assertTrue(":5b:", event.length == 1);
- assertTrue(":5c:", event.replacedText.equals(""));
- break;
- }
- case 6 : {
- assertTrue(":6a:", event.start == 21);
- assertTrue(":6b:", event.length == 0);
- assertTrue(":6c:", event.replacedText.equals("\nline 4"));
- break;
- }
- case 7 : {
- assertTrue(":7a:", event.start == 5);
- assertTrue(":7b:", event.length == 0);
- assertTrue(":7c:", event.replacedText.equals("is a test"));
- break;
- }
- case 8 : {
- assertTrue(":8a:", event.start == 7);
- assertTrue(":8b:", event.length == 0);
- assertTrue(":8c:", event.replacedText.equals("\r\n"));
- break;
- }
- case 9 : {
- assertTrue(":9a:", event.start == 2);
- assertTrue(":9b:", event.length == 4);
- assertTrue(":9c:", event.replacedText.equals("\r\n"));
- break;
- }
- case 10:{
- assertTrue(":10:", false);
- break;
- }
- case 11: {
- assertTrue(":11:", false);
- break;
- }
- case 12: {
- assertTrue(":12a:", event.start == 3);
- assertTrue(":12b:", event.length == 1);
- assertTrue(":12c:", event.replacedText.equals(""));
- break;
- }
- case 13: {
- assertTrue(":13a:", event.start == 2);
- assertTrue(":13b:", event.length == 1);
- assertTrue(":13c:", event.replacedText.equals(""));
- break;
- }
- case 14: {
- assertTrue(":14:", false);
- break;
- }
- case 15: {
- assertTrue(":15a:", event.start == 2);
- assertTrue(":15b:", event.length == 6);
- assertTrue(":15c:", event.replacedText.equals("\r\n"));
- break;
- }
- case 16:{
- assertTrue(":16:", false);
- break;
- }
- case 17: {
- assertTrue(":17:", false);
- break;
- }
- case 18: {
- assertTrue(":18a:", event.start == 3);
- assertTrue(":18b:", event.length == 7);
- assertTrue(":18c:", event.replacedText.equals(""));
- break;
- }
- case 19: {
- assertTrue(":19a:", event.start == 2);
- assertTrue(":19b:", event.length == 7);
- assertTrue(":19c:", event.replacedText.equals(""));
- break;
- }
- case 20: {
- assertTrue(":20:", false);
- break;
- }
- case 21: {
- assertTrue(":21a:", event.start == 0);
- assertTrue(":21b:", event.length == 16);
- assertTrue(":21c:", event.replacedText.equals("L1\r\nL2\r\nL3\r\nL4\r\n"));
- break;
- }
- }
- }
- };
- styledText.addExtendedModifyListener(listener);
-
- boolean exceptionHandled = false;
- verify = 0;
- styledText.setText("testing");
- verify = 1;
- styledText.replaceTextRange(0, 0, "\n");
-
- verify = 0;
- styledText.setText("\n\n");
- verify = 2;
- styledText.replaceTextRange(0, 2, "a");
-
- verify = 0;
- styledText.setText("a");
- verify = 3;
- styledText.replaceTextRange(0, 1, "\n\n");
-
- verify = 0;
- styledText.setText("L1\r\nL2\r\nL3\r\nL4\r\n");
- verify = 4;
- try {styledText.replaceTextRange(3, 1, "test\n");}
- catch (IllegalArgumentException ex) {
- exceptionHandled = true;
- }
- assertTrue(":4: exception not thrown", exceptionHandled);
- exceptionHandled = false;
-
- verify = 0;
- styledText.setText("Line 1\r\nLine 2");
- verify = 5;
- styledText.replaceTextRange(0, 0, "\r");
-
- verify = 0;
- styledText.setText("This\nis a test\nline 3\nline 4");
- verify = 6;
- styledText.replaceTextRange(21, 7, "");
-
- verify = 0;
- styledText.setText("This\nis a test\r");
- verify = 7;
- styledText.replaceTextRange(5, 9, "");
-
- verify = 0;
- styledText.setText("\nL1\r\nL2\r\n");
- verify = 8;
- styledText.replaceTextRange(7, 2, "");
-
- verify = 0;
- styledText.setText("L1\r\n");
- verify = 9;
- styledText.replaceTextRange(2, 2, "test");
-
- verify = 0;
- styledText.setText("L1\r\n");
- verify = 10;
- try {styledText.replaceTextRange(3, 1, "");}
- catch (IllegalArgumentException ex) {
- exceptionHandled = true;
- }
- assertTrue(":10: exception not thrown", exceptionHandled);
- exceptionHandled = false;
-
- verify = 0;
- styledText.setText("L1\r\nL2\r\nL3\r\nL4\r\n");
- verify = 11;
- try {styledText.replaceTextRange(1, 2, "");}
- catch (IllegalArgumentException ex) {
- exceptionHandled = true;
- }
- assertTrue(":11: exception not thrown", exceptionHandled);
- exceptionHandled = false;
-
- verify = 0;
- styledText.setText("L1\r");
- verify = 12;
- styledText.replaceTextRange(3, 0, "\n");
-
- verify = 0;
- styledText.setText("L1\n");
- verify = 13;
- styledText.replaceTextRange(2, 0, "\r");
-
- verify = 0;
- styledText.setText("L1\r\n");
- verify = 14;
- try {styledText.replaceTextRange(3, 0, "test");}
- catch (IllegalArgumentException ex) {
- exceptionHandled = true;
- }
- assertTrue(":14: exception not thrown", exceptionHandled);
- exceptionHandled = false;
-
- verify = 0;
- styledText.setText("L1\r\n");
- verify = 15;
- styledText.replaceTextRange(2, 2, "test\n\n");
-
- verify = 0;
- styledText.setText("L1\r\n");
- verify = 16;
- try {styledText.replaceTextRange(3, 1, "test\r\n");}
- catch (IllegalArgumentException ex) {
- exceptionHandled = true;
- }
- assertTrue(":16: exception not thrown", exceptionHandled);
- exceptionHandled = false;
-
- verify = 0;
- styledText.setText("L1\r\nL2\r\nL3\r\nL4\r\n");
- verify = 17;
- try {styledText.replaceTextRange(1, 2, "test\n\n");}
- catch (IllegalArgumentException ex) {
- exceptionHandled = true;
- }
- assertTrue(":17: exception not thrown", exceptionHandled);
- exceptionHandled = false;
-
- verify = 0;
- styledText.setText("L1\r");
- verify = 18;
- styledText.replaceTextRange(3, 0, "\ntest\r\n");
-
- verify = 0;
- styledText.setText("L1\n");
- verify = 19;
- styledText.replaceTextRange(2, 0, "test\r\r\r");
-
- verify = 0;
- styledText.setText("L1\r\nL2\r\nL3\r\nL4\r\n");
- verify = 20;
- try {styledText.replaceTextRange(3, 1, "test\n");}
- catch (IllegalArgumentException ex) {
- exceptionHandled = true;
- }
- assertTrue(":20: exception not thrown", exceptionHandled);
- exceptionHandled = false;
-
- verify = 21;
- styledText.setText("L1\r\nL2\r\nL3\r\nL4\r\n");
- styledText.removeExtendedModifyListener(listener);
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_custom_ExtendedModifyListener((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_modifyTextLorg_eclipse_swt_custom_ExtendedModifyEvent");
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_modifyTextLorg_eclipse_swt_custom_ExtendedModifyEvent")) test_modifyTextLorg_eclipse_swt_custom_ExtendedModifyEvent();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_LineBackgroundEvent.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_LineBackgroundEvent.java
deleted file mode 100644
index f2473fa66a..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_LineBackgroundEvent.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.custom.LineBackgroundEvent
- *
- * @see org.eclipse.swt.custom.LineBackgroundEvent
- */
-public class Test_org_eclipse_swt_custom_LineBackgroundEvent extends Test_org_eclipse_swt_events_TypedEvent {
-
-public Test_org_eclipse_swt_custom_LineBackgroundEvent(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- super.setUp();
-}
-
-protected void tearDown() {
- super.tearDown();
-}
-
-public void test_ConstructorLorg_eclipse_swt_custom_StyledTextEvent() {
- // this method tested by other test classes
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_custom_LineBackgroundEvent((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_custom_StyledTextEvent");
- methodNames.addAll(Test_org_eclipse_swt_events_TypedEvent.methodNames()); // add superclass method names
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLorg_eclipse_swt_custom_StyledTextEvent")) test_ConstructorLorg_eclipse_swt_custom_StyledTextEvent();
- else super.runTest();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_LineBackgroundListener.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_LineBackgroundListener.java
deleted file mode 100644
index a7661d8d07..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_LineBackgroundListener.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.custom.*;
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.custom.LineBackgroundListener
- *
- * @see org.eclipse.swt.custom.LineBackgroundListener
- */
-public class Test_org_eclipse_swt_custom_LineBackgroundListener extends SwtTestCase {
- Shell shell;
- StyledText styledText;
-
-public Test_org_eclipse_swt_custom_LineBackgroundListener(String name) {
- super(name);
-}
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-protected void setUp() {
- shell = new Shell();
- styledText = new StyledText(shell, SWT.NULL);
- shell.open();
-}
-protected void tearDown() {
-}
-
-public void test_lineGetBackgroundLorg_eclipse_swt_custom_LineBackgroundEvent() {
- LineBackgroundListener listener = new LineBackgroundListener() {
- public void lineGetBackground(LineBackgroundEvent event) {
- assertTrue(":1:", event.lineOffset==0);
- assertTrue(":2:",event.lineText.equals("0123456789"));
- }
- };
- styledText.addLineBackgroundListener(listener);
- styledText.setText("0123456789");
- // force get line bg callback
- styledText.selectAll();
- styledText.copy();
- styledText.removeLineBackgroundListener(listener);
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_custom_LineBackgroundListener((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_lineGetBackgroundLorg_eclipse_swt_custom_LineBackgroundEvent");
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_lineGetBackgroundLorg_eclipse_swt_custom_LineBackgroundEvent")) test_lineGetBackgroundLorg_eclipse_swt_custom_LineBackgroundEvent();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_LineStyleEvent.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_LineStyleEvent.java
deleted file mode 100644
index d23bb3cbbe..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_LineStyleEvent.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.custom.LineStyleEvent
- *
- * @see org.eclipse.swt.custom.LineStyleEvent
- */
-public class Test_org_eclipse_swt_custom_LineStyleEvent extends Test_org_eclipse_swt_events_TypedEvent {
-
-public Test_org_eclipse_swt_custom_LineStyleEvent(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- super.setUp();
-}
-
-protected void tearDown() {
- super.tearDown();
-}
-
-public void test_ConstructorLorg_eclipse_swt_custom_StyledTextEvent() {
- // this method tested by other test classes
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_custom_LineStyleEvent((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_custom_StyledTextEvent");
- methodNames.addAll(Test_org_eclipse_swt_events_TypedEvent.methodNames()); // add superclass method names
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLorg_eclipse_swt_custom_StyledTextEvent")) test_ConstructorLorg_eclipse_swt_custom_StyledTextEvent();
- else super.runTest();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_LineStyleListener.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_LineStyleListener.java
deleted file mode 100644
index 66206e5f8b..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_LineStyleListener.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.custom.*;
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.custom.LineStyleListener
- *
- * @see org.eclipse.swt.custom.LineStyleListener
- */
-public class Test_org_eclipse_swt_custom_LineStyleListener extends SwtTestCase {
- Shell shell;
- StyledText styledText;
-
-public Test_org_eclipse_swt_custom_LineStyleListener(String name) {
- super(name);
-}
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-protected void setUp() {
- shell = new Shell();
- styledText = new StyledText(shell, SWT.NULL);
- shell.open();
-}
-
-protected void tearDown() {
-}
-
-public void test_lineGetStyleLorg_eclipse_swt_custom_LineStyleEvent() {
- LineStyleListener listener = new LineStyleListener() {
- public void lineGetStyle(LineStyleEvent event) {
- assertTrue(":1:", event.lineOffset==0);
- assertTrue(":2:",event.lineText.equals("0123456789"));
- }
- };
- styledText.addLineStyleListener(listener);
- styledText.setText("0123456789");
- // force get line styles callback
- styledText.getLocationAtOffset(5);
- styledText.removeLineStyleListener(listener);
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_custom_LineStyleListener((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_lineGetStyleLorg_eclipse_swt_custom_LineStyleEvent");
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_lineGetStyleLorg_eclipse_swt_custom_LineStyleEvent")) test_lineGetStyleLorg_eclipse_swt_custom_LineStyleEvent();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_PopupList.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_PopupList.java
deleted file mode 100644
index debe40cc7a..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_PopupList.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.custom.PopupList
- *
- * @see org.eclipse.swt.custom.PopupList
- */
-public class Test_org_eclipse_swt_custom_PopupList extends SwtTestCase {
-
-public Test_org_eclipse_swt_custom_PopupList(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
-}
-
-protected void tearDown() {
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_Shell() {
- warnUnimpl("Test test_ConstructorLorg_eclipse_swt_widgets_Shell not written");
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_ShellI() {
- warnUnimpl("Test test_ConstructorLorg_eclipse_swt_widgets_ShellI not written");
-}
-
-public void test_getFont() {
- warnUnimpl("Test test_getFont not written");
-}
-
-public void test_getItems() {
- warnUnimpl("Test test_getItems not written");
-}
-
-public void test_getMinimumWidth() {
- warnUnimpl("Test test_getMinimumWidth not written");
-}
-
-public void test_openLorg_eclipse_swt_graphics_Rectangle() {
- warnUnimpl("Test test_openLorg_eclipse_swt_graphics_Rectangle not written");
-}
-
-public void test_selectLjava_lang_String() {
- warnUnimpl("Test test_selectLjava_lang_String not written");
-}
-
-public void test_setFontLorg_eclipse_swt_graphics_Font() {
- warnUnimpl("Test test_setFontLorg_eclipse_swt_graphics_Font not written");
-}
-
-public void test_setItems$Ljava_lang_String() {
- warnUnimpl("Test test_setItems$Ljava_lang_String not written");
-}
-
-public void test_setMinimumWidthI() {
- warnUnimpl("Test test_setMinimumWidthI not written");
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_custom_PopupList((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_Shell");
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_ShellI");
- methodNames.addElement("test_getFont");
- methodNames.addElement("test_getItems");
- methodNames.addElement("test_getMinimumWidth");
- methodNames.addElement("test_openLorg_eclipse_swt_graphics_Rectangle");
- methodNames.addElement("test_selectLjava_lang_String");
- methodNames.addElement("test_setFontLorg_eclipse_swt_graphics_Font");
- methodNames.addElement("test_setItems$Ljava_lang_String");
- methodNames.addElement("test_setMinimumWidthI");
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_Shell")) test_ConstructorLorg_eclipse_swt_widgets_Shell();
- else if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_ShellI")) test_ConstructorLorg_eclipse_swt_widgets_ShellI();
- else if (getName().equals("test_getFont")) test_getFont();
- else if (getName().equals("test_getItems")) test_getItems();
- else if (getName().equals("test_getMinimumWidth")) test_getMinimumWidth();
- else if (getName().equals("test_openLorg_eclipse_swt_graphics_Rectangle")) test_openLorg_eclipse_swt_graphics_Rectangle();
- else if (getName().equals("test_selectLjava_lang_String")) test_selectLjava_lang_String();
- else if (getName().equals("test_setFontLorg_eclipse_swt_graphics_Font")) test_setFontLorg_eclipse_swt_graphics_Font();
- else if (getName().equals("test_setItems$Ljava_lang_String")) test_setItems$Ljava_lang_String();
- else if (getName().equals("test_setMinimumWidthI")) test_setMinimumWidthI();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_ST.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_ST.java
deleted file mode 100644
index 6e1295e915..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_ST.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.custom.ST
- *
- * @see org.eclipse.swt.custom.ST
- */
-public class Test_org_eclipse_swt_custom_ST extends SwtTestCase {
-
-public Test_org_eclipse_swt_custom_ST(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
-}
-
-protected void tearDown() {
-}
-
-public void test_Constructor() {
- // doesn't make sense to test this, ST is constants class
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_custom_ST((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_Constructor");
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_Constructor")) test_Constructor();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_SashForm.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_SashForm.java
deleted file mode 100644
index 31993b918a..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_SashForm.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.custom.SashForm
- *
- * @see org.eclipse.swt.custom.SashForm
- */
-public class Test_org_eclipse_swt_custom_SashForm extends Test_org_eclipse_swt_widgets_Composite {
-
-public Test_org_eclipse_swt_custom_SashForm(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- super.setUp();
-}
-
-protected void tearDown() {
- super.tearDown();
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_CompositeI() {
- warnUnimpl("Test test_ConstructorLorg_eclipse_swt_widgets_CompositeI not written");
-}
-
-public void test_computeSizeIIZ() {
- warnUnimpl("Test test_computeSizeIIZ not written");
-}
-
-public void test_getMaximizedControl() {
- warnUnimpl("Test test_getMaximizedControl not written");
-}
-
-public void test_getOrientation() {
- warnUnimpl("Test test_getOrientation not written");
-}
-
-public void test_getWeights() {
- warnUnimpl("Test test_getWeights not written");
-}
-
-public void test_layoutZ() {
- warnUnimpl("Test test_layoutZ not written");
-}
-
-public void test_setBackgroundLorg_eclipse_swt_graphics_Color() {
- warnUnimpl("Test test_setBackgroundLorg_eclipse_swt_graphics_Color not written");
-}
-
-public void test_setForegroundLorg_eclipse_swt_graphics_Color() {
- warnUnimpl("Test test_setForegroundLorg_eclipse_swt_graphics_Color not written");
-}
-
-public void test_setLayoutLorg_eclipse_swt_widgets_Layout() {
- warnUnimpl("Test test_setLayoutLorg_eclipse_swt_widgets_Layout not written");
-}
-
-public void test_setMaximizedControlLorg_eclipse_swt_widgets_Control() {
- warnUnimpl("Test test_setMaximizedControlLorg_eclipse_swt_widgets_Control not written");
-}
-
-public void test_setOrientationI() {
- warnUnimpl("Test test_setOrientationI not written");
-}
-
-public void test_setWeights$I() {
- warnUnimpl("Test test_setWeights$I not written");
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_custom_SashForm((String)e.nextElement()));
- }
- return suite;
-}
-
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_CompositeI");
- methodNames.addElement("test_computeSizeIIZ");
- methodNames.addElement("test_getMaximizedControl");
- methodNames.addElement("test_getOrientation");
- methodNames.addElement("test_getWeights");
- methodNames.addElement("test_layoutZ");
- methodNames.addElement("test_setBackgroundLorg_eclipse_swt_graphics_Color");
- methodNames.addElement("test_setForegroundLorg_eclipse_swt_graphics_Color");
- methodNames.addElement("test_setLayoutLorg_eclipse_swt_widgets_Layout");
- methodNames.addElement("test_setMaximizedControlLorg_eclipse_swt_widgets_Control");
- methodNames.addElement("test_setOrientationI");
- methodNames.addElement("test_setWeights$I");
- methodNames.addAll(Test_org_eclipse_swt_widgets_Composite.methodNames()); // add superclass method names
- return methodNames;
-}
-
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_CompositeI")) test_ConstructorLorg_eclipse_swt_widgets_CompositeI();
- else if (getName().equals("test_computeSizeIIZ")) test_computeSizeIIZ();
- else if (getName().equals("test_getMaximizedControl")) test_getMaximizedControl();
- else if (getName().equals("test_getOrientation")) test_getOrientation();
- else if (getName().equals("test_getWeights")) test_getWeights();
- else if (getName().equals("test_layoutZ")) test_layoutZ();
- else if (getName().equals("test_setBackgroundLorg_eclipse_swt_graphics_Color")) test_setBackgroundLorg_eclipse_swt_graphics_Color();
- else if (getName().equals("test_setForegroundLorg_eclipse_swt_graphics_Color")) test_setForegroundLorg_eclipse_swt_graphics_Color();
- else if (getName().equals("test_setLayoutLorg_eclipse_swt_widgets_Layout")) test_setLayoutLorg_eclipse_swt_widgets_Layout();
- else if (getName().equals("test_setMaximizedControlLorg_eclipse_swt_widgets_Control")) test_setMaximizedControlLorg_eclipse_swt_widgets_Control();
- else if (getName().equals("test_setOrientationI")) test_setOrientationI();
- else if (getName().equals("test_setWeights$I")) test_setWeights$I();
- else super.runTest();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_ScrolledComposite.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_ScrolledComposite.java
deleted file mode 100644
index cfcbf37b8a..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_ScrolledComposite.java
+++ /dev/null
@@ -1,160 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.custom.ScrolledComposite
- *
- * @see org.eclipse.swt.custom.ScrolledComposite
- */
-public class Test_org_eclipse_swt_custom_ScrolledComposite extends Test_org_eclipse_swt_widgets_Composite {
-
-public Test_org_eclipse_swt_custom_ScrolledComposite(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- super.setUp();
-}
-
-protected void tearDown() {
- super.tearDown();
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_CompositeI() {
- warnUnimpl("Test test_ConstructorLorg_eclipse_swt_widgets_CompositeI not written");
-}
-
-public void test_computeSizeIIZ() {
- warnUnimpl("Test test_computeSizeIIZ not written");
-}
-
-public void test_getAlwaysShowScrollBars() {
- warnUnimpl("Test test_getAlwaysShowScrollBars not written");
-}
-
-public void test_getContent() {
- warnUnimpl("Test test_getContent not written");
-}
-
-public void test_getOrigin() {
- warnUnimpl("Test test_getOrigin not written");
-}
-
-public void test_layoutZ() {
- warnUnimpl("Test test_layoutZ not written");
-}
-
-public void test_setAlwaysShowScrollBarsZ() {
- warnUnimpl("Test test_setAlwaysShowScrollBarsZ not written");
-}
-
-public void test_setContentLorg_eclipse_swt_widgets_Control() {
- warnUnimpl("Test test_setContentLorg_eclipse_swt_widgets_Control not written");
-}
-
-public void test_setExpandHorizontalZ() {
- warnUnimpl("Test test_setExpandHorizontalZ not written");
-}
-
-public void test_setExpandVerticalZ() {
- warnUnimpl("Test test_setExpandVerticalZ not written");
-}
-
-public void test_setLayoutLorg_eclipse_swt_widgets_Layout() {
- warnUnimpl("Test test_setLayoutLorg_eclipse_swt_widgets_Layout not written");
-}
-
-public void test_setMinHeightI() {
- warnUnimpl("Test test_setMinHeightI not written");
-}
-
-public void test_setMinSizeII() {
- warnUnimpl("Test test_setMinSizeII not written");
-}
-
-public void test_setMinSizeLorg_eclipse_swt_graphics_Point() {
- warnUnimpl("Test test_setMinSizeLorg_eclipse_swt_graphics_Point not written");
-}
-
-public void test_setMinWidthI() {
- warnUnimpl("Test test_setMinWidthI not written");
-}
-
-public void test_setOriginII() {
- warnUnimpl("Test test_setOriginII not written");
-}
-
-public void test_setOriginLorg_eclipse_swt_graphics_Point() {
- warnUnimpl("Test test_setOriginLorg_eclipse_swt_graphics_Point not written");
-}
-
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_custom_ScrolledComposite((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_CompositeI");
- methodNames.addElement("test_computeSizeIIZ");
- methodNames.addElement("test_getAlwaysShowScrollBars");
- methodNames.addElement("test_getContent");
- methodNames.addElement("test_getOrigin");
- methodNames.addElement("test_layoutZ");
- methodNames.addElement("test_setAlwaysShowScrollBarsZ");
- methodNames.addElement("test_setContentLorg_eclipse_swt_widgets_Control");
- methodNames.addElement("test_setExpandHorizontalZ");
- methodNames.addElement("test_setExpandVerticalZ");
- methodNames.addElement("test_setLayoutLorg_eclipse_swt_widgets_Layout");
- methodNames.addElement("test_setMinHeightI");
- methodNames.addElement("test_setMinSizeII");
- methodNames.addElement("test_setMinSizeLorg_eclipse_swt_graphics_Point");
- methodNames.addElement("test_setMinWidthI");
- methodNames.addElement("test_setOriginII");
- methodNames.addElement("test_setOriginLorg_eclipse_swt_graphics_Point");
- methodNames.addAll(Test_org_eclipse_swt_widgets_Composite.methodNames()); // add superclass method names
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_CompositeI")) test_ConstructorLorg_eclipse_swt_widgets_CompositeI();
- else if (getName().equals("test_computeSizeIIZ")) test_computeSizeIIZ();
- else if (getName().equals("test_getAlwaysShowScrollBars")) test_getAlwaysShowScrollBars();
- else if (getName().equals("test_getContent")) test_getContent();
- else if (getName().equals("test_getOrigin")) test_getOrigin();
- else if (getName().equals("test_layoutZ")) test_layoutZ();
- else if (getName().equals("test_setAlwaysShowScrollBarsZ")) test_setAlwaysShowScrollBarsZ();
- else if (getName().equals("test_setContentLorg_eclipse_swt_widgets_Control")) test_setContentLorg_eclipse_swt_widgets_Control();
- else if (getName().equals("test_setExpandHorizontalZ")) test_setExpandHorizontalZ();
- else if (getName().equals("test_setExpandVerticalZ")) test_setExpandVerticalZ();
- else if (getName().equals("test_setLayoutLorg_eclipse_swt_widgets_Layout")) test_setLayoutLorg_eclipse_swt_widgets_Layout();
- else if (getName().equals("test_setMinHeightI")) test_setMinHeightI();
- else if (getName().equals("test_setMinSizeII")) test_setMinSizeII();
- else if (getName().equals("test_setMinSizeLorg_eclipse_swt_graphics_Point")) test_setMinSizeLorg_eclipse_swt_graphics_Point();
- else if (getName().equals("test_setMinWidthI")) test_setMinWidthI();
- else if (getName().equals("test_setOriginII")) test_setOriginII();
- else if (getName().equals("test_setOriginLorg_eclipse_swt_graphics_Point")) test_setOriginLorg_eclipse_swt_graphics_Point();
- else super.runTest();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_StackLayout.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_StackLayout.java
deleted file mode 100644
index 30e8b7c4a9..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_StackLayout.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.custom.StackLayout
- *
- * @see org.eclipse.swt.custom.StackLayout
- */
-public class Test_org_eclipse_swt_custom_StackLayout extends Test_org_eclipse_swt_widgets_Layout {
-
-public Test_org_eclipse_swt_custom_StackLayout(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- super.setUp();
-}
-
-protected void tearDown() {
- super.tearDown();
-}
-
-public void test_Constructor() {
- warnUnimpl("Test test_Constructor not written");
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_custom_StackLayout((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_Constructor");
- methodNames.addAll(Test_org_eclipse_swt_widgets_Layout.methodNames()); // add superclass method names
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_Constructor")) test_Constructor();
- else super.runTest();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_StyleRange.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_StyleRange.java
deleted file mode 100644
index 31edd51f8b..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_StyleRange.java
+++ /dev/null
@@ -1,190 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import java.util.*;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-import junit.textui.TestRunner;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.StyleRange;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.RGB;
-import org.eclipse.swt.widgets.Display;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.custom.StyleRange
- *
- * @see org.eclipse.swt.custom.StyleRange
- */
-public class Test_org_eclipse_swt_custom_StyleRange extends SwtTestCase {
- final static RGB RED = new RGB(255,0,0);
- final static RGB BLUE = new RGB(0,0,255);
- final static RGB GREEN = new RGB(0,255,0);
- Hashtable colors = new Hashtable();
-public Test_org_eclipse_swt_custom_StyleRange(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-private Color getColor(RGB rgb) {
- return (Color)colors.get(rgb);
-}
-protected void initializeColors() {
- Display display = Display.getDefault();
- colors.put(RED, new Color (display, RED));
- colors.put(GREEN, new Color (display, GREEN));
- colors.put(BLUE, new Color (display, BLUE));
-}
-
-protected void setUp() {
- initializeColors();
-}
-
-protected void tearDown() {
- Enumeration elements = colors.keys();
- while (elements.hasMoreElements()) {
- Color color = (Color)colors.get((RGB)elements.nextElement());
- color.dispose();
- }
-}
-
-public void test_Constructor() {
- StyleRange styleRange = new StyleRange();
- assertTrue(":a:", styleRange.start == 0);
- assertTrue(":a:", styleRange.length == 0);
- assertTrue(":a:", styleRange.foreground == null);
- assertTrue(":a:", styleRange.background == null);
- assertTrue(":a:", styleRange.fontStyle == SWT.NORMAL);
-}
-
-public void test_ConstructorIILorg_eclipse_swt_graphics_ColorLorg_eclipse_swt_graphics_Color() {
- StyleRange styleRange = new StyleRange(5, 10, getColor(RED), getColor(BLUE));
- assertTrue(":b:", styleRange.start == 5);
- assertTrue(":b:", styleRange.length == 10);
- assertTrue(":b:", styleRange.foreground == getColor(RED));
- assertTrue(":b:", styleRange.background == getColor(BLUE));
- assertTrue(":b:", styleRange.fontStyle == SWT.NORMAL);
-}
-
-public void test_ConstructorIILorg_eclipse_swt_graphics_ColorLorg_eclipse_swt_graphics_ColorI() {
- StyleRange styleRange = new StyleRange(5, 10, getColor(RED), getColor(BLUE), SWT.BOLD);
- assertTrue(":c:", styleRange.start == 5);
- assertTrue(":c:", styleRange.length == 10);
- assertTrue(":c:", styleRange.foreground == getColor(RED));
- assertTrue(":c:", styleRange.background == getColor(BLUE));
- assertTrue(":c:", styleRange.fontStyle == SWT.BOLD);
-}
-
-public void test_clone() {
- StyleRange styleRangeA = new StyleRange(6, 10, null, getColor(BLUE), SWT.NORMAL);
- StyleRange styleRangeB = (StyleRange)styleRangeA.clone();
- assertTrue(":g:", styleRangeA.equals(styleRangeB));
-}
-
-public void test_equalsLjava_lang_Object() {
- StyleRange styleRangeA = new StyleRange(5, 10, getColor(RED), getColor(BLUE), SWT.BOLD);
- StyleRange styleRangeB = new StyleRange(5, 10, getColor(RED), getColor(BLUE), SWT.BOLD);
- StyleRange styleRangeC = new StyleRange(5, 10, getColor(BLUE), getColor(BLUE), SWT.BOLD);
- StyleRange styleRangeD = new StyleRange(6, 10, getColor(RED), getColor(BLUE), SWT.BOLD);
- StyleRange styleRangeE = new StyleRange(5, 11, getColor(RED), getColor(BLUE), SWT.BOLD);
- StyleRange styleRangeF = new StyleRange(5, 11, getColor(RED), getColor(RED), SWT.BOLD);
- StyleRange styleRangeG = new StyleRange(5, 11, getColor(RED), getColor(BLUE), SWT.NORMAL);
- assertTrue(":d:", styleRangeA.equals(styleRangeB));
- assertTrue(":d:",!styleRangeA.equals(styleRangeC));
- assertTrue(":d:",!styleRangeA.equals(styleRangeD));
- assertTrue(":d:",!styleRangeA.equals(styleRangeE));
- assertTrue(":d:",!styleRangeA.equals(styleRangeF));
- assertTrue(":d:",!styleRangeA.equals(styleRangeG));
-}
-
-public void test_hashCode() {
- Set set = new HashSet();
- Color testColor = new Color(Display.getDefault(), 0, 0, 0);
-
- //regression test for bug 30924
- set.add(new StyleRange());
- set.add(new StyleRange(0, 1, testColor, null));
- set.add(new StyleRange(0, 1, testColor, testColor));
- set.add(new StyleRange(0, 1, testColor, testColor, SWT.BOLD));
- testColor.dispose();
-}
-
-public void test_isUnstyled() {
- StyleRange styleRangeA = new StyleRange(5, 10, null, null, SWT.NORMAL);
- StyleRange styleRangeB = new StyleRange(5, 10, getColor(RED), null, SWT.NORMAL);
- StyleRange styleRangeC = new StyleRange(5, 10, null, null, SWT.BOLD);
- StyleRange styleRangeD = new StyleRange(6, 10, null, getColor(BLUE), SWT.NORMAL);
- StyleRange styleRangeE = new StyleRange(5, 10, null, null);
- assertTrue(":e:", styleRangeA.isUnstyled());
- assertTrue(":e:",!styleRangeB.isUnstyled());
- assertTrue(":e:",!styleRangeC.isUnstyled());
- assertTrue(":e:",!styleRangeD.isUnstyled());
- assertTrue(":e:", styleRangeE.isUnstyled());
-}
-
-public void test_similarToLorg_eclipse_swt_custom_StyleRange() {
- StyleRange styleRangeA = new StyleRange(6, 10, getColor(RED), getColor(BLUE), SWT.NORMAL);
- StyleRange styleRangeB = new StyleRange(5, 5, getColor(RED), getColor(BLUE), SWT.NORMAL);
- StyleRange styleRangeC = new StyleRange(6, 10, getColor(RED), getColor(BLUE), SWT.NORMAL);
- StyleRange styleRangeD = new StyleRange(6, 10, getColor(BLUE), getColor(BLUE), SWT.NORMAL);
- StyleRange styleRangeE = new StyleRange(6, 10, getColor(RED), getColor(RED), SWT.NORMAL);
- StyleRange styleRangeF = new StyleRange(6, 10, getColor(RED), getColor(BLUE), SWT.BOLD);
- assertTrue(":f:", styleRangeA.similarTo(styleRangeB));
- assertTrue(":f:", styleRangeA.similarTo(styleRangeC));
- assertTrue(":f:", !styleRangeA.similarTo(styleRangeD));
- assertTrue(":f:", !styleRangeA.similarTo(styleRangeE));
- assertTrue(":f:", !styleRangeA.similarTo(styleRangeF));
-}
-
-public void test_toString() {
- StyleRange styleRange = new StyleRange(6, 10, null, getColor(BLUE), SWT.NORMAL);
- styleRange.toString();
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_custom_StyleRange((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_Constructor");
- methodNames.addElement("test_ConstructorIILorg_eclipse_swt_graphics_ColorLorg_eclipse_swt_graphics_Color");
- methodNames.addElement("test_ConstructorIILorg_eclipse_swt_graphics_ColorLorg_eclipse_swt_graphics_ColorI");
- methodNames.addElement("test_clone");
- methodNames.addElement("test_equalsLjava_lang_Object");
- methodNames.addElement("test_hashCode");
- methodNames.addElement("test_isUnstyled");
- methodNames.addElement("test_similarToLorg_eclipse_swt_custom_StyleRange");
- methodNames.addElement("test_toString");
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_Constructor")) test_Constructor();
- else if (getName().equals("test_ConstructorIILorg_eclipse_swt_graphics_ColorLorg_eclipse_swt_graphics_Color")) test_ConstructorIILorg_eclipse_swt_graphics_ColorLorg_eclipse_swt_graphics_Color();
- else if (getName().equals("test_ConstructorIILorg_eclipse_swt_graphics_ColorLorg_eclipse_swt_graphics_ColorI")) test_ConstructorIILorg_eclipse_swt_graphics_ColorLorg_eclipse_swt_graphics_ColorI();
- else if (getName().equals("test_clone")) test_clone();
- else if (getName().equals("test_equalsLjava_lang_Object")) test_equalsLjava_lang_Object();
- else if (getName().equals("test_hashCode")) test_hashCode();
- else if (getName().equals("test_isUnstyled")) test_isUnstyled();
- else if (getName().equals("test_similarToLorg_eclipse_swt_custom_StyleRange")) test_similarToLorg_eclipse_swt_custom_StyleRange();
- else if (getName().equals("test_toString")) test_toString();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_StyledText.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_StyledText.java
deleted file mode 100644
index 50aeee8eb8..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_StyledText.java
+++ /dev/null
@@ -1,4355 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import java.util.*;
-
-import junit.framework.*;
-import junit.textui.*;
-import org.eclipse.swt.*;
-import org.eclipse.swt.custom.*;
-import org.eclipse.swt.dnd.*;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.printing.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.internal.BidiUtil;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.custom.StyledText
- *
- * @see org.eclipse.swt.custom.StyledText
- */
-public class Test_org_eclipse_swt_custom_StyledText extends Test_org_eclipse_swt_widgets_Canvas {
-
-StyledText text;
-final static RGB RED = new RGB(255,0,0);
-final static RGB BLUE = new RGB(0,0,255);
-final static RGB GREEN = new RGB(0,255,0);
-final static RGB YELLOW = new RGB(255,255,0);
-final static RGB CYAN = new RGB(0,255,255);
-final static RGB PURPLE = new RGB(255,0,255);
-final static String PLATFORM_LINE_DELIMITER = System.getProperty("line.separator");
-Hashtable colors = new Hashtable();
-private boolean listenerCalled;
-private boolean listener2Called;
-
-public Test_org_eclipse_swt_custom_StyledText(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- super.setUp();
- initializeColors();
- text = new StyledText(shell, SWT.NULL);
- setWidget(text);
-}
-
-protected void tearDown() {
- Enumeration elements = colors.keys();
- while (elements.hasMoreElements()) {
- Color color = (Color)colors.get((RGB)elements.nextElement());
- color.dispose();
- }
- super.tearDown();
-
-}
-
-// this method must not be public so that the auto-gen tool keeps it
-private StyleRange[] defaultStyles() {
- return new StyleRange[] {
- getStyle(0,48,RED,YELLOW),
- getStyle(58,10,BLUE,CYAN),
- getStyle(68,10,GREEN,PURPLE)};
-}
-// this method must not be public so that the auto-gen tool keeps it
-protected void getLineBackgrounds() {
- for (int i=0; i<text.getLineCount(); i++) {
- text.getLineBackground(i);
- }
-}
-// this method must not be public so that the auto-gen tool keeps it
-private String textString() {
- return "This is the text component in testing\nNew Line1\nNew Line2\nNew Line3\nNew Line4.";
-}
-private boolean isBidi() {
- return BidiUtil.isBidiPlatform();
-}
-// this method must not be public so that the auto-gen tool keeps it
-private StyleRange getStyle(int start, int length, RGB fg, RGB bg) {
- StyleRange style = new StyleRange();
- style.start = start;
- style.length = length;
- if (fg != null) style.foreground = getColor(fg);
- else style.foreground = null;
- if (bg != null) style.background = getColor(bg);
- else style.background = null;
- return style;
-}
-// this method must not be public so that the auto-gen tool keeps it
-private Color getColor(RGB rgb) {
- return (Color)colors.get(rgb);
-}
-// this method must not be public so that the auto-gen tool keeps it
-protected void initializeColors() {
- Display display = Display.getDefault();
- colors.put(RED, new Color (display, RED));
- colors.put(BLUE, new Color (display, BLUE));
- colors.put(GREEN, new Color (display, GREEN));
- colors.put(YELLOW, new Color (display, YELLOW));
- colors.put(CYAN, new Color (display, CYAN));
- colors.put(PURPLE, new Color (display, PURPLE));
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_CompositeI(){
- StyledText text = new StyledText(shell, SWT.READ_ONLY);
-
- assertTrue(":a:", text.getEditable() == false);
- text.dispose();
-
- text = new StyledText(shell, SWT.H_SCROLL | SWT.V_SCROLL | SWT.SINGLE);
- assertTrue(":b:", text.getVerticalBar() == null);
- assertTrue(":c:", text.getHorizontalBar() == null);
- text.dispose();
-}
-
-public void test_addExtendedModifyListenerLorg_eclipse_swt_custom_ExtendedModifyListener() {
- final String line = "Line1";
- boolean exceptionThrown = false;
- ExtendedModifyListener listener = new ExtendedModifyListener() {
- public void modifyText(ExtendedModifyEvent event) {
- listenerCalled = true;
- assertEquals("ExtendedModify event data invalid", 0, event.start);
- assertEquals("ExtendedModify event data invalid", line.length(), event.length);
- assertEquals("ExtendedModify event data invalid", "", event.replacedText);
- }
- };
-
- try {
- text.addExtendedModifyListener(null);
- }
- catch (IllegalArgumentException e) {
- exceptionThrown = true;
- }
- assertTrue("Expected exception not thrown", exceptionThrown);
-
- // test whether all content modifying API methods send an ExtendedModify event
- text.addExtendedModifyListener(listener);
-
- listenerCalled = false;
- text.append(line);
- assertTrue("append does not send event", listenerCalled);
-
- listenerCalled = false;
- text.insert(line);
- assertTrue("replaceTextRange does not send event", listenerCalled);
-
- listenerCalled = false;
- text.removeExtendedModifyListener(listener);
- listener = new ExtendedModifyListener() {
- public void modifyText(ExtendedModifyEvent event) {
- listenerCalled = true;
- assertEquals("ExtendedModify event data invalid", 0, event.start);
- assertEquals("ExtendedModify event data invalid", line.length(), event.length);
- assertEquals("ExtendedModify event data invalid", line.substring(0, 1), event.replacedText);
- }
- };
- text.addExtendedModifyListener(listener);
- text.replaceTextRange(0, 1, line);
- assertTrue("replaceTextRange does not send event", listenerCalled);
-
- listenerCalled = false;
- text.removeExtendedModifyListener(listener);
- listener = new ExtendedModifyListener() {
- public void modifyText(ExtendedModifyEvent event) {
- listenerCalled = true;
- assertEquals("ExtendedModify event data invalid", 0, event.start);
- assertEquals("ExtendedModify event data invalid", line.length(), event.length);
- assertEquals("ExtendedModify event data invalid", line + line.substring(1, line.length()) + line, event.replacedText);
- }
- };
- text.addExtendedModifyListener(listener);
- text.setText(line);
- assertTrue("setText does not send event", listenerCalled);
-
- listenerCalled = false;
- text.removeExtendedModifyListener(listener);
- // cause StyledText to call the listener.
- text.setText(line);
- assertTrue("Listener not removed", listenerCalled == false);
-}
-
-public void test_setKeyBindingII(){
- text.setKeyBinding(SWT.DEL, SWT.NULL);
- assertTrue(":a:", text.getKeyBinding(SWT.DEL) == SWT.NULL);
- text.setKeyBinding(SWT.DEL, ST.LINE_UP);
- assertTrue(":b:", text.getKeyBinding(SWT.DEL) == ST.LINE_UP);
- text.setKeyBinding(SWT.DEL | SWT.MOD2, ST.SELECT_PAGE_UP);
- assertTrue(":c:", text.getKeyBinding(SWT.DEL | SWT.MOD2) == ST.SELECT_PAGE_UP);
- text.setKeyBinding(SWT.DEL | SWT.MOD2, ST.PAGE_UP);
- assertTrue(":d:", text.getKeyBinding(SWT.DEL | SWT.MOD2) == ST.PAGE_UP);
- text.setKeyBinding(-1, ST.PAGE_UP);
- text.setKeyBinding(-1, -1);
-}
-
-public void test_addBidiSegmentListenerLorg_eclipse_swt_custom_BidiSegmentListener() {
- String line = "Line1";
- boolean exceptionThrown = false;
- BidiSegmentListener listener = new BidiSegmentListener() {
- public void lineGetSegments(BidiSegmentEvent event) {
- listenerCalled = true;
- }
- };
-
- try {
- text.addBidiSegmentListener(null);
- }
- catch (IllegalArgumentException e) {
- exceptionThrown = true;
- }
- assertTrue("Expected exception not thrown", exceptionThrown);
-
- listenerCalled = false;
- text.setText(line);
- text.addBidiSegmentListener(listener);
- // cause StyledText to call the BidiSegmentListener.
- text.getLocationAtOffset(0);
- if (isBidi()) {
- assertTrue("Listener not called", listenerCalled);
- }
- else {
- assertTrue("Listener called when it shouldn't be", listenerCalled == false);
- }
- listenerCalled = false;
- text.removeBidiSegmentListener(listener);
- // cause StyledText to call the BidiSegmentListener.
- text.getLocationAtOffset(0);
- assertTrue("Listener not removed", listenerCalled == false);
-}
-
-public void test_addLineBackgroundListenerLorg_eclipse_swt_custom_LineBackgroundListener() {
- String line = "Line1";
- boolean exceptionThrown = false;
- LineBackgroundListener listener = new LineBackgroundListener() {
- public void lineGetBackground(LineBackgroundEvent event) {
- listenerCalled = true;
- }
- };
-
- try {
- text.addLineBackgroundListener(null);
- }
- catch (IllegalArgumentException e) {
- exceptionThrown = true;
- }
- assertTrue("Expected exception not thrown", exceptionThrown);
-
- listenerCalled = false;
- text.setText(line);
- text.addLineBackgroundListener(listener);
- // cause StyledText to call the listener.
- text.setSelection(0, text.getCharCount());
- text.copy();
- assertTrue("Listener not called", listenerCalled);
-
- listenerCalled = false;
- text.removeLineBackgroundListener(listener);
- // cause StyledText to call the listener.
- text.setText(line);
- text.setSelection(0, text.getCharCount());
- text.copy();
- assertTrue("Listener not removed", listenerCalled == false);
-}
-
-public void test_addLineStyleListenerLorg_eclipse_swt_custom_LineStyleListener() {
- String line = "Line1";
- boolean exceptionThrown = false;
- LineStyleListener listener = new LineStyleListener() {
- public void lineGetStyle(LineStyleEvent event) {
- listenerCalled = true;
- }
- };
-
- try {
- text.addLineStyleListener(null);
- }
- catch (IllegalArgumentException e) {
- exceptionThrown = true;
- }
- assertTrue("Expected exception not thrown", exceptionThrown);
-
- listenerCalled = false;
- text.setText(line);
- text.addLineStyleListener(listener);
- // cause StyledText to call the listener.
- text.setSelection(0, text.getCharCount());
- text.copy();
- assertTrue("Listener not called", listenerCalled);
-
- listenerCalled = false;
- text.removeLineStyleListener(listener);
- // cause StyledText to call the listener.
- text.setText(line);
- text.setSelection(0, text.getCharCount());
- text.copy();
- assertTrue("Listener not removed", listenerCalled == false);
-}
-
-public void test_addModifyListenerLorg_eclipse_swt_events_ModifyListener() {
- String line = "Line1";
- boolean exceptionThrown = false;
- ModifyListener listener = new ModifyListener() {
- public void modifyText(ModifyEvent event) {
- listenerCalled = true;
- }
- };
-
- try {
- text.addModifyListener(null);
- }
- catch (IllegalArgumentException e) {
- exceptionThrown = true;
- }
- assertTrue("Expected exception not thrown", exceptionThrown);
-
- // test whether all content modifying API methods send a Modify event
- text.addModifyListener(listener);
-
- listenerCalled = false;
- text.append(line);
- assertTrue("append does not send event", listenerCalled);
-
- listenerCalled = false;
- text.insert(line);
- assertTrue("replaceTextRange does not send event", listenerCalled);
-
- listenerCalled = false;
- text.replaceTextRange(0, 1, line);
- assertTrue("replaceTextRange does not send event", listenerCalled);
-
- listenerCalled = false;
- text.setText(line);
- assertTrue("setText does not send event", listenerCalled);
-
- listenerCalled = false;
- text.removeModifyListener(listener);
- // cause StyledText to call the listener.
- text.setText(line);
- assertTrue("Listener not removed", listenerCalled == false);
-}
-
-public void test_addSelectionListenerLorg_eclipse_swt_events_SelectionListener() {
- String line = "Line1";
- boolean exceptionThrown = false;
- SelectionListener listener = new SelectionListener() {
- public void widgetSelected(SelectionEvent event) {
- listenerCalled = true;
- }
- public void widgetDefaultSelected(SelectionEvent event) {
- listener2Called = true;
- }
- };
-
- try {
- text.addSelectionListener(null);
- }
- catch (IllegalArgumentException e) {
- exceptionThrown = true;
- }
- assertTrue("Expected exception not thrown", exceptionThrown);
-
- text.setText(line);
- listenerCalled = false;
- listener2Called = false;
- text.addSelectionListener(listener);
- // cause StyledText to call the listener.
- text.invokeAction(ST.SELECT_LINE_END);
- assertTrue("Listener not called", listenerCalled);
- assertTrue("Listener called unexpectedly", listener2Called == false);
-
- listenerCalled = false;
- listener2Called = false;
- text.removeSelectionListener(listener);
- // cause StyledText to call the listener.
- text.invokeAction(ST.SELECT_LINE_END);
- assertTrue("Listener not removed", listenerCalled == false);
- assertTrue("Listener called unexpectedly", listener2Called == false);
-}
-
-public void test_addVerifyKeyListenerLorg_eclipse_swt_custom_VerifyKeyListener() {
- boolean exceptionThrown = false;
- VerifyKeyListener listener = new VerifyKeyListener() {
- public void verifyKey(VerifyEvent event) {
- }
- };
-
- try {
- text.addVerifyKeyListener(null);
- }
- catch (IllegalArgumentException e) {
- exceptionThrown = true;
- }
- assertTrue("Expected exception not thrown", exceptionThrown);
-
- // only test whether listener can be added and removed.
- // can't test listener because VerifyKey is user driven.
- text.addVerifyKeyListener(listener);
- text.removeVerifyKeyListener(listener);
-}
-
-public void test_addVerifyListenerLorg_eclipse_swt_events_VerifyListener() {
- final String line = "Line1";
- final String newLine = "NewLine1";
- final int textLength;
- boolean exceptionThrown = false;
- VerifyListener listener = new VerifyListener() {
- public void verifyText(VerifyEvent event) {
- listenerCalled = true;
- assertEquals("Verify event data invalid", 0, event.start);
- assertEquals("Verify event data invalid", 0, event.end);
- assertEquals("Verify event data invalid", line, event.text);
- event.start = 2;
- event.end = 5;
- event.text = newLine;
- }
- };
-
- try {
- text.addVerifyListener(null);
- }
- catch (IllegalArgumentException e) {
- exceptionThrown = true;
- }
- assertTrue("Expected exception not thrown", exceptionThrown);
-
- // test whether all content modifying API sends a Verify event
- text.addVerifyListener(listener);
-
- listenerCalled = false;
- text.append(line);
- assertTrue("append does not send event", listenerCalled);
- assertEquals("Listener failed", newLine, text.getText());
-
- listenerCalled = false;
- text.insert(line);
- assertTrue("replaceTextRange does not send event", listenerCalled);
- assertEquals("Listener failed", newLine + newLine, text.getText());
-
- listenerCalled = false;
- text.removeVerifyListener(listener);
- listener = new VerifyListener() {
- public void verifyText(VerifyEvent event) {
- listenerCalled = true;
- assertEquals("Verify event data invalid", 0, event.start);
- assertEquals("Verify event data invalid", 1, event.end);
- assertEquals("Verify event data invalid", line, event.text);
- event.start = 2;
- event.end = 5;
- event.text = newLine;
- }
- };
- text.addVerifyListener(listener);
- textLength = text.getCharCount() - 1 + newLine.length();
- text.replaceTextRange(0, 1, line);
- assertTrue("replaceTextRange does not send event", listenerCalled);
- assertEquals("Listener failed", newLine + newLine.substring(1, newLine.length()) + newLine, text.getText());
-
- listenerCalled = false;
- text.removeVerifyListener(listener);
- listener = new VerifyListener() {
- public void verifyText(VerifyEvent event) {
- listenerCalled = true;
- assertEquals("Verify event data invalid", 0, event.start);
- assertEquals("Verify event data invalid", textLength, event.end);
- assertEquals("Verify event data invalid", line, event.text);
- event.start = 2;
- event.end = 5;
- event.text = newLine;
- }
- };
- text.addVerifyListener(listener);
- text.setText(line);
- assertTrue("setText does not send event", listenerCalled);
- assertEquals("Listener failed", newLine, text.getText());
-
- text.removeVerifyListener(listener);
-
- listenerCalled = false;
- listener = new VerifyListener() {
- public void verifyText(VerifyEvent event) {
- listenerCalled = true;
- assertEquals("Verify event data invalid", 2, event.start);
- assertEquals("Verify event data invalid", newLine.length(), event.end);
- assertEquals("Verify event data invalid", line, event.text);
- event.doit = false;
- }
- };
- text.addVerifyListener(listener);
- // cause StyledText to call the listener.
- text.replaceTextRange(2, text.getCharCount() - 2, line);
- assertTrue("Listener not called", listenerCalled);
- assertEquals("Listener failed", newLine, text.getText());
-
- listenerCalled = false;
- text.removeVerifyListener(listener);
- // cause StyledText to call the listener.
- text.setText(line);
- assertTrue("Listener not removed", listenerCalled == false);
-}
-
-public void test_appendLjava_lang_String() {
- boolean exceptionThrown;
- String line = "Line1";
-
- text.append(line);
- assertEquals("append to empty text", line, text.getText());
-
- exceptionThrown = false;
- try {
- text.append(null);
- }
- catch (IllegalArgumentException exception) {
- exceptionThrown = true;
- }
- assertTrue("append null string", exceptionThrown);
-
- text.append("");
- assertEquals("append empty string", line, text.getText());
-
- text.append(line);
- assertEquals("append non-empty string", line + line, text.getText());
-
- text.setText("");
- String text2 = "line\r";
- text.append(text2);
- assertEquals("append string ending with line delimiter", text2, text.getText());
-
- String text3 = "line\r\nline3";
- text.append(text3);
- assertEquals("append multi line string", text2 + text3, text.getText());
-}
-
-public void test_computeSizeIIZ() {
- // inherited test is sufficient
-}
-
-public void test_copy() {
- Clipboard clipboard = new Clipboard(text.getDisplay());
- TextTransfer transfer = TextTransfer.getInstance();
- String clipboardText;
- String convertedText;
-
- String before = (String) clipboard.getContents(transfer);
- text.setSelectionRange(0, 0);
- text.copy();
- clipboardText = (String) clipboard.getContents(transfer);
- assertTrue(":a:", before == null ? clipboardText == null : before.equals(clipboardText));
-
- before = (String) clipboard.getContents(transfer);
- text.setText("0123456789");
- text.setSelectionRange(0, 0);
- text.copy();
- clipboardText = (String) clipboard.getContents(transfer);
- assertTrue(":c:", before == null ? clipboardText == null : before.equals(clipboardText));
-
- text.setSelectionRange(0, 1);
- text.copy();
- clipboardText = (String) clipboard.getContents(transfer);
- assertTrue(":d:", clipboardText != null && clipboardText.equals("0"));
-
- text.setSelectionRange(1, 2);
- text.copy();
- clipboardText = (String) clipboard.getContents(transfer);
- assertTrue(":e:", clipboardText != null && clipboardText.equals("12"));
-
- // test line delimiter conversion
- text.setText("\rLine1\nLine2\r\nLine3\n\rLine4\n");
- text.setSelectionRange(0, text.getCharCount());
- text.copy();
- clipboardText = (String) clipboard.getContents(transfer);
- if (SwtJunit.isWindows) {
- convertedText = "\r\nLine1\r\nLine2\r\nLine3\r\n\r\nLine4\r\n";
- }
- else {
- convertedText = "\nLine1\nLine2\nLine3\n\nLine4\n";
- }
- assertTrue(":f:", clipboardText != null && clipboardText.equals(convertedText));
-
- // test line delimiter conversion
- text.setText("Line1\r\nLine2");
- text.setSelectionRange(0, text.getCharCount());
- text.copy();
- clipboardText = (String) clipboard.getContents(transfer);
- if (SwtJunit.isWindows) {
- convertedText = "Line1\r\nLine2";
- }
- else {
- convertedText = "Line1\nLine2";
- }
- assertTrue(":g:", clipboardText != null && clipboardText.equals(convertedText));
-
- testRtfCopy();
- clipboard.dispose();
-}
-
-public void test_cut() {
- Clipboard clipboard = new Clipboard(text.getDisplay());
- TextTransfer transfer = TextTransfer.getInstance();
- String clipboardText;
- String convertedText;
-
- String before = (String) clipboard.getContents(transfer);
- text.setSelectionRange(0, 0);
- text.cut();
- clipboardText = (String) clipboard.getContents(transfer);
- assertTrue(":a:", before == null ? clipboardText == null : before.equals(clipboardText));
-
- before = (String) clipboard.getContents(transfer);
- text.setText("0123456789");
- text.setSelectionRange(0, 0);
- text.cut();
- clipboardText = (String) clipboard.getContents(transfer);
- assertTrue(":c:", before == null ? clipboardText == null : before.equals(clipboardText));
-
- text.setSelectionRange(0, 1);
- text.cut();
- clipboardText = (String) clipboard.getContents(transfer);
- assertTrue(":d:", clipboardText != null && clipboardText.equals("0"));
-
- text.setSelectionRange(1, 2);
- text.cut();
- clipboardText = (String) clipboard.getContents(transfer);
- assertTrue(":e:", clipboardText != null && clipboardText.equals("23"));
-
- // test line delimiter conversion
- text.setText("\rLine1\nLine2\r\nLine3\n\rLine4\n");
- text.setSelectionRange(0, text.getCharCount());
- text.cut();
- clipboardText = (String) clipboard.getContents(transfer);
- if (SwtJunit.isWindows) {
- convertedText = "\r\nLine1\r\nLine2\r\nLine3\r\n\r\nLine4\r\n";
- }
- else {
- convertedText = "\nLine1\nLine2\nLine3\n\nLine4\n";
- }
- assertTrue(":f:", clipboardText != null && clipboardText.equals(convertedText));
-
- // test line delimiter conversion
- text.setText("Line1\r\nLine2");
- text.setSelectionRange(0, text.getCharCount());
- text.cut();
- clipboardText = (String) clipboard.getContents(transfer);
- if (SwtJunit.isWindows) {
- convertedText = "Line1\r\nLine2";
- }
- else {
- convertedText = "Line1\nLine2";
- }
- assertTrue(":g:", clipboardText != null && clipboardText.equals(convertedText));
-
- clipboard.dispose();
-}
-
-public void test_getBidiColoring() {
- /// getBidiColoring is deprecated and will be removed.
- warnUnimpl("Test test_getBidiColoring not written");
-}
-
-public void test_getCaretOffset() {
- assertTrue(":a:", text.getCaretOffset() == 0);
- text.setText("Line0\r\n");
- assertTrue(":b:", text.getCaretOffset() == 0);
- text.setTopIndex(1);
- assertTrue(":c:", text.getCaretOffset() == 0);
-
- text.replaceTextRange(text.getCharCount(), 0, "Line1");
- assertTrue(":d:", text.getCaretOffset() == 0);
- String newText = "Line-1\r\n";
- text.replaceTextRange(0, 0, newText);
- assertTrue(":e:", text.getCaretOffset() == 0);
-
- text.setCaretOffset(1);
- assertTrue(":f:", text.getCaretOffset() == 1);
- text.replaceTextRange(2, 0, newText);
- assertTrue(":g:", text.getCaretOffset() == 1);
- text.replaceTextRange(0, 0, newText);
- assertTrue(":h:", text.getCaretOffset() == newText.length() + 1);
-}
-
-public void test_getContent() {
- StyledTextContent content = text.getContent();
-
- assertTrue(content != null);
- content = new StyledTextContent() {
- public void addTextChangeListener(TextChangeListener listener) {
- }
- public int getCharCount() {
- return 0;
- }
- public String getLine(int lineIndex) {
- return "";
- }
- public int getLineAtOffset(int offset) {
- return 0;
- }
- public int getLineCount() {
- return 0;
- }
- public String getLineDelimiter() {
- return "";
- }
- public int getOffsetAtLine(int lineIndex) {
- return 0;
- }
- public String getTextRange(int start, int length) {
- return "";
- }
- public void removeTextChangeListener(TextChangeListener listener) {
- }
- public void replaceTextRange(int start, int replaceLength, String text) {
- }
- public void setText(String text) {
- }
- };
- text.setContent(content);
- assertEquals(content, text.getContent());
-}
-
-public void test_getDoubleClickEnabled() {
- assertTrue(":a:", text.getDoubleClickEnabled() == true);
- text.setDoubleClickEnabled(true);
- assertTrue(":b:", text.getDoubleClickEnabled() == true);
- text.setDoubleClickEnabled(false);
- assertTrue(":c:", text.getDoubleClickEnabled() == false);
- text.setDoubleClickEnabled(false);
- assertTrue(":d:", text.getDoubleClickEnabled() == false);
- text.setDoubleClickEnabled(true);
- assertTrue(":e:", text.getDoubleClickEnabled() == true);
-}
-
-public void test_getEditable() {
- assertTrue(":a:", text.getEditable() == true);
- text.setEditable(true);
- assertTrue(":b:", text.getEditable() == true);
- text.setEditable(false);
- assertTrue(":c:", text.getEditable() == false);
- text.setEditable(false);
- assertTrue(":d:", text.getEditable() == false);
- text.setEditable(true);
- assertTrue(":e:", text.getEditable() == true);
-}
-
-public void test_getHorizontalIndex() {
- assertTrue(":a:", text.getHorizontalIndex() == 0);
- text.setHorizontalIndex(-1);
- assertTrue(":b:", text.getHorizontalIndex() == 0);
- text.setHorizontalIndex(1);
- assertTrue(":c:", text.getHorizontalIndex() == 0);
-
- text.setText("Line0");
- assertTrue(":d:", text.getHorizontalIndex() == 0);
- text.setHorizontalIndex(-1);
- assertTrue(":e:", text.getHorizontalIndex() == 0);
- text.setHorizontalIndex(1);
- assertTrue(":f:", text.getHorizontalIndex() == 1);
- text.setHorizontalIndex(500);
- assertTrue(":g:", text.getHorizontalIndex() > 0);
- text.setHorizontalIndex(-1);
- assertTrue(":h:", text.getHorizontalIndex() == 0);
- text.setHorizontalIndex(1);
- assertTrue(":i:", text.getHorizontalIndex() == 1);
- // make sure the widget can be scrolled
- shell.open();
- text.setSize(10, 50);
- text.setText("Line0");
- text.setHorizontalIndex(1);
- assertTrue(":j:", text.getHorizontalIndex() == 1);
-}
-
-public void test_getHorizontalPixel() {
- assertTrue(":a:", text.getHorizontalPixel() == 0);
- text.setHorizontalIndex(-1);
- assertTrue(":b:", text.getHorizontalPixel() == 0);
- text.setHorizontalIndex(1);
- assertTrue(":c:", text.getHorizontalPixel() == 0);
-
- text.setText("Line0");
- assertTrue(":d:", text.getHorizontalPixel() == 0);
- text.setHorizontalIndex(-1);
- assertTrue(":e:", text.getHorizontalPixel() == 0);
- text.setHorizontalIndex(1);
- assertTrue(":f:", text.getHorizontalPixel() > 0);
- text.setHorizontalIndex(-1);
- assertTrue(":g:", text.getHorizontalPixel() == 0);
- text.setHorizontalIndex(1);
- assertTrue(":h:", text.getHorizontalPixel() > 0);
- // make sure the widget can be scrolled
- shell.open();
- text.setSize(10, 50);
- text.setText("Line0");
- text.setHorizontalIndex(1);
- assertTrue(":i:", text.getHorizontalPixel() > 0);
-}
-
-public void test_getKeyBindingI() {
- assertTrue(":a:", text.getKeyBinding(SWT.DEL) == ST.DELETE_NEXT);
- text.setKeyBinding(SWT.DEL, ST.LINE_UP);
- assertTrue(":b:", text.getKeyBinding(SWT.DEL) == ST.LINE_UP);
- text.setKeyBinding(SWT.DEL | SWT.MOD2, ST.SELECT_PAGE_UP);
- assertTrue(":c:", text.getKeyBinding(SWT.DEL | SWT.MOD2) == ST.SELECT_PAGE_UP);
- text.setKeyBinding(SWT.DEL | SWT.MOD2, ST.PAGE_UP);
- assertTrue(":d:", text.getKeyBinding(SWT.DEL | SWT.MOD2) == ST.PAGE_UP);
- assertTrue(":e:", text.getKeyBinding(-1) == SWT.NULL);
- assertTrue(":f:", text.getKeyBinding(SWT.F2) == SWT.NULL);
-}
-
-public void test_getCharCount() {
- assertTrue(":a:", text.getCharCount() == 0);
- text.setText("Line0");
- assertTrue(":b:", text.getCharCount() == 5);
- text.setText("");
- assertTrue(":c:", text.getCharCount() == 0);
- text.setText("Line0\n");
- assertTrue(":d:", text.getCharCount() == 6);
-}
-
-public void test_getLineBackgroundI() {
- String textString = "L1\nL2\nL3\nL4";
- text.setText(textString);
- assertTrue(":1:", text.getLineBackground(0) == null);
- text.setLineBackground(1,1,getColor(YELLOW));
- text.setLineBackground(2,1,getColor(BLUE));
- assertTrue(":1:", text.getLineBackground(1) == getColor(YELLOW));
- assertTrue(":1:", text.getLineBackground(2) == getColor(BLUE));
-}
-
-public void test_getLineCount() {
- String delimiterString = "\r\n";
- assertTrue(":a:", text.getLineCount()==1);
- text.append("dddasd" + delimiterString);
- assertTrue(":b:", text.getLineCount()==2);
- text.append("ddasdasdasdasd" + delimiterString);
- assertTrue(":c:", text.getLineCount()==3);
-
-
- text.setText("01234567890");
- text.setSelection(4);
- assertTrue(":a:", text.getLineCount()==1);
- text.insert(delimiterString);
- assertTrue(":b:", text.getLineCount()==2);
-}
-
-public void test_getLineAtOffsetI() {
- boolean exceptionThrown = false;
-
- assertTrue(":a:", text.getLineAtOffset(0) == 0);
- try {
- text.getLineAtOffset(-1);
- }
- catch (IllegalArgumentException e) {
- exceptionThrown = true;
- }
- assertTrue(":b:", exceptionThrown == true);
- exceptionThrown = false;
-
- try {
- text.getLineAtOffset(100);
- }
- catch (IllegalArgumentException e) {
- exceptionThrown = true;
- }
- assertTrue(":c:", exceptionThrown == true);
- exceptionThrown = false;
-
- text.setText("Line0\r\n");
- assertTrue(":d:", text.getLineAtOffset(4) == 0);
- assertTrue(":e:", text.getLineAtOffset(5) == 0);
- assertTrue(":f:", text.getLineAtOffset(6) == 0);
- assertTrue(":g:", text.getLineAtOffset(7) == 1);
- try {
- text.getLineAtOffset(8);
- }
- catch (IllegalArgumentException e) {
- exceptionThrown = true;
- }
- assertTrue(":h:", exceptionThrown == true);
- exceptionThrown = false;
-}
-
-public void test_getLineDelimiter() {
- final String lineDelimiter = "\n";
- StyledTextContent content = text.getContent();
-
- assertEquals(content.getLineDelimiter(), text.getLineDelimiter());
-
- content = new StyledTextContent() {
- public void addTextChangeListener(TextChangeListener listener) {
- }
- public int getCharCount() {
- return 0;
- }
- public String getLine(int lineIndex) {
- return "";
- }
- public int getLineAtOffset(int offset) {
- return 0;
- }
- public int getLineCount() {
- return 0;
- }
- public String getLineDelimiter() {
- return lineDelimiter;
- }
- public int getOffsetAtLine(int lineIndex) {
- return 0;
- }
- public String getTextRange(int start, int length) {
- return "";
- }
- public void removeTextChangeListener(TextChangeListener listener) {
- }
- public void replaceTextRange(int start, int replaceLength, String text) {
- }
- public void setText(String text) {
- }
- };
- text.setContent(content);
- assertEquals(lineDelimiter, text.getLineDelimiter());
-}
-
-public void test_getLineHeight() {
- assertTrue(":a:", text.getLineHeight() > 0);
-}
-
-public void test_getLocationAtOffsetI(){
- // copy from StyledText, has to match value used by StyledText
- final int XINSET = isBidi() ? 2 : 0;
-
- assertTrue(":a:", text.getLocationAtOffset(0).equals(new Point(XINSET, 0)));
- try {
- text.getLocationAtOffset(-1);
- fail("No exception thrown for offset == -1");
- }
- catch (IllegalArgumentException e) {
- }
-
- try {
- text.getLocationAtOffset(100);
- fail("No exception thrown for illegal offset argument");
- }
- catch (IllegalArgumentException e) {
- }
-
- text.setText("Line0\r\nLine1");
- assertTrue(":d:", text.getLocationAtOffset(4).x > 0 && text.getLocationAtOffset(4).y == 0);
- assertTrue(":e:", text.getLocationAtOffset(6).x > 0 && text.getLocationAtOffset(6).y == 0);
- // x location will == StyledText x inset on bidi platforms
- assertTrue(":f:", text.getLocationAtOffset(7).x == XINSET && text.getLocationAtOffset(7).y > 0);
- try {
- text.getLocationAtOffset(13);
- fail("No exception thrown for illegal offset argument");
- }
- catch (IllegalArgumentException e) {
- }
-
- text.setTopIndex(1);
- assertTrue(":h:", text.getLocationAtOffset(4).x > 0 && text.getLocationAtOffset(4).y < 0);
- // x location will == StyledText x inset on bidi platforms
- assertTrue(":i:", text.getLocationAtOffset(7).x == XINSET && text.getLocationAtOffset(7).y == 0);
-
- text.setHorizontalIndex(1);
- assertTrue(":j:", text.getLocationAtOffset(0).x < 0 && text.getLocationAtOffset(0).y < 0);
- assertTrue(":k:", text.getLocationAtOffset(7).x < 0 && text.getLocationAtOffset(7).y == 0);
-}
-public void test_getOffsetAtLineI() {
- boolean exceptionThrown = false;
-
- assertEquals(":a:", 0, text.getOffsetAtLine(0));
- try {
- text.getOffsetAtLine(-1);
- }
- catch (IllegalArgumentException e) {
- exceptionThrown = true;
- }
- assertTrue(":b:", exceptionThrown);
- exceptionThrown = false;
-
- try {
- text.getOffsetAtLine(100);
- }
- catch (IllegalArgumentException e) {
- exceptionThrown = true;
- }
- assertTrue(":c:", exceptionThrown);
- exceptionThrown = false;
-
- text.setText("Line0\r\n");
- assertEquals(":d:", 0, text.getOffsetAtLine(0));
- assertEquals(":e:", 7, text.getOffsetAtLine(1));
-
- try {
- text.getOffsetAtLine(2);
- }
- catch (IllegalArgumentException e) {
- exceptionThrown = true;
- }
- assertTrue(":f:", exceptionThrown);
- exceptionThrown = false;
-
- text.setText("");
- assertEquals(":g:", 0, text.getOffsetAtLine(0));
-}
-public void test_getOffsetAtLocationLorg_eclipse_swt_graphics_Point() {
- boolean exceptionThrown = false;
- Point location;
-
- assertTrue(":a:", text.getOffsetAtLocation(new Point(0, 0)) == 0);
- try {
- text.getOffsetAtLocation(new Point(-1, 0));
- }
- catch (IllegalArgumentException e) {
- exceptionThrown = true;
- }
- assertTrue(":b:", exceptionThrown == true);
- exceptionThrown = false;
-
- try {
- text.getOffsetAtLocation(new Point(0, -1));
- }
- catch (IllegalArgumentException e) {
- exceptionThrown = true;
- }
- assertTrue(":c:", exceptionThrown == true);
- exceptionThrown = false;
-
- text.setText("Line0\r\nLine1");
- location = text.getLocationAtOffset(5);
- assertTrue(":d:", text.getOffsetAtLocation(new Point(10, 0)) > 0);
- assertTrue(":e:", text.getOffsetAtLocation(new Point(location.x - 1, 0)) == 4);
- location = text.getLocationAtOffset(7);
- assertTrue(":f:", text.getOffsetAtLocation(location) == 7);
- try {
- text.getOffsetAtLocation(new Point(100, 0));
- }
- catch (IllegalArgumentException e) {
- exceptionThrown = true;
- }
- assertTrue(":g:", exceptionThrown == true);
- exceptionThrown = false;
-
- try {
- text.getOffsetAtLocation(new Point(100, 50));
- }
- catch (IllegalArgumentException e) {
- exceptionThrown = true;
- }
- assertTrue(":h:", exceptionThrown == true);
- exceptionThrown = false;
-
- text.setTopIndex(1);
- assertTrue(":i:", text.getOffsetAtLocation(new Point(0, -5)) == 0);
- assertTrue(":j:", text.getOffsetAtLocation(new Point(0, 0)) == 7);
-
- text.setHorizontalIndex(1);
- assertTrue(":k:", text.getOffsetAtLocation(new Point(-5, -5)) == 0);
- assertTrue(":l:", text.getOffsetAtLocation(new Point(-5, 0)) == 7);
-
- // 1GL4ZVE
- assertTrue(":m:", text.getOffsetAtLocation(text.getLocationAtOffset(2)) == 2);
- text.setHorizontalIndex(0);
- assertTrue(":n:", text.getOffsetAtLocation(text.getLocationAtOffset(2)) == 2);
-}
-
-public void test_getOrientation() {
- warnUnimpl("Test test_getOrientation not written");
-}
-
-public void test_getSelection(){
- text.setText("01234567890");
- text.setSelection(new Point(2, 2));
- assertTrue(":b:", text.getSelection().equals(new Point(2, 2)));
- text.setSelection(new Point(2, 3));
- assertTrue(":c:", text.getSelection().equals(new Point(2, 3)));
- text.setSelection(new Point(3, 11));
- assertTrue(":d:", text.getSelection().equals(new Point(3, 11)));
- text.setText("01234567890");
- text.setSelection(4);
- assertTrue(":a:", text.getSelection().equals(new Point(4, 4)));
- text.setSelection(11);
- assertTrue(":b:", text.getSelection().equals(new Point(11, 11)));
- text.setSelection(new Point(3, 2));
- assertTrue(":c:", text.getSelection().equals(new Point(2, 3)));
-}
-public void test_getSelectionBackground() {
- assertTrue(":1:", text.getSelectionBackground() != null);
- text.setSelectionBackground(getColor(YELLOW));
- assertTrue(":1:", text.getSelectionBackground() == getColor(YELLOW));
-}
-public void test_getSelectionForeground() {
- assertTrue(":1:", text.getSelectionForeground() != null);
- text.setSelectionForeground(getColor(RED));
- assertTrue(":1:", text.getSelectionForeground() == getColor(RED));
-}
-public void test_getSelectionRange() {
- String testText = "Line1\r\nLine2";
- int invalidRanges [][] = {{-1, 0}, {-1, -1}, {100, 1}, {100, -1}, {12, 1}, {11, 2}, {2, -3}, {50, -1}};
- int selectionRanges [][] = {{0, 1}, {0, 0}, {2, 3}, {12, 0}, {2, -2}, {5, -1}};
- boolean exceptionThrown;
-
- for (int i = 0; i < invalidRanges.length; i++) {
- int start = invalidRanges[i][0];
- int length = invalidRanges[i][1];
-
- exceptionThrown = false;
- try {
- text.setSelectionRange(start, length);
- }
- catch (IllegalArgumentException e) {
- exceptionThrown = true;
- }
- assertTrue(":a:", exceptionThrown);
- }
-
- text.setSelectionRange(0, 0);
- assertTrue(":b:", text.getSelectionRange().x == 0 && text.getSelectionRange().y == 0);
- text.setText(testText);
- for (int i = 0; i < selectionRanges.length; i++) {
- int start = selectionRanges[i][0];
- int length = selectionRanges[i][1];
- text.setSelectionRange(start, length);
- if (length < 0) {
- start += length;
- length *= -1;
- assertEquals(":c:a:" + i, start, text.getCaretOffset());
- }
- else {
- assertEquals(":c:a:" + i, start + length, text.getCaretOffset());
- }
- assertTrue(":c:" + i, text.getSelectionRange().x == start && text.getSelectionRange().y == length);
- }
-
- for (int i = 0; i < invalidRanges.length; i++) {
- int start = invalidRanges[i][0];
- int length = invalidRanges[i][1];
-
- exceptionThrown = false;
- try {
- text.setSelectionRange(start, length);
- }
- catch (IllegalArgumentException e) {
- exceptionThrown = true;
- }
- assertTrue(":a:", exceptionThrown);
- }
-}
-
-public void test_getSelectionCount(){
- text.setText("01234567890");
- assertTrue(":a:", text.getSelectionCount()==0);
- text.setSelection(2, 4);
- assertTrue(":b:", text.getSelectionCount()==2);
- text.setSelection(2, 11);
- assertTrue(":c:", text.getSelectionCount()==9);
- text.setText("0123\n4567890");
- assertTrue(":d:", text.getSelectionCount()==0);
- text.setSelection(2, 4);
- assertTrue(":e:", text.getSelectionCount()==2);
- text.setSelection(2, 12);
- assertTrue(":f:", text.getSelectionCount()==10);
-}
-
-public void test_getSelectionText() {
- String testText = "Line1\r\nLine2";
- int selectionRanges [][] = {{0, 1}, {0, 0}, {2, 3}, {12, 0}};
-
- text.setSelectionRange(0, 0);
- assertEquals(":b:", "", text.getSelectionText());
- text.setText(testText);
- for (int i = 0; i < selectionRanges.length; i++) {
- int start = selectionRanges[i][0];
- int length = selectionRanges[i][1];
- text.setSelectionRange(start, length);
- assertEquals(":c:" + i, testText.substring(start, start + length), text.getSelectionText());
- }
-}
-
-public void test_getStyleRangeAtOffsetI() {
- String line = "Line1\r\nLine2";
- int styleStart = 0;
- int styleLength = 5;
- int i;
- boolean exceptionThrown = false;
- StyleRange style = new StyleRange(styleStart, styleLength, getColor(BLUE), getColor(RED), SWT.BOLD);
-
- try {
- text.getStyleRangeAtOffset(0);
- }
- catch (IllegalArgumentException e) {
- exceptionThrown = true;
- }
- assertTrue("offset out of range no text", exceptionThrown);
-
- text.setText(line);
- exceptionThrown = false;
- try {
- text.getStyleRangeAtOffset(-1);
- }
- catch (IllegalArgumentException e) {
- exceptionThrown = true;
- }
- assertTrue("offset out of range negative", exceptionThrown);
-
- exceptionThrown = false;
- try {
- text.getStyleRangeAtOffset(line.length());
- }
- catch (IllegalArgumentException e) {
- exceptionThrown = true;
- }
- assertTrue("offset out of range positive", exceptionThrown);
-
- text.setStyleRange(style);
- style.length = 1;
- for (i = styleStart; i < styleStart + styleLength; i++) {
- style.start = i;
- assertEquals(style, text.getStyleRangeAtOffset(i));
- }
- assertEquals(null, text.getStyleRangeAtOffset(i));
-
- // test offset at line delimiter
- style = new StyleRange(5, 2, null, getColor(BLUE), SWT.NORMAL);
- text.setStyleRange(style);
- style.length = 1;
- assertEquals(style, text.getStyleRangeAtOffset(5));
- style.start = 6;
- assertEquals(style, text.getStyleRangeAtOffset(6));
- assertEquals(null, text.getStyleRangeAtOffset(10));
-}
-
-public void test_getStyleRanges() {
- text.setText("package test;\n/* Line 1\n * Line 2\n */\npublic class SimpleClass {\n}");
- text.setStyleRange(getStyle(0,7,BLUE,null));
- text.setStyleRange(getStyle(14,23,RED,null));
- text.setStyleRange(getStyle(38,6,BLUE,null));
- text.setStyleRange(getStyle(45,5,BLUE,null));
- text.replaceTextRange(14, 23, "\t/*Line 1\n\t * Line 2\n\t */");
- String newText = text.getTextRange(0, text.getCharCount());
- assertTrue(":1:", newText.equals("package test;\n\t/*Line 1\n\t * Line 2\n\t */\npublic class SimpleClass {\n}"));
- StyleRange[] styles = text.getStyleRanges();
- assertTrue(":1:", styles.length == 3);
- assertTrue(":1:", styles[0].equals(getStyle(0,7,BLUE,null)));
- assertTrue(":1:", styles[1].equals(getStyle(40,6,BLUE,null)));
- assertTrue(":1:", styles[2].equals(getStyle(47,5,BLUE,null)));
-}
-
-public void test_getStyleRangesII() {
- text.setText("0123456789");
-// 0
-// 1234
-// 56
-// 78
-// 9
- text.setStyleRange(getStyle(1,4,BLUE,null));
- text.setStyleRange(getStyle(5,2,RED,null));
- text.setStyleRange(getStyle(7,2,YELLOW,null));
-
- StyleRange[] styles = text.getStyleRanges(0,1);
- assertTrue(":1:", styles.length == 0);
- styles = text.getStyleRanges(0,5);
- assertTrue(":2:", styles.length == 1);
- assertTrue(":2:", styles[0].equals(getStyle(1,4,BLUE,null)));
- styles = text.getStyleRanges(7,3);
- assertTrue(":3:", styles.length == 1);
- assertTrue(":3:", styles[0].equals(getStyle(7,2,YELLOW,null)));
- styles = text.getStyleRanges(0,10);
- assertTrue(":4:", styles.length == 3);
- assertTrue(":4:", styles[0].equals(getStyle(1,4,BLUE,null)));
- assertTrue(":4:", styles[1].equals(getStyle(5,2,RED,null)));
- assertTrue(":4:", styles[2].equals(getStyle(7,2,YELLOW,null)));
- styles = text.getStyleRanges(0,4);
- assertTrue(":5:", styles.length == 1);
- assertTrue(":5:", styles[0].equals(getStyle(1,3,BLUE,null)));
- styles = text.getStyleRanges(2,6);
- assertTrue(":6:", styles.length == 3);
- assertTrue(":6:", styles[0].equals(getStyle(2,3,BLUE,null)));
- assertTrue(":6:", styles[1].equals(getStyle(5,2,RED,null)));
- assertTrue(":6:", styles[2].equals(getStyle(7,1,YELLOW,null)));
-
- text.setText("0123456789\r\nABCDEFGHIJKL");
- text.setStyleRange(getStyle(4,3,BLUE,null));
- text.setStyleRange(getStyle(7,5,RED,null));
- text.setStyleRange(getStyle(15,1,YELLOW,null));
- styles = text.getStyleRanges(15,1);
- assertTrue(":1a:", styles.length == 1);
- assertTrue(":1a:", styles[0].equals(getStyle(15,1,YELLOW,null)));
- styles = text.getStyleRanges(15,0);
- assertTrue(":2a:", styles.length == 0);
- styles = text.getStyleRanges(0,20);
- assertTrue(":3a:", styles.length == 3);
- assertTrue(":3a:", styles[0].equals(getStyle(4,3,BLUE,null)));
- assertTrue(":3a:", styles[1].equals(getStyle(7,5,RED,null)));
- assertTrue(":3a:", styles[2].equals(getStyle(15,1,YELLOW,null)));
- styles = text.getStyleRanges(8,2);
- assertTrue(":4a:", styles.length == 1);
- assertTrue(":4a:", styles[0].equals(getStyle(8,2,RED,null)));
-
-}
-
-public void test_getTabs() {
- text.setTabs(1);
- assertTrue(":a:", text.getTabs() == 1);
- text.setTabs(8);
- assertTrue(":b:", text.getTabs() == 8);
- text.setText("Line\t1\r\n");
- assertTrue(":c:", text.getTabs() == 8);
- text.setTabs(7);
- assertTrue(":d:", text.getTabs() == 7);
-}
-
-public void test_getText() {
- String testText = "Line1\r\nLine2";
-
- assertTrue(":a:", text.getText().length() == 0);
- text.setText(testText);
- assertTrue(":b:", text.getText().equals(testText));
- text.setText("");
- assertTrue(":c:", text.getText().length() == 0);
-
- text.setText(testText);
- assertTrue(":a:", text.getText().equals(testText));
- text.setText(testText + "\r\n");
- assertTrue(":b:", text.getText().equals(testText + "\r\n"));
- text.setText("");
- assertTrue(":c:", text.getText().length() == 0);
-}
-
-public void test_getTextII() {
- boolean exceptionThrown;
- String testText = "Line1\r\nLine2";
- int invalidRanges[][] = {{-1, 0}, {0, -1}, {-1, -1}, {100, 1}, {100, -1}, {2, testText.length()}, {5, 2}};
- int ranges[][] = {{0, 1}, {0, 0}, {2, 5}, {7, 11}};
-
- for (int i = 0; i < invalidRanges.length; i++) {
- int start = invalidRanges[i][0];
- int end = invalidRanges[i][1];
-
- exceptionThrown = false;
- try {
- text.getText(start, end);
- }
- catch (IllegalArgumentException e) {
- exceptionThrown = true;
- }
- assertTrue(":a:", exceptionThrown);
- }
- text.setText(testText);
- for (int i = 0; i < ranges.length; i++) {
- int start = ranges[i][0];
- int end = ranges[i][1];
- assertEquals(":b:" + i, testText.substring(start, end + 1), text.getText(start, end));
- }
- for (int i = 0; i < invalidRanges.length; i++) {
- int start = invalidRanges[i][0];
- int end = invalidRanges[i][1];
-
- exceptionThrown = false;
- try {
- text.getText(start, end);
- }
- catch (IllegalArgumentException e) {
- exceptionThrown = true;
- }
- assertTrue(":a:", exceptionThrown);
- }
- text.setText("testing");
- assertTrue(":d:", text.getText(0,0).equals("t"));
- assertTrue(":d:", text.getText(0,1).equals("te"));
- assertTrue(":d:", text.getText(1,5).equals("estin"));
-}
-
-public void test_getTextRangeII() {
- boolean exceptionThrown;
- String testText = "Line1\r\nLine2";
- int invalidRanges[][] = {{-1, 0}, {0, -1}, {-1, -1}, {100, 1}, {100, -1}, {1, testText.length()}, {5, -1}};
- int ranges[][] = {{0, 1}, {0, 0}, {5, 1}, {7, 5}, {12, 0}};
-
- for (int i = 0; i < invalidRanges.length; i++) {
- int start = invalidRanges[i][0];
- int length = invalidRanges[i][1];
-
- exceptionThrown = false;
- try {
- text.getTextRange(start, length);
- }
- catch (IllegalArgumentException e) {
- exceptionThrown = true;
- }
- assertTrue(":a:", exceptionThrown);
- }
- text.setText(testText);
- for (int i = 0; i < ranges.length; i++) {
- int start = ranges[i][0];
- int length = ranges[i][1];
- assertEquals(":b:" + i, testText.substring(start, start + length), text.getTextRange(start, length));
- }
- for (int i = 0; i < invalidRanges.length; i++) {
- int start = invalidRanges[i][0];
- int length = invalidRanges[i][1];
-
- exceptionThrown = false;
- try {
- text.getTextRange(start, length);
- }
- catch (IllegalArgumentException e) {
- exceptionThrown = true;
- }
- assertTrue(":a:", exceptionThrown);
- }
- text.setText("testing");
- assertTrue(":d:", text.getTextRange(0,0).equals(""));
- assertTrue(":d:", text.getTextRange(0,1).equals("t"));
- assertTrue(":d:", text.getTextRange(0,2).equals("te"));
- assertTrue(":d:", text.getTextRange(1,5).equals("estin"));
-}
-
-public void test_getTextLimit() {
- assertTrue(":a:", text.getTextLimit() < 0);
- text.setTextLimit(10);
- assertTrue(":b:", text.getTextLimit() == 10);
-}
-
-public void test_getTopIndex() {
- text.setText("Line0\r\nLine0a\r\n");
-
- assertTrue(":a:", text.getTopIndex() == 0);
- text.setTopIndex(-2);
- assertTrue(":b:", text.getTopIndex() == 0);
- text.setTopIndex(-1);
- assertTrue(":c:", text.getTopIndex() == 0);
- text.setTopIndex(1);
- assertTrue(":d:", text.getTopIndex() == 1);
- text.setTopIndex(2);
- assertTrue(":e:", text.getTopIndex() == 2);
- text.setTopIndex(0);
- assertTrue(":f:", text.getTopIndex() == 0);
- text.setTopIndex(3);
- assertTrue(":g:", text.getTopIndex() == 2);
- text.replaceTextRange(text.getCharCount(), 0, "Line1");
- assertTrue(":h:", text.getTopIndex() == 2);
- text.setText("");
- assertTrue(":i:", text.getTopIndex() == 0);
-}
-
-public void test_getTopPixel() {
- text.setText("Line0\r\nLine0a\r\n");
-
- assertTrue(":a:", text.getTopPixel() == 0);
- text.setTopIndex(-2);
- assertTrue(":b:", text.getTopPixel() == 0);
- text.setTopIndex(-1);
- assertTrue(":c:", text.getTopPixel() == 0);
- text.setTopIndex(1);
- assertTrue(":d:", text.getTopPixel() == text.getLineHeight());
- text.setTopIndex(2);
- assertTrue(":e:", text.getTopPixel() == text.getLineHeight() * 2);
- text.setTopIndex(0);
- assertTrue(":f:", text.getTopPixel() == 0);
- text.setTopIndex(3);
- assertTrue(":g:", text.getTopPixel() == text.getLineHeight() * 2);
- text.replaceTextRange(text.getCharCount(), 0, "Line1");
- assertTrue(":h:", text.getTopPixel() == text.getLineHeight() * 2);
- text.setText("");
- assertTrue(":i:", text.getTopPixel() == 0);
-}
-public void test_getWordWrap() {
- assertTrue(":a:", text.getWordWrap() == false);
- text.setWordWrap(true);
- assertTrue(":b:", text.getWordWrap());
- text.setWordWrap(false);
- assertTrue(":c:", text.getWordWrap() == false);
- text.setWordWrap(false);
- assertTrue(":d:", text.getWordWrap() == false);
- text.setWordWrap(true);
- assertTrue(":e:", text.getWordWrap());
-}
-public void test_insertLjava_lang_String(){
- String delimiterString = "\n";
- try {
- text.insert(null);
- fail("No exception thrown for string == null");
- }
- catch (IllegalArgumentException e) {
- }
- assertTrue(":a:", text.getText().equals(""));
- text.insert("");
- assertTrue(":b:", text.getText().equals(""));
- text.insert("fred");
- assertTrue(":c:", text.getText().equals("fred"));
- text.setSelection(2);
- text.insert("helmut");
- assertTrue(":d:", text.getText().equals("frhelmuted"));
- text.setText("01234567890");
- text.setSelection(4);
- assertTrue(":e:", text.getLineCount()==1);
- text.insert(delimiterString);
- assertTrue(":f:", text.getLineCount()==2);
-}
-
-public void test_invokeActionI() {
- // invoking actions on an empty text should not crash
- text.invokeAction(ST.LINE_DOWN);
- text.invokeAction(ST.LINE_UP);
- text.invokeAction(ST.LINE_END);
- text.invokeAction(ST.LINE_START);
- text.invokeAction(ST.COLUMN_NEXT);
- text.invokeAction(ST.PAGE_DOWN);
- text.invokeAction(ST.PAGE_UP);
- text.invokeAction(ST.WORD_NEXT);
- text.invokeAction(ST.WORD_PREVIOUS);
- text.invokeAction(ST.TEXT_END);
- text.invokeAction(ST.TEXT_START);
- text.invokeAction(ST.WINDOW_END);
- text.invokeAction(ST.WINDOW_START);
- text.invokeAction(ST.SELECT_LINE_DOWN);
- text.invokeAction(ST.SELECT_LINE_UP);
- text.invokeAction(ST.SELECT_LINE_START);
- text.invokeAction(ST.SELECT_LINE_END);
- text.invokeAction(ST.SELECT_COLUMN_PREVIOUS);
- text.invokeAction(ST.SELECT_COLUMN_NEXT);
- text.invokeAction(ST.SELECT_PAGE_UP);
- text.invokeAction(ST.SELECT_PAGE_DOWN);
- text.invokeAction(ST.SELECT_WORD_PREVIOUS);
- text.invokeAction(ST.SELECT_WORD_NEXT);
- text.invokeAction(ST.SELECT_TEXT_END);
- text.invokeAction(ST.SELECT_TEXT_START);
- text.invokeAction(ST.SELECT_WINDOW_START);
- text.invokeAction(ST.SELECT_WINDOW_END);
- text.invokeAction(ST.CUT);
- text.invokeAction(ST.COPY);
- text.invokeAction(ST.PASTE);
- text.invokeAction(ST.DELETE_PREVIOUS);
- text.invokeAction(ST.DELETE_NEXT);
- text.invokeAction(ST.TOGGLE_OVERWRITE);
-
- //Some platforms consider number a word start, other don't
-// text.setText("Line1\r\nLine2");
- text.setText("LineL\r\nLineW");
- text.invokeAction(ST.LINE_DOWN);
- assertEquals(7, text.getCaretOffset());
-
- text.invokeAction(ST.LINE_UP);
- assertEquals(0, text.getCaretOffset());
-
- text.invokeAction(ST.LINE_END);
- assertEquals(5, text.getCaretOffset());
-
- text.invokeAction(ST.LINE_START);
- assertEquals(0, text.getCaretOffset());
-
- text.invokeAction(ST.COLUMN_NEXT);
- assertEquals(1, text.getCaretOffset());
-
- text.invokeAction(ST.PAGE_DOWN);
- assertEquals(8, text.getCaretOffset());
-
- text.invokeAction(ST.PAGE_UP);
- assertEquals(1, text.getCaretOffset());
-
- text.invokeAction(ST.TEXT_START);
- text.invokeAction(ST.WORD_NEXT);
- text.invokeAction(ST.WORD_NEXT);
- assertEquals(7, text.getCaretOffset());
-
- text.invokeAction(ST.WORD_PREVIOUS);
- assertEquals(5, text.getCaretOffset());
-
- text.invokeAction(ST.TEXT_END);
- assertEquals(text.getCharCount(), text.getCaretOffset());
-
- text.invokeAction(ST.TEXT_START);
- assertEquals(0, text.getCaretOffset());
-
- text.invokeAction(ST.WINDOW_END);
- assertEquals(5, text.getCaretOffset());
-
- text.invokeAction(ST.WINDOW_START);
- assertEquals(0, text.getCaretOffset());
-
- text.invokeAction(ST.SELECT_LINE_DOWN);
- assertEquals("LineL\r\n", text.getSelectionText());
-
- text.invokeAction(ST.LINE_END);
- text.invokeAction(ST.SELECT_LINE_UP);
- assertEquals("\r\nLineW", text.getSelectionText());
-
- text.invokeAction(ST.SELECT_LINE_START);
- assertEquals("LineL\r\nLineW", text.getSelectionText());
-
- text.invokeAction(ST.LINE_START);
- text.invokeAction(ST.SELECT_LINE_END);
- assertEquals("LineL", text.getSelectionText());
-
- text.invokeAction(ST.LINE_END);
- text.invokeAction(ST.SELECT_COLUMN_PREVIOUS);
- assertEquals("L", text.getSelectionText());
-
- text.invokeAction(ST.SELECT_COLUMN_NEXT);
- assertEquals("", text.getSelectionText());
-
- text.invokeAction(ST.SELECT_PAGE_UP);
- assertEquals("", text.getSelectionText());
-
- text.invokeAction(ST.SELECT_PAGE_DOWN);
- assertEquals("\r\nLineW", text.getSelectionText());
-
- text.invokeAction(ST.LINE_END);
- text.invokeAction(ST.SELECT_WORD_PREVIOUS);
- assertEquals("LineW", text.getSelectionText());
-
- text.invokeAction(ST.LINE_START);
- text.invokeAction(ST.SELECT_WORD_NEXT);
- assertEquals("LineW", text.getSelectionText());
-
- text.invokeAction(ST.LINE_START);
- text.invokeAction(ST.SELECT_TEXT_END);
- assertEquals("LineW", text.getSelectionText());
-
- text.invokeAction(ST.SELECT_TEXT_START);
- assertEquals("LineL\r\n", text.getSelectionText());
-
- text.invokeAction(ST.LINE_START);
- text.invokeAction(ST.SELECT_WINDOW_START);
- assertEquals("", text.getSelectionText());
-
- text.invokeAction(ST.SELECT_WINDOW_END);
- assertEquals("LineL", text.getSelectionText());
-
- text.invokeAction(ST.SELECT_LINE_END);
- text.invokeAction(ST.CUT);
- assertEquals("\r\nLineW", text.getText());
-
- text.invokeAction(ST.SELECT_LINE_DOWN);
- text.invokeAction(ST.COPY);
- assertEquals("\r\nLineW", text.getText());
-
- text.invokeAction(ST.LINE_END);
- text.invokeAction(ST.PASTE);
- assertEquals("\r\nLineW" + PLATFORM_LINE_DELIMITER, text.getText());
-
- text.invokeAction(ST.DELETE_PREVIOUS);
- assertEquals("\r\nLineW", text.getText());
-
- text.invokeAction(ST.TEXT_START);
- text.invokeAction(ST.DELETE_NEXT);
- assertEquals("LineW", text.getText());
-
- text.invokeAction(ST.TOGGLE_OVERWRITE);
-}
-
-public void test_paste(){
- Clipboard clipboard = new Clipboard(text.getDisplay());
- TextTransfer transfer = TextTransfer.getInstance();
- String convertedText;
-
- clipboard.setContents(new String[]{"x"}, new Transfer[]{transfer});
-
- text.copy();
- text.paste();
- assertTrue(":a:", text.getCharCount() == 1);
-
- text.setSelectionRange(0, 0);
- text.copy();
- text.paste();
- assertTrue(":b:", text.getCharCount() == 2);
-
- text.setText("0123456789");
- text.setSelectionRange(0, 1);
- text.copy();
- text.setCaretOffset(0);
- text.paste();
- assertTrue(":c:", text.getText().equals("00123456789"));
- text.setSelectionRange(1, 2);
- text.copy();
- text.setText("");
- text.paste();
- assertTrue(":d:", text.getText().equals("01"));
- text.setText("");
-
- // test line delimiter conversion
- clipboard.setContents(new String[]{"\rLine1\nLine2\r\nLine3\n\rLine4\n"}, new Transfer[]{transfer});
- text.paste();
- if (SwtJunit.isWindows) {
- convertedText = "\r\nLine1\r\nLine2\r\nLine3\r\n\r\nLine4\r\n";
- }
- else {
- convertedText = "\nLine1\nLine2\nLine3\n\nLine4\n";
- }
- assertTrue(":f:", text.getText() != null && text.getText().equals(convertedText));
- text.setText("");
-
- // test line delimiter conversion
- clipboard.setContents(new String[]{"Line1\r\nLine2"}, new Transfer[]{transfer});
- text.paste();
- if (SwtJunit.isWindows) {
- convertedText = "Line1\r\nLine2";
- }
- else {
- convertedText = "Line1\nLine2";
- }
- assertTrue(":g:", text.getText() != null && text.getText().equals(convertedText));
- text.setText("");
-
- // test line delimiter conversion
- clipboard.setContents(new String[]{"Line1\rLine2"}, new Transfer[]{transfer});
- text.paste();
- if (SwtJunit.isWindows) {
- convertedText = "Line1\r\nLine2";
- }
- else {
- convertedText = "Line1\nLine2";
- }
- assertTrue(":h:", text.getText() != null && text.getText().equals(convertedText));
- text.setText("");
-
-
- // test line delimiter conversion
- clipboard.setContents(new String[]{"Line1\nLine2"}, new Transfer[]{transfer});
- text.paste();
- if (SwtJunit.isWindows) {
- convertedText = "Line1\r\nLine2";
- }
- else {
- convertedText = "Line1\nLine2";
- }
- assertTrue(":i:", text.getText() != null && text.getText().equals(convertedText));
- text.setText("");
-
-
- clipboard.dispose();
-}
-
-public void test_print() {
- // if there aren't any printers, don't do this test
- if (Printer.getDefaultPrinterData() == null) return;
-
- /* We don't really want to run this test, because it wastes paper.
- * Almost all of the print() method is tested in print(Printer), below.
- */
-// text.print();
-// text.setText("Line1");
-// text.print();
-}
-
-public void test_printLorg_eclipse_swt_printing_Printer() {
- // if there aren't any printers, don't do this test
- if (Printer.getDefaultPrinterData() == null) return;
-
- boolean exceptionThrown = false;
- try {
- text.print(null);
- } catch (IllegalArgumentException ex) {
- exceptionThrown = true;
- }
- assertTrue("no exception thrown for print(null)", exceptionThrown);
-
- Printer printer = new Printer();
- text.print(printer); // don't run the runnable, to save paper
- text.setText("Line1");
- text.print(printer); // don't run the runnable, to save paper
- printer.dispose();
-}
-
-public void test_printLorg_eclipse_swt_printing_PrinterLorg_eclipse_swt_custom_StyledTextPrintOptions() {
- warnUnimpl("Test test_printLorg_eclipse_swt_printing_PrinterLorg_eclipse_swt_custom_StyledTextPrintOptions not written");
-}
-
-public void test_redraw() {
- // inherited test is sufficient
-}
-
-public void test_redrawIIIIZ() {
- // inherited test is sufficient
-}
-
-public void test_redrawRangeIIZ() {
- boolean exceptionThrown = false;
-
- text.redrawRange(0, 0, true);
- text.redrawRange(0, 0, false);
-
- try {
- text.redrawRange(0, 1, true);
- }
- catch (IllegalArgumentException e) {
- if (e.getMessage().equals("Index out of bounds")) {
- exceptionThrown = true;
- }
- }
- assertTrue(exceptionThrown);
-
- exceptionThrown = false;
- try {
- text.redrawRange(0, 1, false);
- }
- catch (IllegalArgumentException e) {
- if (e.getMessage().equals("Index out of bounds")) {
- exceptionThrown = true;
- }
- }
- assertTrue(exceptionThrown);
-
- exceptionThrown = false;
- try {
- text.redrawRange(-1, 2, true);
- }
- catch (IllegalArgumentException e) {
- if (e.getMessage().equals("Index out of bounds")) {
- exceptionThrown = true;
- }
- }
- assertTrue(exceptionThrown);
-
- exceptionThrown = false;
- try {
- text.redrawRange(-1, 2, false);
- }
- catch (IllegalArgumentException e) {
- if (e.getMessage().equals("Index out of bounds")) {
- exceptionThrown = true;
- }
- }
- assertTrue(exceptionThrown);
-
- text.setText("0123456789");
- text.redrawRange(0, 0, true);
- text.redrawRange(0, 0, false);
- text.redrawRange(0, 1, true);
- text.redrawRange(0, 1, false);
- text.redrawRange(8, 2, true);
- text.redrawRange(8, 2, false);
- text.redrawRange(10, 0, true);
- text.redrawRange(10, 0, false);
-
- exceptionThrown = false;
- try {
- text.redrawRange(10, 1, true);
- }
- catch (IllegalArgumentException e) {
- if (e.getMessage().equals("Index out of bounds")) {
- exceptionThrown = true;
- }
- }
- assertTrue(exceptionThrown);
-
- exceptionThrown = false;
- try {
- text.redrawRange(10, 1, false);
- }
- catch (IllegalArgumentException e) {
- if (e.getMessage().equals("Index out of bounds")) {
- exceptionThrown = true;
- }
- }
- assertTrue(exceptionThrown);
-}
-
-public void test_removeBidiSegmentListenerLorg_eclipse_swt_custom_BidiSegmentListener() {
- // tested in test_addBidiSegmentListenerLorg_eclipse_swt_custom_BidiSegmentListener
-}
-
-public void test_removeExtendedModifyListenerLorg_eclipse_swt_custom_ExtendedModifyListener() {
- // tested in test_addExtendedModifyListenerLorg_eclipse_swt_custom_ExtendedModifyListener
-}
-
-public void test_removeLineBackgroundListenerLorg_eclipse_swt_custom_LineBackgroundListener() {
- // tested in test_addLineBackgroundListenerLorg_eclipse_swt_custom_LineBackgroundListener
-}
-
-public void test_removeLineStyleListenerLorg_eclipse_swt_custom_LineStyleListener() {
- // tested in test_addLineStyleListenerLorg_eclipse_swt_custom_LineStyleListener
-}
-
-public void test_removeModifyListenerLorg_eclipse_swt_events_ModifyListener() {
- // tested in test_addModifyListenerLorg_eclipse_swt_events_ModifyListener
-}
-
-public void test_removeSelectionListenerLorg_eclipse_swt_events_SelectionListener() {
- // tested in test_addSelectionListenerLorg_eclipse_swt_events_SelectionListener
-}
-
-public void test_removeVerifyListenerLorg_eclipse_swt_events_VerifyListener() {
- // tested in test_addVerifyListenerLorg_eclipse_swt_events_VerifyListener
-}
-
-public void test_removeVerifyKeyListenerLorg_eclipse_swt_custom_VerifyKeyListener() {
- // tested in test_addVerifyKeyListenerLorg_eclipse_swt_custom_VerifyKeyListener
-}
-public void test_replaceStyleRangesII$Lorg_eclipse_swt_custom_StyleRange() {
- StyleRange[] styles;
- String textString = textString();
-
- /*
- defaultStyles
-
- (0,48,RED,YELLOW),
- (58,10,BLUE,CYAN),
- (68,10,GREEN,PURPLE)
- */
-
-
- text.setText(textString);
-
- text.replaceStyleRanges(0, text.getCharCount(), defaultStyles());
- text.replaceStyleRanges(0, 78, new StyleRange[] {});
- styles = text.getStyleRanges();
- assertTrue(":0:", styles.length == 0);
- text.setText(textString);
- styles = text.getStyleRanges();
- assertTrue(":0:", styles.length == 0);
- text.replaceStyleRanges(0, 78, new StyleRange[] {});
- styles = text.getStyleRanges();
- assertTrue(":0:", styles.length == 0);
- text.replaceStyleRanges(0, text.getCharCount(), defaultStyles());
- styles = text.getStyleRanges();
- assertTrue(":0:", styles.length == 3);
- assertTrue(":0:", styles[0].equals(getStyle(0,48,RED,YELLOW)));
- assertTrue(":0:", styles[1].equals(getStyle(58,10,BLUE,CYAN)));
- assertTrue(":0:", styles[2].equals(getStyle(68,10,GREEN,PURPLE)));
-
- // No overlap with existing styles
- text.replaceStyleRanges(0, text.getCharCount(), defaultStyles());
- text.replaceStyleRanges(48, 5, new StyleRange[] {getStyle(48,5,YELLOW,RED)});
- styles = text.getStyleRanges();
- assertTrue(":1:", styles.length == 4);
- assertTrue(":1:", styles[0].equals(getStyle(0,48,RED,YELLOW)));
- assertTrue(":1:", styles[1].equals(getStyle(48,5,YELLOW,RED)));
- assertTrue(":1:", styles[2].equals(getStyle(58,10,BLUE,CYAN)));
- assertTrue(":1:", styles[3].equals(getStyle(68,10,GREEN,PURPLE)));
-
- // Overlap middle of one style - partial
- text.replaceStyleRanges(0, text.getCharCount(), defaultStyles());
- text.replaceStyleRanges(10, 10, new StyleRange[] {getStyle(10,10,YELLOW,RED)});
- styles = text.getStyleRanges();
- assertTrue(":2:", styles.length == 5);
- assertTrue(":2:", styles[0].equals(getStyle(0,10,RED,YELLOW)));
- assertTrue(":2:", styles[1].equals(getStyle(10,10,YELLOW,RED)));
- assertTrue(":2:", styles[2].equals(getStyle(20,28,RED,YELLOW)));
- assertTrue(":2:", styles[3].equals(getStyle(58,10,BLUE,CYAN)));
- assertTrue(":2:", styles[4].equals(getStyle(68,10,GREEN,PURPLE)));
- text.replaceStyleRanges(0, text.getCharCount(), new StyleRange[] {});
- styles = text.getStyleRanges();
- assertTrue(":2:", styles.length == 0);
-
- // Overlap middle of one style - full
- text.replaceStyleRanges(0, text.getCharCount(), defaultStyles());
- text.replaceStyleRanges(58, 10, new StyleRange[] {getStyle(58,10,YELLOW,RED)});
- styles = text.getStyleRanges();
- assertTrue(":3:", styles.length == 3);
- assertTrue(":3:", styles[0].equals(getStyle(0,48,RED,YELLOW)));
- assertTrue(":3:", styles[1].equals(getStyle(58,10,YELLOW,RED)));
- assertTrue(":3:", styles[2].equals(getStyle(68,10,GREEN,PURPLE)));
-
- // Overlap end of one style
- text.replaceStyleRanges(0, text.getCharCount(), defaultStyles());
- text.replaceStyleRanges(38, 15, new StyleRange[] {getStyle(38,15,YELLOW,RED)});
- styles = text.getStyleRanges();
- assertTrue(":4:", styles.length == 4);
- assertTrue(":4:", styles[0].equals(getStyle(0,38,RED,YELLOW)));
- assertTrue(":4:", styles[1].equals(getStyle(38,15,YELLOW,RED)));
- assertTrue(":4:", styles[2].equals(getStyle(58,10,BLUE,CYAN)));
- assertTrue(":4:", styles[3].equals(getStyle(68,10,GREEN,PURPLE)));
-
- // Overlap beginning of one style
- text.replaceStyleRanges(0, text.getCharCount(), defaultStyles());
- text.replaceStyleRanges(50, 10, new StyleRange[] {getStyle(50,10,YELLOW,RED)});
- styles = text.getStyleRanges();
- assertTrue(":5:", styles.length == 4);
- assertTrue(":5:", styles[0].equals(getStyle(0,48,RED,YELLOW)));
- assertTrue(":5:", styles[1].equals(getStyle(50,10,YELLOW,RED)));
- assertTrue(":5:", styles[2].equals(getStyle(60,8,BLUE,CYAN)));
- assertTrue(":5:", styles[3].equals(getStyle(68,10,GREEN,PURPLE)));
-
- // Overlap complete style
- text.replaceStyleRanges(0, text.getCharCount(), defaultStyles());
- text.replaceStyleRanges(48, 20, new StyleRange[] {getStyle(48,20,YELLOW,RED)});
- styles = text.getStyleRanges();
- assertTrue(":6:", styles.length == 3);
- assertTrue(":6:", styles[0].equals(getStyle(0,48,RED,YELLOW)));
- assertTrue(":6:", styles[1].equals(getStyle(48,20,YELLOW,RED)));
- assertTrue(":6:", styles[2].equals(getStyle(68,10,GREEN,PURPLE)));
-
- // reset the environment
- text.dispose();
- text = new StyledText(shell, SWT.NULL);
- setWidget(text);
-
- text.setText(textString);
- StyleRange ranges[] = new StyleRange[3];
- ranges[0] = getStyle(0,48,RED,YELLOW);
- ranges[1] = getStyle(48,20,BLUE,CYAN);
- ranges[2] = getStyle(68,10,GREEN,PURPLE);
- text.replaceStyleRanges(0, 78, ranges);
- styles = text.getStyleRanges();
- assertTrue(":7:", styles.length == 3);
- assertTrue(":7:", styles[0].equals(getStyle(0,48,RED,YELLOW)));
- assertTrue(":7:", styles[1].equals(getStyle(48,20,BLUE,CYAN)));
- assertTrue(":7:", styles[2].equals(getStyle(68,10,GREEN,PURPLE)));
-
- text.setText("012345678901234");
- ranges = new StyleRange[2];
- ranges[0] = getStyle(0,5,RED,YELLOW);
- ranges[1] = getStyle(10,5,BLUE,CYAN);
- text.replaceStyleRanges(0, 15, ranges);
- styles = text.getStyleRanges();
- assertTrue(":8:", styles.length == 2);
- assertTrue(":8:", styles[0].equals(getStyle(0,5,RED,YELLOW)));
- assertTrue(":8:", styles[1].equals(getStyle(10,5,BLUE,CYAN)));
-
- text.setText("redgreenblueyellowcyanpurple");
- ranges = new StyleRange[4];
- ranges[0] = getStyle(0,3,RED,null);
- ranges[1] = getStyle(3,5,GREEN,null);
- ranges[2] = getStyle(8,4,BLUE,null);
- ranges[3] = getStyle(12,6,YELLOW,null);
- text.replaceStyleRanges(0, 18, ranges);
- styles = text.getStyleRanges();
- assertTrue(":9:", styles.length == 4);
- assertTrue(":9:", styles[0].equals(getStyle(0,3,RED,null)));
- assertTrue(":9:", styles[1].equals(getStyle(3,5,GREEN,null)));
- assertTrue(":9:", styles[2].equals(getStyle(8,4,BLUE, null)));
- assertTrue(":9:", styles[3].equals(getStyle(12,6,YELLOW,null)));
- ranges = new StyleRange[2];
- ranges[0] = getStyle(18,4,CYAN,null);
- ranges[1] = getStyle(22,6,PURPLE,null);
- text.replaceStyleRanges(18, 10, ranges);
- styles = text.getStyleRanges();
- assertTrue(":9:", styles.length == 6);
- assertTrue(":9:", styles[4].equals(getStyle(18,4,CYAN,null)));
- assertTrue(":9:", styles[5].equals(getStyle(22,6,PURPLE,null)));
-
- // reset the environment
- text.dispose();
- text = new StyledText(shell, SWT.NULL);
- setWidget(text);
-
- textString = textString();
-
- text.setText(textString);
- ranges = new StyleRange[2];
- ranges[0] = getStyle(0,10,RED,YELLOW);
- ranges[1] = getStyle(25,10,GREEN,PURPLE);
- text.replaceStyleRanges(0, 35, ranges);
- ranges = new StyleRange[2];
- ranges[0] = getStyle(5,15,BLUE,CYAN);
- ranges[1] = getStyle(20,10,GREEN,PURPLE);
- text.replaceStyleRanges(5, 25, ranges);
- styles = text.getStyleRanges();
- assertTrue(":10:", styles.length == 4);
- assertTrue(":10:", styles[0].equals(getStyle(0,5,RED,YELLOW)));
- assertTrue(":10:", styles[1].equals(getStyle(5,15,BLUE,CYAN)));
- assertTrue(":10:", styles[2].equals(getStyle(20,10,GREEN,PURPLE)));
- assertTrue(":10:", styles[3].equals(getStyle(30,5,GREEN,PURPLE)));
-
- text.setText("01234567890123456789");
- ranges = new StyleRange[2];
- ranges[0] = getStyle(0,10,RED,YELLOW);
- ranges[1] = getStyle(10,10,BLUE,CYAN);
- text.replaceStyleRanges(0, 20, ranges);
- ranges = new StyleRange[2];
- ranges[0] = getStyle(5,3,RED,YELLOW);
- ranges[1] = getStyle(12,5,BLUE,CYAN);
- text.replaceStyleRanges(5, 12, ranges);
- styles = text.getStyleRanges();
- assertTrue(":11:", styles.length == 4);
- assertTrue(":11:", styles[0].equals(getStyle(0,5,RED,YELLOW)));
- assertTrue(":11:", styles[1].equals(getStyle(5,3,RED,YELLOW)));
- assertTrue(":11:", styles[2].equals(getStyle(12,5,BLUE,CYAN)));
- assertTrue(":11:", styles[3].equals(getStyle(17,3,BLUE,CYAN)));
-
- text.setText("0123456789012345");
- ranges = new StyleRange[3];
- ranges[0] = getStyle(0,5,RED,YELLOW);
- ranges[1] = getStyle(5,5,BLUE,CYAN);
- ranges[2] = getStyle(10,5,GREEN,PURPLE);
- text.replaceStyleRanges(0, 15, ranges);
- ranges = new StyleRange[2];
- ranges[0] = getStyle(5,5,RED,YELLOW);
- ranges[1] = getStyle(10,5,RED,YELLOW);
- text.replaceStyleRanges(5, 10, ranges);
- styles = text.getStyleRanges();
- assertTrue(":12:", styles.length == 3);
- assertTrue(":12:", styles[0].equals(getStyle(0,5,RED,YELLOW)));
- assertTrue(":12:", styles[1].equals(getStyle(5,5,RED,YELLOW)));
- assertTrue(":12:", styles[2].equals(getStyle(10,5,RED,YELLOW)));
-
- text.setText("0123456789012345");
- ranges = new StyleRange[1];
- ranges[0] = getStyle(10,5,GREEN,PURPLE);
- text.replaceStyleRanges(0, 15, ranges);
- ranges = new StyleRange[2];
- ranges[0] = getStyle(0,5,RED,YELLOW);
- ranges[1] = getStyle(5,5,BLUE,CYAN);
- text.replaceStyleRanges(0, 10, ranges);
- styles = text.getStyleRanges();
- assertTrue(":13:", styles.length == 3);
- assertTrue(":13:", styles[0].equals(getStyle(0,5,RED,YELLOW)));
- assertTrue(":13:", styles[1].equals(getStyle(5,5,BLUE,CYAN)));
- assertTrue(":13:", styles[2].equals(getStyle(10,5,GREEN,PURPLE)));
-
- text.setText("012345678901234");
- ranges = new StyleRange[2];
- ranges[0] = getStyle(0,5,RED,YELLOW);
- ranges[1] = getStyle(10,5,BLUE,CYAN);
- text.replaceStyleRanges(0, 15, ranges);
- ranges = new StyleRange[1];
- ranges[0] = getStyle(5,7,BLUE,CYAN);
- text.replaceStyleRanges(5, 7, ranges);
- styles = text.getStyleRanges();
- assertTrue(":14:", styles.length == 3);
- assertTrue(":14:", styles[0].equals(getStyle(0,5,RED,YELLOW)));
- assertTrue(":14:", styles[1].equals(getStyle(5,7,BLUE,CYAN)));
- assertTrue(":14:", styles[2].equals(getStyle(12,3,BLUE,CYAN)));
-
-
- // reset the environment
- text.dispose();
- text = new StyledText(shell, SWT.NULL);
- setWidget(text);
-
- textString = textString();
-
-
- /*
- defaultStyles
-
- (0,48,RED,YELLOW),
- (58,10,BLUE,CYAN),
- (68,10,GREEN,PURPLE)
- */
-
-
- // End/Beginning overlap
- text.setText(textString);
- text.setStyleRanges(defaultStyles());
- ranges = new StyleRange[1];
- ranges[0] = getStyle(38,25,YELLOW,RED);
- text.replaceStyleRanges(38, 25, ranges);
- styles = text.getStyleRanges();
- assertTrue(":1a:", styles.length == 4);
- assertTrue(":1a:", styles[0].equals(getStyle(0,38,RED,YELLOW)));
- assertTrue(":1a:", styles[1].equals(getStyle(38,25,YELLOW,RED)));
- assertTrue(":1a:", styles[2].equals(getStyle(63,5,BLUE,CYAN)));
- assertTrue(":1a:", styles[3].equals(getStyle(68,10,GREEN,PURPLE)));
- text.setStyleRanges(defaultStyles());
- ranges = new StyleRange[1];
- ranges[0] = getStyle(63,10,YELLOW,RED);
- text.replaceStyleRanges(63, 10, ranges);
- styles = text.getStyleRanges();
- assertTrue(":1a:", styles.length == 4);
- assertTrue(":1a:", styles[0].equals(getStyle(0,48,RED,YELLOW)));
- assertTrue(":1a:", styles[1].equals(getStyle(58,5,BLUE,CYAN)));
- assertTrue(":1a:", styles[2].equals(getStyle(63,10,YELLOW,RED)));
- assertTrue(":1a:", styles[3].equals(getStyle(73,5,GREEN,PURPLE)));
-
- // Complete overlap
- text.setStyleRanges(defaultStyles());
- ranges = new StyleRange[1];
- ranges[0] = getStyle(0,78,YELLOW,RED);
- text.replaceStyleRanges(0, 78, ranges);
- styles = text.getStyleRanges();
- styles = text.getStyleRanges();
- assertTrue(":2a:", styles.length == 1);
- assertTrue(":2a:", styles[0].equals(getStyle(0,78,YELLOW,RED)));
-
- text.setStyleRanges(defaultStyles());
- ranges = new StyleRange[1];
- ranges[0] = getStyle(0,68,YELLOW,RED);
- text.replaceStyleRanges(0, 68, ranges);
- styles = text.getStyleRanges();
- assertTrue(":2a:", styles.length == 2);
- assertTrue(":2a:", styles[0].equals(getStyle(0,68,YELLOW,RED)));
- assertTrue(":2a:", styles[1].equals(getStyle(68,10,GREEN,PURPLE)));
- text.setStyleRanges(defaultStyles());
- ranges = new StyleRange[1];
- ranges[0] = getStyle(58,20,YELLOW,RED);
- text.replaceStyleRanges(58, 20, ranges);
- styles = text.getStyleRanges();
- assertTrue(":2a:", styles.length == 2);
- assertTrue(":2a:", styles[0].equals(getStyle(0,48,RED,YELLOW)));
- assertTrue(":2a:", styles[1].equals(getStyle(58,20,YELLOW,RED)));
-
- // 1-N complete, beginning
- text.setText("012345678901234567890123456789");
- text.setStyleRanges(
- new StyleRange[] {getStyle(0,5,RED,RED), getStyle(5,5,YELLOW,YELLOW),
- getStyle(10,5,CYAN,CYAN), getStyle(15,5,BLUE,BLUE),
- getStyle(20,5,GREEN,GREEN), getStyle(25,5,PURPLE,PURPLE)}
- );
- ranges = new StyleRange[1];
- ranges[0] = getStyle(5,23,YELLOW,RED);
- text.replaceStyleRanges(5, 23, ranges);
- styles = text.getStyleRanges();
- assertTrue(":3a:", styles.length == 3);
- assertTrue(":3a:", styles[0].equals(getStyle(0,5,RED,RED)));
- assertTrue(":3a:", styles[1].equals(getStyle(5,23,YELLOW,RED)));
- assertTrue(":3a:", styles[2].equals(getStyle(28,2,PURPLE,PURPLE)));
-
- // end, 1-N complete, beginning
- text.setStyleRanges(
- new StyleRange[] {getStyle(0,5,RED,RED), getStyle(5,5,YELLOW,YELLOW),
- getStyle(10,5,CYAN,CYAN), getStyle(15,5,BLUE,BLUE),
- getStyle(20,5,GREEN,GREEN), getStyle(25,5,PURPLE,PURPLE)}
- );
- ranges = new StyleRange[1];
- ranges[0] = getStyle(13,12,YELLOW,RED);
- text.replaceStyleRanges(13, 12, ranges);
- styles = text.getStyleRanges();
- assertTrue(":3a:", styles.length == 5);
- assertTrue(":3a:", styles[0].equals(getStyle(0,5,RED,RED)));
- assertTrue(":3a:", styles[1].equals(getStyle(5,5,YELLOW,YELLOW)));
- assertTrue(":3a:", styles[2].equals(getStyle(10,3,CYAN,CYAN)));
- assertTrue(":3a:", styles[3].equals(getStyle(13,12,YELLOW,RED)));
- assertTrue(":3a:", styles[4].equals(getStyle(25,5,PURPLE,PURPLE)));
-
- // reset the environment
- text.dispose();
- text = new StyledText(shell, SWT.NULL);
- setWidget(text);
-
- // insert with no styles
- text.setText("01234567890123456789");
- ranges = new StyleRange[1];
- ranges[0] = getStyle(0,5,RED,YELLOW);
- text.replaceStyleRanges(0, 10, ranges);
- styles = text.getStyleRanges();
- assertTrue(":1xa:", styles.length == 1);
- assertTrue(":1xa:", styles[0].equals(getStyle(0,5,RED,YELLOW)));
-
- // insert before 1 style
- text.setText("01234567890123456789");
- ranges = new StyleRange[1];
- ranges[0] = getStyle(5,3,RED,YELLOW);
- text.replaceStyleRanges(0, 10, ranges);
- ranges = new StyleRange[1];
- ranges[0] = getStyle(0,3,PURPLE,PURPLE);
- text.replaceStyleRanges(0, 3, ranges);
- styles = text.getStyleRanges();
- assertTrue(":1xb:", styles.length == 2);
- assertTrue(":1xb:", styles[0].equals(getStyle(0,3,PURPLE,PURPLE)));
- assertTrue(":1xb:", styles[1].equals(getStyle(5,3,RED,YELLOW)));
-
- // insert after 1 style
- text.setText("01234567890123456789");
- ranges = new StyleRange[1];
- ranges[0] = getStyle(5,3,RED,YELLOW);
- text.replaceStyleRanges(0, 10, ranges);
- ranges = new StyleRange[1];
- ranges[0] = getStyle(8,1,PURPLE,PURPLE);
- text.replaceStyleRanges(8, 1, ranges);
- styles = text.getStyleRanges();
- assertTrue(":1xc:", styles.length == 2);
- assertTrue(":1xc:", styles[0].equals(getStyle(5,3,RED,YELLOW)));
- assertTrue(":1xc:", styles[1].equals(getStyle(8,1,PURPLE,PURPLE)));
-
- // insert before 2 styles
- text.setText("01234567890123456789");
- ranges = new StyleRange[2];
- ranges[0] = getStyle(5,2,RED,YELLOW);
- ranges[1] = getStyle(10,2,RED,YELLOW);
- text.replaceStyleRanges(0, 20, ranges);
- ranges = new StyleRange[1];
- ranges[0] = getStyle(2,1,PURPLE,PURPLE);
- text.replaceStyleRanges(2, 1, ranges);
- styles = text.getStyleRanges();
- assertTrue(":1xe:", styles.length == 3);
- assertTrue(":1xe:", styles[0].equals(getStyle(2,1,PURPLE,PURPLE)));
- assertTrue(":1xe:", styles[1].equals(getStyle(5,2,RED,YELLOW)));
- assertTrue(":1xe:", styles[2].equals(getStyle(10,2,RED,YELLOW)));
-
- // insert after 2 styles
- text.setText("01234567890123456789");
- ranges = new StyleRange[2];
- ranges[0] = getStyle(5,2,RED,YELLOW);
- ranges[1] = getStyle(10,2,RED,YELLOW);
- text.replaceStyleRanges(0, 20, ranges);
- ranges = new StyleRange[1];
- ranges[0] = getStyle(12,1,PURPLE,PURPLE);
- text.replaceStyleRanges(12, 1, ranges);
- styles = text.getStyleRanges();
- assertTrue(":1xf:", styles.length == 3);
- assertTrue(":1xf:", styles[0].equals(getStyle(5,2,RED,YELLOW)));
- assertTrue(":1xf:", styles[1].equals(getStyle(10,2,RED,YELLOW)));
- assertTrue(":1xf:", styles[2].equals(getStyle(12,1,PURPLE,PURPLE)));
-
- // insert middle 2 styles
- text.setText("01234567890123456789");
- ranges = new StyleRange[2];
- ranges[0] = getStyle(1,2,RED,YELLOW);
- ranges[1] = getStyle(12,2,RED,YELLOW);
- text.replaceStyleRanges(0, 20, ranges);
- ranges = new StyleRange[1];
- ranges[0] = getStyle(5,3,PURPLE,PURPLE);
- text.replaceStyleRanges(5, 3, ranges);
- styles = text.getStyleRanges();
- assertTrue(":1xg:", styles.length == 3);
- assertTrue(":1xg:", styles[0].equals(getStyle(1,2,RED,YELLOW)));
- assertTrue(":1xg:", styles[1].equals(getStyle(5,3,PURPLE,PURPLE)));
- assertTrue(":1xg:", styles[2].equals(getStyle(12,2,RED,YELLOW)));
-
- // insert middle 3 styles
- text.setText("01234567890123456789");
- ranges = new StyleRange[3];
- ranges[0] = getStyle(1,3,RED,PURPLE);
- ranges[1] = getStyle(6,3,PURPLE,YELLOW);
- ranges[2] = getStyle(12,3,RED,YELLOW);
- text.replaceStyleRanges(0, 20, ranges);
- ranges = new StyleRange[1];
- ranges[0] = getStyle(4,2,PURPLE,PURPLE);
- text.replaceStyleRanges(4, 2, ranges);
- styles = text.getStyleRanges();
- assertTrue(":1xh:", styles.length == 4);
- assertTrue(":1xh:", styles[0].equals(getStyle(1,3,RED,PURPLE)));
- assertTrue(":1xh:", styles[1].equals(getStyle(4,2,PURPLE,PURPLE)));
- assertTrue(":1xh:", styles[2].equals(getStyle(6,3,PURPLE,YELLOW)));
- assertTrue(":1xh:", styles[3].equals(getStyle(12,3,RED,YELLOW)));
-
- // reset the environment
- text.dispose();
- text = new StyledText(shell, SWT.NULL);
- setWidget(text);
-
- text.setText("0");
- ranges = new StyleRange[1];
- ranges[0] = getStyle(0,1,PURPLE,PURPLE);
- text.replaceStyleRanges(0, 1, ranges);
- styles = text.getStyleRanges();
- assertTrue(":2xa:", styles.length == 1);
-
- text.setText("01");
- ranges = new StyleRange[2];
- ranges[0] = getStyle(0,1,PURPLE,PURPLE);
- ranges[1] = getStyle(1,1,RED,RED);
- text.replaceStyleRanges(0, 2, ranges);
- ranges = new StyleRange[1];
- ranges[0] = getStyle(0,1,YELLOW,YELLOW);
- text.replaceStyleRanges(0, 1, ranges);
- styles = text.getStyleRanges();
- assertTrue(":2xb:", styles.length == 2);
- assertTrue(":2xb:", styles[0].equals(getStyle(0,1,YELLOW,YELLOW)));
- assertTrue(":2xb:", styles[1].equals(getStyle(1,1,RED,RED)));
-
- text.setText("01");
- ranges = new StyleRange[2];
- ranges[0] = getStyle(0,1,PURPLE,PURPLE);
- ranges[1] = getStyle(1,1,RED,RED);
- text.replaceStyleRanges(0, 2, ranges);
- ranges = new StyleRange[1];
- ranges[0] = getStyle(1,1,YELLOW,YELLOW);
- text.replaceStyleRanges(1, 1, ranges);
- styles = text.getStyleRanges();
- assertTrue(":2xc:", styles.length == 2);
- assertTrue(":2xc:", styles[0].equals(getStyle(0,1,PURPLE,PURPLE)));
- assertTrue(":2xc:", styles[1].equals(getStyle(1,1,YELLOW,YELLOW)));
-
- text.setText("012");
- ranges = new StyleRange[2];
- ranges[0] = getStyle(0,1,PURPLE,PURPLE);
- ranges[1] = getStyle(1,1,RED,RED);
- text.replaceStyleRanges(0, 2, ranges);
- ranges = new StyleRange[1];
- ranges[0] = getStyle(2,1,YELLOW,YELLOW);
- text.replaceStyleRanges(2, 1, ranges);
- styles = text.getStyleRanges();
- assertTrue(":2xd:", styles.length == 3);
- assertTrue(":2xd:", styles[0].equals(getStyle(0,1,PURPLE,PURPLE)));
- assertTrue(":2xd:", styles[1].equals(getStyle(1,1,RED,RED)));
- assertTrue(":2xd:", styles[2].equals(getStyle(2,1,YELLOW,YELLOW)));
-
- text.setText("01234");
- ranges = new StyleRange[3];
- ranges[0] = getStyle(1,1,PURPLE,PURPLE);
- ranges[1] = getStyle(2,1,RED,RED);
- ranges[2] = getStyle(3,1,PURPLE,PURPLE);
- text.setStyleRanges(ranges);
- ranges = new StyleRange[1];
- ranges[0] = getStyle(4,1,YELLOW,YELLOW);
- text.replaceStyleRanges(4, 1, ranges);
- styles = text.getStyleRanges();
- assertTrue(":2xe:", styles.length == 4);
- assertTrue(":2xe:", styles[3].equals(getStyle(4,1,YELLOW,YELLOW)));
-
- text.setText("01234");
- ranges = new StyleRange[1];
- ranges[0] = getStyle(4,1,YELLOW,YELLOW);
- text.replaceStyleRanges(4, 1, ranges);
- styles = text.getStyleRanges();
- assertTrue(":2xf:", styles.length == 1);
- assertTrue(":2xf:", styles[0].equals(getStyle(4,1,YELLOW,YELLOW)));
-
- text.setText("01234");
- ranges = new StyleRange[1];
- ranges[0] = getStyle(4,1,YELLOW,YELLOW);
- text.replaceStyleRanges(4, 1, ranges);
- ranges = new StyleRange[0];
- text.replaceStyleRanges(4, 1, ranges);
- styles = text.getStyleRanges();
- assertTrue(":2xg:", styles.length == 0);
-
-}
-
-public void test_replaceTextRangeIILjava_lang_String(){
- String defaultText = "line0\n\rline1\n\rline2\n\r";
- int defaultTextLength = defaultText.length();
- int selectionStart = 7;
- int selectionLength = 7;
- int replaceStart = selectionStart + selectionLength + 1;
- int replaceLength = 5;
- boolean exceptionThrown = false;
- String newText = "newline0\n\rnewline1";
- int newTextLength = newText.length();
-
- // insert text
- // within range
- // after selection
- text.setText(defaultText);
- // select 2nd line including line break
- text.setSelectionRange(selectionStart, selectionLength);
- text.replaceTextRange(replaceStart, 0, newText);
- assertTrue(":a:", text.getCharCount() == defaultTextLength + newTextLength);
- assertTrue(":b:", text.getSelectionRange().x == selectionStart && text.getSelectionRange().y == selectionLength);
-
- // before selection
- text.setText(defaultText);
- // select 2nd line including line break
- text.setSelectionRange(selectionStart, selectionLength);
- text.replaceTextRange(0, 0, newText);
- assertTrue(":c:", text.getCharCount() == defaultTextLength + newTextLength);
- assertTrue(":d:", text.getSelectionRange().x == selectionStart + newTextLength && text.getSelectionRange().y == selectionLength);
-
-
- // intersecting selection
- text.setText(defaultText);
- // select 2nd line including line break
- text.setSelectionRange(selectionStart, selectionLength);
- text.replaceTextRange(selectionStart + 1, 0, newText);
- assertTrue(":e:", text.getCharCount() == defaultTextLength + newTextLength);
- assertTrue(":f:", text.getSelectionRange().x == selectionStart + 1 + newTextLength && text.getSelectionRange().y == 0);
-
- // out of range
- text.setText(defaultText);
- // select 2nd line including line break
- text.setSelectionRange(selectionStart, selectionLength);
- try {
- text.replaceTextRange(-1, 0, newText);
- }
- catch (IllegalArgumentException e) {
- exceptionThrown = true;
- }
- assertTrue(":g:", exceptionThrown);
- exceptionThrown = false;
- try {
- text.replaceTextRange(text.getCharCount() + 1, 0, newText);
- }
- catch (IllegalArgumentException e) {
- exceptionThrown = true;
- }
-
- exceptionThrown = false;
- try {
- text.replaceTextRange(0, 0, null);
- }
- catch (IllegalArgumentException e) {
- exceptionThrown = true;
- }
- assertTrue(exceptionThrown);
-
- assertTrue(":h:", exceptionThrown);
- assertTrue(":i:", text.getSelectionRange().x == selectionStart && text.getSelectionRange().y == selectionLength);
- exceptionThrown = false;
-
- // append text
- // append in empty widget
- text.setText("");
- text.replaceTextRange(text.getCharCount(), 0, newText);
- assertTrue(":j:", text.getCharCount() == newTextLength);
- assertTrue(":k:", text.getSelectionRange().x == 0 && text.getSelectionRange().y == 0);
-
- // append in non-empty widget (selection should always be preserved)
- text.setText(defaultText);
- // select 2nd line including line break
- text.setSelectionRange(selectionStart, selectionLength);
- text.replaceTextRange(text.getCharCount(), 0, newText);
- assertTrue(":l:", text.getCharCount() == defaultTextLength + newTextLength);
- assertTrue(":m:", text.getSelectionRange().x == selectionStart && text.getSelectionRange().y == selectionLength);
-
- // place caret at end of text
- text.setText(defaultText);
- text.setSelectionRange(text.getCharCount(), 0);
- text.replaceTextRange(text.getCharCount(), 0, newText);
- assertTrue(":n:", text.getCharCount() == defaultTextLength + newTextLength);
- assertTrue(":o:", text.getSelectionRange().x == text.getCharCount() - newTextLength && text.getSelectionRange().y == 0);
-
- // replace text
- // within range
- // after selection
- text.setText(defaultText);
- // select 2nd line including line break
- text.setSelectionRange(selectionStart, selectionLength);
- text.replaceTextRange(replaceStart, replaceLength, newText);
- assertTrue(":p:", text.getCharCount() == defaultTextLength + newTextLength - replaceLength);
- assertTrue(":q:", text.getSelectionRange().x == selectionStart && text.getSelectionRange().y == selectionLength);
-
- // before selection
- text.setText(defaultText);
- // select 2nd line including line break
- text.setSelectionRange(selectionStart, selectionLength);
- text.replaceTextRange(0, replaceLength, newText);
- assertTrue(":r:", text.getCharCount() == defaultTextLength + newTextLength - replaceLength);
- assertTrue(":s:", text.getSelectionRange().x == selectionStart + newTextLength - replaceLength && text.getSelectionRange().y == selectionLength);
-
- // intersecting selection
- text.setText(defaultText);
- // select 2nd line including line break
- text.setSelectionRange(selectionStart, selectionLength);
- text.replaceTextRange(selectionStart + 1, replaceLength, newText);
- assertTrue(":t:", text.getCharCount() == defaultTextLength + newTextLength - replaceLength);
- assertTrue(":u:", text.getSelectionRange().x == selectionStart + 1 + newTextLength && text.getSelectionRange().y == 0);
-
- // out of range
- text.setText(defaultText);
- // select 2nd line including line break
- text.setSelectionRange(selectionStart, selectionLength);
- try {
- text.replaceTextRange(-1, replaceLength, newText);
- }
- catch (IllegalArgumentException e) {
- exceptionThrown = true;
- }
- assertTrue(":v:", exceptionThrown);
- exceptionThrown = false;
- try {
- text.replaceTextRange(text.getCharCount() + 1, replaceLength, newText);
- }
- catch (IllegalArgumentException e) {
- exceptionThrown = true;
- }
- assertTrue(":w:", exceptionThrown);
- assertTrue(":x:", text.getSelectionRange().x == selectionStart && text.getSelectionRange().y == selectionLength);
-}
-
-public void test_selectAll() {
- String line = "Line1\rLine2";
-
- text.selectAll();
- assertEquals("", text.getSelectionText());
-
- text.setText(line);
- text.selectAll();
- assertEquals(line, text.getSelectionText());
-
- text.setText("");
- text.selectAll();
- assertEquals("", text.getSelectionText());
-}
-
-public void test_setCaretLorg_eclipse_swt_widgets_Caret() {
- Caret caret = new Caret(text, SWT.NONE);
- final int XINSET = isBidi() ? 2 : 0;
-
- text.setCaret(caret);
- assertEquals(XINSET, text.getCaret().getLocation().x);
- assertEquals(0, text.getCaret().getLocation().y);
-
- text.setCaret(null);
- text.setText("\rLine2");
- text.setSelection(2);
-
- text.setTopIndex(0);
- text.setCaret(caret);
- assertTrue(text.getCaret().getLocation().x > 0);
- assertEquals(text.getLineHeight(), text.getCaret().getLocation().y);
-}
-
-public void test_setBidiColoringZ() {
- /// setBidiColoring is deprecated and will be removed.
- warnUnimpl("Test test_setBidiColoringZ not written");
-}
-
-public void test_setCaretOffsetI(){
- text.setCaretOffset(-2);
- assertTrue(":a:", text.getCaretOffset() == 0);
- text.setCaretOffset(1);
- assertTrue(":b:", text.getCaretOffset() == 0);
- text.setCaretOffset(0);
- assertTrue(":c:", text.getCaretOffset() == 0);
-
- text.setText("Line0\r\n");
- text.setCaretOffset(-2);
- assertTrue(":d:", text.getCaretOffset() == 0);
- text.setCaretOffset(1);
- assertTrue(":e:", text.getCaretOffset() == 1);
- text.setCaretOffset(0);
- assertTrue(":f:", text.getCaretOffset() == 0);
-
- text.setCaretOffset(text.getCharCount());
- assertTrue(":g:", text.getCaretOffset() == text.getCharCount());
- text.setCaretOffset(text.getCharCount() + 1);
- assertTrue(":h:", text.getCaretOffset() == text.getCharCount());
- text.setCaretOffset(5);
- assertTrue(":i:", text.getCaretOffset() == 5);
-
- text.setText("");
- text.setCaretOffset(-2);
- assertTrue(":j:", text.getCaretOffset() == 0);
- text.setCaretOffset(1);
- assertTrue(":k:", text.getCaretOffset() == 0);
- text.setCaretOffset(0);
- assertTrue(":l:", text.getCaretOffset() == 0);
-}
-
-public void test_setContentLorg_eclipse_swt_custom_StyledTextContent() {
- boolean exceptionThrown;
- StyledTextContent content = new StyledTextContent() {
- public void addTextChangeListener(TextChangeListener listener) {
- }
- public int getCharCount() {
- return 0;
- }
- public String getLine(int lineIndex) {
- return "";
- }
- public int getLineAtOffset(int offset) {
- return 0;
- }
- public int getLineCount() {
- return 0;
- }
- public String getLineDelimiter() {
- return "";
- }
- public int getOffsetAtLine(int lineIndex) {
- return 0;
- }
- public String getTextRange(int start, int length) {
- return "";
- }
- public void removeTextChangeListener(TextChangeListener listener) {
- }
- public void replaceTextRange(int start, int replaceLength, String text) {
- }
- public void setText(String text) {
- }
- };
- text.setContent(content);
- assertEquals(content, text.getContent());
-
- exceptionThrown = false;
- try {
- text.setContent(null);
- }
- catch (IllegalArgumentException e) {
- exceptionThrown = true;
- }
- assertTrue(exceptionThrown);
-}
-
-public void test_setDoubleClickEnabledZ(){
- text.setDoubleClickEnabled(true);
- assertTrue(":a:", text.getDoubleClickEnabled() == true);
- text.setDoubleClickEnabled(false);
- assertTrue(":b:", text.getDoubleClickEnabled() == false);
- text.setDoubleClickEnabled(false);
- assertTrue(":c:", text.getDoubleClickEnabled() == false);
- text.setDoubleClickEnabled(true);
- assertTrue(":d:", text.getDoubleClickEnabled() == true);
-}
-
-public void test_setEditableZ(){
- text.setEditable(true);
- assertTrue(":a:", text.getEditable() == true);
- text.setEditable(false);
- assertTrue(":b:", text.getEditable() == false);
- text.setEditable(false);
- assertTrue(":c:", text.getEditable() == false);
- text.setEditable(true);
- assertTrue(":d:", text.getEditable() == true);
-}
-
-public void test_setFontLorg_eclipse_swt_graphics_Font(){
- FontData fontData = text.getFont().getFontData()[0];
- int lineHeight;
- Font font;
-
- font = new Font(text.getDisplay(), fontData.getName(), 20, fontData.getStyle());
- text.setFont(font);
- lineHeight = text.getLineHeight();
- text.setFont(null);
- font.dispose();
- font = new Font(text.getDisplay(), fontData.getName(), 25, fontData.getStyle());
- text.setFont(font);
- assertTrue(":a:", text.getLineHeight() > lineHeight && font.equals(text.getFont()));
- text.setFont(null);
- font.dispose();
-}
-
-public void test_setHorizontalIndexI(){
- text.setHorizontalIndex(-1);
- assertTrue(":a:", text.getHorizontalIndex() == 0);
- text.setHorizontalIndex(1);
- assertTrue(":b:", text.getHorizontalIndex() == 0);
-
- text.setText("Line0");
- text.setHorizontalIndex(-1);
- assertTrue(":c:", text.getHorizontalIndex() == 0);
- text.setHorizontalIndex(1);
- assertTrue(":d:", text.getHorizontalIndex() == 1);
- text.setHorizontalIndex(500);
- assertTrue(":e:", text.getHorizontalIndex() > 0);
- text.setHorizontalIndex(-1);
- assertTrue(":f:", text.getHorizontalIndex() == 0);
- text.setHorizontalIndex(1);
- assertTrue(":g:", text.getHorizontalIndex() == 1);
-
- text.setText("");
- text.setHorizontalIndex(2);
- assertTrue(":h:", text.getHorizontalIndex() == 0);
-
- // make sure the widget can be scrolled
- shell.open();
- text.setSize(10, 50);
- text.setText("Line0");
- text.setHorizontalIndex(1);
- assertTrue(":i:", text.getHorizontalIndex() == 1);
-}
-
-public void test_setHorizontalPixelI(){
- text.setHorizontalPixel(-1);
- assertTrue(":a:", text.getHorizontalPixel() == 0);
- text.setHorizontalPixel(1);
- assertTrue(":b:", text.getHorizontalPixel() == 0);
-
- text.setText("Line0");
- text.setHorizontalPixel(-1);
- assertTrue(":c:", text.getHorizontalPixel() == 0);
- text.setHorizontalPixel(1);
- assertTrue(":d:", text.getHorizontalPixel() == 1);
- text.setHorizontalPixel(500);
- assertTrue(":e:", text.getHorizontalPixel() > 0);
- text.setHorizontalPixel(-1);
- assertTrue(":f:", text.getHorizontalPixel() == 0);
- text.setHorizontalPixel(25);
- assertTrue(":g:", text.getHorizontalPixel() == 25);
-
- text.setText("");
- text.setHorizontalPixel(2);
- assertTrue(":h:", text.getHorizontalPixel() == 0);
-
- // make sure the widget can be scrolled
- shell.open();
- text.setSize(10, 50);
- text.setText("Line0");
- text.setHorizontalPixel(5);
- assertTrue(":i:", text.getHorizontalPixel() == 5);
-}
-
-public void test_setLineBackgroundIILorg_eclipse_swt_graphics_Color(){
- String textString;
-
- textString = "L1\nL2\nL3\nL4";
- text.setText(textString);
- text.setLineBackground(0,1,getColor(RED));
- text.setLineBackground(1,1,getColor(YELLOW));
- text.setLineBackground(2,1,getColor(BLUE));
- text.setLineBackground(3,1,getColor(GREEN));
- text.replaceTextRange(1,5,"");
- assertTrue(":0a:", text.getLineBackground(0) == getColor(RED));
- assertTrue(":0a:", text.getLineBackground(1) == getColor(GREEN));
- text.setText(textString);
- text.setLineBackground(0,1,getColor(RED));
- text.setLineBackground(1,1,getColor(YELLOW));
- text.setLineBackground(2,1,getColor(BLUE));
- text.setLineBackground(3,1,getColor(GREEN));
- text.replaceTextRange(0,4,"");
- assertTrue(":0b:", text.getLineBackground(0) == getColor(YELLOW));
- assertTrue(":0b:", text.getLineBackground(1) == getColor(BLUE));
- assertTrue(":0b:", text.getLineBackground(2) == getColor(GREEN));
- text.setText(textString);
- text.setLineBackground(0,1,getColor(RED));
- text.setLineBackground(1,1,getColor(YELLOW));
- text.setLineBackground(2,1,getColor(BLUE));
- text.setLineBackground(3,1,getColor(GREEN));
- text.replaceTextRange(1,1,"");
- assertTrue(":0c:", text.getLineBackground(0) == getColor(RED));
- assertTrue(":0c:", text.getLineBackground(1) == getColor(YELLOW));
- assertTrue(":0c:", text.getLineBackground(2) == getColor(BLUE));
- assertTrue(":0c:", text.getLineBackground(3) == getColor(GREEN));
- text.setText(textString);
- text.setLineBackground(0,1,getColor(RED));
- text.setLineBackground(1,1,getColor(YELLOW));
- text.setLineBackground(2,1,getColor(BLUE));
- text.setLineBackground(3,1,getColor(GREEN));
- text.replaceTextRange(0,6,"");
- assertTrue(":0d:", text.getLineBackground(0) == getColor(BLUE));
- assertTrue(":0d:", text.getLineBackground(1) == getColor(GREEN));
- text.setText(textString);
- text.setLineBackground(0,1,getColor(RED));
- text.setLineBackground(1,1,getColor(YELLOW));
- text.setLineBackground(2,1,getColor(BLUE));
- text.setLineBackground(3,1,getColor(GREEN));
- text.replaceTextRange(1,3,"");
- assertTrue(":0e:", text.getLineBackground(0) == getColor(RED));
- assertTrue(":0e:", text.getLineBackground(1) == getColor(BLUE));
- assertTrue(":0e:", text.getLineBackground(2) == getColor(GREEN));
-
- textString = "L1\nL2";
- text.setText(textString);
- text.setLineBackground(0,1,getColor(RED));
- text.setLineBackground(1,1,getColor(YELLOW));
- text.replaceTextRange(1,4,"");
- assertTrue(":0a1:", text.getLineBackground(0) == getColor(RED));
- text.setText(textString);
- text.setLineBackground(0,1,getColor(RED));
- text.setLineBackground(1,1,getColor(YELLOW));
- text.replaceTextRange(0,4,"");
- assertTrue(":0b1:", text.getLineBackground(0) == getColor(YELLOW));
- text.setText(textString);
- text.setLineBackground(0,1,getColor(RED));
- text.setLineBackground(1,1,getColor(YELLOW));
- text.replaceTextRange(1,1,"");
- assertTrue(":0c1:", text.getLineBackground(0) == getColor(RED));
- assertTrue(":0c1:", text.getLineBackground(1) == getColor(YELLOW));
- text.setText(textString);
- text.setLineBackground(0,1,getColor(RED));
- text.setLineBackground(1,1,getColor(YELLOW));
- text.replaceTextRange(0,5,"");
- assertTrue(":0d1:", text.getLineBackground(0) == null);
- text.setText(textString);
- text.setLineBackground(0,1,getColor(RED));
- text.setLineBackground(1,1,getColor(YELLOW));
- text.replaceTextRange(1,3,"");
- assertTrue(":0e1:", text.getLineBackground(0) == getColor(RED));
- assertTrue(":0e1:", text.getLineBackground(1) == getColor(YELLOW));
- textString = "L1\nL2";
- text.setText(textString);
- text.setLineBackground(1,1,getColor(YELLOW));
- text.replaceTextRange(1,4,"");
- assertTrue(":0f1:", text.getLineBackground(0) == null);
- text.setText(textString+"\n");
- text.setLineBackground(0,1,getColor(RED));
- text.setLineBackground(1,1,getColor(YELLOW));
- text.replaceTextRange(0,6,"");
- assertTrue(":0g1:", text.getLineBackground(0) == null);
-
- text.setText(textString);
- text.setLineBackground(0,0,getColor(RED));
- assertTrue(":1:", text.getLineBackground(0) == null);
- text.setLineBackground(0,1,getColor(RED));
- assertTrue(":1:", text.getLineBackground(0) == getColor(RED));
-
- textString = "New Line1\nNew Line2\nNew Line3\nNew Line4";
- text.setText(textString);
- text.setLineBackground(0,2,getColor(RED));
- text.setLineBackground(2,2,getColor(YELLOW));
- text.replaceTextRange(0,0,"\n");
- assertTrue(":2:", text.getLineBackground(0) == null);
- assertTrue(":2:", text.getLineBackground(1) == getColor(RED));
- assertTrue(":2:", text.getLineBackground(2) == getColor(RED));
- assertTrue(":2:", text.getLineBackground(3) == getColor(YELLOW));
- assertTrue(":2:", text.getLineBackground(4) == getColor(YELLOW));
-
- textString = "New Line1\nNew Line2\nNew Line3\nNew Line4";
- text.setText(textString);
- text.setLineBackground(0,2,getColor(RED));
- text.setLineBackground(2,2,getColor(YELLOW));
- text.replaceTextRange(0,20,"");
- assertTrue(":3:", text.getLineBackground(0) == getColor(YELLOW));
- assertTrue(":3:", text.getLineBackground(1) == getColor(YELLOW));
-
- textString = "Line1\nLine2\nLine3\nLine4";
- text.setText(textString);
- text.setLineBackground(0,1,getColor(RED));
- text.setLineBackground(2,1,getColor(YELLOW));
- text.replaceTextRange(0,18,"");
- assertTrue(":4:", text.getLineBackground(0) == null);
-
- textString = "Line1\nLine2\nLine3\nLine4";
- text.setText(textString);
- text.setLineBackground(0,1,getColor(RED));
- text.setLineBackground(2,1,getColor(YELLOW));
- text.replaceTextRange(0,18,"L1\nL2\nL3\n");
- assertTrue(":5:", text.getLineBackground(0) == null);
- assertTrue(":5:", text.getLineBackground(1) == null);
- assertTrue(":5:", text.getLineBackground(2) == null);
- assertTrue(":5:", text.getLineBackground(3) == null);
-
- textString = "Line1\nLine2\nLine3\nLine4";
- text.setText(textString);
- text.setLineBackground(0,1,getColor(RED));
- text.setLineBackground(1,1,getColor(YELLOW));
- text.setLineBackground(2,1,getColor(BLUE));
- text.setLineBackground(3,1,getColor(GREEN));
- text.replaceTextRange(3,9,"L1\nL2\n");
- assertTrue(":6a:", text.getLineBackground(0) == getColor(RED));
- assertTrue(":6a:", text.getLineBackground(1) == null);
- textString = "Line1\nLine2\nLine3\nLine4";
- text.setText(textString);
- text.setLineBackground(0,1,getColor(RED));
- text.setLineBackground(1,1,getColor(YELLOW));
- text.setLineBackground(2,1,getColor(BLUE));
- text.setLineBackground(3,1,getColor(GREEN));
- text.replaceTextRange(11,11,"L3\nL4");
- assertTrue(":6b:", text.getLineBackground(2) == null);
- assertTrue(":6b:", text.getLineBackground(3) == getColor(GREEN));
-
- textString = "Line1\nLine2\nLine3\nLine4";
- text.setText(textString);
- text.setLineBackground(0,1,getColor(RED));
- text.setLineBackground(1,1,getColor(YELLOW));
- text.setLineBackground(2,1,getColor(BLUE));
- text.setLineBackground(3,1,getColor(GREEN));
- text.replaceTextRange(0,18,"L1\n");
- assertTrue(":7:", text.getLineBackground(0) == null);
- assertTrue(":7:", text.getLineBackground(1) == getColor(GREEN));
-}
-
-public void test_setOrientationI() {
- warnUnimpl("Test test_setOrientationI not written");
-}
-
-public void test_setSelectionI() {
- int[] invalid = {-1, 100, 12};
- boolean exceptionThrown;
-
- for (int i = 0; i < invalid.length; i++) {
- exceptionThrown = false;
- try {
- text.setSelection(invalid[i]);
- }
- catch (IllegalArgumentException e) {
- exceptionThrown = true;
- }
- assertTrue(exceptionThrown);
- }
- text.setText("01234567890");
- assertEquals(0, text.getCaretOffset());
- text.setSelection(1);
- assertEquals(1, text.getCaretOffset());
- text.setSelection(11);
- assertEquals(11, text.getCaretOffset());
-
- for (int i = 0; i < invalid.length; i++) {
- exceptionThrown = false;
- try {
- text.setSelection(invalid[i]);
- }
- catch (IllegalArgumentException e) {
- exceptionThrown = true;
- }
- assertTrue(exceptionThrown);
- }
-}
-
-public void test_setSelectionLorg_eclipse_swt_graphics_Point() {
- Point[] invalidRanges = {new Point(-1, 0), new Point(-1, -1), new Point(100, 1),
- new Point(100, -1), new Point(11, 12), new Point(10, 12)};
- boolean exceptionThrown;
-
- for (int i = 0; i < invalidRanges.length; i++) {
- exceptionThrown = false;
- try {
- text.setSelection(invalidRanges[i]);
- }
- catch (IllegalArgumentException e) {
- exceptionThrown = true;
- }
- assertTrue(exceptionThrown);
- }
- text.setText("01234567890");
- assertEquals("", text.getSelectionText());
- text.setSelection(3, 7);
- assertEquals("3456", text.getSelectionText());
-
- for (int i = 0; i < invalidRanges.length; i++) {
- exceptionThrown = false;
- try {
- text.setSelection(invalidRanges[i]);
- }
- catch (IllegalArgumentException e) {
- exceptionThrown = true;
- }
- assertTrue(exceptionThrown);
- }
-}
-
-public void test_setSelectionII(){
- int[][] invalidRanges = {{-1, 0}, {-1, -1}, {100, 1}, {100, -1}, {11, 12}, {10, 12}, {2, -3}, {50, -1}};
- boolean exceptionThrown;
-
- for (int i = 0; i < invalidRanges.length; i++) {
- int start = invalidRanges[i][0];
- int end = invalidRanges[i][1];
-
- exceptionThrown = false;
- try {
- text.setSelection(start, end);
- }
- catch (IllegalArgumentException e) {
- exceptionThrown = true;
- }
- assertTrue(exceptionThrown);
- }
- text.setText("01234567890");
- assertEquals("", text.getSelectionText());
- text.setSelection(3, 7);
- assertEquals("3456", text.getSelectionText());
- text.setSelection(3, 0);
- assertEquals("012", text.getSelectionText());
- assertEquals(0, text.getCaretOffset());
-
- for (int i = 0; i < invalidRanges.length; i++) {
- int start = invalidRanges[i][0];
- int end = invalidRanges[i][1];
-
- exceptionThrown = false;
- try {
- text.setSelection(start, end);
- }
- catch (IllegalArgumentException e) {
- exceptionThrown = true;
- }
- assertTrue(exceptionThrown);
- }
-}
-public void test_setSelectionBackgroundLorg_eclipse_swt_graphics_Color(){
- text.setSelectionBackground(getColor(YELLOW));
- assertTrue(":1a:", text.getSelectionBackground() == getColor(YELLOW));
- text.setSelectionBackground(null);
- assertTrue(":1b:", text.getSelectionBackground().equals(text.getDisplay().getSystemColor(SWT.COLOR_LIST_SELECTION)));
-}
-public void test_setSelectionForegroundLorg_eclipse_swt_graphics_Color(){
- text.setSelectionForeground(getColor(RED));
- assertTrue(":1a:", text.getSelectionForeground() == getColor(RED));
- text.setSelectionForeground(null);
- assertTrue(":1b:", text.getSelectionForeground().equals(text.getDisplay().getSystemColor(SWT.COLOR_LIST_SELECTION_TEXT)));
-}
-
-public void test_setSelectionRangeII(){
- // setSelectionRange already tested in test_getSelectionRange
-}
-
-public void test_setStyleRangeLorg_eclipse_swt_custom_StyleRange(){
- StyleRange[] styles;
- String textString = textString();
-
- /*
- defaultStyles
-
- (0,48,RED,YELLOW),
- (58,10,BLUE,CYAN),
- (68,10,GREEN,PURPLE)
- */
-
-
- text.setText(textString);
-
- // No overlap with existing styles
- text.setStyleRanges(defaultStyles());
- text.setStyleRange(getStyle(48,5,YELLOW,RED));
- styles = text.getStyleRanges();
- assertTrue(":1:", styles.length == 4);
- assertTrue(":1:", styles[0].equals(getStyle(0,48,RED,YELLOW)));
- assertTrue(":1:", styles[1].equals(getStyle(48,5,YELLOW,RED)));
- assertTrue(":1:", styles[2].equals(getStyle(58,10,BLUE,CYAN)));
- assertTrue(":1:", styles[3].equals(getStyle(68,10,GREEN,PURPLE)));
-
- // Overlap middle of one style - partial
- text.setStyleRanges(defaultStyles());
- text.setStyleRange(getStyle(10,10,YELLOW,RED));
- styles = text.getStyleRanges();
- assertTrue(":2:", styles.length == 5);
- assertTrue(":2:", styles[0].equals(getStyle(0,10,RED,YELLOW)));
- assertTrue(":2:", styles[1].equals(getStyle(10,10,YELLOW,RED)));
- assertTrue(":2:", styles[2].equals(getStyle(20,28,RED,YELLOW)));
- assertTrue(":2:", styles[3].equals(getStyle(58,10,BLUE,CYAN)));
- assertTrue(":2:", styles[4].equals(getStyle(68,10,GREEN,PURPLE)));
- text.setStyleRange(null);
- styles = text.getStyleRanges();
- assertTrue(":2:", styles.length == 0);
-
- // Overlap middle of one style - full
- text.setStyleRanges(defaultStyles());
- text.setStyleRange(getStyle(58,10,YELLOW,RED));
- styles = text.getStyleRanges();
- assertTrue(":3:", styles.length == 3);
- assertTrue(":3:", styles[0].equals(getStyle(0,48,RED,YELLOW)));
- assertTrue(":3:", styles[1].equals(getStyle(58,10,YELLOW,RED)));
- assertTrue(":3:", styles[2].equals(getStyle(68,10,GREEN,PURPLE)));
-
- // Overlap end of one style
- text.setStyleRanges(defaultStyles());
- text.setStyleRange(getStyle(38,15,YELLOW,RED));
- styles = text.getStyleRanges();
- assertTrue(":4:", styles.length == 4);
- assertTrue(":4:", styles[0].equals(getStyle(0,38,RED,YELLOW)));
- assertTrue(":4:", styles[1].equals(getStyle(38,15,YELLOW,RED)));
- assertTrue(":4:", styles[2].equals(getStyle(58,10,BLUE,CYAN)));
- assertTrue(":4:", styles[3].equals(getStyle(68,10,GREEN,PURPLE)));
-
- // Overlap beginning of one style
- text.setStyleRanges(defaultStyles());
- text.setStyleRange(getStyle(50,10,YELLOW,RED));
- styles = text.getStyleRanges();
- assertTrue(":5:", styles.length == 4);
- assertTrue(":5:", styles[0].equals(getStyle(0,48,RED,YELLOW)));
- assertTrue(":5:", styles[1].equals(getStyle(50,10,YELLOW,RED)));
- assertTrue(":5:", styles[2].equals(getStyle(60,8,BLUE,CYAN)));
- assertTrue(":5:", styles[3].equals(getStyle(68,10,GREEN,PURPLE)));
-
- // Overlap complete style
- text.setStyleRanges(defaultStyles());
- text.setStyleRange(getStyle(48,20,YELLOW,RED));
- styles = text.getStyleRanges();
- assertTrue(":6:", styles.length == 3);
- assertTrue(":6:", styles[0].equals(getStyle(0,48,RED,YELLOW)));
- assertTrue(":6:", styles[1].equals(getStyle(48,20,YELLOW,RED)));
- assertTrue(":6:", styles[2].equals(getStyle(68,10,GREEN,PURPLE)));
-
- // reset the environment
- text.dispose();
- text = new StyledText(shell, SWT.NULL);
- setWidget(text);
-
- text.setText(textString);
- text.setStyleRange(getStyle(0,48,RED,YELLOW));
- text.setStyleRange(getStyle(48,20,BLUE,CYAN));
- text.setStyleRange(getStyle(68,10,GREEN,PURPLE));
- // should be merged with style before it
- text.setStyleRange(getStyle(48,10,RED,YELLOW));
- styles = text.getStyleRanges();
- assertTrue(":1:", styles.length == 3);
- assertTrue(":1:", styles[0].equals(getStyle(0,58,RED,YELLOW)));
- assertTrue(":1:", styles[1].equals(getStyle(58,10,BLUE,CYAN)));
- assertTrue(":1:", styles[2].equals(getStyle(68,10,GREEN,PURPLE)));
-
- text.setText(textString);
- text.setStyleRange(getStyle(0,10,RED,YELLOW));
- text.setStyleRange(getStyle(15,10,BLUE,CYAN));
- text.setStyleRange(getStyle(25,10,GREEN,PURPLE));
- // should be merged with style after it
- text.setStyleRange(getStyle(11,4,BLUE,CYAN));
- styles = text.getStyleRanges();
- assertTrue(":2:", styles.length == 3);
- assertTrue(":2:", styles[0].equals(getStyle(0,10,RED,YELLOW)));
- assertTrue(":2:", styles[1].equals(getStyle(11,14,BLUE,CYAN)));
- assertTrue(":2:", styles[2].equals(getStyle(25,10,GREEN,PURPLE)));
-
- text.setText(textString);
- text.setStyleRange(getStyle(0,10,RED,YELLOW));
- text.setStyleRange(getStyle(15,10,BLUE,CYAN));
- text.setStyleRange(getStyle(25,10,GREEN,PURPLE));
- // should be merged with style after it
- text.setStyleRange(getStyle(5,15,BLUE,CYAN));
- styles = text.getStyleRanges();
- assertTrue(":3:", styles.length == 3);
- assertTrue(":3:", styles[0].equals(getStyle(0,5,RED,YELLOW)));
- assertTrue(":3:", styles[1].equals(getStyle(5,20,BLUE,CYAN)));
- assertTrue(":3:", styles[2].equals(getStyle(25,10,GREEN,PURPLE)));
-
- text.setText("01234567890123456789");
- text.setStyleRange(getStyle(0,10,RED,YELLOW));
- text.setStyleRange(getStyle(10,10,BLUE,CYAN));
- text.setStyleRange(getStyle(5,3,RED,YELLOW));
- text.setStyleRange(getStyle(12,5,BLUE,CYAN));
- styles = text.getStyleRanges();
- assertTrue(":4:", styles.length == 2);
- assertTrue(":4:", styles[0].equals(getStyle(0,10,RED,YELLOW)));
- assertTrue(":4:", styles[1].equals(getStyle(10,10,BLUE,CYAN)));
-
- text.setText("0123456789012345");
- text.setStyleRange(getStyle(0,5,RED,YELLOW));
- text.setStyleRange(getStyle(5,5,BLUE,CYAN));
- text.setStyleRange(getStyle(10,5,GREEN,PURPLE));
- // no merging since styles are completely overlapping existing
- // styles
- text.setStyleRange(getStyle(5,5,RED,YELLOW));
- text.setStyleRange(getStyle(10,5,RED,YELLOW));
- styles = text.getStyleRanges();
- assertTrue(":5:", styles.length == 3);
- assertTrue(":5:", styles[0].equals(getStyle(0,5,RED,YELLOW)));
- assertTrue(":5:", styles[1].equals(getStyle(5,5,RED,YELLOW)));
- assertTrue(":5:", styles[2].equals(getStyle(10,5,RED,YELLOW)));
-
- text.setText("012345678901234");
- text.setStyleRange(getStyle(0,5,RED,YELLOW));
- text.setStyleRange(getStyle(10,5,BLUE,CYAN));
- // should be merged
- text.setStyleRange(getStyle(5,7,BLUE,CYAN));
- styles = text.getStyleRanges();
- assertTrue(":6:", styles.length == 2);
- assertTrue(":6:", styles[0].equals(getStyle(0,5,RED,YELLOW)));
- assertTrue(":6:", styles[1].equals(getStyle(5,10,BLUE,CYAN)));
-
- text.setText("123 456 789");
- text.setStyleRange(getStyle(4,3,BLUE,null));
- text.setStyleRange(getStyle(8,3,RED,null));
- text.setStyleRange(getStyle(5,2,BLUE,null));
- styles = text.getStyleRanges();
- assertTrue(":7:", styles.length == 2);
- assertTrue(":7:", styles[0].equals(getStyle(4,3,BLUE,null)));
- assertTrue(":7:", styles[1].equals(getStyle(8,3,RED,null)));
-
- text.setText("123 456 789");
- text.setStyleRange(getStyle(4,3,BLUE,null));
- text.setStyleRange(getStyle(8,3,RED,null));
- text.setStyleRange(getStyle(7,4,BLUE,null));
- styles = text.getStyleRanges();
- assertTrue(":8:", styles.length == 2);
- assertTrue(":8:", styles[0].equals(getStyle(4,3,BLUE,null)));
- assertTrue(":8:", styles[1].equals(getStyle(7,4,BLUE,null)));
-
- text.setText("123 456 789 ABC DEF");
- text.setStyleRange(getStyle(0,4,BLUE,null));
- text.setStyleRange(getStyle(4,4,RED,null));
- text.setStyleRange(getStyle(8,4,BLUE,null));
- text.setStyleRange(getStyle(12,4,RED,null));
- text.setStyleRange(getStyle(16,3,BLUE,null));
- text.setStyleRange(getStyle(5,14,RED,null));
- styles = text.getStyleRanges();
- assertTrue(":9:", styles.length == 2);
- assertTrue(":9:", styles[0].equals(getStyle(0,4,BLUE,null)));
- assertTrue(":9:", styles[1].equals(getStyle(4,15,RED,null)));
-
- // reset the environment
- text.dispose();
- text = new StyledText(shell, SWT.NULL);
- setWidget(text);
-
- text.setText(textString);
- text.setStyleRange(getStyle(0,48,RED,YELLOW));
- text.setStyleRange(getStyle(48,20,BLUE,CYAN));
- text.setStyleRange(getStyle(68,10,GREEN,PURPLE));
- text.setStyleRange(getStyle(38,20,null,null));
- styles = text.getStyleRanges();
- assertTrue(":1:", styles.length == 3);
- assertTrue(":1:", styles[0].equals(getStyle(0,38,RED,YELLOW)));
- assertTrue(":1:", styles[1].equals(getStyle(58,10,BLUE,CYAN)));
- assertTrue(":1:", styles[2].equals(getStyle(68,10,GREEN,PURPLE)));
-
- text.setText(textString);
- int length = textString.length();
- text.setStyleRange(getStyle(0,48,RED,YELLOW));
- text.setStyleRange(getStyle(48,20,BLUE,CYAN));
- text.setStyleRange(getStyle(68,10,GREEN,PURPLE));
- text.setStyleRange(getStyle(0,length,null,null));
- styles = text.getStyleRanges();
- assertTrue(":2:", styles.length == 0);
-
- text.setText("01234567890123456789");
- text.setStyleRange(getStyle(0,3,RED,YELLOW));
- text.setStyleRange(getStyle(5,3,BLUE,CYAN));
- text.setStyleRange(getStyle(9,8,GREEN,PURPLE));
- text.setStyleRange(getStyle(0,10,GREEN,PURPLE));
- styles = text.getStyleRanges();
- assertTrue(":3:", styles.length == 2);
- assertTrue(":3:", styles[0].equals(getStyle(0,10,GREEN,PURPLE)));
- assertTrue(":3:", styles[1].equals(getStyle(10,7,GREEN,PURPLE)));
-
- text.setText("0123456789012345");
- text.setStyleRange(getStyle(0,5,RED,YELLOW));
- text.setStyleRange(getStyle(5,5,BLUE,CYAN));
- text.setStyleRange(getStyle(10,5,GREEN,PURPLE));
- text.setStyleRange(getStyle(7,9,RED,YELLOW));
- styles = text.getStyleRanges();
- assertTrue(":4:", styles.length == 3);
- assertTrue(":4:", styles[0].equals(getStyle(0,5,RED,YELLOW)));
- assertTrue(":4:", styles[1].equals(getStyle(5,2,BLUE,CYAN)));
- assertTrue(":4:", styles[2].equals(getStyle(7,9,RED,YELLOW)));
-
- text.setText("012345678901234");
- text.setStyleRange(getStyle(0,5,RED,YELLOW));
- text.setStyleRange(getStyle(10,5,BLUE,CYAN));
- text.setStyleRange(getStyle(3,10,GREEN,PURPLE));
- styles = text.getStyleRanges();
- assertTrue(":5:", styles.length == 3);
- assertTrue(":5:", styles[0].equals(getStyle(0,3,RED,YELLOW)));
- assertTrue(":5:", styles[1].equals(getStyle(3,10,GREEN,PURPLE)));
- assertTrue(":5:", styles[2].equals(getStyle(13,2,BLUE,CYAN)));
-
- text.setText("redgreenblueyellowcyanpurple");
- text.setStyleRange(getStyle(0,3,RED,null));
- text.setStyleRange(getStyle(3,5,GREEN,null));
- text.setStyleRange(getStyle(8,4,BLUE,null));
- text.setStyleRange(getStyle(12,6,YELLOW,null));
- text.setStyleRange(getStyle(18,4,CYAN,null));
- text.setStyleRange(getStyle(22,6,PURPLE,null));
- text.setStyleRange(getStyle(8,14,null,RED));
- styles = text.getStyleRanges();
- assertTrue(":6:", styles.length == 4);
- assertTrue(":6:", styles[0].equals(getStyle(0,3,RED,null)));
- assertTrue(":6:", styles[1].equals(getStyle(3,5,GREEN,null)));
- assertTrue(":6:", styles[2].equals(getStyle(8,14,null,RED)));
- assertTrue(":6:", styles[3].equals(getStyle(22,6,PURPLE,null)));
-
-
- text.setText("redgreenblueyellowcyanpurple");
- text.setStyleRange(getStyle(0,3,RED,null));
- text.setStyleRange(getStyle(3,5,GREEN,null));
- text.setStyleRange(getStyle(8,4,BLUE,null));
- text.setStyleRange(getStyle(12,6,YELLOW,null));
- text.setStyleRange(getStyle(18,4,CYAN,null));
- text.setStyleRange(getStyle(22,6,PURPLE,null));
- text.setStyleRange(getStyle(0,28,null,null));
- styles = text.getStyleRanges();
- assertTrue(":7:", styles.length == 0);
-
-
-/*
- text.setText("This\r\na\tAnother line.");
- text.setStyleRange(getStyle(3,3,BLUE,null));
- text.setStyleRange(getStyle(7,8,BLUE,null));
- text.setStyleRange(getStyle(6,1,BLUE,null));
- StyledTextEvent event = new StyledTextEvent();
- event.detail = 6;
- event.text = "a\tAnother line.";
- text.notifyListener(ST.LineGetStyle, event);
- assertTrue(":8:", event.styles[0].equals(getStyle(3,4,BLUE,null)));
-*/
-
-
- text.setText("123 456 789");
- text.setStyleRange(getStyle(4,3,BLUE,null));
- text.setStyleRange(getStyle(8,3,RED,null));
- text.setStyleRange(getStyle(5,5,BLUE,null));
- styles = text.getStyleRanges();
- assertTrue(":9:", styles.length == 2);
- assertTrue(":9:", styles[0].equals(getStyle(4,6,BLUE,null)));
- assertTrue(":9:", styles[1].equals(getStyle(10,1,RED,null)));
-
-
- // reset the environment
- text.dispose();
- text = new StyledText(shell, SWT.NULL);
- setWidget(text);
-
- textString = textString();
-
- text.setText(textString);
- text.setStyleRange(getStyle(0,48,RED,YELLOW));
- text.setStyleRange(getStyle(48,20,BLUE,CYAN));
- text.setStyleRange(getStyle(68,10,GREEN,PURPLE));
- // should be merged with style before it
- text.setStyleRange(getStyle(48,10,RED,YELLOW));
- styles = text.getStyleRanges();
- assertTrue(":1:", styles.length == 3);
- assertTrue(":1:", styles[0].equals(getStyle(0,58,RED,YELLOW)));
- assertTrue(":1:", styles[1].equals(getStyle(58,10,BLUE,CYAN)));
- assertTrue(":1:", styles[2].equals(getStyle(68,10,GREEN,PURPLE)));
-
-
- text.setText(textString);
- text.setStyleRange(getStyle(0,10,RED,YELLOW));
- text.setStyleRange(getStyle(15,10,BLUE,CYAN));
- text.setStyleRange(getStyle(25,10,GREEN,PURPLE));
- // should be merged with style after it
- text.setStyleRange(getStyle(11,4,BLUE,CYAN));
- styles = text.getStyleRanges();
- assertTrue(":2:", styles.length == 3);
- assertTrue(":2:", styles[0].equals(getStyle(0,10,RED,YELLOW)));
- assertTrue(":2:", styles[1].equals(getStyle(11,14,BLUE,CYAN)));
- assertTrue(":2:", styles[2].equals(getStyle(25,10,GREEN,PURPLE)));
-
- text.setText(textString);
- text.setStyleRange(getStyle(0,10,RED,YELLOW));
- text.setStyleRange(getStyle(15,10,BLUE,CYAN));
- text.setStyleRange(getStyle(25,10,GREEN,PURPLE));
- // should be merged with style after it
- text.setStyleRange(getStyle(5,15,BLUE,CYAN));
- styles = text.getStyleRanges();
- assertTrue(":3:", styles.length == 3);
- assertTrue(":3:", styles[0].equals(getStyle(0,5,RED,YELLOW)));
- assertTrue(":3:", styles[1].equals(getStyle(5,20,BLUE,CYAN)));
- assertTrue(":3:", styles[2].equals(getStyle(25,10,GREEN,PURPLE)));
-
-
-
- text.setText("01234567890123456789");
- text.setStyleRange(getStyle(0,10,RED,YELLOW));
- text.setStyleRange(getStyle(10,10,BLUE,CYAN));
- text.setStyleRange(getStyle(5,3,RED,YELLOW));
- text.setStyleRange(getStyle(12,5,BLUE,CYAN));
- styles = text.getStyleRanges();
- assertTrue(":4:", styles.length == 2);
- assertTrue(":4:", styles[0].equals(getStyle(0,10,RED,YELLOW)));
- assertTrue(":4:", styles[1].equals(getStyle(10,10,BLUE,CYAN)));
-
- text.setText("0123456789012345");
- text.setStyleRange(getStyle(0,5,RED,YELLOW));
- text.setStyleRange(getStyle(5,5,BLUE,CYAN));
- text.setStyleRange(getStyle(10,5,GREEN,PURPLE));
- // no merging since styles are completely overlapping existing
- // styles
- text.setStyleRange(getStyle(5,5,RED,YELLOW));
- text.setStyleRange(getStyle(10,5,RED,YELLOW));
- styles = text.getStyleRanges();
- assertTrue(":5:", styles.length == 3);
- assertTrue(":5:", styles[0].equals(getStyle(0,5,RED,YELLOW)));
- assertTrue(":5:", styles[1].equals(getStyle(5,5,RED,YELLOW)));
- assertTrue(":5:", styles[2].equals(getStyle(10,5,RED,YELLOW)));
-
- text.setText("012345678901234");
- text.setStyleRange(getStyle(0,5,RED,YELLOW));
- text.setStyleRange(getStyle(10,5,BLUE,CYAN));
- // should be merged
- text.setStyleRange(getStyle(5,7,BLUE,CYAN));
- styles = text.getStyleRanges();
- assertTrue(":6:", styles.length == 2);
- assertTrue(":6:", styles[0].equals(getStyle(0,5,RED,YELLOW)));
- assertTrue(":6:", styles[1].equals(getStyle(5,10,BLUE,CYAN)));
-
-
- // reset the environment
- text.dispose();
- text = new StyledText(shell, SWT.NULL);
- setWidget(text);
-
- textString = textString();
-
-
- /*
- defaultStyles
-
- (0,48,RED,YELLOW),
- (58,10,BLUE,CYAN),
- (68,10,GREEN,PURPLE)
- */
-
-
- text.setText(textString);
-
- // End/Beginning overlap
- text.setStyleRanges(defaultStyles());
- text.setStyleRange(getStyle(38,25,YELLOW,RED));
- styles = text.getStyleRanges();
- assertTrue(":1:", styles.length == 4);
- assertTrue(":1:", styles[0].equals(getStyle(0,38,RED,YELLOW)));
- assertTrue(":1:", styles[1].equals(getStyle(38,25,YELLOW,RED)));
- assertTrue(":1:", styles[2].equals(getStyle(63,5,BLUE,CYAN)));
- assertTrue(":1:", styles[3].equals(getStyle(68,10,GREEN,PURPLE)));
- text.setStyleRanges(defaultStyles());
- text.setStyleRange(getStyle(63,10,YELLOW,RED));
- styles = text.getStyleRanges();
- assertTrue(":1:", styles.length == 4);
- assertTrue(":1:", styles[0].equals(getStyle(0,48,RED,YELLOW)));
- assertTrue(":1:", styles[1].equals(getStyle(58,5,BLUE,CYAN)));
- assertTrue(":1:", styles[2].equals(getStyle(63,10,YELLOW,RED)));
- assertTrue(":1:", styles[3].equals(getStyle(73,5,GREEN,PURPLE)));
-
-
- // Complete overlap
- text.setStyleRanges(defaultStyles());
- text.setStyleRange(getStyle(0,78,YELLOW,RED));
- styles = text.getStyleRanges();
- assertTrue(":2:", styles.length == 1);
- assertTrue(":2:", styles[0].equals(getStyle(0,78,YELLOW,RED)));
- text.setStyleRanges(defaultStyles());
- text.setStyleRange(getStyle(0,68,YELLOW,RED));
- styles = text.getStyleRanges();
- assertTrue(":2:", styles.length == 2);
- assertTrue(":2:", styles[0].equals(getStyle(0,68,YELLOW,RED)));
- assertTrue(":2:", styles[1].equals(getStyle(68,10,GREEN,PURPLE)));
- text.setStyleRanges(defaultStyles());
- text.setStyleRange(getStyle(58,20,YELLOW,RED));
- styles = text.getStyleRanges();
- assertTrue(":2:", styles.length == 2);
- assertTrue(":2:", styles[0].equals(getStyle(0,48,RED,YELLOW)));
- assertTrue(":2:", styles[1].equals(getStyle(58,20,YELLOW,RED)));
-
-
- // 1-N complete, beginning
- text.setText("012345678901234567890123456789");
- text.setStyleRanges(
- new StyleRange[] {getStyle(0,5,RED,RED), getStyle(5,5,YELLOW,YELLOW),
- getStyle(10,5,CYAN,CYAN), getStyle(15,5,BLUE,BLUE),
- getStyle(20,5,GREEN,GREEN), getStyle(25,5,PURPLE,PURPLE)}
- );
- text.setStyleRange(getStyle(5,23,YELLOW,RED));
- styles = text.getStyleRanges();
- assertTrue(":3:", styles.length == 3);
- assertTrue(":3:", styles[0].equals(getStyle(0,5,RED,RED)));
- assertTrue(":3:", styles[1].equals(getStyle(5,23,YELLOW,RED)));
- assertTrue(":3:", styles[2].equals(getStyle(28,2,PURPLE,PURPLE)));
-
- // end, 1-N complete, beginning
- text.setStyleRanges(
- new StyleRange[] {getStyle(0,5,RED,RED), getStyle(5,5,YELLOW,YELLOW),
- getStyle(10,5,CYAN,CYAN), getStyle(15,5,BLUE,BLUE),
- getStyle(20,5,GREEN,GREEN), getStyle(25,5,PURPLE,PURPLE)}
- );
- text.setStyleRange(getStyle(13,12,YELLOW,RED));
- styles = text.getStyleRanges();
- assertTrue(":3:", styles.length == 5);
- assertTrue(":3:", styles[0].equals(getStyle(0,5,RED,RED)));
- assertTrue(":3:", styles[1].equals(getStyle(5,5,YELLOW,YELLOW)));
- assertTrue(":3:", styles[2].equals(getStyle(10,3,CYAN,CYAN)));
- assertTrue(":3:", styles[3].equals(getStyle(13,12,YELLOW,RED)));
- assertTrue(":3:", styles[4].equals(getStyle(25,5,PURPLE,PURPLE)));
-
-
- text.setText("x/");
- text.setStyleRange(getStyle(0,2,YELLOW,null));
- styles = text.getStyleRanges();
- assertTrue(":4:", styles.length == 1);
- assertTrue(":4:", styles[0].equals(getStyle(0,2,YELLOW,null)));
- text.replaceTextRange(2,0,"/");
- styles = text.getStyleRanges();
- assertTrue(":4:", styles.length == 1);
- assertTrue(":4:", styles[0].equals(getStyle(0,2,YELLOW,null)));
- text.setStyleRange(getStyle(0,1,YELLOW,null));
- assertTrue(":4:", styles.length == 1);
- assertTrue(":4:", styles[0].equals(getStyle(0,2,YELLOW,null)));
- text.setStyleRange(getStyle(1,2,RED,null));
- styles = text.getStyleRanges();
- assertTrue(":4:", styles.length == 2);
- assertTrue(":4:", styles[0].equals(getStyle(0,1,YELLOW,null)));
- assertTrue(":4:", styles[1].equals(getStyle(1,2,RED,null)));
-
-
- text.setText("xxx/");
- text.setStyleRange(getStyle(0,2,RED,null));
- text.setStyleRange(getStyle(2,2,YELLOW,null));
- styles = text.getStyleRanges();
- assertTrue(":4a:", styles.length == 2);
- assertTrue(":4a:", styles[0].equals(getStyle(0,2,RED,null)));
- assertTrue(":4a:", styles[1].equals(getStyle(2,2,YELLOW,null)));
- text.replaceTextRange(4,0,"/");
- styles = text.getStyleRanges();
- assertTrue(":4a:", styles.length == 2);
- assertTrue(":4a:", styles[0].equals(getStyle(0,2,RED,null)));
- assertTrue(":4a:", styles[1].equals(getStyle(2,2,YELLOW,null)));
- text.setStyleRange(getStyle(2,1,YELLOW,null));
- assertTrue(":4a:", styles.length == 2);
- assertTrue(":4a:", styles[0].equals(getStyle(0,2,RED,null)));
- assertTrue(":4a:", styles[1].equals(getStyle(2,2,YELLOW,null)));
- text.setStyleRange(getStyle(3,2,RED,null));
- styles = text.getStyleRanges();
- assertTrue(":4a:", styles.length == 3);
- assertTrue(":4a:", styles[0].equals(getStyle(0,2,RED,null)));
- assertTrue(":4a:", styles[1].equals(getStyle(2,1,YELLOW,null)));
- assertTrue(":4a:", styles[2].equals(getStyle(3,2,RED,null)));
-
-
- text.setText("xxx/");
- text.setStyleRange(getStyle(0,2,RED,null));
- text.setStyleRange(getStyle(2,2,YELLOW,null));
- text.replaceTextRange(4,0,"/");
- styles = text.getStyleRanges();
- text.setStyleRange(getStyle(2,1,YELLOW,null));
- text.setStyleRange(getStyle(2,3,RED,null));
- styles = text.getStyleRanges();
- assertTrue(":4b:", styles.length == 2);
- assertTrue(":4b:", styles[0].equals(getStyle(0,2,RED,null)));
- assertTrue(":4b:", styles[1].equals(getStyle(2,3,RED,null)));
-
-
- text.setText("xxx/");
- text.setStyleRange(getStyle(0,2,RED,null));
- text.setStyleRange(getStyle(2,2,YELLOW,null));
- text.replaceTextRange(4,0,"/");
- styles = text.getStyleRanges();
- text.setStyleRange(getStyle(2,1,YELLOW,null));
- text.setStyleRange(getStyle(1,4,YELLOW,null));
- styles = text.getStyleRanges();
- assertTrue(":4c:", styles.length == 2);
- assertTrue(":4c:", styles[0].equals(getStyle(0,1,RED,null)));
- assertTrue(":4c:", styles[1].equals(getStyle(1,4,YELLOW,null)));
-
-
- text.setText("New\r\n");
- StyleRange style = getStyle(0,5,null,null);
- style.fontStyle = SWT.BOLD;
- text.setStyleRange(style);
- // styles (0,5,BOLD)
- text.replaceTextRange(3,0,"a"); // "Newa\r\n"
- // styles (0,3,BOLD), (4,2,BOLD)
- style = text.getStyleRangeAtOffset(4);
- style.start = 3;
- style.length = 1;
- text.setStyleRange(style);
- // styles (0,6,BOLD)
- text.replaceTextRange(0,0,"a"); // "aNewa\r\n"
- // styles (1,6,BOLD)
- style = text.getStyleRangeAtOffset(1);
- style.start = 0;
- style.length = 1;
- text.setStyleRange(style);
- // styles (0,7,BOLD)
- text.replaceTextRange(0,1,""); // "Newa\r\n"
- // styles (0,6,BOLD)
- for (int i=0; i<6; i++) {
- style = text.getStyleRangeAtOffset(i);
- assertTrue(":5:", style.fontStyle == SWT.BOLD);
- }
-
-
- text.setText("New L 1\r\nNew L 2\r\n");
- style = getStyle(0,9,null,null);
- style.fontStyle = SWT.BOLD;
- text.setStyleRange(style);
- // styles (0,9,BOLD)
- text.replaceTextRange(7,0,"a");
- // styles (0,7,BOLD), (8,2,BOLD)
- style = text.getStyleRangeAtOffset(8);
- if (style != null) {
- style.start = 7;
- style.length = 1;
- text.setStyleRange(style);
- }
- // styles (0,10,BOLD)
- text.replaceTextRange(4,0,"a");
- // styles (0,4,BOLD), (5,6,BOLD)
- style = text.getStyleRangeAtOffset(5);
- if (style != null) {
- style.start = 4;
- style.length = 1;
- text.setStyleRange(style);
- }
- // styles (0,11,BOLD)
- text.replaceTextRange(2,3,"");
- // styles (0,8,BOLD)
- for (int i=0; i<8; i++) {
- style = text.getStyleRangeAtOffset(i);
- assertTrue(":5a:", style.fontStyle == SWT.BOLD);
- }
-
-
- // reset the environment
- text.dispose();
- text = new StyledText(shell, SWT.NULL);
- setWidget(text);
-
-
- // "01234567890123"
- textString = "1234 1234 1234";
-
-
- text.setText("1234 1234 1234");
- text.setStyleRange(getStyle(5,4,YELLOW,RED));
- text.setStyleRange(getStyle(5,2,YELLOW,RED));
- styles = text.getStyleRanges();
- assertTrue(":1a:", styles.length == 1);
- assertTrue(":1a:", styles[0].equals(getStyle(5,4,YELLOW,RED)));
- text.setText("1234 1234 1234");
- text.setStyleRange(getStyle(5,4,YELLOW,RED));
- text.setStyleRange(getStyle(7,2,YELLOW,RED));
- styles = text.getStyleRanges();
- assertTrue(":2a:", styles.length == 1);
- assertTrue(":2a:", styles[0].equals(getStyle(5,4,YELLOW,RED)));
- text.setText("1234 1234 1234");
- text.setStyleRange(getStyle(5,4,YELLOW,RED));
- text.setStyleRange(getStyle(6,2,YELLOW,RED));
- styles = text.getStyleRanges();
- assertTrue(":3a:", styles.length == 1);
- assertTrue(":3a:", styles[0].equals(getStyle(5,4,YELLOW,RED)));
- text.setText("1234 1234 1234");
- text.setStyleRange(getStyle(5,4,YELLOW,RED));
- text.setStyleRange(getStyle(3,4,YELLOW,RED));
- styles = text.getStyleRanges();
- assertTrue(":4a:", styles.length == 1);
- assertTrue(":4a:", styles[0].equals(getStyle(3,6,YELLOW,RED)));
- text.setText("1234 1234 1234");
- text.setStyleRange(getStyle(5,4,YELLOW,RED));
- text.setStyleRange(getStyle(7,4,YELLOW,RED));
- styles = text.getStyleRanges();
- assertTrue(":5a:", styles.length == 1);
- assertTrue(":5a:", styles[0].equals(getStyle(5,6,YELLOW,RED)));
- text.setText("1234 1234 1234");
- text.setStyleRange(getStyle(5,4,YELLOW,RED));
- text.setStyleRange(getStyle(5,4,YELLOW,RED));
- styles = text.getStyleRanges();
- assertTrue(":6a:", styles.length == 1);
- assertTrue(":6a:", styles[0].equals(getStyle(5,4,YELLOW,RED)));
- text.setText("1234 1234 1234");
- text.setStyleRange(getStyle(5,4,YELLOW,RED));
- text.setStyleRange(getStyle(3,10,YELLOW,RED));
- styles = text.getStyleRanges();
- assertTrue(":7a:", styles.length == 1);
- assertTrue(":7a:", styles[0].equals(getStyle(3,10,YELLOW,RED)));
-
-
- text.setText("1234 1234 1234");
- text.setStyleRange(getStyle(5,4,YELLOW,RED));
- text.setStyleRange(getStyle(5,2,BLUE,CYAN));
- styles = text.getStyleRanges();
- assertTrue(":1b:", styles.length == 2);
- assertTrue(":1b:", styles[0].equals(getStyle(5,2,BLUE,CYAN)));
- assertTrue(":1b:", styles[1].equals(getStyle(7,2,YELLOW,RED)));
- text.setText("1234 1234 1234");
- text.setStyleRange(getStyle(5,4,YELLOW,RED));
- text.setStyleRange(getStyle(7,2,BLUE,CYAN));
- styles = text.getStyleRanges();
- assertTrue(":2b:", styles.length == 2);
- assertTrue(":2b:", styles[0].equals(getStyle(5,2,YELLOW,RED)));
- assertTrue(":2b:", styles[1].equals(getStyle(7,2,BLUE,CYAN)));
- text.setText("1234 1234 1234");
- text.setStyleRange(getStyle(5,4,YELLOW,RED));
- text.setStyleRange(getStyle(6,2,BLUE,CYAN));
- styles = text.getStyleRanges();
- assertTrue(":3b:", styles.length == 3);
- assertTrue(":3b:", styles[0].equals(getStyle(5,1,YELLOW,RED)));
- assertTrue(":3b:", styles[1].equals(getStyle(6,2,BLUE,CYAN)));
- assertTrue(":3b:", styles[2].equals(getStyle(8,1,YELLOW,RED)));
- text.setText("1234 1234 1234");
- text.setStyleRange(getStyle(5,4,YELLOW,RED));
- text.setStyleRange(getStyle(3,4,BLUE,CYAN));
- styles = text.getStyleRanges();
- assertTrue(":4b:", styles.length == 2);
- assertTrue(":4b:", styles[0].equals(getStyle(3,4,BLUE,CYAN)));
- assertTrue(":4b:", styles[1].equals(getStyle(7,2,YELLOW,RED)));
- text.setText("1234 1234 1234");
- text.setStyleRange(getStyle(5,4,YELLOW,RED));
- text.setStyleRange(getStyle(7,4,BLUE,CYAN));
- styles = text.getStyleRanges();
- assertTrue(":5b:", styles.length == 2);
- assertTrue(":5b:", styles[0].equals(getStyle(5,2,YELLOW,RED)));
- assertTrue(":5b:", styles[1].equals(getStyle(7,4,BLUE,CYAN)));
- text.setText("1234 1234 1234");
- text.setStyleRange(getStyle(5,4,YELLOW,RED));
- text.setStyleRange(getStyle(5,4,BLUE,CYAN));
- styles = text.getStyleRanges();
- assertTrue(":6b:", styles.length == 1);
- assertTrue(":6b:", styles[0].equals(getStyle(5,4,BLUE,CYAN)));
- text.setText("1234 1234 1234");
- text.setStyleRange(getStyle(5,4,YELLOW,RED));
- text.setStyleRange(getStyle(3,10,BLUE,CYAN));
- styles = text.getStyleRanges();
- assertTrue(":7b:", styles.length == 1);
- assertTrue(":7b:", styles[0].equals(getStyle(3,10,BLUE,CYAN)));
-
-
- // reset the environment
- text.dispose();
- text = new StyledText(shell, SWT.NULL);
- setWidget(text);
-
- // "012345678901234567890123"
- String testString= "1234 1234 1234 1234 1234";
-
- text.setText(testString);
- text.setStyleRange(getStyle(10,4,YELLOW,RED));
- text.replaceTextRange(12,2,"");
- styles = text.getStyleRanges();
- assertTrue(":1:", styles.length == 1);
- assertTrue(":1:", styles[0].equals(getStyle(10,2,YELLOW,RED)));
- text.setText(testString);
- text.setStyleRange(getStyle(10,4,YELLOW,RED));
- text.replaceTextRange(10,2,"");
- styles = text.getStyleRanges();
- assertTrue(":2:", styles.length == 1);
- assertTrue(":2:", styles[0].equals(getStyle(10,2,YELLOW,RED)));
-
-
- text.setText(testString);
- text.setStyleRange(getStyle(10,4,YELLOW,RED));
- text.replaceTextRange(12,4,"");
- styles = text.getStyleRanges();
- assertTrue(":3:", styles.length == 1);
- assertTrue(":3:", styles[0].equals(getStyle(10,2,YELLOW,RED)));
- text.setText(testString);
- text.setStyleRange(getStyle(10,4,YELLOW,RED));
- text.replaceTextRange(8,4,"");
- styles = text.getStyleRanges();
- assertTrue(":4:", styles.length == 1);
- assertTrue(":4:", styles[0].equals(getStyle(8,2,YELLOW,RED)));
-
-
- text.setText(testString);
- text.setStyleRange(getStyle(10,4,YELLOW,RED));
- text.replaceTextRange(8,6,"");
- styles = text.getStyleRanges();
- assertTrue(":5:", styles.length == 0);
- text.setText(testString);
- text.setStyleRange(getStyle(10,4,YELLOW,RED));
- text.replaceTextRange(10,6,"");
- styles = text.getStyleRanges();
- assertTrue(":6:", styles.length == 0);
- text.setText(testString);
- text.setStyleRange(getStyle(10,4,YELLOW,RED));
- text.replaceTextRange(8,12,"");
- styles = text.getStyleRanges();
- assertTrue(":7:", styles.length == 0);
-
- // "012345678901234567890123"
- // String testString= "1234 1234 1234 1234 1234";
-
- text.setText(testString);
- text.setStyleRange(getStyle(5,4,BLUE,CYAN));
- text.setStyleRange(getStyle(10,4,YELLOW,RED));
- text.replaceTextRange(5,7,"");
- styles = text.getStyleRanges();
- assertTrue(":8:", styles.length == 1);
- assertTrue(":8:", styles[0].equals(getStyle(5,2,YELLOW,RED)));
- text.setText(testString);
- text.setStyleRange(getStyle(5,4,BLUE,CYAN));
- text.setStyleRange(getStyle(10,4,YELLOW,RED));
- text.replaceTextRange(7,7,"");
- styles = text.getStyleRanges();
- assertTrue(":9:", styles.length == 1);
- assertTrue(":9:", styles[0].equals(getStyle(5,2,BLUE,CYAN)));
-
-
- text.setText(testString);
- text.setStyleRange(getStyle(5,4,BLUE,CYAN));
- text.setStyleRange(getStyle(10,4,YELLOW,RED));
- text.replaceTextRange(2,10,"");
- styles = text.getStyleRanges();
- assertTrue(":10:", styles.length == 1);
- assertTrue(":10:", styles[0].equals(getStyle(2,2,YELLOW,RED)));
- text.setText(testString);
- text.setStyleRange(getStyle(5,4,BLUE,CYAN));
- text.setStyleRange(getStyle(10,4,YELLOW,RED));
- text.replaceTextRange(7,9,"");
- styles = text.getStyleRanges();
- assertTrue(":11:", styles.length == 1);
- assertTrue(":11:", styles[0].equals(getStyle(5,2,BLUE,CYAN)));
-
-
- text.setText(testString);
- text.setStyleRange(getStyle(5,4,BLUE,CYAN));
- text.setStyleRange(getStyle(10,4,YELLOW,RED));
- text.replaceTextRange(5,9,"");
- styles = text.getStyleRanges();
- assertTrue(":12:", styles.length == 0);
- text.setText(testString);
- text.setStyleRange(getStyle(5,4,BLUE,CYAN));
- text.setStyleRange(getStyle(10,4,YELLOW,RED));
- text.replaceTextRange(3,13,"");
- styles = text.getStyleRanges();
- assertTrue(":11:", styles.length == 0);
-
-
- // "012345678901234567890123"
- // String testString= "1234 1234 1234 1234 1234";
-
- text.setText(testString);
- text.setStyleRange(getStyle(5,4,BLUE,CYAN));
- text.setStyleRange(getStyle(10,4,YELLOW,RED));
- text.setStyleRange(getStyle(15,4,GREEN,PURPLE));
- text.replaceTextRange(7,12,"");
- styles = text.getStyleRanges();
- assertTrue(":14:", styles.length == 1);
- assertTrue(":14:", styles[0].equals(getStyle(5,2,BLUE,CYAN)));
- text.setText(testString);
- text.setStyleRange(getStyle(5,4,BLUE,CYAN));
- text.setStyleRange(getStyle(10,4,YELLOW,RED));
- text.setStyleRange(getStyle(15,4,GREEN,PURPLE));
- text.replaceTextRange(5,12,"");
- styles = text.getStyleRanges();
- assertTrue(":15:", styles.length == 1);
- assertTrue(":15:", styles[0].equals(getStyle(5,2,GREEN,PURPLE)));
-
-
- text.setText(testString);
- text.setStyleRange(getStyle(5,4,BLUE,CYAN));
- text.setStyleRange(getStyle(10,4,YELLOW,RED));
- text.setStyleRange(getStyle(15,4,GREEN,PURPLE));
- text.replaceTextRange(9,10,"");
- styles = text.getStyleRanges();
- assertTrue(":16:", styles.length == 1);
- assertTrue(":16:", styles[0].equals(getStyle(5,4,BLUE,CYAN)));
-
-
- // reset the environment
- text.dispose();
- text = new StyledText(shell, SWT.NULL);
- setWidget(text);
-
- StyleRange style1 = getStyle(0,0,null,null);
-
-
- StyleRange style2 = getStyle(0,0,RED,YELLOW);
-
-
- assertTrue(":1:", !style1.equals(style2));
- assertTrue(":1:", !style1.similarTo(style2));
-
-
- assertTrue(":1:", !style2.equals(style1));
-
-
- assertTrue(":1:", !style2.similarTo(style1));
-
-
-
- style1 = getStyle(0,10,RED,YELLOW);
- style2 = getStyle(11,5,RED,YELLOW);
-
-
- assertTrue(":2:", !style1.equals(style2));
-
-
- assertTrue(":2:", !style2.equals(style1));
- assertTrue(":2:", style1.similarTo(style2));
-
-
- assertTrue(":2:", style2.similarTo(style1));
-
-
-}
-
-public void test_setStyleRanges$Lorg_eclipse_swt_custom_StyleRange() {
- boolean exceptionThrown = false;
- StyleRange[] ranges = new StyleRange[] {
- new StyleRange(0, 1, getColor(RED), null),
- new StyleRange(2, 1, getColor(RED), null)};
-
- text.setText("Line0\r\n");
- try {
- text.setStyleRanges(null);
- }
- catch (IllegalArgumentException e) {
- exceptionThrown = true;
- }
- assertTrue(exceptionThrown);
-
- text.setStyleRanges(ranges);
- StyleRange[] currentRanges = text.getStyleRanges();
- assertEquals(ranges.length, currentRanges.length);
- for (int i = 0; i < currentRanges.length; i++) {
- assertEquals(ranges[i], currentRanges[i]);
- }
- text.setStyleRanges(new StyleRange[] {});
- assertEquals(0, text.getStyleRanges().length);
-}
-
-public void test_setTabsI(){
- text.setTabs(1);
- assertTrue(":a:", text.getTabs() == 1);
-
- text.setTabs(8);
- assertTrue(":b:", text.getTabs() == 8);
- text.setText("Line\t1\r\n");
- text.setTabs(7);
- assertTrue(":c:", text.getTabs() == 7);
-}
-
-public void test_setTextLjava_lang_String(){
- boolean exceptionThrown = false;
-
- text.setText("");
- assertEquals("", text.getText());
- text.setText("01234567890");
- assertEquals("01234567890", text.getText());
-
- try {
- text.setText(null);
- }
- catch (IllegalArgumentException e) {
- exceptionThrown = true;
- }
- assertTrue(exceptionThrown);
-
- assertEquals("01234567890", text.getText());
- text.setText("");
- assertEquals("", text.getText());
-}
-
-public void test_setTextLimitI(){
- boolean exceptionThrown = false;
-
- text.setTextLimit(10);
- assertTrue(":a:", text.getTextLimit() == 10);
-
- text.setTextLimit(-1);
- assertTrue(":b:", text.getTextLimit() == -1);
-
- try {
- text.setTextLimit(0);
- }
- catch (IllegalArgumentException e) {
- exceptionThrown = true;
- }
- assertTrue(":c:", exceptionThrown == true);
- exceptionThrown = false;
-}
-
-public void test_setTopIndexI(){
- text.setTopIndex(-1);
- assertTrue(":a:", text.getTopIndex() == 0);
- text.setTopIndex(1);
- assertTrue(":b:", text.getTopIndex() == 0);
-
- text.setText("Line0\r\nLine0a\r\n");
-
- text.setTopIndex(-2);
- assertTrue(":c:", text.getTopIndex() == 0);
- text.setTopIndex(-1);
- assertTrue(":d:", text.getTopIndex() == 0);
- text.setTopIndex(1);
- assertTrue(":e:", text.getTopIndex() == 1);
- text.setTopIndex(2);
- assertTrue(":f:", text.getTopIndex() == 2);
- text.setTopIndex(0);
- assertTrue(":g:", text.getTopIndex() == 0);
- text.setTopIndex(3);
- assertTrue(":h:", text.getTopIndex() == 2);
-
- text.setText("");
- text.setTopIndex(2);
- assertTrue(":i:", text.getTopIndex() == 0);
-}
-public void test_setTopPixelI(){
- int lineHeight = text.getLineHeight();
-
- text.setTopPixel(-1);
- assertTrue(":a:", text.getTopPixel() == 0);
- text.setTopPixel(1);
- assertTrue(":b:", text.getTopPixel() == 0);
-
- text.setText("Line0\r\n");
-
- text.setTopPixel(-2);
- assertTrue(":c:", text.getTopPixel() == 0);
- text.setTopPixel(-1);
- assertTrue(":d:", text.getTopPixel() == 0);
- text.setTopPixel(1);
- assertTrue(":e:", text.getTopPixel() == 1);
- text.setTopPixel(2 * lineHeight);
- assertTrue(":f:", text.getTopPixel() == 2 * lineHeight);
- text.setTopPixel(0);
- assertTrue(":g:", text.getTopPixel() == 0);
- text.setTopPixel(3 * lineHeight);
- assertTrue(":h:", text.getTopPixel() == 2 * lineHeight);
-
- text.setText("");
- text.setTopPixel(2 * lineHeight);
- assertTrue(":i:", text.getTopPixel() == 0);
-}
-public void test_setWordWrapZ(){
- String testString = "Line1\nLine2";
-
- text.setWordWrap(true);
- assertTrue(":a:", text.getWordWrap());
- text.setWordWrap(false);
- assertTrue(":b:", text.getWordWrap() == false);
- text.setWordWrap(false);
- assertTrue(":c:", text.getWordWrap() == false);
- text.setWordWrap(true);
- assertTrue(":d:", text.getWordWrap());
-
- text.setText(testString);
- assertEquals(":e:", testString, text.getText());
- assertEquals(":f:", 2, text.getLineCount());
-}
-
-public void test_showSelection() {
- text.showSelection();
- text.setSelectionRange(0, 0);
- text.showSelection();
- text.setText("Line0\r\n");
- text.showSelection();
- text.setSelectionRange(5, 2);
- text.showSelection();
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_custom_StyledText((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_CompositeI");
- methodNames.addElement("test_addBidiSegmentListenerLorg_eclipse_swt_custom_BidiSegmentListener");
- methodNames.addElement("test_addExtendedModifyListenerLorg_eclipse_swt_custom_ExtendedModifyListener");
- methodNames.addElement("test_addLineBackgroundListenerLorg_eclipse_swt_custom_LineBackgroundListener");
- methodNames.addElement("test_addLineStyleListenerLorg_eclipse_swt_custom_LineStyleListener");
- methodNames.addElement("test_addModifyListenerLorg_eclipse_swt_events_ModifyListener");
- methodNames.addElement("test_addSelectionListenerLorg_eclipse_swt_events_SelectionListener");
- methodNames.addElement("test_addVerifyKeyListenerLorg_eclipse_swt_custom_VerifyKeyListener");
- methodNames.addElement("test_addVerifyListenerLorg_eclipse_swt_events_VerifyListener");
- methodNames.addElement("test_appendLjava_lang_String");
- methodNames.addElement("test_computeSizeIIZ");
- methodNames.addElement("test_copy");
- methodNames.addElement("test_cut");
- methodNames.addElement("test_getBackground");
- methodNames.addElement("test_getBidiColoring");
- methodNames.addElement("test_getCaretOffset");
- methodNames.addElement("test_getCharCount");
- methodNames.addElement("test_getContent");
- methodNames.addElement("test_getDoubleClickEnabled");
- methodNames.addElement("test_getEditable");
- methodNames.addElement("test_getForeground");
- methodNames.addElement("test_getHorizontalIndex");
- methodNames.addElement("test_getHorizontalPixel");
- methodNames.addElement("test_getKeyBindingI");
- methodNames.addElement("test_getLineAtOffsetI");
- methodNames.addElement("test_getLineBackgroundI");
- methodNames.addElement("test_getLineCount");
- methodNames.addElement("test_getLineDelimiter");
- methodNames.addElement("test_getLineHeight");
- methodNames.addElement("test_getLocationAtOffsetI");
- methodNames.addElement("test_getOffsetAtLineI");
- methodNames.addElement("test_getOffsetAtLocationLorg_eclipse_swt_graphics_Point");
- methodNames.addElement("test_getOrientation");
- methodNames.addElement("test_getSelection");
- methodNames.addElement("test_getSelectionBackground");
- methodNames.addElement("test_getSelectionCount");
- methodNames.addElement("test_getSelectionForeground");
- methodNames.addElement("test_getSelectionRange");
- methodNames.addElement("test_getSelectionText");
- methodNames.addElement("test_getStyle");
- methodNames.addElement("test_getStyleRangeAtOffsetI");
- methodNames.addElement("test_getStyleRanges");
- methodNames.addElement("test_getStyleRangesII");
- methodNames.addElement("test_getTabs");
- methodNames.addElement("test_getText");
- methodNames.addElement("test_getTextII");
- methodNames.addElement("test_getTextLimit");
- methodNames.addElement("test_getTextRangeII");
- methodNames.addElement("test_getTopIndex");
- methodNames.addElement("test_getTopPixel");
- methodNames.addElement("test_getWordWrap");
- methodNames.addElement("test_insertLjava_lang_String");
- methodNames.addElement("test_invokeActionI");
- methodNames.addElement("test_paste");
- methodNames.addElement("test_print");
- methodNames.addElement("test_printLorg_eclipse_swt_printing_Printer");
- methodNames.addElement("test_printLorg_eclipse_swt_printing_PrinterLorg_eclipse_swt_custom_StyledTextPrintOptions");
- methodNames.addElement("test_redraw");
- methodNames.addElement("test_redrawIIIIZ");
- methodNames.addElement("test_redrawRangeIIZ");
- methodNames.addElement("test_removeBidiSegmentListenerLorg_eclipse_swt_custom_BidiSegmentListener");
- methodNames.addElement("test_removeExtendedModifyListenerLorg_eclipse_swt_custom_ExtendedModifyListener");
- methodNames.addElement("test_removeLineBackgroundListenerLorg_eclipse_swt_custom_LineBackgroundListener");
- methodNames.addElement("test_removeLineStyleListenerLorg_eclipse_swt_custom_LineStyleListener");
- methodNames.addElement("test_removeModifyListenerLorg_eclipse_swt_events_ModifyListener");
- methodNames.addElement("test_removeSelectionListenerLorg_eclipse_swt_events_SelectionListener");
- methodNames.addElement("test_removeVerifyKeyListenerLorg_eclipse_swt_custom_VerifyKeyListener");
- methodNames.addElement("test_removeVerifyListenerLorg_eclipse_swt_events_VerifyListener");
- methodNames.addElement("test_replaceStyleRangesII$Lorg_eclipse_swt_custom_StyleRange");
- methodNames.addElement("test_replaceTextRangeIILjava_lang_String");
- methodNames.addElement("test_selectAll");
- methodNames.addElement("test_setBackgroundLorg_eclipse_swt_graphics_Color");
- methodNames.addElement("test_setBidiColoringZ");
- methodNames.addElement("test_setCaretLorg_eclipse_swt_widgets_Caret");
- methodNames.addElement("test_setCaretOffsetI");
- methodNames.addElement("test_setContentLorg_eclipse_swt_custom_StyledTextContent");
- methodNames.addElement("test_setCursorLorg_eclipse_swt_graphics_Cursor");
- methodNames.addElement("test_setDoubleClickEnabledZ");
- methodNames.addElement("test_setEditableZ");
- methodNames.addElement("test_setFontLorg_eclipse_swt_graphics_Font");
- methodNames.addElement("test_setForegroundLorg_eclipse_swt_graphics_Color");
- methodNames.addElement("test_setHorizontalIndexI");
- methodNames.addElement("test_setHorizontalPixelI");
- methodNames.addElement("test_setKeyBindingII");
- methodNames.addElement("test_setLineBackgroundIILorg_eclipse_swt_graphics_Color");
- methodNames.addElement("test_setOrientationI");
- methodNames.addElement("test_setSelectionBackgroundLorg_eclipse_swt_graphics_Color");
- methodNames.addElement("test_setSelectionForegroundLorg_eclipse_swt_graphics_Color");
- methodNames.addElement("test_setSelectionI");
- methodNames.addElement("test_setSelectionII");
- methodNames.addElement("test_setSelectionLorg_eclipse_swt_graphics_Point");
- methodNames.addElement("test_setSelectionRangeII");
- methodNames.addElement("test_setStyleRangeLorg_eclipse_swt_custom_StyleRange");
- methodNames.addElement("test_setStyleRanges$Lorg_eclipse_swt_custom_StyleRange");
- methodNames.addElement("test_setTabsI");
- methodNames.addElement("test_setTextLimitI");
- methodNames.addElement("test_setTextLjava_lang_String");
- methodNames.addElement("test_setTopIndexI");
- methodNames.addElement("test_setTopPixelI");
- methodNames.addElement("test_setWordWrapZ");
- methodNames.addElement("test_showSelection");
- methodNames.addAll(Test_org_eclipse_swt_widgets_Canvas.methodNames()); // add superclass method names
- return methodNames;
-}
-
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_CompositeI")) test_ConstructorLorg_eclipse_swt_widgets_CompositeI();
- else if (getName().equals("test_addBidiSegmentListenerLorg_eclipse_swt_custom_BidiSegmentListener")) test_addBidiSegmentListenerLorg_eclipse_swt_custom_BidiSegmentListener();
- else if (getName().equals("test_addExtendedModifyListenerLorg_eclipse_swt_custom_ExtendedModifyListener")) test_addExtendedModifyListenerLorg_eclipse_swt_custom_ExtendedModifyListener();
- else if (getName().equals("test_addLineBackgroundListenerLorg_eclipse_swt_custom_LineBackgroundListener")) test_addLineBackgroundListenerLorg_eclipse_swt_custom_LineBackgroundListener();
- else if (getName().equals("test_addLineStyleListenerLorg_eclipse_swt_custom_LineStyleListener")) test_addLineStyleListenerLorg_eclipse_swt_custom_LineStyleListener();
- else if (getName().equals("test_addModifyListenerLorg_eclipse_swt_events_ModifyListener")) test_addModifyListenerLorg_eclipse_swt_events_ModifyListener();
- else if (getName().equals("test_addSelectionListenerLorg_eclipse_swt_events_SelectionListener")) test_addSelectionListenerLorg_eclipse_swt_events_SelectionListener();
- else if (getName().equals("test_addVerifyKeyListenerLorg_eclipse_swt_custom_VerifyKeyListener")) test_addVerifyKeyListenerLorg_eclipse_swt_custom_VerifyKeyListener();
- else if (getName().equals("test_addVerifyListenerLorg_eclipse_swt_events_VerifyListener")) test_addVerifyListenerLorg_eclipse_swt_events_VerifyListener();
- else if (getName().equals("test_appendLjava_lang_String")) test_appendLjava_lang_String();
- else if (getName().equals("test_computeSizeIIZ")) test_computeSizeIIZ();
- else if (getName().equals("test_copy")) test_copy();
- else if (getName().equals("test_cut")) test_cut();
- else if (getName().equals("test_getBackground")) test_getBackground();
- else if (getName().equals("test_getBidiColoring")) test_getBidiColoring();
- else if (getName().equals("test_getCaretOffset")) test_getCaretOffset();
- else if (getName().equals("test_getCharCount")) test_getCharCount();
- else if (getName().equals("test_getContent")) test_getContent();
- else if (getName().equals("test_getDoubleClickEnabled")) test_getDoubleClickEnabled();
- else if (getName().equals("test_getEditable")) test_getEditable();
- else if (getName().equals("test_getForeground")) test_getForeground();
- else if (getName().equals("test_getHorizontalIndex")) test_getHorizontalIndex();
- else if (getName().equals("test_getHorizontalPixel")) test_getHorizontalPixel();
- else if (getName().equals("test_getKeyBindingI")) test_getKeyBindingI();
- else if (getName().equals("test_getLineAtOffsetI")) test_getLineAtOffsetI();
- else if (getName().equals("test_getLineBackgroundI")) test_getLineBackgroundI();
- else if (getName().equals("test_getLineCount")) test_getLineCount();
- else if (getName().equals("test_getLineDelimiter")) test_getLineDelimiter();
- else if (getName().equals("test_getLineHeight")) test_getLineHeight();
- else if (getName().equals("test_getLocationAtOffsetI")) test_getLocationAtOffsetI();
- else if (getName().equals("test_getOffsetAtLineI")) test_getOffsetAtLineI();
- else if (getName().equals("test_getOffsetAtLocationLorg_eclipse_swt_graphics_Point")) test_getOffsetAtLocationLorg_eclipse_swt_graphics_Point();
- else if (getName().equals("test_getOrientation")) test_getOrientation();
- else if (getName().equals("test_getSelection")) test_getSelection();
- else if (getName().equals("test_getSelectionBackground")) test_getSelectionBackground();
- else if (getName().equals("test_getSelectionCount")) test_getSelectionCount();
- else if (getName().equals("test_getSelectionForeground")) test_getSelectionForeground();
- else if (getName().equals("test_getSelectionRange")) test_getSelectionRange();
- else if (getName().equals("test_getSelectionText")) test_getSelectionText();
- else if (getName().equals("test_getStyle")) test_getStyle();
- else if (getName().equals("test_getStyleRangeAtOffsetI")) test_getStyleRangeAtOffsetI();
- else if (getName().equals("test_getStyleRanges")) test_getStyleRanges();
- else if (getName().equals("test_getStyleRangesII")) test_getStyleRangesII();
- else if (getName().equals("test_getTabs")) test_getTabs();
- else if (getName().equals("test_getText")) test_getText();
- else if (getName().equals("test_getTextII")) test_getTextII();
- else if (getName().equals("test_getTextLimit")) test_getTextLimit();
- else if (getName().equals("test_getTextRangeII")) test_getTextRangeII();
- else if (getName().equals("test_getTopIndex")) test_getTopIndex();
- else if (getName().equals("test_getTopPixel")) test_getTopPixel();
- else if (getName().equals("test_getWordWrap")) test_getWordWrap();
- else if (getName().equals("test_insertLjava_lang_String")) test_insertLjava_lang_String();
- else if (getName().equals("test_invokeActionI")) test_invokeActionI();
- else if (getName().equals("test_paste")) test_paste();
- else if (getName().equals("test_print")) test_print();
- else if (getName().equals("test_printLorg_eclipse_swt_printing_Printer")) test_printLorg_eclipse_swt_printing_Printer();
- else if (getName().equals("test_printLorg_eclipse_swt_printing_PrinterLorg_eclipse_swt_custom_StyledTextPrintOptions")) test_printLorg_eclipse_swt_printing_PrinterLorg_eclipse_swt_custom_StyledTextPrintOptions();
- else if (getName().equals("test_redraw")) test_redraw();
- else if (getName().equals("test_redrawIIIIZ")) test_redrawIIIIZ();
- else if (getName().equals("test_redrawRangeIIZ")) test_redrawRangeIIZ();
- else if (getName().equals("test_removeBidiSegmentListenerLorg_eclipse_swt_custom_BidiSegmentListener")) test_removeBidiSegmentListenerLorg_eclipse_swt_custom_BidiSegmentListener();
- else if (getName().equals("test_removeExtendedModifyListenerLorg_eclipse_swt_custom_ExtendedModifyListener")) test_removeExtendedModifyListenerLorg_eclipse_swt_custom_ExtendedModifyListener();
- else if (getName().equals("test_removeLineBackgroundListenerLorg_eclipse_swt_custom_LineBackgroundListener")) test_removeLineBackgroundListenerLorg_eclipse_swt_custom_LineBackgroundListener();
- else if (getName().equals("test_removeLineStyleListenerLorg_eclipse_swt_custom_LineStyleListener")) test_removeLineStyleListenerLorg_eclipse_swt_custom_LineStyleListener();
- else if (getName().equals("test_removeModifyListenerLorg_eclipse_swt_events_ModifyListener")) test_removeModifyListenerLorg_eclipse_swt_events_ModifyListener();
- else if (getName().equals("test_removeSelectionListenerLorg_eclipse_swt_events_SelectionListener")) test_removeSelectionListenerLorg_eclipse_swt_events_SelectionListener();
- else if (getName().equals("test_removeVerifyKeyListenerLorg_eclipse_swt_custom_VerifyKeyListener")) test_removeVerifyKeyListenerLorg_eclipse_swt_custom_VerifyKeyListener();
- else if (getName().equals("test_removeVerifyListenerLorg_eclipse_swt_events_VerifyListener")) test_removeVerifyListenerLorg_eclipse_swt_events_VerifyListener();
- else if (getName().equals("test_replaceStyleRangesII$Lorg_eclipse_swt_custom_StyleRange")) test_replaceStyleRangesII$Lorg_eclipse_swt_custom_StyleRange();
- else if (getName().equals("test_replaceTextRangeIILjava_lang_String")) test_replaceTextRangeIILjava_lang_String();
- else if (getName().equals("test_selectAll")) test_selectAll();
- else if (getName().equals("test_setBackgroundLorg_eclipse_swt_graphics_Color")) test_setBackgroundLorg_eclipse_swt_graphics_Color();
- else if (getName().equals("test_setBidiColoringZ")) test_setBidiColoringZ();
- else if (getName().equals("test_setCaretLorg_eclipse_swt_widgets_Caret")) test_setCaretLorg_eclipse_swt_widgets_Caret();
- else if (getName().equals("test_setCaretOffsetI")) test_setCaretOffsetI();
- else if (getName().equals("test_setContentLorg_eclipse_swt_custom_StyledTextContent")) test_setContentLorg_eclipse_swt_custom_StyledTextContent();
- else if (getName().equals("test_setCursorLorg_eclipse_swt_graphics_Cursor")) test_setCursorLorg_eclipse_swt_graphics_Cursor();
- else if (getName().equals("test_setDoubleClickEnabledZ")) test_setDoubleClickEnabledZ();
- else if (getName().equals("test_setEditableZ")) test_setEditableZ();
- else if (getName().equals("test_setFontLorg_eclipse_swt_graphics_Font")) test_setFontLorg_eclipse_swt_graphics_Font();
- else if (getName().equals("test_setForegroundLorg_eclipse_swt_graphics_Color")) test_setForegroundLorg_eclipse_swt_graphics_Color();
- else if (getName().equals("test_setHorizontalIndexI")) test_setHorizontalIndexI();
- else if (getName().equals("test_setHorizontalPixelI")) test_setHorizontalPixelI();
- else if (getName().equals("test_setKeyBindingII")) test_setKeyBindingII();
- else if (getName().equals("test_setLineBackgroundIILorg_eclipse_swt_graphics_Color")) test_setLineBackgroundIILorg_eclipse_swt_graphics_Color();
- else if (getName().equals("test_setOrientationI")) test_setOrientationI();
- else if (getName().equals("test_setSelectionBackgroundLorg_eclipse_swt_graphics_Color")) test_setSelectionBackgroundLorg_eclipse_swt_graphics_Color();
- else if (getName().equals("test_setSelectionForegroundLorg_eclipse_swt_graphics_Color")) test_setSelectionForegroundLorg_eclipse_swt_graphics_Color();
- else if (getName().equals("test_setSelectionI")) test_setSelectionI();
- else if (getName().equals("test_setSelectionII")) test_setSelectionII();
- else if (getName().equals("test_setSelectionLorg_eclipse_swt_graphics_Point")) test_setSelectionLorg_eclipse_swt_graphics_Point();
- else if (getName().equals("test_setSelectionRangeII")) test_setSelectionRangeII();
- else if (getName().equals("test_setStyleRangeLorg_eclipse_swt_custom_StyleRange")) test_setStyleRangeLorg_eclipse_swt_custom_StyleRange();
- else if (getName().equals("test_setStyleRanges$Lorg_eclipse_swt_custom_StyleRange")) test_setStyleRanges$Lorg_eclipse_swt_custom_StyleRange();
- else if (getName().equals("test_setTabsI")) test_setTabsI();
- else if (getName().equals("test_setTextLimitI")) test_setTextLimitI();
- else if (getName().equals("test_setTextLjava_lang_String")) test_setTextLjava_lang_String();
- else if (getName().equals("test_setTopIndexI")) test_setTopIndexI();
- else if (getName().equals("test_setTopPixelI")) test_setTopPixelI();
- else if (getName().equals("test_setWordWrapZ")) test_setWordWrapZ();
- else if (getName().equals("test_showSelection")) test_showSelection();
- else super.runTest();
-}
-/**
- * Regression test for bug 19985
- */
-protected void testRtfCopy() {
- String lines = "Line0\nLine1\nLine2\nLine3\nLine4\nLine5";
- final int[] linesCalled = new int[] {0};
- LineStyleListener listener = new LineStyleListener() {
- public void lineGetStyle(LineStyleEvent event) {
- Display display = Display.getDefault();
- Color red = display.getSystemColor(SWT.COLOR_RED);
- StyledText styledText = (StyledText) event.widget;
- int lineIndex = styledText.getLineAtOffset(event.lineOffset);
- int lineStart = event.lineOffset;
- int lineEnd = lineStart + event.lineText.length();
- StyleRange goodRange = new StyleRange(0, 1, red, red);
-
- event.styles = new StyleRange[2];
- switch (lineIndex % 6) {
- case 0:
- event.styles[0] = goodRange;
- event.styles[1] = new StyleRange(lineEnd, 1, red, red);
- linesCalled[0]++;
- break;
- case 1:
- event.styles[0] = goodRange;
- event.styles[1] = new StyleRange(lineEnd, -1, red, red);
- linesCalled[0]++;
- break;
- case 2:
- event.styles[0] = goodRange;
- event.styles[1] = new StyleRange(lineEnd - 1, -1, red, red);
- linesCalled[0]++;
- break;
- case 3:
- event.styles[0] = goodRange;
- event.styles[1] = new StyleRange(lineStart, -1, red, red);
- linesCalled[0]++;
- break;
- case 4:
- event.styles[0] = new StyleRange(lineStart, 1, red, red);
- event.styles[1] = new StyleRange(lineStart, -1, red, red);
- linesCalled[0]++;
- break;
- case 5:
- event.styles[0] = new StyleRange(lineEnd / 2, 1, red, red);
- event.styles[1] = new StyleRange(lineEnd / 2, -1, red, red);
- linesCalled[0]++;
- break;
- }
- }
- };
- text.setText(lines);
- // cause StyledText to call the listener.
- text.setSelection(0, text.getCharCount());
- text.addLineStyleListener(listener);
- text.copy();
- assertTrue("not all lines tested for RTF copy", linesCalled[0] == text.getLineCount());
-
- Clipboard clipboard = new Clipboard(text.getDisplay());
- RTFTransfer rtfTranfer = RTFTransfer.getInstance();
- String clipboardText = (String) clipboard.getContents(rtfTranfer);
- assertTrue("RTF copy failed", clipboardText.length() > 0);
-
- clipboard.dispose();
- text.removeLineStyleListener(listener);
-}
-
-}
-
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_StyledTextContent.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_StyledTextContent.java
deleted file mode 100644
index 1c47b98d9c..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_StyledTextContent.java
+++ /dev/null
@@ -1,178 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import junit.framework.*;
-import junit.textui.*;
-import org.eclipse.swt.*;
-import org.eclipse.swt.custom.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.internal.BidiUtil;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.custom.StyledTextContent
- *
- * @see org.eclipse.swt.custom.StyledTextContent
- */
-public class Test_org_eclipse_swt_custom_StyledTextContent extends SwtTestCase {
- int XINSET = 0;
-
- class ContentImplementation implements StyledTextContent {
- String textContent = "";
-
- public void addTextChangeListener(TextChangeListener listener){
- }
- public int getCharCount() {
- return 0;
- }
- public String getLine(int lineIndex) {
- return "getLine";
- }
- public int getLineAtOffset(int offset) {
- return 0;
- }
- public int getLineCount() {
- return 0;
- }
- public String getLineDelimiter() {
- return "getLineDelimiter";
- }
- public int getOffsetAtLine(int lineIndex) {
- return 0;
- }
- public String getTextRange(int start, int length) {
- return textContent;
- }
- public void removeTextChangeListener(TextChangeListener listener) {
- }
- public void replaceTextRange(int start, int replaceLength, String text) {
- textContent = text;
- }
- public void setText(String text) {
- textContent = text;
- }
- }
- StyledTextContent content = new ContentImplementation();
- Shell shell;
- StyledText styledText;
-
-public Test_org_eclipse_swt_custom_StyledTextContent(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-private boolean isBidi() {
- return BidiUtil.isBidiPlatform();
-}
-protected void setUp() {
- if (isBidi()) XINSET = 3;
- else XINSET = 0;
- shell = new Shell();
- styledText = new StyledText(shell, SWT.NULL);
- styledText.setContent(content);
-}
-
-protected void tearDown() {
-}
-
-public void test_addTextChangeListenerLorg_eclipse_swt_custom_TextChangeListener() {
- // does not make sense to test, not called by StyledText
-}
-
-public void test_getCharCount() {
- assertTrue(":a:", styledText.getCharCount() == 0);
-}
-
-public void test_getLineAtOffsetI() {
- assertTrue(":c:", styledText.getLineAtOffset(0) == 0);
-}
-
-public void test_getLineCount() {
- assertTrue(":d:", styledText.getLineCount() == 1);
-}
-
-public void test_getLineDelimiter() {
- assertTrue(":e:", styledText.getLineDelimiter().equals("getLineDelimiter"));
-}
-
-public void test_getLineI() {
- // will indirectly cause getLine to be called
- assertTrue(":b:", styledText.getLocationAtOffset(0).equals(new Point(XINSET,0)));
-}
-
-public void test_getOffsetAtLineI() {
- // will indirectly cause getOffsetAtLine to be called
- assertTrue(":f:", styledText.getLocationAtOffset(0).equals(new Point(XINSET,0)));
-}
-
-public void test_getTextRangeII() {
- assertTrue(":g:", styledText.getTextRange(0,0).equals(""));
-}
-
-public void test_removeTextChangeListenerLorg_eclipse_swt_custom_TextChangeListener() {
- // does not make sense to test, not called by StyledText
-}
-
-public void test_replaceTextRangeIILjava_lang_String() {
- styledText.replaceTextRange(0,0,"test1");
- assertTrue(":h:", styledText.getText().equals("test1"));
-}
-
-public void test_setTextLjava_lang_String() {
- styledText.replaceTextRange(0,0,"test2");
- assertTrue(":i:", styledText.getText().equals("test2"));
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_custom_StyledTextContent((String)e.nextElement()));
- }
- return suite;
-}
-
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_addTextChangeListenerLorg_eclipse_swt_custom_TextChangeListener");
- methodNames.addElement("test_getCharCount");
- methodNames.addElement("test_getLineAtOffsetI");
- methodNames.addElement("test_getLineCount");
- methodNames.addElement("test_getLineDelimiter");
- methodNames.addElement("test_getLineI");
- methodNames.addElement("test_getOffsetAtLineI");
- methodNames.addElement("test_getTextRangeII");
- methodNames.addElement("test_removeTextChangeListenerLorg_eclipse_swt_custom_TextChangeListener");
- methodNames.addElement("test_replaceTextRangeIILjava_lang_String");
- methodNames.addElement("test_setTextLjava_lang_String");
- return methodNames;
-}
-
-protected void runTest() throws Throwable {
- if (getName().equals("test_addTextChangeListenerLorg_eclipse_swt_custom_TextChangeListener")) test_addTextChangeListenerLorg_eclipse_swt_custom_TextChangeListener();
- else if (getName().equals("test_getCharCount")) test_getCharCount();
- else if (getName().equals("test_getLineAtOffsetI")) test_getLineAtOffsetI();
- else if (getName().equals("test_getLineCount")) test_getLineCount();
- else if (getName().equals("test_getLineDelimiter")) test_getLineDelimiter();
- else if (getName().equals("test_getLineI")) test_getLineI();
- else if (getName().equals("test_getOffsetAtLineI")) test_getOffsetAtLineI();
- else if (getName().equals("test_getTextRangeII")) test_getTextRangeII();
- else if (getName().equals("test_removeTextChangeListenerLorg_eclipse_swt_custom_TextChangeListener")) test_removeTextChangeListenerLorg_eclipse_swt_custom_TextChangeListener();
- else if (getName().equals("test_replaceTextRangeIILjava_lang_String")) test_replaceTextRangeIILjava_lang_String();
- else if (getName().equals("test_setTextLjava_lang_String")) test_setTextLjava_lang_String();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_TableCursor.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_TableCursor.java
deleted file mode 100644
index 2a85c917f3..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_TableCursor.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.custom.TableCursor
- *
- * @see org.eclipse.swt.custom.TableCursor
- */
-public class Test_org_eclipse_swt_custom_TableCursor extends Test_org_eclipse_swt_widgets_Canvas {
-
-public Test_org_eclipse_swt_custom_TableCursor(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- super.setUp();
-}
-
-protected void tearDown() {
- super.tearDown();
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_TableI() {
- warnUnimpl("Test test_ConstructorLorg_eclipse_swt_widgets_TableI not written");
-}
-
-public void test_addSelectionListenerLorg_eclipse_swt_events_SelectionListener() {
- warnUnimpl("Test test_addSelectionListenerLorg_eclipse_swt_events_SelectionListener not written");
-}
-
-public void test_getColumn() {
- warnUnimpl("Test test_getColumn not written");
-}
-
-public void test_getRow() {
- warnUnimpl("Test test_getRow not written");
-}
-
-public void test_setSelectionII() {
- warnUnimpl("Test test_setSelectionII not written");
-}
-
-public void test_setSelectionLorg_eclipse_swt_widgets_TableItemI() {
- warnUnimpl("Test test_setSelectionLorg_eclipse_swt_widgets_TableItemI not written");
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_custom_TableCursor((String)e.nextElement()));
- }
- return suite;
-}
-
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_TableI");
- methodNames.addElement("test_addSelectionListenerLorg_eclipse_swt_events_SelectionListener");
- methodNames.addElement("test_getColumn");
- methodNames.addElement("test_getRow");
- methodNames.addElement("test_setSelectionII");
- methodNames.addElement("test_setSelectionLorg_eclipse_swt_widgets_TableItemI");
- methodNames.addAll(Test_org_eclipse_swt_widgets_Canvas.methodNames()); // add superclass method names
- return methodNames;
-}
-
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_TableI")) test_ConstructorLorg_eclipse_swt_widgets_TableI();
- else if (getName().equals("test_addSelectionListenerLorg_eclipse_swt_events_SelectionListener")) test_addSelectionListenerLorg_eclipse_swt_events_SelectionListener();
- else if (getName().equals("test_getColumn")) test_getColumn();
- else if (getName().equals("test_getRow")) test_getRow();
- else if (getName().equals("test_setSelectionII")) test_setSelectionII();
- else if (getName().equals("test_setSelectionLorg_eclipse_swt_widgets_TableItemI")) test_setSelectionLorg_eclipse_swt_widgets_TableItemI();
- else super.runTest();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_TableEditor.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_TableEditor.java
deleted file mode 100644
index 80ddf3a4b5..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_TableEditor.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.custom.TableEditor
- *
- * @see org.eclipse.swt.custom.TableEditor
- */
-public class Test_org_eclipse_swt_custom_TableEditor extends Test_org_eclipse_swt_custom_ControlEditor {
-
-public Test_org_eclipse_swt_custom_TableEditor(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- super.setUp();
-}
-
-protected void tearDown() {
- super.tearDown();
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_Table() {
- warnUnimpl("Test test_ConstructorLorg_eclipse_swt_widgets_Table not written");
-}
-
-public void test_dispose() {
- warnUnimpl("Test test_dispose not written");
-}
-
-public void test_getColumn() {
- warnUnimpl("Test test_getColumn not written");
-}
-
-public void test_getItem() {
- warnUnimpl("Test test_getItem not written");
-}
-
-public void test_setColumnI() {
- warnUnimpl("Test test_setColumnI not written");
-}
-
-public void test_setEditorLorg_eclipse_swt_widgets_ControlLorg_eclipse_swt_widgets_TableItemI() {
- warnUnimpl("Test test_setEditorLorg_eclipse_swt_widgets_ControlLorg_eclipse_swt_widgets_TableItemI not written");
-}
-
-public void test_setItemLorg_eclipse_swt_widgets_TableItem() {
- warnUnimpl("Test test_setItemLorg_eclipse_swt_widgets_TableItem not written");
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_custom_TableEditor((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_Table");
- methodNames.addElement("test_dispose");
- methodNames.addElement("test_getColumn");
- methodNames.addElement("test_getItem");
- methodNames.addElement("test_setColumnI");
- methodNames.addElement("test_setEditorLorg_eclipse_swt_widgets_ControlLorg_eclipse_swt_widgets_TableItemI");
- methodNames.addElement("test_setItemLorg_eclipse_swt_widgets_TableItem");
- methodNames.addAll(Test_org_eclipse_swt_custom_ControlEditor.methodNames()); // add superclass method names
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_Table")) test_ConstructorLorg_eclipse_swt_widgets_Table();
- else if (getName().equals("test_dispose")) test_dispose();
- else if (getName().equals("test_getColumn")) test_getColumn();
- else if (getName().equals("test_getItem")) test_getItem();
- else if (getName().equals("test_setColumnI")) test_setColumnI();
- else if (getName().equals("test_setEditorLorg_eclipse_swt_widgets_ControlLorg_eclipse_swt_widgets_TableItemI")) test_setEditorLorg_eclipse_swt_widgets_ControlLorg_eclipse_swt_widgets_TableItemI();
- else if (getName().equals("test_setItemLorg_eclipse_swt_widgets_TableItem")) test_setItemLorg_eclipse_swt_widgets_TableItem();
- else super.runTest();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_TableTree.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_TableTree.java
deleted file mode 100644
index 0bd3e8d980..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_TableTree.java
+++ /dev/null
@@ -1,334 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import junit.framework.*;
-import junit.textui.*;
-import org.eclipse.swt.*;
-import org.eclipse.swt.custom.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.custom.TableTree
- *
- * @see org.eclipse.swt.custom.TableTree
- */
-public class Test_org_eclipse_swt_custom_TableTree extends Test_org_eclipse_swt_widgets_Composite {
-
-public Test_org_eclipse_swt_custom_TableTree(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- super.setUp();
- tableTree = new TableTree(shell, style = SWT.MULTI);
- setWidget(tableTree);
-}
-
-protected void tearDown() {
- super.tearDown();
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_CompositeI() {
- warnUnimpl("Test test_ConstructorLorg_eclipse_swt_widgets_CompositeI not written");
-}
-
-public void test_addSelectionListenerLorg_eclipse_swt_events_SelectionListener() {
- warnUnimpl("Test test_addSelectionListenerLorg_eclipse_swt_events_SelectionListener not written");
-}
-
-public void test_addTreeListenerLorg_eclipse_swt_events_TreeListener() {
- warnUnimpl("Test test_addTreeListenerLorg_eclipse_swt_events_TreeListener not written");
-}
-
-public void test_deselectAll() {
- warnUnimpl("Test test_deselectAll not written");
-}
-
-public void test_getItemCount() {
- warnUnimpl("Test test_getItemCount not written");
-}
-
-public void test_getItemHeight() {
- warnUnimpl("Test test_getItemHeight not written");
-}
-
-public void test_getItemLorg_eclipse_swt_graphics_Point() {
- warnUnimpl("Test test_getItemLorg_eclipse_swt_graphics_Point not written");
-}
-
-public void test_getItems() {
- warnUnimpl("Test test_getItems not written");
-}
-
-public void test_getSelection() {
- int number = 8;
- TableTreeItem[] items = new TableTreeItem[number];
- for (int i = 0; i < number; i++) {
- items[i] = new TableTreeItem(tableTree, SWT.NONE);
- }
- assertEquals("MULTI: After adding items, but before selecting any", new TableTreeItem[] {}, tableTree.getSelection());
-
- // getSelection() is further tested in test_selectAll and test_setSelection$Lorg_eclipse_swt_custom_TableTreeItem
-}
-
-public void test_getSelectionCount() {
- int number = 8;
- TableTreeItem[] items = new TableTreeItem[number];
- for (int i = 0; i < number; i++) {
- items[i] = new TableTreeItem(tableTree, SWT.NONE);
- }
- assertEquals("MULTI: After adding items, but before selecting any", 0, tableTree.getSelectionCount());
-
- // getSelectionCount() is further tested in test_selectAll and test_setSelection$Lorg_eclipse_swt_custom_TableTreeItem
-}
-
-public void test_getTable() {
- warnUnimpl("Test test_getTable not written");
-}
-
-public void test_indexOfLorg_eclipse_swt_custom_TableTreeItem() {
- warnUnimpl("Test test_indexOfLorg_eclipse_swt_custom_TableTreeItem not written");
-}
-
-public void test_removeAll() {
- warnUnimpl("Test test_removeAll not written");
-}
-
-public void test_removeSelectionListenerLorg_eclipse_swt_events_SelectionListener() {
- warnUnimpl("Test test_removeSelectionListenerLorg_eclipse_swt_events_SelectionListener not written");
-}
-
-public void test_removeTreeListenerLorg_eclipse_swt_events_TreeListener() {
- warnUnimpl("Test test_removeTreeListenerLorg_eclipse_swt_events_TreeListener not written");
-}
-
-public void test_getChildren() {
- /* Overriding test_getChildren from Test_org_eclipse_swt_widgets_Composite
- * to do nothing, because the child of a TableTree is always a Table.
- */
-}
-
-public void test_selectAll() {
- /* FUTURE: Should also add sub-nodes, and test both single and multi with those.
- * i.e. subitems[i] = new TableTreeItem(items[i], SWT.NONE); */
-
- selectAll_helper("Empty table tree", new TableTreeItem[] {});
-
- int number = 8;
- TableTreeItem[] items = new TableTreeItem[number];
- for (int i = 0; i < number; i++) {
- items[i] = new TableTreeItem(tableTree, SWT.NONE);
- }
- selectAll_helper("selectAll()", items);
-
-
- /* Now run the same tests on a single-select TableTree. */
- singleSelect();
- selectAll_helper("Empty table tree", new TableTreeItem[] {});
-
- items = new TableTreeItem[number];
- for (int i = 0; i < number; i++) {
- items[i] = new TableTreeItem(tableTree, SWT.NONE);
- }
- selectAll_helper("selectAll()", new TableTreeItem[] {});
-}
-
-public void test_setSelection$Lorg_eclipse_swt_custom_TableTreeItem() {
- /* FUTURE: Should also add sub-nodes, and test both single and multi with those.
- * i.e. subitems[i] = new TableTreeItem(items[i], SWT.NONE); */
-
- setSelection_helper("Select no items in empty table tree", new TableTreeItem[] {}, new TableTreeItem[] {});
- try {
- tableTree.setSelection((TableTreeItem[]) null);
- fail("MULTI: No exception thrown for selecting null in empty table tree");
- }
- catch (IllegalArgumentException e) {
- }
-
- int number = 8;
- TableTreeItem[] items = new TableTreeItem[number];
- for (int i = 0; i < number; i++) {
- items[i] = new TableTreeItem(tableTree, 0);
- }
-
- setSelection_helper("Select no items in table tree with items", new TableTreeItem[] {}, new TableTreeItem[] {});
- try {
- tableTree.setSelection((TableTreeItem[]) null);
- fail("MULTI: No exception thrown for selecting null in table tree with items");
- }
- catch (IllegalArgumentException e) {
- }
-
- for (int i = 0; i < number; i++) {
- setSelection_helper("Select item " + i, new TableTreeItem[] {items[i]}, new TableTreeItem[] {items[i]});
- }
- setSelection_helper("Select items", items, items);
- setSelection_helper("Select tableTree.getItems()", tableTree.getItems(), tableTree.getItems());
- setSelection_helper("Select 2 contiguous items", new TableTreeItem[] {items[0], items[1]}, new TableTreeItem[] {items[0], items[1]});
- setSelection_helper("Select 2 non-contiguous items", new TableTreeItem[] {items[3], items[6]}, new TableTreeItem[] {items[3], items[6]});
- setSelection_helper("Select 3 contiguous items", new TableTreeItem[] {items[2], items[3], items[4]}, new TableTreeItem[] {items[2], items[3], items[4]});
- setSelection_helper("Select 3 non-contiguous items", new TableTreeItem[] {items[2], items[5], items[7]}, new TableTreeItem[] {items[2], items[5], items[7]});
- setSelection_helper("Select 3 unordered contiguous items", new TableTreeItem[] {items[4], items[2], items[3]}, new TableTreeItem[] {items[2], items[3], items[4]});
- setSelection_helper("Select 3 unordered non-contiguous items", new TableTreeItem[] {items[5], items[2], items[7]}, new TableTreeItem[] {items[2], items[5], items[7]});
- setSelection_helper("Select 3 reverse-order contiguous items", new TableTreeItem[] {items[4], items[3], items[2]}, new TableTreeItem[] {items[2], items[3], items[4]});
- setSelection_helper("Select 3 reverse-order non-contiguous items", new TableTreeItem[] {items[7], items[5], items[2]}, new TableTreeItem[] {items[2], items[5], items[7]});
- setSelection_helper("Select same item twice", new TableTreeItem[] {items[0], items[4], items[0]}, new TableTreeItem[] {items[0], items[4]});
- setSelection_helper("Select same item multiple times", new TableTreeItem[] {items[4], items[4], items[4], items[4], items[4], items[4]}, new TableTreeItem[] {items[4]});
- setSelection_helper("Select multiple items multiple times", new TableTreeItem[] {items[4], items[0], items[2], items[4], items[4], items[0], items[4], items[2]}, new TableTreeItem[] {items[0], items[2], items[4]});
-
-
- /* Now run the same tests on a single-select TableTree. */
- singleSelect();
-
- setSelection_helper("Select no items in empty table tree", new TableTreeItem[] {}, new TableTreeItem[] {});
- try {
- tableTree.setSelection((TableTreeItem[]) null);
- fail("SINGLE: No exception thrown for selecting null in empty table tree");
- }
- catch (IllegalArgumentException e) {
- }
-
- items = new TableTreeItem[number];
- for (int i = 0; i < number; i++) {
- items[i] = new TableTreeItem(tableTree, 0);
- }
-
- setSelection_helper("Select no items in table tree with items", new TableTreeItem[] {}, new TableTreeItem[] {});
- try {
- tableTree.setSelection((TableTreeItem[]) null);
- fail("SINGLE: No exception thrown for selecting null in table tree with items");
- }
- catch (IllegalArgumentException e) {
- }
-
- for (int i = 0; i < number; i++) {
- setSelection_helper("Select item " + i, new TableTreeItem[] {items[i]}, new TableTreeItem[] {items[i]});
- }
- setSelection_helper("Select items", items, new TableTreeItem[] {});
- setSelection_helper("Select tableTree.getItems()", tableTree.getItems(), new TableTreeItem[] {});
- setSelection_helper("Select 2 contiguous items", new TableTreeItem[] {items[0], items[1]}, new TableTreeItem[] {});
- setSelection_helper("Select 2 non-contiguous items", new TableTreeItem[] {items[3], items[6]}, new TableTreeItem[] {});
- setSelection_helper("Select 3 contiguous items", new TableTreeItem[] {items[2], items[3], items[4]}, new TableTreeItem[] {});
- setSelection_helper("Select 3 non-contiguous items", new TableTreeItem[] {items[2], items[5], items[7]}, new TableTreeItem[] {});
- setSelection_helper("Select 3 unordered contiguous items", new TableTreeItem[] {items[4], items[2], items[3]}, new TableTreeItem[] {});
- setSelection_helper("Select 3 unordered non-contiguous items", new TableTreeItem[] {items[5], items[2], items[7]}, new TableTreeItem[] {});
- setSelection_helper("Select 3 reverse-order contiguous items", new TableTreeItem[] {items[4], items[3], items[2]}, new TableTreeItem[] {});
- setSelection_helper("Select 3 reverse-order non-contiguous items", new TableTreeItem[] {items[7], items[5], items[2]}, new TableTreeItem[] {});
- setSelection_helper("Select same item twice", new TableTreeItem[] {items[0], items[4], items[0]}, new TableTreeItem[] {});
- setSelection_helper("Select same item multiple times", new TableTreeItem[] {items[4], items[4], items[4], items[4], items[4], items[4]}, new TableTreeItem[] {});
- setSelection_helper("Select multiple items multiple times", new TableTreeItem[] {items[4], items[0], items[2], items[4], items[4], items[0], items[4], items[2]}, new TableTreeItem[] {});
-}
-
-public void test_showItemLorg_eclipse_swt_custom_TableTreeItem() {
- warnUnimpl("Test test_showItemLorg_eclipse_swt_custom_TableTreeItem not written");
-}
-
-public void test_showSelection() {
- warnUnimpl("Test test_showSelection not written");
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_custom_TableTree((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_CompositeI");
- methodNames.addElement("test_addSelectionListenerLorg_eclipse_swt_events_SelectionListener");
- methodNames.addElement("test_addTreeListenerLorg_eclipse_swt_events_TreeListener");
- methodNames.addElement("test_deselectAll");
- methodNames.addElement("test_getItemCount");
- methodNames.addElement("test_getItemHeight");
- methodNames.addElement("test_getItemLorg_eclipse_swt_graphics_Point");
- methodNames.addElement("test_getItems");
- methodNames.addElement("test_getSelection");
- methodNames.addElement("test_getSelectionCount");
- methodNames.addElement("test_getTable");
- methodNames.addElement("test_indexOfLorg_eclipse_swt_custom_TableTreeItem");
- methodNames.addElement("test_removeAll");
- methodNames.addElement("test_removeSelectionListenerLorg_eclipse_swt_events_SelectionListener");
- methodNames.addElement("test_removeTreeListenerLorg_eclipse_swt_events_TreeListener");
- methodNames.addElement("test_selectAll");
- methodNames.addElement("test_setSelection$Lorg_eclipse_swt_custom_TableTreeItem");
- methodNames.addElement("test_showItemLorg_eclipse_swt_custom_TableTreeItem");
- methodNames.addElement("test_showSelection");
- methodNames.addAll(Test_org_eclipse_swt_widgets_Composite.methodNames()); // add superclass method names
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_CompositeI")) test_ConstructorLorg_eclipse_swt_widgets_CompositeI();
- else if (getName().equals("test_addSelectionListenerLorg_eclipse_swt_events_SelectionListener")) test_addSelectionListenerLorg_eclipse_swt_events_SelectionListener();
- else if (getName().equals("test_addTreeListenerLorg_eclipse_swt_events_TreeListener")) test_addTreeListenerLorg_eclipse_swt_events_TreeListener();
- else if (getName().equals("test_deselectAll")) test_deselectAll();
- else if (getName().equals("test_getItemCount")) test_getItemCount();
- else if (getName().equals("test_getItemHeight")) test_getItemHeight();
- else if (getName().equals("test_getItemLorg_eclipse_swt_graphics_Point")) test_getItemLorg_eclipse_swt_graphics_Point();
- else if (getName().equals("test_getItems")) test_getItems();
- else if (getName().equals("test_getSelection")) test_getSelection();
- else if (getName().equals("test_getSelectionCount")) test_getSelectionCount();
- else if (getName().equals("test_getTable")) test_getTable();
- else if (getName().equals("test_indexOfLorg_eclipse_swt_custom_TableTreeItem")) test_indexOfLorg_eclipse_swt_custom_TableTreeItem();
- else if (getName().equals("test_removeAll")) test_removeAll();
- else if (getName().equals("test_removeSelectionListenerLorg_eclipse_swt_events_SelectionListener")) test_removeSelectionListenerLorg_eclipse_swt_events_SelectionListener();
- else if (getName().equals("test_removeTreeListenerLorg_eclipse_swt_events_TreeListener")) test_removeTreeListenerLorg_eclipse_swt_events_TreeListener();
- else if (getName().equals("test_selectAll")) test_selectAll();
- else if (getName().equals("test_setSelection$Lorg_eclipse_swt_custom_TableTreeItem")) test_setSelection$Lorg_eclipse_swt_custom_TableTreeItem();
- else if (getName().equals("test_showItemLorg_eclipse_swt_custom_TableTreeItem")) test_showItemLorg_eclipse_swt_custom_TableTreeItem();
- else if (getName().equals("test_showSelection")) test_showSelection();
- else super.runTest();
-}
-
-/* custom */
-private TableTree tableTree;
-private int style;
-
-/*
- * Sets a single-select TableTree as the test widget.
- * Note: This method must be private or protected so that the auto-gen tool keeps it.
- */
-private void singleSelect() {
- tableTree.dispose();
- tableTree = new TableTree(shell, style = SWT.SINGLE);
- setWidget(tableTree);
-}
-
-/*
- * Used in test_selectAll.
- * Note: This method must be private or protected so that the auto-gen tool keeps it.
- */
-private void selectAll_helper(String message, TableTreeItem[] expectedSelection) {
- tableTree.selectAll();
- message = (style == SWT.MULTI ? "MULTI" : "SINGLE") + ": " + message;
- assertEquals(message, expectedSelection.length, tableTree.getSelectionCount());
- assertSame(message, expectedSelection, tableTree.getSelection());
-}
-
-/*
- * Used in test_setSelection$Lorg_eclipse_swt_custom_TableTreeItem.
- * Note: This method must be private or protected so that the auto-gen tool keeps it.
- */
-private void setSelection_helper(String message, TableTreeItem[] itemsToSelect, TableTreeItem[] expectedSelection) {
- tableTree.setSelection(itemsToSelect);
- message = (style == SWT.MULTI ? "MULTI" : "SINGLE") + ": " + message;
- assertEquals(message, expectedSelection.length, tableTree.getSelectionCount());
- assertSame(message, expectedSelection, tableTree.getSelection());
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_TableTreeEditor.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_TableTreeEditor.java
deleted file mode 100644
index 1b38872d42..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_TableTreeEditor.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.custom.TableTreeEditor
- *
- * @see org.eclipse.swt.custom.TableTreeEditor
- */
-public class Test_org_eclipse_swt_custom_TableTreeEditor extends Test_org_eclipse_swt_custom_ControlEditor {
-
-public Test_org_eclipse_swt_custom_TableTreeEditor(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- super.setUp();
-}
-
-protected void tearDown() {
- super.tearDown();
-}
-
-public void test_ConstructorLorg_eclipse_swt_custom_TableTree() {
- warnUnimpl("Test test_ConstructorLorg_eclipse_swt_custom_TableTree not written");
-}
-
-public void test_dispose() {
- warnUnimpl("Test test_dispose not written");
-}
-
-public void test_getColumn() {
- warnUnimpl("Test test_getColumn not written");
-}
-
-public void test_getItem() {
- warnUnimpl("Test test_getItem not written");
-}
-
-public void test_setColumnI() {
- warnUnimpl("Test test_setColumnI not written");
-}
-
-public void test_setEditorLorg_eclipse_swt_widgets_ControlLorg_eclipse_swt_custom_TableTreeItemI() {
- warnUnimpl("Test test_setEditorLorg_eclipse_swt_widgets_ControlLorg_eclipse_swt_custom_TableTreeItemI not written");
-}
-
-public void test_setItemLorg_eclipse_swt_custom_TableTreeItem() {
- warnUnimpl("Test test_setItemLorg_eclipse_swt_custom_TableTreeItem not written");
-}
-
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_custom_TableTreeEditor((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_custom_TableTree");
- methodNames.addElement("test_dispose");
- methodNames.addElement("test_getColumn");
- methodNames.addElement("test_getItem");
- methodNames.addElement("test_setColumnI");
- methodNames.addElement("test_setEditorLorg_eclipse_swt_widgets_ControlLorg_eclipse_swt_custom_TableTreeItemI");
- methodNames.addElement("test_setItemLorg_eclipse_swt_custom_TableTreeItem");
- methodNames.addAll(Test_org_eclipse_swt_custom_ControlEditor.methodNames()); // add superclass method names
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLorg_eclipse_swt_custom_TableTree")) test_ConstructorLorg_eclipse_swt_custom_TableTree();
- else if (getName().equals("test_dispose")) test_dispose();
- else if (getName().equals("test_getColumn")) test_getColumn();
- else if (getName().equals("test_getItem")) test_getItem();
- else if (getName().equals("test_setColumnI")) test_setColumnI();
- else if (getName().equals("test_setEditorLorg_eclipse_swt_widgets_ControlLorg_eclipse_swt_custom_TableTreeItemI")) test_setEditorLorg_eclipse_swt_widgets_ControlLorg_eclipse_swt_custom_TableTreeItemI();
- else if (getName().equals("test_setItemLorg_eclipse_swt_custom_TableTreeItem")) test_setItemLorg_eclipse_swt_custom_TableTreeItem();
- else super.runTest();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_TableTreeItem.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_TableTreeItem.java
deleted file mode 100644
index c67181fad9..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_TableTreeItem.java
+++ /dev/null
@@ -1,232 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import org.eclipse.swt.custom.*;
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.custom.TableTreeItem
- *
- * @see org.eclipse.swt.custom.TableTreeItem
- */
-public class Test_org_eclipse_swt_custom_TableTreeItem extends Test_org_eclipse_swt_widgets_Item {
-
- TableTree tableTree;
- TableTreeItem tableTreeItem;
-
-public Test_org_eclipse_swt_custom_TableTreeItem(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- super.setUp();
- tableTree = new TableTree(shell, 0);
- tableTreeItem = new TableTreeItem(tableTree, 0);
- setWidget(tableTreeItem);
-}
-
-protected void tearDown() {
- super.tearDown();
-}
-
-public void test_ConstructorLorg_eclipse_swt_custom_TableTreeI() {
- warnUnimpl("Test test_ConstructorLorg_eclipse_swt_custom_TableTreeI not written");
-}
-
-public void test_ConstructorLorg_eclipse_swt_custom_TableTreeII() {
- warnUnimpl("Test test_ConstructorLorg_eclipse_swt_custom_TableTreeII not written");
-}
-
-public void test_ConstructorLorg_eclipse_swt_custom_TableTreeItemI() {
- warnUnimpl("Test test_ConstructorLorg_eclipse_swt_custom_TableTreeItemI not written");
-}
-
-public void test_ConstructorLorg_eclipse_swt_custom_TableTreeItemII() {
- warnUnimpl("Test test_ConstructorLorg_eclipse_swt_custom_TableTreeItemII not written");
-}
-
-public void test_getBackground() {
- warnUnimpl("Test test_getBackground not written");
-}
-
-public void test_getBoundsI() {
- warnUnimpl("Test test_getBoundsI not written");
-}
-
-public void test_getChecked() {
- warnUnimpl("Test test_getChecked not written");
-}
-
-public void test_getExpanded() {
- warnUnimpl("Test test_getExpanded not written");
-}
-
-public void test_getForeground() {
- warnUnimpl("Test test_getForeground not written");
-}
-
-public void test_getGrayed() {
- warnUnimpl("Test test_getGrayed not written");
-}
-
-public void test_getImage() {
- warnUnimpl("Test test_getImage not written");
-}
-
-public void test_getImageI() {
- warnUnimpl("Test test_getImageI not written");
-}
-
-public void test_getItemCount() {
- warnUnimpl("Test test_getItemCount not written");
-}
-
-public void test_getItems() {
- warnUnimpl("Test test_getItems not written");
-}
-
-public void test_getParent() {
- warnUnimpl("Test test_getParent not written");
-}
-
-public void test_getParentItem() {
- warnUnimpl("Test test_getParentItem not written");
-}
-
-public void test_getText() {
- warnUnimpl("Test test_getText not written");
-}
-
-public void test_getTextI() {
- warnUnimpl("Test test_getTextI not written");
-}
-
-public void test_indexOfLorg_eclipse_swt_custom_TableTreeItem() {
- warnUnimpl("Test test_indexOfLorg_eclipse_swt_custom_TableTreeItem not written");
-}
-
-public void test_setBackgroundLorg_eclipse_swt_graphics_Color() {
- warnUnimpl("Test test_setBackgroundLorg_eclipse_swt_graphics_Color not written");
-}
-
-public void test_setCheckedZ() {
- warnUnimpl("Test test_setCheckedZ not written");
-}
-
-public void test_setExpandedZ() {
- warnUnimpl("Test test_setExpandedZ not written");
-}
-
-public void test_setForegroundLorg_eclipse_swt_graphics_Color() {
- warnUnimpl("Test test_setForegroundLorg_eclipse_swt_graphics_Color not written");
-}
-
-public void test_setGrayedZ() {
- warnUnimpl("Test test_setGrayedZ not written");
-}
-
-public void test_setImageILorg_eclipse_swt_graphics_Image() {
- warnUnimpl("Test test_setImageILorg_eclipse_swt_graphics_Image not written");
-}
-
-public void test_setImageLorg_eclipse_swt_graphics_Image() {
- warnUnimpl("Test test_setImageLorg_eclipse_swt_graphics_Image not written");
-}
-
-public void test_setTextILjava_lang_String() {
- warnUnimpl("Test test_setTextILjava_lang_String not written");
-}
-
-public void test_setTextLjava_lang_String() {
- warnUnimpl("Test test_setTextLjava_lang_String not written");
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_custom_TableTreeItem((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_custom_TableTreeI");
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_custom_TableTreeII");
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_custom_TableTreeItemI");
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_custom_TableTreeItemII");
- methodNames.addElement("test_getBackground");
- methodNames.addElement("test_getBoundsI");
- methodNames.addElement("test_getChecked");
- methodNames.addElement("test_getExpanded");
- methodNames.addElement("test_getForeground");
- methodNames.addElement("test_getGrayed");
- methodNames.addElement("test_getImage");
- methodNames.addElement("test_getImageI");
- methodNames.addElement("test_getItemCount");
- methodNames.addElement("test_getItems");
- methodNames.addElement("test_getParent");
- methodNames.addElement("test_getParentItem");
- methodNames.addElement("test_getText");
- methodNames.addElement("test_getTextI");
- methodNames.addElement("test_indexOfLorg_eclipse_swt_custom_TableTreeItem");
- methodNames.addElement("test_setBackgroundLorg_eclipse_swt_graphics_Color");
- methodNames.addElement("test_setCheckedZ");
- methodNames.addElement("test_setExpandedZ");
- methodNames.addElement("test_setForegroundLorg_eclipse_swt_graphics_Color");
- methodNames.addElement("test_setGrayedZ");
- methodNames.addElement("test_setImageILorg_eclipse_swt_graphics_Image");
- methodNames.addElement("test_setImageLorg_eclipse_swt_graphics_Image");
- methodNames.addElement("test_setTextILjava_lang_String");
- methodNames.addElement("test_setTextLjava_lang_String");
- methodNames.addAll(Test_org_eclipse_swt_widgets_Item.methodNames()); // add superclass method names
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLorg_eclipse_swt_custom_TableTreeI")) test_ConstructorLorg_eclipse_swt_custom_TableTreeI();
- else if (getName().equals("test_ConstructorLorg_eclipse_swt_custom_TableTreeII")) test_ConstructorLorg_eclipse_swt_custom_TableTreeII();
- else if (getName().equals("test_ConstructorLorg_eclipse_swt_custom_TableTreeItemI")) test_ConstructorLorg_eclipse_swt_custom_TableTreeItemI();
- else if (getName().equals("test_ConstructorLorg_eclipse_swt_custom_TableTreeItemII")) test_ConstructorLorg_eclipse_swt_custom_TableTreeItemII();
- else if (getName().equals("test_getBackground")) test_getBackground();
- else if (getName().equals("test_getBoundsI")) test_getBoundsI();
- else if (getName().equals("test_getChecked")) test_getChecked();
- else if (getName().equals("test_getExpanded")) test_getExpanded();
- else if (getName().equals("test_getForeground")) test_getForeground();
- else if (getName().equals("test_getGrayed")) test_getGrayed();
- else if (getName().equals("test_getImage")) test_getImage();
- else if (getName().equals("test_getImageI")) test_getImageI();
- else if (getName().equals("test_getItemCount")) test_getItemCount();
- else if (getName().equals("test_getItems")) test_getItems();
- else if (getName().equals("test_getParent")) test_getParent();
- else if (getName().equals("test_getParentItem")) test_getParentItem();
- else if (getName().equals("test_getText")) test_getText();
- else if (getName().equals("test_getTextI")) test_getTextI();
- else if (getName().equals("test_indexOfLorg_eclipse_swt_custom_TableTreeItem")) test_indexOfLorg_eclipse_swt_custom_TableTreeItem();
- else if (getName().equals("test_setBackgroundLorg_eclipse_swt_graphics_Color")) test_setBackgroundLorg_eclipse_swt_graphics_Color();
- else if (getName().equals("test_setCheckedZ")) test_setCheckedZ();
- else if (getName().equals("test_setExpandedZ")) test_setExpandedZ();
- else if (getName().equals("test_setForegroundLorg_eclipse_swt_graphics_Color")) test_setForegroundLorg_eclipse_swt_graphics_Color();
- else if (getName().equals("test_setGrayedZ")) test_setGrayedZ();
- else if (getName().equals("test_setImageILorg_eclipse_swt_graphics_Image")) test_setImageILorg_eclipse_swt_graphics_Image();
- else if (getName().equals("test_setImageLorg_eclipse_swt_graphics_Image")) test_setImageLorg_eclipse_swt_graphics_Image();
- else if (getName().equals("test_setTextILjava_lang_String")) test_setTextILjava_lang_String();
- else if (getName().equals("test_setTextLjava_lang_String")) test_setTextLjava_lang_String();
- else super.runTest();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_TextChangeListener.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_TextChangeListener.java
deleted file mode 100644
index a0b8bce9f6..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_TextChangeListener.java
+++ /dev/null
@@ -1,566 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.custom.*;
-import org.eclipse.swt.*;
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.custom.TextChangeListener
- *
- * @see org.eclipse.swt.custom.TextChangeListener
- */
-public class Test_org_eclipse_swt_custom_TextChangeListener extends SwtTestCase {
- Shell shell;
- StyledText styledText;
- int verify = -1;
-
-public Test_org_eclipse_swt_custom_TextChangeListener(String name) {
- super(name);
-}
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-protected void setUp() {
- shell = new Shell();
- styledText = new StyledText(shell, SWT.NULL);
-}
-protected void tearDown() {
-}
-
-public void test_textChangedLorg_eclipse_swt_custom_TextChangedEvent() {
- StyledTextContent content = styledText.getContent();
- TextChangeListener listener = new TextChangeListener() {
- public void textChanged(TextChangedEvent event) {
- switch (verify) {
- case 1 : {
- assertTrue(":1:", styledText.getText().equals("\ntesting"));
- break;
- }
- case 2 : {
- assertTrue(":2:", styledText.getText().equals("a"));
- break;
- }
- case 3 : {
- assertTrue(":3:", styledText.getText().equals("\n\n"));
- break;
- }
- case 4: {
- assertTrue(":4:", false);
- break;
- }
- case 5 : {
- assertTrue(":5:", styledText.getText().equals("\rLine 1\r\nLine 2"));
- break;
- }
- case 6 : {
- assertTrue(":6:", styledText.getText().equals("This\nis a test\nline 3"));
- break;
- }
- case 7 : {
- assertTrue(":7:", styledText.getText().equals("This\n\r"));
- break;
- }
- case 8 : {
- assertTrue(":8:", styledText.getText().equals("\nL1\r\nL2"));
- break;
- }
- case 9 : {
- assertTrue(":9:", styledText.getText().equals("L1test"));
- break;
- }
- case 10:{
- assertTrue(":10:", false);
- break;
- }
- case 11: {
- assertTrue(":11:", false);
- break;
- }
- case 12: {
- assertTrue(":12:", styledText.getText().equals("L1\r\n"));
- break;
- }
- case 13: {
- assertTrue(":13:", styledText.getText().equals("L1\r\n"));
- break;
- }
- case 14: {
- assertTrue(":14:", false);
- break;
- }
- case 15: {
- assertTrue(":15:", styledText.getText().equals("L1test\n\n"));
- break;
- }
- case 16:{
- assertTrue(":16:", false);
- break;
- }
- case 17: {
- assertTrue(":17:", false);
- break;
- }
- case 18: {
- assertTrue(":18:", styledText.getText().equals("L1\r\ntest\r\n"));
- break;
- }
- case 19: {
- assertTrue(":19:", styledText.getText().equals("L1test\r\r\r\n"));
- break;
- }
- case 20: {
- assertTrue(":20:", false);
- break;
- }
- }
- }
- public void textChanging(TextChangingEvent event) {
- }
- public void textSet(TextChangedEvent event) {
- }
- };
- content.addTextChangeListener(listener);
-
- boolean exceptionHandled = false;
- verify = 0;
- styledText.setText("testing");
- verify = 1;
- styledText.replaceTextRange(0, 0, "\n");
-
- verify = 0;
- styledText.setText("\n\n");
- verify = 2;
- styledText.replaceTextRange(0, 2, "a");
-
- verify = 0;
- styledText.setText("a");
- verify = 3;
- styledText.replaceTextRange(0, 1, "\n\n");
-
- verify = 0;
- styledText.setText("L1\r\nL2\r\nL3\r\nL4\r\n");
- verify = 4;
- try {styledText.replaceTextRange(3, 1, "test\n");}
- catch (IllegalArgumentException ex) {
- exceptionHandled = true;
- }
- assertTrue(":4: exception not thrown", exceptionHandled);
- exceptionHandled = false;
-
- verify = 0;
- styledText.setText("Line 1\r\nLine 2");
- verify = 5;
- styledText.replaceTextRange(0, 0, "\r");
-
- verify = 0;
- styledText.setText("This\nis a test\nline 3\nline 4");
- verify = 6;
- styledText.replaceTextRange(21, 7, "");
-
- verify = 0;
- styledText.setText("This\nis a test\r");
- verify = 7;
- styledText.replaceTextRange(5, 9, "");
-
- verify = 0;
- styledText.setText("\nL1\r\nL2\r\n");
- verify = 8;
- styledText.replaceTextRange(7, 2, "");
-
- verify = 0;
- styledText.setText("L1\r\n");
- verify = 9;
- styledText.replaceTextRange(2, 2, "test");
-
- verify = 0;
- styledText.setText("L1\r\n");
- verify = 10;
- try {styledText.replaceTextRange(3, 1, "");}
- catch (IllegalArgumentException ex) {
- exceptionHandled = true;
- }
- assertTrue(":10: exception not thrown", exceptionHandled);
- exceptionHandled = false;
-
- verify = 0;
- styledText.setText("L1\r\nL2\r\nL3\r\nL4\r\n");
- verify = 11;
- try {styledText.replaceTextRange(1, 2, "");}
- catch (IllegalArgumentException ex) {
- exceptionHandled = true;
- }
- assertTrue(":11: exception not thrown", exceptionHandled);
- exceptionHandled = false;
-
- verify = 0;
- styledText.setText("L1\r");
- verify = 12;
- styledText.replaceTextRange(3, 0, "\n");
-
- verify = 0;
- styledText.setText("L1\n");
- verify = 13;
- styledText.replaceTextRange(2, 0, "\r");
-
- verify = 0;
- styledText.setText("L1\r\n");
- verify = 14;
- try {styledText.replaceTextRange(3, 0, "test");}
- catch (IllegalArgumentException ex) {
- exceptionHandled = true;
- }
- assertTrue(":14: exception not thrown", exceptionHandled);
- exceptionHandled = false;
-
- verify = 0;
- styledText.setText("L1\r\n");
- verify = 15;
- styledText.replaceTextRange(2, 2, "test\n\n");
-
- verify = 0;
- styledText.setText("L1\r\n");
- verify = 16;
- try {styledText.replaceTextRange(3, 1, "test\r\n");}
- catch (IllegalArgumentException ex) {
- exceptionHandled = true;
- }
- assertTrue(":16: exception not thrown", exceptionHandled);
- exceptionHandled = false;
-
- verify = 0;
- styledText.setText("L1\r\nL2\r\nL3\r\nL4\r\n");
- verify = 17;
- try {styledText.replaceTextRange(1, 2, "test\n\n");}
- catch (IllegalArgumentException ex) {
- exceptionHandled = true;
- }
- assertTrue(":17: exception not thrown", exceptionHandled);
- exceptionHandled = false;
-
- verify = 0;
- styledText.setText("L1\r");
- verify = 18;
- styledText.replaceTextRange(3, 0, "\ntest\r\n");
-
- verify = 0;
- styledText.setText("L1\n");
- verify = 19;
- styledText.replaceTextRange(2, 0, "test\r\r\r");
-
- verify = 0;
- styledText.setText("L1\r\nL2\r\nL3\r\nL4\r\n");
- verify = 20;
- try {styledText.replaceTextRange(3, 1, "test\n");}
- catch (IllegalArgumentException ex) {
- exceptionHandled = true;
- }
- assertTrue(":20: exception not thrown", exceptionHandled);
- exceptionHandled = false;
- content.removeTextChangeListener(listener);
-}
-
-public void test_textChangingLorg_eclipse_swt_custom_TextChangingEvent() {
- StyledTextContent content = styledText.getContent();
- TextChangeListener listener = new TextChangeListener() {
- public void textChanging(TextChangingEvent event) {
- switch(verify) {
- case 1 : {
- assertTrue(":1a:", event.replaceLineCount == 0);
- assertTrue(":1b:", event.newLineCount == 1);
- break;
- }
- case 2 : {
- assertTrue(":2a:", event.replaceLineCount == 2);
- assertTrue(":2b:", event.newLineCount == 0);
- break;
- }
- case 3 : {
- assertTrue(":3a:", event.replaceLineCount == 0);
- assertTrue(":3b:", event.newLineCount == 2);
- break;
- }
- case 4: {
- assertTrue(":4:", false);
- break;
- }
- case 5 : {
- assertTrue(":5a:", event.replaceLineCount == 0);
- assertTrue(":5b:", event.newLineCount == 1);
- break;
- }
- case 6 : {
- assertTrue(":6a:", event.replaceLineCount == 1);
- assertTrue(":6b:", event.newLineCount == 0);
- break;
- }
- case 7 : {
- assertTrue(":7a:", event.replaceLineCount == 0);
- assertTrue(":7b:", event.newLineCount == 0);
- break;
- }
- case 8 : {
- assertTrue(":8a:", event.replaceLineCount == 1);
- assertTrue(":8b:", event.newLineCount == 0);
- break;
- }
- case 9 : {
- assertTrue(":9a:", event.replaceLineCount == 1);
- assertTrue(":9b:", event.newLineCount == 0);
- break;
- }
- case 10:{
- assertTrue(":10:", false);
- break;
- }
- case 11: {
- assertTrue(":11:", false);
- break;
- }
- case 12: {
- assertTrue(":12a:", event.replaceLineCount == 0);
- assertTrue(":12b:", event.newLineCount == 1);
- break;
- }
- case 13: {
- assertTrue(":13a:", event.replaceLineCount == 0);
- assertTrue(":13b:", event.newLineCount == 1);
- break;
- }
- case 14: {
- assertTrue(":14:", false);
- break;
- }
- case 15: {
- assertTrue(":15a:", event.replaceLineCount == 1);
- assertTrue(":15b:", event.newLineCount == 2);
- break;
- }
- case 16:{
- assertTrue(":16:", false);
- break;
- }
- case 17: {
- assertTrue(":17:", false);
- break;
- }
- case 18: {
- assertTrue(":18a:", event.replaceLineCount == 0);
- assertTrue(":18b:", event.newLineCount == 2);
- break;
- }
- case 19: {
- assertTrue(":19a:", event.replaceLineCount == 0);
- assertTrue(":19b:", event.newLineCount == 3);
- break;
- }
- case 20: {
- assertTrue(":20:", false);
- break;
- }
- }
- }
- public void textChanged(TextChangedEvent event) {
- }
- public void textSet(TextChangedEvent event) {
- }
- };
- content.addTextChangeListener(listener);
-
- boolean exceptionHandled = false;
- verify = 1;
- styledText.setText("testing");
- styledText.replaceTextRange(0, 0, "\n");
-
- verify = 2;
- styledText.setText("\n\n");
- styledText.replaceTextRange(0, 2, "a");
-
- verify = 3;
- styledText.setText("a");
- styledText.replaceTextRange(0, 1, "\n\n");
-
- verify = 4;
- styledText.setText("L1\r\nL2\r\nL3\r\nL4\r\n");
- try {styledText.replaceTextRange(3, 1, "test\n");}
- catch (IllegalArgumentException ex) {
- exceptionHandled = true;
- }
- assertTrue(":4: exception not thrown", exceptionHandled);
- exceptionHandled = false;
-
- verify = 5;
- styledText.setText("Line 1\r\nLine 2");
- styledText.replaceTextRange(0, 0, "\r");
-
- verify = 6;
- styledText.setText("This\nis a test\nline 3\nline 4");
- styledText.replaceTextRange(21, 7, "");
-
- verify = 7;
- styledText.setText("This\nis a test\r");
- styledText.replaceTextRange(5, 9, "");
-
- verify = 8;
- styledText.setText("\nL1\r\nL2\r\n");
- styledText.replaceTextRange(7, 2, "");
-
- verify = 9;
- styledText.setText("L1\r\n");
- styledText.replaceTextRange(2, 2, "test");
-
- verify = 10;
- styledText.setText("L1\r\n");
- try {styledText.replaceTextRange(3, 1, "");}
- catch (IllegalArgumentException ex) {
- exceptionHandled = true;
- }
- assertTrue(":10: exception not thrown", exceptionHandled);
- exceptionHandled = false;
-
- verify = 11;
- styledText.setText("L1\r\nL2\r\nL3\r\nL4\r\n");
- try {styledText.replaceTextRange(1, 2, "");}
- catch (IllegalArgumentException ex) {
- exceptionHandled = true;
- }
- assertTrue(":11: exception not thrown", exceptionHandled);
- exceptionHandled = false;
-
- verify = 12;
- styledText.setText("L1\r");
- styledText.replaceTextRange(3, 0, "\n");
-
- verify = 13;
- styledText.setText("L1\n");
- styledText.replaceTextRange(2, 0, "\r");
-
- verify = 14;
- styledText.setText("L1\r\n");
- try {styledText.replaceTextRange(3, 0, "test");}
- catch (IllegalArgumentException ex) {
- exceptionHandled = true;
- }
- assertTrue(":14: exception not thrown", exceptionHandled);
- exceptionHandled = false;
-
- verify = 15;
- styledText.setText("L1\r\n");
- styledText.replaceTextRange(2, 2, "test\n\n");
-
- verify = 16;
- styledText.setText("L1\r\n");
- try {styledText.replaceTextRange(3, 1, "test\r\n");}
- catch (IllegalArgumentException ex) {
- exceptionHandled = true;
- }
- assertTrue(":16: exception not thrown", exceptionHandled);
- exceptionHandled = false;
-
- verify = 17;
- styledText.setText("L1\r\nL2\r\nL3\r\nL4\r\n");
- try {styledText.replaceTextRange(1, 2, "test\n\n");}
- catch (IllegalArgumentException ex) {
- exceptionHandled = true;
- }
- assertTrue(":17: exception not thrown", exceptionHandled);
- exceptionHandled = false;
-
- verify = 18;
- styledText.setText("L1\r");
- styledText.replaceTextRange(3, 0, "\ntest\r\n");
-
- verify = 19;
- styledText.setText("L1\n");
- styledText.replaceTextRange(2, 0, "test\r\r\r");
- verify = 20;
- styledText.setText("L1\r\nL2\r\nL3\r\nL4\r\n");
- try {styledText.replaceTextRange(3, 1, "test\n");}
- catch (IllegalArgumentException ex) {
- exceptionHandled = true;
- }
- assertTrue(":20: exception not thrown", exceptionHandled);
- exceptionHandled = false;
- content.removeTextChangeListener(listener);
-}
-
-public void test_textSetLorg_eclipse_swt_custom_TextChangedEvent() {
- StyledTextContent content = styledText.getContent();
- TextChangeListener listener = new TextChangeListener() {
- public void textChanging(TextChangingEvent event) {
- }
- public void textChanged(TextChangedEvent event) {
- }
- public void textSet(TextChangedEvent event) {
- switch (verify) {
- case 1 : {
- assertTrue(":1:", styledText.getText().equals("testing"));
- break;
- }
- case 2 : {
- assertTrue(":2:", styledText.getText().equals("\n\n"));
- break;
- }
- case 3 : {
- assertTrue(":3:", styledText.getText().equals("a"));
- break;
- }
- case 4 : {
- assertTrue(":4:", styledText.getText().equals(""));
- break;
- }
- }
- }
- };
- content.addTextChangeListener(listener);
-
- verify = 1;
- styledText.setText("testing");
-
- verify = 2;
- styledText.setText("\n\n");
-
- verify = 3;
- styledText.setText("a");
-
- verify = 4;
- try {styledText.setText(null);}
- catch (IllegalArgumentException ex) {assertTrue(":4:", true);}
- content.removeTextChangeListener(listener);
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_custom_TextChangeListener((String)e.nextElement()));
- }
- return suite;
-}
-
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_textChangedLorg_eclipse_swt_custom_TextChangedEvent");
- methodNames.addElement("test_textChangingLorg_eclipse_swt_custom_TextChangingEvent");
- methodNames.addElement("test_textSetLorg_eclipse_swt_custom_TextChangedEvent");
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_textChangedLorg_eclipse_swt_custom_TextChangedEvent")) test_textChangedLorg_eclipse_swt_custom_TextChangedEvent();
- else if (getName().equals("test_textChangingLorg_eclipse_swt_custom_TextChangingEvent")) test_textChangingLorg_eclipse_swt_custom_TextChangingEvent();
- else if (getName().equals("test_textSetLorg_eclipse_swt_custom_TextChangedEvent")) test_textSetLorg_eclipse_swt_custom_TextChangedEvent();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_TextChangedEvent.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_TextChangedEvent.java
deleted file mode 100644
index 152d7a7943..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_TextChangedEvent.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.custom.TextChangedEvent
- *
- * @see org.eclipse.swt.custom.TextChangedEvent
- */
-public class Test_org_eclipse_swt_custom_TextChangedEvent extends Test_org_eclipse_swt_events_TypedEvent {
-
-public Test_org_eclipse_swt_custom_TextChangedEvent(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- super.setUp();
-}
-
-protected void tearDown() {
- super.tearDown();
-}
-
-public void test_ConstructorLorg_eclipse_swt_custom_StyledTextContent() {
- // this method tested by other test classes
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_custom_TextChangedEvent((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_custom_StyledTextContent");
- methodNames.addAll(Test_org_eclipse_swt_events_TypedEvent.methodNames()); // add superclass method names
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLorg_eclipse_swt_custom_StyledTextContent")) test_ConstructorLorg_eclipse_swt_custom_StyledTextContent();
- else super.runTest();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_TextChangingEvent.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_TextChangingEvent.java
deleted file mode 100644
index 62ef5ab93c..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_TextChangingEvent.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.custom.TextChangingEvent
- *
- * @see org.eclipse.swt.custom.TextChangingEvent
- */
-public class Test_org_eclipse_swt_custom_TextChangingEvent extends Test_org_eclipse_swt_events_TypedEvent {
-
-public Test_org_eclipse_swt_custom_TextChangingEvent(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- super.setUp();
-}
-
-protected void tearDown() {
- super.tearDown();
-}
-
-public void test_ConstructorLorg_eclipse_swt_custom_StyledTextContent() {
- // this method tested by other test classes
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_custom_TextChangingEvent((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_custom_StyledTextContent");
- methodNames.addAll(Test_org_eclipse_swt_events_TypedEvent.methodNames()); // add superclass method names
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLorg_eclipse_swt_custom_StyledTextContent")) test_ConstructorLorg_eclipse_swt_custom_StyledTextContent();
- else super.runTest();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_TreeEditor.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_TreeEditor.java
deleted file mode 100644
index 6d5ec9f853..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_TreeEditor.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.custom.TreeEditor
- *
- * @see org.eclipse.swt.custom.TreeEditor
- */
-public class Test_org_eclipse_swt_custom_TreeEditor extends Test_org_eclipse_swt_custom_ControlEditor {
-
-public Test_org_eclipse_swt_custom_TreeEditor(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- super.setUp();
-}
-
-protected void tearDown() {
- super.tearDown();
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_Tree() {
- warnUnimpl("Test test_ConstructorLorg_eclipse_swt_widgets_Tree not written");
-}
-
-public void test_dispose() {
- warnUnimpl("Test test_dispose not written");
-}
-
-public void test_getItem() {
- warnUnimpl("Test test_getItem not written");
-}
-
-public void test_setEditorLorg_eclipse_swt_widgets_ControlLorg_eclipse_swt_widgets_TreeItem() {
- warnUnimpl("Test test_setEditorLorg_eclipse_swt_widgets_ControlLorg_eclipse_swt_widgets_TreeItem not written");
-}
-
-public void test_setItemLorg_eclipse_swt_widgets_TreeItem() {
- warnUnimpl("Test test_setItemLorg_eclipse_swt_widgets_TreeItem not written");
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_custom_TreeEditor((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_Tree");
- methodNames.addElement("test_dispose");
- methodNames.addElement("test_getItem");
- methodNames.addElement("test_setEditorLorg_eclipse_swt_widgets_ControlLorg_eclipse_swt_widgets_TreeItem");
- methodNames.addElement("test_setItemLorg_eclipse_swt_widgets_TreeItem");
- methodNames.addAll(Test_org_eclipse_swt_custom_ControlEditor.methodNames()); // add superclass method names
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_Tree")) test_ConstructorLorg_eclipse_swt_widgets_Tree();
- else if (getName().equals("test_dispose")) test_dispose();
- else if (getName().equals("test_getItem")) test_getItem();
- else if (getName().equals("test_setEditorLorg_eclipse_swt_widgets_ControlLorg_eclipse_swt_widgets_TreeItem")) test_setEditorLorg_eclipse_swt_widgets_ControlLorg_eclipse_swt_widgets_TreeItem();
- else if (getName().equals("test_setItemLorg_eclipse_swt_widgets_TreeItem")) test_setItemLorg_eclipse_swt_widgets_TreeItem();
- else super.runTest();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_VerifyKeyListener.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_VerifyKeyListener.java
deleted file mode 100644
index 8d2e57c980..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_VerifyKeyListener.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.custom.*;
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.custom.VerifyKeyListener
- *
- * @see org.eclipse.swt.custom.VerifyKeyListener
- */
-public class Test_org_eclipse_swt_custom_VerifyKeyListener extends SwtTestCase {
- Shell shell;
- StyledText styledText;
- int verify = -1;
-
-public Test_org_eclipse_swt_custom_VerifyKeyListener(String name) {
- super(name);
-}
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-protected void setUp() {
- shell = new Shell();
- styledText = new StyledText(shell, SWT.NULL);
- shell.open();
-}
-
-protected void tearDown() {
-}
-
-public void test_verifyKeyLorg_eclipse_swt_events_VerifyEvent() {
- VerifyKeyListener listener = new VerifyKeyListener() {
- public void verifyKey(VerifyEvent event) {
- if (verify != 1) {event.doit = false;}
- }
- };
- styledText.addVerifyKeyListener(listener);
- verify = 1;
- Event e = new Event();
- e.character = 'a';
- styledText.notifyListeners(SWT.KeyDown, e);
- assertTrue(":1:", styledText.getText().equals("a"));
-
- verify = 2;
- styledText.setText("");
- e = new Event();
- e.character = 'a';
- styledText.notifyListeners(SWT.KeyDown, e);
- assertTrue(":2:", styledText.getText().equals(""));
- styledText.removeVerifyKeyListener(listener);
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_custom_VerifyKeyListener((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_verifyKeyLorg_eclipse_swt_events_VerifyEvent");
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_verifyKeyLorg_eclipse_swt_events_VerifyEvent")) test_verifyKeyLorg_eclipse_swt_events_VerifyEvent();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_ViewForm.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_ViewForm.java
deleted file mode 100644
index d79df2778d..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_ViewForm.java
+++ /dev/null
@@ -1,154 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.custom.ViewForm
- *
- * @see org.eclipse.swt.custom.ViewForm
- */
-public class Test_org_eclipse_swt_custom_ViewForm extends Test_org_eclipse_swt_widgets_Composite {
-
-public Test_org_eclipse_swt_custom_ViewForm(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- super.setUp();
-}
-
-protected void tearDown() {
- super.tearDown();
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_CompositeI() {
- warnUnimpl("Test test_ConstructorLorg_eclipse_swt_widgets_CompositeI not written");
-}
-
-public void test_computeSizeIIZ() {
- warnUnimpl("Test test_computeSizeIIZ not written");
-}
-
-public void test_getClientArea() {
- warnUnimpl("Test test_getClientArea not written");
-}
-
-public void test_getContent() {
- warnUnimpl("Test test_getContent not written");
-}
-
-public void test_getTopCenter() {
- warnUnimpl("Test test_getTopCenter not written");
-}
-
-public void test_getTopLeft() {
- warnUnimpl("Test test_getTopLeft not written");
-}
-
-public void test_getTopRight() {
- warnUnimpl("Test test_getTopRight not written");
-}
-
-public void test_layoutZ() {
- warnUnimpl("Test test_layoutZ not written");
-}
-
-public void test_setBorderVisibleZ() {
- warnUnimpl("Test test_setBorderVisibleZ not written");
-}
-
-public void test_setContentLorg_eclipse_swt_widgets_Control() {
- warnUnimpl("Test test_setContentLorg_eclipse_swt_widgets_Control not written");
-}
-
-public void test_setFontLorg_eclipse_swt_graphics_Font() {
- warnUnimpl("Test test_setFontLorg_eclipse_swt_graphics_Font not written");
-}
-
-public void test_setLayoutLorg_eclipse_swt_widgets_Layout() {
- warnUnimpl("Test test_setLayoutLorg_eclipse_swt_widgets_Layout not written");
-}
-
-public void test_setTopCenterLorg_eclipse_swt_widgets_Control() {
- warnUnimpl("Test test_setTopCenterLorg_eclipse_swt_widgets_Control not written");
-}
-
-public void test_setTopCenterSeparateZ() {
- warnUnimpl("Test test_setTopCenterSeparateZ not written");
-}
-
-public void test_setTopLeftLorg_eclipse_swt_widgets_Control() {
- warnUnimpl("Test test_setTopLeftLorg_eclipse_swt_widgets_Control not written");
-}
-
-public void test_setTopRightLorg_eclipse_swt_widgets_Control() {
- warnUnimpl("Test test_setTopRightLorg_eclipse_swt_widgets_Control not written");
-}
-
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_custom_ViewForm((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_CompositeI");
- methodNames.addElement("test_computeSizeIIZ");
- methodNames.addElement("test_getClientArea");
- methodNames.addElement("test_getContent");
- methodNames.addElement("test_getTopCenter");
- methodNames.addElement("test_getTopLeft");
- methodNames.addElement("test_getTopRight");
- methodNames.addElement("test_layoutZ");
- methodNames.addElement("test_setBorderVisibleZ");
- methodNames.addElement("test_setContentLorg_eclipse_swt_widgets_Control");
- methodNames.addElement("test_setFontLorg_eclipse_swt_graphics_Font");
- methodNames.addElement("test_setLayoutLorg_eclipse_swt_widgets_Layout");
- methodNames.addElement("test_setTopCenterLorg_eclipse_swt_widgets_Control");
- methodNames.addElement("test_setTopCenterSeparateZ");
- methodNames.addElement("test_setTopLeftLorg_eclipse_swt_widgets_Control");
- methodNames.addElement("test_setTopRightLorg_eclipse_swt_widgets_Control");
- methodNames.addAll(Test_org_eclipse_swt_widgets_Composite.methodNames()); // add superclass method names
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_CompositeI")) test_ConstructorLorg_eclipse_swt_widgets_CompositeI();
- else if (getName().equals("test_computeSizeIIZ")) test_computeSizeIIZ();
- else if (getName().equals("test_getClientArea")) test_getClientArea();
- else if (getName().equals("test_getContent")) test_getContent();
- else if (getName().equals("test_getTopCenter")) test_getTopCenter();
- else if (getName().equals("test_getTopLeft")) test_getTopLeft();
- else if (getName().equals("test_getTopRight")) test_getTopRight();
- else if (getName().equals("test_layoutZ")) test_layoutZ();
- else if (getName().equals("test_setBorderVisibleZ")) test_setBorderVisibleZ();
- else if (getName().equals("test_setContentLorg_eclipse_swt_widgets_Control")) test_setContentLorg_eclipse_swt_widgets_Control();
- else if (getName().equals("test_setFontLorg_eclipse_swt_graphics_Font")) test_setFontLorg_eclipse_swt_graphics_Font();
- else if (getName().equals("test_setLayoutLorg_eclipse_swt_widgets_Layout")) test_setLayoutLorg_eclipse_swt_widgets_Layout();
- else if (getName().equals("test_setTopCenterLorg_eclipse_swt_widgets_Control")) test_setTopCenterLorg_eclipse_swt_widgets_Control();
- else if (getName().equals("test_setTopCenterSeparateZ")) test_setTopCenterSeparateZ();
- else if (getName().equals("test_setTopLeftLorg_eclipse_swt_widgets_Control")) test_setTopLeftLorg_eclipse_swt_widgets_Control();
- else if (getName().equals("test_setTopRightLorg_eclipse_swt_widgets_Control")) test_setTopRightLorg_eclipse_swt_widgets_Control();
- else super.runTest();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_dnd_ByteArrayTransfer.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_dnd_ByteArrayTransfer.java
deleted file mode 100644
index dabdfc1453..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_dnd_ByteArrayTransfer.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.dnd.ByteArrayTransfer
- *
- * @see org.eclipse.swt.dnd.ByteArrayTransfer
- */
-public class Test_org_eclipse_swt_dnd_ByteArrayTransfer extends Test_org_eclipse_swt_dnd_Transfer {
-
-public Test_org_eclipse_swt_dnd_ByteArrayTransfer(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- super.setUp();
-}
-
-protected void tearDown() {
- super.tearDown();
-}
-
-public void test_Constructor() {
- warnUnimpl("Test test_Constructor not written");
-}
-
-public void test_getSupportedTypes() {
- warnUnimpl("Test test_getSupportedTypes not written");
-}
-
-public void test_isSupportedTypeLorg_eclipse_swt_dnd_TransferData() {
- warnUnimpl("Test test_isSupportedTypeLorg_eclipse_swt_dnd_TransferData not written");
-}
-
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_dnd_ByteArrayTransfer((String)e.nextElement()));
- }
- return suite;
-}
-
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_Constructor");
- methodNames.addElement("test_getSupportedTypes");
- methodNames.addElement("test_isSupportedTypeLorg_eclipse_swt_dnd_TransferData");
- methodNames.addAll(Test_org_eclipse_swt_dnd_Transfer.methodNames()); // add superclass method names
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_Constructor")) test_Constructor();
- else if (getName().equals("test_getSupportedTypes")) test_getSupportedTypes();
- else if (getName().equals("test_isSupportedTypeLorg_eclipse_swt_dnd_TransferData")) test_isSupportedTypeLorg_eclipse_swt_dnd_TransferData();
- else super.runTest();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_dnd_Clipboard.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_dnd_Clipboard.java
deleted file mode 100644
index 56fa0106ff..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_dnd_Clipboard.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.dnd.Clipboard
- *
- * @see org.eclipse.swt.dnd.Clipboard
- */
-public class Test_org_eclipse_swt_dnd_Clipboard extends SwtTestCase {
-
-public Test_org_eclipse_swt_dnd_Clipboard(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
-}
-
-protected void tearDown() {
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_Display() {
- warnUnimpl("Test test_ConstructorLorg_eclipse_swt_widgets_Display not written");
-}
-
-public void test_dispose() {
- warnUnimpl("Test test_dispose not written");
-}
-
-public void test_getAvailableTypeNames() {
- warnUnimpl("Test test_getAvailableTypeNames not written");
-}
-
-public void test_getAvailableTypes() {
- warnUnimpl("Test test_getAvailableTypes not written");
-}
-
-public void test_getContentsLorg_eclipse_swt_dnd_Transfer() {
- warnUnimpl("Test test_getContentsLorg_eclipse_swt_dnd_Transfer not written");
-}
-
-public void test_isDisposed() {
- warnUnimpl("Test test_isDisposed not written");
-}
-
-public void test_setContents$Ljava_lang_Object$Lorg_eclipse_swt_dnd_Transfer() {
- warnUnimpl("Test test_setContents$Ljava_lang_Object$Lorg_eclipse_swt_dnd_Transfer not written");
-}
-
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_dnd_Clipboard((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_Display");
- methodNames.addElement("test_dispose");
- methodNames.addElement("test_getAvailableTypeNames");
- methodNames.addElement("test_getAvailableTypes");
- methodNames.addElement("test_getContentsLorg_eclipse_swt_dnd_Transfer");
- methodNames.addElement("test_isDisposed");
- methodNames.addElement("test_setContents$Ljava_lang_Object$Lorg_eclipse_swt_dnd_Transfer");
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_Display")) test_ConstructorLorg_eclipse_swt_widgets_Display();
- else if (getName().equals("test_dispose")) test_dispose();
- else if (getName().equals("test_getAvailableTypeNames")) test_getAvailableTypeNames();
- else if (getName().equals("test_getAvailableTypes")) test_getAvailableTypes();
- else if (getName().equals("test_getContentsLorg_eclipse_swt_dnd_Transfer")) test_getContentsLorg_eclipse_swt_dnd_Transfer();
- else if (getName().equals("test_isDisposed")) test_isDisposed();
- else if (getName().equals("test_setContents$Ljava_lang_Object$Lorg_eclipse_swt_dnd_Transfer")) test_setContents$Ljava_lang_Object$Lorg_eclipse_swt_dnd_Transfer();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_dnd_DND.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_dnd_DND.java
deleted file mode 100644
index 1db7f93dfb..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_dnd_DND.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.dnd.DND
- *
- * @see org.eclipse.swt.dnd.DND
- */
-public class Test_org_eclipse_swt_dnd_DND extends SwtTestCase {
-
-public Test_org_eclipse_swt_dnd_DND(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
-}
-
-protected void tearDown() {
-}
-
-public void test_Constructor() {
- warnUnimpl("Test test_Constructor not written");
-}
-
-public void test_errorI() {
- warnUnimpl("Test test_errorI not written");
-}
-
-public void test_errorII() {
- warnUnimpl("Test test_errorII not written");
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_dnd_DND((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_Constructor");
- methodNames.addElement("test_errorI");
- methodNames.addElement("test_errorII");
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_Constructor")) test_Constructor();
- else if (getName().equals("test_errorI")) test_errorI();
- else if (getName().equals("test_errorII")) test_errorII();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_dnd_DragSource.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_dnd_DragSource.java
deleted file mode 100644
index 0f2e0859e8..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_dnd_DragSource.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.dnd.DragSource
- *
- * @see org.eclipse.swt.dnd.DragSource
- */
-public class Test_org_eclipse_swt_dnd_DragSource extends Test_org_eclipse_swt_widgets_Widget {
-
-public Test_org_eclipse_swt_dnd_DragSource(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- super.setUp();
-}
-
-protected void tearDown() {
- super.tearDown();
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_ControlI() {
- warnUnimpl("Test test_ConstructorLorg_eclipse_swt_widgets_ControlI not written");
-}
-
-public void test_addDragListenerLorg_eclipse_swt_dnd_DragSourceListener() {
- warnUnimpl("Test test_addDragListenerLorg_eclipse_swt_dnd_DragSourceListener not written");
-}
-
-public void test_getControl() {
- warnUnimpl("Test test_getControl not written");
-}
-
-public void test_getTransfer() {
- warnUnimpl("Test test_getTransfer not written");
-}
-
-public void test_removeDragListenerLorg_eclipse_swt_dnd_DragSourceListener() {
- warnUnimpl("Test test_removeDragListenerLorg_eclipse_swt_dnd_DragSourceListener not written");
-}
-
-public void test_setTransfer$Lorg_eclipse_swt_dnd_Transfer() {
- warnUnimpl("Test test_setTransfer$Lorg_eclipse_swt_dnd_Transfer not written");
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_dnd_DragSource((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_ControlI");
- methodNames.addElement("test_addDragListenerLorg_eclipse_swt_dnd_DragSourceListener");
- methodNames.addElement("test_getControl");
- methodNames.addElement("test_getTransfer");
- methodNames.addElement("test_removeDragListenerLorg_eclipse_swt_dnd_DragSourceListener");
- methodNames.addElement("test_setTransfer$Lorg_eclipse_swt_dnd_Transfer");
- methodNames.addAll(Test_org_eclipse_swt_widgets_Widget.methodNames()); // add superclass method names
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_ControlI")) test_ConstructorLorg_eclipse_swt_widgets_ControlI();
- else if (getName().equals("test_addDragListenerLorg_eclipse_swt_dnd_DragSourceListener")) test_addDragListenerLorg_eclipse_swt_dnd_DragSourceListener();
- else if (getName().equals("test_getControl")) test_getControl();
- else if (getName().equals("test_getTransfer")) test_getTransfer();
- else if (getName().equals("test_removeDragListenerLorg_eclipse_swt_dnd_DragSourceListener")) test_removeDragListenerLorg_eclipse_swt_dnd_DragSourceListener();
- else if (getName().equals("test_setTransfer$Lorg_eclipse_swt_dnd_Transfer")) test_setTransfer$Lorg_eclipse_swt_dnd_Transfer();
- else super.runTest();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_dnd_DragSourceAdapter.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_dnd_DragSourceAdapter.java
deleted file mode 100644
index ff1b769c89..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_dnd_DragSourceAdapter.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.dnd.DragSourceAdapter
- *
- * @see org.eclipse.swt.dnd.DragSourceAdapter
- */
-public class Test_org_eclipse_swt_dnd_DragSourceAdapter extends SwtTestCase {
-
-public Test_org_eclipse_swt_dnd_DragSourceAdapter(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
-}
-
-protected void tearDown() {
-}
-
-public void test_Constructor() {
- warnUnimpl("Test test_Constructor not written");
-}
-
-public void test_dragFinishedLorg_eclipse_swt_dnd_DragSourceEvent() {
- warnUnimpl("Test test_dragFinishedLorg_eclipse_swt_dnd_DragSourceEvent not written");
-}
-
-public void test_dragSetDataLorg_eclipse_swt_dnd_DragSourceEvent() {
- warnUnimpl("Test test_dragSetDataLorg_eclipse_swt_dnd_DragSourceEvent not written");
-}
-
-public void test_dragStartLorg_eclipse_swt_dnd_DragSourceEvent() {
- warnUnimpl("Test test_dragStartLorg_eclipse_swt_dnd_DragSourceEvent not written");
-}
-
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_dnd_DragSourceAdapter((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_Constructor");
- methodNames.addElement("test_dragFinishedLorg_eclipse_swt_dnd_DragSourceEvent");
- methodNames.addElement("test_dragSetDataLorg_eclipse_swt_dnd_DragSourceEvent");
- methodNames.addElement("test_dragStartLorg_eclipse_swt_dnd_DragSourceEvent");
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_Constructor")) test_Constructor();
- else if (getName().equals("test_dragFinishedLorg_eclipse_swt_dnd_DragSourceEvent")) test_dragFinishedLorg_eclipse_swt_dnd_DragSourceEvent();
- else if (getName().equals("test_dragSetDataLorg_eclipse_swt_dnd_DragSourceEvent")) test_dragSetDataLorg_eclipse_swt_dnd_DragSourceEvent();
- else if (getName().equals("test_dragStartLorg_eclipse_swt_dnd_DragSourceEvent")) test_dragStartLorg_eclipse_swt_dnd_DragSourceEvent();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_dnd_DragSourceEvent.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_dnd_DragSourceEvent.java
deleted file mode 100644
index baf951c08d..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_dnd_DragSourceEvent.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.dnd.DragSourceEvent
- *
- * @see org.eclipse.swt.dnd.DragSourceEvent
- */
-public class Test_org_eclipse_swt_dnd_DragSourceEvent extends Test_org_eclipse_swt_events_TypedEvent {
-
-public Test_org_eclipse_swt_dnd_DragSourceEvent(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- super.setUp();
-}
-
-protected void tearDown() {
- super.tearDown();
-}
-
-public void test_ConstructorLorg_eclipse_swt_dnd_DNDEvent() {
- warnUnimpl("Test test_ConstructorLorg_eclipse_swt_dnd_DNDEvent not written");
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_dnd_DragSourceEvent((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_dnd_DNDEvent");
- methodNames.addAll(Test_org_eclipse_swt_events_TypedEvent.methodNames()); // add superclass method names
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLorg_eclipse_swt_dnd_DNDEvent")) test_ConstructorLorg_eclipse_swt_dnd_DNDEvent();
- else super.runTest();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_dnd_DragSourceListener.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_dnd_DragSourceListener.java
deleted file mode 100644
index 1e1d194d40..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_dnd_DragSourceListener.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.dnd.DragSourceListener
- *
- * @see org.eclipse.swt.dnd.DragSourceListener
- */
-public class Test_org_eclipse_swt_dnd_DragSourceListener extends SwtTestCase {
-
-public Test_org_eclipse_swt_dnd_DragSourceListener(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
-}
-
-protected void tearDown() {
-}
-
-public void test_dragFinishedLorg_eclipse_swt_dnd_DragSourceEvent() {
- warnUnimpl("Test test_dragFinishedLorg_eclipse_swt_dnd_DragSourceEvent not written");
-}
-
-public void test_dragSetDataLorg_eclipse_swt_dnd_DragSourceEvent() {
- warnUnimpl("Test test_dragSetDataLorg_eclipse_swt_dnd_DragSourceEvent not written");
-}
-
-public void test_dragStartLorg_eclipse_swt_dnd_DragSourceEvent() {
- warnUnimpl("Test test_dragStartLorg_eclipse_swt_dnd_DragSourceEvent not written");
-}
-
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_dnd_DragSourceListener((String)e.nextElement()));
- }
- return suite;
-}
-
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_dragFinishedLorg_eclipse_swt_dnd_DragSourceEvent");
- methodNames.addElement("test_dragSetDataLorg_eclipse_swt_dnd_DragSourceEvent");
- methodNames.addElement("test_dragStartLorg_eclipse_swt_dnd_DragSourceEvent");
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_dragFinishedLorg_eclipse_swt_dnd_DragSourceEvent")) test_dragFinishedLorg_eclipse_swt_dnd_DragSourceEvent();
- else if (getName().equals("test_dragSetDataLorg_eclipse_swt_dnd_DragSourceEvent")) test_dragSetDataLorg_eclipse_swt_dnd_DragSourceEvent();
- else if (getName().equals("test_dragStartLorg_eclipse_swt_dnd_DragSourceEvent")) test_dragStartLorg_eclipse_swt_dnd_DragSourceEvent();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_dnd_DropTarget.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_dnd_DropTarget.java
deleted file mode 100644
index b0fdaab8c3..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_dnd_DropTarget.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.dnd.DropTarget
- *
- * @see org.eclipse.swt.dnd.DropTarget
- */
-public class Test_org_eclipse_swt_dnd_DropTarget extends Test_org_eclipse_swt_widgets_Widget {
-
-public Test_org_eclipse_swt_dnd_DropTarget(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- super.setUp();
-}
-
-protected void tearDown() {
- super.tearDown();
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_ControlI() {
- warnUnimpl("Test test_ConstructorLorg_eclipse_swt_widgets_ControlI not written");
-}
-
-public void test_addDropListenerLorg_eclipse_swt_dnd_DropTargetListener() {
- warnUnimpl("Test test_addDropListenerLorg_eclipse_swt_dnd_DropTargetListener not written");
-}
-
-public void test_getControl() {
- warnUnimpl("Test test_getControl not written");
-}
-
-public void test_getTransfer() {
- warnUnimpl("Test test_getTransfer not written");
-}
-
-public void test_notifyListenersILorg_eclipse_swt_widgets_Event() {
- warnUnimpl("Test test_notifyListenersILorg_eclipse_swt_widgets_Event not written");
-}
-
-public void test_removeDropListenerLorg_eclipse_swt_dnd_DropTargetListener() {
- warnUnimpl("Test test_removeDropListenerLorg_eclipse_swt_dnd_DropTargetListener not written");
-}
-
-public void test_setTransfer$Lorg_eclipse_swt_dnd_Transfer() {
- warnUnimpl("Test test_setTransfer$Lorg_eclipse_swt_dnd_Transfer not written");
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_dnd_DropTarget((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_ControlI");
- methodNames.addElement("test_addDropListenerLorg_eclipse_swt_dnd_DropTargetListener");
- methodNames.addElement("test_getControl");
- methodNames.addElement("test_getTransfer");
- methodNames.addElement("test_notifyListenersILorg_eclipse_swt_widgets_Event");
- methodNames.addElement("test_removeDropListenerLorg_eclipse_swt_dnd_DropTargetListener");
- methodNames.addElement("test_setTransfer$Lorg_eclipse_swt_dnd_Transfer");
- methodNames.addAll(Test_org_eclipse_swt_widgets_Widget.methodNames()); // add superclass method names
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_ControlI")) test_ConstructorLorg_eclipse_swt_widgets_ControlI();
- else if (getName().equals("test_addDropListenerLorg_eclipse_swt_dnd_DropTargetListener")) test_addDropListenerLorg_eclipse_swt_dnd_DropTargetListener();
- else if (getName().equals("test_getControl")) test_getControl();
- else if (getName().equals("test_getTransfer")) test_getTransfer();
- else if (getName().equals("test_notifyListenersILorg_eclipse_swt_widgets_Event")) test_notifyListenersILorg_eclipse_swt_widgets_Event();
- else if (getName().equals("test_removeDropListenerLorg_eclipse_swt_dnd_DropTargetListener")) test_removeDropListenerLorg_eclipse_swt_dnd_DropTargetListener();
- else if (getName().equals("test_setTransfer$Lorg_eclipse_swt_dnd_Transfer")) test_setTransfer$Lorg_eclipse_swt_dnd_Transfer();
- else super.runTest();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_dnd_DropTargetAdapter.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_dnd_DropTargetAdapter.java
deleted file mode 100644
index 1ba26db34a..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_dnd_DropTargetAdapter.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.dnd.DropTargetAdapter
- *
- * @see org.eclipse.swt.dnd.DropTargetAdapter
- */
-public class Test_org_eclipse_swt_dnd_DropTargetAdapter extends SwtTestCase {
-
-public Test_org_eclipse_swt_dnd_DropTargetAdapter(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
-}
-
-protected void tearDown() {
-}
-
-public void test_Constructor() {
- warnUnimpl("Test test_Constructor not written");
-}
-
-public void test_dragEnterLorg_eclipse_swt_dnd_DropTargetEvent() {
- warnUnimpl("Test test_dragEnterLorg_eclipse_swt_dnd_DropTargetEvent not written");
-}
-
-public void test_dragLeaveLorg_eclipse_swt_dnd_DropTargetEvent() {
- warnUnimpl("Test test_dragLeaveLorg_eclipse_swt_dnd_DropTargetEvent not written");
-}
-
-public void test_dragOperationChangedLorg_eclipse_swt_dnd_DropTargetEvent() {
- warnUnimpl("Test test_dragOperationChangedLorg_eclipse_swt_dnd_DropTargetEvent not written");
-}
-
-public void test_dragOverLorg_eclipse_swt_dnd_DropTargetEvent() {
- warnUnimpl("Test test_dragOverLorg_eclipse_swt_dnd_DropTargetEvent not written");
-}
-
-public void test_dropAcceptLorg_eclipse_swt_dnd_DropTargetEvent() {
- warnUnimpl("Test test_dropAcceptLorg_eclipse_swt_dnd_DropTargetEvent not written");
-}
-
-public void test_dropLorg_eclipse_swt_dnd_DropTargetEvent() {
- warnUnimpl("Test test_dropLorg_eclipse_swt_dnd_DropTargetEvent not written");
-}
-
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_dnd_DropTargetAdapter((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_Constructor");
- methodNames.addElement("test_dragEnterLorg_eclipse_swt_dnd_DropTargetEvent");
- methodNames.addElement("test_dragLeaveLorg_eclipse_swt_dnd_DropTargetEvent");
- methodNames.addElement("test_dragOperationChangedLorg_eclipse_swt_dnd_DropTargetEvent");
- methodNames.addElement("test_dragOverLorg_eclipse_swt_dnd_DropTargetEvent");
- methodNames.addElement("test_dropAcceptLorg_eclipse_swt_dnd_DropTargetEvent");
- methodNames.addElement("test_dropLorg_eclipse_swt_dnd_DropTargetEvent");
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_Constructor")) test_Constructor();
- else if (getName().equals("test_dragEnterLorg_eclipse_swt_dnd_DropTargetEvent")) test_dragEnterLorg_eclipse_swt_dnd_DropTargetEvent();
- else if (getName().equals("test_dragLeaveLorg_eclipse_swt_dnd_DropTargetEvent")) test_dragLeaveLorg_eclipse_swt_dnd_DropTargetEvent();
- else if (getName().equals("test_dragOperationChangedLorg_eclipse_swt_dnd_DropTargetEvent")) test_dragOperationChangedLorg_eclipse_swt_dnd_DropTargetEvent();
- else if (getName().equals("test_dragOverLorg_eclipse_swt_dnd_DropTargetEvent")) test_dragOverLorg_eclipse_swt_dnd_DropTargetEvent();
- else if (getName().equals("test_dropAcceptLorg_eclipse_swt_dnd_DropTargetEvent")) test_dropAcceptLorg_eclipse_swt_dnd_DropTargetEvent();
- else if (getName().equals("test_dropLorg_eclipse_swt_dnd_DropTargetEvent")) test_dropLorg_eclipse_swt_dnd_DropTargetEvent();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_dnd_DropTargetEvent.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_dnd_DropTargetEvent.java
deleted file mode 100644
index 8b89720368..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_dnd_DropTargetEvent.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.dnd.DropTargetEvent
- *
- * @see org.eclipse.swt.dnd.DropTargetEvent
- */
-public class Test_org_eclipse_swt_dnd_DropTargetEvent extends Test_org_eclipse_swt_events_TypedEvent {
-
-public Test_org_eclipse_swt_dnd_DropTargetEvent(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- super.setUp();
-}
-
-protected void tearDown() {
- super.tearDown();
-}
-
-public void test_ConstructorLorg_eclipse_swt_dnd_DNDEvent() {
- warnUnimpl("Test test_ConstructorLorg_eclipse_swt_dnd_DNDEvent not written");
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_dnd_DropTargetEvent((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_dnd_DNDEvent");
- methodNames.addAll(Test_org_eclipse_swt_events_TypedEvent.methodNames()); // add superclass method names
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLorg_eclipse_swt_dnd_DNDEvent")) test_ConstructorLorg_eclipse_swt_dnd_DNDEvent();
- else super.runTest();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_dnd_DropTargetListener.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_dnd_DropTargetListener.java
deleted file mode 100644
index 72c09ae51a..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_dnd_DropTargetListener.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.dnd.DropTargetListener
- *
- * @see org.eclipse.swt.dnd.DropTargetListener
- */
-public class Test_org_eclipse_swt_dnd_DropTargetListener extends SwtTestCase {
-
-public Test_org_eclipse_swt_dnd_DropTargetListener(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
-}
-
-protected void tearDown() {
-}
-
-public void test_dragEnterLorg_eclipse_swt_dnd_DropTargetEvent() {
- warnUnimpl("Test test_dragEnterLorg_eclipse_swt_dnd_DropTargetEvent not written");
-}
-
-public void test_dragLeaveLorg_eclipse_swt_dnd_DropTargetEvent() {
- warnUnimpl("Test test_dragLeaveLorg_eclipse_swt_dnd_DropTargetEvent not written");
-}
-
-public void test_dragOperationChangedLorg_eclipse_swt_dnd_DropTargetEvent() {
- warnUnimpl("Test test_dragOperationChangedLorg_eclipse_swt_dnd_DropTargetEvent not written");
-}
-
-public void test_dragOverLorg_eclipse_swt_dnd_DropTargetEvent() {
- warnUnimpl("Test test_dragOverLorg_eclipse_swt_dnd_DropTargetEvent not written");
-}
-
-public void test_dropAcceptLorg_eclipse_swt_dnd_DropTargetEvent() {
- warnUnimpl("Test test_dropAcceptLorg_eclipse_swt_dnd_DropTargetEvent not written");
-}
-
-public void test_dropLorg_eclipse_swt_dnd_DropTargetEvent() {
- warnUnimpl("Test test_dropLorg_eclipse_swt_dnd_DropTargetEvent not written");
-}
-
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_dnd_DropTargetListener((String)e.nextElement()));
- }
- return suite;
-}
-
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_dragEnterLorg_eclipse_swt_dnd_DropTargetEvent");
- methodNames.addElement("test_dragLeaveLorg_eclipse_swt_dnd_DropTargetEvent");
- methodNames.addElement("test_dragOperationChangedLorg_eclipse_swt_dnd_DropTargetEvent");
- methodNames.addElement("test_dragOverLorg_eclipse_swt_dnd_DropTargetEvent");
- methodNames.addElement("test_dropAcceptLorg_eclipse_swt_dnd_DropTargetEvent");
- methodNames.addElement("test_dropLorg_eclipse_swt_dnd_DropTargetEvent");
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_dragEnterLorg_eclipse_swt_dnd_DropTargetEvent")) test_dragEnterLorg_eclipse_swt_dnd_DropTargetEvent();
- else if (getName().equals("test_dragLeaveLorg_eclipse_swt_dnd_DropTargetEvent")) test_dragLeaveLorg_eclipse_swt_dnd_DropTargetEvent();
- else if (getName().equals("test_dragOperationChangedLorg_eclipse_swt_dnd_DropTargetEvent")) test_dragOperationChangedLorg_eclipse_swt_dnd_DropTargetEvent();
- else if (getName().equals("test_dragOverLorg_eclipse_swt_dnd_DropTargetEvent")) test_dragOverLorg_eclipse_swt_dnd_DropTargetEvent();
- else if (getName().equals("test_dropAcceptLorg_eclipse_swt_dnd_DropTargetEvent")) test_dropAcceptLorg_eclipse_swt_dnd_DropTargetEvent();
- else if (getName().equals("test_dropLorg_eclipse_swt_dnd_DropTargetEvent")) test_dropLorg_eclipse_swt_dnd_DropTargetEvent();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_dnd_FileTransfer.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_dnd_FileTransfer.java
deleted file mode 100644
index 477cd2c9f6..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_dnd_FileTransfer.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.dnd.FileTransfer
- *
- * @see org.eclipse.swt.dnd.FileTransfer
- */
-public class Test_org_eclipse_swt_dnd_FileTransfer extends Test_org_eclipse_swt_dnd_ByteArrayTransfer {
-
-public Test_org_eclipse_swt_dnd_FileTransfer(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- super.setUp();
-}
-
-protected void tearDown() {
- super.tearDown();
-}
-
-public void test_getInstance() {
- warnUnimpl("Test test_getInstance not written");
-}
-
-public void test_javaToNativeLjava_lang_ObjectLorg_eclipse_swt_dnd_TransferData() {
- warnUnimpl("Test test_javaToNativeLjava_lang_ObjectLorg_eclipse_swt_dnd_TransferData not written");
-}
-
-public void test_nativeToJavaLorg_eclipse_swt_dnd_TransferData() {
- warnUnimpl("Test test_nativeToJavaLorg_eclipse_swt_dnd_TransferData not written");
-}
-
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_dnd_FileTransfer((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_getInstance");
- methodNames.addElement("test_javaToNativeLjava_lang_ObjectLorg_eclipse_swt_dnd_TransferData");
- methodNames.addElement("test_nativeToJavaLorg_eclipse_swt_dnd_TransferData");
- methodNames.addAll(Test_org_eclipse_swt_dnd_ByteArrayTransfer.methodNames()); // add superclass method names
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_getInstance")) test_getInstance();
- else if (getName().equals("test_javaToNativeLjava_lang_ObjectLorg_eclipse_swt_dnd_TransferData")) test_javaToNativeLjava_lang_ObjectLorg_eclipse_swt_dnd_TransferData();
- else if (getName().equals("test_nativeToJavaLorg_eclipse_swt_dnd_TransferData")) test_nativeToJavaLorg_eclipse_swt_dnd_TransferData();
- else super.runTest();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_dnd_RTFTransfer.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_dnd_RTFTransfer.java
deleted file mode 100644
index 5a0f850a9d..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_dnd_RTFTransfer.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.dnd.RTFTransfer
- *
- * @see org.eclipse.swt.dnd.RTFTransfer
- */
-public class Test_org_eclipse_swt_dnd_RTFTransfer extends Test_org_eclipse_swt_dnd_ByteArrayTransfer {
-
-public Test_org_eclipse_swt_dnd_RTFTransfer(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- super.setUp();
-}
-
-protected void tearDown() {
- super.tearDown();
-}
-
-public void test_getInstance() {
- warnUnimpl("Test test_getInstance not written");
-}
-
-public void test_javaToNativeLjava_lang_ObjectLorg_eclipse_swt_dnd_TransferData() {
- warnUnimpl("Test test_javaToNativeLjava_lang_ObjectLorg_eclipse_swt_dnd_TransferData not written");
-}
-
-public void test_nativeToJavaLorg_eclipse_swt_dnd_TransferData() {
- warnUnimpl("Test test_nativeToJavaLorg_eclipse_swt_dnd_TransferData not written");
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_dnd_RTFTransfer((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_getInstance");
- methodNames.addElement("test_javaToNativeLjava_lang_ObjectLorg_eclipse_swt_dnd_TransferData");
- methodNames.addElement("test_nativeToJavaLorg_eclipse_swt_dnd_TransferData");
- methodNames.addAll(Test_org_eclipse_swt_dnd_ByteArrayTransfer.methodNames()); // add superclass method names
- return methodNames;
-}
-
-protected void runTest() throws Throwable {
- if (getName().equals("test_getInstance")) test_getInstance();
- else if (getName().equals("test_javaToNativeLjava_lang_ObjectLorg_eclipse_swt_dnd_TransferData")) test_javaToNativeLjava_lang_ObjectLorg_eclipse_swt_dnd_TransferData();
- else if (getName().equals("test_nativeToJavaLorg_eclipse_swt_dnd_TransferData")) test_nativeToJavaLorg_eclipse_swt_dnd_TransferData();
- else super.runTest();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_dnd_TextTransfer.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_dnd_TextTransfer.java
deleted file mode 100644
index 057b99a767..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_dnd_TextTransfer.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.dnd.TextTransfer
- *
- * @see org.eclipse.swt.dnd.TextTransfer
- */
-public class Test_org_eclipse_swt_dnd_TextTransfer extends Test_org_eclipse_swt_dnd_ByteArrayTransfer {
-
-public Test_org_eclipse_swt_dnd_TextTransfer(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- super.setUp();
-}
-
-protected void tearDown() {
- super.tearDown();
-}
-
-public void test_getInstance() {
- warnUnimpl("Test test_getInstance not written");
-}
-
-public void test_javaToNativeLjava_lang_ObjectLorg_eclipse_swt_dnd_TransferData() {
- warnUnimpl("Test test_javaToNativeLjava_lang_ObjectLorg_eclipse_swt_dnd_TransferData not written");
-}
-
-public void test_nativeToJavaLorg_eclipse_swt_dnd_TransferData() {
- warnUnimpl("Test test_nativeToJavaLorg_eclipse_swt_dnd_TransferData not written");
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_dnd_TextTransfer((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_getInstance");
- methodNames.addElement("test_javaToNativeLjava_lang_ObjectLorg_eclipse_swt_dnd_TransferData");
- methodNames.addElement("test_nativeToJavaLorg_eclipse_swt_dnd_TransferData");
- methodNames.addAll(Test_org_eclipse_swt_dnd_ByteArrayTransfer.methodNames()); // add superclass method names
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_getInstance")) test_getInstance();
- else if (getName().equals("test_javaToNativeLjava_lang_ObjectLorg_eclipse_swt_dnd_TransferData")) test_javaToNativeLjava_lang_ObjectLorg_eclipse_swt_dnd_TransferData();
- else if (getName().equals("test_nativeToJavaLorg_eclipse_swt_dnd_TransferData")) test_nativeToJavaLorg_eclipse_swt_dnd_TransferData();
- else super.runTest();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_dnd_Transfer.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_dnd_Transfer.java
deleted file mode 100644
index 898ed6ac50..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_dnd_Transfer.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.dnd.Transfer
- *
- * @see org.eclipse.swt.dnd.Transfer
- */
-public class Test_org_eclipse_swt_dnd_Transfer extends SwtTestCase {
-
-public Test_org_eclipse_swt_dnd_Transfer(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
-}
-
-protected void tearDown() {
-}
-
-public void test_Constructor() {
- warnUnimpl("Test test_Constructor not written");
-}
-
-public void test_getSupportedTypes() {
- warnUnimpl("Test test_getSupportedTypes not written");
-}
-
-public void test_isSupportedTypeLorg_eclipse_swt_dnd_TransferData() {
- warnUnimpl("Test test_isSupportedTypeLorg_eclipse_swt_dnd_TransferData not written");
-}
-
-public void test_registerTypeLjava_lang_String() {
- warnUnimpl("Test test_registerTypeLjava_lang_String not written");
-}
-
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_dnd_Transfer((String)e.nextElement()));
- }
- return suite;
-}
-
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_Constructor");
- methodNames.addElement("test_getSupportedTypes");
- methodNames.addElement("test_isSupportedTypeLorg_eclipse_swt_dnd_TransferData");
- methodNames.addElement("test_registerTypeLjava_lang_String");
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_Constructor")) test_Constructor();
- else if (getName().equals("test_getSupportedTypes")) test_getSupportedTypes();
- else if (getName().equals("test_isSupportedTypeLorg_eclipse_swt_dnd_TransferData")) test_isSupportedTypeLorg_eclipse_swt_dnd_TransferData();
- else if (getName().equals("test_registerTypeLjava_lang_String")) test_registerTypeLjava_lang_String();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_dnd_TransferData.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_dnd_TransferData.java
deleted file mode 100644
index 21319ad182..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_dnd_TransferData.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.dnd.TransferData
- *
- * @see org.eclipse.swt.dnd.TransferData
- */
-public class Test_org_eclipse_swt_dnd_TransferData extends SwtTestCase {
-
-public Test_org_eclipse_swt_dnd_TransferData(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
-}
-
-protected void tearDown() {
-}
-
-public void test_Constructor() {
- warnUnimpl("Test test_Constructor not written");
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_dnd_TransferData((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_Constructor");
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_Constructor")) test_Constructor();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_ArmEvent.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_ArmEvent.java
deleted file mode 100644
index 99b83639af..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_ArmEvent.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import junit.framework.*;
-import junit.textui.*;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.widgets.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.events.ArmEvent
- *
- * @see org.eclipse.swt.events.ArmEvent
- */
-public class Test_org_eclipse_swt_events_ArmEvent extends Test_org_eclipse_swt_events_TypedEvent {
-
-public Test_org_eclipse_swt_events_ArmEvent(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- super.setUp();
-}
-
-protected void tearDown() {
- super.tearDown();
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_Event() {
- warnUnimpl("Test test_ConstructorLorg_eclipse_swt_widgets_Event not written");
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_events_ArmEvent((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_Event");
- methodNames.addAll(Test_org_eclipse_swt_events_TypedEvent.methodNames()); // add superclass method names
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_Event")) test_ConstructorLorg_eclipse_swt_widgets_Event();
- else super.runTest();
-}
-
-/* custom */
-protected TypedEvent newTypedEvent(Event event) {
- return new ArmEvent(event);
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_ArmListener.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_ArmListener.java
deleted file mode 100644
index 5c75654422..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_ArmListener.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.events.ArmListener
- *
- * @see org.eclipse.swt.events.ArmListener
- */
-public class Test_org_eclipse_swt_events_ArmListener extends SwtTestCase {
-
-public Test_org_eclipse_swt_events_ArmListener(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
-}
-
-protected void tearDown() {
-}
-
-public void test_widgetArmedLorg_eclipse_swt_events_ArmEvent() {
- warnUnimpl("Test test_widgetArmedLorg_eclipse_swt_events_ArmEvent not written");
-}
-
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_events_ArmListener((String)e.nextElement()));
- }
- return suite;
-}
-
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_widgetArmedLorg_eclipse_swt_events_ArmEvent");
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_widgetArmedLorg_eclipse_swt_events_ArmEvent")) test_widgetArmedLorg_eclipse_swt_events_ArmEvent();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_ControlAdapter.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_ControlAdapter.java
deleted file mode 100644
index 3f21f2682d..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_ControlAdapter.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.events.ControlAdapter
- *
- * @see org.eclipse.swt.events.ControlAdapter
- */
-public class Test_org_eclipse_swt_events_ControlAdapter extends SwtTestCase {
-
-public Test_org_eclipse_swt_events_ControlAdapter(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
-}
-
-protected void tearDown() {
-}
-
-public void test_Constructor() {
- warnUnimpl("Test test_Constructor not written");
-}
-
-public void test_controlMovedLorg_eclipse_swt_events_ControlEvent() {
- warnUnimpl("Test test_controlMovedLorg_eclipse_swt_events_ControlEvent not written");
-}
-
-public void test_controlResizedLorg_eclipse_swt_events_ControlEvent() {
- warnUnimpl("Test test_controlResizedLorg_eclipse_swt_events_ControlEvent not written");
-}
-
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_events_ControlAdapter((String)e.nextElement()));
- }
- return suite;
-}
-
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_Constructor");
- methodNames.addElement("test_controlMovedLorg_eclipse_swt_events_ControlEvent");
- methodNames.addElement("test_controlResizedLorg_eclipse_swt_events_ControlEvent");
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_Constructor")) test_Constructor();
- else if (getName().equals("test_controlMovedLorg_eclipse_swt_events_ControlEvent")) test_controlMovedLorg_eclipse_swt_events_ControlEvent();
- else if (getName().equals("test_controlResizedLorg_eclipse_swt_events_ControlEvent")) test_controlResizedLorg_eclipse_swt_events_ControlEvent();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_ControlEvent.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_ControlEvent.java
deleted file mode 100644
index 14574a045e..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_ControlEvent.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import junit.framework.*;
-import junit.textui.*;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.widgets.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.events.ControlEvent
- *
- * @see org.eclipse.swt.events.ControlEvent
- */
-public class Test_org_eclipse_swt_events_ControlEvent extends Test_org_eclipse_swt_events_TypedEvent {
-
-public Test_org_eclipse_swt_events_ControlEvent(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- super.setUp();
-}
-
-protected void tearDown() {
- super.tearDown();
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_Event() {
- warnUnimpl("Test test_ConstructorLorg_eclipse_swt_widgets_Event not written");
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_events_ControlEvent((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_Event");
- methodNames.addAll(Test_org_eclipse_swt_events_TypedEvent.methodNames()); // add superclass method names
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_Event")) test_ConstructorLorg_eclipse_swt_widgets_Event();
- else super.runTest();
-}
-
-/* custom */
-protected TypedEvent newTypedEvent(Event event) {
- return new ControlEvent(event);
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_ControlListener.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_ControlListener.java
deleted file mode 100644
index 18ab5b68ee..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_ControlListener.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.events.ControlListener
- *
- * @see org.eclipse.swt.events.ControlListener
- */
-public class Test_org_eclipse_swt_events_ControlListener extends SwtTestCase {
-
-public Test_org_eclipse_swt_events_ControlListener(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
-}
-
-protected void tearDown() {
-}
-
-public void test_controlMovedLorg_eclipse_swt_events_ControlEvent() {
- warnUnimpl("Test test_controlMovedLorg_eclipse_swt_events_ControlEvent not written");
-}
-
-public void test_controlResizedLorg_eclipse_swt_events_ControlEvent() {
- warnUnimpl("Test test_controlResizedLorg_eclipse_swt_events_ControlEvent not written");
-}
-
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_events_ControlListener((String)e.nextElement()));
- }
- return suite;
-}
-
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_controlMovedLorg_eclipse_swt_events_ControlEvent");
- methodNames.addElement("test_controlResizedLorg_eclipse_swt_events_ControlEvent");
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_controlMovedLorg_eclipse_swt_events_ControlEvent")) test_controlMovedLorg_eclipse_swt_events_ControlEvent();
- else if (getName().equals("test_controlResizedLorg_eclipse_swt_events_ControlEvent")) test_controlResizedLorg_eclipse_swt_events_ControlEvent();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_DisposeEvent.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_DisposeEvent.java
deleted file mode 100644
index 900b906b1c..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_DisposeEvent.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import junit.framework.*;
-import junit.textui.*;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.widgets.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.events.DisposeEvent
- *
- * @see org.eclipse.swt.events.DisposeEvent
- */
-public class Test_org_eclipse_swt_events_DisposeEvent extends Test_org_eclipse_swt_events_TypedEvent {
-
-public Test_org_eclipse_swt_events_DisposeEvent(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- super.setUp();
-}
-
-protected void tearDown() {
- super.tearDown();
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_Event() {
- warnUnimpl("Test test_ConstructorLorg_eclipse_swt_widgets_Event not written");
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_events_DisposeEvent((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_Event");
- methodNames.addAll(Test_org_eclipse_swt_events_TypedEvent.methodNames()); // add superclass method names
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_Event")) test_ConstructorLorg_eclipse_swt_widgets_Event();
- else super.runTest();
-}
-
-/* custom */
-protected TypedEvent newTypedEvent(Event event) {
- return new DisposeEvent(event);
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_DisposeListener.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_DisposeListener.java
deleted file mode 100644
index d27829e12a..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_DisposeListener.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.events.DisposeListener
- *
- * @see org.eclipse.swt.events.DisposeListener
- */
-public class Test_org_eclipse_swt_events_DisposeListener extends SwtTestCase {
-
-public Test_org_eclipse_swt_events_DisposeListener(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
-}
-
-protected void tearDown() {
-}
-
-public void test_widgetDisposedLorg_eclipse_swt_events_DisposeEvent() {
- warnUnimpl("Test test_widgetDisposedLorg_eclipse_swt_events_DisposeEvent not written");
-}
-
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_events_DisposeListener((String)e.nextElement()));
- }
- return suite;
-}
-
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_widgetDisposedLorg_eclipse_swt_events_DisposeEvent");
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_widgetDisposedLorg_eclipse_swt_events_DisposeEvent")) test_widgetDisposedLorg_eclipse_swt_events_DisposeEvent();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_FocusAdapter.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_FocusAdapter.java
deleted file mode 100644
index 14824a23ec..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_FocusAdapter.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.events.FocusAdapter
- *
- * @see org.eclipse.swt.events.FocusAdapter
- */
-public class Test_org_eclipse_swt_events_FocusAdapter extends SwtTestCase {
-
-public Test_org_eclipse_swt_events_FocusAdapter(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
-}
-
-protected void tearDown() {
-}
-
-public void test_Constructor() {
- warnUnimpl("Test test_Constructor not written");
-}
-
-public void test_focusGainedLorg_eclipse_swt_events_FocusEvent() {
- warnUnimpl("Test test_focusGainedLorg_eclipse_swt_events_FocusEvent not written");
-}
-
-public void test_focusLostLorg_eclipse_swt_events_FocusEvent() {
- warnUnimpl("Test test_focusLostLorg_eclipse_swt_events_FocusEvent not written");
-}
-
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_events_FocusAdapter((String)e.nextElement()));
- }
- return suite;
-}
-
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_Constructor");
- methodNames.addElement("test_focusGainedLorg_eclipse_swt_events_FocusEvent");
- methodNames.addElement("test_focusLostLorg_eclipse_swt_events_FocusEvent");
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_Constructor")) test_Constructor();
- else if (getName().equals("test_focusGainedLorg_eclipse_swt_events_FocusEvent")) test_focusGainedLorg_eclipse_swt_events_FocusEvent();
- else if (getName().equals("test_focusLostLorg_eclipse_swt_events_FocusEvent")) test_focusLostLorg_eclipse_swt_events_FocusEvent();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_FocusEvent.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_FocusEvent.java
deleted file mode 100644
index 1e9b7f98c1..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_FocusEvent.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import junit.framework.*;
-import junit.textui.*;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.widgets.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.events.FocusEvent
- *
- * @see org.eclipse.swt.events.FocusEvent
- */
-public class Test_org_eclipse_swt_events_FocusEvent extends Test_org_eclipse_swt_events_TypedEvent {
-
-public Test_org_eclipse_swt_events_FocusEvent(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- super.setUp();
-}
-
-protected void tearDown() {
- super.tearDown();
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_Event() {
- warnUnimpl("Test test_ConstructorLorg_eclipse_swt_widgets_Event not written");
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_events_FocusEvent((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_Event");
- methodNames.addAll(Test_org_eclipse_swt_events_TypedEvent.methodNames()); // add superclass method names
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_Event")) test_ConstructorLorg_eclipse_swt_widgets_Event();
- else super.runTest();
-}
-
-/* custom */
-protected TypedEvent newTypedEvent(Event event) {
- return new FocusEvent(event);
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_FocusListener.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_FocusListener.java
deleted file mode 100644
index 23709de146..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_FocusListener.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.events.FocusListener
- *
- * @see org.eclipse.swt.events.FocusListener
- */
-public class Test_org_eclipse_swt_events_FocusListener extends SwtTestCase {
-
-public Test_org_eclipse_swt_events_FocusListener(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
-}
-
-protected void tearDown() {
-}
-
-public void test_focusGainedLorg_eclipse_swt_events_FocusEvent() {
- warnUnimpl("Test test_focusGainedLorg_eclipse_swt_events_FocusEvent not written");
-}
-
-public void test_focusLostLorg_eclipse_swt_events_FocusEvent() {
- warnUnimpl("Test test_focusLostLorg_eclipse_swt_events_FocusEvent not written");
-}
-
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_events_FocusListener((String)e.nextElement()));
- }
- return suite;
-}
-
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_focusGainedLorg_eclipse_swt_events_FocusEvent");
- methodNames.addElement("test_focusLostLorg_eclipse_swt_events_FocusEvent");
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_focusGainedLorg_eclipse_swt_events_FocusEvent")) test_focusGainedLorg_eclipse_swt_events_FocusEvent();
- else if (getName().equals("test_focusLostLorg_eclipse_swt_events_FocusEvent")) test_focusLostLorg_eclipse_swt_events_FocusEvent();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_HelpEvent.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_HelpEvent.java
deleted file mode 100644
index b08660e374..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_HelpEvent.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import junit.framework.*;
-import junit.textui.*;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.widgets.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.events.HelpEvent
- *
- * @see org.eclipse.swt.events.HelpEvent
- */
-public class Test_org_eclipse_swt_events_HelpEvent extends Test_org_eclipse_swt_events_TypedEvent {
-
-public Test_org_eclipse_swt_events_HelpEvent(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- super.setUp();
-}
-
-protected void tearDown() {
- super.tearDown();
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_Event() {
- warnUnimpl("Test test_ConstructorLorg_eclipse_swt_widgets_Event not written");
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_events_HelpEvent((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_Event");
- methodNames.addAll(Test_org_eclipse_swt_events_TypedEvent.methodNames()); // add superclass method names
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_Event")) test_ConstructorLorg_eclipse_swt_widgets_Event();
- else super.runTest();
-}
-
-/* custom */
-protected TypedEvent newTypedEvent(Event event) {
- return new HelpEvent(event);
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_HelpListener.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_HelpListener.java
deleted file mode 100644
index 9443c3f419..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_HelpListener.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.events.HelpListener
- *
- * @see org.eclipse.swt.events.HelpListener
- */
-public class Test_org_eclipse_swt_events_HelpListener extends SwtTestCase {
-
-public Test_org_eclipse_swt_events_HelpListener(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
-}
-
-protected void tearDown() {
-}
-
-public void test_helpRequestedLorg_eclipse_swt_events_HelpEvent() {
- warnUnimpl("Test test_helpRequestedLorg_eclipse_swt_events_HelpEvent not written");
-}
-
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_events_HelpListener((String)e.nextElement()));
- }
- return suite;
-}
-
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_helpRequestedLorg_eclipse_swt_events_HelpEvent");
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_helpRequestedLorg_eclipse_swt_events_HelpEvent")) test_helpRequestedLorg_eclipse_swt_events_HelpEvent();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_KeyAdapter.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_KeyAdapter.java
deleted file mode 100644
index 804638555f..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_KeyAdapter.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.events.KeyAdapter
- *
- * @see org.eclipse.swt.events.KeyAdapter
- */
-public class Test_org_eclipse_swt_events_KeyAdapter extends SwtTestCase {
-
-public Test_org_eclipse_swt_events_KeyAdapter(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
-}
-
-protected void tearDown() {
-}
-
-public void test_Constructor() {
- warnUnimpl("Test test_Constructor not written");
-}
-
-public void test_keyPressedLorg_eclipse_swt_events_KeyEvent() {
- warnUnimpl("Test test_keyPressedLorg_eclipse_swt_events_KeyEvent not written");
-}
-
-public void test_keyReleasedLorg_eclipse_swt_events_KeyEvent() {
- warnUnimpl("Test test_keyReleasedLorg_eclipse_swt_events_KeyEvent not written");
-}
-
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_events_KeyAdapter((String)e.nextElement()));
- }
- return suite;
-}
-
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_Constructor");
- methodNames.addElement("test_keyPressedLorg_eclipse_swt_events_KeyEvent");
- methodNames.addElement("test_keyReleasedLorg_eclipse_swt_events_KeyEvent");
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_Constructor")) test_Constructor();
- else if (getName().equals("test_keyPressedLorg_eclipse_swt_events_KeyEvent")) test_keyPressedLorg_eclipse_swt_events_KeyEvent();
- else if (getName().equals("test_keyReleasedLorg_eclipse_swt_events_KeyEvent")) test_keyReleasedLorg_eclipse_swt_events_KeyEvent();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_KeyEvent.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_KeyEvent.java
deleted file mode 100644
index 2eedde3034..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_KeyEvent.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import junit.framework.*;
-import junit.textui.*;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.widgets.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.events.KeyEvent
- *
- * @see org.eclipse.swt.events.KeyEvent
- */
-public class Test_org_eclipse_swt_events_KeyEvent extends Test_org_eclipse_swt_events_TypedEvent {
-
-public Test_org_eclipse_swt_events_KeyEvent(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- super.setUp();
-}
-
-protected void tearDown() {
- super.tearDown();
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_Event() {
- warnUnimpl("Test test_ConstructorLorg_eclipse_swt_widgets_Event not written");
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_events_KeyEvent((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_Event");
- methodNames.addAll(Test_org_eclipse_swt_events_TypedEvent.methodNames()); // add superclass method names
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_Event")) test_ConstructorLorg_eclipse_swt_widgets_Event();
- else super.runTest();
-}
-
-/* custom */
-protected TypedEvent newTypedEvent(Event event) {
- return new KeyEvent(event);
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_KeyListener.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_KeyListener.java
deleted file mode 100644
index 38dc542c70..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_KeyListener.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.events.KeyListener
- *
- * @see org.eclipse.swt.events.KeyListener
- */
-public class Test_org_eclipse_swt_events_KeyListener extends SwtTestCase {
-
-public Test_org_eclipse_swt_events_KeyListener(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
-}
-
-protected void tearDown() {
-}
-
-public void test_keyPressedLorg_eclipse_swt_events_KeyEvent() {
- warnUnimpl("Test test_keyPressedLorg_eclipse_swt_events_KeyEvent not written");
-}
-
-public void test_keyReleasedLorg_eclipse_swt_events_KeyEvent() {
- warnUnimpl("Test test_keyReleasedLorg_eclipse_swt_events_KeyEvent not written");
-}
-
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_events_KeyListener((String)e.nextElement()));
- }
- return suite;
-}
-
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_keyPressedLorg_eclipse_swt_events_KeyEvent");
- methodNames.addElement("test_keyReleasedLorg_eclipse_swt_events_KeyEvent");
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_keyPressedLorg_eclipse_swt_events_KeyEvent")) test_keyPressedLorg_eclipse_swt_events_KeyEvent();
- else if (getName().equals("test_keyReleasedLorg_eclipse_swt_events_KeyEvent")) test_keyReleasedLorg_eclipse_swt_events_KeyEvent();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_MenuAdapter.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_MenuAdapter.java
deleted file mode 100644
index 25aecd4755..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_MenuAdapter.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.events.MenuAdapter
- *
- * @see org.eclipse.swt.events.MenuAdapter
- */
-public class Test_org_eclipse_swt_events_MenuAdapter extends SwtTestCase {
-
-public Test_org_eclipse_swt_events_MenuAdapter(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
-}
-
-protected void tearDown() {
-}
-
-public void test_Constructor() {
- warnUnimpl("Test test_Constructor not written");
-}
-
-public void test_menuHiddenLorg_eclipse_swt_events_MenuEvent() {
- warnUnimpl("Test test_menuHiddenLorg_eclipse_swt_events_MenuEvent not written");
-}
-
-public void test_menuShownLorg_eclipse_swt_events_MenuEvent() {
- warnUnimpl("Test test_menuShownLorg_eclipse_swt_events_MenuEvent not written");
-}
-
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_events_MenuAdapter((String)e.nextElement()));
- }
- return suite;
-}
-
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_Constructor");
- methodNames.addElement("test_menuHiddenLorg_eclipse_swt_events_MenuEvent");
- methodNames.addElement("test_menuShownLorg_eclipse_swt_events_MenuEvent");
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_Constructor")) test_Constructor();
- else if (getName().equals("test_menuHiddenLorg_eclipse_swt_events_MenuEvent")) test_menuHiddenLorg_eclipse_swt_events_MenuEvent();
- else if (getName().equals("test_menuShownLorg_eclipse_swt_events_MenuEvent")) test_menuShownLorg_eclipse_swt_events_MenuEvent();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_MenuEvent.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_MenuEvent.java
deleted file mode 100644
index 53a95bd62b..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_MenuEvent.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import junit.framework.*;
-import junit.textui.*;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.widgets.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.events.MenuEvent
- *
- * @see org.eclipse.swt.events.MenuEvent
- */
-public class Test_org_eclipse_swt_events_MenuEvent extends Test_org_eclipse_swt_events_TypedEvent {
-
-public Test_org_eclipse_swt_events_MenuEvent(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- super.setUp();
-}
-
-protected void tearDown() {
- super.tearDown();
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_Event() {
- warnUnimpl("Test test_ConstructorLorg_eclipse_swt_widgets_Event not written");
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_events_MenuEvent((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_Event");
- methodNames.addAll(Test_org_eclipse_swt_events_TypedEvent.methodNames()); // add superclass method names
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_Event")) test_ConstructorLorg_eclipse_swt_widgets_Event();
- else super.runTest();
-}
-
-/* custom */
-protected TypedEvent newTypedEvent(Event event) {
- return new MenuEvent(event);
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_MenuListener.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_MenuListener.java
deleted file mode 100644
index 083b7495af..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_MenuListener.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.events.MenuListener
- *
- * @see org.eclipse.swt.events.MenuListener
- */
-public class Test_org_eclipse_swt_events_MenuListener extends SwtTestCase {
-
-public Test_org_eclipse_swt_events_MenuListener(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
-}
-
-protected void tearDown() {
-}
-
-public void test_menuHiddenLorg_eclipse_swt_events_MenuEvent() {
- warnUnimpl("Test test_menuHiddenLorg_eclipse_swt_events_MenuEvent not written");
-}
-
-public void test_menuShownLorg_eclipse_swt_events_MenuEvent() {
- warnUnimpl("Test test_menuShownLorg_eclipse_swt_events_MenuEvent not written");
-}
-
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_events_MenuListener((String)e.nextElement()));
- }
- return suite;
-}
-
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_menuHiddenLorg_eclipse_swt_events_MenuEvent");
- methodNames.addElement("test_menuShownLorg_eclipse_swt_events_MenuEvent");
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_menuHiddenLorg_eclipse_swt_events_MenuEvent")) test_menuHiddenLorg_eclipse_swt_events_MenuEvent();
- else if (getName().equals("test_menuShownLorg_eclipse_swt_events_MenuEvent")) test_menuShownLorg_eclipse_swt_events_MenuEvent();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_ModifyEvent.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_ModifyEvent.java
deleted file mode 100644
index 97503ae780..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_ModifyEvent.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import junit.framework.*;
-import junit.textui.*;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.widgets.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.events.ModifyEvent
- *
- * @see org.eclipse.swt.events.ModifyEvent
- */
-public class Test_org_eclipse_swt_events_ModifyEvent extends Test_org_eclipse_swt_events_TypedEvent {
-
-public Test_org_eclipse_swt_events_ModifyEvent(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- super.setUp();
-}
-
-protected void tearDown() {
- super.tearDown();
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_Event() {
- warnUnimpl("Test test_ConstructorLorg_eclipse_swt_widgets_Event not written");
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_events_ModifyEvent((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_Event");
- methodNames.addAll(Test_org_eclipse_swt_events_TypedEvent.methodNames()); // add superclass method names
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_Event")) test_ConstructorLorg_eclipse_swt_widgets_Event();
- else super.runTest();
-}
-
-/* custom */
-protected TypedEvent newTypedEvent(Event event) {
- return new ModifyEvent(event);
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_ModifyListener.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_ModifyListener.java
deleted file mode 100644
index ea45d564f7..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_ModifyListener.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.events.ModifyListener
- *
- * @see org.eclipse.swt.events.ModifyListener
- */
-public class Test_org_eclipse_swt_events_ModifyListener extends SwtTestCase {
-
-public Test_org_eclipse_swt_events_ModifyListener(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
-}
-
-protected void tearDown() {
-}
-
-public void test_modifyTextLorg_eclipse_swt_events_ModifyEvent() {
- warnUnimpl("Test test_modifyTextLorg_eclipse_swt_events_ModifyEvent not written");
-}
-
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_events_ModifyListener((String)e.nextElement()));
- }
- return suite;
-}
-
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_modifyTextLorg_eclipse_swt_events_ModifyEvent");
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_modifyTextLorg_eclipse_swt_events_ModifyEvent")) test_modifyTextLorg_eclipse_swt_events_ModifyEvent();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_MouseAdapter.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_MouseAdapter.java
deleted file mode 100644
index 0d85fb5487..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_MouseAdapter.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.events.MouseAdapter
- *
- * @see org.eclipse.swt.events.MouseAdapter
- */
-public class Test_org_eclipse_swt_events_MouseAdapter extends SwtTestCase {
-
-public Test_org_eclipse_swt_events_MouseAdapter(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
-}
-
-protected void tearDown() {
-}
-
-public void test_Constructor() {
- warnUnimpl("Test test_Constructor not written");
-}
-
-public void test_mouseDoubleClickLorg_eclipse_swt_events_MouseEvent() {
- warnUnimpl("Test test_mouseDoubleClickLorg_eclipse_swt_events_MouseEvent not written");
-}
-
-public void test_mouseDownLorg_eclipse_swt_events_MouseEvent() {
- warnUnimpl("Test test_mouseDownLorg_eclipse_swt_events_MouseEvent not written");
-}
-
-public void test_mouseUpLorg_eclipse_swt_events_MouseEvent() {
- warnUnimpl("Test test_mouseUpLorg_eclipse_swt_events_MouseEvent not written");
-}
-
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_events_MouseAdapter((String)e.nextElement()));
- }
- return suite;
-}
-
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_Constructor");
- methodNames.addElement("test_mouseDoubleClickLorg_eclipse_swt_events_MouseEvent");
- methodNames.addElement("test_mouseDownLorg_eclipse_swt_events_MouseEvent");
- methodNames.addElement("test_mouseUpLorg_eclipse_swt_events_MouseEvent");
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_Constructor")) test_Constructor();
- else if (getName().equals("test_mouseDoubleClickLorg_eclipse_swt_events_MouseEvent")) test_mouseDoubleClickLorg_eclipse_swt_events_MouseEvent();
- else if (getName().equals("test_mouseDownLorg_eclipse_swt_events_MouseEvent")) test_mouseDownLorg_eclipse_swt_events_MouseEvent();
- else if (getName().equals("test_mouseUpLorg_eclipse_swt_events_MouseEvent")) test_mouseUpLorg_eclipse_swt_events_MouseEvent();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_MouseEvent.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_MouseEvent.java
deleted file mode 100644
index 6e7e22a37c..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_MouseEvent.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import junit.framework.*;
-import junit.textui.*;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.widgets.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.events.MouseEvent
- *
- * @see org.eclipse.swt.events.MouseEvent
- */
-public class Test_org_eclipse_swt_events_MouseEvent extends Test_org_eclipse_swt_events_TypedEvent {
-
-public Test_org_eclipse_swt_events_MouseEvent(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- super.setUp();
-}
-
-protected void tearDown() {
- super.tearDown();
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_Event() {
- warnUnimpl("Test test_ConstructorLorg_eclipse_swt_widgets_Event not written");
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_events_MouseEvent((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_Event");
- methodNames.addAll(Test_org_eclipse_swt_events_TypedEvent.methodNames()); // add superclass method names
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_Event")) test_ConstructorLorg_eclipse_swt_widgets_Event();
- else super.runTest();
-}
-
-/* custom */
-protected TypedEvent newTypedEvent(Event event) {
- return new MouseEvent(event);
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_MouseListener.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_MouseListener.java
deleted file mode 100644
index 6b64e5d631..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_MouseListener.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.events.MouseListener
- *
- * @see org.eclipse.swt.events.MouseListener
- */
-public class Test_org_eclipse_swt_events_MouseListener extends SwtTestCase {
-
-public Test_org_eclipse_swt_events_MouseListener(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
-}
-
-protected void tearDown() {
-}
-
-public void test_mouseDoubleClickLorg_eclipse_swt_events_MouseEvent() {
- warnUnimpl("Test test_mouseDoubleClickLorg_eclipse_swt_events_MouseEvent not written");
-}
-
-public void test_mouseDownLorg_eclipse_swt_events_MouseEvent() {
- warnUnimpl("Test test_mouseDownLorg_eclipse_swt_events_MouseEvent not written");
-}
-
-public void test_mouseUpLorg_eclipse_swt_events_MouseEvent() {
- warnUnimpl("Test test_mouseUpLorg_eclipse_swt_events_MouseEvent not written");
-}
-
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_events_MouseListener((String)e.nextElement()));
- }
- return suite;
-}
-
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_mouseDoubleClickLorg_eclipse_swt_events_MouseEvent");
- methodNames.addElement("test_mouseDownLorg_eclipse_swt_events_MouseEvent");
- methodNames.addElement("test_mouseUpLorg_eclipse_swt_events_MouseEvent");
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_mouseDoubleClickLorg_eclipse_swt_events_MouseEvent")) test_mouseDoubleClickLorg_eclipse_swt_events_MouseEvent();
- else if (getName().equals("test_mouseDownLorg_eclipse_swt_events_MouseEvent")) test_mouseDownLorg_eclipse_swt_events_MouseEvent();
- else if (getName().equals("test_mouseUpLorg_eclipse_swt_events_MouseEvent")) test_mouseUpLorg_eclipse_swt_events_MouseEvent();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_MouseMoveListener.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_MouseMoveListener.java
deleted file mode 100644
index 19d134b0c6..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_MouseMoveListener.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.events.MouseMoveListener
- *
- * @see org.eclipse.swt.events.MouseMoveListener
- */
-public class Test_org_eclipse_swt_events_MouseMoveListener extends SwtTestCase {
-
-public Test_org_eclipse_swt_events_MouseMoveListener(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
-}
-
-protected void tearDown() {
-}
-
-public void test_mouseMoveLorg_eclipse_swt_events_MouseEvent() {
- warnUnimpl("Test test_mouseMoveLorg_eclipse_swt_events_MouseEvent not written");
-}
-
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_events_MouseMoveListener((String)e.nextElement()));
- }
- return suite;
-}
-
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_mouseMoveLorg_eclipse_swt_events_MouseEvent");
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_mouseMoveLorg_eclipse_swt_events_MouseEvent")) test_mouseMoveLorg_eclipse_swt_events_MouseEvent();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_MouseTrackAdapter.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_MouseTrackAdapter.java
deleted file mode 100644
index 976dd5dc23..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_MouseTrackAdapter.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.events.MouseTrackAdapter
- *
- * @see org.eclipse.swt.events.MouseTrackAdapter
- */
-public class Test_org_eclipse_swt_events_MouseTrackAdapter extends SwtTestCase {
-
-public Test_org_eclipse_swt_events_MouseTrackAdapter(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
-}
-
-protected void tearDown() {
-}
-
-public void test_Constructor() {
- warnUnimpl("Test test_Constructor not written");
-}
-
-public void test_mouseEnterLorg_eclipse_swt_events_MouseEvent() {
- warnUnimpl("Test test_mouseEnterLorg_eclipse_swt_events_MouseEvent not written");
-}
-
-public void test_mouseExitLorg_eclipse_swt_events_MouseEvent() {
- warnUnimpl("Test test_mouseExitLorg_eclipse_swt_events_MouseEvent not written");
-}
-
-public void test_mouseHoverLorg_eclipse_swt_events_MouseEvent() {
- warnUnimpl("Test test_mouseHoverLorg_eclipse_swt_events_MouseEvent not written");
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_events_MouseTrackAdapter((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_Constructor");
- methodNames.addElement("test_mouseEnterLorg_eclipse_swt_events_MouseEvent");
- methodNames.addElement("test_mouseExitLorg_eclipse_swt_events_MouseEvent");
- methodNames.addElement("test_mouseHoverLorg_eclipse_swt_events_MouseEvent");
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_Constructor")) test_Constructor();
- else if (getName().equals("test_mouseEnterLorg_eclipse_swt_events_MouseEvent")) test_mouseEnterLorg_eclipse_swt_events_MouseEvent();
- else if (getName().equals("test_mouseExitLorg_eclipse_swt_events_MouseEvent")) test_mouseExitLorg_eclipse_swt_events_MouseEvent();
- else if (getName().equals("test_mouseHoverLorg_eclipse_swt_events_MouseEvent")) test_mouseHoverLorg_eclipse_swt_events_MouseEvent();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_MouseTrackListener.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_MouseTrackListener.java
deleted file mode 100644
index 3c227950ff..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_MouseTrackListener.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.events.MouseTrackListener
- *
- * @see org.eclipse.swt.events.MouseTrackListener
- */
-public class Test_org_eclipse_swt_events_MouseTrackListener extends SwtTestCase {
-
-public Test_org_eclipse_swt_events_MouseTrackListener(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
-}
-
-protected void tearDown() {
-}
-
-public void test_mouseEnterLorg_eclipse_swt_events_MouseEvent() {
- warnUnimpl("Test test_mouseEnterLorg_eclipse_swt_events_MouseEvent not written");
-}
-
-public void test_mouseExitLorg_eclipse_swt_events_MouseEvent() {
- warnUnimpl("Test test_mouseExitLorg_eclipse_swt_events_MouseEvent not written");
-}
-
-public void test_mouseHoverLorg_eclipse_swt_events_MouseEvent() {
- warnUnimpl("Test test_mouseHoverLorg_eclipse_swt_events_MouseEvent not written");
-}
-
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_events_MouseTrackListener((String)e.nextElement()));
- }
- return suite;
-}
-
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_mouseEnterLorg_eclipse_swt_events_MouseEvent");
- methodNames.addElement("test_mouseExitLorg_eclipse_swt_events_MouseEvent");
- methodNames.addElement("test_mouseHoverLorg_eclipse_swt_events_MouseEvent");
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_mouseEnterLorg_eclipse_swt_events_MouseEvent")) test_mouseEnterLorg_eclipse_swt_events_MouseEvent();
- else if (getName().equals("test_mouseExitLorg_eclipse_swt_events_MouseEvent")) test_mouseExitLorg_eclipse_swt_events_MouseEvent();
- else if (getName().equals("test_mouseHoverLorg_eclipse_swt_events_MouseEvent")) test_mouseHoverLorg_eclipse_swt_events_MouseEvent();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_PaintEvent.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_PaintEvent.java
deleted file mode 100644
index 1dada76363..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_PaintEvent.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import junit.framework.*;
-import junit.textui.*;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.widgets.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.events.PaintEvent
- *
- * @see org.eclipse.swt.events.PaintEvent
- */
-public class Test_org_eclipse_swt_events_PaintEvent extends Test_org_eclipse_swt_events_TypedEvent {
-
-public Test_org_eclipse_swt_events_PaintEvent(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- super.setUp();
-}
-
-protected void tearDown() {
- super.tearDown();
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_Event() {
- warnUnimpl("Test test_ConstructorLorg_eclipse_swt_widgets_Event not written");
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_events_PaintEvent((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_Event");
- methodNames.addAll(Test_org_eclipse_swt_events_TypedEvent.methodNames()); // add superclass method names
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_Event")) test_ConstructorLorg_eclipse_swt_widgets_Event();
- else super.runTest();
-}
-
-/* custom */
-protected TypedEvent newTypedEvent(Event event) {
- return new PaintEvent(event);
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_PaintListener.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_PaintListener.java
deleted file mode 100644
index 1f6d17536d..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_PaintListener.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.events.PaintListener
- *
- * @see org.eclipse.swt.events.PaintListener
- */
-public class Test_org_eclipse_swt_events_PaintListener extends SwtTestCase {
-
-public Test_org_eclipse_swt_events_PaintListener(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
-}
-
-protected void tearDown() {
-}
-
-public void test_paintControlLorg_eclipse_swt_events_PaintEvent() {
- warnUnimpl("Test test_paintControlLorg_eclipse_swt_events_PaintEvent not written");
-}
-
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_events_PaintListener((String)e.nextElement()));
- }
- return suite;
-}
-
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_paintControlLorg_eclipse_swt_events_PaintEvent");
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_paintControlLorg_eclipse_swt_events_PaintEvent")) test_paintControlLorg_eclipse_swt_events_PaintEvent();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_SelectionAdapter.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_SelectionAdapter.java
deleted file mode 100644
index b60a7db43f..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_SelectionAdapter.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.events.SelectionAdapter
- *
- * @see org.eclipse.swt.events.SelectionAdapter
- */
-public class Test_org_eclipse_swt_events_SelectionAdapter extends SwtTestCase {
-
-public Test_org_eclipse_swt_events_SelectionAdapter(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
-}
-
-protected void tearDown() {
-}
-
-public void test_Constructor() {
- warnUnimpl("Test test_Constructor not written");
-}
-
-public void test_widgetDefaultSelectedLorg_eclipse_swt_events_SelectionEvent() {
- warnUnimpl("Test test_widgetDefaultSelectedLorg_eclipse_swt_events_SelectionEvent not written");
-}
-
-public void test_widgetSelectedLorg_eclipse_swt_events_SelectionEvent() {
- warnUnimpl("Test test_widgetSelectedLorg_eclipse_swt_events_SelectionEvent not written");
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_events_SelectionAdapter((String)e.nextElement()));
- }
- return suite;
-}
-
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_Constructor");
- methodNames.addElement("test_widgetDefaultSelectedLorg_eclipse_swt_events_SelectionEvent");
- methodNames.addElement("test_widgetSelectedLorg_eclipse_swt_events_SelectionEvent");
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_Constructor")) test_Constructor();
- else if (getName().equals("test_widgetDefaultSelectedLorg_eclipse_swt_events_SelectionEvent")) test_widgetDefaultSelectedLorg_eclipse_swt_events_SelectionEvent();
- else if (getName().equals("test_widgetSelectedLorg_eclipse_swt_events_SelectionEvent")) test_widgetSelectedLorg_eclipse_swt_events_SelectionEvent();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_SelectionEvent.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_SelectionEvent.java
deleted file mode 100644
index 3605d898a6..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_SelectionEvent.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import junit.framework.*;
-import junit.textui.*;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.widgets.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.events.SelectionEvent
- *
- * @see org.eclipse.swt.events.SelectionEvent
- */
-public class Test_org_eclipse_swt_events_SelectionEvent extends Test_org_eclipse_swt_events_TypedEvent {
-
-public Test_org_eclipse_swt_events_SelectionEvent(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- super.setUp();
-}
-
-protected void tearDown() {
- super.tearDown();
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_Event() {
- warnUnimpl("Test test_ConstructorLorg_eclipse_swt_widgets_Event not written");
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_events_SelectionEvent((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_Event");
- methodNames.addAll(Test_org_eclipse_swt_events_TypedEvent.methodNames()); // add superclass method names
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_Event")) test_ConstructorLorg_eclipse_swt_widgets_Event();
- else super.runTest();
-}
-
-/* custom */
-protected TypedEvent newTypedEvent(Event event) {
- return new SelectionEvent(event);
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_SelectionListener.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_SelectionListener.java
deleted file mode 100644
index faf57e7c9d..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_SelectionListener.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.events.SelectionListener
- *
- * @see org.eclipse.swt.events.SelectionListener
- */
-public class Test_org_eclipse_swt_events_SelectionListener extends SwtTestCase {
-
-public Test_org_eclipse_swt_events_SelectionListener(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
-}
-
-protected void tearDown() {
-}
-
-public void test_widgetDefaultSelectedLorg_eclipse_swt_events_SelectionEvent() {
- warnUnimpl("Test test_widgetDefaultSelectedLorg_eclipse_swt_events_SelectionEvent not written");
-}
-
-public void test_widgetSelectedLorg_eclipse_swt_events_SelectionEvent() {
- warnUnimpl("Test test_widgetSelectedLorg_eclipse_swt_events_SelectionEvent not written");
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_events_SelectionListener((String)e.nextElement()));
- }
- return suite;
-}
-
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_widgetDefaultSelectedLorg_eclipse_swt_events_SelectionEvent");
- methodNames.addElement("test_widgetSelectedLorg_eclipse_swt_events_SelectionEvent");
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_widgetDefaultSelectedLorg_eclipse_swt_events_SelectionEvent")) test_widgetDefaultSelectedLorg_eclipse_swt_events_SelectionEvent();
- else if (getName().equals("test_widgetSelectedLorg_eclipse_swt_events_SelectionEvent")) test_widgetSelectedLorg_eclipse_swt_events_SelectionEvent();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_ShellAdapter.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_ShellAdapter.java
deleted file mode 100644
index 016ec17449..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_ShellAdapter.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.events.ShellAdapter
- *
- * @see org.eclipse.swt.events.ShellAdapter
- */
-public class Test_org_eclipse_swt_events_ShellAdapter extends SwtTestCase {
-
-public Test_org_eclipse_swt_events_ShellAdapter(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
-}
-
-protected void tearDown() {
-}
-
-public void test_Constructor() {
- warnUnimpl("Test test_Constructor not written");
-}
-
-public void test_shellActivatedLorg_eclipse_swt_events_ShellEvent() {
- warnUnimpl("Test test_shellActivatedLorg_eclipse_swt_events_ShellEvent not written");
-}
-
-public void test_shellClosedLorg_eclipse_swt_events_ShellEvent() {
- warnUnimpl("Test test_shellClosedLorg_eclipse_swt_events_ShellEvent not written");
-}
-
-public void test_shellDeactivatedLorg_eclipse_swt_events_ShellEvent() {
- warnUnimpl("Test test_shellDeactivatedLorg_eclipse_swt_events_ShellEvent not written");
-}
-
-public void test_shellDeiconifiedLorg_eclipse_swt_events_ShellEvent() {
- warnUnimpl("Test test_shellDeiconifiedLorg_eclipse_swt_events_ShellEvent not written");
-}
-
-public void test_shellIconifiedLorg_eclipse_swt_events_ShellEvent() {
- warnUnimpl("Test test_shellIconifiedLorg_eclipse_swt_events_ShellEvent not written");
-}
-
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_events_ShellAdapter((String)e.nextElement()));
- }
- return suite;
-}
-
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_Constructor");
- methodNames.addElement("test_shellActivatedLorg_eclipse_swt_events_ShellEvent");
- methodNames.addElement("test_shellClosedLorg_eclipse_swt_events_ShellEvent");
- methodNames.addElement("test_shellDeactivatedLorg_eclipse_swt_events_ShellEvent");
- methodNames.addElement("test_shellDeiconifiedLorg_eclipse_swt_events_ShellEvent");
- methodNames.addElement("test_shellIconifiedLorg_eclipse_swt_events_ShellEvent");
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_Constructor")) test_Constructor();
- else if (getName().equals("test_shellActivatedLorg_eclipse_swt_events_ShellEvent")) test_shellActivatedLorg_eclipse_swt_events_ShellEvent();
- else if (getName().equals("test_shellClosedLorg_eclipse_swt_events_ShellEvent")) test_shellClosedLorg_eclipse_swt_events_ShellEvent();
- else if (getName().equals("test_shellDeactivatedLorg_eclipse_swt_events_ShellEvent")) test_shellDeactivatedLorg_eclipse_swt_events_ShellEvent();
- else if (getName().equals("test_shellDeiconifiedLorg_eclipse_swt_events_ShellEvent")) test_shellDeiconifiedLorg_eclipse_swt_events_ShellEvent();
- else if (getName().equals("test_shellIconifiedLorg_eclipse_swt_events_ShellEvent")) test_shellIconifiedLorg_eclipse_swt_events_ShellEvent();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_ShellEvent.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_ShellEvent.java
deleted file mode 100644
index 6939e3420f..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_ShellEvent.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import junit.framework.*;
-import junit.textui.*;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.widgets.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.events.ShellEvent
- *
- * @see org.eclipse.swt.events.ShellEvent
- */
-public class Test_org_eclipse_swt_events_ShellEvent extends Test_org_eclipse_swt_events_TypedEvent {
-
-public Test_org_eclipse_swt_events_ShellEvent(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- super.setUp();
-}
-
-protected void tearDown() {
- super.tearDown();
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_Event() {
- warnUnimpl("Test test_ConstructorLorg_eclipse_swt_widgets_Event not written");
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_events_ShellEvent((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_Event");
- methodNames.addAll(Test_org_eclipse_swt_events_TypedEvent.methodNames()); // add superclass method names
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_Event")) test_ConstructorLorg_eclipse_swt_widgets_Event();
- else super.runTest();
-}
-
-/* custom */
-protected TypedEvent newTypedEvent(Event event) {
- return new ShellEvent(event);
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_ShellListener.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_ShellListener.java
deleted file mode 100644
index 8708ccbfab..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_ShellListener.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.events.ShellListener
- *
- * @see org.eclipse.swt.events.ShellListener
- */
-public class Test_org_eclipse_swt_events_ShellListener extends SwtTestCase {
-
-public Test_org_eclipse_swt_events_ShellListener(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
-}
-
-protected void tearDown() {
-}
-
-public void test_shellActivatedLorg_eclipse_swt_events_ShellEvent() {
- warnUnimpl("Test test_shellActivatedLorg_eclipse_swt_events_ShellEvent not written");
-}
-
-public void test_shellClosedLorg_eclipse_swt_events_ShellEvent() {
- warnUnimpl("Test test_shellClosedLorg_eclipse_swt_events_ShellEvent not written");
-}
-
-public void test_shellDeactivatedLorg_eclipse_swt_events_ShellEvent() {
- warnUnimpl("Test test_shellDeactivatedLorg_eclipse_swt_events_ShellEvent not written");
-}
-
-public void test_shellDeiconifiedLorg_eclipse_swt_events_ShellEvent() {
- warnUnimpl("Test test_shellDeiconifiedLorg_eclipse_swt_events_ShellEvent not written");
-}
-
-public void test_shellIconifiedLorg_eclipse_swt_events_ShellEvent() {
- warnUnimpl("Test test_shellIconifiedLorg_eclipse_swt_events_ShellEvent not written");
-}
-
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_events_ShellListener((String)e.nextElement()));
- }
- return suite;
-}
-
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_shellActivatedLorg_eclipse_swt_events_ShellEvent");
- methodNames.addElement("test_shellClosedLorg_eclipse_swt_events_ShellEvent");
- methodNames.addElement("test_shellDeactivatedLorg_eclipse_swt_events_ShellEvent");
- methodNames.addElement("test_shellDeiconifiedLorg_eclipse_swt_events_ShellEvent");
- methodNames.addElement("test_shellIconifiedLorg_eclipse_swt_events_ShellEvent");
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_shellActivatedLorg_eclipse_swt_events_ShellEvent")) test_shellActivatedLorg_eclipse_swt_events_ShellEvent();
- else if (getName().equals("test_shellClosedLorg_eclipse_swt_events_ShellEvent")) test_shellClosedLorg_eclipse_swt_events_ShellEvent();
- else if (getName().equals("test_shellDeactivatedLorg_eclipse_swt_events_ShellEvent")) test_shellDeactivatedLorg_eclipse_swt_events_ShellEvent();
- else if (getName().equals("test_shellDeiconifiedLorg_eclipse_swt_events_ShellEvent")) test_shellDeiconifiedLorg_eclipse_swt_events_ShellEvent();
- else if (getName().equals("test_shellIconifiedLorg_eclipse_swt_events_ShellEvent")) test_shellIconifiedLorg_eclipse_swt_events_ShellEvent();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_TraverseEvent.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_TraverseEvent.java
deleted file mode 100644
index ac42e15089..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_TraverseEvent.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import junit.framework.*;
-import junit.textui.*;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.widgets.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.events.TraverseEvent
- *
- * @see org.eclipse.swt.events.TraverseEvent
- */
-public class Test_org_eclipse_swt_events_TraverseEvent extends Test_org_eclipse_swt_events_KeyEvent {
-
-public Test_org_eclipse_swt_events_TraverseEvent(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- super.setUp();
-}
-
-protected void tearDown() {
- super.tearDown();
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_Event() {
- warnUnimpl("Test test_ConstructorLorg_eclipse_swt_widgets_Event not written");
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_events_TraverseEvent((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_Event");
- methodNames.addAll(Test_org_eclipse_swt_events_KeyEvent.methodNames()); // add superclass method names
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_Event")) test_ConstructorLorg_eclipse_swt_widgets_Event();
- else super.runTest();
-}
-
-/* custom */
-protected TypedEvent newTypedEvent(Event event) {
- return new TraverseEvent(event);
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_TraverseListener.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_TraverseListener.java
deleted file mode 100644
index 369d89c64a..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_TraverseListener.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.events.TraverseListener
- *
- * @see org.eclipse.swt.events.TraverseListener
- */
-public class Test_org_eclipse_swt_events_TraverseListener extends SwtTestCase {
-
-public Test_org_eclipse_swt_events_TraverseListener(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
-}
-
-protected void tearDown() {
-}
-
-public void test_keyTraversedLorg_eclipse_swt_events_TraverseEvent() {
- warnUnimpl("Test test_keyTraversedLorg_eclipse_swt_events_TraverseEvent not written");
-}
-
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_events_TraverseListener((String)e.nextElement()));
- }
- return suite;
-}
-
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_keyTraversedLorg_eclipse_swt_events_TraverseEvent");
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_keyTraversedLorg_eclipse_swt_events_TraverseEvent")) test_keyTraversedLorg_eclipse_swt_events_TraverseEvent();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_TreeAdapter.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_TreeAdapter.java
deleted file mode 100644
index ac6fdf2ab3..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_TreeAdapter.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.events.TreeAdapter
- *
- * @see org.eclipse.swt.events.TreeAdapter
- */
-public class Test_org_eclipse_swt_events_TreeAdapter extends SwtTestCase {
-
-public Test_org_eclipse_swt_events_TreeAdapter(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
-}
-
-protected void tearDown() {
-}
-
-public void test_Constructor() {
- warnUnimpl("Test test_Constructor not written");
-}
-
-public void test_treeCollapsedLorg_eclipse_swt_events_TreeEvent() {
- warnUnimpl("Test test_treeCollapsedLorg_eclipse_swt_events_TreeEvent not written");
-}
-
-public void test_treeExpandedLorg_eclipse_swt_events_TreeEvent() {
- warnUnimpl("Test test_treeExpandedLorg_eclipse_swt_events_TreeEvent not written");
-}
-
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_events_TreeAdapter((String)e.nextElement()));
- }
- return suite;
-}
-
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_Constructor");
- methodNames.addElement("test_treeCollapsedLorg_eclipse_swt_events_TreeEvent");
- methodNames.addElement("test_treeExpandedLorg_eclipse_swt_events_TreeEvent");
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_Constructor")) test_Constructor();
- else if (getName().equals("test_treeCollapsedLorg_eclipse_swt_events_TreeEvent")) test_treeCollapsedLorg_eclipse_swt_events_TreeEvent();
- else if (getName().equals("test_treeExpandedLorg_eclipse_swt_events_TreeEvent")) test_treeExpandedLorg_eclipse_swt_events_TreeEvent();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_TreeEvent.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_TreeEvent.java
deleted file mode 100644
index 77e5a3e1fa..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_TreeEvent.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import junit.framework.*;
-import junit.textui.*;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.widgets.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.events.TreeEvent
- *
- * @see org.eclipse.swt.events.TreeEvent
- */
-public class Test_org_eclipse_swt_events_TreeEvent extends Test_org_eclipse_swt_events_SelectionEvent {
-
-public Test_org_eclipse_swt_events_TreeEvent(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- super.setUp();
-}
-
-protected void tearDown() {
- super.tearDown();
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_Event() {
- warnUnimpl("Test test_ConstructorLorg_eclipse_swt_widgets_Event not written");
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_events_TreeEvent((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_Event");
- methodNames.addAll(Test_org_eclipse_swt_events_SelectionEvent.methodNames()); // add superclass method names
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_Event")) test_ConstructorLorg_eclipse_swt_widgets_Event();
- else super.runTest();
-}
-
-/* custom */
-protected TypedEvent newTypedEvent(Event event) {
- return new TreeEvent(event);
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_TreeListener.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_TreeListener.java
deleted file mode 100644
index 78eda5d61b..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_TreeListener.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.events.TreeListener
- *
- * @see org.eclipse.swt.events.TreeListener
- */
-public class Test_org_eclipse_swt_events_TreeListener extends SwtTestCase {
-
-public Test_org_eclipse_swt_events_TreeListener(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
-}
-
-protected void tearDown() {
-}
-
-public void test_treeCollapsedLorg_eclipse_swt_events_TreeEvent() {
- warnUnimpl("Test test_treeCollapsedLorg_eclipse_swt_events_TreeEvent not written");
-}
-
-public void test_treeExpandedLorg_eclipse_swt_events_TreeEvent() {
- warnUnimpl("Test test_treeExpandedLorg_eclipse_swt_events_TreeEvent not written");
-}
-
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_events_TreeListener((String)e.nextElement()));
- }
- return suite;
-}
-
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_treeCollapsedLorg_eclipse_swt_events_TreeEvent");
- methodNames.addElement("test_treeExpandedLorg_eclipse_swt_events_TreeEvent");
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_treeCollapsedLorg_eclipse_swt_events_TreeEvent")) test_treeCollapsedLorg_eclipse_swt_events_TreeEvent();
- else if (getName().equals("test_treeExpandedLorg_eclipse_swt_events_TreeEvent")) test_treeExpandedLorg_eclipse_swt_events_TreeEvent();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_TypedEvent.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_TypedEvent.java
deleted file mode 100644
index a948ab60b8..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_TypedEvent.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import junit.framework.*;
-import junit.textui.*;
-
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.widgets.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.events.TypedEvent
- *
- * @see org.eclipse.swt.events.TypedEvent
- */
-public class Test_org_eclipse_swt_events_TypedEvent extends SwtTestCase {
-
-public Test_org_eclipse_swt_events_TypedEvent(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- shell = new Shell();
-}
-
-protected void tearDown() {
- shell.dispose();
-}
-
-public void test_ConstructorLjava_lang_Object() {
- warnUnimpl("Test test_ConstructorLjava_lang_Object not written");
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_Event() {
- Event event = new Event();
- event.widget = shell;
- TypedEvent typedEvent = newTypedEvent(event);
- assertNotNull(typedEvent);
-}
-
-public void test_toString() {
- Event event = new Event();
- event.widget = shell;
- TypedEvent typedEvent = newTypedEvent(event);
- assertNotNull(typedEvent.toString());
- assertTrue(typedEvent.toString().length() > 0);
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_events_TypedEvent((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLjava_lang_Object");
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_Event");
- methodNames.addElement("test_toString");
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLjava_lang_Object")) test_ConstructorLjava_lang_Object();
- else if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_Event")) test_ConstructorLorg_eclipse_swt_widgets_Event();
- else if (getName().equals("test_toString")) test_toString();
-}
-
-/* custom */
-public Shell shell;
-
-protected TypedEvent newTypedEvent(Event event) {
- return new TypedEvent(event);
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_VerifyEvent.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_VerifyEvent.java
deleted file mode 100644
index 3b81f203c9..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_VerifyEvent.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import junit.framework.*;
-import junit.textui.*;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.widgets.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.events.VerifyEvent
- *
- * @see org.eclipse.swt.events.VerifyEvent
- */
-public class Test_org_eclipse_swt_events_VerifyEvent extends Test_org_eclipse_swt_events_KeyEvent {
-
-public Test_org_eclipse_swt_events_VerifyEvent(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- super.setUp();
-}
-
-protected void tearDown() {
- super.tearDown();
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_Event() {
- warnUnimpl("Test test_ConstructorLorg_eclipse_swt_widgets_Event not written");
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_events_VerifyEvent((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_Event");
- methodNames.addAll(Test_org_eclipse_swt_events_KeyEvent.methodNames()); // add superclass method names
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_Event")) test_ConstructorLorg_eclipse_swt_widgets_Event();
- else super.runTest();
-}
-
-/* custom */
-protected TypedEvent newTypedEvent(Event event) {
- return new VerifyEvent(event);
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_VerifyListener.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_VerifyListener.java
deleted file mode 100644
index 0b9c676949..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_events_VerifyListener.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.events.VerifyListener
- *
- * @see org.eclipse.swt.events.VerifyListener
- */
-public class Test_org_eclipse_swt_events_VerifyListener extends SwtTestCase {
-
-public Test_org_eclipse_swt_events_VerifyListener(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
-}
-
-protected void tearDown() {
-}
-
-public void test_verifyTextLorg_eclipse_swt_events_VerifyEvent() {
- warnUnimpl("Test test_verifyTextLorg_eclipse_swt_events_VerifyEvent not written");
-}
-
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_events_VerifyListener((String)e.nextElement()));
- }
- return suite;
-}
-
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_verifyTextLorg_eclipse_swt_events_VerifyEvent");
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_verifyTextLorg_eclipse_swt_events_VerifyEvent")) test_verifyTextLorg_eclipse_swt_events_VerifyEvent();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_Color.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_Color.java
deleted file mode 100644
index 391b1714fb..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_Color.java
+++ /dev/null
@@ -1,288 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.graphics.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.graphics.Color
- *
- * @see org.eclipse.swt.graphics.Color
- */
-public class Test_org_eclipse_swt_graphics_Color extends SwtTestCase {
-
-public Test_org_eclipse_swt_graphics_Color(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- display = Display.getDefault();
-}
-
-protected void tearDown() {
-}
-
-public void test_ConstructorLorg_eclipse_swt_graphics_DeviceIII() {
- // Test new Color(Device device, int red, int green, int blue)
- // IllegalArgumentException if the red, green or blue argument is not between 0 and 255
-
- // valid color (black)
- Color color = new Color(display, 0, 0, 0);
- color.dispose();
-
- // valid color (white)
- color = new Color(display, 255, 255, 255);
- color.dispose();
-
- // valid color (random grey)
- color = new Color(display, 20, 20, 20);
- color.dispose();
-
- // valid color (random)
- color = new Color(display, 102, 255, 0);
- color.dispose();
-
- // device == null (valid)
- color = new Color(null, 0, 0, 0);
- color.dispose();
-
- // illegal argument, rgb < 0
- try {
- color = new Color(display, -10, -10, -10);
- color.dispose();
- fail("No exception thrown for rgb < 0");
- } catch (IllegalArgumentException e) {
- }
-
- // illegal argument, rgb > 255
- try {
- color = new Color(display, 1000, 2000, 3000);
- color.dispose();
- fail("No exception thrown for rgb > 255");
- } catch (IllegalArgumentException e) {
- }
- // illegal argument, blue > 255
- try {
- color = new Color(display, 10, 10, 256);
- color.dispose();
- fail("No exception thrown for blue > 255");
- } catch (IllegalArgumentException e) {
- }
-}
-
-public void test_ConstructorLorg_eclipse_swt_graphics_DeviceLorg_eclipse_swt_graphics_RGB() {
- // Test new Color(Device device, RGB rgb)
- // IllegalArgumentException if the red, green or blue argument is not between 0 and 255; or rgb is null
-
- // valid color (black)
- Color color = new Color(display, new RGB(0, 0, 0));
- color.dispose();
-
- // valid color (white)
- color = new Color(display, new RGB(255, 255, 255));
- color.dispose();
-
- // valid color (random grey)
- color = new Color(display, new RGB(10, 10, 10));
- color.dispose();
-
- // valid color (random)
- color = new Color(display, new RGB(102, 255, 0));
- color.dispose();
-
- // device == null (valid)
- color = new Color(null, new RGB(0, 0, 0));
- color.dispose();
-
- // illegal argument, rgb < 0
- try {
- color = new Color(display, new RGB(-10, -10, -10));
- color.dispose();
- fail("No exception thrown for rgb < 0");
- }
- catch (IllegalArgumentException e) {
- }
- // illegal argument, rgb > 255
- try {
- color = new Color(display, new RGB(1000, 2000, 3000));
- color.dispose();
- fail("No exception thrown for rgb > 255");
- }
- catch (IllegalArgumentException e) {
- }
- // illegal argument, blue > 255
- try {
- color = new Color(display, new RGB(10, 10, 256));
- color.dispose();
- fail("No exception thrown for blue > 255");
- }
- catch (IllegalArgumentException e) {
- }
-
- // illegal argument, rgb == null
- try {
- color = new Color(display, null);
- color.dispose();
- fail("No exception thrown for rgb == null");
- }
- catch (IllegalArgumentException e) {
- }
-}
-
-public void test_dispose() {
- // tested in test_isDisposed
-}
-
-public void test_equalsLjava_lang_Object() {
- Color color = new Color(display, 1, 2, 3);
- Color sameColor = new Color(display, 1, 2, 3);
- Color sameColor2 = new Color(display, new RGB(1, 2, 3));
- Color otherColor = new Color(display, 5, 6, 7);
- try {
- // Test Color.equals(Object)
- assertTrue("!color.equals((Object)null)", !color.equals((Object)null));
-
- // Test Color.equals(Color)
- assertTrue("!color.equals((Color)null)", !color.equals((Color)null));
- assertTrue("color.equals(color)", color.equals(color));
- assertTrue("color.equals(sameColor)", color.equals(sameColor));
- assertTrue("color.equals(sameColor2)", color.equals(sameColor2));
- assertTrue("!color.equals(otherColor)", !color.equals(otherColor));
- } finally {
- color.dispose();
- sameColor.dispose();
- sameColor2.dispose();
- otherColor.dispose();
- }
-}
-
-public void test_getBlue() {
- // Test Color.getBlue()
- Color color = new Color(display, 0, 0, 255);
- try {
- assertEquals("color.getBlue()", color.getBlue(), 255);
- } finally {
- color.dispose();
- }
-
-}
-
-public void test_getGreen() {
- // Test Color.getGreen()
- Color color = new Color(display, 0, 255, 0);
- try {
- assertEquals("color.getGreen()", color.getGreen(), 255);
- } finally {
- color.dispose();
- }
-}
-
-public void test_getRGB() {
- Color color = new Color(display, 255, 255, 255);
- assertNotNull(color.getRGB());
- assertEquals(new RGB(255, 255, 255), color.getRGB());
-}
-
-public void test_getRed() {
- // Test Color.getRed()
- Color color = new Color(display, 255, 0, 0);
- try {
- assertEquals("color.getRed()", color.getRed(), 255);
- } finally {
- color.dispose();
- }
-}
-
-public void test_hashCode() {
- Color color = new Color(display, 12, 34, 56);
- Color otherColor = new Color(display, 12, 34, 56);
- if (color.equals(otherColor)) {
- assertEquals("Hash codes of equal objects should be equal", color.hashCode(), otherColor.hashCode());
- }
-}
-
-public void test_isDisposed() {
- // Test Color.isDisposed() false
- Color color = new Color(display, 34, 67, 98);
- try {
- assertTrue("Color should not be disposed", !color.isDisposed());
- } finally {
- // Test Color.isDisposed() true
- color.dispose();
- assertTrue("Color should be disposed", color.isDisposed());
- }
-}
-
-public void test_toString() {
- Color color = new Color(display, 0, 0, 255);
- try {
- assertNotNull(color.toString());
- assertTrue(color.toString().length() > 0);
- assertEquals("Color {0, 0, 255}", color.toString());
- } finally {
- color.dispose();
- }
-}
-
-public void test_win32_newLorg_eclipse_swt_graphics_DeviceI() {
- // do not test - Windows platform only
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_graphics_Color((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_graphics_DeviceIII");
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_graphics_DeviceLorg_eclipse_swt_graphics_RGB");
- methodNames.addElement("test_dispose");
- methodNames.addElement("test_equalsLjava_lang_Object");
- methodNames.addElement("test_getBlue");
- methodNames.addElement("test_getGreen");
- methodNames.addElement("test_getRGB");
- methodNames.addElement("test_getRed");
- methodNames.addElement("test_hashCode");
- methodNames.addElement("test_isDisposed");
- methodNames.addElement("test_toString");
- methodNames.addElement("test_win32_newLorg_eclipse_swt_graphics_DeviceI");
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLorg_eclipse_swt_graphics_DeviceIII")) test_ConstructorLorg_eclipse_swt_graphics_DeviceIII();
- else if (getName().equals("test_ConstructorLorg_eclipse_swt_graphics_DeviceLorg_eclipse_swt_graphics_RGB")) test_ConstructorLorg_eclipse_swt_graphics_DeviceLorg_eclipse_swt_graphics_RGB();
- else if (getName().equals("test_dispose")) test_dispose();
- else if (getName().equals("test_equalsLjava_lang_Object")) test_equalsLjava_lang_Object();
- else if (getName().equals("test_getBlue")) test_getBlue();
- else if (getName().equals("test_getGreen")) test_getGreen();
- else if (getName().equals("test_getRGB")) test_getRGB();
- else if (getName().equals("test_getRed")) test_getRed();
- else if (getName().equals("test_hashCode")) test_hashCode();
- else if (getName().equals("test_isDisposed")) test_isDisposed();
- else if (getName().equals("test_toString")) test_toString();
- else if (getName().equals("test_win32_newLorg_eclipse_swt_graphics_DeviceI")) test_win32_newLorg_eclipse_swt_graphics_DeviceI();
-}
-
-/* custom */
-Display display;
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_Cursor.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_Cursor.java
deleted file mode 100644
index fcb975e5cd..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_Cursor.java
+++ /dev/null
@@ -1,248 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import java.io.*;
-
-import junit.framework.*;
-import junit.textui.TestRunner;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.widgets.Display;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.graphics.Cursor
- *
- * @see org.eclipse.swt.graphics.Cursor
- */
-public class Test_org_eclipse_swt_graphics_Cursor extends SwtTestCase {
-
-public Test_org_eclipse_swt_graphics_Cursor(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- display = Display.getDefault();
-}
-
-protected void tearDown() {
-}
-
-public void test_ConstructorLorg_eclipse_swt_graphics_DeviceI() {
- // Test new Cursor(Device device, int style)
- // IllegalArgumentException when an unknown style is specified
-
- Cursor cursor = new Cursor(display, SWT.CURSOR_ARROW);
- cursor.dispose();
-
- cursor = new Cursor(display, SWT.CURSOR_WAIT);
- cursor.dispose();
-
- cursor = new Cursor(display, SWT.CURSOR_CROSS);
- cursor.dispose();
-
- cursor = new Cursor(display, SWT.CURSOR_APPSTARTING);
- cursor.dispose();
-
- cursor = new Cursor(display, SWT.CURSOR_HELP);
- cursor.dispose();
-
- cursor = new Cursor(display, SWT.CURSOR_SIZEALL);
- cursor.dispose();
-
- cursor = new Cursor(display, SWT.CURSOR_SIZENESW);
- cursor.dispose();
-
- cursor = new Cursor(display, SWT.CURSOR_SIZENS);
- cursor.dispose();
-
- cursor = new Cursor(display, SWT.CURSOR_SIZENWSE);
- cursor.dispose();
-
- cursor = new Cursor(display, SWT.CURSOR_SIZEWE);
- cursor.dispose();
-
- cursor = new Cursor(display, SWT.CURSOR_SIZEN);
- cursor.dispose();
-
- cursor = new Cursor(display, SWT.CURSOR_SIZES);
- cursor.dispose();
-
- cursor = new Cursor(display, SWT.CURSOR_SIZEE);
- cursor.dispose();
-
- cursor = new Cursor(display, SWT.CURSOR_SIZEW);
- cursor.dispose();
-
- cursor = new Cursor(display, SWT.CURSOR_SIZENE);
- cursor.dispose();
-
- cursor = new Cursor(display, SWT.CURSOR_SIZESE);
- cursor.dispose();
-
- cursor = new Cursor(display, SWT.CURSOR_SIZESW);
- cursor.dispose();
-
- cursor = new Cursor(display, SWT.CURSOR_SIZENW);
- cursor.dispose();
-
- cursor = new Cursor(display, SWT.CURSOR_UPARROW);
- cursor.dispose();
-
- cursor = new Cursor(display, SWT.CURSOR_IBEAM);
- cursor.dispose();
-
- cursor = new Cursor(display, SWT.CURSOR_NO);
- cursor.dispose();
-
- cursor = new Cursor(display, SWT.CURSOR_HAND);
- cursor.dispose();
-
- // device == null (valid)
- cursor = new Cursor(null, SWT.CURSOR_ARROW);
- cursor.dispose();
-
- // illegal argument, style > SWT.CURSOR_HAND (21)
- try {
- cursor = new Cursor(display, 100);
- cursor.dispose();
- fail("No exception thrown for style > SWT.CURSOR_HAND (21)");
- } catch (IllegalArgumentException e) {
- }
-
- // illegal argument, style < 0
- try {
- cursor = new Cursor(display, -100);
- cursor.dispose();
- fail("No exception thrown for style < 0");
- } catch (IllegalArgumentException e) {
- }
-}
-
-public void test_ConstructorLorg_eclipse_swt_graphics_DeviceLorg_eclipse_swt_graphics_ImageDataII() {
- warnUnimpl("Test test_ConstructorLorg_eclipse_swt_graphics_DeviceLorg_eclipse_swt_graphics_ImageDataII not written");
-}
-
-public void test_ConstructorLorg_eclipse_swt_graphics_DeviceLorg_eclipse_swt_graphics_ImageDataLorg_eclipse_swt_graphics_ImageDataII() {
- // Test new Cursor(Device device, ImageData source, ImageData mask, int hotspotX, int hotspotY)
- int numFormats = SwtTestCase.imageFormats.length;
- String fileName = SwtTestCase.imageFilenames[0];
- for (int i=0; i<numFormats; i++) {
- String format = SwtTestCase.imageFormats[i];
- ImageLoader loader = new ImageLoader();
- InputStream stream = SwtTestCase.class.getResourceAsStream(fileName + "." + format);
- ImageData source = loader.load(stream)[0];
- ImageData mask = source.getTransparencyMask();
- if (mask != null && (source.depth == 1)) {
- Cursor cursor = new Cursor(display, source, mask, 0, 0);
- cursor.dispose();
- }
- try {
- stream.close();
- } catch (IOException e) {
- // continue;
- }
- }
-}
-public void test_dispose() {
- // tested in test_isDisposed
-}
-
-public void test_equalsLjava_lang_Object() {
- /* Note: Two cursors are only considered equal if their handles are equal.
- * So since Windows reuses cursor handles, and other platforms do not,
- * it does not make sense to test whether cursor.equals(sameCursor).
- */
- Cursor cursor = new Cursor(display, SWT.CURSOR_WAIT);
- Cursor otherCursor = new Cursor(display, SWT.CURSOR_CROSS);
- try {
- // Test Cursor.equals(Object)
- assertTrue("!cursor.equals((Object)null)", !cursor.equals((Object)null));
-
- // Test Cursor.equals(Cursor)
- assertTrue("!cursor.equals((Cursor)null)", !cursor.equals((Cursor)null));
- assertTrue("cursor.equals(cursor)", cursor.equals(cursor));
- assertTrue("!cursor.equals(otherCursor)", !cursor.equals(otherCursor));
- } finally {
- cursor.dispose();
- otherCursor.dispose();
- }
-}
-
-public void test_hashCode() {
- warnUnimpl("Test test_hashCode not written");
-}
-
-public void test_isDisposed() {
- // Test Cursor.isDisposed() false
- Cursor cursor = new Cursor(display, SWT.CURSOR_WAIT);
- try {
- assertTrue("Cursor should not be disposed", !cursor.isDisposed());
- } finally {
- // Test Cursor.isDisposed() true
- cursor.dispose();
- assertTrue("Cursor should be disposed", cursor.isDisposed());
- }
-}
-
-public void test_toString() {
- Cursor cursor = new Cursor(display, SWT.CURSOR_WAIT);
- assertNotNull(cursor.toString());
- assertTrue(cursor.toString().length() > 0);
-}
-
-public void test_win32_newLorg_eclipse_swt_graphics_DeviceI() {
- // do not test - Windows only
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_graphics_Cursor((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_graphics_DeviceI");
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_graphics_DeviceLorg_eclipse_swt_graphics_ImageDataII");
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_graphics_DeviceLorg_eclipse_swt_graphics_ImageDataLorg_eclipse_swt_graphics_ImageDataII");
- methodNames.addElement("test_dispose");
- methodNames.addElement("test_equalsLjava_lang_Object");
- methodNames.addElement("test_hashCode");
- methodNames.addElement("test_isDisposed");
- methodNames.addElement("test_toString");
- methodNames.addElement("test_win32_newLorg_eclipse_swt_graphics_DeviceI");
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLorg_eclipse_swt_graphics_DeviceI")) test_ConstructorLorg_eclipse_swt_graphics_DeviceI();
- else if (getName().equals("test_ConstructorLorg_eclipse_swt_graphics_DeviceLorg_eclipse_swt_graphics_ImageDataII")) test_ConstructorLorg_eclipse_swt_graphics_DeviceLorg_eclipse_swt_graphics_ImageDataII();
- else if (getName().equals("test_ConstructorLorg_eclipse_swt_graphics_DeviceLorg_eclipse_swt_graphics_ImageDataLorg_eclipse_swt_graphics_ImageDataII")) test_ConstructorLorg_eclipse_swt_graphics_DeviceLorg_eclipse_swt_graphics_ImageDataLorg_eclipse_swt_graphics_ImageDataII();
- else if (getName().equals("test_dispose")) test_dispose();
- else if (getName().equals("test_equalsLjava_lang_Object")) test_equalsLjava_lang_Object();
- else if (getName().equals("test_hashCode")) test_hashCode();
- else if (getName().equals("test_isDisposed")) test_isDisposed();
- else if (getName().equals("test_toString")) test_toString();
- else if (getName().equals("test_win32_newLorg_eclipse_swt_graphics_DeviceI")) test_win32_newLorg_eclipse_swt_graphics_DeviceI();
-}
-
-/* custom */
-Display display;
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_Device.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_Device.java
deleted file mode 100644
index 3e13caf936..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_Device.java
+++ /dev/null
@@ -1,158 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.graphics.Device
- *
- * @see org.eclipse.swt.graphics.Device
- */
-public class Test_org_eclipse_swt_graphics_Device extends SwtTestCase {
-
-public Test_org_eclipse_swt_graphics_Device(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
-}
-
-protected void tearDown() {
-}
-
-public void test_ConstructorLorg_eclipse_swt_graphics_DeviceData() {
- // Device is abstract - test in subclasses
- warnUnimpl("Test test_ConstructorLorg_eclipse_swt_graphics_DeviceData not written");
-}
-
-public void test_dispose() {
- // Device is abstract - test in subclasses
- warnUnimpl("Test test_dispose not written");
-}
-
-public void test_getBounds() {
- // Device is abstract - test in subclasses
- warnUnimpl("Test test_getBounds not written");
-}
-
-public void test_getClientArea() {
- // Device is abstract - test in subclasses
- warnUnimpl("Test test_getClientArea not written");
-}
-
-public void test_getDPI() {
- // Device is abstract - test in subclasses
- warnUnimpl("Test test_getDPI not written");
-}
-
-public void test_getDepth() {
- // Device is abstract - test in subclasses
- warnUnimpl("Test test_getDepth not written");
-}
-
-public void test_getDeviceData() {
- // Device is abstract - test in subclasses
- warnUnimpl("Test test_getDeviceData not written");
-}
-
-public void test_getFontListLjava_lang_StringZ() {
- // Device is abstract - test in subclasses
- warnUnimpl("Test test_getFontListLjava_lang_StringZ not written");
-}
-
-public void test_getSystemColorI() {
- // Device is abstract - test in subclasses
- warnUnimpl("Test test_getSystemColorI not written");
-}
-
-public void test_getSystemFont() {
- // Device is abstract - test in subclasses
- warnUnimpl("Test test_getSystemFont not written");
-}
-
-public void test_getWarnings() {
- // Device is abstract - test in subclasses
- warnUnimpl("Test test_getWarnings not written");
-}
-
-public void test_internal_dispose_GCILorg_eclipse_swt_graphics_GCData() {
- // Device is abstract - test in subclasses
- warnUnimpl("Test test_internal_dispose_GCILorg_eclipse_swt_graphics_GCData not written");
-}
-
-public void test_internal_new_GCLorg_eclipse_swt_graphics_GCData() {
- // Device is abstract - test in subclasses
- warnUnimpl("Test test_internal_new_GCLorg_eclipse_swt_graphics_GCData not written");
-}
-
-public void test_isDisposed() {
- // Device is abstract - test in subclasses
- warnUnimpl("Test test_isDisposed not written");
-}
-
-public void test_setWarningsZ() {
- // Device is abstract - test in subclasses
- warnUnimpl("Test test_setWarningsZ not written");
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_graphics_Device((String)e.nextElement()));
- }
- return suite;
-}
-
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_graphics_DeviceData");
- methodNames.addElement("test_dispose");
- methodNames.addElement("test_getBounds");
- methodNames.addElement("test_getClientArea");
- methodNames.addElement("test_getDPI");
- methodNames.addElement("test_getDepth");
- methodNames.addElement("test_getDeviceData");
- methodNames.addElement("test_getFontListLjava_lang_StringZ");
- methodNames.addElement("test_getSystemColorI");
- methodNames.addElement("test_getSystemFont");
- methodNames.addElement("test_getWarnings");
- methodNames.addElement("test_internal_dispose_GCILorg_eclipse_swt_graphics_GCData");
- methodNames.addElement("test_internal_new_GCLorg_eclipse_swt_graphics_GCData");
- methodNames.addElement("test_isDisposed");
- methodNames.addElement("test_setWarningsZ");
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLorg_eclipse_swt_graphics_DeviceData")) test_ConstructorLorg_eclipse_swt_graphics_DeviceData();
- else if (getName().equals("test_dispose")) test_dispose();
- else if (getName().equals("test_getBounds")) test_getBounds();
- else if (getName().equals("test_getClientArea")) test_getClientArea();
- else if (getName().equals("test_getDPI")) test_getDPI();
- else if (getName().equals("test_getDepth")) test_getDepth();
- else if (getName().equals("test_getDeviceData")) test_getDeviceData();
- else if (getName().equals("test_getFontListLjava_lang_StringZ")) test_getFontListLjava_lang_StringZ();
- else if (getName().equals("test_getSystemColorI")) test_getSystemColorI();
- else if (getName().equals("test_getSystemFont")) test_getSystemFont();
- else if (getName().equals("test_getWarnings")) test_getWarnings();
- else if (getName().equals("test_internal_dispose_GCILorg_eclipse_swt_graphics_GCData")) test_internal_dispose_GCILorg_eclipse_swt_graphics_GCData();
- else if (getName().equals("test_internal_new_GCLorg_eclipse_swt_graphics_GCData")) test_internal_new_GCLorg_eclipse_swt_graphics_GCData();
- else if (getName().equals("test_isDisposed")) test_isDisposed();
- else if (getName().equals("test_setWarningsZ")) test_setWarningsZ();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_DeviceData.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_DeviceData.java
deleted file mode 100644
index c761475518..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_DeviceData.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import junit.framework.*;
-import junit.textui.*;
-import org.eclipse.swt.graphics.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.graphics.DeviceData
- *
- * @see org.eclipse.swt.graphics.DeviceData
- */
-public class Test_org_eclipse_swt_graphics_DeviceData extends SwtTestCase {
-
-public Test_org_eclipse_swt_graphics_DeviceData(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
-}
-
-protected void tearDown() {
-}
-
-public void test_Constructor() {
- DeviceData data = new DeviceData();
- data.debug = true;
- data.tracking = true;
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_graphics_DeviceData((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_Constructor");
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_Constructor")) test_Constructor();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_Drawable.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_Drawable.java
deleted file mode 100644
index 042c71f2a8..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_Drawable.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.graphics.Drawable
- *
- * @see org.eclipse.swt.graphics.Drawable
- */
-public class Test_org_eclipse_swt_graphics_Drawable extends SwtTestCase {
-
-public Test_org_eclipse_swt_graphics_Drawable(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
-}
-
-protected void tearDown() {
-}
-
-public void test_internal_dispose_GCILorg_eclipse_swt_graphics_GCData() {
- warnUnimpl("Test test_internal_dispose_GCILorg_eclipse_swt_graphics_GCData not written");
-}
-
-public void test_internal_new_GCLorg_eclipse_swt_graphics_GCData() {
- warnUnimpl("Test test_internal_new_GCLorg_eclipse_swt_graphics_GCData not written");
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_graphics_Drawable((String)e.nextElement()));
- }
- return suite;
-}
-
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_internal_dispose_GCILorg_eclipse_swt_graphics_GCData");
- methodNames.addElement("test_internal_new_GCLorg_eclipse_swt_graphics_GCData");
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_internal_dispose_GCILorg_eclipse_swt_graphics_GCData")) test_internal_dispose_GCILorg_eclipse_swt_graphics_GCData();
- else if (getName().equals("test_internal_new_GCLorg_eclipse_swt_graphics_GCData")) test_internal_new_GCLorg_eclipse_swt_graphics_GCData();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_Font.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_Font.java
deleted file mode 100644
index 290b535fe4..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_Font.java
+++ /dev/null
@@ -1,397 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.graphics.*;
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.graphics.Font
- *
- * @see org.eclipse.swt.graphics.Font
- */
-public class Test_org_eclipse_swt_graphics_Font extends SwtTestCase {
-
-Display display;
-
-public Test_org_eclipse_swt_graphics_Font(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- display = Display.getDefault();
-}
-
-protected void tearDown() {
-}
-
-public void test_ConstructorLorg_eclipse_swt_graphics_Device$Lorg_eclipse_swt_graphics_FontData() {
-
- // null device argument
-
- boolean exceptionThrown = false;
- try {
- FontData[] data = new FontData[1];
- Font font = new Font(null,data);
- font.dispose();
- } catch (IllegalArgumentException e) {
- exceptionThrown = true;
- }
- assertTrue(exceptionThrown);
-
- // null data argument
-
- exceptionThrown = false;
- try {
- FontData[] data = null;
- Font font = new Font(display,data);
- font.dispose();
- } catch (IllegalArgumentException e) {
- exceptionThrown = true;
- }
- assertTrue(exceptionThrown);
-
- // zero length data array
-
- exceptionThrown = false;
- try {
- FontData[] data = new FontData[0];
- Font font = new Font(display,data);
- font.dispose();
- } catch (IllegalArgumentException e) {
- exceptionThrown = true;
- }
- assertTrue(exceptionThrown);
-
- // null data element
-
- exceptionThrown = false;
- try {
- FontData[] data = {
- null,
- new FontData()
- };
- Font font = new Font(display,data);
- font.dispose();
- } catch (IllegalArgumentException e) {
- exceptionThrown = true;
- }
- assertTrue("null data element 0",exceptionThrown);
-
- exceptionThrown = false;
- try {
- FontData[] data = {
- new FontData(),
- null
- };
- Font font = new Font(display,data);
- font.dispose();
- } catch (IllegalArgumentException e) {
- exceptionThrown = true;
- }
- assertTrue("null data element 1",exceptionThrown);
-
- // test that FontData is set correctly
-
- FontData data = new FontData();
- Font font = new Font(display,data);
- FontData[] returnedData = font.getFontData();
- assertEquals(data,returnedData[0]);
- font.dispose();
-}
-
-public void test_ConstructorLorg_eclipse_swt_graphics_DeviceLorg_eclipse_swt_graphics_FontData() {
- // Test new Font(Device device, FontData fd)
- // IllegalArgumentException if the fd argument is null
- // SWTError: ERROR_NO_HANDLES, if a font could not be created from the given font data
-
- // valid font with no name (strange, but apparently valid)
- Font font = new Font(display, new FontData("", 10, SWT.NORMAL));
- font.dispose();
-
- // valid font with unknown name (strange, but apparently valid)
- font = new Font(display, new FontData("bad-font", 10, SWT.NORMAL));
- font.dispose();
-
- // valid font with 0 height (strange, but apparently valid)
- font = new Font(display, new FontData(SwtJunit.testFontName, 0, SWT.NORMAL));
- font.dispose();
-
- // valid normal 100-point font
- font = new Font(display, new FontData(SwtJunit.testFontName, 100, SWT.NORMAL));
- font.dispose();
-
- // valid normal 10-point font
- font = new Font(display, new FontData(SwtJunit.testFontName, 10, SWT.NORMAL));
- font.dispose();
-
- // valid bold 10-point font
- font = new Font(display, new FontData(SwtJunit.testFontName, 10, SWT.BOLD));
- font.dispose();
-
- // valid italic 10-point font
- font = new Font(display, new FontData(SwtJunit.testFontName, 10, SWT.ITALIC));
- font.dispose();
-
- // valid bold italic 10-point font
- font = new Font(display, new FontData(SwtJunit.testFontName, 10, SWT.BOLD | SWT.ITALIC));
- font.dispose();
-
- // illegal argument, fontData == null
- try {
- font = new Font(display, (FontData)null);
- font.dispose();
- fail("No exception thrown for fontData == null");
- } catch (IllegalArgumentException e) {
- }
-
- // illegal argument, name == null
- try {
- font = new Font(display, new FontData(null, 10, SWT.NORMAL));
- font.dispose();
- fail("No exception thrown for name == null");
- } catch (IllegalArgumentException e) {
- }
-
- // illegal argument, height < 0
- try {
- font = new Font(display, new FontData(SwtJunit.testFontName, -10, SWT.NORMAL));
- font.dispose();
- fail("No exception thrown for height < 0");
- } catch (IllegalArgumentException e) {
- }
-}
-
-public void test_ConstructorLorg_eclipse_swt_graphics_DeviceLjava_lang_StringII() {
- // Test new Font(Device device, String name, int height, int style)
- // IllegalArgumentException if the name argument is null or the height is negative
- // SWTError: ERROR_NO_HANDLES, if a font could not be created from the given arguments
-
- // valid font with no name (strange, but apparently valid)
- Font font = new Font(display, "", 10, SWT.NORMAL);
- font.dispose();
-
- // valid font with unknown name (strange, but apparently valid)
- font = new Font(display, "bad-font", 10, SWT.NORMAL);
- font.dispose();
-
- // valid font with 0 height (strange, but apparently valid)
- font = new Font(display, SwtJunit.testFontName, 0, SWT.NORMAL);
- font.dispose();
-
- // valid normal 100-point font
- font = new Font(display, SwtJunit.testFontName, 100, SWT.NORMAL);
- font.dispose();
-
- // valid normal 10-point font
- font = new Font(display, SwtJunit.testFontName, 10, SWT.NORMAL);
- font.dispose();
-
- // valid bold 10-point font
- font = new Font(display, SwtJunit.testFontName, 10, SWT.BOLD);
- font.dispose();
-
- // valid italic 10-point font
- font = new Font(display, SwtJunit.testFontName, 10, SWT.ITALIC);
- font.dispose();
-
- // valid bold italic 10-point font
- font = new Font(display, SwtJunit.testFontName, 10, SWT.BOLD | SWT.ITALIC);
- font.dispose();
-
- // device == null (valid)
- font = new Font(null, SwtJunit.testFontName, 10, SWT.NORMAL);
- font.dispose();
-
- // illegal argument, name == null
- try {
- font = new Font(display, null, 10, SWT.NORMAL);
- font.dispose();
- fail("No exception thrown for name == null");
- } catch (IllegalArgumentException e) {
- }
-
- // illegal argument, height < 0
- try {
- font = new Font(display, SwtJunit.testFontName, -10, SWT.NORMAL);
- font.dispose();
- fail("No exception thrown for height < 0");
- } catch (IllegalArgumentException e) {
- }
-}
-
-public void test_dispose() {
- Font font = new Font(display, SwtJunit.testFontName, 10, SWT.NORMAL);
- assertFalse(font.isDisposed());
- font.dispose();
- assertTrue(font.isDisposed());
-}
-
-public void test_equalsLjava_lang_Object() {
- // Fonts are only equal if their handles are the same (?!)
- Font font = new Font(display, SwtJunit.testFontName, 10, SWT.NORMAL);
- Font otherFont = new Font(display, SwtJunit.testFontName, 20, SWT.NORMAL);
- try {
- // Test Font.equals(Object)
- assertTrue("!font.equals((Object)null)", !font.equals((Object)null));
-
- // Test Font.equals(Font)
- assertTrue("!font.equals((Font)null)", !font.equals((Font)null));
- assertTrue("font.equals(font)", font.equals(font));
- assertTrue("!font.equals(otherFont)", !font.equals(otherFont));
- } finally {
- font.dispose();
- otherFont.dispose();
- }
-}
-
-public void test_getFontData() {
- // Test Font.getFontData()
- // valid normal 10-point font
- Font font = new Font(display, SwtJunit.testFontName, 10, SWT.NORMAL);
- try {
- FontData fontData[] = font.getFontData();
- assertTrue("No font data", fontData != null && fontData.length > 0);
- assertEquals("Wrong font name", SwtJunit.testFontName, fontData[0].getName());
- assertEquals("Wrong font height", 10, fontData[0].getHeight());
- assertEquals("Wrong font style", SWT.NORMAL, fontData[0].getStyle());
- } finally {
- font.dispose();
- }
-
- // valid bold 20-point font
- font = new Font(display, SwtJunit.testFontName, 20, SWT.BOLD);
- try {
- FontData fontData[] = font.getFontData();
- assertTrue("No font data", fontData != null && fontData.length > 0);
- assertEquals("Wrong font name", SwtJunit.testFontName, fontData[0].getName());
- assertEquals("Wrong font height", 20, fontData[0].getHeight());
- assertEquals("Wrong font style", SWT.BOLD, fontData[0].getStyle());
- } finally {
- font.dispose();
- }
-
- // valid italic 30-point font
- font = new Font(display, SwtJunit.testFontName, 30, SWT.ITALIC);
- try {
- FontData fontData[] = font.getFontData();
- assertTrue("No font data", fontData != null && fontData.length > 0);
-// assertEquals("Wrong font name", SwtJunit.testFontName, fontData[0].getName());
- assertEquals("Wrong font height", 30, fontData[0].getHeight());
- assertEquals("Wrong font style", SWT.ITALIC, fontData[0].getStyle());
- } finally {
- font.dispose();
- }
-
- // valid bold italic 40-point font
- font = new Font(display, SwtJunit.testFontName, 40, SWT.BOLD | SWT.ITALIC);
- try {
- FontData fontData[] = font.getFontData();
- font.dispose();
- assertTrue("No font data", fontData != null && fontData.length > 0);
-// assertEquals("Wrong font name", SwtJunit.testFontName, fontData[0].getName());
- assertEquals("Wrong font height", 40, fontData[0].getHeight());
- assertEquals("Wrong font style", SWT.BOLD | SWT.ITALIC, fontData[0].getStyle());
- } finally {
- font.dispose();
- }
-
- // valid 10-point font with unknown name
- font = new Font(display, "bad-font", 10, SWT.NORMAL);
- try {
- FontData fontData[] = font.getFontData();
- assertTrue("No font data", fontData != null && fontData.length > 0);
-// assertEquals("Wrong font name", "bad-font", fontData[0].getName());
- assertEquals("Wrong font height", 10, fontData[0].getHeight());
- assertEquals("Wrong font style", SWT.NORMAL, fontData[0].getStyle());
- } finally {
- font.dispose();
- }
-}
-
-public void test_hashCode() {
- Font font = new Font(display, SwtJunit.testFontName, 10, SWT.NORMAL);
- assertEquals(font,font);
- assertEquals(font.hashCode(),font.hashCode());
- Font boldFont = new Font(display, SwtJunit.testFontName, 10, SWT.BOLD);
- assertFalse(font.hashCode() == boldFont.hashCode());
- boldFont.dispose();
- font.dispose();
-}
-
-public void test_isDisposed() {
- // Test Font.isDisposed() false
- Font font = new Font(display, SwtJunit.testFontName, 10, SWT.NORMAL);
- try {
- assertTrue("Font should not be disposed", !font.isDisposed());
- } finally {
- // Test Font.isDisposed() true
- font.dispose();
- assertTrue("Font should be disposed", font.isDisposed());
- }
-}
-
-public void test_toString() {
- Font font = new Font(display, SwtJunit.testFontName, 10, SWT.NORMAL);
- assertNotNull(font.toString());
-
- font.dispose();
- assertNotNull(font.toString());
-}
-
-public void test_win32_newLorg_eclipse_swt_graphics_DeviceI() {
- // do not test - Windows only
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_graphics_Font((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_graphics_Device$Lorg_eclipse_swt_graphics_FontData");
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_graphics_DeviceLorg_eclipse_swt_graphics_FontData");
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_graphics_DeviceLjava_lang_StringII");
- methodNames.addElement("test_dispose");
- methodNames.addElement("test_equalsLjava_lang_Object");
- methodNames.addElement("test_getFontData");
- methodNames.addElement("test_hashCode");
- methodNames.addElement("test_isDisposed");
- methodNames.addElement("test_toString");
- methodNames.addElement("test_win32_newLorg_eclipse_swt_graphics_DeviceI");
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLorg_eclipse_swt_graphics_Device$Lorg_eclipse_swt_graphics_FontData")) test_ConstructorLorg_eclipse_swt_graphics_Device$Lorg_eclipse_swt_graphics_FontData();
- else if (getName().equals("test_ConstructorLorg_eclipse_swt_graphics_DeviceLorg_eclipse_swt_graphics_FontData")) test_ConstructorLorg_eclipse_swt_graphics_DeviceLorg_eclipse_swt_graphics_FontData();
- else if (getName().equals("test_ConstructorLorg_eclipse_swt_graphics_DeviceLjava_lang_StringII")) test_ConstructorLorg_eclipse_swt_graphics_DeviceLjava_lang_StringII();
- else if (getName().equals("test_dispose")) test_dispose();
- else if (getName().equals("test_equalsLjava_lang_Object")) test_equalsLjava_lang_Object();
- else if (getName().equals("test_getFontData")) test_getFontData();
- else if (getName().equals("test_hashCode")) test_hashCode();
- else if (getName().equals("test_isDisposed")) test_isDisposed();
- else if (getName().equals("test_toString")) test_toString();
- else if (getName().equals("test_win32_newLorg_eclipse_swt_graphics_DeviceI")) test_win32_newLorg_eclipse_swt_graphics_DeviceI();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_FontData.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_FontData.java
deleted file mode 100644
index 1bc3480372..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_FontData.java
+++ /dev/null
@@ -1,271 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import java.util.*;
-import junit.framework.*;
-import junit.textui.*;
-import org.eclipse.swt.*;
-import org.eclipse.swt.graphics.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.graphics.FontData
- *
- * @see org.eclipse.swt.graphics.FontData
- */
-public class Test_org_eclipse_swt_graphics_FontData extends SwtTestCase {
-
-public Test_org_eclipse_swt_graphics_FontData(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
-}
-
-protected void tearDown() {
-}
-
-public void test_Constructor() {
- // Test new FontData()
- FontData fd = new FontData();
-}
-
-public void test_ConstructorLjava_lang_String() {
- // Test new FontData(String string)
- FontData fd = new FontData(SwtJunit.testFontName, 10, SWT.NORMAL);
- FontData reconstructedFontData = new FontData(fd.toString());
- assertEquals(fd, reconstructedFontData);
-}
-
-public void test_ConstructorLjava_lang_StringII() {
- // Test new FontData(String name, int height, int style)
- // valid font data with no name (strange, but apparently valid)
- FontData fd = new FontData("", 10, SWT.NORMAL);
-
- // valid font data with unknown name (strange, but apparently valid)
- fd = new FontData("bad-font", 10, SWT.NORMAL);
-
- // valid font data with 0 height (strange, but apparently valid)
- fd = new FontData(SwtJunit.testFontName, 0, SWT.NORMAL);
-
- // valid font data with 1000 height (pretty big, but apparently valid)
- fd = new FontData(SwtJunit.testFontName, 1000, SWT.NORMAL);
-
- // valid normal 10-point font data
- fd = new FontData(SwtJunit.testFontName, 10, SWT.NORMAL);
-
- // valid bold 10-point font data
- fd = new FontData(SwtJunit.testFontName, 10, SWT.BOLD);
-
- // valid italic 10-point font data
- fd = new FontData(SwtJunit.testFontName, 10, SWT.ITALIC);
-
- // valid bold italic 10-point font data
- fd = new FontData(SwtJunit.testFontName, 10, SWT.BOLD | SWT.ITALIC);
-
- // illegal argument, name == null
- try {
- fd = new FontData(null, 10, SWT.NORMAL);
- fail("No exception thrown for name == null");
- } catch (IllegalArgumentException e) {
- }
-
- // illegal argument, height < 0
- try {
- fd = new FontData(SwtJunit.testFontName, -10, SWT.NORMAL);
- fail("No exception thrown for height < 0");
- } catch (IllegalArgumentException e) {
- }
-}
-
-public void test_equalsLjava_lang_Object() {
- FontData fd1 = new FontData(SwtJunit.testFontName, 10, SWT.NORMAL);
- FontData fd2 = new FontData(SwtJunit.testFontName, 10, SWT.NORMAL);
- assertEquals(fd1,fd1);
- assertEquals(fd1,fd2);
-}
-
-public void test_getHeight() {
- // Font.getHeight() tested in test_setHeightI
-}
-
-public void test_getLocale() {
- // FontData.getLocale() tested in test_setLocaleLjava_lang_String
-}
-
-public void test_getName() {
- // Font.getName() tested in test_setNameLjava_lang_String
-}
-
-public void test_getStyle() {
- // Font.getStyle() tested in test_setStyleI
-}
-
-public void test_hashCode() {
- FontData fd1 = new FontData(SwtJunit.testFontName, 10, SWT.NORMAL);
- FontData fd2 = new FontData(SwtJunit.testFontName, 10, SWT.NORMAL);
- assertEquals(fd1,fd2);
- assertEquals(fd1.hashCode(),fd2.hashCode());
- FontData fd3 = new FontData(SwtJunit.testFontName, 10, SWT.BOLD);
- assertFalse(fd1.hashCode() == fd3.hashCode());
-}
-
-public void test_setHeightI() {
- // Test Font.setHeight(int height)
- // valid normal font data for various heights
- FontData fontData = new FontData(SwtJunit.testFontName, 10, SWT.NORMAL);
- for (int height = 0; height < 1000; height++) {
- fontData.setHeight(height);
- assertEquals("Wrong height", fontData.getHeight(), height);
- }
-
- // valid bold font data for various heights
- fontData = new FontData(SwtJunit.testFontName, 10, SWT.BOLD);
- for (int height = 0; height < 1000; height++) {
- fontData.setHeight(height);
- assertEquals("Wrong height", fontData.getHeight(), height);
- }
-
- // valid italic font data for various heights
- fontData = new FontData(SwtJunit.testFontName, 10, SWT.ITALIC);
- for (int height = 0; height < 1000; height++) {
- fontData.setHeight(height);
- assertEquals("Wrong height", fontData.getHeight(), height);
- }
-
- // valid bold italic font data for various heights
- fontData = new FontData(SwtJunit.testFontName, 10, SWT.BOLD | SWT.ITALIC);
- for (int height = 0; height < 1000; height++) {
- fontData.setHeight(height);
- assertEquals("Wrong height", fontData.getHeight(), height);
- }
-}
-
-public void test_setLocaleLjava_lang_String() {
- FontData fd = new FontData(SwtJunit.testFontName, 10, SWT.NORMAL);
- Locale locale = Locale.ENGLISH;
- fd.setLocale(locale.toString());
- assertEquals(Locale.ENGLISH.toString(),fd.getLocale());
-}
-
-public void test_setNameLjava_lang_String() {
- // Test Font.setName(String name)
- // valid name
- FontData fontData = new FontData(SwtJunit.testFontName, 10, SWT.NORMAL);
- assertEquals("Wrong name", fontData.getName(), SwtJunit.testFontName);
-
- // valid name (unknown name, but valid)
- fontData.setName("bad-font");
- assertEquals("Wrong name", fontData.getName(), "bad-font");
-
- // valid name (empty string, but valid)
- // only on windows since motif supports separate font foundries
- if (SwtJunit.isWindows) {
- fontData.setName("");
- assertEquals("Wrong name", fontData.getName(), "");
- }
-
- // valid name
- fontData.setName(SwtJunit.testFontName);
- assertEquals("Wrong name", fontData.getName(), SwtJunit.testFontName);
- // illegal argument, name == null
- try {
- fontData.setName(null);
- fail("No exception thrown for name == null");
- } catch (IllegalArgumentException e) {
- }
-}
-
-public void test_setStyleI() {
- // Test Font.setStyle(int style)
- for (int height = 0; height < 1000; height++) {
- // valid normal font data
- FontData fontData = new FontData(SwtJunit.testFontName, height, SWT.NORMAL);
- assertEquals("Wrong style", fontData.getStyle(), SWT.NORMAL);
-
- // valid bold font data
- fontData.setStyle(SWT.BOLD);
- assertEquals("Wrong style", fontData.getStyle(), SWT.BOLD);
-
- // valid italic font data
- fontData.setStyle(SWT.ITALIC);
- assertEquals("Wrong style", fontData.getStyle(), SWT.ITALIC);
-
- // valid bold italic font data
- fontData.setStyle(SWT.ITALIC | SWT.BOLD);
- assertEquals("Wrong style", fontData.getStyle(), SWT.BOLD | SWT.ITALIC);
-
- // valid normal font data
- fontData.setStyle(SWT.NORMAL);
- assertEquals("Wrong style", fontData.getStyle(), SWT.NORMAL);
- }
-}
-
-public void test_toString() {
- FontData data = new FontData();
- assertNotNull(data.toString());
- assertTrue(data.toString().length() > 0);
-}
-
-public void test_win32_newLorg_eclipse_swt_internal_win32_LOGFONTI() {
- // do not test - Windows only
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_graphics_FontData((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_Constructor");
- methodNames.addElement("test_ConstructorLjava_lang_String");
- methodNames.addElement("test_ConstructorLjava_lang_StringII");
- methodNames.addElement("test_equalsLjava_lang_Object");
- methodNames.addElement("test_getHeight");
- methodNames.addElement("test_getLocale");
- methodNames.addElement("test_getName");
- methodNames.addElement("test_getStyle");
- methodNames.addElement("test_hashCode");
- methodNames.addElement("test_setHeightI");
- methodNames.addElement("test_setLocaleLjava_lang_String");
- methodNames.addElement("test_setNameLjava_lang_String");
- methodNames.addElement("test_setStyleI");
- methodNames.addElement("test_toString");
- methodNames.addElement("test_win32_newLorg_eclipse_swt_internal_win32_LOGFONTI");
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_Constructor")) test_Constructor();
- else if (getName().equals("test_ConstructorLjava_lang_String")) test_ConstructorLjava_lang_String();
- else if (getName().equals("test_ConstructorLjava_lang_StringII")) test_ConstructorLjava_lang_StringII();
- else if (getName().equals("test_equalsLjava_lang_Object")) test_equalsLjava_lang_Object();
- else if (getName().equals("test_getHeight")) test_getHeight();
- else if (getName().equals("test_getLocale")) test_getLocale();
- else if (getName().equals("test_getName")) test_getName();
- else if (getName().equals("test_getStyle")) test_getStyle();
- else if (getName().equals("test_hashCode")) test_hashCode();
- else if (getName().equals("test_setHeightI")) test_setHeightI();
- else if (getName().equals("test_setLocaleLjava_lang_String")) test_setLocaleLjava_lang_String();
- else if (getName().equals("test_setNameLjava_lang_String")) test_setNameLjava_lang_String();
- else if (getName().equals("test_setStyleI")) test_setStyleI();
- else if (getName().equals("test_toString")) test_toString();
- else if (getName().equals("test_win32_newLorg_eclipse_swt_internal_win32_LOGFONTI")) test_win32_newLorg_eclipse_swt_internal_win32_LOGFONTI();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_FontMetrics.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_FontMetrics.java
deleted file mode 100644
index 5d04d83a5c..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_FontMetrics.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import junit.framework.*;
-import junit.textui.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.graphics.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.graphics.FontMetrics
- *
- * @see org.eclipse.swt.graphics.FontMetrics
- */
-public class Test_org_eclipse_swt_graphics_FontMetrics extends SwtTestCase {
-
-public Test_org_eclipse_swt_graphics_FontMetrics(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- display = Display.getDefault();
- shell = new Shell(display);
- gc = new GC(shell);
-}
-
-protected void tearDown() {
- gc.dispose();
- shell.dispose();
-}
-
-public void test_equalsLjava_lang_Object() {
- FontMetrics fm1 = gc.getFontMetrics();
- FontMetrics fm2 = gc.getFontMetrics();
- assertTrue(fm1.equals(fm2));
-}
-
-public void test_getAscent() {
- FontMetrics fm = gc.getFontMetrics();
- fm.getAscent();
-}
-
-public void test_getAverageCharWidth() {
- FontMetrics fm = gc.getFontMetrics();
- fm.getAverageCharWidth();
-}
-
-public void test_getDescent() {
- FontMetrics fm = gc.getFontMetrics();
- fm.getDescent();
-}
-
-public void test_getHeight() {
- FontMetrics fm = gc.getFontMetrics();
- fm.getHeight();
-}
-
-public void test_getLeading() {
- FontMetrics fm = gc.getFontMetrics();
- fm.getLeading();
-}
-
-public void test_hashCode() {
- FontMetrics fm1 = gc.getFontMetrics();
- FontMetrics fm2 = gc.getFontMetrics();
- if (fm1.equals(fm2)) {
- assertEquals(fm1.hashCode(), fm2.hashCode());
- }
-}
-
-public void test_win32_newLorg_eclipse_swt_internal_win32_TEXTMETRIC() {
- // do not test - Windows only
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_graphics_FontMetrics((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_equalsLjava_lang_Object");
- methodNames.addElement("test_getAscent");
- methodNames.addElement("test_getAverageCharWidth");
- methodNames.addElement("test_getDescent");
- methodNames.addElement("test_getHeight");
- methodNames.addElement("test_getLeading");
- methodNames.addElement("test_hashCode");
- methodNames.addElement("test_win32_newLorg_eclipse_swt_internal_win32_TEXTMETRIC");
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_equalsLjava_lang_Object")) test_equalsLjava_lang_Object();
- else if (getName().equals("test_getAscent")) test_getAscent();
- else if (getName().equals("test_getAverageCharWidth")) test_getAverageCharWidth();
- else if (getName().equals("test_getDescent")) test_getDescent();
- else if (getName().equals("test_getHeight")) test_getHeight();
- else if (getName().equals("test_getLeading")) test_getLeading();
- else if (getName().equals("test_hashCode")) test_hashCode();
- else if (getName().equals("test_win32_newLorg_eclipse_swt_internal_win32_TEXTMETRIC")) test_win32_newLorg_eclipse_swt_internal_win32_TEXTMETRIC();
-}
-
-/* custom */
- Display display;
- Shell shell;
- GC gc;
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_GC.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_GC.java
deleted file mode 100644
index 6da73cea70..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_GC.java
+++ /dev/null
@@ -1,812 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.printing.*;
-import org.eclipse.swt.widgets.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.graphics.GC
- *
- * @see org.eclipse.swt.graphics.GC
- */
-public class Test_org_eclipse_swt_graphics_GC extends SwtTestCase {
-
-public Test_org_eclipse_swt_graphics_GC(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- display = Display.getDefault();
- shell = new Shell(display);
- shell.setBounds(0,30,240,290);
- image = new Image(display, 200, 200);
- gc = new GC(image);
-}
-
-protected void tearDown() {
- gc.dispose();
- image.dispose();
- shell.dispose();
-}
-public void test_ConstructorLorg_eclipse_swt_graphics_Drawable() {
- try {
- GC gc = new GC(null);
- gc.dispose();
- fail("No exception thrown for drawable == null");
- } catch (IllegalArgumentException e) {
- assertEquals("Incorrect exception thrown for drawable == null", SWT.ERROR_NULL_ARGUMENT, e);
- }
-
- try {
- Image image = new Image(display, 10, 10);
- GC gc1 = new GC(image);
- GC gc2 = new GC(image);
- gc1.dispose();
- gc2.dispose();
- image.dispose();
- fail("No exception thrown for more than one GC on one image");
- } catch (IllegalArgumentException e) {
- assertEquals("Incorrect exception thrown for more than one GC on one image", SWT.ERROR_INVALID_ARGUMENT, e);
- }
-
- Class printerClass = null;
- try {
- printerClass = Class.forName("org.eclipse.swt.printing.Printer");
- } catch (ClassNotFoundException e) {
- // Printer class not present (eSWT). Skip test.
- return;
- }
- try {
- // Direct instantiation results in a NoClassDefFoundError during class
- // loading/initialization. Casting seems to be ok.
- Object printer = printerClass.newInstance();
- GC gc1 = new GC((Printer) printer);
- GC gc2 = new GC((Printer) printer);
- gc1.dispose();
- gc2.dispose();
- ((Printer) printer).dispose();
- fail("No exception thrown for more than one GC on one printer");
- } catch (IllegalArgumentException e) {
- assertEquals("Incorrect exception thrown for more than one GC on one printer", SWT.ERROR_INVALID_ARGUMENT, e);
- } catch (InstantiationException e) {
- e.printStackTrace();
- } catch (IllegalAccessException e) {
- e.printStackTrace();
- }
-}
-
-public void test_ConstructorLorg_eclipse_swt_graphics_DrawableI() {
- try {
- GC gc = new GC(null, SWT.LEFT_TO_RIGHT);
- gc.dispose();
- fail("No exception thrown for drawable == null");
- } catch (IllegalArgumentException e) {
- assertEquals("Incorrect exception thrown for drawable == null", SWT.ERROR_NULL_ARGUMENT, e);
- }
-
- try {
- Image image = new Image(display, 10, 10);
- GC gc1 = new GC(image, SWT.RIGHT_TO_LEFT);
- GC gc2 = new GC(image, SWT.LEFT_TO_RIGHT);
- gc1.dispose();
- gc2.dispose();
- image.dispose();
- fail("No exception thrown for more than one GC on one image");
- } catch (IllegalArgumentException e) {
- assertEquals("Incorrect exception thrown for more than one GC on one image", SWT.ERROR_INVALID_ARGUMENT, e);
- }
-
- Canvas canvas = new Canvas(shell, SWT.NULL);
- GC testGC = new GC(canvas, SWT.RIGHT_TO_LEFT);
- testGC.dispose();
- testGC = new GC(canvas, SWT.LEFT_TO_RIGHT);
- testGC.dispose();
- canvas.dispose();
-
- Class printerClass = null;
- try {
- printerClass = Class.forName("org.eclipse.swt.printing.Printer");
- } catch (ClassNotFoundException e) {
- // Printer class not present (eSWT). Skip test.
- return;
- }
- try {
- // Direct instantiation results in a NoClassDefFoundError during class
- // loading/initialization. Casting seems to be ok.
- Object printer = printerClass.newInstance();
- GC gc1 = new GC((Printer)printer, SWT.RIGHT_TO_LEFT);
- GC gc2 = new GC((Printer)printer, SWT.LEFT_TO_RIGHT);
- gc1.dispose();
- gc2.dispose();
- ((Printer) printer).dispose();
- fail("No exception thrown for more than one GC on one printer");
- } catch (IllegalArgumentException e) {
- assertEquals("Incorrect exception thrown for more than one GC on one printer", SWT.ERROR_INVALID_ARGUMENT, e);
- } catch (InstantiationException e) {
- e.printStackTrace();
- } catch (IllegalAccessException e) {
- e.printStackTrace();
- }
-}
-
-public void test_copyAreaIIIIII() {
- Color white = display.getSystemColor(SWT.COLOR_WHITE);
- Color blue = display.getSystemColor(SWT.COLOR_BLUE);
- RGB whiteRGB = getRealRGB(white);
- RGB blueRGB = getRealRGB(blue);
- int width = 20;
- int height = 20;
- int destX = 10;
- int destY = 50;
-
- gc.setBackground(white);
- gc.setForeground(white);
- gc.fillRectangle(image.getBounds());
- gc.setForeground(blue);
- gc.drawLine(5, 0, 10, 0);
- gc.copyArea(0, 0, width, height, destX, destY);
-
- ImageData imageData = image.getImageData();
- PaletteData palette = imageData.palette;
- int pixel = imageData.getPixel(destX + 4, destY);
- assertEquals(":a:", whiteRGB, palette.getRGB(pixel));
- pixel = imageData.getPixel(destX + 5, destY);
- assertEquals(":b:", blueRGB, palette.getRGB(pixel));
- pixel = imageData.getPixel(destX + 10, destY);
- assertEquals(":c:", blueRGB, palette.getRGB(pixel));
- pixel = imageData.getPixel(destX + 11, destY);
- assertEquals(":d:", whiteRGB, palette.getRGB(pixel));
-}
-
-public void test_copyAreaLorg_eclipse_swt_graphics_ImageII() {
- Color white = display.getSystemColor(SWT.COLOR_WHITE);
- Color blue = display.getSystemColor(SWT.COLOR_BLUE);
- RGB whiteRGB = getRealRGB(white);
- RGB blueRGB = getRealRGB(blue);
-
- gc.setBackground(white);
- gc.setForeground(white);
- gc.fillRectangle(image.getBounds());
- gc.setForeground(blue);
- gc.drawLine(5, 0, 10, 0);
- Image image = new Image(display, 12, 12);
- gc.copyArea(image, 0, 0);
- ImageData imageData = image.getImageData();
- PaletteData palette = imageData.palette;
- int pixel = imageData.getPixel(4, 0);
- assertEquals(":a:", whiteRGB, palette.getRGB(pixel));
- pixel = imageData.getPixel(5, 0);
- assertEquals(":b:", blueRGB, palette.getRGB(pixel));
- pixel = imageData.getPixel(10, 0);
- assertEquals(":c:", blueRGB, palette.getRGB(pixel));
- pixel = imageData.getPixel(11, 0);
- assertEquals(":d:", whiteRGB, palette.getRGB(pixel));
- image.dispose();
-}
-
-public void test_dispose() {
- gc.dispose();
-}
-
-public void test_drawArcIIIIII() {
- gc.drawArc(10, 20, 50, 25, 90, 90);
-}
-
-public void test_drawFocusIIII() {
- gc.drawFocus(1, 1, 50, 25);
-}
-
-public void test_drawImageLorg_eclipse_swt_graphics_ImageII() {
- Color c1 = new Color(display, 255, 0, 0);
- Color c2 = new Color(display, 0, 0, 0);
- Color c3 = new Color(display, 255, 255, 0);
-
- PaletteData paletteData = new PaletteData(new RGB[] {c1.getRGB(), c2.getRGB(), c3.getRGB()});
- ImageData data = new ImageData(30,30, 8, paletteData);
- for (int y = 0; y < data.height; y++) {
- for (int x = 0; x < data.width; x++) {
- if (x > y) data.setPixel(x, y, paletteData.getPixel(c1.getRGB()));
- else if (x < y) data.setPixel(x, y, paletteData.getPixel(c2.getRGB()));
- else data.setPixel(x, y, paletteData.getPixel(c3.getRGB()));
- }
- }
- Image image = new Image(display, data);
- data = image.getImageData();
- data.transparentPixel = paletteData.getPixel(c1.getRGB());
- Image imageTransparent = new Image(display, data);
- data.transparentPixel = -1;
- for (int y = 0; y < data.height; y++) {
- for (int x = 0; x < data.width; x++) {
- data.setAlpha(x, y, 127);
- }
- }
- Image imageAlpha = new Image(display, data);
-
- gc.drawImage(image, 100, 100);
- gc.drawImage(imageTransparent, 130, 100);
- gc.drawImage(imageAlpha, 160, 100);
- try {
- gc.drawImage(null, 100, 100);
- fail("No exception thrown");
- }
- catch (IllegalArgumentException e) {
- }
- image.dispose();
- imageTransparent.dispose();
- imageAlpha.dispose();
-}
-
-public void test_drawImageLorg_eclipse_swt_graphics_ImageIIIIIIII() {
- Color c1 = new Color(display, 255, 0, 0);
- Color c2 = new Color(display, 0, 0, 0);
- Color c3 = new Color(display, 255, 255, 0);
-
- PaletteData paletteData = new PaletteData(new RGB[] {c1.getRGB(), c2.getRGB(), c3.getRGB()});
- ImageData data = new ImageData(30,30, 8, paletteData);
- for (int y = 0; y < data.height; y++) {
- for (int x = 0; x < data.width; x++) {
- if (x > y) data.setPixel(x, y, paletteData.getPixel(c1.getRGB()));
- else if (x < y) data.setPixel(x, y, paletteData.getPixel(c2.getRGB()));
- else data.setPixel(x, y, paletteData.getPixel(c3.getRGB()));
- }
- }
- Image image = new Image(display, data);
- data = image.getImageData();
- data.transparentPixel = paletteData.getPixel(c1.getRGB());
- Image imageTransparent = new Image(display, data);
- data.transparentPixel = -1;
- for (int y = 0; y < data.height; y++) {
- for (int x = 0; x < data.width; x++) {
- data.setAlpha(x, y, 127);
- }
- }
- Image imageAlpha = new Image(display, data);
-
- gc.drawImage(image, 10, 5, 20, 15, 100, 120, 50, 60);
- gc.drawImage(imageTransparent, 10, 5, 20, 15, 100, 120, 10, 10);
- gc.drawImage(imageAlpha, 10, 5, 20, 15, 100, 120, 20, 15);
- try {
- gc.drawImage(null, 10, 5, 20, 15, 100, 120, 50, 60);
- fail("No exception thrown"); //should never get here
- }
- catch (IllegalArgumentException e) {
- }
- image.dispose();
- imageAlpha.dispose();
- imageTransparent.dispose();
-}
-
-public void test_drawLineIIII() {
- gc.drawLine(0,0,0,20);
-}
-
-public void test_drawOvalIIII() {
- gc.drawOval(10, 0, 20, 30);
-}
-
-public void test_drawPointII() {
- gc.drawPoint(10, 10);
-}
-
-public void test_drawPolygon$I() {
- gc.drawPolygon(new int[] {0,0, 5,10, 0,20});
- gc.drawPolygon(new int[] {0,0});
-}
-
-public void test_drawPolyline$I() {
- gc.drawPolyline(new int[] {0,0, 5,10, 0,20});
- gc.drawPolyline(new int[] {0,0});
-}
-
-public void test_drawRectangleIIII() {
- gc.drawRectangle(10, 0, 20, 30);
- gc.drawRectangle(0, 0, 0, 0);
-}
-
-public void test_drawRectangleLorg_eclipse_swt_graphics_Rectangle() {
- gc.drawRectangle(new Rectangle(10, 0, 20, 30));
- gc.drawRectangle(new Rectangle(0, 0, 0, 0));
-}
-
-public void test_drawRoundRectangleIIIIII() {
- gc.drawRoundRectangle(10, 0, 20, 30, 3, 3);
- gc.drawRoundRectangle(0, 0, 0, 0, 0, 0);
-}
-
-public void test_drawStringLjava_lang_StringII() {
- gc.drawString("test", 5, 5);
-}
-
-public void test_drawStringLjava_lang_StringIIZ() {
- gc.drawString("test", 5, 5, true);
- gc.drawString("test", 5, 5, false);
-}
-
-public void test_drawTextLjava_lang_StringII() {
- gc.drawText("test", 5, 5);
- gc.drawText("", 0, 0);
-}
-
-public void test_drawTextLjava_lang_StringIII() {
- gc.drawText("abc", 5, 5, 0);
- gc.drawText("abc", 5, 5, SWT.DRAW_TRANSPARENT);
- gc.drawText("abc", 5, 5, SWT.DRAW_DELIMITER);
- gc.drawText("abc", 5, 5, SWT.DRAW_MNEMONIC);
- gc.drawText("abc", 5, 5, SWT.DRAW_TAB);
- gc.drawText("", 0, 0, 0);
- gc.drawText("", 0, 0, SWT.DRAW_TRANSPARENT);
- gc.drawText("", 0, 0, SWT.DRAW_DELIMITER);
- gc.drawText("", 0, 0, SWT.DRAW_MNEMONIC);
- gc.drawText("", 0, 0, SWT.DRAW_TAB);
- gc.drawText("\t\r\na&bc&", 5, 5, 0);
- gc.drawText("\t\r\na&bc&", 5, 5, SWT.DRAW_TRANSPARENT);
- gc.drawText("\t\r\na&bc&", 5, 5, SWT.DRAW_DELIMITER);
- gc.drawText("\t\r\na&bc&", 5, 5, SWT.DRAW_MNEMONIC);
- gc.drawText("\t\r\na&bc&", 5, 5, SWT.DRAW_TAB);
- gc.drawText("\r", 5, 5, SWT.DRAW_DELIMITER);
- gc.drawText("\n", 5, 5, SWT.DRAW_DELIMITER);
- gc.drawText("&", 5, 5, SWT.DRAW_MNEMONIC);
- gc.drawText("\t", 5, 5, SWT.DRAW_TAB);
-}
-
-public void test_drawTextLjava_lang_StringIIZ() {
- gc.drawText("abc", 5, 5, true);
- gc.drawText("abc", 5, 5, false);
- gc.drawText("", 0, 0, true);
- gc.drawText("", 0, 0, false);
-}
-
-public void test_equalsLjava_lang_Object() {
- assertTrue(gc.equals(gc));
- Canvas canvas = new Canvas(shell, SWT.NULL);
- GC testGC = new GC(canvas);
- assertFalse(testGC.equals(gc));
- testGC.dispose();
-}
-
-public void test_fillArcIIIIII() {
- gc.fillArc(10, 20, 50, 25, 90, 90);
- gc.fillArc(10, 20, 50, 25, -10, -10);
-}
-
-public void test_fillGradientRectangleIIIIZ() {
- gc.fillGradientRectangle(10, 0, 20, 30, true);
- gc.fillGradientRectangle(0, 0, 0, 0, true);
- gc.fillGradientRectangle(10, 0, 20, 30, false);
- gc.fillGradientRectangle(0, 0, 0, 0, false);
-}
-
-public void test_fillOvalIIII() {
- gc.fillOval(10, 0, 20, 30);
- gc.fillOval(-1, -1, -1, -1);
-}
-
-public void test_fillPolygon$I() {
- gc.fillPolygon(new int[] {0,0, 5,10, 0,20});
- gc.fillPolygon(new int[] {0,0});
- gc.fillPolygon(new int[] {-1, -1});
-}
-
-public void test_fillRectangleIIII() {
- gc.fillRectangle(new Rectangle(10, 0, 20, 30));
- gc.fillRectangle(new Rectangle(0, 0, 0, 0));
- gc.fillRectangle(new Rectangle(-1, -1, -1, -1));
-}
-
-public void test_fillRectangleLorg_eclipse_swt_graphics_Rectangle() {
- gc.fillRectangle(10, 0, 20, 30);
- gc.fillRectangle(0, 0, 0, 0);
-}
-
-public void test_fillRoundRectangleIIIIII() {
- gc.fillRoundRectangle(10, 0, 20, 30, 3, 3);
- gc.fillRoundRectangle(0, 0, 0, 0, 0, 0);
- gc.fillRoundRectangle(10, 0, 20, 30, -10, -10);
-}
-
-public void test_getAdvanceWidthC() {
- int w = gc.getAdvanceWidth('a');
- assertTrue(w > 0);
-}
-
-public void test_getBackground() {
- // tested in setBackground method
-}
-
-public void test_getCharWidthC() {
- int w = gc.getCharWidth('a');
- assertTrue(w > 0);
-}
-
-public void test_getClipping() {
- // tested in setClipping methods
-}
-
-public void test_getClippingLorg_eclipse_swt_graphics_Region() {
- warnUnimpl("Test test_getClippingLorg_eclipse_swt_graphics_Region not written");
-}
-
-public void test_getFont() {
- // tested in setFont method
-}
-
-public void test_getFontMetrics() {
- FontMetrics fm = gc.getFontMetrics();
- assertTrue(fm.getHeight() > 0);
-}
-
-public void test_getForeground() {
- // tested in setForeground method
-}
-
-public void test_getLineStyle() {
- // tested in setLineStyle method
-}
-
-public void test_getLineWidth() {
- // tested in setLineWidth method
-}
-
-public void test_getStyle() {
- Canvas canvas = new Canvas(shell, SWT.NULL);
- GC testGC = new GC(canvas, SWT.LEFT_TO_RIGHT);
- int style = testGC.getStyle();
- assertTrue((style & SWT.LEFT_TO_RIGHT) != 0);
- testGC.dispose();
- testGC = new GC(canvas);
- style = testGC.getStyle();
- assertTrue((style & SWT.LEFT_TO_RIGHT) != 0);
- testGC.dispose();
- testGC = new GC(canvas, SWT.RIGHT_TO_LEFT);
- style = testGC.getStyle();
- assertTrue((style & SWT.RIGHT_TO_LEFT) != 0);
- testGC.dispose();
-}
-
-public void test_getXORMode() {
- // tested in setXORMode method
-}
-
-public void test_hashCode() {
- assertTrue(gc.hashCode() == gc.hashCode());
- GC gc2 = new GC(shell);
- assertFalse(gc.hashCode() == gc2.hashCode());
- gc2.dispose();
-}
-
-public void test_isClipped() {
- assertFalse(gc.isClipped());
- gc.setClipping(5,10,15,20);
- assertTrue(gc.isClipped());
-}
-
-public void test_isDisposed() {
- assertFalse(gc.isDisposed());
- gc.dispose();
- assertTrue(gc.isDisposed());
-}
-
-public void test_setBackgroundLorg_eclipse_swt_graphics_Color() {
- Color color = new Color(shell.getDisplay(), 255, 0, 0);
- gc.setBackground(color);
- assertEquals(color, gc.getBackground());
- try {
- gc.setBackground(null);
- fail("No exception thrown for null color");
- } catch (IllegalArgumentException e) {
- }
- assertEquals(gc.getBackground(),gc.getBackground());
- color.dispose();
- try {
- gc.setBackground(color);
- fail("No exception thrown for color disposed");
- } catch (IllegalArgumentException e) {
- }
-}
-
-public void test_setClippingIIII() {
- // intermittently fails on XP for reasons unknown, comment out the test case
- // until the problem is figured out
-// Canvas canvas = new Canvas(shell, SWT.BORDER);
-// shell.setSize(110,110);
-// canvas.setSize(100,100);
-// shell.open();
-// GC testGc = new GC(canvas);
-// testGc.setClipping(0,5,10,20);
-// Rectangle rect = testGc.getClipping();
-// assertTrue(rect.x == 0);
-// assertTrue(rect.y == 5);
-// assertTrue(rect.width == 10);
-// assertTrue(rect.height == 20);
-// testGc.dispose();
-// canvas.dispose();
-}
-
-public void test_setClippingLorg_eclipse_swt_graphics_Rectangle() {
- // intermittently fails on XP for reasons unknown, comment out the test case
- // until the problem is figured out
-// Canvas canvas = new Canvas(shell, SWT.BORDER);
-// shell.setSize(110,110);
-// canvas.setSize(100,100);
-// shell.open();
-// GC testGc = new GC(canvas);
-// testGc.setClipping(new Rectangle(0,5,10,20));
-// Rectangle rect = testGc.getClipping();
-// assertTrue(rect.x == 0);
-// assertTrue(rect.y == 5);
-// assertTrue(rect.width == 10);
-// assertTrue(rect.height == 20);
-// testGc.dispose();
-// canvas.dispose();
-}
-
-public void test_setClippingLorg_eclipse_swt_graphics_Region() {
- warnUnimpl("Test test_setClippingLorg_eclipse_swt_graphics_Region not written");
-}
-
-public void test_setFontLorg_eclipse_swt_graphics_Font() {
- gc.setFont(shell.getDisplay().getSystemFont());
- Font font = gc.getFont();
- assertTrue(font.equals(shell.getDisplay().getSystemFont()));
-}
-
-public void test_setForegroundLorg_eclipse_swt_graphics_Color() {
- Color color = new Color(shell.getDisplay(), 255, 0, 0);
- gc.setForeground(color);
- assertEquals(color, gc.getForeground());
- try {
- gc.setForeground(null);
- fail("No exception thrown for null color");
- } catch (IllegalArgumentException e) {
- }
- assertEquals(gc.getForeground(),gc.getForeground());
- color.dispose();
- try {
- gc.setForeground(color);
- fail("No exception thrown for color disposed");
- } catch (IllegalArgumentException e) {
- }
-}
-
-public void test_setLineStyleI() {
- gc.setLineStyle(SWT.LINE_SOLID);
- assertTrue(gc.getLineStyle() == SWT.LINE_SOLID);
- gc.setLineStyle(SWT.LINE_DASH);
- assertTrue(gc.getLineStyle() == SWT.LINE_DASH);
- gc.setLineStyle(SWT.LINE_DOT);
- assertTrue(gc.getLineStyle() == SWT.LINE_DOT);
- gc.setLineStyle(SWT.LINE_DASHDOT);
- assertTrue(gc.getLineStyle() == SWT.LINE_DASHDOT);
- gc.setLineStyle(SWT.LINE_DASHDOTDOT);
- assertTrue(gc.getLineStyle() == SWT.LINE_DASHDOTDOT);
-}
-
-public void test_setLineWidthI() {
- gc.setLineWidth(10);
- assertTrue(gc.getLineWidth() == 10);
- gc.setLineWidth(0);
- assertTrue(gc.getLineWidth() == 0);
-}
-
-public void test_setXORModeZ() {
- gc.setXORMode(true);
- assertTrue(gc.getXORMode());
- gc.setXORMode(false);
- assertFalse(gc.getXORMode());
-}
-
-public void test_stringExtentLjava_lang_String() {
- Point pt = gc.stringExtent("abc");
- assertTrue(pt.x > 0);
- assertTrue(pt.y > 0);
-}
-
-public void test_textExtentLjava_lang_String() {
- Point pt = gc.textExtent("abc");
- assertTrue(pt.x > 0);
- assertTrue(pt.y > 0);
-}
-
-public void test_textExtentLjava_lang_StringI() {
- Point pt = gc.textExtent("abc", 0);
- assertTrue(pt.x > 0);
- assertTrue(pt.y > 0);
-}
-
-public void test_toString() {
- String s = gc.toString();
- assertNotNull(s);
- assertTrue(s.length() > 0);
-}
-
-public void test_win32_newILorg_eclipse_swt_graphics_GCData() {
- // do not test - Windows only
-}
-
-public void test_win32_newLorg_eclipse_swt_graphics_DrawableLorg_eclipse_swt_graphics_GCData() {
- // do not test - Windows only
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_graphics_GC((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_graphics_Drawable");
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_graphics_DrawableI");
- methodNames.addElement("test_copyAreaIIIIII");
- methodNames.addElement("test_copyAreaLorg_eclipse_swt_graphics_ImageII");
- methodNames.addElement("test_dispose");
- methodNames.addElement("test_drawArcIIIIII");
- methodNames.addElement("test_drawFocusIIII");
- methodNames.addElement("test_drawImageLorg_eclipse_swt_graphics_ImageII");
- methodNames.addElement("test_drawImageLorg_eclipse_swt_graphics_ImageIIIIIIII");
- methodNames.addElement("test_drawLineIIII");
- methodNames.addElement("test_drawOvalIIII");
- methodNames.addElement("test_drawPointII");
- methodNames.addElement("test_drawPolygon$I");
- methodNames.addElement("test_drawPolyline$I");
- methodNames.addElement("test_drawRectangleIIII");
- methodNames.addElement("test_drawRectangleLorg_eclipse_swt_graphics_Rectangle");
- methodNames.addElement("test_drawRoundRectangleIIIIII");
- methodNames.addElement("test_drawStringLjava_lang_StringII");
- methodNames.addElement("test_drawStringLjava_lang_StringIIZ");
- methodNames.addElement("test_drawTextLjava_lang_StringII");
- methodNames.addElement("test_drawTextLjava_lang_StringIII");
- methodNames.addElement("test_drawTextLjava_lang_StringIIZ");
- methodNames.addElement("test_equalsLjava_lang_Object");
- methodNames.addElement("test_fillArcIIIIII");
- methodNames.addElement("test_fillGradientRectangleIIIIZ");
- methodNames.addElement("test_fillOvalIIII");
- methodNames.addElement("test_fillPolygon$I");
- methodNames.addElement("test_fillRectangleIIII");
- methodNames.addElement("test_fillRectangleLorg_eclipse_swt_graphics_Rectangle");
- methodNames.addElement("test_fillRoundRectangleIIIIII");
- methodNames.addElement("test_getAdvanceWidthC");
- methodNames.addElement("test_getBackground");
- methodNames.addElement("test_getCharWidthC");
- methodNames.addElement("test_getClipping");
- methodNames.addElement("test_getClippingLorg_eclipse_swt_graphics_Region");
- methodNames.addElement("test_getFont");
- methodNames.addElement("test_getFontMetrics");
- methodNames.addElement("test_getForeground");
- methodNames.addElement("test_getLineStyle");
- methodNames.addElement("test_getLineWidth");
- methodNames.addElement("test_getStyle");
- methodNames.addElement("test_getXORMode");
- methodNames.addElement("test_hashCode");
- methodNames.addElement("test_isClipped");
- methodNames.addElement("test_isDisposed");
- methodNames.addElement("test_setBackgroundLorg_eclipse_swt_graphics_Color");
- methodNames.addElement("test_setClippingIIII");
- methodNames.addElement("test_setClippingLorg_eclipse_swt_graphics_Rectangle");
- methodNames.addElement("test_setClippingLorg_eclipse_swt_graphics_Region");
- methodNames.addElement("test_setFontLorg_eclipse_swt_graphics_Font");
- methodNames.addElement("test_setForegroundLorg_eclipse_swt_graphics_Color");
- methodNames.addElement("test_setLineStyleI");
- methodNames.addElement("test_setLineWidthI");
- methodNames.addElement("test_setXORModeZ");
- methodNames.addElement("test_stringExtentLjava_lang_String");
- methodNames.addElement("test_textExtentLjava_lang_String");
- methodNames.addElement("test_textExtentLjava_lang_StringI");
- methodNames.addElement("test_toString");
- methodNames.addElement("test_win32_newILorg_eclipse_swt_graphics_GCData");
- methodNames.addElement("test_win32_newLorg_eclipse_swt_graphics_DrawableLorg_eclipse_swt_graphics_GCData");
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLorg_eclipse_swt_graphics_Drawable")) test_ConstructorLorg_eclipse_swt_graphics_Drawable();
- else if (getName().equals("test_ConstructorLorg_eclipse_swt_graphics_DrawableI")) test_ConstructorLorg_eclipse_swt_graphics_DrawableI();
- else if (getName().equals("test_copyAreaIIIIII")) test_copyAreaIIIIII();
- else if (getName().equals("test_copyAreaLorg_eclipse_swt_graphics_ImageII")) test_copyAreaLorg_eclipse_swt_graphics_ImageII();
- else if (getName().equals("test_dispose")) test_dispose();
- else if (getName().equals("test_drawArcIIIIII")) test_drawArcIIIIII();
- else if (getName().equals("test_drawFocusIIII")) test_drawFocusIIII();
- else if (getName().equals("test_drawImageLorg_eclipse_swt_graphics_ImageII")) test_drawImageLorg_eclipse_swt_graphics_ImageII();
- else if (getName().equals("test_drawImageLorg_eclipse_swt_graphics_ImageIIIIIIII")) test_drawImageLorg_eclipse_swt_graphics_ImageIIIIIIII();
- else if (getName().equals("test_drawLineIIII")) test_drawLineIIII();
- else if (getName().equals("test_drawOvalIIII")) test_drawOvalIIII();
- else if (getName().equals("test_drawPointII")) test_drawPointII();
- else if (getName().equals("test_drawPolygon$I")) test_drawPolygon$I();
- else if (getName().equals("test_drawPolyline$I")) test_drawPolyline$I();
- else if (getName().equals("test_drawRectangleIIII")) test_drawRectangleIIII();
- else if (getName().equals("test_drawRectangleLorg_eclipse_swt_graphics_Rectangle")) test_drawRectangleLorg_eclipse_swt_graphics_Rectangle();
- else if (getName().equals("test_drawRoundRectangleIIIIII")) test_drawRoundRectangleIIIIII();
- else if (getName().equals("test_drawStringLjava_lang_StringII")) test_drawStringLjava_lang_StringII();
- else if (getName().equals("test_drawStringLjava_lang_StringIIZ")) test_drawStringLjava_lang_StringIIZ();
- else if (getName().equals("test_drawTextLjava_lang_StringII")) test_drawTextLjava_lang_StringII();
- else if (getName().equals("test_drawTextLjava_lang_StringIII")) test_drawTextLjava_lang_StringIII();
- else if (getName().equals("test_drawTextLjava_lang_StringIIZ")) test_drawTextLjava_lang_StringIIZ();
- else if (getName().equals("test_equalsLjava_lang_Object")) test_equalsLjava_lang_Object();
- else if (getName().equals("test_fillArcIIIIII")) test_fillArcIIIIII();
- else if (getName().equals("test_fillGradientRectangleIIIIZ")) test_fillGradientRectangleIIIIZ();
- else if (getName().equals("test_fillOvalIIII")) test_fillOvalIIII();
- else if (getName().equals("test_fillPolygon$I")) test_fillPolygon$I();
- else if (getName().equals("test_fillRectangleIIII")) test_fillRectangleIIII();
- else if (getName().equals("test_fillRectangleLorg_eclipse_swt_graphics_Rectangle")) test_fillRectangleLorg_eclipse_swt_graphics_Rectangle();
- else if (getName().equals("test_fillRoundRectangleIIIIII")) test_fillRoundRectangleIIIIII();
- else if (getName().equals("test_getAdvanceWidthC")) test_getAdvanceWidthC();
- else if (getName().equals("test_getBackground")) test_getBackground();
- else if (getName().equals("test_getCharWidthC")) test_getCharWidthC();
- else if (getName().equals("test_getClipping")) test_getClipping();
- else if (getName().equals("test_getClippingLorg_eclipse_swt_graphics_Region")) test_getClippingLorg_eclipse_swt_graphics_Region();
- else if (getName().equals("test_getFont")) test_getFont();
- else if (getName().equals("test_getFontMetrics")) test_getFontMetrics();
- else if (getName().equals("test_getForeground")) test_getForeground();
- else if (getName().equals("test_getLineStyle")) test_getLineStyle();
- else if (getName().equals("test_getLineWidth")) test_getLineWidth();
- else if (getName().equals("test_getStyle")) test_getStyle();
- else if (getName().equals("test_getXORMode")) test_getXORMode();
- else if (getName().equals("test_hashCode")) test_hashCode();
- else if (getName().equals("test_isClipped")) test_isClipped();
- else if (getName().equals("test_isDisposed")) test_isDisposed();
- else if (getName().equals("test_setBackgroundLorg_eclipse_swt_graphics_Color")) test_setBackgroundLorg_eclipse_swt_graphics_Color();
- else if (getName().equals("test_setClippingIIII")) test_setClippingIIII();
- else if (getName().equals("test_setClippingLorg_eclipse_swt_graphics_Rectangle")) test_setClippingLorg_eclipse_swt_graphics_Rectangle();
- else if (getName().equals("test_setClippingLorg_eclipse_swt_graphics_Region")) test_setClippingLorg_eclipse_swt_graphics_Region();
- else if (getName().equals("test_setFontLorg_eclipse_swt_graphics_Font")) test_setFontLorg_eclipse_swt_graphics_Font();
- else if (getName().equals("test_setForegroundLorg_eclipse_swt_graphics_Color")) test_setForegroundLorg_eclipse_swt_graphics_Color();
- else if (getName().equals("test_setLineStyleI")) test_setLineStyleI();
- else if (getName().equals("test_setLineWidthI")) test_setLineWidthI();
- else if (getName().equals("test_setXORModeZ")) test_setXORModeZ();
- else if (getName().equals("test_stringExtentLjava_lang_String")) test_stringExtentLjava_lang_String();
- else if (getName().equals("test_textExtentLjava_lang_String")) test_textExtentLjava_lang_String();
- else if (getName().equals("test_textExtentLjava_lang_StringI")) test_textExtentLjava_lang_StringI();
- else if (getName().equals("test_toString")) test_toString();
- else if (getName().equals("test_win32_newILorg_eclipse_swt_graphics_GCData")) test_win32_newILorg_eclipse_swt_graphics_GCData();
- else if (getName().equals("test_win32_newLorg_eclipse_swt_graphics_DrawableLorg_eclipse_swt_graphics_GCData")) test_win32_newLorg_eclipse_swt_graphics_DrawableLorg_eclipse_swt_graphics_GCData();
-}
-
-/* custom */
-Display display;
-Shell shell;
-Image image;
-GC gc;
-
-/**
- * Return the actual RGB value used for rendering for the given Color.
- * This may be different from the Color's RGB value on lower-color displays
- * (16bpp or less).
- */
-RGB getRealRGB(Color color) {
- Image colorImage = new Image(display, 10, 10);
- GC imageGc = new GC(colorImage);
- ImageData imageData;
- PaletteData palette;
- int pixel;
-
- imageGc.setBackground(color);
- imageGc.setForeground(color);
- imageGc.fillRectangle(0, 0, 10, 10);
- imageData = colorImage.getImageData();
- palette = imageData.palette;
- imageGc.dispose();
- colorImage.dispose();
- pixel = imageData.getPixel(0, 0);
- return palette.getRGB(pixel);
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_GCData.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_GCData.java
deleted file mode 100644
index 9a40846ab0..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_GCData.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.graphics.GCData
- *
- * @see org.eclipse.swt.graphics.GCData
- */
-public class Test_org_eclipse_swt_graphics_GCData extends SwtTestCase {
-
-public Test_org_eclipse_swt_graphics_GCData(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
-}
-
-protected void tearDown() {
-}
-
-public void test_Constructor() {
- warnUnimpl("Test test_Constructor not written");
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_graphics_GCData((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_Constructor");
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_Constructor")) test_Constructor();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_Image.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_Image.java
deleted file mode 100644
index a0bf868140..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_Image.java
+++ /dev/null
@@ -1,759 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import java.io.*;
-import java.net.*;
-
-import junit.framework.*;
-import junit.textui.*;
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.widgets.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.graphics.Image
- *
- * @see org.eclipse.swt.graphics.Image
- */
-public class Test_org_eclipse_swt_graphics_Image extends SwtTestCase {
-
-public Test_org_eclipse_swt_graphics_Image(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- display = Display.getDefault();
-}
-
-protected void tearDown() {
-}
-
-public void test_ConstructorLorg_eclipse_swt_graphics_DeviceII() {
- Image image;
- try {
- image = new Image(display, -1, 10);
- image.dispose();
- fail("No exception thrown for width <= 0");
- } catch (IllegalArgumentException e) {
- assertEquals("Incorrect exception thrown for width <= 0", SWT.ERROR_INVALID_ARGUMENT, e);
- }
-
- try {
- image = new Image(display, 0, 10);
- image.dispose();
- fail("No exception thrown for width <= 0");
- } catch (IllegalArgumentException e) {
- assertEquals("Incorrect exception thrown for width <= 0", SWT.ERROR_INVALID_ARGUMENT, e);
- }
-
- try {
- image = new Image(display, 10, -20);
- image.dispose();
- fail("No exception thrown for height <= 0");
- } catch (IllegalArgumentException e) {
- assertEquals("Incorrect exception thrown for height <= 0", SWT.ERROR_INVALID_ARGUMENT, e);
- }
-
- try {
- image = new Image(display, 10, 0);
- image.dispose();
- fail("No exception thrown for height <= 0");
- } catch (IllegalArgumentException e) {
- assertEquals("Incorrect exception thrown for height <= 0", SWT.ERROR_INVALID_ARGUMENT, e);
- }
-
- image = new Image(null, 10, 10);
- image.dispose();
-
- image = new Image(display, 10, 10);
- image.dispose();
-
-}
-
-public void test_ConstructorLorg_eclipse_swt_graphics_DeviceLorg_eclipse_swt_graphics_ImageI() {
- warnUnimpl("Test test_ConstructorLorg_eclipse_swt_graphics_DeviceLorg_eclipse_swt_graphics_ImageI not written");
-}
-
-public void test_ConstructorLorg_eclipse_swt_graphics_DeviceLorg_eclipse_swt_graphics_Rectangle() {
- Image image;
- Rectangle bounds = null;
-
- try {
- image = new Image(display, bounds);
- image.dispose();
- fail("No exception thrown for rectangle == null");
- } catch (IllegalArgumentException e) {
- assertEquals("Incorrect exception thrown for rectangle == null", SWT.ERROR_NULL_ARGUMENT, e);
- }
-
- bounds = new Rectangle(0, 0, -1, 10);
- try {
- image = new Image(display, bounds);
- image.dispose();
- fail("No exception thrown for width < 0");
- } catch (IllegalArgumentException e) {
- assertEquals("Incorrect exception thrown for width < 0", SWT.ERROR_INVALID_ARGUMENT, e);
- }
-
- bounds = new Rectangle(0, 0, 0, 10);
- try {
- image = new Image(display, bounds);
- image.dispose();
- fail("No exception thrown for width == 0");
- } catch (IllegalArgumentException e) {
- assertEquals("Incorrect exception thrown for width == 0", SWT.ERROR_INVALID_ARGUMENT, e);
- }
-
- bounds = new Rectangle(0, 0, 10, -1);
- try {
- image = new Image(display, bounds);
- image.dispose();
- fail("No exception thrown for height < 0");
- } catch (IllegalArgumentException e) {
- assertEquals("Incorrect exception thrown for height < 0", SWT.ERROR_INVALID_ARGUMENT, e);
- }
-
- bounds = new Rectangle(0, 0, 10, 0);
- try {
- image = new Image(display, bounds);
- image.dispose();
- fail("No exception thrown for height == 0");
- } catch (IllegalArgumentException e) {
- assertEquals("Incorrect exception thrown for height == 0", SWT.ERROR_INVALID_ARGUMENT, e);
- }
-
- // valid images
- bounds = new Rectangle(-1, -10, 10, 10);
- image = new Image(display, bounds);
- image.dispose();
-
- bounds = new Rectangle(0, 0, 10, 10);
- image = new Image(null, bounds);
- image.dispose();
-
- image = new Image(display, bounds);
- image.dispose();
-}
-
-public void test_ConstructorLorg_eclipse_swt_graphics_DeviceLorg_eclipse_swt_graphics_ImageData() {
- ImageData data = null;
- Image image = null;
-
- try {
- image = new Image(display, data);
- image.dispose();
- fail("No exception thrown for ImageData == null");
- } catch (IllegalArgumentException e) {
- assertEquals("Incorrect exception thrown for ImageData == null", SWT.ERROR_NULL_ARGUMENT, e);
- }
-
-// Platform-specific test.
-// data = new ImageData(10, 10, 1, new PaletteData(0xff0000, 0x00ff00, 0x0000ff));
-// try {
-// image = new Image(display, data);
-// image.dispose();
-// fail("Unsupported color depth");
-// } catch (SWTException e) {
-// }
-
- data = new ImageData(10, 10, 1, new PaletteData(new RGB[] {new RGB(0, 0, 0)}));
- image = new Image(null, data);
- image.dispose();
-
- data = new ImageData(10, 10, 1, new PaletteData(new RGB[] {new RGB(0, 0, 0)}));
- image = new Image(display, data);
- image.dispose();
-
- data = new ImageData(10, 10, 8, new PaletteData(0x30, 0x0C, 0x03));
- // set red pixel at x=9, y=9
- data.setPixel(9, 9, 0x30);
- image = new Image(display, data);
- Image gcImage = new Image(display, 10, 10);
- GC gc = new GC(gcImage);
- gc.drawImage(image, 0, 0);
- ImageData gcImageData = gcImage.getImageData();
- int redPixel = gcImageData.getPixel(9, 9);
- assertEquals(":a:", getRealRGB(display.getSystemColor(SWT.COLOR_RED)), gcImageData.palette.getRGB(redPixel));
- gc.dispose();
- gcImage.dispose();
- image.dispose();
-}
-
-public void test_ConstructorLorg_eclipse_swt_graphics_DeviceLorg_eclipse_swt_graphics_ImageDataLorg_eclipse_swt_graphics_ImageData() {
- ImageData data = null;
- ImageData data1 = new ImageData(10, 10, 1, new PaletteData(new RGB[] {new RGB(0, 0, 0)}));
- Image image = null;
-
- try {
- image = new Image(display, data, data1);
- image.dispose();
- fail("No exception thrown for ImageData source == null");
- } catch (IllegalArgumentException e) {
- assertEquals("Incorrect exception thrown for ImageData source == null", SWT.ERROR_NULL_ARGUMENT, e);
- }
-
- data = new ImageData(10, 10, 1, new PaletteData(new RGB[] {new RGB(0, 0, 0)}));
- data1 = null;
- try {
- image = new Image(display, data, data1);
- image.dispose();
- fail("No exception thrown for ImageData mask == null");
- } catch (IllegalArgumentException e) {
- assertEquals("Incorrect exception thrown for ImageData mask == null", SWT.ERROR_NULL_ARGUMENT, e);
- }
-
- data = new ImageData(10, 10, 1, new PaletteData(new RGB[] {new RGB(0, 0, 0)}));
- data1 = new ImageData(1, 10, 1, new PaletteData(new RGB[] {new RGB(0, 0, 0)}));
- try {
- image = new Image(display, data, data1);
- image.dispose();
- fail("No exception thrown for ImageData source width != ImageData mask width");
- } catch (IllegalArgumentException e) {
- assertEquals("Incorrect exception thrown for ImageData source width != ImageData mask width", SWT.ERROR_INVALID_ARGUMENT, e);
- }
-
- data = new ImageData(10, 1, 1, new PaletteData(new RGB[] {new RGB(0, 0, 0)}));
- data1 = new ImageData(10, 10, 1, new PaletteData(new RGB[] {new RGB(0, 0, 0)}));
- try {
- image = new Image(display, data, data1);
- image.dispose();
- fail("No exception thrown for ImageData source height != ImageData mask height");
- } catch (IllegalArgumentException e) {
- assertEquals("Incorrect exception thrown for ImageData source height != ImageData mask height", SWT.ERROR_INVALID_ARGUMENT, e);
- }
-
- data = new ImageData(10, 10, 8, new PaletteData(new RGB[] {new RGB(0, 0, 0)}));
- data1 = new ImageData(10, 10, 8, new PaletteData(new RGB[] {new RGB(0, 0, 0)}));
- image = new Image(display, data, data1); // Image now accepts masks where depth != 1
- image.dispose();
-
- data = new ImageData(10, 10, 8, new PaletteData(0x30, 0x0C, 0x03));
- // set opaque red pixel at x=9, y=9
- data.setPixel(9, 9, 0x30);
- data1 = new ImageData(10, 10, 1, new PaletteData(new RGB[] {new RGB(0, 0, 0), new RGB(255, 255, 255)}));
- data1.setPixel(9, 9, 1);
- image = new Image(display, data, data1);
- Image gcImage = new Image(display, 10, 10);
- GC gc = new GC(gcImage);
- Color backgroundColor = display.getSystemColor(SWT.COLOR_BLUE);
- gc.setBackground(backgroundColor);
- gc.fillRectangle(0, 0, 10, 10);
- gc.drawImage(image, 0, 0);
- ImageData gcImageData = gcImage.getImageData();
- int redPixel = gcImageData.getPixel(9, 9);
- assertEquals(":a:", getRealRGB(display.getSystemColor(SWT.COLOR_RED)), gcImageData.palette.getRGB(redPixel));
- int bluePixel = gcImageData.getPixel(0, 0);
- assertEquals(":b:", getRealRGB(backgroundColor), gcImageData.palette.getRGB(bluePixel));
- gc.dispose();
- gcImage.dispose();
- image.dispose();
-}
-
-public void test_ConstructorLorg_eclipse_swt_graphics_DeviceLjava_io_InputStream() {
- InputStream stream = null;
- Image image = null;
- try {
- try {
- image = new Image(display, stream);
- image.dispose();
- fail("No exception thrown for InputStream == null");
- } catch (IllegalArgumentException e) {
- assertEquals("Incorrect exception thrown for InputStream == null", SWT.ERROR_NULL_ARGUMENT, e);
- }
-
- stream = SwtTestCase.class.getResourceAsStream("empty.txt");
- try {
- image = new Image(display, stream);
- image.dispose();
- try {
- stream.close();
- } catch (IOException e) {}
- fail("No exception thrown for invalid InputStream");
- } catch (SWTException e) {
- assertEquals("Incorrect exception thrown for invalid InputStream", SWT.ERROR_UNSUPPORTED_FORMAT, e);
- }
-
- int numFormats = SwtTestCase.imageFormats.length;
- String fileName = SwtTestCase.invalidImageFilenames[0];
- Display[] displays = {display, null};
- for (int j = 0; j < displays.length; j++) {
- Display tempDisplay = displays[j];
- for (int i=0; i<numFormats; i++) {
- String format = SwtTestCase.imageFormats[i];
- stream = SwtTestCase.class.getResourceAsStream(fileName + "." + format);
-
- try {
- image = new Image(display, stream);
- image.dispose();
- try {
- stream.close();
- } catch (IOException e) {}
- fail("No exception thrown for invalid InputStream");
- } catch (SWTException e) {
-// Bug 70167 - Image(Device, InputStream) throws incorrect exception for bad PNG
-// remove comment when bug is fixed.
-// assertEquals("Incorrect exception thrown for invalid image InputStream", SWT.ERROR_INVALID_IMAGE, e);
- }
- }
- }
-
- stream = SwtTestCase.class.getResourceAsStream(SwtTestCase.invalidImageFilenames[1]);
- try {
- image = new Image(display, stream);
- image.dispose();
- try {
- stream.close();
- } catch (IOException e) {}
- fail("No exception thrown for invalid InputStream");
- } catch (SWTException e) {
- assertEquals("Incorrect exception thrown for invalid image InputStream", SWT.ERROR_INVALID_IMAGE, e);
- }
-
- // create valid images
- for (int j = 0; j < displays.length; j++) {
- Display tempDisplay = displays[j];
- int numFileNames = SwtTestCase.imageFilenames.length;
- for (int k=0; k<numFileNames; k++) {
- fileName = SwtTestCase.imageFilenames[k];
- for (int i=0; i<numFormats; i++) {
- String format = SwtTestCase.imageFormats[i];
- stream = SwtTestCase.class.getResourceAsStream(fileName + "." + format);
- image = new Image(tempDisplay, stream);
- image.dispose();
- try {
- stream.close();
- } catch (IOException e) {}
- }
- }
- }
- } finally {
- try {
- stream.close();
- } catch (Exception e) {
- }
- }
-}
-
-public void test_ConstructorLorg_eclipse_swt_graphics_DeviceLjava_lang_String() {
- String fileName = null;
- try {
- Image image = new Image(display, fileName);
- image.dispose();
- fail("No exception thrown for file name == null");
- } catch (IllegalArgumentException e) {
- assertEquals("Incorrect exception thrown for file name == null", SWT.ERROR_NULL_ARGUMENT, e);
- }
- try {
- String pathName = "nonexistent.txt";
- Image image = new Image(display, pathName);
- image.dispose();
- fail("No exception thrown for non-existent file name");
- } catch (SWTException e) {
- assertEquals("Incorrect exception thrown for non-existent file name", SWT.ERROR_IO, e);
- }
- // j2se and j2me(cdc) can load from a file name but, j2me(cldc) throws an exception
- if (!isJ2ME()) {
- try {
- String pathName = getPath("empty.txt");
- Image image = new Image(display, pathName);
- image.dispose();
- fail("No exception thrown for invalid file name");
- } catch (SWTException e) {
- assertEquals("Incorrect exception thrown for invalid file name", SWT.ERROR_UNSUPPORTED_FORMAT, e);
- }
-
- int numFormats = SwtTestCase.imageFormats.length;
- fileName = SwtTestCase.invalidImageFilenames[0];
- Display[] displays = {display, null};
- for (int j = 0; j < displays.length; j++) {
- Display tempDisplay = displays[j];
- for (int i=0; i<numFormats; i++) {
- String format = SwtTestCase.imageFormats[i];
-
- try {
- String pathName = getPath(fileName + "." + format);
- Image image = new Image(display, pathName);
- image.dispose();
- fail("No exception thrown for invalid file name");
- } catch (SWTException e) {
-// Bug 70167 - Image(Device, InputStream) throws incorrect exception for bad PNG
-// remove comment when bug is fixed.
-// assertEquals("Incorrect exception thrown for invalid image file name", SWT.ERROR_INVALID_IMAGE, e);
- }
- }
- }
-
- try {
- String pathName = getPath(SwtTestCase.invalidImageFilenames[1]);
- Image image = new Image(display, pathName);
- image.dispose();
- fail("No exception thrown for invalid file name");
- } catch (SWTException e) {
- assertEquals("Incorrect exception thrown for invalid image file name", SWT.ERROR_INVALID_IMAGE, e);
- }
-
- // create valid images
- for (int j = 0; j < displays.length; j++) {
- Display tempDisplay = displays[j];
- int numFileNames = SwtTestCase.imageFilenames.length;
- for (int k=0; k<numFileNames; k++) {
- fileName = SwtTestCase.imageFilenames[k];
- for (int i=0; i<numFormats; i++) {
- String format = SwtTestCase.imageFormats[i];
- String pathName = getPath(fileName + "." + format);
- Image image = new Image(display, pathName);
- image.dispose();
- }
- }
- }
- }
-}
-
-public void test_dispose() {
- // tested in isDisposed() method
-}
-
-public void test_equalsLjava_lang_Object() {
- Image image = null;
- Image image1 = null;;
-
- try {
- image = new Image(display, 10, 10);
- image1 = image;
-
- assertFalse(":a:", image.equals(null));
-
- assertTrue(":b:", image.equals(image1));
-
- ImageData imageData = new ImageData(10, 10, 1, new PaletteData(new RGB[] {new RGB(0, 0, 0)}));
- image.dispose();
- image = new Image(display, imageData);
- image1 = new Image(display, imageData);
- assertFalse(":c:", image.equals(image1));
- } finally {
- image.dispose();
- image1.dispose();
- }
-}
-
-public void test_getBackground() {
- Image image = new Image(display, 10, 10);
- image.dispose();
- try {
- image.getBackground();
- fail("No exception thrown for disposed image");
- } catch (SWTException e) {
- assertEquals("Incorrect exception thrown for disposed image", SWT.ERROR_GRAPHIC_DISPOSED, e);
- }
- // remainder tested in setBackground method
-}
-
-public void test_getBounds() {
- Rectangle bounds = new Rectangle(0, 0, 10, 20);
- Image image = new Image(display, bounds.width, bounds.height);
- image.dispose();
- try {
- image.getBounds();
- fail("No exception thrown for disposed image");
- } catch (SWTException e) {
- assertEquals("Incorrect exception thrown for disposed image", SWT.ERROR_GRAPHIC_DISPOSED, e);
- }
-
- // creates bitmap image
- image = new Image(display, bounds.width, bounds.height);
- Rectangle bounds1 = image.getBounds();
- image.dispose();
- assertEquals(":a:", bounds, bounds1);
-
- image = new Image(display, bounds);
- bounds1 = image.getBounds();
- image.dispose();
- assertEquals(":b:", bounds, bounds1);
-
- // create icon image
- ImageData imageData = new ImageData(bounds.width, bounds.height, 1, new PaletteData(new RGB[] {new RGB(0, 0, 0)}));
- image = new Image(display, imageData);
- bounds1 = image.getBounds();
- image.dispose();
- assertEquals(":c:", bounds, bounds1);
-}
-
-public void test_getImageData() {
- getImageData1();
- getImageData2(24, new PaletteData(0xff0000, 0xff00, 0xff));
- getImageData2(32, new PaletteData(0xff0000, 0xff00, 0xff));
-}
-
-public void test_hashCode() {
- Image image = null;
- Image image1 = null;;
-
- try {
- image = new Image(display, 10, 10);
- image1 = image;
-
- assertEquals(":a:", image1.hashCode(), image.hashCode());
-
- ImageData imageData = new ImageData(10, 10, 1, new PaletteData(new RGB[] {new RGB(0, 0, 0)}));
- image.dispose();
- image = new Image(display, imageData);
- image1 = new Image(display, imageData);
- boolean equals = (image1.hashCode() == image.hashCode());
- assertFalse(":b:", equals);
- } finally {
- image.dispose();
- image1.dispose();
- }
-}
-
-public void test_internal_new_GCLorg_eclipse_swt_graphics_GCData() {
- // javadoc states:
- // <b>IMPORTANT:</b> This method is <em>not</em> part of the public
- // API for <code>Image</code>
-}
-
-public void test_internal_dispose_GCILorg_eclipse_swt_graphics_GCData() {
- // javadoc states:
- // <b>IMPORTANT:</b> This method is <em>not</em> part of the public
- // API for <code>Image</code>
-}
-
-public void test_isDisposed() {
- Image image = new Image(display, 10, 10);
- assertFalse(":a:", image.isDisposed());
- image.dispose();
- assertTrue(":b:", image.isDisposed());
-}
-
-public void test_setBackgroundLorg_eclipse_swt_graphics_Color() {
- Image image = new Image(display, 10, 10);
-
- try {
- image.setBackground(null);
- fail("No exception thrown for color == null");
- } catch (IllegalArgumentException e) {
- assertEquals("Incorrect exception thrown for color == null", SWT.ERROR_NULL_ARGUMENT, e);
- } finally {
- image.dispose();
- }
-
- image = new Image(display, 10, 10);
- Color color = new Color(display, 255, 255, 255);
- color.dispose();
- try {
- image.setBackground(color);
- fail("No exception thrown for disposed color");
- } catch (IllegalArgumentException e) {
- assertEquals("Incorrect exception thrown for disposed color", SWT.ERROR_INVALID_ARGUMENT, e);
- } finally {
- image.dispose();
- }
-
- image = new Image(display, 10, 10);
- image.dispose();
- color = new Color(display, 255, 255, 255);
- try {
- image.setBackground(color);
- fail("No exception thrown for disposed image");
- } catch (SWTException e) {
- assertEquals("Incorrect exception thrown for disposed image", SWT.ERROR_GRAPHIC_DISPOSED, e);
- } finally {
- color.dispose();
- }
-
- // this image does not have a transparent pixel by default so setBackground has no effect
- image = new Image(display, 10, 10);
- image.setBackground(display.getSystemColor(SWT.COLOR_GREEN));
- color = image.getBackground();
- assertNull("background color should be null for non-transparent image", color);
- image.dispose();
-
- // create an image with transparency and then set the background color
- ImageData imageData = new ImageData(10, 10, 2, new PaletteData(new RGB[] {new RGB(0, 0, 0), new RGB(255, 255, 255), new RGB(50, 100, 150)}));
- imageData.transparentPixel = 0; // transparent pixel is currently black
- image = new Image(display, imageData);
- image.setBackground(display.getSystemColor(SWT.COLOR_GREEN));
- color = image.getBackground();
- assertEquals("background color should have been set to green", display.getSystemColor(SWT.COLOR_GREEN), color);
- image.dispose();
-}
-
-public void test_toString() {
- Image image = new Image(display, 10, 10);
- try {
- assertNotNull(image.toString());
- assertTrue(image.toString().length() > 0);
- } finally {
- image.dispose();
- }
-}
-
-public void test_win32_newLorg_eclipse_swt_graphics_DeviceII() {
- // do not test - Windows only
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_graphics_Image((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_graphics_DeviceII");
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_graphics_DeviceLjava_io_InputStream");
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_graphics_DeviceLjava_lang_String");
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_graphics_DeviceLorg_eclipse_swt_graphics_ImageData");
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_graphics_DeviceLorg_eclipse_swt_graphics_ImageDataLorg_eclipse_swt_graphics_ImageData");
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_graphics_DeviceLorg_eclipse_swt_graphics_ImageI");
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_graphics_DeviceLorg_eclipse_swt_graphics_Rectangle");
- methodNames.addElement("test_dispose");
- methodNames.addElement("test_equalsLjava_lang_Object");
- methodNames.addElement("test_getBackground");
- methodNames.addElement("test_getBounds");
- methodNames.addElement("test_getImageData");
- methodNames.addElement("test_hashCode");
- methodNames.addElement("test_internal_dispose_GCILorg_eclipse_swt_graphics_GCData");
- methodNames.addElement("test_internal_new_GCLorg_eclipse_swt_graphics_GCData");
- methodNames.addElement("test_isDisposed");
- methodNames.addElement("test_setBackgroundLorg_eclipse_swt_graphics_Color");
- methodNames.addElement("test_toString");
- methodNames.addElement("test_win32_newLorg_eclipse_swt_graphics_DeviceII");
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLorg_eclipse_swt_graphics_DeviceII")) test_ConstructorLorg_eclipse_swt_graphics_DeviceII();
- else if (getName().equals("test_ConstructorLorg_eclipse_swt_graphics_DeviceLjava_io_InputStream")) test_ConstructorLorg_eclipse_swt_graphics_DeviceLjava_io_InputStream();
- else if (getName().equals("test_ConstructorLorg_eclipse_swt_graphics_DeviceLjava_lang_String")) test_ConstructorLorg_eclipse_swt_graphics_DeviceLjava_lang_String();
- else if (getName().equals("test_ConstructorLorg_eclipse_swt_graphics_DeviceLorg_eclipse_swt_graphics_ImageData")) test_ConstructorLorg_eclipse_swt_graphics_DeviceLorg_eclipse_swt_graphics_ImageData();
- else if (getName().equals("test_ConstructorLorg_eclipse_swt_graphics_DeviceLorg_eclipse_swt_graphics_ImageDataLorg_eclipse_swt_graphics_ImageData")) test_ConstructorLorg_eclipse_swt_graphics_DeviceLorg_eclipse_swt_graphics_ImageDataLorg_eclipse_swt_graphics_ImageData();
- else if (getName().equals("test_ConstructorLorg_eclipse_swt_graphics_DeviceLorg_eclipse_swt_graphics_ImageI")) test_ConstructorLorg_eclipse_swt_graphics_DeviceLorg_eclipse_swt_graphics_ImageI();
- else if (getName().equals("test_ConstructorLorg_eclipse_swt_graphics_DeviceLorg_eclipse_swt_graphics_Rectangle")) test_ConstructorLorg_eclipse_swt_graphics_DeviceLorg_eclipse_swt_graphics_Rectangle();
- else if (getName().equals("test_dispose")) test_dispose();
- else if (getName().equals("test_equalsLjava_lang_Object")) test_equalsLjava_lang_Object();
- else if (getName().equals("test_getBackground")) test_getBackground();
- else if (getName().equals("test_getBounds")) test_getBounds();
- else if (getName().equals("test_getImageData")) test_getImageData();
- else if (getName().equals("test_hashCode")) test_hashCode();
- else if (getName().equals("test_internal_dispose_GCILorg_eclipse_swt_graphics_GCData")) test_internal_dispose_GCILorg_eclipse_swt_graphics_GCData();
- else if (getName().equals("test_internal_new_GCLorg_eclipse_swt_graphics_GCData")) test_internal_new_GCLorg_eclipse_swt_graphics_GCData();
- else if (getName().equals("test_isDisposed")) test_isDisposed();
- else if (getName().equals("test_setBackgroundLorg_eclipse_swt_graphics_Color")) test_setBackgroundLorg_eclipse_swt_graphics_Color();
- else if (getName().equals("test_toString")) test_toString();
- else if (getName().equals("test_win32_newLorg_eclipse_swt_graphics_DeviceII")) test_win32_newLorg_eclipse_swt_graphics_DeviceII();
-}
-/* custom */
-Display display;
-
-/** Test implementation **/
-
-void getImageData1() {
- int numFormats = SwtTestCase.imageFormats.length;
- String fileName = SwtTestCase.imageFilenames[0];
- for (int i=0; i<numFormats; i++) {
- String format = SwtTestCase.imageFormats[i];
- ImageLoader loader = new ImageLoader();
- InputStream stream = SwtTestCase.class.getResourceAsStream(fileName + "." + format);
- ImageData data1 = loader.load(stream)[0];
- Image image = new Image(display, data1);
- ImageData data2 = image.getImageData();
- image.dispose();
- assertEquals("Image width should be the same", data1.width, data2.width);
- assertEquals("Image height should be the same", data1.height, data2.height);
- try {
- stream.close();
- } catch (IOException e) {
- // continue;
- }
- }
-}
-
-/*
- * Verify Image.getImageData returns pixels with the same RGB value as the
- * source image. This test only makes sense with depth of 24 and 32 bits.
- */
-void getImageData2(int depth, PaletteData palette) {
- int width = 10;
- int height = 10;
- Color color = new Color(display, 0, 0xff, 0);
- RGB colorRGB = color.getRGB();
-
- ImageData imageData = new ImageData(width, height, depth, palette);
- Image image = new Image(display, imageData);
-
- GC gc = new GC(image);
- gc.setBackground(color);
- gc.setForeground(color);
- gc.fillRectangle(0, 0, 10, 10);
-
- ImageData newData = image.getImageData();
- PaletteData newPalette = newData.palette;
- for (int i = 0; i < width; i++) {
- for (int j = 0; j < height; j++) {
- int pixel = newData.getPixel(i, j);
- RGB rgb = newPalette.getRGB(pixel);
- assertTrue("rgb.equals(colorRGB)", rgb.equals(colorRGB));
- }
- }
- color.dispose();
- gc.dispose();
- image.dispose();
-}
-String getPath(String fileName) {
- String urlPath;
-
- String pluginPath = System.getProperty("PLUGIN_PATH");
- System.out.println("PLUGIN_PATH <"+pluginPath+">");
- if (pluginPath == null) {
- URL url = getClass().getClassLoader().getResource(fileName);
- if (url == null) {
- fail("URL == null for file " + fileName);
- }
- urlPath = url.getFile();
- } else {
- urlPath = pluginPath + "/data/" + fileName;
- }
-
- if (File.separatorChar != '/') urlPath = urlPath.replace('/', File.separatorChar);
- if (urlPath.indexOf(File.separatorChar) == 0) urlPath = urlPath.substring(1);
- urlPath = urlPath.replaceAll("%20", " ");
-
- System.out.println("Resolved file name for " + fileName + " = " + urlPath);
- return urlPath;
-}
-RGB getRealRGB(Color color) {
- Image colorImage = new Image(display, 10, 10);
- GC imageGc = new GC(colorImage);
- ImageData imageData;
- PaletteData palette;
- int pixel;
-
- imageGc.setBackground(color);
- imageGc.setForeground(color);
- imageGc.fillRectangle(0, 0, 10, 10);
- imageData = colorImage.getImageData();
- palette = imageData.palette;
- imageGc.dispose();
- colorImage.dispose();
- pixel = imageData.getPixel(0, 0);
- return palette.getRGB(pixel);
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_ImageData.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_ImageData.java
deleted file mode 100644
index 256ab22baf..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_ImageData.java
+++ /dev/null
@@ -1,1220 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import java.io.*;
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.widgets.*;
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.graphics.ImageData
- *
- * @see org.eclipse.swt.graphics.ImageData
- */
-public class Test_org_eclipse_swt_graphics_ImageData extends SwtTestCase {
-
-public Test_org_eclipse_swt_graphics_ImageData(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- imageData = new ImageData(IMAGE_DIMENSION, IMAGE_DIMENSION, 32, new PaletteData(0xFF0000, 0xFF00, 0xFF));
-}
-
-protected void tearDown() {
-}
-
-public void test_ConstructorIIILorg_eclipse_swt_graphics_PaletteData() {
- try {
- new ImageData(-1, 1, 1, new PaletteData(new RGB[] {new RGB(0, 0, 0)}));
- fail("No exception thrown for width < 0");
- } catch (IllegalArgumentException e) {
- }
-
- try {
- new ImageData(1, -1, 1, new PaletteData(new RGB[] {new RGB(0, 0, 0)}));
- fail("No exception thrown for height < 0");
- } catch (IllegalArgumentException e) {
- }
-
- try {
- new ImageData(1, 1, 1, null, 0, new byte[] {});
- fail("No exception thrown for paletteData == null");
- } catch (IllegalArgumentException e) {
- }
-
- try {
- new ImageData(1, 1, 3, new PaletteData(new RGB[] {new RGB(0, 0, 0)}));
- fail("No exception thrown for unsupported depth");
- } catch (IllegalArgumentException e) {
- }
-
- int[] validDepths = {1, 2, 4, 8, 16, 24, 32};
- for (int i = 0; i < validDepths.length; i++) {
- new ImageData(1, 1, validDepths[i], new PaletteData(new RGB[] {new RGB(0, 0, 0)}));
- };
-}
-
-public void test_ConstructorIIILorg_eclipse_swt_graphics_PaletteDataI$B() {
- try {
- new ImageData(-1, 1, 1, new PaletteData(new RGB[] {new RGB(0, 0, 0)}), 1, new byte[] {});
- fail("No exception thrown for width < 0");
- } catch (IllegalArgumentException e) {
- }
-
- try {
- new ImageData(1, -1, 1, new PaletteData(new RGB[] {new RGB(0, 0, 0)}), 1, new byte[] {});
- fail("No exception thrown for height < 0");
- } catch (IllegalArgumentException e) {
- }
-
- try {
- new ImageData(1, 1, 1, null, 0, new byte[] {});
- fail("No exception thrown for paletteData == null");
- } catch (IllegalArgumentException e) {
- }
-
- try {
- new ImageData(1, 1, 1, new PaletteData(new RGB[] {new RGB(0, 0, 0)}), 1, null);
- fail("No exception thrown for data == null");
- } catch (IllegalArgumentException e) {
- }
-
- try {
- new ImageData(1, 1, 3, new PaletteData(new RGB[] {new RGB(0, 0, 0)}), 1, new byte[] {});
- fail("No exception thrown for unsupported depth");
- } catch (IllegalArgumentException e) {
- }
-
- int[] validDepths = {1, 2, 4, 8, 16, 24, 32};
- for (int i = 0; i < validDepths.length; i++) {
- new ImageData(1, 1, validDepths[i], new PaletteData(new RGB[] {new RGB(0, 0, 0)}), 1, new byte[] {});
- };
-
- // illegal argument, data is null
- try {
- new ImageData(1, 1, 8, new PaletteData(new RGB[] {new RGB(0, 0, 0)}), 4, null);
- fail("No exception thrown for null data");
- } catch (IllegalArgumentException e) {
- }
-
- // divide by zero exception if scanlinePad == 0
- try {
- new ImageData(1, 1, 8, new PaletteData(new RGB[] {new RGB(0, 0, 0)}), 0, new byte[] {});
- fail("No exception thrown for scanlinePad == 0");
- } catch (IllegalArgumentException e) {
- }
-}
-
-public void test_ConstructorLjava_io_InputStream() {
- InputStream stream = null;
- try {
- try {
- new ImageData(stream);
- fail("No exception thrown for InputStream == null");
- } catch (IllegalArgumentException e) {
- }
-
- stream = SwtTestCase.class.getResourceAsStream("empty.txt");
- try {
- new ImageData(stream);
- fail("No exception thrown for invalid InputStream");
- } catch (SWTException e) {
- }
-
- int numFormats = SwtTestCase.imageFormats.length;
- String fileName = SwtTestCase.imageFilenames[0];
- for (int i=0; i<numFormats; i++) {
- String format = SwtTestCase.imageFormats[i];
- stream = SwtTestCase.class.getResourceAsStream(fileName + "." + format);
- new ImageData(stream);
- }
- } finally {
- try {
- stream.close();
- } catch (Exception e) {
- }
- }
-}
-
-public void test_ConstructorLjava_lang_String() {
- String filename = null;
- try {
- new ImageData(filename);
- fail("No exception thrown for filename == null");
- } catch (IllegalArgumentException e) {
- }
- // j2se and j2me(cdc) can load from a filename but, j2me(cldc) throws an exception
-}
-
-public void test_clone() {
- InputStream stream = null;
- try {
- stream = SwtTestCase.class.getResourceAsStream(SwtTestCase.imageFilenames[0] + "." + SwtTestCase.imageFormats[0]);
- ImageLoader loader = new ImageLoader();
- ImageData data1 = loader.load(stream)[0];
- ImageData data2 = (ImageData) data1.clone();
- // imageData does not implement an equals(Object) method
- assertEquals(":a:", data1.alpha, data2.alpha);
- assertEquals(":b:", data1.alphaData, data2.alphaData);
- assertEquals(":c:", data1.bytesPerLine, data2.bytesPerLine);
- assertEquals(":d:", data1.data, data2.data);
- assertEquals(":e:", data1.delayTime, data2.delayTime);
- assertEquals(":f:", data1.depth, data2.depth);
- assertEquals(":g:", data1.disposalMethod, data2.disposalMethod);
- assertEquals(":h:", data1.height, data2.height);
- assertEquals(":i:", data1.maskData, data2.maskData);
- assertEquals(":j:", data1.maskPad, data2.maskPad);
- assertEquals(":k:", data1.palette, data2.palette);
- assertEquals(":l:", data1.scanlinePad, data2.scanlinePad);
- assertEquals(":m:", data1.transparentPixel, data2.transparentPixel);
- assertEquals(":n:", data1.type, data2.type);
- assertEquals(":o:", data1.width, data2.width);
- assertEquals(":p:", data1.x, data2.x);
- assertEquals(":q:", data1.y, data2.y);
- } finally {
- try {
- stream.close();
- } catch (Exception e) {
- }
- }
-}
-
-public void test_getAlphaII() {
- int value;
-
- assertEquals(":a:", 255, imageData.getAlpha(0, 0));
- value = 0xAA;
- imageData.setAlpha(0, 0, value);
- assertEquals(":b:", value, imageData.getAlpha(0, 0));
-
- // exception cases
- try {
- imageData.getAlpha(-1, 1);
- fail("No exception thrown for x out of bounds");
- } catch (IllegalArgumentException e) {
- assertEquals("Incorrect exception thrown for x out of bounds", SWT.ERROR_INVALID_ARGUMENT, e);
- }
- try {
- imageData.getAlpha(IMAGE_DIMENSION, 1);
- fail("No exception thrown for x out of bounds");
- } catch (IllegalArgumentException e) {
- assertEquals("Incorrect exception thrown for x out of bounds", SWT.ERROR_INVALID_ARGUMENT, e);
- }
- try {
- imageData.getAlpha(0, -1);
- fail("No exception thrown for y out of bounds");
- } catch (IllegalArgumentException e) {
- assertEquals("Incorrect exception thrown for y out of bounds", SWT.ERROR_INVALID_ARGUMENT, e);
- }
- try {
- imageData.getAlpha(0, IMAGE_DIMENSION);
- fail("No exception thrown for y out of bounds");
- } catch (IllegalArgumentException e) {
- assertEquals("Incorrect exception thrown for y out of bounds", SWT.ERROR_INVALID_ARGUMENT, e);
- }
-}
-
-public void test_getAlphasIII$BI() {
- byte value;
- final int SIZE = 20;
- final int GET_WIDTH = 10;
- final int OFFSET = 10;
- byte[] alphaData = new byte[SIZE];
-
- imageData.getAlphas(0, 1, GET_WIDTH, alphaData, OFFSET);
- for (int i = 0; i < alphaData.length; i ++) {
- if (i < OFFSET) {
- assertEquals(":a:", 0, alphaData[i]);
- } else {
- assertEquals(":b:", (byte) 255, alphaData[i]);
- }
- }
-
- value = (byte) 0xAA;
- byte[] values = new byte[] {value, (byte) (value+1), (byte) (value+2), (byte) (value+3), (byte) (value+4)};
- imageData.setAlphas(0, 1, values.length, values, 0);
- imageData.getAlphas(0, 1, GET_WIDTH, alphaData, OFFSET);
- for (int i = 0; i < alphaData.length; i++) {
- if (i < OFFSET) {
- assertEquals(":c:", 0, alphaData[i]);
- } else if (i < OFFSET + values.length) {
- assertEquals(":d:", (byte) values[i-OFFSET], alphaData[i]);
- } else if (i < OFFSET+GET_WIDTH) {
- assertEquals(":e:", 0, alphaData[i]);
- }
- }
-
- // exception cases
- try {
- imageData.getAlphas(0, 1, GET_WIDTH*GET_WIDTH, alphaData, OFFSET);
- fail("No exception thrown for getWidth out of bounds");
- } catch (IndexOutOfBoundsException e) {
- }
- try {
- imageData.getAlphas(0, 1, GET_WIDTH, (byte[]) null, OFFSET);
- fail("No exception thrown for alphas == null");
- } catch (IllegalArgumentException e) {
- assertEquals("Incorrect exception thrown for alphas == null", SWT.ERROR_NULL_ARGUMENT, e);
- }
- try {
- imageData.getAlphas(-1, 1, GET_WIDTH, alphaData, OFFSET);
- fail("No exception thrown for x out of bounds");
- } catch (IllegalArgumentException e) {
- assertEquals("Incorrect exception thrown for x out of bounds", SWT.ERROR_INVALID_ARGUMENT, e);
- }
- try {
- imageData.getAlphas(IMAGE_DIMENSION, 1, GET_WIDTH, alphaData, OFFSET);
- fail("No exception thrown for x out of bounds");
- } catch (IllegalArgumentException e) {
- assertEquals("Incorrect exception thrown for x out of bounds", SWT.ERROR_INVALID_ARGUMENT, e);
- }
- try {
- imageData.getAlphas(0, -1, GET_WIDTH, alphaData, OFFSET);
- fail("No exception thrown for y out of bounds");
- } catch (IllegalArgumentException e) {
- assertEquals("Incorrect exception thrown for y out of bounds", SWT.ERROR_INVALID_ARGUMENT, e);
- }
- try {
- imageData.getAlphas(0, IMAGE_DIMENSION, GET_WIDTH, alphaData, OFFSET);
- fail("No exception thrown for y out of bounds");
- } catch (IllegalArgumentException e) {
- assertEquals("Incorrect exception thrown for y out of bounds", SWT.ERROR_INVALID_ARGUMENT, e);
- }
- try {
- imageData.getAlphas(0, 1, -1, alphaData, OFFSET);
- fail("No exception thrown for getWidth < 0");
- } catch (IllegalArgumentException e) {
- assertEquals("Incorrect exception thrown for getWidth < 0", SWT.ERROR_INVALID_ARGUMENT, e);
- }
-}
-
-public void test_getPixelII() {
- int value;
-
- assertEquals(":a:", 0, imageData.getPixel(0, 0));
- value = 0xAA;
- imageData.setPixel(0, 0, value);
- assertEquals(":b:", value, imageData.getPixel(0, 0));
-
- // exception cases
- try {
- imageData.getPixel(-1, 1);
- fail("No exception thrown for x out of bounds");
- } catch (IllegalArgumentException e) {
- assertEquals("Incorrect exception thrown for x out of bounds", SWT.ERROR_INVALID_ARGUMENT, e);
- }
- try {
- imageData.getPixel(IMAGE_DIMENSION, 1);
- fail("No exception thrown for x out of bounds");
- } catch (IllegalArgumentException e) {
- assertEquals("Incorrect exception thrown for x out of bounds", SWT.ERROR_INVALID_ARGUMENT, e);
- }
- try {
- imageData.getPixel(0, -1);
- fail("No exception thrown for y out of bounds");
- } catch (IllegalArgumentException e) {
- assertEquals("Incorrect exception thrown for y out of bounds", SWT.ERROR_INVALID_ARGUMENT, e);
- }
- try {
- imageData.getPixel(0, IMAGE_DIMENSION);
- fail("No exception thrown for y out of bounds");
- } catch (IllegalArgumentException e) {
- assertEquals("Incorrect exception thrown for y out of bounds", SWT.ERROR_INVALID_ARGUMENT, e);
- }
- int width = 3;
- int height = 3;
- int depth = 4;
- byte pixelValue = 1;
- byte[] data = {(byte) ((pixelValue << 4) + pixelValue), (byte) (pixelValue << 4), (byte) ((pixelValue << 4) + pixelValue), (byte) (pixelValue << 4), (byte) ((pixelValue << 4) + pixelValue), (byte) (pixelValue << 4)};
- imageData = new ImageData(width, height, depth, new PaletteData(new RGB[] {new RGB(0, 0, 255), new RGB(111, 111, 111)}), 1, data);
- for (int y = 0; y < height; y++) {
- for (int x = 0; x < width; x++) {
- int pixel = imageData.getPixel(x, y);
- assertEquals("Bad pixel data", pixelValue, pixel);
- }
- }
-}
-
-public void test_getPixelsIII$BI() {
- byte value;
- final int SIZE = 20;
- final int GET_WIDTH = 10;
- final int OFFSET = 10;
- byte[] pixelData = new byte[SIZE];
-
- // test 1 bit
- imageData = new ImageData(IMAGE_DIMENSION, IMAGE_DIMENSION, 1, new PaletteData(new RGB[]{new RGB(0, 0, 0), new RGB(255, 255, 255)}));
- imageData.getPixels(0, 1, GET_WIDTH, pixelData, OFFSET);
- for (int i = 0; i < pixelData.length; i ++) {
- assertEquals(":a:", 0, pixelData[i]);
- }
-
- byte[] values = new byte[]{0x1, 0x1, 0x1, 0x1, 0x1};
- imageData.setPixels(0, 1, values.length, values, 0);
- imageData.getPixels(0, 1, GET_WIDTH, pixelData, OFFSET);
- for (int i = 0; i < pixelData.length; i++) {
- if (i < OFFSET) {
- assertEquals(":b:", 0, pixelData[i]);
- } else if (i < OFFSET + values.length) {
- assertEquals(":c:", (byte) values[i-OFFSET], pixelData[i]);
- } else if (i < OFFSET+GET_WIDTH) {
- assertEquals(":d:", 0, pixelData[i]);
- }
- }
-
- // test 2 bit
- imageData = new ImageData(IMAGE_DIMENSION, IMAGE_DIMENSION, 2, new PaletteData(new RGB[]{new RGB(0, 0, 0), new RGB(255, 255, 255)}));
- imageData.getPixels(0, 1, GET_WIDTH, pixelData, OFFSET);
- for (int i = 0; i < pixelData.length; i ++) {
- assertEquals(":e:", 0, pixelData[i]);
- }
-
- values = new byte[]{0x1, 0x2, 0x3, 0x2, 0x1};
- imageData.setPixels(0, 1, values.length, values, 0);
- imageData.getPixels(0, 1, GET_WIDTH, pixelData, OFFSET);
- for (int i = 0; i < pixelData.length; i++) {
- if (i < OFFSET) {
- assertEquals(":f:", 0, pixelData[i]);
- } else if (i < OFFSET + values.length) {
- assertEquals(":g:", (byte) values[i-OFFSET], pixelData[i]);
- } else if (i < OFFSET+GET_WIDTH) {
- assertEquals(":h:", 0, pixelData[i]);
- }
- }
-
- // test 4 bit
- imageData = new ImageData(IMAGE_DIMENSION, IMAGE_DIMENSION, 4, new PaletteData(new RGB[]{new RGB(0, 0, 0), new RGB(255, 255, 255)}));
- imageData.getPixels(0, 1, GET_WIDTH, pixelData, OFFSET);
- for (int i = 0; i < pixelData.length; i ++) {
- assertEquals(":i:", 0, pixelData[i]);
- }
-
- values = new byte[]{0x1, 0x2, 0x3, 0x4, 0xF};
- imageData.setPixels(0, 1, values.length, values, 0);
- imageData.getPixels(0, 1, GET_WIDTH, pixelData, OFFSET);
- for (int i = 0; i < pixelData.length; i++) {
- if (i < OFFSET) {
- assertEquals(":j:", 0, pixelData[i]);
- } else if (i < OFFSET + values.length) {
- assertEquals(":k:", (byte) values[i-OFFSET], pixelData[i]);
- } else if (i < OFFSET+GET_WIDTH) {
- assertEquals(":l:", 0, pixelData[i]);
- }
- }
-
- // test 8 bit
- imageData = new ImageData(IMAGE_DIMENSION, IMAGE_DIMENSION, 8, new PaletteData(new RGB[]{new RGB(0, 0, 0), new RGB(255, 255, 255)}));
- imageData.getPixels(0, 1, GET_WIDTH, pixelData, OFFSET);
- for (int i = 0; i < pixelData.length; i ++) {
- assertEquals(":m:", 0, pixelData[i]);
- }
-
- values = new byte[]{0x1, 0x2, 0x3, 0xF, (byte)0xFF};
- imageData.setPixels(0, 1, values.length, values, 0);
- imageData.getPixels(0, 1, GET_WIDTH, pixelData, OFFSET);
- for (int i = 0; i < pixelData.length; i++) {
- if (i < OFFSET) {
- assertEquals(":n:", 0, pixelData[i]);
- } else if (i < OFFSET + values.length) {
- assertEquals(":o:", (byte) values[i-OFFSET], pixelData[i]);
- } else if (i < OFFSET+GET_WIDTH) {
- assertEquals(":p:", 0, pixelData[i]);
- }
- }
-
- // exception cases
- try {
- imageData.getPixels(0, 1, GET_WIDTH*GET_WIDTH, pixelData, OFFSET);
- fail("No exception thrown for getWidth out of bounds");
- } catch (IndexOutOfBoundsException e) {
- }
- try {
- imageData.getPixels(0, 1, GET_WIDTH, (byte[]) null, OFFSET);
- fail("No exception thrown for pixels == null");
- } catch (IllegalArgumentException e) {
- assertEquals("Incorrect exception thrown for pixels == null", SWT.ERROR_NULL_ARGUMENT, e);
- }
- try {
- imageData.getPixels(-1, 1, GET_WIDTH, pixelData, OFFSET);
- fail("No exception thrown for x out of bounds");
- } catch (IllegalArgumentException e) {
- assertEquals("Incorrect exception thrown for x out of bounds", SWT.ERROR_INVALID_ARGUMENT, e);
- }
- try {
- imageData.getPixels(IMAGE_DIMENSION, 1, GET_WIDTH, pixelData, OFFSET);
- fail("No exception thrown for x out of bounds");
- } catch (IllegalArgumentException e) {
- assertEquals("Incorrect exception thrown for x out of bounds", SWT.ERROR_INVALID_ARGUMENT, e);
- }
- try {
- imageData.getPixels(0, -1, GET_WIDTH, pixelData, OFFSET);
- fail("No exception thrown for y out of bounds");
- } catch (IllegalArgumentException e) {
- assertEquals("Incorrect exception thrown for y out of bounds", SWT.ERROR_INVALID_ARGUMENT, e);
- }
- try {
- imageData.getPixels(0, IMAGE_DIMENSION, GET_WIDTH, pixelData, OFFSET);
- fail("No exception thrown for y out of bounds");
- } catch (IllegalArgumentException e) {
- assertEquals("Incorrect exception thrown for y out of bounds", SWT.ERROR_INVALID_ARGUMENT, e);
- }
- try {
- imageData.getPixels(0, 1, -1, pixelData, OFFSET);
- fail("No exception thrown for getWidth < 0");
- } catch (IllegalArgumentException e) {
- assertEquals("Incorrect exception thrown for getWidth < 0", SWT.ERROR_INVALID_ARGUMENT, e);
- }
- imageData = new ImageData(IMAGE_DIMENSION, IMAGE_DIMENSION, 32, new PaletteData(0xFF0000, 0xFF00, 0xFF));
- try {
- imageData.getPixels(0, 1, GET_WIDTH, pixelData, OFFSET);
- fail("No exception thrown for invalid depth");
- } catch (SWTException e) {
- assertEquals("Incorrect exception thrown for invalid depth", SWT.ERROR_UNSUPPORTED_DEPTH, e);
- }
-}
-
-public void test_getPixelsIII$II() {
- int value;
- final int SIZE = 20;
- final int GET_WIDTH = 10;
- final int OFFSET = 10;
- int[] pixelData = new int[SIZE];
-
- // test 1 bit
- imageData = new ImageData(IMAGE_DIMENSION, IMAGE_DIMENSION, 1, new PaletteData(new RGB[]{new RGB(0, 0, 0), new RGB(255, 255, 255)}));
- imageData.getPixels(0, 1, GET_WIDTH, pixelData, OFFSET);
- for (int i = 0; i < pixelData.length; i ++) {
- assertEquals(":a:", 0, pixelData[i]);
- }
-
- int[] values = new int[]{0x1, 0x1, 0x1, 0x1, 0x1};
- imageData.setPixels(0, 1, values.length, values, 0);
- imageData.getPixels(0, 1, GET_WIDTH, pixelData, OFFSET);
- for (int i = 0; i < pixelData.length; i++) {
- if (i < OFFSET) {
- assertEquals(":b:", 0, pixelData[i]);
- } else if (i < OFFSET + values.length) {
- assertEquals(":c:", values[i-OFFSET], pixelData[i]);
- } else if (i < OFFSET+GET_WIDTH) {
- assertEquals(":d:", 0, pixelData[i]);
- }
- }
-
- // test 2 bit
- imageData = new ImageData(IMAGE_DIMENSION, IMAGE_DIMENSION, 2, new PaletteData(new RGB[]{new RGB(0, 0, 0), new RGB(255, 255, 255)}));
- imageData.getPixels(0, 1, GET_WIDTH, pixelData, OFFSET);
- for (int i = 0; i < pixelData.length; i ++) {
- assertEquals(":e:", 0, pixelData[i]);
- }
-
- values = new int[]{0x1, 0x2, 0x3, 0x2, 0x1};
- imageData.setPixels(0, 1, values.length, values, 0);
- imageData.getPixels(0, 1, GET_WIDTH, pixelData, OFFSET);
- for (int i = 0; i < pixelData.length; i++) {
- if (i < OFFSET) {
- assertEquals(":f:", 0, pixelData[i]);
- } else if (i < OFFSET + values.length) {
- assertEquals(":g:", values[i-OFFSET], pixelData[i]);
- } else if (i < OFFSET+GET_WIDTH) {
- assertEquals(":h:", 0, pixelData[i]);
- }
- }
-
- // test 4 bit
- imageData = new ImageData(IMAGE_DIMENSION, IMAGE_DIMENSION, 4, new PaletteData(new RGB[]{new RGB(0, 0, 0), new RGB(255, 255, 255)}));
- imageData.getPixels(0, 1, GET_WIDTH, pixelData, OFFSET);
- for (int i = 0; i < pixelData.length; i ++) {
- assertEquals(":i:", 0, pixelData[i]);
- }
-
- values = new int[]{0x1, 0x2, 0x3, 0x4, 0xF};
- imageData.setPixels(0, 1, values.length, values, 0);
- imageData.getPixels(0, 1, GET_WIDTH, pixelData, OFFSET);
- for (int i = 0; i < pixelData.length; i++) {
- if (i < OFFSET) {
- assertEquals(":j:", 0, pixelData[i]);
- } else if (i < OFFSET + values.length) {
- assertEquals(":k:", values[i-OFFSET], pixelData[i]);
- } else if (i < OFFSET+GET_WIDTH) {
- assertEquals(":l:", 0, pixelData[i]);
- }
- }
-
- // test 8 bit
- imageData = new ImageData(IMAGE_DIMENSION, IMAGE_DIMENSION, 8, new PaletteData(new RGB[]{new RGB(0, 0, 0), new RGB(255, 255, 255)}));
- imageData.getPixels(0, 1, GET_WIDTH, pixelData, OFFSET);
- for (int i = 0; i < pixelData.length; i ++) {
- assertEquals(":m:", 0, pixelData[i]);
- }
-
- values = new int[]{0x1, 0x2, 0x3, 0xF, 0xFF};
- imageData.setPixels(0, 1, values.length, values, 0);
- imageData.getPixels(0, 1, GET_WIDTH, pixelData, OFFSET);
- for (int i = 0; i < pixelData.length; i++) {
- if (i < OFFSET) {
- assertEquals(":n:", 0, pixelData[i]);
- } else if (i < OFFSET + values.length) {
- assertEquals(":o:", values[i-OFFSET], pixelData[i]);
- } else if (i < OFFSET+GET_WIDTH) {
- assertEquals(":p:", 0, pixelData[i]);
- }
- }
-
- // test 16 bit
- imageData = new ImageData(IMAGE_DIMENSION, IMAGE_DIMENSION, 16, new PaletteData(0xF800, 0x7E0, 0x1F));
- imageData.getPixels(0, 1, GET_WIDTH, pixelData, OFFSET);
- for (int i = 0; i < pixelData.length; i ++) {
- assertEquals(":q:", 0, pixelData[i]);
- }
-
- values = new int[]{0, 0x2, 0xF, 0xFF, 0xFFAA};
- imageData.setPixels(0, 1, values.length, values, 0);
- imageData.getPixels(0, 1, GET_WIDTH, pixelData, OFFSET);
- for (int i = 0; i < pixelData.length; i++) {
- if (i < OFFSET) {
- assertEquals(":r:", 0, pixelData[i]);
- } else if (i < OFFSET + values.length) {
- assertEquals(":s:", values[i-OFFSET], pixelData[i]);
- } else if (i < OFFSET+GET_WIDTH) {
- assertEquals(":t:", 0, pixelData[i]);
- }
- }
-
- // test 24 bit
- imageData = new ImageData(IMAGE_DIMENSION, IMAGE_DIMENSION, 24, new PaletteData(0xFF0000, 0xFF00, 0xFF));
- imageData.getPixels(0, 1, GET_WIDTH, pixelData, OFFSET);
- for (int i = 0; i < pixelData.length; i ++) {
- assertEquals(":u:", 0, pixelData[i]);
- }
-
- values = new int[]{0, 0xFF, 0xFFAA, 0xFF00AA};
- imageData.setPixels(0, 1, values.length, values, 0);
- imageData.getPixels(0, 1, GET_WIDTH, pixelData, OFFSET);
- for (int i = 0; i < pixelData.length; i++) {
- if (i < OFFSET) {
- assertEquals(":v:", 0, pixelData[i]);
- } else if (i < OFFSET + values.length) {
- assertEquals(":w:", values[i-OFFSET], pixelData[i]);
- } else if (i < OFFSET+GET_WIDTH) {
- assertEquals(":x:", 0, pixelData[i]);
- }
- }
-
- // test 32 bit
- imageData = new ImageData(IMAGE_DIMENSION, IMAGE_DIMENSION, 32, new PaletteData(0xFF000000, 0xFF00, 0xFF));
- imageData.getPixels(0, 1, GET_WIDTH, pixelData, OFFSET);
- for (int i = 0; i < pixelData.length; i ++) {
- assertEquals(":y:", 0, pixelData[i]);
- }
-
- values = new int[]{0, 0xFF, 0xFFAA, 0xFF00AA00};
- imageData.setPixels(0, 1, values.length, values, 0);
- imageData.getPixels(0, 1, GET_WIDTH, pixelData, OFFSET);
- for (int i = 0; i < pixelData.length; i++) {
- if (i < OFFSET) {
- assertEquals(":z:", 0, pixelData[i]);
- } else if (i < OFFSET + values.length) {
- assertEquals(":aa:", values[i-OFFSET], pixelData[i]);
- } else if (i < OFFSET+GET_WIDTH) {
- assertEquals(":ab:", 0, pixelData[i]);
- }
- }
-
- // exception cases
- try {
- imageData.getPixels(0, 1, GET_WIDTH*GET_WIDTH, pixelData, OFFSET);
- fail("No exception thrown for getWidth out of bounds");
- } catch (IndexOutOfBoundsException e) {
- }
- try {
- imageData.getPixels(0, 1, GET_WIDTH, (int[]) null, OFFSET);
- fail("No exception thrown for pixels == null");
- } catch (IllegalArgumentException e) {
- assertEquals("Incorrect exception thrown for pixels == null", SWT.ERROR_NULL_ARGUMENT, e);
- }
- try {
- imageData.getPixels(-1, 1, GET_WIDTH, pixelData, OFFSET);
- fail("No exception thrown for x out of bounds");
- } catch (IllegalArgumentException e) {
- assertEquals("Incorrect exception thrown for x out of bounds", SWT.ERROR_INVALID_ARGUMENT, e);
- }
- try {
- imageData.getPixels(IMAGE_DIMENSION, 1, GET_WIDTH, pixelData, OFFSET);
- fail("No exception thrown for x out of bounds");
- } catch (IllegalArgumentException e) {
- assertEquals("Incorrect exception thrown for x out of bounds", SWT.ERROR_INVALID_ARGUMENT, e);
- }
- try {
- imageData.getPixels(0, -1, GET_WIDTH, pixelData, OFFSET);
- fail("No exception thrown for y out of bounds");
- } catch (IllegalArgumentException e) {
- assertEquals("Incorrect exception thrown for y out of bounds", SWT.ERROR_INVALID_ARGUMENT, e);
- }
- try {
- imageData.getPixels(0, IMAGE_DIMENSION, GET_WIDTH, pixelData, OFFSET);
- fail("No exception thrown for y out of bounds");
- } catch (IllegalArgumentException e) {
- assertEquals("Incorrect exception thrown for y out of bounds", SWT.ERROR_INVALID_ARGUMENT, e);
- }
- try {
- imageData.getPixels(0, 1, -1, pixelData, OFFSET);
- fail("No exception thrown for getWidth < 0");
- } catch (IllegalArgumentException e) {
- assertEquals("Incorrect exception thrown for getWidth < 0", SWT.ERROR_INVALID_ARGUMENT, e);
- }
-}
-
-public void test_getRGBs() {
- assertNull(":a:", imageData.getRGBs());
- RGB[] rgbs = new RGB[]{new RGB(0, 0, 0), new RGB(255, 255, 255)};
- imageData = new ImageData(IMAGE_DIMENSION, IMAGE_DIMENSION, 8, new PaletteData(rgbs));
- assertEquals(":b:", rgbs, imageData.getRGBs());
-}
-
-public void test_getTransparencyMask() {
-// Bug 71472 - transparency mask should be null
-// assertNull(":a:", imageData.getTransparencyMask());
-
- Image image = new Image(Display.getDefault(), getClass().getResourceAsStream(transparentImageFilenames[0]));
- imageData = image.getImageData();
- ImageData maskData = imageData.getTransparencyMask();
- assertNotNull(":b:", maskData);
-
-// Bug 71472 - transparency mask should be null
-/* image = new Image(Display.getDefault(), getClass().getResourceAsStream(imageFilenames[0] + '.' + imageFormats[imageFormats.length-1]));
- imageData = image.getImageData();
- maskData = imageData.getTransparencyMask();
- assertNull(":c:", maskData);
-*/
-}
-
-public void test_getTransparencyType() {
- assertEquals(":a:", SWT.TRANSPARENCY_NONE, imageData.getTransparencyType());
-
- Image image = new Image(Display.getDefault(), getClass().getResourceAsStream(transparentImageFilenames[0]));
- imageData = image.getImageData();
- assertFalse(":b:", SWT.TRANSPARENCY_NONE == imageData.getTransparencyType());
-
- image = new Image(Display.getDefault(), getClass().getResourceAsStream(imageFilenames[0] + '.' + imageFormats[imageFormats.length-1]));
- imageData = image.getImageData();
- assertEquals(":c:", SWT.TRANSPARENCY_NONE, imageData.getTransparencyType());
-}
-
-public void test_internal_newIIILorg_eclipse_swt_graphics_PaletteDataI$BI$B$BIIIIIII() {
- // do not test internal API
- // javadoc states:
- // <b>IMPORTANT:</b> This method is <em>not</em> part of the public
- // API for <code>ImageData</code>. It is marked public only so that it
- // can be shared within the packages provided by SWT. It is subject
- // to change without notice, and should never be called from
- // application code.
-}
-
-public void test_scaledToII() {
- final int imageDimension = 8;
- RGB[] rgbs = new RGB[]{new RGB(0, 0, 0), new RGB(255, 255, 255)};
- byte[] pixelData = new byte[(imageDimension*imageDimension) / 8];
-
- pixelData[0] = 0x4F;
- imageData = new ImageData(imageDimension, imageDimension, 1, new PaletteData(rgbs), 1, pixelData);
-
- ImageData scaledImageData = imageData.scaledTo(-imageDimension, -imageDimension);
- byte[] scaledPixelData = new byte[imageDimension];
- scaledImageData.getPixels(0, imageDimension - 1, scaledPixelData.length, scaledPixelData, 0);
- byte[] expectedPixelData = new byte[] {0x1, 0x1, 0x1, 0x1, 0, 0, 0x1, 0};
- assertEquals(":a:", expectedPixelData, scaledPixelData);
-
- scaledImageData = imageData.scaledTo(imageDimension * 10, imageDimension);
- scaledPixelData = new byte[imageDimension * 10];
- scaledImageData.getPixels(0, 0, scaledPixelData.length, scaledPixelData, 0);
- assertEquals(":b:", 0, scaledPixelData[0]);
- assertEquals(":c:", 0, scaledPixelData[1]);
-
- scaledImageData = imageData.scaledTo(imageDimension, imageDimension * 10);
- scaledPixelData = new byte[imageDimension];
- scaledImageData.getPixels(0, 0, scaledPixelData.length, scaledPixelData, 0);
- expectedPixelData = new byte[] {0, 0x1, 0, 0, 0x1, 0x1, 0x1, 0x1};
- assertEquals(":d:", expectedPixelData, scaledPixelData);
-}
-
-public void test_setAlphaIII() {
- int value;
-
- value = 0xAA;
- imageData.setAlpha(0, 0, value);
- assertEquals(":a:", value, imageData.getAlpha(0, 0));
-
- // exception cases
- try {
- imageData.setAlpha(-1, 1, value);
- fail("No exception thrown for x out of bounds");
- } catch (IllegalArgumentException e) {
- assertEquals("Incorrect exception thrown for x out of bounds", SWT.ERROR_INVALID_ARGUMENT, e);
- }
- try {
- imageData.setAlpha(IMAGE_DIMENSION, 1, value);
- fail("No exception thrown for x out of bounds");
- } catch (IllegalArgumentException e) {
- assertEquals("Incorrect exception thrown for x out of bounds", SWT.ERROR_INVALID_ARGUMENT, e);
- }
- try {
- imageData.setAlpha(0, -1, value);
- fail("No exception thrown for y out of bounds");
- } catch (IllegalArgumentException e) {
- assertEquals("Incorrect exception thrown for y out of bounds", SWT.ERROR_INVALID_ARGUMENT, e);
- }
- try {
- imageData.setAlpha(0, IMAGE_DIMENSION, value);
- fail("No exception thrown for y out of bounds");
- } catch (IllegalArgumentException e) {
- assertEquals("Incorrect exception thrown for y out of bounds", SWT.ERROR_INVALID_ARGUMENT, e);
- }
-}
-
-public void test_setAlphasIII$BI() {
- byte value;
- final int SIZE = 20;
- final int OFFSET = 1;
- byte[] alphaData = new byte[SIZE];
-
- value = (byte) 0xAA;
- byte[] values = new byte[] {value, (byte) (value+1), (byte) (value+2), (byte) (value+3), (byte) (value+4)};
- imageData.setAlphas(0, 1, values.length - OFFSET, values, OFFSET);
- imageData.getAlphas(0, 1, IMAGE_DIMENSION, alphaData, 0);
- for (int i = 0; i < alphaData.length; i++) {
- if (i + OFFSET < values.length) {
- assertEquals(":a:", (byte) values[i + OFFSET], alphaData[i]);
- } else {
- assertEquals(":b:", 0, alphaData[i]);
- }
- }
-
- // exception cases
- try {
- imageData.setAlphas(0, 1, IMAGE_DIMENSION*IMAGE_DIMENSION, alphaData, OFFSET);
- fail("No exception thrown for putWidth out of bounds");
- } catch (IndexOutOfBoundsException e) {
- }
- try {
- imageData.setAlphas(0, 1, IMAGE_DIMENSION, (byte[]) null, OFFSET);
- fail("No exception thrown for alphas == null");
- } catch (IllegalArgumentException e) {
- assertEquals("Incorrect exception thrown for alphas == null", SWT.ERROR_NULL_ARGUMENT, e);
- }
- try {
- imageData.setAlphas(-1, 1, IMAGE_DIMENSION, alphaData, OFFSET);
- fail("No exception thrown for x out of bounds");
- } catch (IllegalArgumentException e) {
- assertEquals("Incorrect exception thrown for x out of bounds", SWT.ERROR_INVALID_ARGUMENT, e);
- }
- try {
- imageData.setAlphas(IMAGE_DIMENSION, 1, IMAGE_DIMENSION, alphaData, OFFSET);
- fail("No exception thrown for x out of bounds");
- } catch (IllegalArgumentException e) {
- assertEquals("Incorrect exception thrown for x out of bounds", SWT.ERROR_INVALID_ARGUMENT, e);
- }
- try {
- imageData.setAlphas(0, -1, IMAGE_DIMENSION, alphaData, OFFSET);
- fail("No exception thrown for y out of bounds");
- } catch (IllegalArgumentException e) {
- assertEquals("Incorrect exception thrown for y out of bounds", SWT.ERROR_INVALID_ARGUMENT, e);
- }
- try {
- imageData.setAlphas(0, IMAGE_DIMENSION, IMAGE_DIMENSION, alphaData, OFFSET);
- fail("No exception thrown for y out of bounds");
- } catch (IllegalArgumentException e) {
- assertEquals("Incorrect exception thrown for y out of bounds", SWT.ERROR_INVALID_ARGUMENT, e);
- }
- try {
- imageData.setAlphas(0, 1, -1, alphaData, OFFSET);
- fail("No exception thrown for putWidth < 0");
- } catch (IllegalArgumentException e) {
- assertEquals("Incorrect exception thrown for putWidth < 0", SWT.ERROR_INVALID_ARGUMENT, e);
- }
-}
-
-public void test_setPixelIII() {
- int value;
-
- value = 0xAA;
- imageData.setPixel(0, 0, value);
- assertEquals(":a:", value, imageData.getPixel(0, 0));
-
- // exception cases
- try {
- imageData.setPixel(-1, 1, value);
- fail("No exception thrown for x out of bounds");
- } catch (IllegalArgumentException e) {
- assertEquals("Incorrect exception thrown for x out of bounds", SWT.ERROR_INVALID_ARGUMENT, e);
- }
- try {
- imageData.setPixel(IMAGE_DIMENSION, 1, value);
- fail("No exception thrown for x out of bounds");
- } catch (IllegalArgumentException e) {
- assertEquals("Incorrect exception thrown for x out of bounds", SWT.ERROR_INVALID_ARGUMENT, e);
- }
- try {
- imageData.setPixel(0, -1, value);
- fail("No exception thrown for y out of bounds");
- } catch (IllegalArgumentException e) {
- assertEquals("Incorrect exception thrown for y out of bounds", SWT.ERROR_INVALID_ARGUMENT, e);
- }
- try {
- imageData.setPixel(0, IMAGE_DIMENSION, value);
- fail("No exception thrown for y out of bounds");
- } catch (IllegalArgumentException e) {
- assertEquals("Incorrect exception thrown for y out of bounds", SWT.ERROR_INVALID_ARGUMENT, e);
- }
-}
-
-public void test_setPixelsIII$BI() {
- byte value;
- final int SIZE = 20;
- final int OFFSET = 1;
- byte[] pixelData = new byte[SIZE];
-
- // test 1 bit
- imageData = new ImageData(IMAGE_DIMENSION, IMAGE_DIMENSION, 1, new PaletteData(new RGB[]{new RGB(0, 0, 0), new RGB(255, 255, 255)}));
- byte[] values = new byte[]{0x1, 0x1, 0x1, 0x1, 0x1};
- imageData.setPixels(0, 1, values.length - OFFSET, values, OFFSET);
- imageData.getPixels(0, 1, IMAGE_DIMENSION, pixelData, 0);
- for (int i = 0; i < pixelData.length; i++) {
- if (i + OFFSET < values.length) {
- assertEquals(":a:", (byte) values[i + OFFSET], pixelData[i]);
- } else {
- assertEquals(":b:", 0, pixelData[i]);
- }
- }
-
- // test 2 bit
- imageData = new ImageData(IMAGE_DIMENSION, IMAGE_DIMENSION, 2, new PaletteData(new RGB[]{new RGB(0, 0, 0), new RGB(255, 255, 255)}));
- values = new byte[]{0x1, 0x2, 0x3, 0x2, 0x1};
- imageData.setPixels(0, 1, values.length - OFFSET, values, OFFSET);
- imageData.getPixels(0, 1, IMAGE_DIMENSION, pixelData, 0);
- for (int i = 0; i < pixelData.length; i++) {
- if (i + OFFSET < values.length) {
- assertEquals(":c:", (byte) values[i + OFFSET], pixelData[i]);
- } else {
- assertEquals(":d:", 0, pixelData[i]);
- }
- }
-
- // test 4 bit
- imageData = new ImageData(IMAGE_DIMENSION, IMAGE_DIMENSION, 4, new PaletteData(new RGB[]{new RGB(0, 0, 0), new RGB(255, 255, 255)}));
- values = new byte[]{0x1, 0x2, 0x3, 0x4, 0xF};
- imageData.setPixels(0, 1, values.length - OFFSET, values, OFFSET);
- imageData.getPixels(0, 1, IMAGE_DIMENSION, pixelData, 0);
- for (int i = 0; i < pixelData.length; i++) {
- if (i + OFFSET < values.length) {
- assertEquals(":e:", (byte) values[i + OFFSET], pixelData[i]);
- } else {
- assertEquals(":f:", 0, pixelData[i]);
- }
- }
-
- // test 8 bit
- imageData = new ImageData(IMAGE_DIMENSION, IMAGE_DIMENSION, 8, new PaletteData(new RGB[]{new RGB(0, 0, 0), new RGB(255, 255, 255)}));
- values = new byte[]{0x1, 0x2, 0x3, 0xF, (byte)0xFF};
- imageData.setPixels(0, 1, values.length - OFFSET, values, OFFSET);
- imageData.getPixels(0, 1, IMAGE_DIMENSION, pixelData, 0);
- for (int i = 0; i < pixelData.length; i++) {
- if (i + OFFSET < values.length) {
- assertEquals(":g:", (byte) values[i + OFFSET], pixelData[i]);
- } else {
- assertEquals(":h:", 0, pixelData[i]);
- }
- }
-
- // exception cases
- try {
- imageData.setPixels(0, 1, IMAGE_DIMENSION*IMAGE_DIMENSION, pixelData, OFFSET);
- fail("No exception thrown for putWidth out of bounds");
- } catch (IndexOutOfBoundsException e) {
- }
- try {
- imageData.setPixels(0, 1, IMAGE_DIMENSION, (byte[]) null, OFFSET);
- fail("No exception thrown for pixels == null");
- } catch (IllegalArgumentException e) {
- assertEquals("Incorrect exception thrown for pixels == null", SWT.ERROR_NULL_ARGUMENT, e);
- }
- try {
- imageData.setPixels(-1, 1, IMAGE_DIMENSION, pixelData, OFFSET);
- fail("No exception thrown for x out of bounds");
- } catch (IllegalArgumentException e) {
- assertEquals("Incorrect exception thrown for x out of bounds", SWT.ERROR_INVALID_ARGUMENT, e);
- }
- try {
- imageData.setPixels(IMAGE_DIMENSION, 1, IMAGE_DIMENSION, pixelData, OFFSET);
- fail("No exception thrown for x out of bounds");
- } catch (IllegalArgumentException e) {
- assertEquals("Incorrect exception thrown for x out of bounds", SWT.ERROR_INVALID_ARGUMENT, e);
- }
- try {
- imageData.setPixels(0, -1, IMAGE_DIMENSION, pixelData, OFFSET);
- fail("No exception thrown for y out of bounds");
- } catch (IllegalArgumentException e) {
- assertEquals("Incorrect exception thrown for y out of bounds", SWT.ERROR_INVALID_ARGUMENT, e);
- }
- try {
- imageData.setPixels(0, IMAGE_DIMENSION, IMAGE_DIMENSION, pixelData, OFFSET);
- fail("No exception thrown for y out of bounds");
- } catch (IllegalArgumentException e) {
- assertEquals("Incorrect exception thrown for y out of bounds", SWT.ERROR_INVALID_ARGUMENT, e);
- }
- try {
- imageData.setPixels(0, 1, -1, pixelData, OFFSET);
- fail("No exception thrown for putWidth < 0");
- } catch (IllegalArgumentException e) {
- assertEquals("Incorrect exception thrown for putWidth < 0", SWT.ERROR_INVALID_ARGUMENT, e);
- }
- imageData = new ImageData(IMAGE_DIMENSION, IMAGE_DIMENSION, 32, new PaletteData(0xFF0000, 0xFF00, 0xFF));
- try {
- imageData.setPixels(0, 1, IMAGE_DIMENSION, pixelData, OFFSET);
- fail("No exception thrown for invalid depth");
- } catch (SWTException e) {
- assertEquals("Incorrect exception thrown for invalid depth", SWT.ERROR_UNSUPPORTED_DEPTH, e);
- }
-}
-
-public void test_setPixelsIII$II() {
- int value;
- final int SIZE = 20;
- final int OFFSET = 1;
- int[] pixelData = new int[SIZE];
-
- // test 1 bit
- imageData = new ImageData(IMAGE_DIMENSION, IMAGE_DIMENSION, 1, new PaletteData(new RGB[]{new RGB(0, 0, 0), new RGB(255, 255, 255)}));
- int[] values = new int[]{0x1, 0x1, 0x1, 0x1, 0x1};
- imageData.setPixels(0, 1, values.length - OFFSET, values, OFFSET);
- imageData.getPixels(0, 1, IMAGE_DIMENSION, pixelData, 0);
- for (int i = 0; i < pixelData.length; i++) {
- if (i + OFFSET < values.length) {
- assertEquals(":a:", values[i + OFFSET], pixelData[i]);
- } else {
- assertEquals(":b:", 0, pixelData[i]);
- }
- }
-
- // test 2 bit
- imageData = new ImageData(IMAGE_DIMENSION, IMAGE_DIMENSION, 2, new PaletteData(new RGB[]{new RGB(0, 0, 0), new RGB(255, 255, 255)}));
- values = new int[]{0x1, 0x2, 0x3, 0x2, 0x1};
- imageData.setPixels(0, 1, values.length - OFFSET, values, OFFSET);
- imageData.getPixels(0, 1, IMAGE_DIMENSION, pixelData, 0);
- for (int i = 0; i < pixelData.length; i++) {
- if (i + OFFSET < values.length) {
- assertEquals(":c:", values[i + OFFSET], pixelData[i]);
- } else {
- assertEquals(":d:", 0, pixelData[i]);
- }
- }
-
- // test 4 bit
- imageData = new ImageData(IMAGE_DIMENSION, IMAGE_DIMENSION, 4, new PaletteData(new RGB[]{new RGB(0, 0, 0), new RGB(255, 255, 255)}));
- values = new int[]{0x1, 0x2, 0x3, 0x4, 0xF};
- imageData.setPixels(0, 1, values.length - OFFSET, values, OFFSET);
- imageData.getPixels(0, 1, IMAGE_DIMENSION, pixelData, 0);
- for (int i = 0; i < pixelData.length; i++) {
- if (i + OFFSET < values.length) {
- assertEquals(":e:", values[i + OFFSET], pixelData[i]);
- } else {
- assertEquals(":f:", 0, pixelData[i]);
- }
- }
-
- // test 8 bit
- imageData = new ImageData(IMAGE_DIMENSION, IMAGE_DIMENSION, 8, new PaletteData(new RGB[]{new RGB(0, 0, 0), new RGB(255, 255, 255)}));
- values = new int[]{0x1, 0x2, 0x3, 0xF, 0xFF};
- imageData.setPixels(0, 1, values.length - OFFSET, values, OFFSET);
- imageData.getPixels(0, 1, IMAGE_DIMENSION, pixelData, 0);
- for (int i = 0; i < pixelData.length; i++) {
- if (i + OFFSET < values.length) {
- assertEquals(":g:", values[i + OFFSET], pixelData[i]);
- } else {
- assertEquals(":h:", 0, pixelData[i]);
- }
- }
-
- // test 16 bit
- imageData = new ImageData(IMAGE_DIMENSION, IMAGE_DIMENSION, 16, new PaletteData(0xF800, 0x7E0, 0x1F));
- values = new int[]{0, 0x2, 0xF, 0xFF, 0xFFAA};
- imageData.setPixels(0, 1, values.length - OFFSET, values, OFFSET);
- imageData.getPixels(0, 1, IMAGE_DIMENSION, pixelData, 0);
- for (int i = 0; i < pixelData.length; i++) {
- if (i + OFFSET < values.length) {
- assertEquals(":i:", values[i + OFFSET], pixelData[i]);
- } else {
- assertEquals(":j:", 0, pixelData[i]);
- }
- }
-
- // test 24 bit
- imageData = new ImageData(IMAGE_DIMENSION, IMAGE_DIMENSION, 24, new PaletteData(0xFF0000, 0xFF00, 0xFF));
- values = new int[]{0, 0xFF, 0xFFAA, 0xFF00AA};
- imageData.setPixels(0, 1, values.length - OFFSET, values, OFFSET);
- imageData.getPixels(0, 1, IMAGE_DIMENSION, pixelData, 0);
- for (int i = 0; i < pixelData.length; i++) {
- if (i + OFFSET < values.length) {
- assertEquals(":k:", values[i + OFFSET], pixelData[i]);
- } else {
- assertEquals(":l:", 0, pixelData[i]);
- }
- }
-
- // test 32 bit
- imageData = new ImageData(IMAGE_DIMENSION, IMAGE_DIMENSION, 32, new PaletteData(0xFF000000, 0xFF00, 0xFF));
- values = new int[]{0, 0xFF, 0xFFAA, 0xFF00AA00};
- imageData.setPixels(0, 1, values.length - OFFSET, values, OFFSET);
- imageData.getPixels(0, 1, IMAGE_DIMENSION, pixelData, 0);
- for (int i = 0; i < pixelData.length; i++) {
- if (i + OFFSET < values.length) {
- assertEquals(":m:", values[i + OFFSET], pixelData[i]);
- } else {
- assertEquals(":n:", 0, pixelData[i]);
- }
- }
-
- // exception cases
- try {
- imageData.setPixels(0, 1, IMAGE_DIMENSION*IMAGE_DIMENSION, pixelData, OFFSET);
- fail("No exception thrown for putWidth out of bounds");
- } catch (IndexOutOfBoundsException e) {
- }
- try {
- imageData.setPixels(0, 1, IMAGE_DIMENSION, (int[]) null, OFFSET);
- fail("No exception thrown for pixels == null");
- } catch (IllegalArgumentException e) {
- assertEquals("Incorrect exception thrown for pixels == null", SWT.ERROR_NULL_ARGUMENT, e);
- }
- try {
- imageData.setPixels(-1, 1, IMAGE_DIMENSION, pixelData, OFFSET);
- fail("No exception thrown for x out of bounds");
- } catch (IllegalArgumentException e) {
- assertEquals("Incorrect exception thrown for x out of bounds", SWT.ERROR_INVALID_ARGUMENT, e);
- }
- try {
- imageData.setPixels(IMAGE_DIMENSION, 1, IMAGE_DIMENSION, pixelData, OFFSET);
- fail("No exception thrown for x out of bounds");
- } catch (IllegalArgumentException e) {
- assertEquals("Incorrect exception thrown for x out of bounds", SWT.ERROR_INVALID_ARGUMENT, e);
- }
- try {
- imageData.setPixels(0, -1, IMAGE_DIMENSION, pixelData, OFFSET);
- fail("No exception thrown for y out of bounds");
- } catch (IllegalArgumentException e) {
- assertEquals("Incorrect exception thrown for y out of bounds", SWT.ERROR_INVALID_ARGUMENT, e);
- }
- try {
- imageData.setPixels(0, IMAGE_DIMENSION, IMAGE_DIMENSION, pixelData, OFFSET);
- fail("No exception thrown for y out of bounds");
- } catch (IllegalArgumentException e) {
- assertEquals("Incorrect exception thrown for y out of bounds", SWT.ERROR_INVALID_ARGUMENT, e);
- }
- try {
- imageData.setPixels(0, 1, -1, pixelData, OFFSET);
- fail("No exception thrown for putWidth < 0");
- } catch (IllegalArgumentException e) {
- assertEquals("Incorrect exception thrown for putWidth < 0", SWT.ERROR_INVALID_ARGUMENT, e);
- }
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_graphics_ImageData((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorIIILorg_eclipse_swt_graphics_PaletteData");
- methodNames.addElement("test_ConstructorIIILorg_eclipse_swt_graphics_PaletteDataI$B");
- methodNames.addElement("test_ConstructorLjava_io_InputStream");
- methodNames.addElement("test_ConstructorLjava_lang_String");
- methodNames.addElement("test_clone");
- methodNames.addElement("test_getAlphaII");
- methodNames.addElement("test_getAlphasIII$BI");
- methodNames.addElement("test_getPixelII");
- methodNames.addElement("test_getPixelsIII$BI");
- methodNames.addElement("test_getPixelsIII$II");
- methodNames.addElement("test_getRGBs");
- methodNames.addElement("test_getTransparencyMask");
- methodNames.addElement("test_getTransparencyType");
- methodNames.addElement("test_internal_newIIILorg_eclipse_swt_graphics_PaletteDataI$BI$B$BIIIIIII");
- methodNames.addElement("test_scaledToII");
- methodNames.addElement("test_setAlphaIII");
- methodNames.addElement("test_setAlphasIII$BI");
- methodNames.addElement("test_setPixelIII");
- methodNames.addElement("test_setPixelsIII$BI");
- methodNames.addElement("test_setPixelsIII$II");
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorIIILorg_eclipse_swt_graphics_PaletteData")) test_ConstructorIIILorg_eclipse_swt_graphics_PaletteData();
- else if (getName().equals("test_ConstructorIIILorg_eclipse_swt_graphics_PaletteDataI$B")) test_ConstructorIIILorg_eclipse_swt_graphics_PaletteDataI$B();
- else if (getName().equals("test_ConstructorLjava_io_InputStream")) test_ConstructorLjava_io_InputStream();
- else if (getName().equals("test_ConstructorLjava_lang_String")) test_ConstructorLjava_lang_String();
- else if (getName().equals("test_clone")) test_clone();
- else if (getName().equals("test_getAlphaII")) test_getAlphaII();
- else if (getName().equals("test_getAlphasIII$BI")) test_getAlphasIII$BI();
- else if (getName().equals("test_getPixelII")) test_getPixelII();
- else if (getName().equals("test_getPixelsIII$BI")) test_getPixelsIII$BI();
- else if (getName().equals("test_getPixelsIII$II")) test_getPixelsIII$II();
- else if (getName().equals("test_getRGBs")) test_getRGBs();
- else if (getName().equals("test_getTransparencyMask")) test_getTransparencyMask();
- else if (getName().equals("test_getTransparencyType")) test_getTransparencyType();
- else if (getName().equals("test_internal_newIIILorg_eclipse_swt_graphics_PaletteDataI$BI$B$BIIIIIII")) test_internal_newIIILorg_eclipse_swt_graphics_PaletteDataI$BI$B$BIIIIIII();
- else if (getName().equals("test_scaledToII")) test_scaledToII();
- else if (getName().equals("test_setAlphaIII")) test_setAlphaIII();
- else if (getName().equals("test_setAlphasIII$BI")) test_setAlphasIII$BI();
- else if (getName().equals("test_setPixelIII")) test_setPixelIII();
- else if (getName().equals("test_setPixelsIII$BI")) test_setPixelsIII$BI();
- else if (getName().equals("test_setPixelsIII$II")) test_setPixelsIII$II();
-}
-/* custom */
-ImageData imageData;
-final int IMAGE_DIMENSION = 10;
-
-void assertEquals(String message, byte expected[], byte actual[]) {
- if (expected == null && actual == null)
- return;
- boolean equal = false;
- if (expected != null && actual != null && expected.length == actual.length) {
- if (expected.length == 0)
- return;
- equal = true;
- for (int i = 0; i < expected.length; i++) {
- if (expected[i] != actual[i]) {
- equal = false;
- }
- }
- }
- if (!equal) {
- String formatted= "";
- if (message != null)
- formatted= message+" ";
- fail(formatted+"expected:<"+expected+"> but was:<"+actual+">");
- }
-}
-
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_ImageLoader.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_ImageLoader.java
deleted file mode 100644
index 705ffa9008..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_ImageLoader.java
+++ /dev/null
@@ -1,245 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import java.io.*;
-
-import junit.framework.*;
-import junit.textui.*;
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.graphics.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.graphics.ImageLoader
- *
- * @see org.eclipse.swt.graphics.ImageLoader
- */
-public class Test_org_eclipse_swt_graphics_ImageLoader extends SwtTestCase {
-
-public Test_org_eclipse_swt_graphics_ImageLoader(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
-}
-
-protected void tearDown() {
-}
-
-public void test_Constructor() {
- ImageLoader loader = new ImageLoader();
-}
-
-public void test_addImageLoaderListenerLorg_eclipse_swt_graphics_ImageLoaderListener() {
- ImageLoader loader = new ImageLoader();
- ImageLoaderListener loaderListener = new ImageLoaderListener() {
- public void imageDataLoaded(ImageLoaderEvent e) {
- loaderListenerCalled = true;
- };
- };
-
- try {
- loader.addImageLoaderListener(null);
- fail("No exception thrown for addImageLoaderListener with null argument");
- } catch (IllegalArgumentException e) {
- }
-
- assertFalse(":a:", loader.hasListeners());
- loader.addImageLoaderListener(loaderListener);
- assertTrue(":b:", loader.hasListeners());
-
- loaderListenerCalled = false;
- InputStream stream = SwtTestCase.class.getResourceAsStream("interlaced_target.png");
- loader.load(stream);
- try {
- stream.close();
- } catch (IOException e) {}
- assertTrue(":c:", loaderListenerCalled);
-
- loaderListenerCalled = false;
- stream = SwtTestCase.class.getResourceAsStream("target.png");
- loader.load(stream);
- try {
- stream.close();
- } catch (IOException e) {}
- assertFalse(":d:", loaderListenerCalled);
-
- loaderListenerCalled = false;
- loader.notifyListeners(new ImageLoaderEvent(loader, loader.data[0], 0, true));
- assertTrue(":e:", loaderListenerCalled);
-
- loader.removeImageLoaderListener(loaderListener);
- assertFalse(":f:", loader.hasListeners());
-}
-
-public void test_hasListeners() {
- // tested in addImageLoaderListener method
-}
-
-public void test_loadLjava_io_InputStream() {
- ImageLoader loader = new ImageLoader();
- InputStream stream = null;
- try {
- try {
- loader.load(stream);
- fail("No exception thrown for load inputStream == null");
- } catch (IllegalArgumentException e) {
- }
-
- stream = SwtTestCase.class.getResourceAsStream("empty.txt");
- try {
- loader.load(stream);
- try {
- stream.close();
- } catch (IOException e) {}
- fail("No exception thrown for load from invalid inputStream");
- } catch (SWTException e) {
- }
-
- int numFormats = SwtTestCase.imageFormats.length;
- String fileName = SwtTestCase.imageFilenames[0];
- for (int i=0; i<numFormats; i++) {
- String format = SwtTestCase.imageFormats[i];
- stream = SwtTestCase.class.getResourceAsStream(fileName + "." + format);
- loader.load(stream);
- try {
- stream.close();
- } catch (IOException e) {}
- }
- } finally {
- try {
- stream.close();
- } catch (Exception e) {
- }
- }
-}
-
-public void test_loadLjava_lang_String() {
- ImageLoader loader = new ImageLoader();
- String filename = null;
- try {
- loader.load(filename);
- fail("No exception thrown for load filename == null");
- } catch (IllegalArgumentException e) {
- }
- // j2se and j2me(cdc) can load from a filename but, j2me(cldc) throws an exception
-}
-
-public void test_notifyListenersLorg_eclipse_swt_graphics_ImageLoaderEvent() {
- // tested in addImageLoaderListener method
-}
-
-public void test_removeImageLoaderListenerLorg_eclipse_swt_graphics_ImageLoaderListener() {
- // tested in addImageLoaderListener method
-}
-
-public void test_saveLjava_io_OutputStreamI() {
- ImageLoader loader = new ImageLoader();
- ByteArrayOutputStream outStream = null;
- InputStream inStream = null;
- try {
- try {
- loader.save(outStream, 0);
- fail("No exception thrown for save outputStream == null");
- } catch (IllegalArgumentException e) {
- }
-
- outStream = new ByteArrayOutputStream();
- try {
- loader.save(outStream, -1);
- fail("No exception thrown for save to invalid outputStream format");
- } catch (IllegalArgumentException e) {
- }
- boolean jpgSupported = false;
- for (int i=0; i<imageFormats.length; i++) {
- if (imageFormats[i].equals("jpg")) {
- jpgSupported = true;
- break;
- }
- }
- if (jpgSupported) {
- String filename = SwtTestCase.imageFilenames[0];
- // must use jpg since save is not implemented yet in png format
- String filetype = "jpg";
- inStream = SwtTestCase.class.getResourceAsStream(filename + "." + filetype);
- loader.load(inStream);
- try {
- inStream.close();
- } catch (IOException e) {}
- for (int i = 0; i < imageFormats.length; i++) {
- if (imageFormats[i].equals(filetype)) {
- // save using the appropriate format
- loader.save(outStream, i);
- break;
- }
- }
- }
- } finally {
- try {
- outStream.close();
- } catch (Exception e) {
- }
- }
-}
-
-public void test_saveLjava_lang_StringI() {
- ImageLoader loader = new ImageLoader();
- String filename = null;
- try {
- loader.save(filename, 0);
- fail("No exception thrown for save filename == null");
- } catch (IllegalArgumentException e) {
- }
- // j2se and j2me(cdc) can load from a filename but, j2me(cldc) throws an exception
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_graphics_ImageLoader((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_Constructor");
- methodNames.addElement("test_addImageLoaderListenerLorg_eclipse_swt_graphics_ImageLoaderListener");
- methodNames.addElement("test_hasListeners");
- methodNames.addElement("test_loadLjava_io_InputStream");
- methodNames.addElement("test_loadLjava_lang_String");
- methodNames.addElement("test_notifyListenersLorg_eclipse_swt_graphics_ImageLoaderEvent");
- methodNames.addElement("test_removeImageLoaderListenerLorg_eclipse_swt_graphics_ImageLoaderListener");
- methodNames.addElement("test_saveLjava_io_OutputStreamI");
- methodNames.addElement("test_saveLjava_lang_StringI");
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_Constructor")) test_Constructor();
- else if (getName().equals("test_addImageLoaderListenerLorg_eclipse_swt_graphics_ImageLoaderListener")) test_addImageLoaderListenerLorg_eclipse_swt_graphics_ImageLoaderListener();
- else if (getName().equals("test_hasListeners")) test_hasListeners();
- else if (getName().equals("test_loadLjava_io_InputStream")) test_loadLjava_io_InputStream();
- else if (getName().equals("test_loadLjava_lang_String")) test_loadLjava_lang_String();
- else if (getName().equals("test_notifyListenersLorg_eclipse_swt_graphics_ImageLoaderEvent")) test_notifyListenersLorg_eclipse_swt_graphics_ImageLoaderEvent();
- else if (getName().equals("test_removeImageLoaderListenerLorg_eclipse_swt_graphics_ImageLoaderListener")) test_removeImageLoaderListenerLorg_eclipse_swt_graphics_ImageLoaderListener();
- else if (getName().equals("test_saveLjava_io_OutputStreamI")) test_saveLjava_io_OutputStreamI();
- else if (getName().equals("test_saveLjava_lang_StringI")) test_saveLjava_lang_StringI();
-}
-/* custom */
-boolean loaderListenerCalled;
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_ImageLoaderEvent.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_ImageLoaderEvent.java
deleted file mode 100644
index cf8f43f28f..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_ImageLoaderEvent.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import junit.framework.*;
-import junit.textui.*;
-
-import org.eclipse.swt.graphics.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.graphics.ImageLoaderEvent
- *
- * @see org.eclipse.swt.graphics.ImageLoaderEvent
- */
-public class Test_org_eclipse_swt_graphics_ImageLoaderEvent extends SwtTestCase {
-
-public Test_org_eclipse_swt_graphics_ImageLoaderEvent(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
-}
-
-protected void tearDown() {
-}
-
-public void test_ConstructorLorg_eclipse_swt_graphics_ImageLoaderLorg_eclipse_swt_graphics_ImageDataIZ() {
- try {
- new ImageLoaderEvent(null, null, 0, true);
- fail("No exception thrown for ImageLoader source == null");
- } catch (IllegalArgumentException e) {
- }
-
- new ImageLoaderEvent(new ImageLoader(), null, 0, true);
-}
-
-public void test_toString() {
- ImageLoaderEvent event = new ImageLoaderEvent(new ImageLoader(), null, 0, true);
- assertNotNull(event.toString());
- assertTrue(event.toString().length() > 0);
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_graphics_ImageLoaderEvent((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_graphics_ImageLoaderLorg_eclipse_swt_graphics_ImageDataIZ");
- methodNames.addElement("test_toString");
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLorg_eclipse_swt_graphics_ImageLoaderLorg_eclipse_swt_graphics_ImageDataIZ")) test_ConstructorLorg_eclipse_swt_graphics_ImageLoaderLorg_eclipse_swt_graphics_ImageDataIZ();
- else if (getName().equals("test_toString")) test_toString();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_ImageLoaderListener.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_ImageLoaderListener.java
deleted file mode 100644
index 4eea178055..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_ImageLoaderListener.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.graphics.ImageLoaderListener
- *
- * @see org.eclipse.swt.graphics.ImageLoaderListener
- */
-public class Test_org_eclipse_swt_graphics_ImageLoaderListener extends SwtTestCase {
-
-public Test_org_eclipse_swt_graphics_ImageLoaderListener(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
-}
-
-protected void tearDown() {
-}
-
-public void test_imageDataLoadedLorg_eclipse_swt_graphics_ImageLoaderEvent() {
- warnUnimpl("Test test_imageDataLoadedLorg_eclipse_swt_graphics_ImageLoaderEvent not written");
-}
-
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_graphics_ImageLoaderListener((String)e.nextElement()));
- }
- return suite;
-}
-
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_imageDataLoadedLorg_eclipse_swt_graphics_ImageLoaderEvent");
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_imageDataLoadedLorg_eclipse_swt_graphics_ImageLoaderEvent")) test_imageDataLoadedLorg_eclipse_swt_graphics_ImageLoaderEvent();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_PaletteData.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_PaletteData.java
deleted file mode 100644
index 35c6dc3fb7..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_PaletteData.java
+++ /dev/null
@@ -1,163 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import org.eclipse.swt.graphics.*;
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.graphics.PaletteData
- *
- * @see org.eclipse.swt.graphics.PaletteData
- */
-public class Test_org_eclipse_swt_graphics_PaletteData extends SwtTestCase {
-
-public Test_org_eclipse_swt_graphics_PaletteData(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
-}
-
-protected void tearDown() {
-}
-
-public void test_Constructor$Lorg_eclipse_swt_graphics_RGB() {
- try {
- new PaletteData(null);
- fail("No exception thrown for rgb == null");
- }
- catch (IllegalArgumentException e) {
- }
-
- PaletteData data = new PaletteData(new RGB[] {});
- assertFalse(":a:", data.isDirect);
-
- new PaletteData(new RGB[] {null, null});
- assertFalse(":b:", data.isDirect);
-
- new PaletteData(new RGB[] {new RGB(0, 0, 0), new RGB(255, 255, 255)});
- assertFalse(":c:", data.isDirect);
-}
-
-public void test_ConstructorIII() {
- PaletteData data = new PaletteData(0, 0, 0);
- assertTrue(":a:", data.isDirect);
-
- data = new PaletteData(-1, -1, -1);
- assertTrue(":b:", data.isDirect);
-
- data = new PaletteData(0xff0000, 0x00ff00, 0x0000ff);
- assertTrue(":c:", data.isDirect);
-}
-
-public void test_getPixelLorg_eclipse_swt_graphics_RGB() {
- // indexed palette tests
- RGB[] rgbs = {new RGB(0, 0, 0), new RGB(255, 255, 255), new RGB(50, 100, 150)};
- PaletteData data = new PaletteData(rgbs);
-
- try {
- data.getPixel(null);
- fail("No exception thrown for indexed palette with rgb == null");
- }
- catch (IllegalArgumentException e) {
- }
-
- try {
- data.getPixel(new RGB(0, 0, 1));
- fail("No exception thrown for rgb not found");
- }
- catch (IllegalArgumentException e) {
- }
-
- assertEquals(":a:", rgbs.length-1, data.getPixel(rgbs[rgbs.length-1]));
-
- // direct palette tests
- RGB rgb =new RGB(0x32, 0x64, 0x96);
- data = new PaletteData(0xff0000, 0x00ff00, 0x0000ff);
-
- try {
- data.getPixel(null);
- fail("No exception thrown for direct palette with rgb == null");
- }
- catch (IllegalArgumentException e) {
- }
-
- assertEquals(":b:", 0x326496, data.getPixel(rgb));
-}
-
-public void test_getRGBI() {
- // indexed palette tests
- RGB[] rgbs = {new RGB(0, 0, 0), new RGB(255, 255, 255), new RGB(50, 100, 150)};
- PaletteData data = new PaletteData(rgbs);
-
- try {
- data.getRGB(rgbs.length);
- fail("No exception thrown for nonexistent pixel");
- }
- catch (IllegalArgumentException e) {
- }
-
- assertEquals(":a:", rgbs[rgbs.length-1], data.getRGB(rgbs.length-1));
-
- // direct palette tests
- RGB rgb =new RGB(0x32, 0x64, 0x96);
- data = new PaletteData(0xff0000, 0x00ff00, 0x0000ff);
-
- assertEquals(":b:", rgb, data.getRGB(0x326496));
-}
-
-public void test_getRGBs() {
- // indexed palette tests
- RGB[] rgbs = {new RGB(0, 0, 0), new RGB(255, 255, 255)};
- PaletteData data = new PaletteData(rgbs);
-
- assertEquals(":a:", rgbs, data.getRGBs());
-
- // direct palette tests
- data = new PaletteData(0xff0000, 0x00ff00, 0x0000ff);
-
- assertNull(":b:", data.getRGBs());
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_graphics_PaletteData((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_Constructor$Lorg_eclipse_swt_graphics_RGB");
- methodNames.addElement("test_ConstructorIII");
- methodNames.addElement("test_getPixelLorg_eclipse_swt_graphics_RGB");
- methodNames.addElement("test_getRGBI");
- methodNames.addElement("test_getRGBs");
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_Constructor$Lorg_eclipse_swt_graphics_RGB")) test_Constructor$Lorg_eclipse_swt_graphics_RGB();
- else if (getName().equals("test_ConstructorIII")) test_ConstructorIII();
- else if (getName().equals("test_getPixelLorg_eclipse_swt_graphics_RGB")) test_getPixelLorg_eclipse_swt_graphics_RGB();
- else if (getName().equals("test_getRGBI")) test_getRGBI();
- else if (getName().equals("test_getRGBs")) test_getRGBs();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_Point.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_Point.java
deleted file mode 100644
index 3dfdc8d299..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_Point.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import org.eclipse.swt.graphics.*;
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.graphics.Point
- *
- * @see org.eclipse.swt.graphics.Point
- */
-public class Test_org_eclipse_swt_graphics_Point extends SwtTestCase {
-
-public Test_org_eclipse_swt_graphics_Point(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
-}
-
-protected void tearDown() {
-}
-
-public void test_ConstructorII() {
- // Test new Point (int x, int y)
- Point p = new Point(3, 4);
- assertEquals(3, p.x);
- assertEquals(4, p.y);
-
- p = new Point(-4, -3);
- assertEquals(-4, p.x);
- assertEquals(-3, p.y);
-
- p = new Point(500000, 700000);
- assertEquals(500000, p.x);
- assertEquals(700000, p.y);
-}
-
-public void test_equalsLjava_lang_Object() {
- Point p1 = new Point(5, 5);
- Point p2 = new Point(5, 5);
- assertTrue("Points should be equal", p1.equals(p2));
-
- p1 = new Point(-5, -5);
- p2 = new Point(-5, -5);
- assertTrue("Points should be equal", p1.equals(p2));
-
- p2 = new Point(3, 4);
- assertTrue("Points should not be equal", !p1.equals(p2));
-}
-
-public void test_hashCode() {
- Point p1 = new Point(5, 5);
- Point p2 = new Point(5, 5);
- assertTrue("Points should have the same hashCode", p1.hashCode() == p2.hashCode());
-}
-
-public void test_toString() {
- Point p = new Point(3, 4);
- assertNotNull(p.toString());
- assertTrue(p.toString().length() > 0);
- assertEquals("Point {3, 4}", p.toString());
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_graphics_Point((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorII");
- methodNames.addElement("test_equalsLjava_lang_Object");
- methodNames.addElement("test_hashCode");
- methodNames.addElement("test_toString");
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorII")) test_ConstructorII();
- else if (getName().equals("test_equalsLjava_lang_Object")) test_equalsLjava_lang_Object();
- else if (getName().equals("test_hashCode")) test_hashCode();
- else if (getName().equals("test_toString")) test_toString();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_RGB.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_RGB.java
deleted file mode 100644
index 29db52109d..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_RGB.java
+++ /dev/null
@@ -1,164 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-import org.eclipse.swt.graphics.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.graphics.RGB
- *
- * @see org.eclipse.swt.graphics.RGB
- */
-public class Test_org_eclipse_swt_graphics_RGB extends SwtTestCase {
-
-public Test_org_eclipse_swt_graphics_RGB(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
-}
-
-protected void tearDown() {
-}
-
-public void test_ConstructorIII() {
- // Test RGB(int red, int green, int blue)
- RGB rgb = new RGB(20,100,200);
-
- rgb = new RGB(0,0,0);
-
- rgb = new RGB(255,255,255);
-
- try {
- rgb = new RGB(-1, 20, 50);
- fail("No exception thrown for red < 0");
- }
- catch (IllegalArgumentException e) {
- }
-
- try {
- rgb = new RGB(256, 20, 50);
- fail("No exception thrown for red > 255");
- }
- catch (IllegalArgumentException e) {
- }
-
- try {
- rgb = new RGB(20, -1, 50);
- fail("No exception thrown for green < 0");
- }
- catch (IllegalArgumentException e) {
- }
-
- try {
- rgb = new RGB(20, 256, 50);
- fail("No exception thrown for green > 255");
- }
- catch (IllegalArgumentException e) {
- }
-
- try {
- rgb = new RGB(20, 50, -1);
- fail("No exception thrown for blue < 0");
- }
- catch (IllegalArgumentException e) {
- }
-
- try {
- rgb = new RGB(20, 50, 256);
- fail("No exception thrown for blue > 255");
- }
- catch (IllegalArgumentException e) {
- }
-
-}
-
-public void test_equalsLjava_lang_Object() {
- int r = 0, g = 127, b = 254;
- RGB rgb1 = new RGB(r, g, b);
- RGB rgb2;
-
- rgb2 = rgb1;
- if (!rgb1.equals(rgb2)) {
- fail("Two references to the same RGB instance not found equal");
- }
-
- rgb2 = new RGB(r, g, b);
- if (!rgb1.equals(rgb2)) {
- fail("References to two different RGB instances with same R G B parameters not found equal");
- }
-
- if (rgb1.equals(new RGB(r+1, g, b)) ||
- rgb1.equals(new RGB(r, g+1, b)) ||
- rgb1.equals(new RGB(r, g, b+1)) ||
- rgb1.equals(new RGB(r+1, g+1, b+1))) {
- fail("Comparing two RGB instances with different combination of R G B parameters found equal");
- }
-}
-
-public void test_hashCode() {
- int r = 255, g = 100, b = 0;
- RGB rgb1 = new RGB(r, g, b);
- RGB rgb2 = new RGB(r, g, b);
-
- int hash1 = rgb1.hashCode();
- int hash2 = rgb2.hashCode();
-
- if (hash1 != hash2) {
- fail("Two RGB instances with same R G B parameters returned different hash codes");
- }
-
- if (rgb1.hashCode() == new RGB(g, b, r).hashCode() ||
- rgb1.hashCode() == new RGB(b, r, g).hashCode()) {
- fail("Two RGB instances with different R G B parameters returned the same hash code");
- }
-}
-
-public void test_toString() {
- RGB rgb = new RGB(0, 100, 200);
-
- String s = rgb.toString();
-
- if (s == null || s.length() == 0) {
- fail("RGB.toString returns a null or empty String");
- }
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_graphics_RGB((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorIII");
- methodNames.addElement("test_equalsLjava_lang_Object");
- methodNames.addElement("test_hashCode");
- methodNames.addElement("test_toString");
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorIII")) test_ConstructorIII();
- else if (getName().equals("test_equalsLjava_lang_Object")) test_equalsLjava_lang_Object();
- else if (getName().equals("test_hashCode")) test_hashCode();
- else if (getName().equals("test_toString")) test_toString();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_Rectangle.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_Rectangle.java
deleted file mode 100644
index ae0d754348..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_Rectangle.java
+++ /dev/null
@@ -1,352 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.graphics.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.graphics.Rectangle
- *
- * @see org.eclipse.swt.graphics.Rectangle
- */
-public class Test_org_eclipse_swt_graphics_Rectangle extends SwtTestCase {
-
-public Test_org_eclipse_swt_graphics_Rectangle(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
-}
-
-protected void tearDown() {
-}
-
-public void test_ConstructorIIII() {
- // Test new Rectangle (int x, int y, int width, int height)
- Rectangle r = new Rectangle(3, 4, 5, 6);
- assertEquals(3, r.x);
- assertEquals(4, r.y);
- assertEquals(5, r.width);
- assertEquals(6, r.height);
-
- r = new Rectangle(-4, -3, -2, -1);
- assertEquals(-4, r.x);
- assertEquals(-3, r.y);
- assertEquals(-2, r.width);
- assertEquals(-1, r.height);
-
- r = new Rectangle(500000, 700000, 200000, 100000);
- assertEquals(500000, r.x);
- assertEquals(700000, r.y);
- assertEquals(200000, r.width);
- assertEquals(100000, r.height);
-}
-
-/**
- * Destructively replaces the x, y, width and height values
- * in the receiver with ones which represent the union of the
- * rectangles specified by the receiver and the given rectangle.
- *
- * @exception IllegalArgumentException <ul>
- * <li>ERROR_NULL_ARGUMENT - if the argument is null</li>
- * </ul>
- */
-public void test_addLorg_eclipse_swt_graphics_Rectangle() {
- Rectangle r1 = new Rectangle(1, 2, 3, 4);
- Rectangle r2 = new Rectangle(3, 3, 2, 2);
- r1.add(r2);
- assertEquals("Rectangle add incorrect", new Rectangle(1, 2, 4, 4), r1);
-
- r1.add(r2);
- assertEquals("Rectangle add incorrect", new Rectangle(1, 2, 4, 4), r1);
-
- r1 = new Rectangle(1, 2, 3, 4);
- r2 = new Rectangle(3, 3, 0, 0);
- r1.add(r2);
- assertEquals("Rectangle add incorrect", new Rectangle(1, 2, 3, 4), r1);
-
- r1 = new Rectangle(1, 2, 3, 4);
- r2 = new Rectangle(6, 6, 0, 0);
- r1.add(r2);
- assertEquals("Rectangle add incorrect", new Rectangle(1, 2, 5, 4), r1);
-
- try {
- r1.add(null);
- fail("No exception thrown for rectangle == null");
- } catch (IllegalArgumentException e) {
- assertEquals("Incorrect exception thrown for rectangle == null", SWT.ERROR_NULL_ARGUMENT, e);
- }
-}
-
-/**
- * Returns <code>true</code> if the point specified by the
- * arguments is inside the area specified by the receiver.
- */
-public void test_containsII() {
- Rectangle r = new Rectangle(1, 2, 3, 4);
- assertTrue("Rectangle should contain point (1, 2)", r.contains(1, 2));
-
- assertTrue("Rectangle should contain point (3, 4)", r.contains(3, 4));
-
- assertTrue("Rectangle should contain point (3, 5)", r.contains(3, 5));
-
-// assertTrue("Rectangle should contain point (3, 6)", r.contains(3, 6));
-//
-// assertTrue("Rectangle should contain point (4, 5)", r.contains(4, 5));
-//
-// assertTrue("Rectangle should contain point (4, 6)", r.contains(4, 6));
-
- assertTrue("Rectangle should not contain point (9, 10)", !r.contains(9, 10));
-
- assertTrue("Rectangle should not contain point (-1, -1)", !r.contains(-1, -1));
-}
-
-/**
- * Returns <code>true</code> if the given point is inside the
- * area specified by the receiver.
- *
- * @exception IllegalArgumentException <ul>
- * <li>ERROR_NULL_ARGUMENT - if the argument is null</li>
- * </ul>
- */
-public void test_containsLorg_eclipse_swt_graphics_Point() {
- Rectangle r = new Rectangle(1, 2, 3, 4);
- assertTrue("Rectangle should contain Point(1, 2)", r.contains(new Point(1, 2)));
-
- assertTrue("Rectangle should contain Point(3, 4)", r.contains(new Point(3, 4)));
-
- assertTrue("Rectangle should contain point (3, 5)", r.contains(new Point(3, 5)));
-
-// assertTrue("Rectangle should contain point (3, 6)", r.contains(new Point(3, 6)));
-//
-// assertTrue("Rectangle should contain point (4, 5)", r.contains(new Point(4, 5)));
-//
-// assertTrue("Rectangle should contain Point(4, 6)", r.contains(new Point(4, 6)));
-
- assertTrue("Rectangle should not contain Point(9, 10)", !r.contains(new Point(9, 10)));
-
- assertTrue("Rectangle should not contain point (-1, -1)", !r.contains(new Point(-1, -1)));
-
- try {
- r.contains(null);
- fail("No exception thrown for rectangle == null");
- } catch (IllegalArgumentException e) {
- assertEquals("Incorrect exception thrown for rectangle == null", SWT.ERROR_NULL_ARGUMENT, e);
- }
-}
-
-public void test_equalsLjava_lang_Object() {
- Rectangle r1 = new Rectangle(5, 4, 3, 2);
- Rectangle r2 = new Rectangle(5, 4, 3, 2);
- assertTrue("Rectangles should be equal", r1.equals(r2));
-
- r2 = new Rectangle(3, 4, 5, 6);
- assertTrue("Rectangles should not be equal", !r1.equals(r2));
-
- r2 = new Rectangle(2, 3, 4, 5);
- assertTrue("Rectangles should not be equal", !r1.equals(r2));
-
- r2 = new Rectangle(5, 4, 2, 3);
- assertTrue("Rectangles should not be equal", !r1.equals(r2));
-
- r2 = new Rectangle(4, 5, 3, 2);
- assertTrue("Rectangles should not be equal", !r1.equals(r2));
-}
-
-public void test_hashCode() {
- Rectangle r1 = new Rectangle(5, 4, 3, 2);
- Rectangle r2 = new Rectangle(5, 4, 3, 2);
- assertTrue("Rectangles should have the same hashCode", r1.hashCode() == r2.hashCode());
-}
-
-public void test_intersectLorg_eclipse_swt_graphics_Rectangle() {
- Rectangle r1 = new Rectangle(1, 2, 3, 4);
- Rectangle r2 = new Rectangle(3, 3, 2, 2);
-
- r1.intersect(r2);
- assertEquals("Rectangle intersect incorrect", new Rectangle(3, 3, 1, 2), r1);
-
- r1 = new Rectangle(1, 2, 3, 4);
- r2 = new Rectangle(3, 3, 0, 0);
- r1.intersect(r2);
- assertEquals("Rectangle intersect incorrect", new Rectangle(3, 3, 0, 0), r1);
-
- r1 = new Rectangle(1, 2, 3, 4);
- r2 = new Rectangle(3, 3, -1, -1);
- r1.intersect(r2);
- assertEquals("Rectangle intersect incorrect", new Rectangle(0, 0, 0, 0), r1);
-
- try {
- r1.intersect(null);
- fail("No exception thrown for rectangle == null");
- } catch (IllegalArgumentException e) {
- assertEquals("Incorrect exception thrown for rectangle == null", SWT.ERROR_NULL_ARGUMENT, e);
- }
-}
-
-public void test_intersectionLorg_eclipse_swt_graphics_Rectangle() {
- Rectangle r1 = new Rectangle(1, 2, 3, 4);
- Rectangle r2 = new Rectangle(3, 3, 2, 2);
- assertEquals("Rectangle intersection incorrect", new Rectangle(3, 3, 1, 2), r1.intersection(r2));
-
- r2 = new Rectangle(3, 3, 0, 0);
- assertEquals("Rectangle intersection incorrect", new Rectangle(3, 3, 0, 0), r1.intersection(r2));
-
- r2 = new Rectangle(3, 3, -1, -1);
- assertEquals("Rectangle intersection incorrect", new Rectangle(0, 0, 0, 0), r1.intersection(r2));
-
- try {
- r1.intersection(null);
- fail("No exception thrown for rectangle == null");
- } catch (IllegalArgumentException e) {
- assertEquals("Incorrect exception thrown for rectangle == null", SWT.ERROR_NULL_ARGUMENT, e);
- }
-}
-
-public void test_intersectsIIII() {
- Rectangle r1 = new Rectangle(1, 2, 3, 4);
- Rectangle r2 = new Rectangle(2, 3, 7, 8);
- assertTrue("Rectangle(1, 2, 3, 4) should intersect Rectangle(2, 3, 7, 8)", r1.intersects(2, 3, 7, 8));
- assertTrue("Rectangle(2, 3, 7, 8) should intersect Rectangle(1, 2, 3, 4)", r2.intersects(1, 2, 3, 4));
-
- r2 = new Rectangle(200, 300, 400, 500);
- assertTrue("Rectangle(1, 2, 3, 4) should not intersect Rectangle(200, 300, 400, 500)", !r1.intersects(200, 300, 400, 500));
- assertTrue("Rectangle(200, 300, 400, 500) should not intersect Rectangle(1, 2, 3, 4)", !r2.intersects(1, 2, 3, 4));
-
- r2 = new Rectangle(3, 3, 0, 0);
- assertTrue("Rectangle(1, 2, 3, 4) should intersect Rectangle(3, 3, 0, 0)", r1.intersects(3, 3, 0, 0));
- assertTrue("Rectangle(3, 3, 0, 0) should intersect Rectangle(1, 2, 3, 4)", r2.intersects(1, 2, 3, 4));
-
- r2 = new Rectangle(3, 3, -1, -1);
- assertTrue("Rectangle(1, 2, 3, 4) should not intersect Rectangle(3, 3, -1, -1)", !r1.intersects(3, 3, -1, -1));
- assertTrue("Rectangle(3, 3, -1, -1) should not intersect Rectangle(1, 2, 3, 4)", !r2.intersects(1, 2, 3, 4));
-
- try {
- r1.intersects(null);
- fail("No exception thrown for rectangle == null");
- } catch (IllegalArgumentException e) {
- assertEquals("Incorrect exception thrown for rectangle == null", SWT.ERROR_NULL_ARGUMENT, e);
- }
-}
-
-public void test_intersectsLorg_eclipse_swt_graphics_Rectangle() {
- Rectangle r1 = new Rectangle(1, 2, 3, 4);
- Rectangle r2 = new Rectangle(2, 3, 7, 8);
- assertTrue("Rectangle(1, 2, 3, 4) should intersect Rectangle(2, 3, 7, 8)", r1.intersects(r2));
- assertTrue("Rectangle(2, 3, 7, 8) should intersect Rectangle(1, 2, 3, 4)", r2.intersects(r1));
-
- r2 = new Rectangle(200, 300, 400, 500);
- assertTrue("Rectangle(1, 2, 3, 4) should not intersect Rectangle(200, 300, 400, 500)", !r1.intersects(r2));
- assertTrue("Rectangle(200, 300, 400, 500) should not intersect Rectangle(1, 2, 3, 4)", !r2.intersects(r1));
-
- r2 = new Rectangle(3, 3, 0, 0);
- assertTrue("Rectangle(1, 2, 3, 4) should intersect Rectangle(3, 3, 0, 0)", r1.intersects(r2));
- assertTrue("Rectangle(3, 3, 0, 0) should intersect Rectangle(1, 2, 3, 4)", r2.intersects(r1));
-
- r2 = new Rectangle(3, 3, -1, -1);
- assertTrue("Rectangle(1, 2, 3, 4) should not intersect Rectangle(3, 3, -1, -1)", !r1.intersects(r2));
- assertTrue("Rectangle(3, 3, -1, -1) should not intersect Rectangle(1, 2, 3, 4)", !r2.intersects(r1));
-
- try {
- r1.intersects(null);
- fail("No exception thrown for rectangle == null");
- } catch (IllegalArgumentException e) {
- assertEquals("Incorrect exception thrown for rectangle == null", SWT.ERROR_NULL_ARGUMENT, e);
- }
-}
-
-public void test_isEmpty() {
- Rectangle r = new Rectangle(1, 2, 0, 0);
- assertTrue("Rectangle is empty", r.isEmpty());
-
- r = new Rectangle(1, 2, -3, -4);
- assertTrue("Rectangle is empty", r.isEmpty());
-
- r = new Rectangle(1, 2, 3, 4);
- assertTrue("Rectangle is not empty", !r.isEmpty());
-}
-
-public void test_toString() {
- Rectangle r = new Rectangle(3, 4, 5, 6);
- assertNotNull(r.toString());
- assertTrue(r.toString().length() > 0);
- assertEquals("Rectangle {3, 4, 5, 6}", r.toString());
-}
-
-public void test_unionLorg_eclipse_swt_graphics_Rectangle() {
- Rectangle r1 = new Rectangle(1, 2, 3, 4);
- Rectangle r2 = new Rectangle(3, 3, 2, 2);
- assertEquals("Rectangle union incorrect", new Rectangle(1, 2, 4, 4), r1.union(r2));
-
- r2 = new Rectangle(3, 3, 0, 0);
- assertEquals("Rectangle union incorrect", new Rectangle(1, 2, 3, 4), r1.union(r2));
-
- r2 = new Rectangle(3, 3, -1, -1);
- assertEquals("Rectangle union incorrect", new Rectangle(1, 2, 3, 4), r1.union(r2));
-
- try {
- r1.union(null);
- fail("No exception thrown for rectangle == null");
- } catch (IllegalArgumentException e) {
- assertEquals("Incorrect exception thrown for rectangle == null", SWT.ERROR_NULL_ARGUMENT, e);
- }
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_graphics_Rectangle((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorIIII");
- methodNames.addElement("test_addLorg_eclipse_swt_graphics_Rectangle");
- methodNames.addElement("test_containsII");
- methodNames.addElement("test_containsLorg_eclipse_swt_graphics_Point");
- methodNames.addElement("test_equalsLjava_lang_Object");
- methodNames.addElement("test_hashCode");
- methodNames.addElement("test_intersectLorg_eclipse_swt_graphics_Rectangle");
- methodNames.addElement("test_intersectionLorg_eclipse_swt_graphics_Rectangle");
- methodNames.addElement("test_intersectsIIII");
- methodNames.addElement("test_intersectsLorg_eclipse_swt_graphics_Rectangle");
- methodNames.addElement("test_isEmpty");
- methodNames.addElement("test_toString");
- methodNames.addElement("test_unionLorg_eclipse_swt_graphics_Rectangle");
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorIIII")) test_ConstructorIIII();
- else if (getName().equals("test_addLorg_eclipse_swt_graphics_Rectangle")) test_addLorg_eclipse_swt_graphics_Rectangle();
- else if (getName().equals("test_containsII")) test_containsII();
- else if (getName().equals("test_containsLorg_eclipse_swt_graphics_Point")) test_containsLorg_eclipse_swt_graphics_Point();
- else if (getName().equals("test_equalsLjava_lang_Object")) test_equalsLjava_lang_Object();
- else if (getName().equals("test_hashCode")) test_hashCode();
- else if (getName().equals("test_intersectLorg_eclipse_swt_graphics_Rectangle")) test_intersectLorg_eclipse_swt_graphics_Rectangle();
- else if (getName().equals("test_intersectionLorg_eclipse_swt_graphics_Rectangle")) test_intersectionLorg_eclipse_swt_graphics_Rectangle();
- else if (getName().equals("test_intersectsIIII")) test_intersectsIIII();
- else if (getName().equals("test_intersectsLorg_eclipse_swt_graphics_Rectangle")) test_intersectsLorg_eclipse_swt_graphics_Rectangle();
- else if (getName().equals("test_isEmpty")) test_isEmpty();
- else if (getName().equals("test_toString")) test_toString();
- else if (getName().equals("test_unionLorg_eclipse_swt_graphics_Rectangle")) test_unionLorg_eclipse_swt_graphics_Rectangle();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_Region.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_Region.java
deleted file mode 100644
index 7bd311e37f..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_Region.java
+++ /dev/null
@@ -1,959 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-import org.eclipse.swt.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.widgets.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.graphics.Region
- *
- * @see org.eclipse.swt.graphics.Region
- */
-public class Test_org_eclipse_swt_graphics_Region extends SwtTestCase {
-
-public Test_org_eclipse_swt_graphics_Region(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- display = Display.getDefault();
-}
-
-protected void tearDown() {
-}
-
-public void test_Constructor() {
- // test Region()
- Region reg = new Region();
- if (reg.isDisposed()) {
- fail("Constructor for Region didn't initialize");
- }
- reg.dispose();
-}
-
-public void test_ConstructorLorg_eclipse_swt_graphics_Device() {
- Region reg = new Region(display);
- if (reg.isDisposed()) {
- fail("Constructor for Region didn't initialize");
- }
- reg.dispose();
-}
-
-public void test_add$I() {
- Region reg = new Region(display);
- try {
- reg.add((int[])null);
- reg.dispose();
- fail("no exception thrown for adding a null rectangle");
- }
- catch (IllegalArgumentException e) {
- }
- reg.dispose();
- try {
- reg.add(new int[]{});
- reg.dispose();
- fail("no exception thrown on disposed region");
- }
- catch (SWTException e) {
- }
- reg.dispose();
-
- reg = new Region(display);
- reg.add(new int[] {0,0, 50,0, 50,25, 0,25});
- Rectangle box = reg.getBounds();
- reg.dispose();
- Rectangle expected = new Rectangle (0,0,50,25);
- if (!box.equals(expected)) {
- fail("add 1 failed - expected: "+expected+" actual: "+box);
- }
-
- reg = new Region(display);
- reg.add(new int[] {0,0, 50,0, 50,25, 0,25});
- reg.add(new int[] {0,25, 50,25, 50,40, 0,40});
- box = reg.getBounds();
- reg.dispose();
- expected = new Rectangle (0,0,50,40);
- if (!box.equals(expected)) {
- fail("add 2 failed - expected: "+expected+" actual: "+box);
- }
-
-// reg = new Region(display);
-// reg.add(new int[] {10,10, 40,30, 20,60, 5,55});
-// box = reg.getBounds();
-// reg.dispose();
-// expected = new Rectangle (5,10,35,50);
-// if (!box.equals(expected)) {
-// fail("add 3 failed - expected: "+expected+" actual: "+box);
-// }
-}
-
-public void test_addLorg_eclipse_swt_graphics_Rectangle() {
- Region reg = new Region(display);
- // add a rectangle
- reg.add(new Rectangle(0, 0, 100, 50));
- // add a second rectangle
- reg.add(new Rectangle(200, 200, 10,10));
-
- try {
- reg.add((Rectangle)null);
- fail("no exception thrown for adding a null rectangle");
- }
- catch (IllegalArgumentException e) {
- }
-
- reg.dispose();
-
- try {
- reg.add(new Rectangle(20,30,10,5));
- fail("no exception thrown for adding a rectangle after Region got disposed");
- }
- catch (SWTException e) {
- }
-}
-
-public void test_addLorg_eclipse_swt_graphics_Region() {
- Region reg1 = new Region(display);
- // make a second region and add it to the first one
- Region reg2 = new Region(display);
- reg2.add(new Rectangle(40, 50, 10, 20));
- reg1.add(reg2);
-
- try {
- reg1.add((Region)null);
- fail("no exception thrown for adding a null region");
- }
- catch (IllegalArgumentException e) {
- }
-
- try {
- reg2 = new Region(display);
- reg2.add(new Rectangle(1,1,100,200));
- reg2.dispose();
- reg1.add(reg2);
- fail("no exception thrown for adding to a Region a Region which got disposed");
- }
- catch (IllegalArgumentException e) {
- }
-
- reg1.dispose();
-
- try {
- reg2 = new Region(display);
- reg2.add(new Rectangle(1,1,100,200));
- reg1.add(reg2);
- fail("no exception thrown for adding a Region to a Region which got disposed");
- }
- catch (SWTException e) {
- }
-}
-
-public void test_containsII() {
- Rectangle rect1 = new Rectangle(10,10,200,100);
- Point pointInRect1 = new Point(10,10);
- Rectangle rect2 = new Rectangle(50,50,1000,1000);
- Point pointInRect2 = new Point(1049,1009);
- Point pointNotInRect12 = new Point(49,110);
-
- Region reg = new Region(display);
- reg.dispose();
- try {
- boolean res = reg.contains(pointInRect1.x, pointInRect1.y);
- fail("no exception thrown on disposed region");
- }
- catch (Exception e) {
- }
-
- reg = new Region(display);
- if (reg.contains(pointInRect1.x, pointInRect1.y)) {
- reg.dispose();
- fail("Empty region should not contain point");
- }
- reg.add(rect1);
- if (!reg.contains(pointInRect1.x, pointInRect1.y)) {
- reg.dispose();
- fail("Region should contain point");
- }
- reg.add(rect2);
- if (!reg.contains(pointInRect1.x, pointInRect1.y) ||
- !reg.contains(pointInRect2.x, pointInRect2.y)) {
- reg.dispose();
- fail("Region should contain point");
- }
- if (reg.contains(pointNotInRect12.x, pointNotInRect12.y)) {
- reg.dispose();
- fail("Region should not contain point");
- }
- reg.dispose();
-}
-
-public void test_containsLorg_eclipse_swt_graphics_Point() {
- Rectangle rect1 = new Rectangle(10,10,200,100);
- Point pointInRect1 = new Point(10,10);
- Rectangle rect2 = new Rectangle(50,50,1000,1000);
- Point pointInRect2 = new Point(1049,1009);
- Point pointNotInRect12 = new Point(49,110);
-
- Region reg = new Region(display);
- reg.dispose();
- try {
- boolean res = reg.contains(pointInRect1);
- fail("no exception thrown on disposed region");
- }
- catch (Exception e) {
- }
-
- reg = new Region(display);
- if (reg.contains(pointInRect1)) {
- reg.dispose();
- fail("Empty region should not contain point");
- }
- reg.add(rect1);
- if (!reg.contains(pointInRect1)) {
- reg.dispose();
- fail("Region should contain point");
- }
- reg.add(rect2);
- if (!reg.contains(pointInRect1) ||
- !reg.contains(pointInRect2)) {
- reg.dispose();
- fail("Region should contain point");
- }
- if (reg.contains(pointNotInRect12)) {
- reg.dispose();
- fail("Region should not contain point");
- }
- reg.dispose();
-}
-
-public void test_dispose() {
- Region reg = new Region(display);
- reg.add(new Rectangle(1,1,50,100));
- if (reg.isDisposed()) {
- fail("Region should not be in the disposed state");
- }
-
- // dispose twice as this is allowed
- for (int i = 0; i < 2; i++) {
- reg.dispose();
- if (!reg.isDisposed()) {
- fail("Region should be in the disposed state");
- }
- }
-}
-
-public void test_equalsLjava_lang_Object() {
- Rectangle rect1 = new Rectangle(25, 100, 200, 780);
- Rectangle rect2 = new Rectangle(30, 105, 205, 785);
-
- Region reg1 = new Region(display);
- reg1.add(rect1);
-
- Region reg2 = reg1;
-
- if (!reg1.equals(reg2)) {
- reg1.dispose();
- reg2.dispose();
- fail("references to the same instance of Region should be considered equal");
- }
-
- reg2 = new Region(display);
- reg2.add(rect1);
-
-// Currently, Regions are only "equal" if they have the same handle.
-// This is so that identical objects are properly hashed.
-// We are considering adding a new method that will compare Regions for the same area.
-// if (!reg1.equals(reg2)) {
-// reg1.dispose();
-// reg2.dispose();
-// fail("two instances of Region representing the same area should be considered equal");
-// }
-
- reg2.dispose();
- reg2 = new Region(display);
- if (reg1.equals(reg2)) {
- reg1.dispose();
- reg2.dispose();
- fail("Non empty region considered equal to empty one");
- }
-
- reg2.add(rect2);
- if (reg1.equals(reg2)) {
- reg1.dispose();
- reg2.dispose();
- fail("two different regions considered equal");
- }
-
- reg1.dispose();
- reg2.dispose();
-}
-
-public void test_getBounds() {
- Region reg = new Region(display);
- reg.dispose();
-
- try {
- Rectangle rect = reg.getBounds();
- fail("Region disposed should throw Exception");
- }
- catch (Exception e) {
- }
-
- Rectangle rect1 = new Rectangle(10,10,50,30);
- Rectangle rect2 = new Rectangle(100,100,10,10);
- // the rectangle enclosing the two preceding rectangles
- Rectangle rect12Bounds = new Rectangle(10,10,100,100);
-
- reg = new Region(display);
- reg.add(rect1);
- Rectangle rect1Bis = reg.getBounds();
- if (rect1Bis.x != rect1.x || rect1Bis.y != rect1.y ||
- rect1Bis.height != rect1.height || rect1Bis.width != rect1.width) {
- reg.dispose();
- fail("getBounds doesn't return the borders of the rectangle area which was set up");
- }
-
- reg.add(rect2);
- Rectangle rect12 = reg.getBounds();
- if (rect12.x != rect12Bounds.x || rect12.y != rect12Bounds.y ||
- rect12.height != rect12Bounds.height || rect12.width != rect12Bounds.width) {
- reg.dispose();
- fail("getBounds doesn't return the borders of the resulting rectangle area which was set up");
- }
-
- reg.dispose();
-}
-
-public void test_hashCode() {
- Region reg1 = new Region(display);
- Region reg2 = new Region(display);
-
- Rectangle rect1 = new Rectangle(25, 100, 200, 780);
- Rectangle rect2 = new Rectangle(30, 105, 205, 785);
-
- reg1.add(rect1);
- reg2.add(rect2);
-
- if (reg1.hashCode() == reg2.hashCode()) {
- reg1.dispose();
- reg2.dispose();
- fail("two different regions should have different hashCode");
- }
- reg2.dispose();
-
- reg2 = new Region(display);
- reg2.add(rect1);
-
-
-// BUG: this should pass
-// if (reg1.hashCode() != reg2.hashCode()) {
-// reg1.dispose();
-// reg2.dispose();
-// fail("two regions representing same area should have same hashCode");
-// }
-
- reg1.dispose();
- reg2.dispose();
-}
-
-public void test_intersectLorg_eclipse_swt_graphics_Rectangle() {
- Rectangle rect1 = new Rectangle(0,0,50,25);
- Rectangle rect2 = new Rectangle(0,0,50,25);
- Rectangle rect3 = new Rectangle(10,10,10,10);
- Rectangle rect4 = new Rectangle(50,25,10,10);
- Rectangle rect5 = new Rectangle(25,20,25,10);
-
- Region reg = new Region(display);
- reg.dispose();
- try {
- reg.intersect(rect1);
- fail("no exception thrown on disposed region");
- }
- catch (SWTException e) {
- }
-
- reg = new Region(display);
- reg.intersect(rect1);
- if (!reg.isEmpty()) {
- reg.dispose();
- fail("intersect failed for empty region");
- }
- reg.add(rect1);
- reg.intersect(rect2);
- Rectangle box = reg.getBounds();
- if (!box.equals(rect1)) {
- reg.dispose();
- fail("intersect failed 1");
- }
- reg.intersect(rect3);
- box = reg.getBounds();
- if (!box.equals(rect3)) {
- reg.dispose();
- fail("intersect failed 2");
- }
- reg.intersect(rect4);
- if (!reg.isEmpty()) {
- reg.dispose();
- fail("intersect failed 3");
- }
- reg.add(rect1.union(rect4));
- reg.intersect(rect5);
- box = reg.getBounds();
- if (!box.equals(rect5)) {
- reg.dispose();
- fail("intersect failed 4");
- }
- reg.dispose();
-
- reg = new Region(display);
- reg.add(rect1);
- reg.add(rect4);
- reg.intersect(rect5);
- box = reg.getBounds();
- if (!box.equals(new Rectangle(25,20,25,5))) {
- reg.dispose();
- fail("intersect failed 5");
- }
- reg.dispose();
-}
-
-public void test_intersectLorg_eclipse_swt_graphics_Region() {
- Region reg = new Region(display);
- Region reg1 = new Region(display);
- reg1.add(new Rectangle(0,0,50,25));
-
- reg.dispose();
- try {
- reg.intersect(reg1);
- reg1.dispose();
- fail("no exception thrown on disposed region");
- }
- catch (SWTException e) {
- }
-
- reg = new Region(display);
- reg.intersect(reg1);
- if (!reg.isEmpty()) {
- reg.dispose();
- reg1.dispose();
- fail("intersect failed for empty region");
- }
-
- Region reg2 = new Region(display);
- reg2.add(new Rectangle(0,0,50,25));
-
- reg.add(reg1);
- reg.intersect(reg2);
- Rectangle box = reg.getBounds();
- if (!box.equals(reg1.getBounds())) {
- reg.dispose();
- reg1.dispose();
- reg2.dispose();
- fail("intersect failed 1");
- }
- reg2.dispose();
-
- Region reg3 = new Region(display);
- reg3.add(new Rectangle(10,10,10,10));
-
- reg.intersect(reg3);
- box = reg.getBounds();
- if (!box.equals(reg3.getBounds())) {
- reg.dispose();
- reg1.dispose();
- reg3.dispose();
- fail("intersect failed 2");
- }
- reg3.dispose();
-
- Region reg4 = new Region(display);
- reg4.add(new Rectangle(50,25,10,10));
-
- reg.intersect(reg4);
- if (!reg.isEmpty()) {
- reg.dispose();
- reg1.dispose();
- reg4.dispose();
- fail("intersect failed 3");
- }
-
- Region reg5 = new Region(display);
- reg5.add(new Rectangle(25,20,25,10));
-
- reg.add(reg1.getBounds().union(reg4.getBounds()));
- reg.intersect(reg5);
- box = reg.getBounds();
- if (!box.equals(reg5.getBounds())) {
- reg.dispose();
- reg1.dispose();
- reg4.dispose();
- fail("intersect failed 4");
- }
- reg.dispose();
-
- reg = new Region(display);
- reg.add(reg1);
- reg.add(reg4);
- reg.intersect(reg5);
- box = reg.getBounds();
- if (!box.equals(new Rectangle(25,20,25,5))) {
- reg.dispose();
- reg1.dispose();
- reg4.dispose();
- fail("intersect failed 5");
- }
- reg.dispose();
- reg1.dispose();
- reg4.dispose();
-}
-
-public void test_intersectsIIII() {
- Rectangle rect1 = new Rectangle(10,20,50,30);
- Rectangle rectInter1 = new Rectangle(59,49,10,20);
- Rectangle rectNotInter1 = new Rectangle(0,5,10,15);
-
- Rectangle rect2 = new Rectangle(30,40,10,100);
- Rectangle rectInter2 = new Rectangle(39,139,1,5);
- Rectangle rectNotInter12 = new Rectangle(40,50,5,15);
-
-
- Region reg = new Region(display);
- reg.dispose();
- try {
- boolean res = reg.intersects(rectInter1.x, rectInter1.y, rectInter1.width, rectInter1.height);
- fail("no exception thrown on disposed region");
- }
- catch (Exception e) {
- }
-
- reg = new Region(display);
- if (reg.intersects(rect1.x, rect1.y, rect1.width, rect1.height)) {
- reg.dispose();
- fail("intersects can't return true on empty region");
- }
- reg.add(rect1);
- if (!reg.intersects(rect1.x, rect1.y, rect1.width, rect1.height)) {
- reg.dispose();
- fail("intersects didn't return true");
- }
- if (!reg.intersects(rectInter1.x, rectInter1.y, rectInter1.width, rectInter1.height)) {
- reg.dispose();
- fail("intersects didn't return true ");
- }
- if (reg.intersects(rectNotInter1.x, rectNotInter1.y, rectNotInter1.width, rectNotInter1.height)) {
- reg.dispose();
- fail("intersects return true on rectangle not intersecting with region");
- }
-
- reg.add(rect2);
- if (!reg.intersects(rect2.x, rect2.y, rect2.width, rect2.height)) {
- reg.dispose();
- fail("intersects didn't return true");
- }
- if (!reg.intersects(rectInter2.x, rectInter2.y, rectInter2.width, rectInter2.height)) {
- reg.dispose();
- fail("intersects didn't return true ");
- }
- if (reg.intersects(rectNotInter12.x, rectNotInter12.y, rectNotInter12.width, rectNotInter12.height)) {
- reg.dispose();
- fail("intersects return true on rectangle not intersecting with region");
- }
- reg.dispose();
-}
-
-public void test_intersectsLorg_eclipse_swt_graphics_Rectangle() {
- Rectangle rect1 = new Rectangle(10,20,50,30);
- Rectangle rectInter1 = new Rectangle(59,49,10,20);
- Rectangle rectNotInter1 = new Rectangle(0,5,10,15);
-
- Rectangle rect2 = new Rectangle(30,40,10,100);
- Rectangle rectInter2 = new Rectangle(39,139,1,5);
- Rectangle rectNotInter12 = new Rectangle(40,50,5,15);
-
-
- Region reg = new Region(display);
- reg.dispose();
- try {
- boolean res = reg.intersects(rectInter1);
- fail("no exception thrown on disposed region");
- }
- catch (Exception e) {
- }
-
- reg = new Region(display);
- if (reg.intersects(rect1)) {
- reg.dispose();
- fail("intersects can't return true on empty region");
- }
- reg.add(rect1);
- if (!reg.intersects(rect1)) {
- reg.dispose();
- fail("intersects didn't return true");
- }
- if (!reg.intersects(rectInter1)) {
- reg.dispose();
- fail("intersects didn't return true ");
- }
- if (reg.intersects(rectNotInter1)) {
- reg.dispose();
- fail("intersects return true on rectangle not intersecting with region");
- }
-
- reg.add(rect2);
- if (!reg.intersects(rect2)) {
- reg.dispose();
- fail("intersects didn't return true");
- }
- if (!reg.intersects(rectInter2)) {
- reg.dispose();
- fail("intersects didn't return true ");
- }
- if (reg.intersects(rectNotInter12)) {
- reg.dispose();
- fail("intersects return true on rectangle not intersecting with region");
- }
- reg.dispose();
-}
-
-public void test_isDisposed() {
- // test in dispose()
-}
-
-public void test_isEmpty() {
- Region reg = new Region(display);
- Rectangle emptyRect1 = new Rectangle(10,20,0,200);
- Rectangle emptyRect2 = new Rectangle(10,20,10,0);
- Rectangle rect = new Rectangle(10,20,50,100);
-
- if (!reg.isEmpty()) {
- reg.dispose();
- fail("isEmpty didn't return true on empty region");
- }
-
- reg.add(emptyRect1);
- if (!reg.isEmpty()) {
- reg.dispose();
- fail("isEmpty didn't return true on empty region");
- }
-
- reg.add(emptyRect2);
- if (!reg.isEmpty()) {
- reg.dispose();
- fail("isEmpty didn't return true on empty region");
- }
-
- reg.add(rect);
- if (reg.isEmpty()) {
- reg.dispose();
- fail("isEmpty returned true on non empty region");
- }
-
- reg.dispose();
-}
-
-public void test_subtract$I() {
- Region reg = new Region(display);
- try {
- reg.subtract((int[])null);
- reg.dispose();
- fail("no exception thrown for subtract a null array");
- }
- catch (IllegalArgumentException e) {
- }
- reg.dispose();
- try {
- reg.subtract(new int[]{});
- reg.dispose();
- fail("no exception thrown on disposed region");
- }
- catch (SWTException e) {
- }
- reg.dispose();
-
- reg = new Region(display);
- reg.add(new int[] {0,0, 50,0, 50,25, 0,25});
- reg.subtract(new int[] {0,0, 50,0, 50,20, 0,20});
- Rectangle box = reg.getBounds();
- reg.dispose();
- Rectangle expected = new Rectangle (0,20,50,5);
- if (!box.equals(expected)) {
- fail("subtract 1 failed - expected: "+expected+" actual: "+box);
- }
-
-
- reg = new Region(display);
- reg.add(new int[] {0,0, 50,0, 50,25, 0,25});
- reg.add(new int[] {0,25, 50,25, 50,40, 0,40});
- reg.subtract(new int[] {0,25, 50,25, 50,40, 0,40});
- box = reg.getBounds();
- reg.dispose();
- expected = new Rectangle (0,0,50,25);
- if (!box.equals(expected)) {
- fail("subtract 2 failed - expected: "+expected+" actual: "+box);
- }
-}
-
-public void test_subtractLorg_eclipse_swt_graphics_Rectangle() {
- Rectangle rect1 = new Rectangle(0,0,50,25);
- Rectangle rect2 = new Rectangle(0,0,50,25);
- Rectangle rect3 = new Rectangle(10,10,10,10);
- Rectangle rect4 = new Rectangle(50,25,10,10);
- Rectangle rect5 = new Rectangle(0,0,60,20);
-
- Region reg = new Region(display);
- reg.dispose();
- try {
- reg.subtract(rect1);
- fail("no exception thrown on disposed region");
- }
- catch (SWTException e) {
- }
-
- reg = new Region(display);
- reg.subtract(rect1);
- if (!reg.isEmpty()) {
- reg.dispose();
- fail("subtract failed for empty region");
- }
- reg.add(rect1);
- reg.subtract(rect2);
- if (!reg.isEmpty()) {
- reg.dispose();
- fail("subtract failed 1");
- }
- reg.add(rect1);
- reg.subtract(rect3);
- Rectangle box = reg.getBounds();
- if (!box.equals(rect1)) {
- reg.dispose();
- fail("subtract failed 2");
- }
- reg.subtract(rect4);
- box = reg.getBounds();
- if (!box.equals(rect1)) {
- reg.dispose();
- fail("subtract failed 3");
- }
- reg.add(rect1.union(rect4));
- reg.subtract(rect5);
- box = reg.getBounds();
- if (!box.equals(new Rectangle(0,20,60,15))) {
- reg.dispose();
- fail("subtract failed 4");
- }
- reg.dispose();
-
- reg = new Region(display);
- reg.add(rect1);
- reg.add(rect4);
- reg.subtract(rect5);
- box = reg.getBounds();
- if (!box.equals(new Rectangle(0,20,60,15))) {
- reg.dispose();
- fail("subtract failed 5");
- }
- reg.dispose();
-}
-
-public void test_subtractLorg_eclipse_swt_graphics_Region() {
- Region reg1 = new Region(display);
- reg1.add(new Rectangle(0,0,50,25));
-
- Region reg = new Region(display);
- reg.dispose();
- try {
- reg.subtract(reg1);
- reg1.dispose();
- fail("no exception thrown on disposed region");
- }
- catch (SWTException e) {
- }
-
- reg = new Region(display);
- reg.subtract(reg1);
- if (!reg.isEmpty()) {
- reg.dispose();
- reg1.dispose();
- fail("subtract failed for empty region");
- }
-
- Region reg2 = new Region(display);
- reg2.add(new Rectangle(0,0,50,25));
-
- reg.add(reg1);
- reg.subtract(reg2);
- if (!reg.isEmpty()) {
- reg.dispose();
- reg1.dispose();
- reg2.dispose();
- fail("subtract failed 1");
- }
- reg2.dispose();
-
- Region reg3 = new Region(display);
- reg3.add(new Rectangle(10,10,10,10));
-
- reg.add(reg1);
- reg.subtract(reg3);
- Rectangle box = reg.getBounds();
- if (!box.equals(reg1.getBounds())) {
- reg.dispose();
- reg1.dispose();
- reg3.dispose();
- fail("subtract failed 2");
- }
- reg3.dispose();
-
- Region reg4 = new Region(display);
- reg4.add(new Rectangle(50,25,10,10));
-
- reg.subtract(reg4);
- box = reg.getBounds();
- if (!box.equals(reg1.getBounds())) {
- reg.dispose();
- reg1.dispose();
- reg4.dispose();
- fail("subtract failed 3");
- }
-
- Region reg5 = new Region(display);
- reg5.add(new Rectangle(0,0,60,20));
-
- reg.add(reg1.getBounds().union(reg4.getBounds()));
- reg.subtract(reg5);
- box = reg.getBounds();
- if (!box.equals(new Rectangle(0,20,60,15))) {
- reg.dispose();
- reg1.dispose();
- reg4.dispose();
- reg5.dispose();
- fail("subtract failed 4");
- }
- reg.dispose();
-
- reg = new Region(display);
- reg.add(reg1);
- reg.add(reg4);
- reg.subtract(reg5);
- box = reg.getBounds();
- if (!box.equals(new Rectangle(0,20,60,15))) {
- reg.dispose();
- reg1.dispose();
- reg4.dispose();
- reg5.dispose();
- fail("subtract failed 5");
- }
- reg.dispose();
- reg1.dispose();
- reg4.dispose();
- reg5.dispose();
-}
-
-public void test_toString() {
- Region reg = new Region(display);
-
- String s = reg.toString();
-
- if (s == null || s.length() == 0) {
- fail("toString returns null or empty string");
- }
-
- reg.add(new Rectangle(1,1,10,20));
- s = reg.toString();
-
- if (s == null || s.length() == 0) {
- fail("toString returns null or empty string");
- }
-
- reg.dispose();
- s = reg.toString();
-
- if (s == null || s.length() == 0) {
- fail("toString returns null or empty string");
- }
-}
-
-public void test_win32_newLorg_eclipse_swt_graphics_DeviceI() {
- if (SWT.getPlatform().equals("win32")) {
- warnUnimpl("Test test_win32_newLorg_eclipse_swt_graphics_DeviceI not written");
- }
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_graphics_Region((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_Constructor");
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_graphics_Device");
- methodNames.addElement("test_add$I");
- methodNames.addElement("test_addLorg_eclipse_swt_graphics_Rectangle");
- methodNames.addElement("test_addLorg_eclipse_swt_graphics_Region");
- methodNames.addElement("test_containsII");
- methodNames.addElement("test_containsLorg_eclipse_swt_graphics_Point");
- methodNames.addElement("test_dispose");
- methodNames.addElement("test_equalsLjava_lang_Object");
- methodNames.addElement("test_getBounds");
- methodNames.addElement("test_hashCode");
- methodNames.addElement("test_intersectLorg_eclipse_swt_graphics_Rectangle");
- methodNames.addElement("test_intersectLorg_eclipse_swt_graphics_Region");
- methodNames.addElement("test_intersectsIIII");
- methodNames.addElement("test_intersectsLorg_eclipse_swt_graphics_Rectangle");
- methodNames.addElement("test_isDisposed");
- methodNames.addElement("test_isEmpty");
- methodNames.addElement("test_subtract$I");
- methodNames.addElement("test_subtractLorg_eclipse_swt_graphics_Rectangle");
- methodNames.addElement("test_subtractLorg_eclipse_swt_graphics_Region");
- methodNames.addElement("test_toString");
- methodNames.addElement("test_win32_newLorg_eclipse_swt_graphics_DeviceI");
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_Constructor")) test_Constructor();
- else if (getName().equals("test_ConstructorLorg_eclipse_swt_graphics_Device")) test_ConstructorLorg_eclipse_swt_graphics_Device();
- else if (getName().equals("test_add$I")) test_add$I();
- else if (getName().equals("test_addLorg_eclipse_swt_graphics_Rectangle")) test_addLorg_eclipse_swt_graphics_Rectangle();
- else if (getName().equals("test_addLorg_eclipse_swt_graphics_Region")) test_addLorg_eclipse_swt_graphics_Region();
- else if (getName().equals("test_containsII")) test_containsII();
- else if (getName().equals("test_containsLorg_eclipse_swt_graphics_Point")) test_containsLorg_eclipse_swt_graphics_Point();
- else if (getName().equals("test_dispose")) test_dispose();
- else if (getName().equals("test_equalsLjava_lang_Object")) test_equalsLjava_lang_Object();
- else if (getName().equals("test_getBounds")) test_getBounds();
- else if (getName().equals("test_hashCode")) test_hashCode();
- else if (getName().equals("test_intersectLorg_eclipse_swt_graphics_Rectangle")) test_intersectLorg_eclipse_swt_graphics_Rectangle();
- else if (getName().equals("test_intersectLorg_eclipse_swt_graphics_Region")) test_intersectLorg_eclipse_swt_graphics_Region();
- else if (getName().equals("test_intersectsIIII")) test_intersectsIIII();
- else if (getName().equals("test_intersectsLorg_eclipse_swt_graphics_Rectangle")) test_intersectsLorg_eclipse_swt_graphics_Rectangle();
- else if (getName().equals("test_isDisposed")) test_isDisposed();
- else if (getName().equals("test_isEmpty")) test_isEmpty();
- else if (getName().equals("test_subtract$I")) test_subtract$I();
- else if (getName().equals("test_subtractLorg_eclipse_swt_graphics_Rectangle")) test_subtractLorg_eclipse_swt_graphics_Rectangle();
- else if (getName().equals("test_subtractLorg_eclipse_swt_graphics_Region")) test_subtractLorg_eclipse_swt_graphics_Region();
- else if (getName().equals("test_toString")) test_toString();
- else if (getName().equals("test_win32_newLorg_eclipse_swt_graphics_DeviceI")) test_win32_newLorg_eclipse_swt_graphics_DeviceI();
-}
-
-/* custom */
- Display display;
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_layout_FillLayout.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_layout_FillLayout.java
deleted file mode 100644
index 7ce0f706d4..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_layout_FillLayout.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.layout.FillLayout
- *
- * @see org.eclipse.swt.layout.FillLayout
- */
-public class Test_org_eclipse_swt_layout_FillLayout extends Test_org_eclipse_swt_widgets_Layout {
-
-public Test_org_eclipse_swt_layout_FillLayout(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- super.setUp();
-}
-
-protected void tearDown() {
- super.tearDown();
-}
-
-public void test_Constructor() {
- warnUnimpl("Test test_Constructor not written");
-}
-
-public void test_ConstructorI() {
- warnUnimpl("Test test_ConstructorI not written");
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_layout_FillLayout((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_Constructor");
- methodNames.addElement("test_ConstructorI");
- methodNames.addAll(Test_org_eclipse_swt_widgets_Layout.methodNames()); // add superclass method names
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_Constructor")) test_Constructor();
- else if (getName().equals("test_ConstructorI")) test_ConstructorI();
- else super.runTest();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_layout_FormAttachment.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_layout_FormAttachment.java
deleted file mode 100644
index 80add7819b..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_layout_FormAttachment.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.layout.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.layout.FormAttachment
- *
- * @see org.eclipse.swt.layout.FormAttachment
- */
-public class Test_org_eclipse_swt_layout_FormAttachment extends SwtTestCase {
-
-public Test_org_eclipse_swt_layout_FormAttachment(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- shell = new Shell();
-}
-
-protected void tearDown() {
- shell.dispose();
-}
-
-public void test_ConstructorI() {
- FormAttachment attachment = new FormAttachment(50);
- assertNotNull(attachment);
-}
-
-public void test_ConstructorII() {
- FormAttachment attachment = new FormAttachment(50, 10);
- assertNotNull(attachment);
-}
-
-public void test_ConstructorIII() {
- FormAttachment attachment = new FormAttachment(50, 100, 10);
- assertNotNull(attachment);
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_Control() {
- FormAttachment attachment = new FormAttachment(shell);
- assertNotNull(attachment);
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_ControlI() {
- FormAttachment attachment = new FormAttachment(shell, 10);
- assertNotNull(attachment);
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_ControlII() {
- FormAttachment attachment = new FormAttachment(shell, 10, SWT.LEFT);
- assertNotNull(attachment);
-}
-
-public void test_toString() {
- FormAttachment attachment = new FormAttachment(50);
- assertNotNull(attachment.toString());
- assertTrue(attachment.toString().length() > 0);
-}
-
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_layout_FormAttachment((String)e.nextElement()));
- }
- return suite;
-}
-
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorI");
- methodNames.addElement("test_ConstructorII");
- methodNames.addElement("test_ConstructorIII");
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_Control");
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_ControlI");
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_ControlII");
- methodNames.addElement("test_toString");
- return methodNames;
-}
-
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorI")) test_ConstructorI();
- else if (getName().equals("test_ConstructorII")) test_ConstructorII();
- else if (getName().equals("test_ConstructorIII")) test_ConstructorIII();
- else if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_Control")) test_ConstructorLorg_eclipse_swt_widgets_Control();
- else if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_ControlI")) test_ConstructorLorg_eclipse_swt_widgets_ControlI();
- else if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_ControlII")) test_ConstructorLorg_eclipse_swt_widgets_ControlII();
- else if (getName().equals("test_toString")) test_toString();
-}
-
-/* custom */
-public Shell shell;
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_layout_FormData.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_layout_FormData.java
deleted file mode 100644
index a7a74925e9..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_layout_FormData.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.layout.FormData
- *
- * @see org.eclipse.swt.layout.FormData
- */
-public class Test_org_eclipse_swt_layout_FormData extends SwtTestCase {
-
-public Test_org_eclipse_swt_layout_FormData(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
-}
-
-protected void tearDown() {
-}
-
-public void test_Constructor() {
- warnUnimpl("Test test_Constructor not written");
-}
-
-public void test_ConstructorII() {
- warnUnimpl("Test test_ConstructorII not written");
-}
-
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_layout_FormData((String)e.nextElement()));
- }
- return suite;
-}
-
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_Constructor");
- methodNames.addElement("test_ConstructorII");
- return methodNames;
-}
-
-protected void runTest() throws Throwable {
- if (getName().equals("test_Constructor")) test_Constructor();
- else if (getName().equals("test_ConstructorII")) test_ConstructorII();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_layout_FormLayout.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_layout_FormLayout.java
deleted file mode 100644
index 53e0364830..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_layout_FormLayout.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.layout.FormLayout
- *
- * @see org.eclipse.swt.layout.FormLayout
- */
-public class Test_org_eclipse_swt_layout_FormLayout extends Test_org_eclipse_swt_widgets_Layout {
-
-public Test_org_eclipse_swt_layout_FormLayout(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- super.setUp();
-}
-
-protected void tearDown() {
- super.tearDown();
-}
-
-public void test_Constructor() {
- warnUnimpl("Test test_Constructor not written");
-}
-
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_layout_FormLayout((String)e.nextElement()));
- }
- return suite;
-}
-
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_Constructor");
- methodNames.addAll(Test_org_eclipse_swt_widgets_Layout.methodNames()); // add superclass method names
- return methodNames;
-}
-
-protected void runTest() throws Throwable {
- if (getName().equals("test_Constructor")) test_Constructor();
- else super.runTest();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_layout_GridData.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_layout_GridData.java
deleted file mode 100644
index c2e4092930..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_layout_GridData.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import junit.framework.*;
-import junit.textui.*;
-import org.eclipse.swt.*;
-import org.eclipse.swt.layout.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.layout.GridData
- *
- * @see org.eclipse.swt.layout.GridData
- */
-public class Test_org_eclipse_swt_layout_GridData extends SwtTestCase {
-
-public Test_org_eclipse_swt_layout_GridData(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
-}
-
-protected void tearDown() {
-}
-
-public void test_Constructor() {
- GridData data = new GridData();
- assertNotNull(data);
- assertTrue(data.verticalAlignment == GridData.CENTER);
- assertTrue(data.horizontalAlignment == GridData.BEGINNING);
- assertTrue(data.widthHint == SWT.DEFAULT);
- assertTrue(data.heightHint == SWT.DEFAULT);
- assertTrue(data.horizontalIndent == 0);
- assertTrue(data.horizontalSpan == 1);
- assertTrue(data.verticalSpan == 1);
- assertTrue(data.grabExcessHorizontalSpace == false);
- assertTrue(data.grabExcessVerticalSpace == false);
-}
-
-public void test_ConstructorI() {
- GridData data = new GridData(GridData.FILL_BOTH);
- assertNotNull(data);
- assertTrue(data.verticalAlignment == GridData.FILL);
- assertTrue(data.horizontalAlignment == GridData.FILL);
- assertTrue(data.grabExcessHorizontalSpace == true);
- assertTrue(data.grabExcessVerticalSpace == true);
-}
-
-public void test_ConstructorII() {
- GridData data = new GridData(100, 100);
- assertNotNull(data);
- assertTrue(data.widthHint == 100);
- assertTrue(data.heightHint == 100);
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_layout_GridData((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_Constructor");
- methodNames.addElement("test_ConstructorI");
- methodNames.addElement("test_ConstructorII");
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_Constructor")) test_Constructor();
- else if (getName().equals("test_ConstructorI")) test_ConstructorI();
- else if (getName().equals("test_ConstructorII")) test_ConstructorII();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_layout_GridLayout.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_layout_GridLayout.java
deleted file mode 100644
index bc799f93a1..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_layout_GridLayout.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.layout.GridLayout
- *
- * @see org.eclipse.swt.layout.GridLayout
- */
-public class Test_org_eclipse_swt_layout_GridLayout extends Test_org_eclipse_swt_widgets_Layout {
-
-public Test_org_eclipse_swt_layout_GridLayout(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- super.setUp();
-}
-
-protected void tearDown() {
- super.tearDown();
-}
-
-public void test_Constructor() {
- warnUnimpl("Test test_Constructor not written");
-}
-
-public void test_ConstructorIZ() {
- warnUnimpl("Test test_ConstructorIZ not written");
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_layout_GridLayout((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_Constructor");
- methodNames.addElement("test_ConstructorIZ");
- methodNames.addAll(Test_org_eclipse_swt_widgets_Layout.methodNames()); // add superclass method names
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_Constructor")) test_Constructor();
- else if (getName().equals("test_ConstructorIZ")) test_ConstructorIZ();
- else super.runTest();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_layout_RowData.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_layout_RowData.java
deleted file mode 100644
index a5c3e0c8e1..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_layout_RowData.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.layout.RowData
- *
- * @see org.eclipse.swt.layout.RowData
- */
-public class Test_org_eclipse_swt_layout_RowData extends SwtTestCase {
-
-public Test_org_eclipse_swt_layout_RowData(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
-}
-
-protected void tearDown() {
-}
-
-public void test_Constructor() {
- warnUnimpl("Test test_Constructor not written");
-}
-
-public void test_ConstructorII() {
- warnUnimpl("Test test_ConstructorII not written");
-}
-
-public void test_ConstructorLorg_eclipse_swt_graphics_Point() {
- warnUnimpl("Test test_ConstructorLorg_eclipse_swt_graphics_Point not written");
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_layout_RowData((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_Constructor");
- methodNames.addElement("test_ConstructorII");
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_graphics_Point");
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_Constructor")) test_Constructor();
- else if (getName().equals("test_ConstructorII")) test_ConstructorII();
- else if (getName().equals("test_ConstructorLorg_eclipse_swt_graphics_Point")) test_ConstructorLorg_eclipse_swt_graphics_Point();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_layout_RowLayout.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_layout_RowLayout.java
deleted file mode 100644
index 965d11285a..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_layout_RowLayout.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.layout.RowLayout
- *
- * @see org.eclipse.swt.layout.RowLayout
- */
-public class Test_org_eclipse_swt_layout_RowLayout extends Test_org_eclipse_swt_widgets_Layout {
-
-public Test_org_eclipse_swt_layout_RowLayout(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- super.setUp();
-}
-
-protected void tearDown() {
- super.tearDown();
-}
-
-public void test_Constructor() {
- warnUnimpl("Test test_Constructor not written");
-}
-
-public void test_ConstructorI() {
- warnUnimpl("Test test_ConstructorI not written");
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_layout_RowLayout((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_Constructor");
- methodNames.addElement("test_ConstructorI");
- methodNames.addAll(Test_org_eclipse_swt_widgets_Layout.methodNames()); // add superclass method names
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_Constructor")) test_Constructor();
- else if (getName().equals("test_ConstructorI")) test_ConstructorI();
- else super.runTest();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_ole_win32_OLE.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_ole_win32_OLE.java
deleted file mode 100644
index 4b172da642..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_ole_win32_OLE.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.ole.win32.OLE
- *
- * @see org.eclipse.swt.ole.win32.OLE
- */
-public class Test_org_eclipse_swt_ole_win32_OLE extends Test_org_eclipse_swt_SWT {
-
-public Test_org_eclipse_swt_ole_win32_OLE(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- super.setUp();
-}
-
-protected void tearDown() {
- super.tearDown();
-}
-
-public void test_Constructor() {
- warnUnimpl("Test test_Constructor not written");
-}
-
-public void test_errorI() {
- warnUnimpl("Test test_errorI not written");
-}
-
-public void test_errorII() {
- warnUnimpl("Test test_errorII not written");
-}
-
-public void test_findProgramIDLjava_lang_String() {
- warnUnimpl("Test test_findProgramIDLjava_lang_String not written");
-}
-
-public void test_isOleFileLjava_io_File() {
- warnUnimpl("Test test_isOleFileLjava_io_File not written");
-}
-
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_ole_win32_OLE((String)e.nextElement()));
- }
- return suite;
-}
-
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_Constructor");
- methodNames.addElement("test_errorI");
- methodNames.addElement("test_errorII");
- methodNames.addElement("test_findProgramIDLjava_lang_String");
- methodNames.addElement("test_isOleFileLjava_io_File");
- methodNames.addAll(Test_org_eclipse_swt_SWT.methodNames()); // add superclass method names
- return methodNames;
-}
-
-protected void runTest() throws Throwable {
- if (getName().equals("test_Constructor")) test_Constructor();
- else if (getName().equals("test_errorI")) test_errorI();
- else if (getName().equals("test_errorII")) test_errorII();
- else if (getName().equals("test_findProgramIDLjava_lang_String")) test_findProgramIDLjava_lang_String();
- else if (getName().equals("test_isOleFileLjava_io_File")) test_isOleFileLjava_io_File();
- else super.runTest();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_ole_win32_OleAutomation.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_ole_win32_OleAutomation.java
deleted file mode 100644
index ded9ed39ef..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_ole_win32_OleAutomation.java
+++ /dev/null
@@ -1,187 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.ole.win32.OleAutomation
- *
- * @see org.eclipse.swt.ole.win32.OleAutomation
- */
-public class Test_org_eclipse_swt_ole_win32_OleAutomation extends SwtTestCase {
-
-public Test_org_eclipse_swt_ole_win32_OleAutomation(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
-}
-
-protected void tearDown() {
-}
-
-public void test_ConstructorLorg_eclipse_swt_ole_win32_OleClientSite() {
- warnUnimpl("Test test_ConstructorLorg_eclipse_swt_ole_win32_OleClientSite not written");
-}
-
-public void test_dispose() {
- warnUnimpl("Test test_dispose not written");
-}
-
-public void test_getDocumentationI() {
- warnUnimpl("Test test_getDocumentationI not written");
-}
-
-public void test_getFunctionDescriptionI() {
- warnUnimpl("Test test_getFunctionDescriptionI not written");
-}
-
-public void test_getHelpFileI() {
- warnUnimpl("Test test_getHelpFileI not written");
-}
-
-public void test_getIDsOfNames$Ljava_lang_String() {
- warnUnimpl("Test test_getIDsOfNames$Ljava_lang_String not written");
-}
-
-public void test_getLastError() {
- warnUnimpl("Test test_getLastError not written");
-}
-
-public void test_getNameI() {
- warnUnimpl("Test test_getNameI not written");
-}
-
-public void test_getNamesII() {
- warnUnimpl("Test test_getNamesII not written");
-}
-
-public void test_getPropertyDescriptionI() {
- warnUnimpl("Test test_getPropertyDescriptionI not written");
-}
-
-public void test_getPropertyI() {
- warnUnimpl("Test test_getPropertyI not written");
-}
-
-public void test_getPropertyI$Lorg_eclipse_swt_ole_win32_Variant() {
- warnUnimpl("Test test_getPropertyI$Lorg_eclipse_swt_ole_win32_Variant not written");
-}
-
-public void test_getPropertyI$Lorg_eclipse_swt_ole_win32_Variant$I() {
- warnUnimpl("Test test_getPropertyI$Lorg_eclipse_swt_ole_win32_Variant$I not written");
-}
-
-public void test_getTypeInfoAttributes() {
- warnUnimpl("Test test_getTypeInfoAttributes not written");
-}
-
-public void test_invokeI() {
- warnUnimpl("Test test_invokeI not written");
-}
-
-public void test_invokeI$Lorg_eclipse_swt_ole_win32_Variant() {
- warnUnimpl("Test test_invokeI$Lorg_eclipse_swt_ole_win32_Variant not written");
-}
-
-public void test_invokeI$Lorg_eclipse_swt_ole_win32_Variant$I() {
- warnUnimpl("Test test_invokeI$Lorg_eclipse_swt_ole_win32_Variant$I not written");
-}
-
-public void test_invokeNoReplyI() {
- warnUnimpl("Test test_invokeNoReplyI not written");
-}
-
-public void test_invokeNoReplyI$Lorg_eclipse_swt_ole_win32_Variant() {
- warnUnimpl("Test test_invokeNoReplyI$Lorg_eclipse_swt_ole_win32_Variant not written");
-}
-
-public void test_invokeNoReplyI$Lorg_eclipse_swt_ole_win32_Variant$I() {
- warnUnimpl("Test test_invokeNoReplyI$Lorg_eclipse_swt_ole_win32_Variant$I not written");
-}
-
-public void test_setPropertyI$Lorg_eclipse_swt_ole_win32_Variant() {
- warnUnimpl("Test test_setPropertyI$Lorg_eclipse_swt_ole_win32_Variant not written");
-}
-
-public void test_setPropertyILorg_eclipse_swt_ole_win32_Variant() {
- warnUnimpl("Test test_setPropertyILorg_eclipse_swt_ole_win32_Variant not written");
-}
-
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_ole_win32_OleAutomation((String)e.nextElement()));
- }
- return suite;
-}
-
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_ole_win32_OleClientSite");
- methodNames.addElement("test_dispose");
- methodNames.addElement("test_getDocumentationI");
- methodNames.addElement("test_getFunctionDescriptionI");
- methodNames.addElement("test_getHelpFileI");
- methodNames.addElement("test_getIDsOfNames$Ljava_lang_String");
- methodNames.addElement("test_getLastError");
- methodNames.addElement("test_getNameI");
- methodNames.addElement("test_getNamesII");
- methodNames.addElement("test_getPropertyDescriptionI");
- methodNames.addElement("test_getPropertyI");
- methodNames.addElement("test_getPropertyI$Lorg_eclipse_swt_ole_win32_Variant");
- methodNames.addElement("test_getPropertyI$Lorg_eclipse_swt_ole_win32_Variant$I");
- methodNames.addElement("test_getTypeInfoAttributes");
- methodNames.addElement("test_invokeI");
- methodNames.addElement("test_invokeI$Lorg_eclipse_swt_ole_win32_Variant");
- methodNames.addElement("test_invokeI$Lorg_eclipse_swt_ole_win32_Variant$I");
- methodNames.addElement("test_invokeNoReplyI");
- methodNames.addElement("test_invokeNoReplyI$Lorg_eclipse_swt_ole_win32_Variant");
- methodNames.addElement("test_invokeNoReplyI$Lorg_eclipse_swt_ole_win32_Variant$I");
- methodNames.addElement("test_setPropertyI$Lorg_eclipse_swt_ole_win32_Variant");
- methodNames.addElement("test_setPropertyILorg_eclipse_swt_ole_win32_Variant");
- return methodNames;
-}
-
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLorg_eclipse_swt_ole_win32_OleClientSite")) test_ConstructorLorg_eclipse_swt_ole_win32_OleClientSite();
- else if (getName().equals("test_dispose")) test_dispose();
- else if (getName().equals("test_getDocumentationI")) test_getDocumentationI();
- else if (getName().equals("test_getFunctionDescriptionI")) test_getFunctionDescriptionI();
- else if (getName().equals("test_getHelpFileI")) test_getHelpFileI();
- else if (getName().equals("test_getIDsOfNames$Ljava_lang_String")) test_getIDsOfNames$Ljava_lang_String();
- else if (getName().equals("test_getLastError")) test_getLastError();
- else if (getName().equals("test_getNameI")) test_getNameI();
- else if (getName().equals("test_getNamesII")) test_getNamesII();
- else if (getName().equals("test_getPropertyDescriptionI")) test_getPropertyDescriptionI();
- else if (getName().equals("test_getPropertyI")) test_getPropertyI();
- else if (getName().equals("test_getPropertyI$Lorg_eclipse_swt_ole_win32_Variant")) test_getPropertyI$Lorg_eclipse_swt_ole_win32_Variant();
- else if (getName().equals("test_getPropertyI$Lorg_eclipse_swt_ole_win32_Variant$I")) test_getPropertyI$Lorg_eclipse_swt_ole_win32_Variant$I();
- else if (getName().equals("test_getTypeInfoAttributes")) test_getTypeInfoAttributes();
- else if (getName().equals("test_invokeI")) test_invokeI();
- else if (getName().equals("test_invokeI$Lorg_eclipse_swt_ole_win32_Variant")) test_invokeI$Lorg_eclipse_swt_ole_win32_Variant();
- else if (getName().equals("test_invokeI$Lorg_eclipse_swt_ole_win32_Variant$I")) test_invokeI$Lorg_eclipse_swt_ole_win32_Variant$I();
- else if (getName().equals("test_invokeNoReplyI")) test_invokeNoReplyI();
- else if (getName().equals("test_invokeNoReplyI$Lorg_eclipse_swt_ole_win32_Variant")) test_invokeNoReplyI$Lorg_eclipse_swt_ole_win32_Variant();
- else if (getName().equals("test_invokeNoReplyI$Lorg_eclipse_swt_ole_win32_Variant$I")) test_invokeNoReplyI$Lorg_eclipse_swt_ole_win32_Variant$I();
- else if (getName().equals("test_setPropertyI$Lorg_eclipse_swt_ole_win32_Variant")) test_setPropertyI$Lorg_eclipse_swt_ole_win32_Variant();
- else if (getName().equals("test_setPropertyILorg_eclipse_swt_ole_win32_Variant")) test_setPropertyILorg_eclipse_swt_ole_win32_Variant();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_ole_win32_OleClientSite.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_ole_win32_OleClientSite.java
deleted file mode 100644
index e5b2c59465..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_ole_win32_OleClientSite.java
+++ /dev/null
@@ -1,143 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.ole.win32.OleClientSite
- *
- * @see org.eclipse.swt.ole.win32.OleClientSite
- */
-public class Test_org_eclipse_swt_ole_win32_OleClientSite extends Test_org_eclipse_swt_widgets_Composite {
-
-public Test_org_eclipse_swt_ole_win32_OleClientSite(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- super.setUp();
-}
-
-protected void tearDown() {
- super.tearDown();
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_CompositeILjava_io_File() {
- warnUnimpl("Test test_ConstructorLorg_eclipse_swt_widgets_CompositeILjava_io_File not written");
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_CompositeILjava_lang_String() {
- warnUnimpl("Test test_ConstructorLorg_eclipse_swt_widgets_CompositeILjava_lang_String not written");
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_CompositeILjava_lang_StringLjava_io_File() {
- warnUnimpl("Test test_ConstructorLorg_eclipse_swt_widgets_CompositeILjava_lang_StringLjava_io_File not written");
-}
-
-public void test_deactivateInPlaceClient() {
- warnUnimpl("Test test_deactivateInPlaceClient not written");
-}
-
-public void test_doVerbI() {
- warnUnimpl("Test test_doVerbI not written");
-}
-
-public void test_execIILorg_eclipse_swt_ole_win32_VariantLorg_eclipse_swt_ole_win32_Variant() {
- warnUnimpl("Test test_execIILorg_eclipse_swt_ole_win32_VariantLorg_eclipse_swt_ole_win32_Variant not written");
-}
-
-public void test_getIndent() {
- warnUnimpl("Test test_getIndent not written");
-}
-
-public void test_getProgramID() {
- warnUnimpl("Test test_getProgramID not written");
-}
-
-public void test_isDirty() {
- warnUnimpl("Test test_isDirty not written");
-}
-
-public void test_isFocusControl() {
- warnUnimpl("Test test_isFocusControl not written");
-}
-
-public void test_queryStatusI() {
- warnUnimpl("Test test_queryStatusI not written");
-}
-
-public void test_saveLjava_io_FileZ() {
- warnUnimpl("Test test_saveLjava_io_FileZ not written");
-}
-
-public void test_setIndentLorg_eclipse_swt_graphics_Rectangle() {
- warnUnimpl("Test test_setIndentLorg_eclipse_swt_graphics_Rectangle not written");
-}
-
-public void test_showPropertiesLjava_lang_String() {
- warnUnimpl("Test test_showPropertiesLjava_lang_String not written");
-}
-
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_ole_win32_OleClientSite((String)e.nextElement()));
- }
- return suite;
-}
-
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_CompositeILjava_io_File");
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_CompositeILjava_lang_String");
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_CompositeILjava_lang_StringLjava_io_File");
- methodNames.addElement("test_deactivateInPlaceClient");
- methodNames.addElement("test_doVerbI");
- methodNames.addElement("test_execIILorg_eclipse_swt_ole_win32_VariantLorg_eclipse_swt_ole_win32_Variant");
- methodNames.addElement("test_getIndent");
- methodNames.addElement("test_getProgramID");
- methodNames.addElement("test_isDirty");
- methodNames.addElement("test_isFocusControl");
- methodNames.addElement("test_queryStatusI");
- methodNames.addElement("test_saveLjava_io_FileZ");
- methodNames.addElement("test_setIndentLorg_eclipse_swt_graphics_Rectangle");
- methodNames.addElement("test_showPropertiesLjava_lang_String");
- methodNames.addAll(Test_org_eclipse_swt_widgets_Composite.methodNames()); // add superclass method names
- return methodNames;
-}
-
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_CompositeILjava_io_File")) test_ConstructorLorg_eclipse_swt_widgets_CompositeILjava_io_File();
- else if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_CompositeILjava_lang_String")) test_ConstructorLorg_eclipse_swt_widgets_CompositeILjava_lang_String();
- else if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_CompositeILjava_lang_StringLjava_io_File")) test_ConstructorLorg_eclipse_swt_widgets_CompositeILjava_lang_StringLjava_io_File();
- else if (getName().equals("test_deactivateInPlaceClient")) test_deactivateInPlaceClient();
- else if (getName().equals("test_doVerbI")) test_doVerbI();
- else if (getName().equals("test_execIILorg_eclipse_swt_ole_win32_VariantLorg_eclipse_swt_ole_win32_Variant")) test_execIILorg_eclipse_swt_ole_win32_VariantLorg_eclipse_swt_ole_win32_Variant();
- else if (getName().equals("test_getIndent")) test_getIndent();
- else if (getName().equals("test_getProgramID")) test_getProgramID();
- else if (getName().equals("test_isDirty")) test_isDirty();
- else if (getName().equals("test_isFocusControl")) test_isFocusControl();
- else if (getName().equals("test_queryStatusI")) test_queryStatusI();
- else if (getName().equals("test_saveLjava_io_FileZ")) test_saveLjava_io_FileZ();
- else if (getName().equals("test_setIndentLorg_eclipse_swt_graphics_Rectangle")) test_setIndentLorg_eclipse_swt_graphics_Rectangle();
- else if (getName().equals("test_showPropertiesLjava_lang_String")) test_showPropertiesLjava_lang_String();
- else super.runTest();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_ole_win32_OleControlSite.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_ole_win32_OleControlSite.java
deleted file mode 100644
index bb3e732f2e..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_ole_win32_OleControlSite.java
+++ /dev/null
@@ -1,155 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.ole.win32.OleControlSite
- *
- * @see org.eclipse.swt.ole.win32.OleControlSite
- */
-public class Test_org_eclipse_swt_ole_win32_OleControlSite extends Test_org_eclipse_swt_ole_win32_OleClientSite {
-
-public Test_org_eclipse_swt_ole_win32_OleControlSite(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- super.setUp();
-}
-
-protected void tearDown() {
- super.tearDown();
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_CompositeILjava_lang_String() {
- warnUnimpl("Test test_ConstructorLorg_eclipse_swt_widgets_CompositeILjava_lang_String not written");
-}
-
-public void test_addEventListenerILorg_eclipse_swt_ole_win32_OleListener() {
- warnUnimpl("Test test_addEventListenerILorg_eclipse_swt_ole_win32_OleListener not written");
-}
-
-public void test_addEventListenerLorg_eclipse_swt_ole_win32_OleAutomationILorg_eclipse_swt_ole_win32_OleListener() {
- warnUnimpl("Test test_addEventListenerLorg_eclipse_swt_ole_win32_OleAutomationILorg_eclipse_swt_ole_win32_OleListener not written");
-}
-
-public void test_addPropertyListenerILorg_eclipse_swt_ole_win32_OleListener() {
- warnUnimpl("Test test_addPropertyListenerILorg_eclipse_swt_ole_win32_OleListener not written");
-}
-
-public void test_getBackground() {
- warnUnimpl("Test test_getBackground not written");
-}
-
-public void test_getFont() {
- warnUnimpl("Test test_getFont not written");
-}
-
-public void test_getForeground() {
- warnUnimpl("Test test_getForeground not written");
-}
-
-public void test_getSitePropertyI() {
- warnUnimpl("Test test_getSitePropertyI not written");
-}
-
-public void test_removeEventListenerILorg_eclipse_swt_ole_win32_OleListener() {
- warnUnimpl("Test test_removeEventListenerILorg_eclipse_swt_ole_win32_OleListener not written");
-}
-
-public void test_removeEventListenerLorg_eclipse_swt_ole_win32_OleAutomationILorg_eclipse_swt_ole_win32_OleListener() {
- warnUnimpl("Test test_removeEventListenerLorg_eclipse_swt_ole_win32_OleAutomationILorg_eclipse_swt_ole_win32_OleListener not written");
-}
-
-public void test_removeEventListenerLorg_eclipse_swt_ole_win32_OleAutomationLorg_eclipse_swt_internal_ole_win32_GUIDILorg_eclipse_swt_ole_win32_OleListener() {
- warnUnimpl("Test test_removeEventListenerLorg_eclipse_swt_ole_win32_OleAutomationLorg_eclipse_swt_internal_ole_win32_GUIDILorg_eclipse_swt_ole_win32_OleListener not written");
-}
-
-public void test_removePropertyListenerILorg_eclipse_swt_ole_win32_OleListener() {
- warnUnimpl("Test test_removePropertyListenerILorg_eclipse_swt_ole_win32_OleListener not written");
-}
-
-public void test_setBackgroundLorg_eclipse_swt_graphics_Color() {
- warnUnimpl("Test test_setBackgroundLorg_eclipse_swt_graphics_Color not written");
-}
-
-public void test_setFontLorg_eclipse_swt_graphics_Font() {
- warnUnimpl("Test test_setFontLorg_eclipse_swt_graphics_Font not written");
-}
-
-public void test_setForegroundLorg_eclipse_swt_graphics_Color() {
- warnUnimpl("Test test_setForegroundLorg_eclipse_swt_graphics_Color not written");
-}
-
-public void test_setSitePropertyILorg_eclipse_swt_ole_win32_Variant() {
- warnUnimpl("Test test_setSitePropertyILorg_eclipse_swt_ole_win32_Variant not written");
-}
-
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_ole_win32_OleControlSite((String)e.nextElement()));
- }
- return suite;
-}
-
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_CompositeILjava_lang_String");
- methodNames.addElement("test_addEventListenerILorg_eclipse_swt_ole_win32_OleListener");
- methodNames.addElement("test_addEventListenerLorg_eclipse_swt_ole_win32_OleAutomationILorg_eclipse_swt_ole_win32_OleListener");
- methodNames.addElement("test_addPropertyListenerILorg_eclipse_swt_ole_win32_OleListener");
- methodNames.addElement("test_getBackground");
- methodNames.addElement("test_getFont");
- methodNames.addElement("test_getForeground");
- methodNames.addElement("test_getSitePropertyI");
- methodNames.addElement("test_removeEventListenerILorg_eclipse_swt_ole_win32_OleListener");
- methodNames.addElement("test_removeEventListenerLorg_eclipse_swt_ole_win32_OleAutomationILorg_eclipse_swt_ole_win32_OleListener");
- methodNames.addElement("test_removeEventListenerLorg_eclipse_swt_ole_win32_OleAutomationLorg_eclipse_swt_internal_ole_win32_GUIDILorg_eclipse_swt_ole_win32_OleListener");
- methodNames.addElement("test_removePropertyListenerILorg_eclipse_swt_ole_win32_OleListener");
- methodNames.addElement("test_setBackgroundLorg_eclipse_swt_graphics_Color");
- methodNames.addElement("test_setFontLorg_eclipse_swt_graphics_Font");
- methodNames.addElement("test_setForegroundLorg_eclipse_swt_graphics_Color");
- methodNames.addElement("test_setSitePropertyILorg_eclipse_swt_ole_win32_Variant");
- methodNames.addAll(Test_org_eclipse_swt_ole_win32_OleClientSite.methodNames()); // add superclass method names
- return methodNames;
-}
-
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_CompositeILjava_lang_String")) test_ConstructorLorg_eclipse_swt_widgets_CompositeILjava_lang_String();
- else if (getName().equals("test_addEventListenerILorg_eclipse_swt_ole_win32_OleListener")) test_addEventListenerILorg_eclipse_swt_ole_win32_OleListener();
- else if (getName().equals("test_addEventListenerLorg_eclipse_swt_ole_win32_OleAutomationILorg_eclipse_swt_ole_win32_OleListener")) test_addEventListenerLorg_eclipse_swt_ole_win32_OleAutomationILorg_eclipse_swt_ole_win32_OleListener();
- else if (getName().equals("test_addPropertyListenerILorg_eclipse_swt_ole_win32_OleListener")) test_addPropertyListenerILorg_eclipse_swt_ole_win32_OleListener();
- else if (getName().equals("test_getBackground")) test_getBackground();
- else if (getName().equals("test_getFont")) test_getFont();
- else if (getName().equals("test_getForeground")) test_getForeground();
- else if (getName().equals("test_getSitePropertyI")) test_getSitePropertyI();
- else if (getName().equals("test_removeEventListenerILorg_eclipse_swt_ole_win32_OleListener")) test_removeEventListenerILorg_eclipse_swt_ole_win32_OleListener();
- else if (getName().equals("test_removeEventListenerLorg_eclipse_swt_ole_win32_OleAutomationILorg_eclipse_swt_ole_win32_OleListener")) test_removeEventListenerLorg_eclipse_swt_ole_win32_OleAutomationILorg_eclipse_swt_ole_win32_OleListener();
- else if (getName().equals("test_removeEventListenerLorg_eclipse_swt_ole_win32_OleAutomationLorg_eclipse_swt_internal_ole_win32_GUIDILorg_eclipse_swt_ole_win32_OleListener")) test_removeEventListenerLorg_eclipse_swt_ole_win32_OleAutomationLorg_eclipse_swt_internal_ole_win32_GUIDILorg_eclipse_swt_ole_win32_OleListener();
- else if (getName().equals("test_removePropertyListenerILorg_eclipse_swt_ole_win32_OleListener")) test_removePropertyListenerILorg_eclipse_swt_ole_win32_OleListener();
- else if (getName().equals("test_setBackgroundLorg_eclipse_swt_graphics_Color")) test_setBackgroundLorg_eclipse_swt_graphics_Color();
- else if (getName().equals("test_setFontLorg_eclipse_swt_graphics_Font")) test_setFontLorg_eclipse_swt_graphics_Font();
- else if (getName().equals("test_setForegroundLorg_eclipse_swt_graphics_Color")) test_setForegroundLorg_eclipse_swt_graphics_Color();
- else if (getName().equals("test_setSitePropertyILorg_eclipse_swt_ole_win32_Variant")) test_setSitePropertyILorg_eclipse_swt_ole_win32_Variant();
- else super.runTest();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_ole_win32_OleEvent.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_ole_win32_OleEvent.java
deleted file mode 100644
index 8ce7d71899..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_ole_win32_OleEvent.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.ole.win32.OleEvent
- *
- * @see org.eclipse.swt.ole.win32.OleEvent
- */
-public class Test_org_eclipse_swt_ole_win32_OleEvent extends SwtTestCase {
-
-public Test_org_eclipse_swt_ole_win32_OleEvent(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
-}
-
-protected void tearDown() {
-}
-
-public void test_Constructor() {
- warnUnimpl("Test test_Constructor not written");
-}
-
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_ole_win32_OleEvent((String)e.nextElement()));
- }
- return suite;
-}
-
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_Constructor");
- return methodNames;
-}
-
-protected void runTest() throws Throwable {
- if (getName().equals("test_Constructor")) test_Constructor();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_ole_win32_OleFrame.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_ole_win32_OleFrame.java
deleted file mode 100644
index aa60372d45..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_ole_win32_OleFrame.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.ole.win32.OleFrame
- *
- * @see org.eclipse.swt.ole.win32.OleFrame
- */
-public class Test_org_eclipse_swt_ole_win32_OleFrame extends Test_org_eclipse_swt_widgets_Composite {
-
-public Test_org_eclipse_swt_ole_win32_OleFrame(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- super.setUp();
-}
-
-protected void tearDown() {
- super.tearDown();
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_CompositeI() {
- warnUnimpl("Test test_ConstructorLorg_eclipse_swt_widgets_CompositeI not written");
-}
-
-public void test_getContainerMenus() {
- warnUnimpl("Test test_getContainerMenus not written");
-}
-
-public void test_getFileMenus() {
- warnUnimpl("Test test_getFileMenus not written");
-}
-
-public void test_getWindowMenus() {
- warnUnimpl("Test test_getWindowMenus not written");
-}
-
-public void test_setContainerMenus$Lorg_eclipse_swt_widgets_MenuItem() {
- warnUnimpl("Test test_setContainerMenus$Lorg_eclipse_swt_widgets_MenuItem not written");
-}
-
-public void test_setFileMenus$Lorg_eclipse_swt_widgets_MenuItem() {
- warnUnimpl("Test test_setFileMenus$Lorg_eclipse_swt_widgets_MenuItem not written");
-}
-
-public void test_setWindowMenus$Lorg_eclipse_swt_widgets_MenuItem() {
- warnUnimpl("Test test_setWindowMenus$Lorg_eclipse_swt_widgets_MenuItem not written");
-}
-
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_ole_win32_OleFrame((String)e.nextElement()));
- }
- return suite;
-}
-
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_CompositeI");
- methodNames.addElement("test_getContainerMenus");
- methodNames.addElement("test_getFileMenus");
- methodNames.addElement("test_getWindowMenus");
- methodNames.addElement("test_setContainerMenus$Lorg_eclipse_swt_widgets_MenuItem");
- methodNames.addElement("test_setFileMenus$Lorg_eclipse_swt_widgets_MenuItem");
- methodNames.addElement("test_setWindowMenus$Lorg_eclipse_swt_widgets_MenuItem");
- methodNames.addAll(Test_org_eclipse_swt_widgets_Composite.methodNames()); // add superclass method names
- return methodNames;
-}
-
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_CompositeI")) test_ConstructorLorg_eclipse_swt_widgets_CompositeI();
- else if (getName().equals("test_getContainerMenus")) test_getContainerMenus();
- else if (getName().equals("test_getFileMenus")) test_getFileMenus();
- else if (getName().equals("test_getWindowMenus")) test_getWindowMenus();
- else if (getName().equals("test_setContainerMenus$Lorg_eclipse_swt_widgets_MenuItem")) test_setContainerMenus$Lorg_eclipse_swt_widgets_MenuItem();
- else if (getName().equals("test_setFileMenus$Lorg_eclipse_swt_widgets_MenuItem")) test_setFileMenus$Lorg_eclipse_swt_widgets_MenuItem();
- else if (getName().equals("test_setWindowMenus$Lorg_eclipse_swt_widgets_MenuItem")) test_setWindowMenus$Lorg_eclipse_swt_widgets_MenuItem();
- else super.runTest();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_ole_win32_OleFunctionDescription.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_ole_win32_OleFunctionDescription.java
deleted file mode 100644
index 88a7cc84c1..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_ole_win32_OleFunctionDescription.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.ole.win32.OleFunctionDescription
- *
- * @see org.eclipse.swt.ole.win32.OleFunctionDescription
- */
-public class Test_org_eclipse_swt_ole_win32_OleFunctionDescription extends SwtTestCase {
-
-public Test_org_eclipse_swt_ole_win32_OleFunctionDescription(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
-}
-
-protected void tearDown() {
-}
-
-public void test_Constructor() {
- warnUnimpl("Test test_Constructor not written");
-}
-
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_ole_win32_OleFunctionDescription((String)e.nextElement()));
- }
- return suite;
-}
-
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_Constructor");
- return methodNames;
-}
-
-protected void runTest() throws Throwable {
- if (getName().equals("test_Constructor")) test_Constructor();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_ole_win32_OleListener.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_ole_win32_OleListener.java
deleted file mode 100644
index 0631da45f6..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_ole_win32_OleListener.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.ole.win32.OleListener
- *
- * @see org.eclipse.swt.ole.win32.OleListener
- */
-public class Test_org_eclipse_swt_ole_win32_OleListener extends SwtTestCase {
-
-public Test_org_eclipse_swt_ole_win32_OleListener(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
-}
-
-protected void tearDown() {
-}
-
-public void test_handleEventLorg_eclipse_swt_ole_win32_OleEvent() {
- warnUnimpl("Test test_handleEventLorg_eclipse_swt_ole_win32_OleEvent not written");
-}
-
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_ole_win32_OleListener((String)e.nextElement()));
- }
- return suite;
-}
-
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_handleEventLorg_eclipse_swt_ole_win32_OleEvent");
- return methodNames;
-}
-
-protected void runTest() throws Throwable {
- if (getName().equals("test_handleEventLorg_eclipse_swt_ole_win32_OleEvent")) test_handleEventLorg_eclipse_swt_ole_win32_OleEvent();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_ole_win32_OleParameterDescription.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_ole_win32_OleParameterDescription.java
deleted file mode 100644
index 55cfecea52..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_ole_win32_OleParameterDescription.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.ole.win32.OleParameterDescription
- *
- * @see org.eclipse.swt.ole.win32.OleParameterDescription
- */
-public class Test_org_eclipse_swt_ole_win32_OleParameterDescription extends SwtTestCase {
-
-public Test_org_eclipse_swt_ole_win32_OleParameterDescription(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
-}
-
-protected void tearDown() {
-}
-
-public void test_Constructor() {
- warnUnimpl("Test test_Constructor not written");
-}
-
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_ole_win32_OleParameterDescription((String)e.nextElement()));
- }
- return suite;
-}
-
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_Constructor");
- return methodNames;
-}
-
-protected void runTest() throws Throwable {
- if (getName().equals("test_Constructor")) test_Constructor();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_ole_win32_OlePropertyDescription.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_ole_win32_OlePropertyDescription.java
deleted file mode 100644
index 630e6d2987..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_ole_win32_OlePropertyDescription.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.ole.win32.OlePropertyDescription
- *
- * @see org.eclipse.swt.ole.win32.OlePropertyDescription
- */
-public class Test_org_eclipse_swt_ole_win32_OlePropertyDescription extends SwtTestCase {
-
-public Test_org_eclipse_swt_ole_win32_OlePropertyDescription(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
-}
-
-protected void tearDown() {
-}
-
-public void test_Constructor() {
- warnUnimpl("Test test_Constructor not written");
-}
-
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_ole_win32_OlePropertyDescription((String)e.nextElement()));
- }
- return suite;
-}
-
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_Constructor");
- return methodNames;
-}
-
-protected void runTest() throws Throwable {
- if (getName().equals("test_Constructor")) test_Constructor();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_ole_win32_Variant.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_ole_win32_Variant.java
deleted file mode 100644
index 98970c255b..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_ole_win32_Variant.java
+++ /dev/null
@@ -1,205 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.ole.win32.Variant
- *
- * @see org.eclipse.swt.ole.win32.Variant
- */
-public class Test_org_eclipse_swt_ole_win32_Variant extends SwtTestCase {
-
-public Test_org_eclipse_swt_ole_win32_Variant(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
-}
-
-protected void tearDown() {
-}
-
-public void test_Constructor() {
- warnUnimpl("Test test_Constructor not written");
-}
-
-public void test_ConstructorF() {
- warnUnimpl("Test test_ConstructorF not written");
-}
-
-public void test_ConstructorI() {
- warnUnimpl("Test test_ConstructorI not written");
-}
-
-public void test_ConstructorIS() {
- warnUnimpl("Test test_ConstructorIS not written");
-}
-
-public void test_ConstructorLjava_lang_String() {
- warnUnimpl("Test test_ConstructorLjava_lang_String not written");
-}
-
-public void test_ConstructorLorg_eclipse_swt_internal_ole_win32_IDispatch() {
- warnUnimpl("Test test_ConstructorLorg_eclipse_swt_internal_ole_win32_IDispatch not written");
-}
-
-public void test_ConstructorLorg_eclipse_swt_internal_ole_win32_IUnknown() {
- warnUnimpl("Test test_ConstructorLorg_eclipse_swt_internal_ole_win32_IUnknown not written");
-}
-
-public void test_ConstructorLorg_eclipse_swt_ole_win32_OleAutomation() {
- warnUnimpl("Test test_ConstructorLorg_eclipse_swt_ole_win32_OleAutomation not written");
-}
-
-public void test_ConstructorS() {
- warnUnimpl("Test test_ConstructorS not written");
-}
-
-public void test_ConstructorZ() {
- warnUnimpl("Test test_ConstructorZ not written");
-}
-
-public void test_dispose() {
- warnUnimpl("Test test_dispose not written");
-}
-
-public void test_getAutomation() {
- warnUnimpl("Test test_getAutomation not written");
-}
-
-public void test_getBoolean() {
- warnUnimpl("Test test_getBoolean not written");
-}
-
-public void test_getByRef() {
- warnUnimpl("Test test_getByRef not written");
-}
-
-public void test_getDispatch() {
- warnUnimpl("Test test_getDispatch not written");
-}
-
-public void test_getFloat() {
- warnUnimpl("Test test_getFloat not written");
-}
-
-public void test_getInt() {
- warnUnimpl("Test test_getInt not written");
-}
-
-public void test_getShort() {
- warnUnimpl("Test test_getShort not written");
-}
-
-public void test_getString() {
- warnUnimpl("Test test_getString not written");
-}
-
-public void test_getType() {
- warnUnimpl("Test test_getType not written");
-}
-
-public void test_getUnknown() {
- warnUnimpl("Test test_getUnknown not written");
-}
-
-public void test_setByRefF() {
- warnUnimpl("Test test_setByRefF not written");
-}
-
-public void test_setByRefI() {
- warnUnimpl("Test test_setByRefI not written");
-}
-
-public void test_setByRefS() {
- warnUnimpl("Test test_setByRefS not written");
-}
-
-public void test_setByRefZ() {
- warnUnimpl("Test test_setByRefZ not written");
-}
-
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_ole_win32_Variant((String)e.nextElement()));
- }
- return suite;
-}
-
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_Constructor");
- methodNames.addElement("test_ConstructorF");
- methodNames.addElement("test_ConstructorI");
- methodNames.addElement("test_ConstructorIS");
- methodNames.addElement("test_ConstructorLjava_lang_String");
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_internal_ole_win32_IDispatch");
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_internal_ole_win32_IUnknown");
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_ole_win32_OleAutomation");
- methodNames.addElement("test_ConstructorS");
- methodNames.addElement("test_ConstructorZ");
- methodNames.addElement("test_dispose");
- methodNames.addElement("test_getAutomation");
- methodNames.addElement("test_getBoolean");
- methodNames.addElement("test_getByRef");
- methodNames.addElement("test_getDispatch");
- methodNames.addElement("test_getFloat");
- methodNames.addElement("test_getInt");
- methodNames.addElement("test_getShort");
- methodNames.addElement("test_getString");
- methodNames.addElement("test_getType");
- methodNames.addElement("test_getUnknown");
- methodNames.addElement("test_setByRefF");
- methodNames.addElement("test_setByRefI");
- methodNames.addElement("test_setByRefS");
- methodNames.addElement("test_setByRefZ");
- return methodNames;
-}
-
-protected void runTest() throws Throwable {
- if (getName().equals("test_Constructor")) test_Constructor();
- else if (getName().equals("test_ConstructorF")) test_ConstructorF();
- else if (getName().equals("test_ConstructorI")) test_ConstructorI();
- else if (getName().equals("test_ConstructorIS")) test_ConstructorIS();
- else if (getName().equals("test_ConstructorLjava_lang_String")) test_ConstructorLjava_lang_String();
- else if (getName().equals("test_ConstructorLorg_eclipse_swt_internal_ole_win32_IDispatch")) test_ConstructorLorg_eclipse_swt_internal_ole_win32_IDispatch();
- else if (getName().equals("test_ConstructorLorg_eclipse_swt_internal_ole_win32_IUnknown")) test_ConstructorLorg_eclipse_swt_internal_ole_win32_IUnknown();
- else if (getName().equals("test_ConstructorLorg_eclipse_swt_ole_win32_OleAutomation")) test_ConstructorLorg_eclipse_swt_ole_win32_OleAutomation();
- else if (getName().equals("test_ConstructorS")) test_ConstructorS();
- else if (getName().equals("test_ConstructorZ")) test_ConstructorZ();
- else if (getName().equals("test_dispose")) test_dispose();
- else if (getName().equals("test_getAutomation")) test_getAutomation();
- else if (getName().equals("test_getBoolean")) test_getBoolean();
- else if (getName().equals("test_getByRef")) test_getByRef();
- else if (getName().equals("test_getDispatch")) test_getDispatch();
- else if (getName().equals("test_getFloat")) test_getFloat();
- else if (getName().equals("test_getInt")) test_getInt();
- else if (getName().equals("test_getShort")) test_getShort();
- else if (getName().equals("test_getString")) test_getString();
- else if (getName().equals("test_getType")) test_getType();
- else if (getName().equals("test_getUnknown")) test_getUnknown();
- else if (getName().equals("test_setByRefF")) test_setByRefF();
- else if (getName().equals("test_setByRefI")) test_setByRefI();
- else if (getName().equals("test_setByRefS")) test_setByRefS();
- else if (getName().equals("test_setByRefZ")) test_setByRefZ();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_printing_PrintDialog.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_printing_PrintDialog.java
deleted file mode 100644
index 847425e43b..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_printing_PrintDialog.java
+++ /dev/null
@@ -1,143 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-import org.eclipse.swt.*;
-import org.eclipse.swt.printing.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.printing.PrintDialog
- *
- * @see org.eclipse.swt.printing.PrintDialog
- */
-public class Test_org_eclipse_swt_printing_PrintDialog extends Test_org_eclipse_swt_widgets_Dialog {
-
-public Test_org_eclipse_swt_printing_PrintDialog(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- super.setUp();
- printDialog = new PrintDialog(shell, SWT.NONE);
- setDialog(printDialog);
-}
-
-protected void tearDown() {
- super.tearDown();
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_Shell() {
- new PrintDialog(shell);
-
- try {
- new PrintDialog(null);
- fail("No exception thrown for parent == null");
- }
- catch (IllegalArgumentException e) {
- }
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_ShellI() {
- new PrintDialog(shell, SWT.NONE);
-
- try {
- new PrintDialog(null, SWT.NONE);
- fail("No exception thrown for parent == null");
- }
- catch (IllegalArgumentException e) {
- }
-}
-
-public void test_getEndPage() {
- warnUnimpl("Test test_getEndPage not written");
-}
-
-public void test_getPrintToFile() {
- warnUnimpl("Test test_getPrintToFile not written");
-}
-
-public void test_getScope() {
- warnUnimpl("Test test_getScope not written");
-}
-
-public void test_getStartPage() {
- warnUnimpl("Test test_getStartPage not written");
-}
-
-public void test_open() {
- warnUnimpl("Test test_open not written");
-}
-
-public void test_setEndPageI() {
- warnUnimpl("Test test_setEndPageI not written");
-}
-
-public void test_setPrintToFileZ() {
- warnUnimpl("Test test_setPrintToFileZ not written");
-}
-
-public void test_setScopeI() {
- warnUnimpl("Test test_setScopeI not written");
-}
-
-public void test_setStartPageI() {
- warnUnimpl("Test test_setStartPageI not written");
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_printing_PrintDialog((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_Shell");
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_ShellI");
- methodNames.addElement("test_getEndPage");
- methodNames.addElement("test_getPrintToFile");
- methodNames.addElement("test_getScope");
- methodNames.addElement("test_getStartPage");
- methodNames.addElement("test_open");
- methodNames.addElement("test_setEndPageI");
- methodNames.addElement("test_setPrintToFileZ");
- methodNames.addElement("test_setScopeI");
- methodNames.addElement("test_setStartPageI");
- methodNames.addAll(Test_org_eclipse_swt_widgets_Dialog.methodNames()); // add superclass method names
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_Shell")) test_ConstructorLorg_eclipse_swt_widgets_Shell();
- else if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_ShellI")) test_ConstructorLorg_eclipse_swt_widgets_ShellI();
- else if (getName().equals("test_getEndPage")) test_getEndPage();
- else if (getName().equals("test_getPrintToFile")) test_getPrintToFile();
- else if (getName().equals("test_getScope")) test_getScope();
- else if (getName().equals("test_getStartPage")) test_getStartPage();
- else if (getName().equals("test_open")) test_open();
- else if (getName().equals("test_setEndPageI")) test_setEndPageI();
- else if (getName().equals("test_setPrintToFileZ")) test_setPrintToFileZ();
- else if (getName().equals("test_setScopeI")) test_setScopeI();
- else if (getName().equals("test_setStartPageI")) test_setStartPageI();
- else super.runTest();
-}
-
-/* custom */
- PrintDialog printDialog;
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_printing_Printer.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_printing_Printer.java
deleted file mode 100644
index d8dfc0de5f..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_printing_Printer.java
+++ /dev/null
@@ -1,252 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import junit.framework.*;
-import junit.textui.*;
-import org.eclipse.swt.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.printing.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.printing.Printer
- *
- * @see org.eclipse.swt.printing.Printer
- */
-public class Test_org_eclipse_swt_printing_Printer extends Test_org_eclipse_swt_graphics_Device {
-
-public Test_org_eclipse_swt_printing_Printer(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- super.setUp();
-}
-
-protected void tearDown() {
- super.tearDown();
-}
-
-public void test_Constructor() {
- boolean exceptionThrown = false;
- String detail = "";
- if (Printer.getDefaultPrinterData() == null) {
- /* There aren't any printers, so verify that the
- * constructor throws an ERROR_NO_HANDLES SWTError.
- */
- try {
- Printer printer = new Printer();
- printer.dispose();
- } catch (SWTError ex) {
- if (ex.code == SWT.ERROR_NO_HANDLES) exceptionThrown = true;
- }
- assertTrue("ERROR_NO_HANDLES not thrown", exceptionThrown);
- } else {
- /* There is at least a default printer, so verify that
- * the constructor does not throw any exceptions.
- */
- try {
- Printer printer = new Printer();
- printer.dispose();
- } catch (Throwable ex) {
- exceptionThrown = true;
- detail = ex.getMessage();
- }
- assertFalse("Exception thrown: " + detail, exceptionThrown);
- }
-}
-
-public void test_ConstructorLorg_eclipse_swt_printing_PrinterData() {
- boolean exceptionThrown = false;
- String detail = "";
- PrinterData data = Printer.getDefaultPrinterData();
- if (data == null) {
- /* There aren't any printers, so verify that the
- * constructor throws an ERROR_NO_HANDLES SWTError.
- */
- try {
- Printer printer = new Printer(data);
- printer.dispose();
- } catch (SWTError ex) {
- if (ex.code == SWT.ERROR_NO_HANDLES) exceptionThrown = true;
- }
- assertTrue("ERROR_NO_HANDLES not thrown", exceptionThrown);
- } else {
- /* There is at least a default printer, so verify that
- * the constructor does not throw any exceptions.
- */
- try {
- Printer printer = new Printer(data);
- printer.dispose();
- } catch (Throwable ex) {
- exceptionThrown = true;
- detail = ex.getMessage();
- }
- assertFalse("Exception thrown: " + detail, exceptionThrown);
- }
-}
-
-public void test_cancelJob() {
- warnUnimpl("Test test_cancelJob not written");
-}
-
-public void test_computeTrimIIII() {
- PrinterData data = Printer.getDefaultPrinterData();
- // if there aren't any printers, don't do this test
- if (data == null) return;
- Printer printer = new Printer(data);
- Rectangle trim = printer.computeTrim(0, 0, 10, 10);
- assertTrue("trim width or height is incorrect", trim.width >= 10 && trim.height >= 10);
- printer.dispose();
-}
-
-public void test_endJob() {
- warnUnimpl("Test test_endJob not written");
-}
-
-public void test_endPage() {
- warnUnimpl("Test test_endPage not written");
-}
-
-public void test_getBounds() {
- PrinterData data = Printer.getDefaultPrinterData();
- // if there aren't any printers, don't do this test
- if (data == null) return;
- Printer printer = new Printer(data);
- Rectangle bounds = printer.getBounds();
- assertTrue("bounds width or height is zero", bounds.width > 0 && bounds.height > 0);
- printer.dispose();
-}
-
-public void test_getClientArea() {
- PrinterData data = Printer.getDefaultPrinterData();
- // if there aren't any printers, don't do this test
- if (data == null) return;
- Printer printer = new Printer(data);
- Rectangle clientArea = printer.getClientArea();
- assertTrue("clientArea width or height is zero", clientArea.width > 0 && clientArea.height > 0);
- printer.dispose();
-}
-
-public void test_getDPI() {
- PrinterData data = Printer.getDefaultPrinterData();
- // if there aren't any printers, don't do this test
- if (data == null) return;
- Printer printer = new Printer(data);
- Point dpi = printer.getDPI();
- assertTrue("dpi x or y is zero", dpi.x > 0 && dpi.y > 0);
- printer.dispose();
-}
-
-public void test_getDefaultPrinterData() {
- // Tested in test_getPrinterData.
-}
-
-public void test_getPrinterData() {
- PrinterData data = Printer.getDefaultPrinterData();
- // if there aren't any printers, don't do this test
- if (data == null) return;
- Printer printer = new Printer(data);
- assertTrue("getPrinterData != data used in constructor",
- data == printer.getPrinterData());
- printer.dispose();
-}
-
-public void test_getPrinterList() {
- PrinterData data = Printer.getDefaultPrinterData();
- if (data == null) {
- /* If there aren't any printers, verify that the
- * printer list is empty.
- */
- PrinterData list[] = Printer.getPrinterList();
- assertTrue("printer list contains items even though there are no printers",
- list.length == 0);
- } else {
- /* If there is at least a default printer, verify
- * that the printer list is not empty.
- */
- PrinterData list[] = Printer.getPrinterList();
- assertTrue("printer list is empty", list.length > 0);
- }
-}
-
-public void test_internal_dispose_GCILorg_eclipse_swt_graphics_GCData() {
- warnUnimpl("Test test_internal_dispose_GCILorg_eclipse_swt_graphics_GCData not written");
-}
-
-public void test_internal_new_GCLorg_eclipse_swt_graphics_GCData() {
- warnUnimpl("Test test_internal_new_GCLorg_eclipse_swt_graphics_GCData not written");
-}
-
-public void test_startJobLjava_lang_String() {
- warnUnimpl("Test test_startJobLjava_lang_String not written");
-}
-
-public void test_startPage() {
- warnUnimpl("Test test_startPage not written");
-}
-
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_printing_Printer((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_Constructor");
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_printing_PrinterData");
- methodNames.addElement("test_cancelJob");
- methodNames.addElement("test_computeTrimIIII");
- methodNames.addElement("test_endJob");
- methodNames.addElement("test_endPage");
- methodNames.addElement("test_getBounds");
- methodNames.addElement("test_getClientArea");
- methodNames.addElement("test_getDPI");
- methodNames.addElement("test_getDefaultPrinterData");
- methodNames.addElement("test_getPrinterData");
- methodNames.addElement("test_getPrinterList");
- methodNames.addElement("test_internal_dispose_GCILorg_eclipse_swt_graphics_GCData");
- methodNames.addElement("test_internal_new_GCLorg_eclipse_swt_graphics_GCData");
- methodNames.addElement("test_startJobLjava_lang_String");
- methodNames.addElement("test_startPage");
- methodNames.addAll(Test_org_eclipse_swt_graphics_Device.methodNames()); // add superclass method names
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_Constructor")) test_Constructor();
- else if (getName().equals("test_ConstructorLorg_eclipse_swt_printing_PrinterData")) test_ConstructorLorg_eclipse_swt_printing_PrinterData();
- else if (getName().equals("test_cancelJob")) test_cancelJob();
- else if (getName().equals("test_computeTrimIIII")) test_computeTrimIIII();
- else if (getName().equals("test_endJob")) test_endJob();
- else if (getName().equals("test_endPage")) test_endPage();
- else if (getName().equals("test_getBounds")) test_getBounds();
- else if (getName().equals("test_getClientArea")) test_getClientArea();
- else if (getName().equals("test_getDPI")) test_getDPI();
- else if (getName().equals("test_getDefaultPrinterData")) test_getDefaultPrinterData();
- else if (getName().equals("test_getPrinterData")) test_getPrinterData();
- else if (getName().equals("test_getPrinterList")) test_getPrinterList();
- else if (getName().equals("test_internal_dispose_GCILorg_eclipse_swt_graphics_GCData")) test_internal_dispose_GCILorg_eclipse_swt_graphics_GCData();
- else if (getName().equals("test_internal_new_GCLorg_eclipse_swt_graphics_GCData")) test_internal_new_GCLorg_eclipse_swt_graphics_GCData();
- else if (getName().equals("test_startJobLjava_lang_String")) test_startJobLjava_lang_String();
- else if (getName().equals("test_startPage")) test_startPage();
- else super.runTest();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_printing_PrinterData.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_printing_PrinterData.java
deleted file mode 100644
index db6eef3eb7..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_printing_PrinterData.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-import org.eclipse.swt.printing.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.printing.PrinterData
- *
- * @see org.eclipse.swt.printing.PrinterData
- */
-public class Test_org_eclipse_swt_printing_PrinterData extends Test_org_eclipse_swt_graphics_DeviceData {
-
-public Test_org_eclipse_swt_printing_PrinterData(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- super.setUp();
-}
-
-protected void tearDown() {
- super.tearDown();
-}
-
-public void test_Constructor() {
- PrinterData data = new PrinterData();
-}
-
-public void test_ConstructorLjava_lang_StringLjava_lang_String() {
- PrinterData data = new PrinterData("hello", "there");
-}
-
-public void test_toString() {
- PrinterData data = new PrinterData();
- assertNotNull(data.toString());
- assertTrue(data.toString().length() > 0);
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_printing_PrinterData((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_Constructor");
- methodNames.addElement("test_ConstructorLjava_lang_StringLjava_lang_String");
- methodNames.addElement("test_toString");
- methodNames.addAll(Test_org_eclipse_swt_graphics_DeviceData.methodNames()); // add superclass method names
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_Constructor")) test_Constructor();
- else if (getName().equals("test_ConstructorLjava_lang_StringLjava_lang_String")) test_ConstructorLjava_lang_StringLjava_lang_String();
- else if (getName().equals("test_toString")) test_toString();
- else super.runTest();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_program_Program.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_program_Program.java
deleted file mode 100644
index dd89e30ae0..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_program_Program.java
+++ /dev/null
@@ -1,238 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import java.util.*;
-import junit.framework.*;
-import junit.textui.*;
-import org.eclipse.swt.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.program.*;
-import org.eclipse.swt.widgets.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.program.Program
- *
- * @see org.eclipse.swt.program.Program
- */
-public class Test_org_eclipse_swt_program_Program extends SwtTestCase {
-
- private Display display;
-
-public Test_org_eclipse_swt_program_Program(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- display = Display.getDefault();
-}
-
-protected void tearDown() {
-}
-
-public void test_equalsLjava_lang_Object() {
- String[] extensions = Program.getExtensions();
- // No assertion here because the doc does not guarantee a non-null result.
- if (extensions != null) {
- for (int i=0; i<extensions.length; i++) {
- Program program = Program.findProgram(extensions[i]);
- if (program != null) {
- assertTrue(program.equals(program));
- }
- }
- }
-}
-
-public void test_executeLjava_lang_String() {
-
- // This test is incomplete because a true test of execute would open
- // an application that cannot be programmatically closed.
-
- try {
- Program[] programs = Program.getPrograms();
- if (programs != null && programs.length > 0) {
-
- // Cannot test empty string argument because it may launch something.
- //boolean result = programs[0].execute("");
- //assertFalse(result);
-
- // test null argument
-
- programs[0].execute(null);
- fail("Failed to throw ERROR_NULL_ARGUMENT");
- }
- } catch (IllegalArgumentException e) {
- assertEquals("Failed to throw ERROR_NULL_ARGUMENT", SWT.ERROR_NULL_ARGUMENT, e);
- }
-}
-
-public void test_findProgramLjava_lang_String() {
- String[] extensions = Program.getExtensions();
- // No assertion here because the doc does not guarantee a non-null result.
- if (extensions != null) {
- for (int i=0; i<extensions.length; i++) {
- Program program = Program.findProgram(extensions[i]);
- // No assertion here because a null result is allowed.
- }
- }
-
- try {
- Program program = Program.findProgram(null);
- fail("Failed to throw ERROR_NULL_ARGUMENT");
- } catch (IllegalArgumentException e) {
- assertEquals("Failed to throw ERROR_NULL_ARGUMENT", SWT.ERROR_NULL_ARGUMENT, e);
- } catch (Exception e) {
- fail("Invalid Exception thrown of type "+e.getClass());
- } catch (Error e) {
- fail("Invalid Error thrown of type "+e.getClass());
- }
-}
-
-public void test_getExtensions() {
- String[] extensions = Program.getExtensions();
- // No assertion here because the doc does not guarantee a non-null result.
- if (extensions != null) {
- for (int i=0; i<extensions.length; i++) {
- assertNotNull(extensions[i]);
- }
- }
-}
-
-public void test_getImageData() {
- String[] extensions = Program.getExtensions();
- // No assertion here because the doc does not guarantee a non-null result.
- if (extensions != null) {
- for (int i=0; i<extensions.length; i++) {
- Program program = Program.findProgram(extensions[i]);
- if (program != null) {
- ImageData data = program.getImageData();
- // Nothing to do.
- }
- }
- }
-}
-
-public void test_getName() {
- String[] extensions = Program.getExtensions();
- // No assertion here because the doc does not guarantee a non-null result.
- if (extensions != null) {
- for (int i=0; i<extensions.length; i++) {
- Program program = Program.findProgram(extensions[i]);
- if (program != null) {
- String name = program.getName();
- assertNotNull("Program has null name",name);
- }
- }
- }
-}
-
-public void test_getPrograms() {
- Program[] programs = Program.getPrograms();
-
- // The result is not well-documented, but it should
- // be non-null and contain no null entries.
-
- assertNotNull(programs);
-
- Hashtable lookup = new Hashtable();
- for (int i=0; i<programs.length; i++) {
-
- // test non-null entry
- assertNotNull(programs[i]);
-
- // test unique hash code
- int hashCode = programs[i].hashCode();
- Integer key = new Integer(hashCode);
- if (lookup.contains(key)) {
- fail("Duplicate hash code for "+programs[i]+" (same as "+(Program)lookup.get(key)+")");
- }
- else {
- lookup.put(key,programs[i]);
- }
- }
-}
-
-public void test_hashCode() {
- // tested in test_getPrograms
-}
-
-public void test_launchLjava_lang_String() {
-
- // This test is incomplete because a true test of launch would open
- // an application that cannot be programmatically closed.
-
- // Cannot test empty string argument because it may launch something.
-
- // test null argument
-
- try {
- Program.launch(null);
- fail("Failed to throw ERROR_NULL_ARGUMENT");
- } catch (IllegalArgumentException e) {
- assertEquals("Failed to throw ERROR_NULL_ARGUMENT", SWT.ERROR_NULL_ARGUMENT, e);
- }
-}
-
-public void test_toString() {
- String[] extensions = Program.getExtensions();
- // No assertion here because the doc does not guarantee a non-null result.
- if (extensions != null) {
- for (int i=0; i<extensions.length; i++) {
- Program program = Program.findProgram(extensions[i]);
- if (program != null) {
- String string = program.toString();
- assertNotNull("toString returned null",string);
- }
- }
- }
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_program_Program((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_equalsLjava_lang_Object");
- methodNames.addElement("test_executeLjava_lang_String");
- methodNames.addElement("test_getExtensions");
- methodNames.addElement("test_findProgramLjava_lang_String");
- methodNames.addElement("test_getImageData");
- methodNames.addElement("test_getName");
- methodNames.addElement("test_getPrograms");
- methodNames.addElement("test_hashCode");
- methodNames.addElement("test_launchLjava_lang_String");
- methodNames.addElement("test_toString");
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_equalsLjava_lang_Object")) test_equalsLjava_lang_Object();
- else if (getName().equals("test_executeLjava_lang_String")) test_executeLjava_lang_String();
- else if (getName().equals("test_findProgramLjava_lang_String")) test_findProgramLjava_lang_String();
- else if (getName().equals("test_getExtensions")) test_getExtensions();
- else if (getName().equals("test_getImageData")) test_getImageData();
- else if (getName().equals("test_getName")) test_getName();
- else if (getName().equals("test_getPrograms")) test_getPrograms();
- else if (getName().equals("test_hashCode")) test_hashCode();
- else if (getName().equals("test_launchLjava_lang_String")) test_launchLjava_lang_String();
- else if (getName().equals("test_toString")) test_toString();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Button.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Button.java
deleted file mode 100644
index a40bbd6820..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Button.java
+++ /dev/null
@@ -1,304 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.graphics.*;
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.widgets.Button
- *
- * @see org.eclipse.swt.widgets.Button
- */
-public class Test_org_eclipse_swt_widgets_Button extends Test_org_eclipse_swt_widgets_Control {
-
-Button button;
-
-public Test_org_eclipse_swt_widgets_Button(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- super.setUp();
- button = new Button(shell, SWT.PUSH);
- setWidget(button);
-}
-
-protected void tearDown() {
- super.tearDown();
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_CompositeI() {
- // Test Button(Composite parent, int style)
- Button button = new Button(shell, SWT.NULL);
-
- button = new Button(shell, SWT.PUSH);
-
- button = new Button(shell, SWT.CHECK);
-
- button = new Button(shell, SWT.TOGGLE);
-
- button = new Button(shell, SWT.ARROW);
-
- button = new Button(shell, SWT.PUSH | SWT.CHECK);
-
- try {
- button = new Button(null, 0);
- fail("No exception thrown for parent == null");
- }
- catch (IllegalArgumentException e) {
- }
-}
-
-public void test_addSelectionListenerLorg_eclipse_swt_events_SelectionListener() {
- listenerCalled = false;
- SelectionListener listener = new SelectionListener() {
- public void widgetSelected(SelectionEvent e) {
- listenerCalled = true;
- };
- public void widgetDefaultSelected(SelectionEvent e) {
- };
- };
-
- try {
- button.addSelectionListener(null);
- fail("No exception thrown for addSelectionListener with null argument");
- } catch (IllegalArgumentException e) {
- }
-
- button.addSelectionListener(listener);
- button.notifyListeners(SWT.Selection, new Event());
- assertTrue(listenerCalled);
-
- try {
- button.removeSelectionListener(null);
- fail("No exception thrown for removeSelectionListener with null argument");
- } catch (IllegalArgumentException e) {
- }
- listenerCalled = false;
- button.removeSelectionListener(listener);
- button.notifyListeners(SWT.Selection, new Event());
- assertFalse(listenerCalled);
-}
-
-public void test_computeSizeIIZ() {
- button.computeSize(0, 0);
-
- button.computeSize(0, 0, false);
-
- button.computeSize(-10, -10);
-
- button.computeSize(-10, -10, false);
-
- button.computeSize(10, 10);
-
- button.computeSize(10, 10, false);
-
- button.computeSize(10000, 10000);
-
- button.computeSize(10000, 10000, false);
-}
-
-public void test_getAlignment() {
- // tested in test_setAlignmentI()
-}
-
-public void test_getImage() {
- // tested in test_setImageLorg_eclipse_swt_graphics_Image
-}
-
-public void test_getSelection() {
- // tested in test_setSelectionZ
-}
-
-public void test_getText() {
- // tested in test_setTextLjava_lang_String()
-}
-
-public void test_removeSelectionListenerLorg_eclipse_swt_events_SelectionListener() {
- // tested in test_addSelectionListenerLorg_eclipse_swt_events_SelectionListener()
-}
-
-public void test_setAlignmentI() {
- button.setAlignment(SWT.LEFT);
- assertEquals(SWT.LEFT, button.getAlignment());
-
- button.setAlignment(SWT.RIGHT);
- assertEquals(SWT.RIGHT, button.getAlignment());
-
- button.setAlignment(SWT.CENTER);
- assertEquals(SWT.CENTER, button.getAlignment());
-
- button.setAlignment(SWT.UP); // bad value for push button
- assertTrue(SWT.UP != button.getAlignment());
-
- Button arrowButton = new Button(shell, SWT.ARROW);
- arrowButton.setAlignment(SWT.LEFT);
- assertEquals(SWT.LEFT, arrowButton.getAlignment());
-
- arrowButton.setAlignment(SWT.RIGHT);
- assertEquals(SWT.RIGHT, arrowButton.getAlignment());
-
- arrowButton.setAlignment(SWT.UP);
- assertEquals(SWT.UP, arrowButton.getAlignment());
-
- arrowButton.setAlignment(SWT.DOWN);
- assertEquals(SWT.DOWN, arrowButton.getAlignment());
-
- arrowButton.setAlignment(SWT.CENTER); // bad value for arrow button
- assertTrue(SWT.CENTER != arrowButton.getAlignment());
- arrowButton.dispose();
-
- int alignment = 55; // some bogus number
- button.setAlignment(alignment);
- assertTrue(alignment != button.getAlignment());
-}
-
-public void test_setFocus() {
- Button btn = new Button(shell, SWT.ARROW);
- btn.setFocus();
-}
-
-public void test_setImageLorg_eclipse_swt_graphics_Image() {
- Image image = button.getImage();
- button.setImage(image);
- assertEquals(image, button.getImage());
-
- button.setImage(null);
- assertNull(button.getImage());
-
- image = new Image(shell.getDisplay(), 10, 10);
- button.setImage(image);
- assertEquals(image, button.getImage());
-
- button.setImage(null);
- image.dispose();
- try {
- button.setImage(image);
- button.setImage(null);
- fail("No exception thrown for disposed image");
- } catch (IllegalArgumentException e) {
- }
-}
-
-public void test_setSelectionZ() {
- // test setSelection for check box
- button = new Button(shell, SWT.CHECK);
- button.setSelection(true);
- assertTrue(button.getSelection());
- button.setSelection(false);
- assertTrue(!button.getSelection());
-
- // test setSelection for arrow button
- Button newButton = new Button(shell, SWT.ARROW);
- newButton.setSelection(true);
- assertTrue(!newButton.getSelection());
- newButton.setSelection(false);
- assertTrue(!newButton.getSelection());
- newButton.dispose();
-
- // test setSelection for push button
- newButton = new Button(shell, SWT.PUSH);
- newButton.setSelection(true);
- assertTrue(!newButton.getSelection());
- newButton.setSelection(false);
- assertTrue(!newButton.getSelection());
- newButton.dispose();
-
- // test setSelection for radio button
- newButton = new Button(shell, SWT.RADIO);
- newButton.setSelection(true);
- assertTrue(newButton.getSelection());
- newButton.setSelection(false);
- assertTrue(!newButton.getSelection());
- newButton.dispose();
-
- // test setSelection for toggle button
- newButton = new Button(shell, SWT.TOGGLE);
- newButton.setSelection(true);
- assertTrue(newButton.getSelection());
- newButton.setSelection(false);
- assertTrue(!newButton.getSelection());
- newButton.dispose();
-}
-
-public void test_setTextLjava_lang_String() {
- String[] cases = {"", "some text", "ldkashdoehufweovcnhslvhregojebckreavbkuhxbiufvcyhbifuyewvbiureyd.,cmnesljliewjfchvbwoifivbeworixuieurvbiuvbohflksjeahfcliureafgyciabelitvyrwtlicuyrtliureybcliuyreuceyvbliureybct", "\n \n \b \t ", "\0"};
- int goodCases = 4;
- for (int i=0; i<goodCases; i++){
- button.setText(cases[i]);
- assertTrue("good case: " + String.valueOf(i), button.getText().equals(cases[i]));
- };
-
- try {
- button.setText(null);
- fail("No exception thrown for text == null");
- }
- catch (IllegalArgumentException e) {
- }
-
- button.setText("");
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_widgets_Button((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_CompositeI");
- methodNames.addElement("test_addSelectionListenerLorg_eclipse_swt_events_SelectionListener");
- methodNames.addElement("test_computeSizeIIZ");
- methodNames.addElement("test_getAlignment");
- methodNames.addElement("test_getImage");
- methodNames.addElement("test_getSelection");
- methodNames.addElement("test_getText");
- methodNames.addElement("test_removeSelectionListenerLorg_eclipse_swt_events_SelectionListener");
- methodNames.addElement("test_setAlignmentI");
- methodNames.addElement("test_setFocus");
- methodNames.addElement("test_setImageLorg_eclipse_swt_graphics_Image");
- methodNames.addElement("test_setSelectionZ");
- methodNames.addElement("test_setTextLjava_lang_String");
- methodNames.addAll(Test_org_eclipse_swt_widgets_Control.methodNames()); // add superclass method names
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_CompositeI")) test_ConstructorLorg_eclipse_swt_widgets_CompositeI();
- else if (getName().equals("test_addSelectionListenerLorg_eclipse_swt_events_SelectionListener")) test_addSelectionListenerLorg_eclipse_swt_events_SelectionListener();
- else if (getName().equals("test_computeSizeIIZ")) test_computeSizeIIZ();
- else if (getName().equals("test_getAlignment")) test_getAlignment();
- else if (getName().equals("test_getImage")) test_getImage();
- else if (getName().equals("test_getSelection")) test_getSelection();
- else if (getName().equals("test_getText")) test_getText();
- else if (getName().equals("test_removeSelectionListenerLorg_eclipse_swt_events_SelectionListener")) test_removeSelectionListenerLorg_eclipse_swt_events_SelectionListener();
- else if (getName().equals("test_setAlignmentI")) test_setAlignmentI();
- else if (getName().equals("test_setFocus")) test_setFocus();
- else if (getName().equals("test_setImageLorg_eclipse_swt_graphics_Image")) test_setImageLorg_eclipse_swt_graphics_Image();
- else if (getName().equals("test_setSelectionZ")) test_setSelectionZ();
- else if (getName().equals("test_setTextLjava_lang_String")) test_setTextLjava_lang_String();
- else super.runTest();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Canvas.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Canvas.java
deleted file mode 100644
index a0f46c1a94..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Canvas.java
+++ /dev/null
@@ -1,137 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import junit.framework.*;
-import junit.textui.*;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.widgets.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.widgets.Canvas
- *
- * @see org.eclipse.swt.widgets.Canvas
- */
-public class Test_org_eclipse_swt_widgets_Canvas extends Test_org_eclipse_swt_widgets_Composite {
-
-Canvas canvas;
-
-public Test_org_eclipse_swt_widgets_Canvas(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- super.setUp();
- canvas = new Canvas(shell, 0);
- super.setWidget(canvas);
-}
-
-protected void tearDown() {
- super.tearDown();
-}
-
-protected void setWidget(Widget w) {
- if (!canvas.isDisposed())
- canvas.dispose();
- canvas = (Canvas)w;
- super.setWidget(w);
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_CompositeI() {
- Canvas newCanvas;
- try {
- newCanvas = new Canvas(null, SWT.NONE);
- fail("No exception thrown for parent == null");
- }
- catch (IllegalArgumentException e) {
- }
-}
-
-public void test_getCaret() {
- // tested in test_setCaretLorg_eclipse_swt_widgets_Caret
-}
-
-public void test_scrollIIIIIIZ() {
- canvas.scroll(100, 100, 0, 0, 50, 50, false);
- canvas.scroll(100, 100, 0, 0, 50, 50, true);
-
- canvas.scroll(10000, 10000, 100, 100, 500, 500, false);
- canvas.scroll(10000, 10000, 100, 100, 500, 500, true);
-
- canvas.scroll(-100, -100, 10, 10, 30, 30, false);
- canvas.scroll(-100, -100, 10, 10, 30, 30, true);
-
- canvas.scroll(10, 10, -200, -200, 100, 100, false);
- canvas.scroll(10, 10, -200, -200, 100, 100, true);
-
- canvas.scroll(100, 100, 50, 50, -50, -50, false);
- canvas.scroll(100, 100, 50, 50, -50, -50, true);
-}
-
-public void test_setCaretLorg_eclipse_swt_widgets_Caret() {
- int number = 5;
- Caret[] carets = new Caret[number];
- for (int i = 0; i < number; i++) {
- carets[i] = new Caret(canvas, SWT.NONE);
- }
- for (int i = 0; i < number; i++) {
- canvas.setCaret(carets[i]);
- assertEquals("Caret # " + i + "not set properly", canvas.getCaret(), carets[i]);
- }
-
- canvas.setCaret(null);
- assertNull("Caret should be null" , canvas.getCaret());
-}
-
-public void test_setFontLorg_eclipse_swt_graphics_Font() {
- FontData fontData = canvas.getFont().getFontData()[0];
- Font font = new Font(canvas.getDisplay(), fontData.getName(), 8, fontData.getStyle());
- canvas.setFont(font);
- assertTrue(":a:", canvas.getFont().equals(font));
- canvas.setFont(null);
- font.dispose();
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_widgets_Canvas((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_CompositeI");
- methodNames.addElement("test_getCaret");
- methodNames.addElement("test_scrollIIIIIIZ");
- methodNames.addElement("test_setCaretLorg_eclipse_swt_widgets_Caret");
- methodNames.addElement("test_setFontLorg_eclipse_swt_graphics_Font");
- methodNames.addAll(Test_org_eclipse_swt_widgets_Composite.methodNames()); // add superclass method names
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_CompositeI")) test_ConstructorLorg_eclipse_swt_widgets_CompositeI();
- else if (getName().equals("test_getCaret")) test_getCaret();
- else if (getName().equals("test_scrollIIIIIIZ")) test_scrollIIIIIIZ();
- else if (getName().equals("test_setCaretLorg_eclipse_swt_widgets_Caret")) test_setCaretLorg_eclipse_swt_widgets_Caret();
- else if (getName().equals("test_setFontLorg_eclipse_swt_graphics_Font")) test_setFontLorg_eclipse_swt_graphics_Font();
- else super.runTest();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Caret.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Caret.java
deleted file mode 100644
index b7bb9b4d4c..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Caret.java
+++ /dev/null
@@ -1,251 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.graphics.*;
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.widgets.Caret
- *
- * @see org.eclipse.swt.widgets.Caret
- */
-public class Test_org_eclipse_swt_widgets_Caret extends Test_org_eclipse_swt_widgets_Widget {
-
-Canvas canvas;
-Caret caret;
-
-public Test_org_eclipse_swt_widgets_Caret(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- super.setUp();
- canvas = new Canvas(shell, SWT.NULL);
- caret = new Caret(canvas, SWT.NULL);
- setWidget(caret);
-}
-
-protected void tearDown() {
- super.tearDown();
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_CanvasI() {
- Caret newCaret;
- try {
- newCaret = new Caret(null, 0);
- fail("No exception thrown for parent == null");
- }
- catch (IllegalArgumentException e) {
- }
-}
-
-public void test_getBounds() {
- Rectangle rect = new Rectangle(0,0,30,30);
- caret.setBounds(rect);
- assertTrue(caret.getBounds().equals(rect));
-
- rect = new Rectangle(0,0,30,30);
- caret.setBounds(rect);
- assertTrue(!caret.getBounds().equals(new Rectangle (0,0,60,70)));
-}
-
-public void test_getFont() {
- // tested in test_setFontLorg_eclipse_swt_graphics_Font
-}
-
-public void test_getImage() {
- // tested in test_setImageLorg_eclipse_swt_graphics_Image
-}
-
-public void test_getLocation() {
- warnUnimpl("Test test_getLocation not written");
-}
-
-public void test_getParent() {
- assertEquals(canvas, caret.getParent());
-
- assertTrue(caret.getDisplay()==shell.getDisplay());
-}
-
-public void test_getSize() {
- warnUnimpl("Test test_getSize not written");
-}
-
-public void test_getVisible() {
- // tested in test_setVisibleZ
-}
-
-public void test_isVisible() {
- caret.setVisible(true);
- assertTrue(!caret.isVisible()); //because the shell is not visible
-
- caret.setVisible(false);
- assertTrue(!caret.isVisible());
-
- caret.setVisible(true);
- canvas.setVisible(true);
- shell.setVisible(true);
- assertTrue(caret.getVisible() == true);
- canvas.setVisible(false);
- if (fCheckVisibility) {
- assertTrue(!caret.getVisible());
- }
-
- shell.setVisible(false);
- canvas.setVisible(false);
- caret.setVisible(false);
- assertTrue(!caret.getVisible());
-}
-
-public void test_setBoundsIIII() {
- caret.setBounds(0, 0, 30, 30);
-}
-
-public void test_setBoundsLorg_eclipse_swt_graphics_Rectangle() {
- caret.setBounds(new Rectangle(0,0,30,30));
-
- try {
- caret.setBounds(null);
- fail("No exception thrown for bounds == null");
- }
- catch (IllegalArgumentException e) {
- }
-}
-
-public void test_setFontLorg_eclipse_swt_graphics_Font() {
- Font font = caret.getFont();
- caret.setFont(font);
- assertEquals(font, caret.getFont());
- caret.setFont(null);
-
- font = new Font(caret.getDisplay(), SwtJunit.testFontName, 10, SWT.NORMAL);
- caret.setFont(font);
- assertEquals(font, caret.getFont());
-
- caret.setFont(null);
- font.dispose();
- try {
- caret.setFont(font);
- caret.setFont(null);
- fail("No exception thrown for disposed font");
- } catch (IllegalArgumentException e) {
- }
-}
-
-public void test_setImageLorg_eclipse_swt_graphics_Image() {
- Image image = caret.getImage();
- caret.setImage(image);
- assertEquals(image, caret.getImage());
-
- caret.setImage(null);
- assertNull(caret.getImage());
-
- image = new Image(shell.getDisplay(), 10, 10);
- caret.setImage(image);
- assertEquals(image, caret.getImage());
-
- caret.setImage(null);
- image.dispose();
- try {
- caret.setImage(image);
- caret.setImage(null);
- fail("No exception thrown for disposed image");
- } catch (IllegalArgumentException e) {
- }
-}
-
-public void test_setLocationII() {
- warnUnimpl("Test test_setLocationII not written");
-}
-
-public void test_setLocationLorg_eclipse_swt_graphics_Point() {
- warnUnimpl("Test test_setLocationLorg_eclipse_swt_graphics_Point not written");
-}
-
-public void test_setSizeII() {
- warnUnimpl("Test test_setSizeII not written");
-}
-
-public void test_setSizeLorg_eclipse_swt_graphics_Point() {
- warnUnimpl("Test test_setSizeLorg_eclipse_swt_graphics_Point not written");
-}
-
-public void test_setVisibleZ() {
- caret.setVisible(true);
- assertTrue("Caret should be visible", caret.getVisible()==true);
-
- caret.setVisible(false);
- assertTrue("Caret should not be visible", caret.getVisible()==false);
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_widgets_Caret((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_CanvasI");
- methodNames.addElement("test_getBounds");
- methodNames.addElement("test_getFont");
- methodNames.addElement("test_getImage");
- methodNames.addElement("test_getLocation");
- methodNames.addElement("test_getParent");
- methodNames.addElement("test_getSize");
- methodNames.addElement("test_getVisible");
- methodNames.addElement("test_isVisible");
- methodNames.addElement("test_setBoundsIIII");
- methodNames.addElement("test_setBoundsLorg_eclipse_swt_graphics_Rectangle");
- methodNames.addElement("test_setFontLorg_eclipse_swt_graphics_Font");
- methodNames.addElement("test_setImageLorg_eclipse_swt_graphics_Image");
- methodNames.addElement("test_setLocationII");
- methodNames.addElement("test_setLocationLorg_eclipse_swt_graphics_Point");
- methodNames.addElement("test_setSizeII");
- methodNames.addElement("test_setSizeLorg_eclipse_swt_graphics_Point");
- methodNames.addElement("test_setVisibleZ");
- methodNames.addAll(Test_org_eclipse_swt_widgets_Widget.methodNames()); // add superclass method names
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_CanvasI")) test_ConstructorLorg_eclipse_swt_widgets_CanvasI();
- else if (getName().equals("test_getBounds")) test_getBounds();
- else if (getName().equals("test_getFont")) test_getFont();
- else if (getName().equals("test_getImage")) test_getImage();
- else if (getName().equals("test_getLocation")) test_getLocation();
- else if (getName().equals("test_getParent")) test_getParent();
- else if (getName().equals("test_getSize")) test_getSize();
- else if (getName().equals("test_getVisible")) test_getVisible();
- else if (getName().equals("test_isVisible")) test_isVisible();
- else if (getName().equals("test_setBoundsIIII")) test_setBoundsIIII();
- else if (getName().equals("test_setBoundsLorg_eclipse_swt_graphics_Rectangle")) test_setBoundsLorg_eclipse_swt_graphics_Rectangle();
- else if (getName().equals("test_setFontLorg_eclipse_swt_graphics_Font")) test_setFontLorg_eclipse_swt_graphics_Font();
- else if (getName().equals("test_setImageLorg_eclipse_swt_graphics_Image")) test_setImageLorg_eclipse_swt_graphics_Image();
- else if (getName().equals("test_setLocationII")) test_setLocationII();
- else if (getName().equals("test_setLocationLorg_eclipse_swt_graphics_Point")) test_setLocationLorg_eclipse_swt_graphics_Point();
- else if (getName().equals("test_setSizeII")) test_setSizeII();
- else if (getName().equals("test_setSizeLorg_eclipse_swt_graphics_Point")) test_setSizeLorg_eclipse_swt_graphics_Point();
- else if (getName().equals("test_setVisibleZ")) test_setVisibleZ();
- else super.runTest();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_ColorDialog.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_ColorDialog.java
deleted file mode 100644
index 5118ef40ae..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_ColorDialog.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.graphics.*;
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.widgets.ColorDialog
- *
- * @see org.eclipse.swt.widgets.ColorDialog
- */
-public class Test_org_eclipse_swt_widgets_ColorDialog extends Test_org_eclipse_swt_widgets_Dialog {
-
-ColorDialog colorDialog;
-
-public Test_org_eclipse_swt_widgets_ColorDialog(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- super.setUp();
- colorDialog = new ColorDialog(shell, SWT.NULL);
- setDialog(colorDialog);
-}
-
-protected void tearDown() {
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_Shell() {
- new ColorDialog(shell);
-
- try {
- new ColorDialog(null);
- fail("No exception thrown for parent == null");
- }
- catch (IllegalArgumentException e) {
- }
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_ShellI() {
- new ColorDialog(shell, SWT.NULL);
-
- try {
- new ColorDialog(null, SWT.NULL);
- fail("No exception thrown for parent == null");
- }
- catch (IllegalArgumentException e) {
- }
-}
-
-public void test_getRGB() {
- // tested in test_setRGBLorg_eclipse_swt_graphics_RGB
-}
-
-public void test_open() {
- warnUnimpl("Test test_open not written");
-}
-
-public void test_setRGBLorg_eclipse_swt_graphics_RGB() {
- RGB rgb = new RGB(0, 0, 0);
-
- assertTrue(":a:", colorDialog.getRGB() == null);
-
- colorDialog.setRGB(rgb);
- assertTrue(":b:", colorDialog.getRGB() == rgb);
-
- colorDialog.setRGB(null);
- assertTrue(":c:", colorDialog.getRGB() == null);
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_widgets_ColorDialog((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_Shell");
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_ShellI");
- methodNames.addElement("test_getRGB");
- methodNames.addElement("test_open");
- methodNames.addElement("test_setRGBLorg_eclipse_swt_graphics_RGB");
- methodNames.addAll(Test_org_eclipse_swt_widgets_Dialog.methodNames()); // add superclass method names
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_Shell")) test_ConstructorLorg_eclipse_swt_widgets_Shell();
- else if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_ShellI")) test_ConstructorLorg_eclipse_swt_widgets_ShellI();
- else if (getName().equals("test_getRGB")) test_getRGB();
- else if (getName().equals("test_open")) test_open();
- else if (getName().equals("test_setRGBLorg_eclipse_swt_graphics_RGB")) test_setRGBLorg_eclipse_swt_graphics_RGB();
- else super.runTest();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Combo.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Combo.java
deleted file mode 100644
index 3da0c626f7..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Combo.java
+++ /dev/null
@@ -1,908 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import junit.framework.*;
-import junit.textui.*;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.widgets.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.widgets.Combo
- *
- * @see org.eclipse.swt.widgets.Combo
- */
-public class Test_org_eclipse_swt_widgets_Combo extends Test_org_eclipse_swt_widgets_Composite {
-
- Combo combo;
-
-public Test_org_eclipse_swt_widgets_Combo(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- super.setUp();
- combo = new Combo(shell, 0);
- setWidget(combo);
-}
-
-protected void tearDown() {
- super.tearDown();
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_CompositeI() {
- try {
- combo = new Combo(null, 0);
- fail("No exception thrown for parent == null");
- }
- catch (IllegalArgumentException e) {
- }
-
- int[] cases = {SWT.DROP_DOWN, SWT.SIMPLE};
- for (int i = 0; i < cases.length; i++) {
- combo = new Combo(shell, cases[i]);
- assertTrue(":a:" + String.valueOf(i), (combo.getStyle() & cases[i]) == cases[i]);
- }
-}
-
-public void test_addLjava_lang_String() {
- try {
- combo.add(null);
- fail("No exception thrown for item == null");
- }
- catch (IllegalArgumentException e) {
- }
-
- combo.add("");
- assertEquals(":a:", new String[]{""}, combo.getItems());
- combo.add("");
- assertEquals(":b:", new String[]{"", ""}, combo.getItems());
- combo.add("fred");
- assertEquals(":c:", new String[]{"", "", "fred"}, combo.getItems());
-
-}
-
-public void test_addLjava_lang_StringI() {
- try {
- combo.add(null, 0);
- fail("No exception thrown for item == null");
- }
- catch (IllegalArgumentException e) {
- }
-
- try {
- combo.add("string", -1);
- fail("No exception thrown for index < 0");
- }
- catch (IllegalArgumentException e) {
- }
-
- combo.add("string0", 0);
- try {
- combo.add("string1", 2);
- fail("No exception thrown for index > size");
- }
- catch (IllegalArgumentException e) {
- }
- combo.removeAll();
-
- combo.add("fred", 0);
- assertEquals("fred", new String[]{"fred"}, combo.getItems());
- combo.add("fred", 0);
- assertEquals("fred fred", new String[]{"fred", "fred"}, combo.getItems());
- combo.add("fred");
- assertEquals("fred fred fred", new String[]{"fred", "fred", "fred"}, combo.getItems());
- combo.removeAll();
-
- int number = 3;
- for (int i = 0; i < number; i++)
- combo.add("fred" + i);
- combo.add("fred", number);
- assertEquals("fred0 fred1 fred2 fred", new String[]{"fred0", "fred1", "fred2", "fred"}, combo.getItems());
-
- combo.removeAll();
- number = 3;
- for (int i = 0; i < number; i++)
- combo.add("fred" + i);
- combo.add("fred", 1);
- assertEquals("fred0 fred fred1 fred2", new String[]{"fred0", "fred", "fred1", "fred2"}, combo.getItems());
- combo.add("fred", 0);
- assertEquals("fred fred0 fred fred1 fred2", new String[]{"fred", "fred0", "fred", "fred1", "fred2"}, combo.getItems());
- combo.add("fred", 4);
- assertEquals("fred fred0 fred fred1 fred fred2", new String[]{"fred", "fred0", "fred", "fred1", "fred", "fred2"}, combo.getItems());
-}
-
-public void test_addModifyListenerLorg_eclipse_swt_events_ModifyListener() {
- boolean exceptionThrown = false;
- ModifyListener listener = new ModifyListener() {
- public void modifyText(ModifyEvent event) {
- listenerCalled = true;
- }
- };
- try {
- combo.addModifyListener(null);
- }
- catch (IllegalArgumentException e) {
- exceptionThrown = true;
- }
- assertTrue("Expected exception not thrown", exceptionThrown);
-
- // test whether all content modifying API methods send a Modify event
- combo.addModifyListener(listener);
- listenerCalled = false;
- combo.setText("new text");
- assertTrue("setText does not send event", listenerCalled);
-
- listenerCalled = false;
- combo.removeModifyListener(listener);
- // cause to call the listener.
- combo.setText("line");
- assertTrue("Listener not removed", listenerCalled == false);
- try {
- combo.removeModifyListener(null);
- }
- catch (IllegalArgumentException e) {
- exceptionThrown = true;
- }
-}
-
-public void test_addSelectionListenerLorg_eclipse_swt_events_SelectionListener() {
- listenerCalled = false;
- boolean exceptionThrown = false;
- SelectionListener listener = new SelectionListener() {
- public void widgetSelected(SelectionEvent event) {
- listenerCalled = true;
- }
- public void widgetDefaultSelected(SelectionEvent event) {
- }
- };
- try {
- combo.addSelectionListener(null);
- }
- catch (IllegalArgumentException e) {
- exceptionThrown = true;
- }
- combo.addSelectionListener(listener);
- combo.select(0);
- assertTrue(":a:", listenerCalled == false);
- combo.removeSelectionListener(listener);
- try {
- combo.removeSelectionListener(null);
- }
- catch (IllegalArgumentException e) {
- exceptionThrown = true;
- }
-}
-
-public void test_clearSelection() {
- int number = 5;
- for (int i = 0; i < number; i++)
- combo.add("fred" + i);
- combo.clearSelection();
- assertTrue(":a:", combo.getSelection().equals(new Point(0, 0)));
- combo.setSelection(new Point(0, 5));
- assertTrue(":b:", combo.getSelection().equals(new Point(0, 0))); //nothing is selected
- combo.setText("some text");
- combo.setSelection(new Point(0, 5));
- assertTrue(":c:", combo.getSelection().equals(new Point(0, 5)));
- combo.clearSelection();
- assertTrue(":d:", combo.getSelection().x==combo.getSelection().y);
-}
-
-public void test_computeSizeIIZ() {
- // super class test is sufficient
-}
-
-public void test_copy() {
- combo.setText("123456");
- combo.setSelection(new Point(1,3));
- combo.copy();
- combo.setSelection(new Point(0,0));
- combo.paste();
- assertTrue(":a:", combo.getText().equals("23123456"));
-}
-
-public void test_cut() {
- combo.setText("123456");
- combo.setSelection(new Point(1,3));
- combo.cut();
- assertTrue(":a:", combo.getText().equals("1456"));
-}
-
-public void test_deselectAll() {
- combo.add("123");
- combo.add("456");
- combo.add("789");
- combo.select(0);
- combo.select(2);
- combo.deselectAll();
- assertTrue(":a:", combo.getSelectionIndex()== -1);
-}
-public void test_deselectI() {
- // indices out of range are ignored
- String[] items = {"item0", "item1", "item2"};
- combo.setItems(items);
- combo.select(1);
- combo.deselect(10);
- assertEquals(1, combo.getSelectionIndex());
- combo.removeAll();
-
- combo.deselect(2);
-
- int number = 10;
- for (int i = 0; i < number; i++)
- combo.add("fred" + i);
- for (int i = 0; i < number; i++) {
- combo.select(i);
- assertTrue(":a:" + i, combo.getSelectionIndex()==i);
- combo.deselect(i);
- assertTrue(":b:" + i, combo.getSelectionIndex()==-1);
- }
-}
-
-public void test_getChildren() {
- // Combo cannot have children
-}
-
-public void test_getItemCount() {
- int number = 10;
- for (int i = 0; i < number; i++) {
- assertTrue(":a:" + i, combo.getItemCount() == i);
- combo.add("fred" + i);
- }
- assertTrue(":aa:", combo.getItemCount() == number);
-
- for (int i = 0; i < number; i++) {
- assertTrue(":b:" + i, combo.getItemCount() == number-i);
- combo.remove(0);
- }
- combo.removeAll();
- assertTrue(":c:", combo.getItemCount() == 0);
-}
-
-public void test_getItemHeight() {
- combo.getItemHeight();
-}
-
-public void test_getItemI() {
- try {
- combo.getItem(0);
- fail("No exception thrown for illegal index argument");
- }
- catch (IllegalArgumentException e) {
- }
-
- int number = 10;
- for (int i = 0; i < number; i++) {
- combo.add("fred" + i);
- }
- for (int i = 0; i < number; i++)
- assertTrue(combo.getItem(i).equals("fred" + i));
-}
-
-public void test_getItems() {
- combo.removeAll();
- combo.add("1");
- combo.add("2");
- combo.add("3");
- String[] items = combo.getItems();
- assertTrue(":a:", items.length==3);
- assertTrue(":a:", items[0].equals("1"));
- assertTrue(":a:", items[1].equals("2"));
- assertTrue(":a:", items[2].equals("3"));
-}
-
-public void test_getOrientation() {
- // tested in setOrientation
-}
-
-public void test_getSelection() {
- combo.setText("123456");
- combo.setSelection(new Point(1,3));
- combo.getSelection();
- assertTrue(":a:", combo.getSelection().equals(new Point(1,3)));
-}
-
-public void test_getSelectionIndex() {
- int number = 5;
- for (int i = 0; i < number; i++) {
- combo.add("fred");
- }
- assertEquals(-1, combo.getSelectionIndex());
- for (int i = 0; i < number; i++) {
- combo.select(i);
- assertEquals(i, combo.getSelectionIndex());
- }
-
- combo.removeAll();
- for (int i = 0; i < number; i++) {
- combo.add("fred");
- }
- assertEquals(-1, combo.getSelectionIndex());
- for (int i = 0; i < number; i++) {
- combo.select(i);
- combo.deselect(i);
- assertEquals(-1, combo.getSelectionIndex());
- }
-}
-
-public void test_getText() {
- String[] cases = {"", "fred", "fredfred"};
- for (int i = 0; i < cases.length; i++) {
- combo.setText(cases[i]);
- assertTrue(":a:" + String.valueOf(i), cases[i].equals(combo.getText()));
- }
-}
-
-public void test_getTextHeight() {
- combo.getTextHeight();
-}
-
-public void test_getTextLimit() {
- combo.setTextLimit(3);
- assertTrue(":a:", combo.getTextLimit()==3);
-}
-
-public void test_hasFocus() {
- // not public api
-}
-
-public void test_indexOfLjava_lang_String() {
- combo.add("string0");
- try {
- combo.indexOf(null);
- fail("No exception thrown for string == null");
- }
- catch (IllegalArgumentException e) {
- }
- combo.removeAll();
-
- int number = 5;
- for (int i = 0; i < number; i++)
- combo.add("fred" + i);
- for (int i = 0; i < number; i++)
- assertEquals(i, combo.indexOf("fred" + i));
-
- for (int i = 0; i < number; i++)
- combo.add("fred" + i);
- combo.removeAll();
- for (int i = 0; i < number; i++)
- assertEquals(-1, combo.indexOf("fred" + i));
-
- for (int i = 0; i < number; i++)
- combo.add("fred" + i);
- combo.remove("fred3");
- for (int i = 0; i < 3; i++)
- assertEquals(i, combo.indexOf("fred" + i));
- assertEquals(-1, combo.indexOf("fred3"));
- for (int i = 4; i < number; i++)
- assertEquals(i - 1, combo.indexOf("fred" + i));
-
- combo.removeAll();
- for (int i = 0; i < number; i++)
- combo.add("fred" + i);
- combo.remove(2);
- for (int i = 0; i < 2; i++)
- assertEquals(i, combo.indexOf("fred" + i));
- assertEquals(-1, combo.indexOf("fred2"));
- for (int i = 3; i < number; i++)
- assertEquals(i - 1, combo.indexOf("fred" + i));
-}
-
-public void test_indexOfLjava_lang_StringI() {
- combo.add("string0");
- try {
- combo.indexOf(null);
- fail("No exception thrown for string == null");
- }
- catch (IllegalArgumentException e) {
- }
- assertEquals(-1, combo.indexOf("string0", -1));
- combo.removeAll();
-
- int number = 5;
- for (int i = 0; i < number; i++)
- combo.add("fred" + i);
- for (int i = 0; i < number; i++)
- assertTrue(":a:" + i, combo.indexOf("fred" + i, 0) == i);
- for (int i = 0; i < number; i++)
- assertTrue(":b:" + i, combo.indexOf("fred" + i, i + 1) == -1);
-
- for (int i = 0; i < number; i++)
- combo.add("fred" + i);
- for (int i = 0; i < 3; i++)
- assertTrue(":a:" + i, combo.indexOf("fred" + i, 0) == i);
- for (int i = 3; i < number; i++)
- assertTrue(":b:" + i, combo.indexOf("fred" + i, 3) == i);
- for (int i = 0; i < number; i++)
- assertTrue(":b:" + i, combo.indexOf("fred" + i, i) == i);
-}
-
-public void test_paste() {
- combo.setText("123456");
- combo.setSelection(new Point(1,3));
- combo.cut();
- assertTrue(":a:", combo.getText().equals("1456"));
- combo.paste();
- assertTrue(":a:", combo.getText().equals("123456"));
-}
-
-public void test_removeAll() {
- combo.add("1");
- combo.add("2");
- combo.removeAll();
- assertTrue(":a:", combo.getItems().length==0);
-}
-
-public void test_removeI() {
- try {
- combo.remove(0);
- fail("No exception thrown for illegal index argument");
- }
- catch (IllegalArgumentException e) {
- }
-
- try {
- combo.remove(3);
- fail("No exception thrown for illegal index argument");
- }
- catch (IllegalArgumentException e) {
- }
-
- combo.add("string0");
- try {
- combo.remove(-1);
- fail("No exception thrown for illegal index argument");
- }
- catch (IllegalArgumentException e) {
- }
- combo.removeAll();
-
- int number = 5;
- for (int i = 0; i < number; i++) {
- combo.add("fred" + i);
- }
- for (int i = 0; i < number; i++) {
- assertEquals("Wrong number of items", number - i, combo.getItemCount());
- combo.remove(0);
- }
-
- for (int i = 0; i < number; i++) {
- combo.add("fred"); // all items the same
- }
- for (int i = 0; i < number; i++) {
- assertEquals("Wrong number of items", number - i, combo.getItemCount());
- combo.remove(0);
- }
-
- for (int i = 0; i < number; i++) {
- combo.add("fred" + i); // different items
- }
- for (int i = 0; i < number; i++) {
- assertEquals("index " + i, number - i, combo.getItemCount());
- combo.select(0);
- assertEquals("index " + i, 0, combo.getSelectionIndex());
- combo.remove(0);
- if (SwtJunit.isWindows) {
- // The behavior on Windows when the selected item is removed
- // is to simply say that no items are selected.
- assertEquals("index " + i, -1, combo.getSelectionIndex());
- } else {
- // The behavior on other platforms when the selected item is removed
- // is to select the item that is now at the same index, and send a
- // selection event. If there is no item at the selected index, then
- // the platform says that no items are selected.
- if (i < number - 1) {
- assertEquals("index " + i, 0, combo.getSelectionIndex());
- } else {
- assertEquals("index " + i, -1, combo.getSelectionIndex());
- }
- }
- }
-
- for (int i = 0; i < number; i++)
- combo.add("fred" + i); // different items
- for (int i = 0; i < number; i++) {
- assertEquals("index " + i, number - i, combo.getItemCount());
- combo.remove(number-i-1);
- }
-}
-
-public void test_removeII() {
- int number = 5;
- for (int i = 0; i < number; i++) {
- combo.add("fred");
- }
- combo.remove(0, 4);
- assertEquals(0, combo.getItemCount());
-
- combo.removeAll();
- for (int i = 0; i < number; i++) {
- combo.add("fred");
- }
- combo.remove(0, 2);
- assertEquals(2, combo.getItemCount());
-
- combo.removeAll();
- for (int i = 0; i < number; i++) {
- combo.add("fred");
- }
- combo.remove(2, 4);
- assertEquals(2, combo.getItemCount());
-
- combo.removeAll();
- for (int i = 0; i < number; i++) {
- combo.add("fred");
- }
- combo.remove(3, 2);
- assertEquals(number, combo.getItemCount());
-
- combo.removeAll();
- for (int i = 0; i < number; i++) {
- combo.add("fred");
- }
-
- try {
- combo.remove(2, 100);
- fail("No exception thrown for illegal index argument");
- }
- catch (IllegalArgumentException e) {
- }
-
- try {
- combo.remove(-1, number-1);
- fail("No exception thrown for start index < 0");
- }
- catch (IllegalArgumentException e) {
- }
-
-}
-
-public void test_removeLjava_lang_String() {
- int number = 5;
- for (int i = 0; i < number; i++)
- combo.add("fred" + i);
- for (int i = 0; i < number; i++) {
- assertEquals(number - i, combo.getItemCount());
- combo.remove("fred" + i);
- }
-
- for (int i = 0; i < number; i++)
- combo.add("fred");
- for (int i = 0; i < number; i++) {
- assertEquals(number - i, combo.getItemCount());
- combo.remove("fred");
- }
-
- for (int i = 0; i < number; i++)
- combo.add("fred");
- try {
- combo.remove(null);
- fail("No exception thrown for item == null");
- }
- catch (IllegalArgumentException e) {
- }
-
- combo.removeAll();
- for (int i = 0; i < number; i++)
- combo.add("fred" + i);
- try {
- combo.remove("fred");
- fail("No exception thrown for item not found");
- }
- catch (IllegalArgumentException e) {
- }
-
- assertEquals(number, combo.getItemCount());
-}
-
-public void test_removeModifyListenerLorg_eclipse_swt_events_ModifyListener() {
- // tested in addModifyListener method
-}
-
-public void test_removeSelectionListenerLorg_eclipse_swt_events_SelectionListener() {
- // tested in addSelectionListener method
-}
-public void test_selectI() {
- combo.add("123");
- combo.add("456");
- combo.add("789");
- combo.select(1);
- assertTrue(":a:", combo.getSelectionIndex()== 1);
-
- // indices out of range are ignored
- combo.select(10);
- assertEquals(1, combo.getSelectionIndex());
-}
-
-public void test_setItemILjava_lang_String() {
- try {
- combo.setItem(0, null);
- fail("No exception thrown for item == null");
- }
- catch (IllegalArgumentException e) {
- }
-
- try {
- combo.setItem(3, null);
- fail("No exception thrown for illegal index argument");
- }
- catch (IllegalArgumentException e) {
- }
-
- try {
- combo.setItem(0, "fred");
- fail("No exception thrown for illegal index argument");
- }
- catch (IllegalArgumentException e) {
- }
-
- combo.add("string0");
- try {
- combo.setItem(0, null);
- fail("No exception thrown for item == null");
- }
- catch (IllegalArgumentException e) {
- }
-
- try {
- combo.setItem(-1, "new value");
- fail("No exception thrown for index < 0");
- }
- catch (IllegalArgumentException e) {
- }
-
- combo.add("joe");
- combo.setItem(0, "fred");
- assertTrue("fred", combo.getItem(0).equals("fred"));
-
- try {
- combo.setItem(4, "fred");
- fail("No exception thrown for illegal index argument");
- }
- catch (IllegalArgumentException e) {
- }
-
- combo.removeAll();
- int number = 5;
- for (int i = 0; i < number; i++)
- combo.add("fred");
- for (int i = 0; i < number; i++)
- combo.setItem(i, "fred" + i);
- assertEquals(":a:", new String[]{"fred0", "fred1", "fred2", "fred3", "fred4"}, combo.getItems());
-}
-
-public void test_setItems$Ljava_lang_String() {
- try {
- combo.setItems(null);
- fail("No exception thrown for items == null");
- }
- catch (IllegalArgumentException e) {
- }
-
- String[][] items = {{}, {""}, {"", ""}, {"fred"}, {"fred0", "fred0"}, {"fred", "fred"}};
-
- for (int i = 0 ; i< items.length; i++){
- combo.setItems(items[i]);
- assertEquals(":a:" + i, items[i], combo.getItems());}
-}
-
-public void test_setOrientationI() {
- combo.setOrientation(SWT.RIGHT_TO_LEFT);
- if ((combo.getStyle() & SWT.MIRRORED) != 0) {
- assertTrue(":a:", combo.getOrientation()==SWT.RIGHT_TO_LEFT);
- }
- combo.setOrientation(SWT.LEFT_TO_RIGHT);
- assertTrue(":b:", combo.getOrientation()==SWT.LEFT_TO_RIGHT);
-}
-
-public void test_setSelectionLorg_eclipse_swt_graphics_Point() {
- try {
- combo.setSelection(null);
- fail("No exception thrown for point == null");
- }
- catch (IllegalArgumentException e) {
- }
-
- int number = 5;
- for (int i = 0; i < number; i++)
- combo.add("fred" + i);
- combo.setSelection(new Point(0, 5));
- assertTrue(":a:", combo.getSelection().equals(new Point(0, 0)));
- combo.setText("some text");
- combo.setSelection(new Point(0, 5));
- assertTrue(":b:", combo.getSelection().equals(new Point(0, 5)));
-}
-
-public void test_setTextLimitI() {
- try {
- combo.setTextLimit(0);
- fail("No exception thrown for limit == 0");
- }
- catch (IllegalArgumentException e) {
- }
-
- combo.setTextLimit(3);
- assertTrue(":a:", combo.getTextLimit()==3);
-}
-
-public void test_setTextLjava_lang_String() {
- try {
- combo.setText(null);
- fail("No exception thrown for text == null");
- }
- catch (IllegalArgumentException e) {
- }
-
- String[] cases = {"", "fred", "fred0"};
- for (int i = 0; i < cases.length; i++) {
- combo.setText(cases[i]);
- assertTrue(":a:" + i, combo.getText().equals(cases[i]));
- }
- for (int i = 0; i < 5; i++) {
- combo.add("fred");
- }
- for (int i = 0; i < cases.length; i++) {
- combo.setText(cases[i]);
- assertTrue(":b:" + i, combo.getText().equals(cases[i]));
- }
- for (int i = 0; i < 5; i++) {
- combo.add("fred" + i);
- }
- for (int i = 0; i < cases.length; i++) {
- combo.setText(cases[i]);
- assertTrue(":c:" + i, combo.getText().equals(cases[i]));
- }
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_widgets_Combo((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_CompositeI");
- methodNames.addElement("test_addLjava_lang_String");
- methodNames.addElement("test_addLjava_lang_StringI");
- methodNames.addElement("test_addModifyListenerLorg_eclipse_swt_events_ModifyListener");
- methodNames.addElement("test_addSelectionListenerLorg_eclipse_swt_events_SelectionListener");
- methodNames.addElement("test_clearSelection");
- methodNames.addElement("test_computeSizeIIZ");
- methodNames.addElement("test_copy");
- methodNames.addElement("test_cut");
- methodNames.addElement("test_deselectAll");
- methodNames.addElement("test_deselectI");
- methodNames.addElement("test_getItemCount");
- methodNames.addElement("test_getItemHeight");
- methodNames.addElement("test_getItemI");
- methodNames.addElement("test_getItems");
- methodNames.addElement("test_getOrientation");
- methodNames.addElement("test_getSelection");
- methodNames.addElement("test_getSelectionIndex");
- methodNames.addElement("test_getText");
- methodNames.addElement("test_getTextHeight");
- methodNames.addElement("test_getTextLimit");
- methodNames.addElement("test_indexOfLjava_lang_String");
- methodNames.addElement("test_indexOfLjava_lang_StringI");
- methodNames.addElement("test_paste");
- methodNames.addElement("test_removeAll");
- methodNames.addElement("test_removeI");
- methodNames.addElement("test_removeII");
- methodNames.addElement("test_removeLjava_lang_String");
- methodNames.addElement("test_removeModifyListenerLorg_eclipse_swt_events_ModifyListener");
- methodNames.addElement("test_removeSelectionListenerLorg_eclipse_swt_events_SelectionListener");
- methodNames.addElement("test_selectI");
- methodNames.addElement("test_setItemILjava_lang_String");
- methodNames.addElement("test_setItems$Ljava_lang_String");
- methodNames.addElement("test_setOrientationI");
- methodNames.addElement("test_setSelectionLorg_eclipse_swt_graphics_Point");
- methodNames.addElement("test_setTextLimitI");
- methodNames.addElement("test_setTextLjava_lang_String");
- methodNames.addAll(Test_org_eclipse_swt_widgets_Composite.methodNames()); // add superclass method names
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_CompositeI")) test_ConstructorLorg_eclipse_swt_widgets_CompositeI();
- else if (getName().equals("test_addLjava_lang_String")) test_addLjava_lang_String();
- else if (getName().equals("test_addLjava_lang_StringI")) test_addLjava_lang_StringI();
- else if (getName().equals("test_addModifyListenerLorg_eclipse_swt_events_ModifyListener")) test_addModifyListenerLorg_eclipse_swt_events_ModifyListener();
- else if (getName().equals("test_addSelectionListenerLorg_eclipse_swt_events_SelectionListener")) test_addSelectionListenerLorg_eclipse_swt_events_SelectionListener();
- else if (getName().equals("test_clearSelection")) test_clearSelection();
- else if (getName().equals("test_computeSizeIIZ")) test_computeSizeIIZ();
- else if (getName().equals("test_copy")) test_copy();
- else if (getName().equals("test_cut")) test_cut();
- else if (getName().equals("test_deselectAll")) test_deselectAll();
- else if (getName().equals("test_deselectI")) test_deselectI();
- else if (getName().equals("test_getItemCount")) test_getItemCount();
- else if (getName().equals("test_getItemHeight")) test_getItemHeight();
- else if (getName().equals("test_getItemI")) test_getItemI();
- else if (getName().equals("test_getItems")) test_getItems();
- else if (getName().equals("test_getOrientation")) test_getOrientation();
- else if (getName().equals("test_getSelection")) test_getSelection();
- else if (getName().equals("test_getSelectionIndex")) test_getSelectionIndex();
- else if (getName().equals("test_getText")) test_getText();
- else if (getName().equals("test_getTextHeight")) test_getTextHeight();
- else if (getName().equals("test_getTextLimit")) test_getTextLimit();
- else if (getName().equals("test_indexOfLjava_lang_String")) test_indexOfLjava_lang_String();
- else if (getName().equals("test_indexOfLjava_lang_StringI")) test_indexOfLjava_lang_StringI();
- else if (getName().equals("test_paste")) test_paste();
- else if (getName().equals("test_removeAll")) test_removeAll();
- else if (getName().equals("test_removeI")) test_removeI();
- else if (getName().equals("test_removeII")) test_removeII();
- else if (getName().equals("test_removeLjava_lang_String")) test_removeLjava_lang_String();
- else if (getName().equals("test_removeModifyListenerLorg_eclipse_swt_events_ModifyListener")) test_removeModifyListenerLorg_eclipse_swt_events_ModifyListener();
- else if (getName().equals("test_removeSelectionListenerLorg_eclipse_swt_events_SelectionListener")) test_removeSelectionListenerLorg_eclipse_swt_events_SelectionListener();
- else if (getName().equals("test_selectI")) test_selectI();
- else if (getName().equals("test_setItemILjava_lang_String")) test_setItemILjava_lang_String();
- else if (getName().equals("test_setItems$Ljava_lang_String")) test_setItems$Ljava_lang_String();
- else if (getName().equals("test_setOrientationI")) test_setOrientationI();
- else if (getName().equals("test_setSelectionLorg_eclipse_swt_graphics_Point")) test_setSelectionLorg_eclipse_swt_graphics_Point();
- else if (getName().equals("test_setTextLimitI")) test_setTextLimitI();
- else if (getName().equals("test_setTextLjava_lang_String")) test_setTextLjava_lang_String();
- else super.runTest();
-}
-
-/* custom */
-public void test_setBoundsIIII() {
- combo.setBounds(10, 20, 30, 40);
- // only check x, y, and width - you can't set the height of a combo
- assertTrue(combo.getBounds().x == 10);
- assertTrue(combo.getBounds().y == 20);
- assertTrue(combo.getBounds().width == 30);
-}
-
-public void test_setBoundsLorg_eclipse_swt_graphics_Rectangle() {
- combo.setBounds(new Rectangle(10, 20, 30, 40));
- // only check x, y, and width - you can't set the height of a combo
- assertTrue(combo.getBounds().x == 10);
- assertTrue(combo.getBounds().y == 20);
- assertTrue(combo.getBounds().width == 30);
-}
-
-public void test_setSizeII() {
- combo.setSize(30, 40);
- // only check the width - you can't set the height of a combo
- assertTrue(combo.getSize().x == 30);
-
- combo.setSize(32, 43);
- // only check the width - you can't set the height of a combo
- assertTrue(combo.getSize().x == 32);
-}
-
-public void test_setSizeLorg_eclipse_swt_graphics_Point() {
- combo.setSize(new Point(30, 40));
- // only check the width - you can't set the height of a combo
- assertTrue(combo.getSize().x == 30);
-
- combo.setBounds(32, 43, 33, 44);
- // only check the width - you can't set the height of a combo
- assertTrue(combo.getSize().x == 33);
-
- combo.setBounds(32, 43, 30, 40);
- combo.setLocation(11, 22);
- combo.setSize(new Point(32, 43));
- // only check the width - you can't set the height of a combo
- assertTrue(combo.getSize().x == 32);
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Composite.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Composite.java
deleted file mode 100644
index 558a96f6e6..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Composite.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import junit.framework.*;
-import junit.textui.*;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.widgets.Composite
- *
- * @see org.eclipse.swt.widgets.Composite
- */
-public class Test_org_eclipse_swt_widgets_Composite extends Test_org_eclipse_swt_widgets_Scrollable {
-
-Composite composite;
-
-public Test_org_eclipse_swt_widgets_Composite(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- super.setUp();
- composite = new Composite(shell, 0);
- super.setWidget(composite);
-}
-
-protected void tearDown() {
- super.tearDown();
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_CompositeI() {
- try {
- composite = new Composite(null, 0);
- fail("No exception thrown");
- }
- catch (IllegalArgumentException e) {
- }
-
- int[] cases = {SWT.H_SCROLL, SWT.V_SCROLL, SWT.H_SCROLL | SWT.V_SCROLL};
- for (int i = 0; i < cases.length; i++)
- composite = new Composite(shell, cases[i]);
-}
-
-public void test_getChildren() {
- assertEquals(":a:", new Control[]{}, composite.getChildren());
- Composite c1 = new Composite(composite, 0);
- assertEquals(":b:", new Control[]{c1}, composite.getChildren());
-
- List c2 = new List(composite, 0);
- assertEquals(":c:", new Control[]{c1, c2}, composite.getChildren());
-
- Button c3 = new Button(composite, 0);
- assertEquals(":d:", new Control[]{c1, c2, c3}, composite.getChildren());
-
- c2.dispose();
- assertEquals(":e:", new Control[]{c1, c3}, composite.getChildren());
-
- Control[] children = composite.getChildren();
- for (int i = 0; i < children.length; i++)
- children[i].dispose();
-
- assertEquals(":f:", new Control[]{}, composite.getChildren());
-}
-
-public void test_getLayout() {
- // tested in test_setLayoutLorg_eclipse_swt_widgets_Layout
-}
-
-public void test_getTabList() {
- // tested in test_setTabList$Lorg_eclipse_swt_widgets_Control
-}
-
-public void test_layout() {
- // tested in test_layoutZ
-}
-
-public void test_layoutZ() {
- // tested in specific Layout classes
-}
-
-public void test_setLayoutLorg_eclipse_swt_widgets_Layout() {
- // tested in specific Layout classes
-}
-
-public void test_setTabList$Lorg_eclipse_swt_widgets_Control() {
- Button button1 = new Button(composite, SWT.PUSH);
- Button button2 = new Button(composite, SWT.PUSH);
- Control[] tablist = new Control[] {button1, button2};
- composite.setTabList(tablist);
- assertEquals(tablist, composite.getTabList());
- button1.dispose();
- button2.dispose();
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_widgets_Composite((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_CompositeI");
- methodNames.addElement("test_getChildren");
- methodNames.addElement("test_getLayout");
- methodNames.addElement("test_getTabList");
- methodNames.addElement("test_layout");
- methodNames.addElement("test_layoutZ");
- methodNames.addElement("test_setLayoutLorg_eclipse_swt_widgets_Layout");
- methodNames.addElement("test_setTabList$Lorg_eclipse_swt_widgets_Control");
- methodNames.addAll(Test_org_eclipse_swt_widgets_Scrollable.methodNames()); // add superclass method names
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_CompositeI")) test_ConstructorLorg_eclipse_swt_widgets_CompositeI();
- else if (getName().equals("test_getChildren")) test_getChildren();
- else if (getName().equals("test_getLayout")) test_getLayout();
- else if (getName().equals("test_getTabList")) test_getTabList();
- else if (getName().equals("test_layout")) test_layout();
- else if (getName().equals("test_layoutZ")) test_layoutZ();
- else if (getName().equals("test_setLayoutLorg_eclipse_swt_widgets_Layout")) test_setLayoutLorg_eclipse_swt_widgets_Layout();
- else if (getName().equals("test_setTabList$Lorg_eclipse_swt_widgets_Control")) test_setTabList$Lorg_eclipse_swt_widgets_Control();
- else super.runTest();
-}
-
-/* custom */
-protected void setWidget(Widget w) {
- if (composite != null)
- composite.dispose();
- composite = (Composite)w;
- super.setWidget(w);
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Control.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Control.java
deleted file mode 100644
index 8587ac60fe..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Control.java
+++ /dev/null
@@ -1,874 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.accessibility.Accessible;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.widgets.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.widgets.Control
- *
- * @see org.eclipse.swt.widgets.Control
- */
-public class Test_org_eclipse_swt_widgets_Control extends Test_org_eclipse_swt_widgets_Widget {
-
-public Test_org_eclipse_swt_widgets_Control(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- super.setUp();
-}
-
-protected void tearDown() {
- super.tearDown();
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_CompositeI() {
- // abstract class
-}
-
-public void test_addControlListenerLorg_eclipse_swt_events_ControlListener() {
- ControlListener listener = new ControlListener() {
- public void controlMoved(ControlEvent e) {
- eventOccurred = true;
- };
- public void controlResized(ControlEvent e) {
- eventOccurred = true;
- };
- };
- control.addControlListener(listener);
- eventOccurred = false;
- control.notifyListeners(SWT.Move, new Event());
- assertTrue(eventOccurred);
- eventOccurred = false;
- control.notifyListeners(SWT.Resize, new Event());
- assertTrue(eventOccurred);
- control.removeControlListener(listener);
-}
-
-public void test_addFocusListenerLorg_eclipse_swt_events_FocusListener() {
- FocusListener listener = new FocusListener() {
- public void focusGained(FocusEvent e) {
- eventOccurred = true;
- };
- public void focusLost(FocusEvent e) {
- eventOccurred = true;
- };
- };
- control.addFocusListener(listener);
- eventOccurred = false;
- control.notifyListeners(SWT.FocusIn, new Event());
- assertTrue(eventOccurred);
- eventOccurred = false;
- control.notifyListeners(SWT.FocusOut, new Event());
- assertTrue(eventOccurred);
- control.removeFocusListener(listener);
-}
-
-public void test_addHelpListenerLorg_eclipse_swt_events_HelpListener() {
- HelpListener listener = new HelpListener() {
- public void helpRequested(HelpEvent e) {
- eventOccurred = true;
- };
- };
- control.addHelpListener(listener);
- eventOccurred = false;
- control.notifyListeners(SWT.Help, new Event());
- assertTrue(eventOccurred);
- control.removeHelpListener(listener);
-}
-
-public void test_addKeyListenerLorg_eclipse_swt_events_KeyListener() {
- KeyListener listener = new KeyListener() {
- public void keyPressed(KeyEvent e) {
- eventOccurred = true;
- };
- public void keyReleased(KeyEvent e) {
- eventOccurred = true;
- };
- };
- control.addKeyListener(listener);
- eventOccurred = false;
- control.notifyListeners(SWT.KeyDown, new Event());
- assertTrue(eventOccurred);
- eventOccurred = false;
- control.notifyListeners(SWT.KeyUp, new Event());
- assertTrue(eventOccurred);
- control.removeKeyListener(listener);
-}
-
-public void test_addMouseListenerLorg_eclipse_swt_events_MouseListener() {
- MouseListener listener = new MouseListener() {
- public void mouseDown(MouseEvent e) {
- eventOccurred = true;
- };
- public void mouseUp(MouseEvent e) {
- eventOccurred = true;
- };
- public void mouseDoubleClick(MouseEvent e) {
- eventOccurred = true;
- };
- };
- control.addMouseListener(listener);
- eventOccurred = false;
- control.notifyListeners(SWT.MouseDown, new Event());
- assertTrue(eventOccurred);
- eventOccurred = false;
- control.notifyListeners(SWT.MouseUp, new Event());
- assertTrue(eventOccurred);
- eventOccurred = false;
- control.notifyListeners(SWT.MouseDoubleClick, new Event());
- assertTrue(eventOccurred);
- control.removeMouseListener(listener);
-}
-
-public void test_addMouseMoveListenerLorg_eclipse_swt_events_MouseMoveListener() {
- MouseMoveListener listener = new MouseMoveListener() {
- public void mouseMove(MouseEvent e) {
- eventOccurred = true;
- };
- };
- control.addMouseMoveListener(listener);
- eventOccurred = false;
- control.notifyListeners(SWT.MouseMove, new Event());
- assertTrue(eventOccurred);
- control.removeMouseMoveListener(listener);
-}
-
-public void test_addMouseTrackListenerLorg_eclipse_swt_events_MouseTrackListener() {
- MouseTrackListener listener = new MouseTrackListener() {
- public void mouseEnter(MouseEvent e) {
- eventOccurred = true;
- };
- public void mouseExit(MouseEvent e) {
- eventOccurred = true;
- };
- public void mouseHover(MouseEvent e) {
- eventOccurred = true;
- };
- };
- control.addMouseTrackListener(listener);
- eventOccurred = false;
- control.notifyListeners(SWT.MouseEnter, new Event());
- assertTrue(eventOccurred);
- eventOccurred = false;
- control.notifyListeners(SWT.MouseExit, new Event());
- assertTrue(eventOccurred);
- eventOccurred = false;
- control.notifyListeners(SWT.MouseHover, new Event());
- assertTrue(eventOccurred);
- control.removeMouseTrackListener(listener);
-}
-
-public void test_addPaintListenerLorg_eclipse_swt_events_PaintListener() {
- PaintListener listener = new PaintListener() {
- public void paintControl(PaintEvent e) {
- eventOccurred = true;
- };
- };
- control.addPaintListener(listener);
- eventOccurred = false;
- Event event = new Event();
- GC gc = event.gc = new GC(control);
- control.notifyListeners(SWT.Paint, event);
- gc.dispose();
- assertTrue(eventOccurred);
- control.removePaintListener(listener);
-}
-
-public void test_addTraverseListenerLorg_eclipse_swt_events_TraverseListener() {
- TraverseListener listener = new TraverseListener() {
- public void keyTraversed(TraverseEvent e) {
- eventOccurred = true;
- };
- };
- control.addTraverseListener(listener);
- eventOccurred = false;
- control.notifyListeners(SWT.Traverse, new Event());
- assertTrue(eventOccurred);
- control.removeTraverseListener(listener);
-}
-
-public void test_computeSizeII() {
- control.computeSize(SWT.DEFAULT, SWT.DEFAULT);
- Point size = control.getSize();
- control.computeSize(size.x, size.y);
- assertEquals(size.x, control.getSize().x);
- assertEquals(size.y, control.getSize().y);
-}
-
-public void test_computeSizeIIZ() {
- control.computeSize(SWT.DEFAULT, SWT.DEFAULT, true);
- Point size = control.getSize();
- control.computeSize(size.x, size.y, false);
- assertEquals(size.x, control.getSize().x);
- assertEquals(size.y, control.getSize().y);
-}
-
-public void test_forceFocus() {
- // this is difficult to test in Control.
- // subclasses that wish to test this should override.
-}
-
-public void test_getAccessible() {
- Accessible accessible = control.getAccessible();
- assertTrue(":a:", accessible != null);
-}
-
-public void test_getBackground() {
- // tested in test_setBackgroundLorg_eclipse_swt_graphics_Color
-}
-
-public void test_getBorderWidth() {
- control.getBorderWidth();
-}
-
-public void test_getBounds() {
- // tested in test_setBoundsIIII and test_setBoundsLorg_eclipse_swt_graphics_Rectangle
-}
-
-public void test_getEnabled() {
- // tested in test_setEnabledZ
-}
-
-public void test_getFont() {
- // tested in test_setFontLorg_eclipse_swt_graphics_Font
-}
-
-public void test_getForeground() {
- // tested in test_setForegroundLorg_eclipse_swt_graphics_Color
-}
-
-public void test_getLayoutData() {
- // tested in test_setLayoutDataLjava_lang_Object
-}
-
-public void test_getLocation() {
- control.setBounds(32, 43, 30, 40);
- assertTrue(control.getLocation().equals(new Point(32, 43)));
-}
-
-public void test_getMenu() {
- // tested in test_setMenuLorg_eclipse_swt_widgets_Menu
-}
-
-public void test_getMonitor() {
- Monitor monitor = control.getMonitor();
- assertNotNull(monitor);
- Display display = control.getDisplay();
- Monitor[] monitors = display.getMonitors();
- int i;
- /* monitor must be listed in Display.getMonitors */
- for (i = 0; i < monitors.length; i++) {
- if (monitor.equals(monitors[i])) break;
- }
- if (i == monitors.length) {
- fail("Control.getMonitor does not return a monitor listed in Display.getMonitors");
- }
-}
-
-public void test_getParent() {
- assertEquals(shell, control.getParent());
-}
-
-public void test_getShell() {
- assertEquals(shell, control.getShell());
-}
-
-public void test_getSize() {
- // tested in test_setSizeII
-}
-
-public void test_getToolTipText() {
- // tested in test_setToolTipTextLjava_lang_String
-}
-
-public void test_getVisible() {
- // tested in test_setVisibleZ
-}
-
-public void test_internal_dispose_GCILorg_eclipse_swt_graphics_GCData() {
- // tested in test_internal_new_GCLorg_eclipse_swt_graphics_GCData
-}
-
-public void test_internal_new_GCLorg_eclipse_swt_graphics_GCData() {
- // intentionally not tested - not public API
-}
-
-public void test_isEnabled() {
- control.setEnabled(true);
- assertTrue(control.isEnabled());
-
- control.setEnabled(false);
- assertTrue(!control.isEnabled());
-}
-
-public void test_isFocusControl() {
- assertTrue(!control.isFocusControl());
-}
-
-public void test_isReparentable() {
- assertEquals ("isReparentable", control.isReparentable(), isReparentablePlatform());
-}
-
-public void test_isVisible() {
- control.setVisible(true);
- assertTrue(!control.isVisible()); //because the shell is not visible
-
- control.setVisible(false);
- assertTrue(!control.isVisible());
-
- if (!SwtJunit.isAIX) {
- control.setVisible(true);
- shell.setVisible(true);
- assertTrue("Window should be visible", control.isVisible());
- shell.setVisible(false);
- assertTrue("Window should not be visible", !control.isVisible());
- }
-}
-
-public void test_moveAboveLorg_eclipse_swt_widgets_Control() {
- control.moveAbove(null);
-
- control.moveAbove(control);
-
- Button b = new Button(shell, 0);
- control.moveAbove(b);
- b.dispose();
-}
-
-public void test_moveBelowLorg_eclipse_swt_widgets_Control() {
- control.moveBelow(null);
-
- control.moveBelow(control);
-
- Button b = new Button(shell, 0);
- control.moveBelow(b);
- b.dispose();
-}
-
-public void test_pack() {
- control.pack();
-}
-
-public void test_packZ() {
- control.pack(true);
- control.pack(false);
-}
-
-public void test_redraw() {
- control.redraw();
-}
-
-public void test_redrawIIIIZ() {
- control.redraw(0, 0, 0, 0, false);
-
- control.redraw(0, 0, 0, 0, true);
-
- control.redraw(-10, -10, -10, -10, true);
-
- control.redraw(10, 10, 10, 10, true);
-
- control.redraw(10, 10, 10, 10, false);
-
- control.redraw(10000, 10000, 10000, 10000, false);
-}
-
-public void test_removeControlListenerLorg_eclipse_swt_events_ControlListener() {
- // tested in test_addControlListenerLorg_eclipse_swt_events_ControlListener
-}
-
-public void test_removeFocusListenerLorg_eclipse_swt_events_FocusListener() {
- // tested in test_addFocusListenerLorg_eclipse_swt_events_FocusListener
-}
-
-public void test_removeHelpListenerLorg_eclipse_swt_events_HelpListener() {
- // tested in test_addHelpListenerLorg_eclipse_swt_events_HelpListener
-}
-
-public void test_removeKeyListenerLorg_eclipse_swt_events_KeyListener() {
- // tested in test_addKeyListenerLorg_eclipse_swt_events_KeyListener
-}
-
-public void test_removeMouseListenerLorg_eclipse_swt_events_MouseListener() {
- // tested in test_addMouseListenerLorg_eclipse_swt_events_MouseListener
-}
-
-public void test_removeMouseMoveListenerLorg_eclipse_swt_events_MouseMoveListener() {
- // tested in test_addMouseMoveListenerLorg_eclipse_swt_events_MouseMoveListener
-}
-
-public void test_removeMouseTrackListenerLorg_eclipse_swt_events_MouseTrackListener() {
- // tested in test_addMouseTrackListenerLorg_eclipse_swt_events_MouseTrackListener
-}
-
-public void test_removePaintListenerLorg_eclipse_swt_events_PaintListener() {
- // tested in test_addPaintListenerLorg_eclipse_swt_events_PaintListener
-}
-
-public void test_removeTraverseListenerLorg_eclipse_swt_events_TraverseListener() {
- // tested in test_addTraverseListenerLorg_eclipse_swt_events_TraverseListener
-}
-
-public void test_setBackgroundLorg_eclipse_swt_graphics_Color() {
- Color color = new Color(control.getDisplay(), 255, 0, 0);
- control.setBackground(color);
- assertEquals(color, control.getBackground());
- control.setBackground(null);
- assertTrue(!control.getBackground().equals(color));
- color.dispose();
-}
-
-public void test_setBoundsIIII() {
- control.setBounds(10, 20, 30, 40);
- assertEquals(new Rectangle(10, 20, 30, 40), control.getBounds());
-
- control.setBounds(20, 30, 40, 50);
- assertEquals(false, control.getBounds().equals(new Rectangle(10, 20, 30, 40)));
-
- control.setBounds(10, 20, 30, 40);
-}
-
-public void test_setBoundsLorg_eclipse_swt_graphics_Rectangle() {
- control.setBounds(new Rectangle(10, 20, 30, 40));
- assertEquals(new Rectangle(10, 20, 30, 40), control.getBounds());
-
- control.setBounds(new Rectangle(20, 30, 40, 50));
- assertEquals(false, control.getBounds().equals(new Rectangle(10, 20, 30, 40)));
-
- try {
- control.setBounds(null);
- fail("No exception thrown for rectangle == null");
- }
- catch (IllegalArgumentException e) {
- }
-
- control.setBounds(new Rectangle(10, 20, 30, 40));
-}
-
-public void test_setCaptureZ() {
- control.setCapture(true);
-
- control.setCapture(false);
-}
-
-public void test_setCursorLorg_eclipse_swt_graphics_Cursor() {
- control.setCursor(null);
-
- Cursor c = new Cursor(control.getDisplay(), 0);
- control.setCursor(c);
- c.dispose();
-}
-
-public void test_setEnabledZ() {
- control.setEnabled(true);
- assertTrue(control.getEnabled());
-
- control.setEnabled(false);
- assertTrue(!control.getEnabled());
-}
-
-public void test_setFocus() {
- control.setFocus();
-}
-
-public void test_setFontLorg_eclipse_swt_graphics_Font() {
- Font font = control.getFont();
- control.setFont(font);
- assertEquals(font, control.getFont());
-
- font = new Font(control.getDisplay(), SwtJunit.testFontName, 10, SWT.NORMAL);
- control.setFont(font);
- assertEquals(font, control.getFont());
-
- control.setFont(null);
- font.dispose();
- try {
- control.setFont(font);
- control.setFont(null);
- fail("No exception thrown for disposed font");
- } catch (IllegalArgumentException e) {
- }
-}
-
-public void test_setForegroundLorg_eclipse_swt_graphics_Color() {
- Color color = new Color(control.getDisplay(), 255, 0, 0);
- control.setForeground(color);
- assertEquals(color, control.getForeground());
- control.setForeground(null);
- assertTrue(!control.getForeground().equals(color));
- color.dispose();
-}
-
-public void test_setLayoutDataLjava_lang_Object() {
- control.setLayoutData(this);
- assertEquals(this, control.getLayoutData());
-
- control.setLayoutData("asldsahdahcaslcshdac");
- assertEquals("asldsahdahcaslcshdac", control.getLayoutData());
-
- control.setLayoutData(this.getClass());
- assertEquals(this.getClass(), control.getLayoutData());
-
- control.setLayoutData(null);
- assertNull(control.getLayoutData());
-}
-
-public void test_setLocationII() {
- control.setBounds(32, 43, 30, 40);
- control.setLocation(11, 22);
- control.setSize(32, 43);
- assertEquals(control.getLocation(), new Point(11, 22));
-
- control.setLocation(10, 10);
- assertEquals(control.getLocation(), new Point(10, 10));
-}
-
-public void test_setLocationLorg_eclipse_swt_graphics_Point() {
- try {
- control.setLocation(null);
- fail("No exception thrown for location == null");
- }
- catch (IllegalArgumentException e) {
- }
-
- Point loc = new Point(30, 40);
- control.setLocation(loc);
- assertEquals(control.getLocation(), loc);
-
- loc = new Point(10, 10);
- control.setLocation(loc);
- assertEquals(control.getLocation(), loc);
-
- loc = new Point(10000, 10000);
- control.setLocation(loc);
- assertEquals(control.getLocation(), loc);
-
- loc = new Point(-10, -10);
- control.setLocation(loc);
- assertEquals(control.getLocation(), loc);
-}
-
-public void test_setMenuLorg_eclipse_swt_widgets_Menu () {
- /* this is a valid thing to do, you can reset a menu to nothing */
- control.setMenu(null);
-
- Menu m = new Menu(control);
- control.setMenu(m);
- assertEquals(m, control.getMenu());
-}
-
-public void test_setParentLorg_eclipse_swt_widgets_Composite() {
- if (control.isReparentable()) {
- Shell originalParent = new Shell();
- Shell newParent = new Shell();
- Button b = new Button(originalParent, SWT.PUSH);
- b.setParent(newParent);
- originalParent.dispose();
- assertTrue(!b.isDisposed());
- newParent.dispose();
- }
-}
-
-public void test_setRedrawZ() {
- control.setRedraw(false);
-
- control.setRedraw(true);
-}
-
-public void test_setSizeII() {
- control.setBounds(32, 43, 30, 40);
- assertEquals(new Point(30, 40), control.getSize());
-
- control.setBounds(32, 43, 30, 40);
- control.setLocation(11, 22);
- control.setSize(32, 43);
- assertEquals(new Point(32, 43), control.getSize());
-
- control.setSize(0, 0);
-
- control.setSize(10, 10);
-
- control.setSize(10000, 10000);
-
- control.setSize(-10, -10);
-}
-
-public void test_setSizeLorg_eclipse_swt_graphics_Point() {
- control.setSize(new Point(30, 40));
- assertEquals(new Point(30, 40), control.getSize());
-
- try {
- control.setSize(null);
- fail("No exception thrown for size == null");
- }
- catch (IllegalArgumentException e) {
- }
-
- control.setSize(new Point(0, 0));
-
- control.setSize(new Point(10, 10));
-
- control.setSize(new Point(10000, 10000));
-
- control.setSize(new Point(-10, -10));
-}
-
-public void test_setToolTipTextLjava_lang_String() {
- control.setToolTipText("This is a tip");
- assertEquals("This is a tip", control.getToolTipText());
-
- control.setToolTipText(null);
- assertNull(control.getToolTipText());
-}
-
-public void test_setVisibleZ() {
- control.setVisible(true);
- assertTrue(control.getVisible());
-
- control.setVisible(false);
- assertTrue(!control.getVisible());
-}
-
-public void test_toControlII() {
- Point controlCoords = control.toControl(0, 0);
- assertEquals(new Point(0, 0), control.toDisplay(controlCoords.x, controlCoords.y));
-}
-
-public void test_toControlLorg_eclipse_swt_graphics_Point() {
- Point controlCoords = control.toControl(new Point(0, 0));
- assertEquals(new Point(0, 0), control.toDisplay(controlCoords));
- try {
- control.toControl(null);
- fail("No exception thrown for size == null");
- }
- catch (IllegalArgumentException e) {
- }
-}
-
-public void test_toDisplayII() {
- Point displayCoords = control.toDisplay(0, 0);
- assertEquals(new Point(0, 0), control.toControl(displayCoords.x, displayCoords.y));
-}
-
-public void test_toDisplayLorg_eclipse_swt_graphics_Point() {
- Point displayCoords = control.toDisplay(new Point(0, 0));
- assertEquals(new Point(0, 0), control.toControl(displayCoords));
- try {
- control.toDisplay(null);
- fail("No exception thrown for size == null");
- }
- catch (IllegalArgumentException e) {
- }
-}
-
-public void test_traverseI() {
- control.traverse(SWT.TRAVERSE_ESCAPE);
- control.traverse(SWT.TRAVERSE_RETURN);
- control.traverse(SWT.TRAVERSE_TAB_NEXT);
- control.traverse(SWT.TRAVERSE_TAB_PREVIOUS);
- control.traverse(SWT.TRAVERSE_ARROW_NEXT);
- control.traverse(SWT.TRAVERSE_ARROW_PREVIOUS);
-}
-
-public void test_update() {
- control.update();
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_widgets_Control((String)e.nextElement()));
- }
- return suite;
-}
-
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_CompositeI");
- methodNames.addElement("test_addControlListenerLorg_eclipse_swt_events_ControlListener");
- methodNames.addElement("test_addFocusListenerLorg_eclipse_swt_events_FocusListener");
- methodNames.addElement("test_addHelpListenerLorg_eclipse_swt_events_HelpListener");
- methodNames.addElement("test_addKeyListenerLorg_eclipse_swt_events_KeyListener");
- methodNames.addElement("test_addMouseListenerLorg_eclipse_swt_events_MouseListener");
- methodNames.addElement("test_addMouseMoveListenerLorg_eclipse_swt_events_MouseMoveListener");
- methodNames.addElement("test_addMouseTrackListenerLorg_eclipse_swt_events_MouseTrackListener");
- methodNames.addElement("test_addPaintListenerLorg_eclipse_swt_events_PaintListener");
- methodNames.addElement("test_addTraverseListenerLorg_eclipse_swt_events_TraverseListener");
- methodNames.addElement("test_computeSizeII");
- methodNames.addElement("test_computeSizeIIZ");
- methodNames.addElement("test_forceFocus");
- methodNames.addElement("test_getAccessible");
- methodNames.addElement("test_getBackground");
- methodNames.addElement("test_getBorderWidth");
- methodNames.addElement("test_getBounds");
- methodNames.addElement("test_getEnabled");
- methodNames.addElement("test_getFont");
- methodNames.addElement("test_getForeground");
- methodNames.addElement("test_getLayoutData");
- methodNames.addElement("test_getLocation");
- methodNames.addElement("test_getMenu");
- methodNames.addElement("test_getMonitor");
- methodNames.addElement("test_getParent");
- methodNames.addElement("test_getShell");
- methodNames.addElement("test_getSize");
- methodNames.addElement("test_getToolTipText");
- methodNames.addElement("test_getVisible");
- methodNames.addElement("test_internal_dispose_GCILorg_eclipse_swt_graphics_GCData");
- methodNames.addElement("test_internal_new_GCLorg_eclipse_swt_graphics_GCData");
- methodNames.addElement("test_isEnabled");
- methodNames.addElement("test_isFocusControl");
- methodNames.addElement("test_isReparentable");
- methodNames.addElement("test_isVisible");
- methodNames.addElement("test_moveAboveLorg_eclipse_swt_widgets_Control");
- methodNames.addElement("test_moveBelowLorg_eclipse_swt_widgets_Control");
- methodNames.addElement("test_pack");
- methodNames.addElement("test_packZ");
- methodNames.addElement("test_redraw");
- methodNames.addElement("test_redrawIIIIZ");
- methodNames.addElement("test_removeControlListenerLorg_eclipse_swt_events_ControlListener");
- methodNames.addElement("test_removeFocusListenerLorg_eclipse_swt_events_FocusListener");
- methodNames.addElement("test_removeHelpListenerLorg_eclipse_swt_events_HelpListener");
- methodNames.addElement("test_removeKeyListenerLorg_eclipse_swt_events_KeyListener");
- methodNames.addElement("test_removeMouseListenerLorg_eclipse_swt_events_MouseListener");
- methodNames.addElement("test_removeMouseMoveListenerLorg_eclipse_swt_events_MouseMoveListener");
- methodNames.addElement("test_removeMouseTrackListenerLorg_eclipse_swt_events_MouseTrackListener");
- methodNames.addElement("test_removePaintListenerLorg_eclipse_swt_events_PaintListener");
- methodNames.addElement("test_removeTraverseListenerLorg_eclipse_swt_events_TraverseListener");
- methodNames.addElement("test_setBackgroundLorg_eclipse_swt_graphics_Color");
- methodNames.addElement("test_setBoundsIIII");
- methodNames.addElement("test_setBoundsLorg_eclipse_swt_graphics_Rectangle");
- methodNames.addElement("test_setCaptureZ");
- methodNames.addElement("test_setCursorLorg_eclipse_swt_graphics_Cursor");
- methodNames.addElement("test_setEnabledZ");
- methodNames.addElement("test_setFocus");
- methodNames.addElement("test_setFontLorg_eclipse_swt_graphics_Font");
- methodNames.addElement("test_setForegroundLorg_eclipse_swt_graphics_Color");
- methodNames.addElement("test_setLayoutDataLjava_lang_Object");
- methodNames.addElement("test_setLocationII");
- methodNames.addElement("test_setLocationLorg_eclipse_swt_graphics_Point");
- methodNames.addElement("test_setMenuLorg_eclipse_swt_widgets_Menu");
- methodNames.addElement("test_setParentLorg_eclipse_swt_widgets_Composite");
- methodNames.addElement("test_setRedrawZ");
- methodNames.addElement("test_setSizeII");
- methodNames.addElement("test_setSizeLorg_eclipse_swt_graphics_Point");
- methodNames.addElement("test_setToolTipTextLjava_lang_String");
- methodNames.addElement("test_setVisibleZ");
- methodNames.addElement("test_toControlII");
- methodNames.addElement("test_toControlLorg_eclipse_swt_graphics_Point");
- methodNames.addElement("test_toDisplayII");
- methodNames.addElement("test_toDisplayLorg_eclipse_swt_graphics_Point");
- methodNames.addElement("test_traverseI");
- methodNames.addElement("test_update");
- methodNames.addAll(Test_org_eclipse_swt_widgets_Widget.methodNames()); // add superclass method names
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_CompositeI")) test_ConstructorLorg_eclipse_swt_widgets_CompositeI();
- else if (getName().equals("test_addControlListenerLorg_eclipse_swt_events_ControlListener")) test_addControlListenerLorg_eclipse_swt_events_ControlListener();
- else if (getName().equals("test_addFocusListenerLorg_eclipse_swt_events_FocusListener")) test_addFocusListenerLorg_eclipse_swt_events_FocusListener();
- else if (getName().equals("test_addHelpListenerLorg_eclipse_swt_events_HelpListener")) test_addHelpListenerLorg_eclipse_swt_events_HelpListener();
- else if (getName().equals("test_addKeyListenerLorg_eclipse_swt_events_KeyListener")) test_addKeyListenerLorg_eclipse_swt_events_KeyListener();
- else if (getName().equals("test_addMouseListenerLorg_eclipse_swt_events_MouseListener")) test_addMouseListenerLorg_eclipse_swt_events_MouseListener();
- else if (getName().equals("test_addMouseMoveListenerLorg_eclipse_swt_events_MouseMoveListener")) test_addMouseMoveListenerLorg_eclipse_swt_events_MouseMoveListener();
- else if (getName().equals("test_addMouseTrackListenerLorg_eclipse_swt_events_MouseTrackListener")) test_addMouseTrackListenerLorg_eclipse_swt_events_MouseTrackListener();
- else if (getName().equals("test_addPaintListenerLorg_eclipse_swt_events_PaintListener")) test_addPaintListenerLorg_eclipse_swt_events_PaintListener();
- else if (getName().equals("test_addTraverseListenerLorg_eclipse_swt_events_TraverseListener")) test_addTraverseListenerLorg_eclipse_swt_events_TraverseListener();
- else if (getName().equals("test_computeSizeII")) test_computeSizeII();
- else if (getName().equals("test_computeSizeIIZ")) test_computeSizeIIZ();
- else if (getName().equals("test_forceFocus")) test_forceFocus();
- else if (getName().equals("test_getAccessible")) test_getAccessible();
- else if (getName().equals("test_getBackground")) test_getBackground();
- else if (getName().equals("test_getBorderWidth")) test_getBorderWidth();
- else if (getName().equals("test_getBounds")) test_getBounds();
- else if (getName().equals("test_getEnabled")) test_getEnabled();
- else if (getName().equals("test_getFont")) test_getFont();
- else if (getName().equals("test_getForeground")) test_getForeground();
- else if (getName().equals("test_getLayoutData")) test_getLayoutData();
- else if (getName().equals("test_getLocation")) test_getLocation();
- else if (getName().equals("test_getMenu")) test_getMenu();
- else if (getName().equals("test_getMonitor")) test_getMonitor();
- else if (getName().equals("test_getParent")) test_getParent();
- else if (getName().equals("test_getShell")) test_getShell();
- else if (getName().equals("test_getSize")) test_getSize();
- else if (getName().equals("test_getToolTipText")) test_getToolTipText();
- else if (getName().equals("test_getVisible")) test_getVisible();
- else if (getName().equals("test_internal_dispose_GCILorg_eclipse_swt_graphics_GCData")) test_internal_dispose_GCILorg_eclipse_swt_graphics_GCData();
- else if (getName().equals("test_internal_new_GCLorg_eclipse_swt_graphics_GCData")) test_internal_new_GCLorg_eclipse_swt_graphics_GCData();
- else if (getName().equals("test_isEnabled")) test_isEnabled();
- else if (getName().equals("test_isFocusControl")) test_isFocusControl();
- else if (getName().equals("test_isReparentable")) test_isReparentable();
- else if (getName().equals("test_isVisible")) test_isVisible();
- else if (getName().equals("test_moveAboveLorg_eclipse_swt_widgets_Control")) test_moveAboveLorg_eclipse_swt_widgets_Control();
- else if (getName().equals("test_moveBelowLorg_eclipse_swt_widgets_Control")) test_moveBelowLorg_eclipse_swt_widgets_Control();
- else if (getName().equals("test_pack")) test_pack();
- else if (getName().equals("test_packZ")) test_packZ();
- else if (getName().equals("test_redraw")) test_redraw();
- else if (getName().equals("test_redrawIIIIZ")) test_redrawIIIIZ();
- else if (getName().equals("test_removeControlListenerLorg_eclipse_swt_events_ControlListener")) test_removeControlListenerLorg_eclipse_swt_events_ControlListener();
- else if (getName().equals("test_removeFocusListenerLorg_eclipse_swt_events_FocusListener")) test_removeFocusListenerLorg_eclipse_swt_events_FocusListener();
- else if (getName().equals("test_removeHelpListenerLorg_eclipse_swt_events_HelpListener")) test_removeHelpListenerLorg_eclipse_swt_events_HelpListener();
- else if (getName().equals("test_removeKeyListenerLorg_eclipse_swt_events_KeyListener")) test_removeKeyListenerLorg_eclipse_swt_events_KeyListener();
- else if (getName().equals("test_removeMouseListenerLorg_eclipse_swt_events_MouseListener")) test_removeMouseListenerLorg_eclipse_swt_events_MouseListener();
- else if (getName().equals("test_removeMouseMoveListenerLorg_eclipse_swt_events_MouseMoveListener")) test_removeMouseMoveListenerLorg_eclipse_swt_events_MouseMoveListener();
- else if (getName().equals("test_removeMouseTrackListenerLorg_eclipse_swt_events_MouseTrackListener")) test_removeMouseTrackListenerLorg_eclipse_swt_events_MouseTrackListener();
- else if (getName().equals("test_removePaintListenerLorg_eclipse_swt_events_PaintListener")) test_removePaintListenerLorg_eclipse_swt_events_PaintListener();
- else if (getName().equals("test_removeTraverseListenerLorg_eclipse_swt_events_TraverseListener")) test_removeTraverseListenerLorg_eclipse_swt_events_TraverseListener();
- else if (getName().equals("test_setBackgroundLorg_eclipse_swt_graphics_Color")) test_setBackgroundLorg_eclipse_swt_graphics_Color();
- else if (getName().equals("test_setBoundsIIII")) test_setBoundsIIII();
- else if (getName().equals("test_setBoundsLorg_eclipse_swt_graphics_Rectangle")) test_setBoundsLorg_eclipse_swt_graphics_Rectangle();
- else if (getName().equals("test_setCaptureZ")) test_setCaptureZ();
- else if (getName().equals("test_setCursorLorg_eclipse_swt_graphics_Cursor")) test_setCursorLorg_eclipse_swt_graphics_Cursor();
- else if (getName().equals("test_setEnabledZ")) test_setEnabledZ();
- else if (getName().equals("test_setFocus")) test_setFocus();
- else if (getName().equals("test_setFontLorg_eclipse_swt_graphics_Font")) test_setFontLorg_eclipse_swt_graphics_Font();
- else if (getName().equals("test_setForegroundLorg_eclipse_swt_graphics_Color")) test_setForegroundLorg_eclipse_swt_graphics_Color();
- else if (getName().equals("test_setLayoutDataLjava_lang_Object")) test_setLayoutDataLjava_lang_Object();
- else if (getName().equals("test_setLocationII")) test_setLocationII();
- else if (getName().equals("test_setLocationLorg_eclipse_swt_graphics_Point")) test_setLocationLorg_eclipse_swt_graphics_Point();
- else if (getName().equals("test_setMenuLorg_eclipse_swt_widgets_Menu")) test_setMenuLorg_eclipse_swt_widgets_Menu();
- else if (getName().equals("test_setParentLorg_eclipse_swt_widgets_Composite")) test_setParentLorg_eclipse_swt_widgets_Composite();
- else if (getName().equals("test_setRedrawZ")) test_setRedrawZ();
- else if (getName().equals("test_setSizeII")) test_setSizeII();
- else if (getName().equals("test_setSizeLorg_eclipse_swt_graphics_Point")) test_setSizeLorg_eclipse_swt_graphics_Point();
- else if (getName().equals("test_setToolTipTextLjava_lang_String")) test_setToolTipTextLjava_lang_String();
- else if (getName().equals("test_setVisibleZ")) test_setVisibleZ();
- else if (getName().equals("test_toControlII")) test_toControlII();
- else if (getName().equals("test_toControlLorg_eclipse_swt_graphics_Point")) test_toControlLorg_eclipse_swt_graphics_Point();
- else if (getName().equals("test_toDisplayII")) test_toDisplayII();
- else if (getName().equals("test_toDisplayLorg_eclipse_swt_graphics_Point")) test_toDisplayLorg_eclipse_swt_graphics_Point();
- else if (getName().equals("test_traverseI")) test_traverseI();
- else if (getName().equals("test_update")) test_update();
- else super.runTest();
-}
-
-/* custom */
- Control control;
- boolean eventOccurred;
-
-protected void setWidget(Widget w) {
- control = (Control)w;
- super.setWidget(w);
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_CoolBar.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_CoolBar.java
deleted file mode 100644
index 6fee58df19..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_CoolBar.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-import org.eclipse.swt.widgets.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.widgets.CoolBar
- *
- * @see org.eclipse.swt.widgets.CoolBar
- */
-public class Test_org_eclipse_swt_widgets_CoolBar extends Test_org_eclipse_swt_widgets_Composite {
-
-public Test_org_eclipse_swt_widgets_CoolBar(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- super.setUp();
- CoolBar coolBar = new CoolBar(shell, 0);
- setWidget(coolBar);
-}
-
-protected void tearDown() {
- super.tearDown();
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_CompositeI() {
- warnUnimpl("Test test_ConstructorLorg_eclipse_swt_widgets_CompositeI not written");
-}
-
-public void test_computeSizeIIZ() {
- warnUnimpl( "Test test_computeSizeIIZ not written");
-}
-
-public void test_getItemCount() {
- warnUnimpl("Test test_getItemCount not written");
-}
-
-public void test_getItemI() {
- warnUnimpl("Test test_getItemI not written");
-}
-
-public void test_getItemOrder() {
- warnUnimpl("Test test_getItemOrder not written");
-}
-
-public void test_getItemSizes() {
- warnUnimpl("Test test_getItemSizes not written");
-}
-
-public void test_getItems() {
- warnUnimpl("Test test_getItems not written");
-}
-
-public void test_getLocked() {
- warnUnimpl("Test test_getLocked not written");
-}
-
-public void test_getWrapIndices() {
- warnUnimpl("Test test_getWrapIndices not written");
-}
-
-public void test_indexOfLorg_eclipse_swt_widgets_CoolItem() {
- warnUnimpl("Test test_indexOfLorg_eclipse_swt_widgets_CoolItem not written");
-}
-
-public void test_setItemLayout$I$I$Lorg_eclipse_swt_graphics_Point() {
- warnUnimpl("Test test_setItemLayout$I$I$Lorg_eclipse_swt_graphics_Point not written");
-}
-
-public void test_setLockedZ() {
- warnUnimpl("Test test_setLockedZ not written");
-}
-
-public void test_setWrapIndices$I() {
- warnUnimpl("Test test_setWrapIndices$I not written");
-}
-
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_widgets_CoolBar((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_CompositeI");
- methodNames.addElement("test_computeSizeIIZ");
- methodNames.addElement("test_getItemCount");
- methodNames.addElement("test_getItemI");
- methodNames.addElement("test_getItemOrder");
- methodNames.addElement("test_getItemSizes");
- methodNames.addElement("test_getItems");
- methodNames.addElement("test_getLocked");
- methodNames.addElement("test_getWrapIndices");
- methodNames.addElement("test_indexOfLorg_eclipse_swt_widgets_CoolItem");
- methodNames.addElement("test_setItemLayout$I$I$Lorg_eclipse_swt_graphics_Point");
- methodNames.addElement("test_setLockedZ");
- methodNames.addElement("test_setWrapIndices$I");
- methodNames.addAll(Test_org_eclipse_swt_widgets_Composite.methodNames()); // add superclass method names
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_CompositeI")) test_ConstructorLorg_eclipse_swt_widgets_CompositeI();
- else if (getName().equals("test_computeSizeIIZ")) test_computeSizeIIZ();
- else if (getName().equals("test_getItemCount")) test_getItemCount();
- else if (getName().equals("test_getItemI")) test_getItemI();
- else if (getName().equals("test_getItemOrder")) test_getItemOrder();
- else if (getName().equals("test_getItemSizes")) test_getItemSizes();
- else if (getName().equals("test_getItems")) test_getItems();
- else if (getName().equals("test_getLocked")) test_getLocked();
- else if (getName().equals("test_getWrapIndices")) test_getWrapIndices();
- else if (getName().equals("test_indexOfLorg_eclipse_swt_widgets_CoolItem")) test_indexOfLorg_eclipse_swt_widgets_CoolItem();
- else if (getName().equals("test_setItemLayout$I$I$Lorg_eclipse_swt_graphics_Point")) test_setItemLayout$I$I$Lorg_eclipse_swt_graphics_Point();
- else if (getName().equals("test_setLockedZ")) test_setLockedZ();
- else if (getName().equals("test_setWrapIndices$I")) test_setWrapIndices$I();
- else super.runTest();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_CoolItem.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_CoolItem.java
deleted file mode 100644
index 49c4d590cc..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_CoolItem.java
+++ /dev/null
@@ -1,351 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import junit.framework.*;
-import junit.textui.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.widgets.CoolItem
- *
- * @see org.eclipse.swt.widgets.CoolItem
- */
-public class Test_org_eclipse_swt_widgets_CoolItem extends Test_org_eclipse_swt_widgets_Item {
-
-public Test_org_eclipse_swt_widgets_CoolItem(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- super.setUp();
- CoolBar coolBar = new CoolBar(shell, 0);
- CoolItem coolItem = new CoolItem(coolBar, 0);
- setWidget(coolItem);
-}
-
-protected void tearDown() {
- super.tearDown();
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_CoolBarI() {
- CoolBar coolBar = new CoolBar(shell, 0);
- CoolItem coolItem = new CoolItem(coolBar, 0);
-
- try {
- coolItem = new CoolItem(null, 0);
- fail("No exception thrown for parent == null");
- }
- catch (IllegalArgumentException e) {
- }
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_CoolBarII() {
- CoolBar coolBar = new CoolBar(shell, 0);
- CoolItem coolItem = new CoolItem(coolBar, 0, 0);
- try {
- coolItem = new CoolItem(coolBar, 0, -1);
- fail("No exception thrown for index == -1");
- }
- catch (IllegalArgumentException e){
- }
- try {
- coolItem = new CoolItem(coolBar, 0, 2);
- fail("No exception thrown for index == 2");
- }
- catch (IllegalArgumentException e){
- }
- assertEquals(1, coolBar.getItemCount());
- coolItem = new CoolItem(coolBar, 0, 1);
- assertEquals(2, coolBar.getItemCount());
- coolItem = new CoolItem(coolBar, 0, 0);
- assertEquals(3, coolBar.getItemCount());
- assertEquals(coolItem, coolBar.getItem(0));
-}
-
-public void test_addSelectionListenerLorg_eclipse_swt_events_SelectionListener() {
- warnUnimpl("Test test_addSelectionListenerLorg_eclipse_swt_events_SelectionListener not written");
-}
-
-public void test_computeSizeII() {
- CoolBar coolBar = new CoolBar(shell, 0);
- CoolItem coolItem = new CoolItem(coolBar, 0);
- Button button = new Button(coolBar, SWT.PUSH);
- button.setText("foo");
-
- Point size = coolItem.computeSize(SWT.DEFAULT, SWT.DEFAULT);
- Point size2 = coolItem.computeSize(0, 0);
- assertEquals(size, size2);
-
- coolItem.setControl(button);
- size2 = coolItem.computeSize(SWT.DEFAULT, SWT.DEFAULT);
- assertTrue(size2.x > size.x);
-
- size = coolItem.computeSize(50, 25);
- size2 = coolItem.computeSize(100, 25);
- assertEquals(size.x + 50, size2.x);
- assertEquals(size.y, size2.y);
-
- size = coolItem.computeSize(1,1);
- size2 = coolItem.computeSize(26, 26);
- assertEquals(25, size2.x - size.x);
-}
-
-public void test_getBounds() {
- CoolBar coolBar = new CoolBar(shell, 0);
- CoolItem coolItem = new CoolItem(coolBar, 0);
- Button button = new Button(coolBar, SWT.PUSH);
- button.setText("foo");
- coolItem.setControl(button);
-
- Rectangle rect = coolItem.getBounds();
- Point size = coolItem.getSize();
- assertEquals(size.x, rect.width);
- assertEquals(size.y, rect.height);
-
- coolItem.setSize(25, 25);
- rect = coolItem.getBounds();
- coolItem.setSize(100, 25);
- Rectangle newRect = coolItem.getBounds();
- assertEquals(rect.width + 75, newRect.width);
- assertEquals(rect.x, newRect.x);
- assertEquals(rect.y, newRect.y);
-}
-
-public void test_getControl() {
- CoolBar coolBar = new CoolBar(shell, 0);
- CoolItem coolItem = new CoolItem(coolBar, 0);
- assertNull(coolItem.getControl());
-
- Button button = new Button(coolBar, SWT.PUSH);
- coolItem.setControl(button);
- Control control = coolItem.getControl();
- assertEquals(button, control);
-
- button = new Button(coolBar, SWT.PUSH);
- coolItem.setControl(button);
- control = coolItem.getControl();
- assertEquals(button, control);
-}
-
-public void test_getMinimumSize() {
- warnUnimpl("Test test_getMinimumSize not written");
-}
-
-public void test_getParent() {
- CoolBar coolBar = new CoolBar(shell, 0);
- CoolItem coolItem = new CoolItem(coolBar, 0);
- assertEquals(coolBar, coolItem.getParent());
-}
-
-public void test_getPreferredSize() {
- CoolBar coolBar = new CoolBar(shell, 0);
- CoolItem coolItem = new CoolItem(coolBar, 0);
- Button button = new Button(coolBar, SWT.PUSH);
- button.setText("foobar");
- coolItem.setControl(button);
-
- Point pref = coolItem.getPreferredSize();
- coolItem.setPreferredSize(pref);
- assertEquals(pref, coolItem.getPreferredSize());
-}
-
-public void test_getSize() {
- CoolBar coolBar = new CoolBar(shell, 0);
- CoolItem coolItem = new CoolItem(coolBar, 0);
- Button button = new Button(coolBar, SWT.PUSH);
- button.setText("foo");
- coolItem.setControl(button);
-
- Point size = coolItem.getSize();
- Rectangle rect = coolItem.getBounds();
- assertEquals(rect.width, size.x);
- assertEquals(rect.height, size.y);
-}
-
-public void test_removeSelectionListenerLorg_eclipse_swt_events_SelectionListener() {
- warnUnimpl("Test test_removeSelectionListenerLorg_eclipse_swt_events_SelectionListener not written");
-}
-
-public void test_setControlLorg_eclipse_swt_widgets_Control() {
- CoolBar coolBar = new CoolBar(shell, 0);
- CoolItem coolItem = new CoolItem(coolBar, 0);
- coolItem.setControl(null);
-
- Button button = new Button(coolBar, SWT.PUSH);
- button.setText("foobar");
-
- Point size = coolItem.getSize();
- coolItem.setControl(button);
- Point size2 = coolItem.getSize();
- assertTrue(size2.x > size.x);
-
- if (!MINIMAL_CONFORMANCE) {
- size = button.computeSize(SWT.DEFAULT, SWT.DEFAULT);
- size2 = coolItem.computeSize(size.x, size.y);
- assertEquals(size2, coolItem.getSize());
- }
-
- button = new Button(coolBar, SWT.PUSH);
- button.dispose();
- try {
- coolItem.setControl(button);
- fail("No exception when control.isDisposed()");
- }
- catch (IllegalArgumentException e) {
- }
-
- button = new Button(shell, SWT.PUSH);
- try {
- coolItem.setControl(button);
- fail("No exception thrown when control has wrong parent");
- }
- catch (IllegalArgumentException e) {
- }
-}
-
-public void test_setMinimumSizeII() {
- warnUnimpl("Test test_setMinimumSizeII not written");
-}
-
-public void test_setMinimumSizeLorg_eclipse_swt_graphics_Point() {
- warnUnimpl("Test test_setMinimumSizeLorg_eclipse_swt_graphics_Point not written");
-}
-
-public void test_setPreferredSizeII() {
- CoolBar coolBar = new CoolBar(shell, 0);
- CoolItem coolItem = new CoolItem(coolBar, 0);
- Button button = new Button(coolBar, SWT.PUSH);
- button.setText("foobar");
- coolItem.setControl(button);
-
- Point size = coolItem.getSize();
- coolItem.setPreferredSize(size);
- assertEquals(size.x, coolItem.getSize().x);
- coolItem.setSize(coolItem.getPreferredSize());
- assertEquals(size, coolItem.getSize());
-}
-
-public void test_setPreferredSizeLorg_eclipse_swt_graphics_Point() {
- CoolBar coolBar = new CoolBar(shell, 0);
- CoolItem coolItem = new CoolItem(coolBar, 0);
- Button button = new Button(coolBar, SWT.PUSH);
- button.setText("foobar");
- coolItem.setControl(button);
-
- Point size = new Point(50, 30);
- coolItem.setPreferredSize(size);
- Point size2 = coolItem.getPreferredSize();
- coolItem.setPreferredSize(50, 30);
- assertEquals(size2, coolItem.getPreferredSize());
-}
-
-public void test_setSizeII() {
- CoolBar coolBar = new CoolBar(shell, 0);
- CoolItem coolItem = new CoolItem(coolBar, 0);
- Button button = new Button(coolBar, SWT.PUSH);
- button.setText("foo");
- coolItem.setControl(button);
-
- coolItem.setSize(50, 50);
- assertEquals(new Point(50, 50), coolItem.getSize());
-
- coolItem.setSize(0, 0);
- Point smallest = coolItem.getSize();
- coolItem.setSize(1, 1);
- assertEquals(smallest, coolItem.getSize());
-
- Rectangle rect = coolItem.getBounds();
- Point size = coolItem.getSize();
- coolItem.setSize(rect.width, rect.height);
- assertEquals(size, coolItem.getSize());
-}
-
-public void test_setSizeLorg_eclipse_swt_graphics_Point() {
- CoolBar coolBar = new CoolBar(shell, 0);
- CoolItem coolItem = new CoolItem(coolBar, 0);
- Button button = new Button(coolBar, SWT.PUSH);
- button.setText("foo");
- coolItem.setControl(button);
-
- Point size = new Point(50, 50);
- coolItem.setSize(size);
- Point size2 = coolItem.getSize();
- coolItem.setSize(50, 50);
- assertEquals(size2, coolItem.getSize());
-}
-
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_widgets_CoolItem((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_CoolBarI");
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_CoolBarII");
- methodNames.addElement("test_addSelectionListenerLorg_eclipse_swt_events_SelectionListener");
- methodNames.addElement("test_computeSizeII");
- methodNames.addElement("test_getBounds");
- methodNames.addElement("test_getControl");
- methodNames.addElement("test_getMinimumSize");
- methodNames.addElement("test_getParent");
- methodNames.addElement("test_getPreferredSize");
- methodNames.addElement("test_getSize");
- methodNames.addElement("test_removeSelectionListenerLorg_eclipse_swt_events_SelectionListener");
- methodNames.addElement("test_setControlLorg_eclipse_swt_widgets_Control");
- methodNames.addElement("test_setMinimumSizeII");
- methodNames.addElement("test_setMinimumSizeLorg_eclipse_swt_graphics_Point");
- methodNames.addElement("test_setPreferredSizeII");
- methodNames.addElement("test_setPreferredSizeLorg_eclipse_swt_graphics_Point");
- methodNames.addElement("test_setSizeII");
- methodNames.addElement("test_setSizeLorg_eclipse_swt_graphics_Point");
- methodNames.addAll(Test_org_eclipse_swt_widgets_Item.methodNames()); // add superclass method names
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_CoolBarI")) test_ConstructorLorg_eclipse_swt_widgets_CoolBarI();
- else if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_CoolBarII")) test_ConstructorLorg_eclipse_swt_widgets_CoolBarII();
- else if (getName().equals("test_addSelectionListenerLorg_eclipse_swt_events_SelectionListener")) test_addSelectionListenerLorg_eclipse_swt_events_SelectionListener();
- else if (getName().equals("test_computeSizeII")) test_computeSizeII();
- else if (getName().equals("test_getBounds")) test_getBounds();
- else if (getName().equals("test_getControl")) test_getControl();
- else if (getName().equals("test_getMinimumSize")) test_getMinimumSize();
- else if (getName().equals("test_getParent")) test_getParent();
- else if (getName().equals("test_getPreferredSize")) test_getPreferredSize();
- else if (getName().equals("test_getSize")) test_getSize();
- else if (getName().equals("test_removeSelectionListenerLorg_eclipse_swt_events_SelectionListener")) test_removeSelectionListenerLorg_eclipse_swt_events_SelectionListener();
- else if (getName().equals("test_setControlLorg_eclipse_swt_widgets_Control")) test_setControlLorg_eclipse_swt_widgets_Control();
- else if (getName().equals("test_setMinimumSizeII")) test_setMinimumSizeII();
- else if (getName().equals("test_setMinimumSizeLorg_eclipse_swt_graphics_Point")) test_setMinimumSizeLorg_eclipse_swt_graphics_Point();
- else if (getName().equals("test_setPreferredSizeII")) test_setPreferredSizeII();
- else if (getName().equals("test_setPreferredSizeLorg_eclipse_swt_graphics_Point")) test_setPreferredSizeLorg_eclipse_swt_graphics_Point();
- else if (getName().equals("test_setSizeII")) test_setSizeII();
- else if (getName().equals("test_setSizeLorg_eclipse_swt_graphics_Point")) test_setSizeLorg_eclipse_swt_graphics_Point();
- else super.runTest();
-}
-
-/* custom */
-static final boolean MINIMAL_CONFORMANCE = false;
-
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Decorations.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Decorations.java
deleted file mode 100644
index f251e8e798..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Decorations.java
+++ /dev/null
@@ -1,301 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import java.io.*;
-
-import junit.framework.*;
-import junit.textui.TestRunner;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.swt.widgets.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.widgets.Decorations
- *
- * @see org.eclipse.swt.widgets.Decorations
- */
-public class Test_org_eclipse_swt_widgets_Decorations extends Test_org_eclipse_swt_widgets_Canvas {
-
-public Test_org_eclipse_swt_widgets_Decorations(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- super.setUp();
- // do nothing, even though this is not an abstract class, it was never meant to
- // be instantiated
-}
-
-protected void tearDown() {
- super.tearDown();
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_CompositeI() {
- // do nothing, even though this is not an abstract class, it was never meant to
- // be instantiated
-}
-
-public void test_computeTrimIIII() {
- decorations.computeTrim(0,0,0,0);
- decorations.computeTrim(0,0,10,20);
-}
-public void test_dispose() {
- warnUnimpl("Test test_dispose not written");
-}
-
-public void test_getBounds() {
- warnUnimpl("Test test_getBounds not written");
-}
-
-public void test_getClientArea() {
- Rectangle rect = decorations.getClientArea();
- assertTrue(":a:", rect.height >= 0);
- assertTrue(":b:", rect.width >= 0);
-}
-
-public void test_getDefaultButton() {
- Button button = new Button(decorations, SWT.PUSH);
- decorations.setDefaultButton(button);
- assertTrue(":a:", decorations.getDefaultButton() == button);
-}
-
-public void test_getImage() {
- Image[] cases = {null, new Image(null, 100, 100)};
- for(int i=0; i<cases.length; i++){
- decorations.setImage(cases[i]);
- assertEquals(decorations.getImage(), cases[i]);
- if (cases[i]!=null)
- cases[i].dispose();
- }
-}
-
-public void test_getImages() {
- warnUnimpl("Test test_getImages not written");
-}
-
-public void test_getLocation() {
- decorations.setLocation(10,15);
- assertTrue(":a:", decorations.getLocation().x == 10);
- assertTrue(":b:", decorations.getLocation().y == 15);
-}
-
-public void test_getMaximized() {
- // tested in setMaximized method
-}
-
-public void test_getMenuBar() {
- assertTrue(":a:", decorations.getMenuBar() == null);
- Menu bar = new Menu (decorations, SWT.BAR);
- decorations.setMenuBar (bar);
- assertTrue(":b:", decorations.getMenuBar() == bar);
-}
-
-public void test_getMinimized() {
- // tested in setMinimized method
-}
-
-public void test_getSize() {
- // super class test sufficient
-}
-
-public void test_getText() {
- decorations.setText("test");
- assertTrue(":a:", decorations.getText().equals("test"));
-}
-
-public void test_isReparentable() {
- /* Decorations are not reparentable, see win32 implementation of isReparentable() */
- assertFalse(decorations.isReparentable());
-}
-
-public void test_setDefaultButtonLorg_eclipse_swt_widgets_Button() {
- assertNull(decorations.getDefaultButton());
- Button button = new Button(decorations, SWT.NULL);
- decorations.setDefaultButton(button);
- assertTrue("button not default", decorations.getDefaultButton() == button);
- if (fCheckBogusTestCases) {
- decorations.setDefaultButton(null);
- assertNull(decorations.getDefaultButton());
- }
-}
-
-public void test_setImageLorg_eclipse_swt_graphics_Image() {
- assertNull(":a:", decorations.getImage());
- loadImages();
- decorations.setImage(images[0]);
- assertTrue(":b:", images[0] == decorations.getImage());
- assertTrue(":c:", images[1] != decorations.getImage());
- decorations.setImage(null);
- assertNull(":d:", decorations.getImage());
- freeImages();
-}
-
-public void test_setImages$Lorg_eclipse_swt_graphics_Image() {
- warnUnimpl("Test test_setImages$Lorg_eclipse_swt_graphics_Image not written");
-}
-
-public void test_setMaximizedZ() {
- decorations.setMaximized(false);
- assertTrue(":1:", decorations.getMaximized() == false);
- decorations.setMaximized(true);
- assertTrue(":2:", decorations.getMaximized() == true);
- assertTrue(":3:", decorations.getMinimized() == false);
-}
-
-public void test_setMenuBarLorg_eclipse_swt_widgets_Menu() {
- assertNull(decorations.getMenu());
- Menu testMenu = new Menu(decorations);
- decorations.setMenu(testMenu);
- assertTrue("Incorrect menu", decorations.getMenu() == testMenu);
- decorations.setMenu(null);
- assertNull(decorations.getMenu());
-}
-
-public void test_setMinimizedZ() {
- decorations.setMinimized(false);
- assertTrue(":1:", decorations.getMinimized() == false);
- decorations.setMinimized(true);
- assertTrue(":2:", decorations.getMinimized() == true);
- assertTrue(":3:", decorations.getMaximized() == false);
-}
-
-public void test_setTextLjava_lang_String() {
- try {
- decorations.setText(null);
- fail("No exception thrown for string == null");
- }
- catch (IllegalArgumentException e) {
- }
-
- String testStr = "test string";
- decorations.setText(testStr);
- assertTrue("a", decorations.getText().equals(testStr));
- decorations.setText("");
- assertTrue("b", decorations.getText().equals(""));
- try {
- decorations.setText(null);
- fail("No exception thrown for string == null");
- }
- catch (IllegalArgumentException e) {
- }
-}
-
-public void test_setVisibleZ() {
- // test in subclasses
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_widgets_Decorations((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_CompositeI");
- methodNames.addElement("test_computeTrimIIII");
- methodNames.addElement("test_dispose");
- methodNames.addElement("test_getBounds");
- methodNames.addElement("test_getClientArea");
- methodNames.addElement("test_getDefaultButton");
- methodNames.addElement("test_getImage");
- methodNames.addElement("test_getImages");
- methodNames.addElement("test_getLocation");
- methodNames.addElement("test_getMaximized");
- methodNames.addElement("test_getMenuBar");
- methodNames.addElement("test_getMinimized");
- methodNames.addElement("test_getSize");
- methodNames.addElement("test_getText");
- methodNames.addElement("test_isReparentable");
- methodNames.addElement("test_setDefaultButtonLorg_eclipse_swt_widgets_Button");
- methodNames.addElement("test_setImageLorg_eclipse_swt_graphics_Image");
- methodNames.addElement("test_setImages$Lorg_eclipse_swt_graphics_Image");
- methodNames.addElement("test_setMaximizedZ");
- methodNames.addElement("test_setMenuBarLorg_eclipse_swt_widgets_Menu");
- methodNames.addElement("test_setMinimizedZ");
- methodNames.addElement("test_setTextLjava_lang_String");
- methodNames.addElement("test_setVisibleZ");
- methodNames.addAll(Test_org_eclipse_swt_widgets_Canvas.methodNames()); // add superclass method names
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_CompositeI")) test_ConstructorLorg_eclipse_swt_widgets_CompositeI();
- else if (getName().equals("test_computeTrimIIII")) test_computeTrimIIII();
- else if (getName().equals("test_dispose")) test_dispose();
- else if (getName().equals("test_getBounds")) test_getBounds();
- else if (getName().equals("test_getClientArea")) test_getClientArea();
- else if (getName().equals("test_getDefaultButton")) test_getDefaultButton();
- else if (getName().equals("test_getImage")) test_getImage();
- else if (getName().equals("test_getImages")) test_getImages();
- else if (getName().equals("test_getLocation")) test_getLocation();
- else if (getName().equals("test_getMaximized")) test_getMaximized();
- else if (getName().equals("test_getMenuBar")) test_getMenuBar();
- else if (getName().equals("test_getMinimized")) test_getMinimized();
- else if (getName().equals("test_getSize")) test_getSize();
- else if (getName().equals("test_getText")) test_getText();
- else if (getName().equals("test_isReparentable")) test_isReparentable();
- else if (getName().equals("test_setDefaultButtonLorg_eclipse_swt_widgets_Button")) test_setDefaultButtonLorg_eclipse_swt_widgets_Button();
- else if (getName().equals("test_setImageLorg_eclipse_swt_graphics_Image")) test_setImageLorg_eclipse_swt_graphics_Image();
- else if (getName().equals("test_setImages$Lorg_eclipse_swt_graphics_Image")) test_setImages$Lorg_eclipse_swt_graphics_Image();
- else if (getName().equals("test_setMaximizedZ")) test_setMaximizedZ();
- else if (getName().equals("test_setMenuBarLorg_eclipse_swt_widgets_Menu")) test_setMenuBarLorg_eclipse_swt_widgets_Menu();
- else if (getName().equals("test_setMinimizedZ")) test_setMinimizedZ();
- else if (getName().equals("test_setTextLjava_lang_String")) test_setTextLjava_lang_String();
- else if (getName().equals("test_setVisibleZ")) test_setVisibleZ();
- else super.runTest();
-}
-
-/* custom */
-Decorations decorations;
-Image[] images = new Image [SwtTestCase.imageFormats.length*SwtTestCase.imageFilenames.length];
-
-protected void setWidget(Widget w) {
- if (decorations != null && !decorations.isDisposed())
- decorations.dispose();
- decorations = (Decorations)w;
- super.setWidget(w);
-}
-
-// this method must be private or protected so the auto-gen tool keeps it
-private void loadImages() {
- int numFormats = SwtTestCase.imageFormats.length;
- int numFiles = SwtTestCase.imageFilenames.length;
- for (int i=0; i<numFormats; i++) {
- String format = SwtTestCase.imageFormats[i];
- int index = i*numFiles;
- for (int j=0; j<numFiles; j++){
- String fileName = SwtTestCase.imageFilenames[j];
- InputStream resource = this.getClass().getResourceAsStream(fileName + "." + format);
- images [index+j] = new Image (shell.getDisplay(), resource);
- try {
- resource.close();
- } catch (IOException e) {
- // continue;
- }
- }
- }
-}
-
-// this method must be private or protected so the auto-gen tool keeps it
-private void freeImages() {
- for (int i=0; i<images.length; i++) images[i].dispose();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Dialog.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Dialog.java
deleted file mode 100644
index 011d765225..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Dialog.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-import org.eclipse.swt.widgets.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.widgets.Dialog
- *
- * @see org.eclipse.swt.widgets.Dialog
- */
-public class Test_org_eclipse_swt_widgets_Dialog extends SwtTestCase {
-
-public Test_org_eclipse_swt_widgets_Dialog(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- shell = new Shell();
-}
-
-protected void tearDown() {
- shell.dispose();
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_Shell() {
- warnUnimpl("Test test_ConstructorLorg_eclipse_swt_widgets_Shell not written");
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_ShellI() {
- warnUnimpl("Test test_ConstructorLorg_eclipse_swt_widgets_ShellI not written");
-}
-
-public void test_getParent() {
- assertTrue(":a:", dialog.getParent() == shell);
-}
-
-public void test_getStyle() {
- // we use this call in a Constructor test so that we can
- // check if the style is the one that was created
- dialog.getStyle();
-}
-
-public void test_getText() {
- // tested in test_setTextLjava_lang_String()
-}
-
-public void test_setTextLjava_lang_String() {
- assertTrue(":1:", dialog.getText() == "");
- String testStr = "test string";
- dialog.setText(testStr);
- assertTrue(":2:", dialog.getText().equals(testStr));
- dialog.setText("");
- assertTrue(":3:", dialog.getText().equals(""));
- try {
- dialog.setText(null);
- fail("No exception thrown for string = null");
- }
- catch (IllegalArgumentException e) {
- }
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_widgets_Dialog((String)e.nextElement()));
- }
- return suite;
-}
-
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_Shell");
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_ShellI");
- methodNames.addElement("test_getParent");
- methodNames.addElement("test_getStyle");
- methodNames.addElement("test_getText");
- methodNames.addElement("test_setTextLjava_lang_String");
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_Shell")) test_ConstructorLorg_eclipse_swt_widgets_Shell();
- else if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_ShellI")) test_ConstructorLorg_eclipse_swt_widgets_ShellI();
- else if (getName().equals("test_getParent")) test_getParent();
- else if (getName().equals("test_getStyle")) test_getStyle();
- else if (getName().equals("test_getText")) test_getText();
- else if (getName().equals("test_setTextLjava_lang_String")) test_setTextLjava_lang_String();
-}
-
-/* custom */
-public Shell shell;
-private Dialog dialog;
-private int junitStyle;
-
-protected void setDialog(Dialog newDialog) {
- dialog = newDialog;
-}
-protected void setStyle(int style) {
- style = junitStyle;
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_DirectoryDialog.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_DirectoryDialog.java
deleted file mode 100644
index 0893b0c641..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_DirectoryDialog.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.widgets.DirectoryDialog
- *
- * @see org.eclipse.swt.widgets.DirectoryDialog
- */
-public class Test_org_eclipse_swt_widgets_DirectoryDialog extends Test_org_eclipse_swt_widgets_Dialog {
-
-public Test_org_eclipse_swt_widgets_DirectoryDialog(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- super.setUp();
- dirDialog = new DirectoryDialog(shell, SWT.NULL);
- setDialog(dirDialog);
-}
-
-protected void tearDown() {
- super.tearDown();
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_Shell() {
- DirectoryDialog dd = new DirectoryDialog(shell);
- try {
- new DirectoryDialog(null);
- fail("No exception thrown for null parent");
- }
- catch (IllegalArgumentException e) {
- }
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_ShellI() {
- warnUnimpl("Test test_ConstructorLorg_eclipse_swt_widgets_ShellI not written");
-}
-
-public void test_getFilterPath() {
- // tested in test_setFilterPathLjava_lang_String
-}
-
-public void test_getMessage() {
- // tested in test_setMessageLjava_lang_String
-}
-
-public void test_open() {
- if (fTestDialogOpen)
- dirDialog.open();
-}
-
-public void test_setFilterPathLjava_lang_String() {
- assertTrue(":1:", dirDialog.getFilterPath() == "");
- String testStr = "./*";
- dirDialog.setFilterPath(testStr);
- assertTrue(":2:", dirDialog.getFilterPath().equals(testStr));
- dirDialog.setFilterPath("");
- assertTrue(":3:", dirDialog.getFilterPath().equals(""));
- dirDialog.setFilterPath(null);
- assertTrue(":4:", dirDialog.getFilterPath() == null);
-}
-
-public void test_setMessageLjava_lang_String() {
- assertTrue(":1:", dirDialog.getMessage() == "");
- String testStr = "test string";
- dirDialog.setMessage(testStr);
- assertTrue(":2:", dirDialog.getMessage().equals(testStr));
- dirDialog.setMessage("");
- assertTrue(":3:", dirDialog.getMessage().equals(""));
- try {
- dirDialog.setMessage(null);
- fail ("null argument did not throw IllegalArgumentException");
- } catch (IllegalArgumentException e) {
- }
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_widgets_DirectoryDialog((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_Shell");
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_ShellI");
- methodNames.addElement("test_getFilterPath");
- methodNames.addElement("test_getMessage");
- methodNames.addElement("test_open");
- methodNames.addElement("test_setFilterPathLjava_lang_String");
- methodNames.addElement("test_setMessageLjava_lang_String");
- methodNames.addAll(Test_org_eclipse_swt_widgets_Dialog.methodNames()); // add superclass method names
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_Shell")) test_ConstructorLorg_eclipse_swt_widgets_Shell();
- else if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_ShellI")) test_ConstructorLorg_eclipse_swt_widgets_ShellI();
- else if (getName().equals("test_getFilterPath")) test_getFilterPath();
- else if (getName().equals("test_getMessage")) test_getMessage();
- else if (getName().equals("test_open")) test_open();
- else if (getName().equals("test_setFilterPathLjava_lang_String")) test_setFilterPathLjava_lang_String();
- else if (getName().equals("test_setMessageLjava_lang_String")) test_setMessageLjava_lang_String();
- else super.runTest();
-}
-
-/* custom */
-DirectoryDialog dirDialog;
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Display.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Display.java
deleted file mode 100644
index 544300a75c..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Display.java
+++ /dev/null
@@ -1,1263 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.widgets.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.widgets.Display
- *
- * @see org.eclipse.swt.widgets.Display
- */
-public class Test_org_eclipse_swt_widgets_Display extends Test_org_eclipse_swt_graphics_Device {
-
-public Test_org_eclipse_swt_widgets_Display(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- // There can only be one Display object per thread.
- // If a second Display is created on the same thread, an
- // InvalidThreadAccessException is thrown.
- //
- // Each test will create its own Display and must dispose of it
- // before completing.
-}
-
-protected void tearDown() {
-}
-
-public void test_Constructor() {
- Display disp = new Display();
- disp.dispose();
-}
-
-public void test_ConstructorLorg_eclipse_swt_graphics_DeviceData() {
- Display disp;
- disp = new Display(null);
- disp.dispose();
-
- disp = new Display(new DeviceData());
- disp.dispose();
-}
-
-public void test_addFilterILorg_eclipse_swt_widgets_Listener() {
- final int CLOSE_CALLBACK = 0;
- final int DISPOSE_CALLBACK = 1;
- final boolean[] callbackReceived = new boolean[] {false, false};
-
- Listener listener = new Listener() {
- public void handleEvent(Event e) {
- if (e.type == SWT.Close)
- callbackReceived[CLOSE_CALLBACK] = true;
- else if (e.type == SWT.Dispose)
- callbackReceived[DISPOSE_CALLBACK] = true;
- };
- };
-
- Display display = new Display();
- try {
- try {
- display.addFilter(SWT.Dispose, null);
- fail("No exception thrown for addFilter with null argument");
- } catch (IllegalArgumentException e) {
- assertEquals("Incorrect exception thrown for addFilter with null argument", SWT.ERROR_NULL_ARGUMENT, e);
- }
-
- display.addFilter(SWT.Close, listener);
- } finally {
- display.close();
- }
- assertTrue(callbackReceived[CLOSE_CALLBACK]);
- assertFalse(callbackReceived[DISPOSE_CALLBACK]);
-}
-
-public void test_addListenerILorg_eclipse_swt_widgets_Listener() {
- final int CLOSE_CALLBACK = 0;
- final int DISPOSE_CALLBACK = 1;
- final boolean[] callbackReceived = new boolean[] {false, false};
-
- Listener listener = new Listener() {
- public void handleEvent(Event e) {
- if (e.type == SWT.Close)
- callbackReceived[CLOSE_CALLBACK] = true;
- else if (e.type == SWT.Dispose)
- callbackReceived[DISPOSE_CALLBACK] = true;
- };
- };
-
- Display display = new Display();
- try {
- try {
- display.addListener(SWT.Close, null);
- fail("No exception thrown for addListener with null argument");
- } catch (IllegalArgumentException e) {
- assertEquals("Incorrect exception thrown for addListener with null argument", SWT.ERROR_NULL_ARGUMENT, e);
- }
-
- display.addListener(SWT.Dispose, listener);
- } finally {
- display.close();
- }
- assertFalse(":a:", callbackReceived[CLOSE_CALLBACK]);
- assertTrue(":b:", callbackReceived[DISPOSE_CALLBACK]);
-
- display = new Display();
- try {
- display.addListener(SWT.Close, listener);
- } finally {
- display.close();
- }
- assertTrue(":c:", callbackReceived[CLOSE_CALLBACK]);
-}
-
-public void test_asyncExecLjava_lang_Runnable() {
- final Display display = new Display();
- try {
- display.asyncExec(new Runnable() {
- public void run() {
- display.beep();
- }
- });
- } finally {
- display.dispose();
- }
-}
-
-public void test_beep() {
- Display display = new Display();
- try {
- display.beep();
- } finally {
- display.dispose();
- }
-}
-
-public void test_close() {
- Display display = new Display();
- display.close();
- assertTrue(display.isDisposed());
-}
-
-public void test_disposeExecLjava_lang_Runnable() {
- // Also tests dispose and isDisposed
- Display testDisplay = new Display();
- disposeExecRan = false;
- testDisplay.disposeExec(new Runnable() {
- public void run() {
- disposeExecRan = true;
- }
- });
- assertEquals("Display should not be disposed", false, testDisplay.isDisposed());
- testDisplay.dispose();
- assertTrue("Display should be disposed", testDisplay.isDisposed());
- assertTrue("DisposeExec Runnable did not run", disposeExecRan);
-}
-
-public void test_findDisplayLjava_lang_Thread() {
- assertNull(Display.findDisplay(new Thread()));
-
- Display display = new Display();
- try {
- assertEquals(display, Display.findDisplay(Thread.currentThread()));
- } finally {
- display.dispose();
- }
-}
-
-public void test_findWidgetI() {
- warnUnimpl("Test test_findWidgetI not written");
-}
-
-public void test_getActiveShell() {
- Display display = new Display();
- try {
- Shell shell = new Shell(display);
- shell.open();
- assertTrue(display.getActiveShell() == shell);
- shell.dispose();
- } finally {
- display.dispose();
- }
-}
-
-public void test_getBounds() {
- Display display = new Display();
- try {
- Rectangle rect = display.getBounds();
- assertNotNull(rect);
- } finally {
- display.dispose();
- }
-}
-
-public void test_getClientArea() {
- Display display = new Display();
- try {
- Rectangle rect = display.getClientArea();
- assertNotNull(rect);
- } finally {
- display.dispose();
- }
-}
-
-public void test_getCurrent() {
- Display display = new Display();
- try {
- assertTrue(display.getThread() == Thread.currentThread());
- } finally {
- display.dispose();
- }
-}
-
-public void test_getCursorControl() {
- Display display = new Display();
- try {
- display.getCursorControl();
- } finally {
- display.dispose();
- }
-}
-
-public void test_getCursorLocation() {
- Display display = new Display();
- try {
- Point pt = display.getCursorLocation();
- assertNotNull(pt);
- assertTrue(pt.x >= 0);
- assertTrue(pt.y >= 0);
- } finally {
- display.dispose();
- }
-}
-
-public void test_getCursorSize() {
- warnUnimpl("Test test_getCursorSize not written");
-}
-
-public void test_getData() {
- // tested in setData(Object) method
-}
-
-public void test_getDataLjava_lang_String() {
- // tested in setData(String, Object) method
-}
-
-public void test_getDefault() {
- Display display = new Display();
- try {
- assertNotNull(Display.getDefault());
- } finally {
- display.dispose();
- }
-}
-
-public void test_getDismissalAlignment() {
- Display display = new Display();
- try {
- int alignment = display.getDismissalAlignment();
- assertTrue("getDismissalAlignment should return SWT.LEFT or SWT.RIGHT",
- alignment == SWT.LEFT || alignment == SWT.RIGHT);
- } finally {
- display.dispose();
- }
-}
-
-public void test_getDoubleClickTime() {
- Display display = new Display();
- try {
- int time = display.getDoubleClickTime();
- assertTrue(time > 0);
- } finally {
- display.dispose();
- }
-}
-
-public void test_getFocusControl() {
- Display display = new Display();
- try {
- display.getFocusControl();
- } finally {
- display.dispose();
- }
-}
-
-public void test_getIconDepth() {
- Display display = new Display();
- try {
- int depth = display.getIconDepth();
- assertTrue(depth > 0);
- } finally {
- display.dispose();
- }
-}
-
-public void test_getMonitors() {
- Display display = new Display();
- Monitor[] monitors = display.getMonitors();
- assertNotNull(monitors);
- assertTrue("at least one monitor should be returned", monitors.length >= 1);
- for (int i = 0; i < monitors.length; i++)
- assertTrue("monitor at index "+i+" should not be null", monitors[i] != null);
- display.dispose();
-}
-
-public void test_getPrimaryMonitor() {
- Display display = new Display();
- Monitor monitor = display.getPrimaryMonitor();
- assertNotNull(monitor);
- display.dispose();
-}
-
-public void test_getShells() {
- Display display = new Display();
- try {
- Shell shell1 = new Shell(display);
- Shell shell2 = new Shell(display);
- assertTrue(display.getShells().length == 2);
- shell1.dispose();
- shell2.dispose();
- } finally {
- display.dispose();
- }
-}
-
-public void test_getSyncThread() {
- final Display display = new Display();
- try {
- final boolean[] threadRan = new boolean[] {false};
- Thread nonUIThread = new Thread(new Runnable() {
- public void run() {
- // Assume no syncExec runnable is currently being invoked.
- assertNull(display.getSyncThread());
-
- // Create a runnable and invoke with syncExec to verify that
- // the invoking thread is the syncThread.
- final Thread invokingThread = Thread.currentThread();
- display.syncExec(new Runnable() {
- public void run() {
- assertEquals(invokingThread, display.getSyncThread());
- }
- });
-
- // Create a runnable and invoke with asyncExec to verify that
- // the syncThread is null while it's running.
- final boolean[] asyncExecRan = new boolean[] {false};
- display.asyncExec(new Runnable() {
- public void run() {
- assertNull(display.getSyncThread());
- asyncExecRan[0] = true;
- }
- });
-
- try {
- while (!asyncExecRan[0]) {
- Thread.sleep(100);
- }
- } catch (InterruptedException ex) {
- }
- threadRan[0] = true;
- display.wake();
- }
- });
- nonUIThread.start();
-
- while (!threadRan[0]) {
- if (!display.readAndDispatch()) display.sleep ();
- }
- } finally {
- display.dispose();
- }
-}
-
-public void test_getSystemColorI() {
- Display display = new Display();
- try {
- int [] colorIds = {
- SWT.COLOR_WIDGET_DARK_SHADOW, SWT.COLOR_WIDGET_NORMAL_SHADOW,
- SWT.COLOR_WIDGET_LIGHT_SHADOW, SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW,
- SWT.COLOR_WIDGET_BACKGROUND, SWT.COLOR_WIDGET_BORDER,
- SWT.COLOR_WIDGET_FOREGROUND, SWT.COLOR_LIST_FOREGROUND,
- SWT.COLOR_LIST_BACKGROUND, SWT.COLOR_LIST_SELECTION,
- SWT.COLOR_LIST_SELECTION_TEXT,
- };
- for (int i=0; i < colorIds.length; i++) {
- assertNotNull(display.getSystemColor(colorIds[i]));
- }
- } finally {
- display.dispose();
- }
-}
-
-public void test_getSystemFont() {
- Display display = new Display();
- try {
- Font font = display.getSystemFont();
- assertNotNull(font);
- } finally {
- display.dispose();
- }
-}
-
-public void test_getThread() {
- Display display = new Display();
- try {
- assertTrue(display.getThread() == Thread.currentThread());
- } finally {
- display.dispose();
- }
-}
-
-public void test_internal_dispose_GCILorg_eclipse_swt_graphics_GCData() {
- // do not test internal API
-}
-
-public void test_internal_new_GCLorg_eclipse_swt_graphics_GCData() {
- // do not test internal API
-}
-
-public void test_mapLorg_eclipse_swt_widgets_ControlLorg_eclipse_swt_widgets_ControlII() {
- Display display = new Display();
- try {
- Shell shell = new Shell(display, SWT.NO_TRIM);
- Button button1 = new Button(shell, SWT.PUSH);
- button1.setBounds(0,0,100,100);
- Button button2 = new Button(shell, SWT.PUSH);
- button2.setBounds(200,100,100,100);
- shell.setBounds(0,0,400,400);
- shell.open();
-
- Point shellOffset = shell.getLocation();
- Point result;
-
- result = display.map(button1, button2, 0, 0);
- assertEquals(new Point(-200,-100), result);
- result = display.map(button1, button2, -10, -20);
- assertEquals(new Point(-210,-120), result);
- result = display.map(button1, button2, 30, 40);
- assertEquals(new Point(-170,-60), result);
-
- result = display.map(button2, button1, 0, 0);
- assertEquals(new Point(200,100), result);
- result = display.map(button2, button1, -5, -15);
- assertEquals(new Point(195,85), result);
- result = display.map(button2, button1, 25, 35);
- assertEquals(new Point(225,135), result);
-
- result = display.map(null, button2, 0, 0);
- assertEquals(new Point(-200 - shellOffset.x,-100 - shellOffset.y), result);
- result = display.map(null, button2, -2, -4);
- assertEquals(new Point(-202 - shellOffset.x,-104 - shellOffset.y), result);
- result = display.map(null, button2, 6, 8);
- assertEquals(new Point(-194 - shellOffset.x,-92 - shellOffset.y), result);
-
- result = display.map(button2, null, 0, 0);
- assertEquals(new Point(shellOffset.x + 200,shellOffset.y + 100), result);
- result = display.map(button2, null, -3, -6);
- assertEquals(new Point(shellOffset.x + 197,shellOffset.y + 94), result);
- result = display.map(button2, null, 9, 12);
- assertEquals(new Point(shellOffset.x + 209,shellOffset.y + 112), result);
-
- button1.dispose();
- try {
- result = display.map(button1, button2, 0, 0);
- fail("No exception thrown for map from control being disposed");
- } catch (IllegalArgumentException e) {
- assertEquals("Incorrect exception thrown for map from control being disposed", SWT.ERROR_INVALID_ARGUMENT, e);
- }
- try {
- result = display.map(button2, button1, 0, 0);
- fail("No exception thrown for map to control being disposed");
- } catch (IllegalArgumentException e) {
- assertEquals("Incorrect exception thrown for map to control being disposed", SWT.ERROR_INVALID_ARGUMENT, e);
- }
-
- shell.dispose();
- } finally {
- display.dispose();
- }
-}
-
-public void test_mapLorg_eclipse_swt_widgets_ControlLorg_eclipse_swt_widgets_ControlIIII() {
- Display display = new Display();
- try {
- Shell shell = new Shell(display, SWT.NO_TRIM);
- Button button1 = new Button(shell, SWT.PUSH);
- button1.setBounds(0,0,100,100);
- Button button2 = new Button(shell, SWT.PUSH);
- button2.setBounds(200,100,100,100);
- shell.setBounds(0,0,400,400);
- shell.open();
-
- Point shellOffset = shell.getLocation();
- Rectangle result;
-
- result = display.map(button1, button2, 0, 0, 100, 100);
- assertEquals(new Rectangle(-200,-100,100,100), result);
- result = display.map(button1, button2, -10, -20, 130, 140);
- assertEquals(new Rectangle(-210,-120,130,140), result);
- result = display.map(button1, button2, 50, 60, 170, 180);
- assertEquals(new Rectangle(-150,-40,170,180), result);
-
- result = display.map(button2, button1, 0, 0, 100, 100);
- assertEquals(new Rectangle(200,100,100,100), result);
- result = display.map(button2, button1, -5, -15, 125, 135);
- assertEquals(new Rectangle(195,85,125,135), result);
- result = display.map(button2, button1, 45, 55, 165, 175);
- assertEquals(new Rectangle(245,155,165,175), result);
-
- result = display.map(null, button2, 0, 0, 100, 100);
- assertEquals(new Rectangle(-200 - shellOffset.x,-100 - shellOffset.y,100,100), result);
- result = display.map(null, button2, -2, -4, 106, 108);
- assertEquals(new Rectangle(-202 - shellOffset.x,-104 - shellOffset.y,106,108), result);
- result = display.map(null, button2, 10, 12, 114, 116);
- assertEquals(new Rectangle(-190 - shellOffset.x,-88 - shellOffset.y,114,116), result);
-
- result = display.map(button2, null, 0, 0, 100, 100);
- assertEquals(new Rectangle(shellOffset.x + 200,shellOffset.y + 100,100,100), result);
- result = display.map(button2, null, -3, -6, 109, 112);
- assertEquals(new Rectangle(shellOffset.x + 197,shellOffset.y + 94,109,112), result);
- result = display.map(button2, null, 15, 18, 121, 124);
- assertEquals(new Rectangle(shellOffset.x + 215,shellOffset.y + 118,121,124), result);
-
- button1.dispose();
- try {
- result = display.map(button1, button2, 0, 0, 100, 100);
- fail("No exception thrown for map from control being disposed");
- } catch (IllegalArgumentException e) {
- assertEquals("Incorrect exception thrown for map from control being disposed", SWT.ERROR_INVALID_ARGUMENT, e);
- }
- try {
- result = display.map(button2, button1, 0, 0, 100, 100);
- fail("No exception thrown for map to control being disposed");
- } catch (IllegalArgumentException e) {
- assertEquals("Incorrect exception thrown for map to control being disposed", SWT.ERROR_INVALID_ARGUMENT, e);
- }
-
- shell.dispose();
- } finally {
- display.dispose();
- }
-}
-
-public void test_mapLorg_eclipse_swt_widgets_ControlLorg_eclipse_swt_widgets_ControlLorg_eclipse_swt_graphics_Point() {
- Display display = new Display();
- try {
- Shell shell = new Shell(display, SWT.NO_TRIM);
- Button button1 = new Button(shell, SWT.PUSH);
- button1.setBounds(0,0,100,100);
- Button button2 = new Button(shell, SWT.PUSH);
- button2.setBounds(200,100,100,100);
- shell.setBounds(0,0,400,400);
- shell.open();
-
- Point result;
- Point point = new Point(0,0);
- Point shellOffset = shell.getLocation();
-
-
- result = display.map(button1, button2, point);
- assertEquals(new Point(-200,-100), result);
- result = display.map(button1, button2, new Point(-10,-20));
- assertEquals(new Point(-210,-120), result);
- result = display.map(button1, button2, new Point(30,40));
- assertEquals(new Point(-170,-60), result);
-
- result = display.map(button2, button1, point);
- assertEquals(new Point(200,100), result);
- result = display.map(button2, button1, new Point(-5,-15));
- assertEquals(new Point(195,85), result);
- result = display.map(button2, button1, new Point(25,35));
- assertEquals(new Point(225,135), result);
-
- result = display.map(null, button2, point);
- assertEquals(new Point(-200 - shellOffset.x,-100 - shellOffset.y), result);
- result = display.map(null, button2, new Point(-2,-4));
- assertEquals(new Point(-202 - shellOffset.x,-104 - shellOffset.y), result);
- result = display.map(null, button2, new Point(6,8));
- assertEquals(new Point(-194 - shellOffset.x,-92 - shellOffset.y), result);
-
- result = display.map(button2, null, point);
- assertEquals(new Point(shellOffset.x + 200,shellOffset.y + 100), result);
- result = display.map(button2, null, new Point(-3,-6));
- assertEquals(new Point(shellOffset.x + 197,shellOffset.y + 94), result);
- result = display.map(button2, null, new Point(9,12));
- assertEquals(new Point(shellOffset.x + 209,shellOffset.y + 112), result);
-
- button1.dispose();
- try {
- result = display.map(button1, button2, point);
- fail("No exception thrown for map from control being disposed");
- } catch (IllegalArgumentException e) {
- assertEquals("Incorrect exception thrown for map from control being disposed", SWT.ERROR_INVALID_ARGUMENT, e);
- }
- try {
- result = display.map(button2, button1, point);
- fail("No exception thrown for map to control being disposed");
- } catch (IllegalArgumentException e) {
- assertEquals("Incorrect exception thrown for map to control being disposed", SWT.ERROR_INVALID_ARGUMENT, e);
- }
-
- try {
- result = display.map(button2, button1, (Point) null);
- fail("No exception thrown for null point");
- } catch (IllegalArgumentException e) {
- assertEquals("Incorrect exception thrown for point being null", SWT.ERROR_NULL_ARGUMENT, e);
- }
-
- shell.dispose();
- } finally {
- display.dispose();
- }
-}
-
-public void test_mapLorg_eclipse_swt_widgets_ControlLorg_eclipse_swt_widgets_ControlLorg_eclipse_swt_graphics_Rectangle() {
- Display display = new Display();
- try {
- Shell shell = new Shell(display, SWT.NO_TRIM);
- Button button1 = new Button(shell, SWT.PUSH);
- button1.setBounds(0,0,100,100);
- Button button2 = new Button(shell, SWT.PUSH);
- button2.setBounds(200,100,100,100);
- shell.setBounds(0,0,400,400);
- shell.open();
-
- Rectangle result;
- Rectangle rect = new Rectangle(0,0,100,100);
- Point shellOffset = shell.getLocation();
-
- result = display.map(button1, button2, rect);
- assertEquals(new Rectangle(-200,-100,100,100), result);
- result = display.map(button1, button2, new Rectangle(-10, -20, 130, 140));
- assertEquals(new Rectangle(-210,-120,130,140), result);
- result = display.map(button1, button2, new Rectangle(50, 60, 170, 180));
- assertEquals(new Rectangle(-150,-40,170,180), result);
-
- result = display.map(button2, button1, rect);
- assertEquals(new Rectangle(200,100,100,100), result);
- result = display.map(button2, button1, new Rectangle(-5, -15, 125, 135));
- assertEquals(new Rectangle(195,85,125,135), result);
- result = display.map(button2, button1, new Rectangle(45, 55, 165, 175));
- assertEquals(new Rectangle(245,155,165,175), result);
-
- result = display.map(null, button2, rect);
- assertEquals(new Rectangle(-200 - shellOffset.x,-100 - shellOffset.y,100,100), result);
- result = display.map(null, button2, new Rectangle(-2, -4, 106, 108));
- assertEquals(new Rectangle(-202 - shellOffset.x,-104 - shellOffset.y,106,108), result);
- result = display.map(null, button2, new Rectangle(10, 12, 114, 116));
- assertEquals(new Rectangle(-190 - shellOffset.x,-88 - shellOffset.y,114,116), result);
-
- result = display.map(button2, null, rect);
- assertEquals(new Rectangle(shellOffset.x + 200,shellOffset.y + 100,100,100), result);
- result = display.map(button2, null, new Rectangle(-3, -6, 109, 112));
- assertEquals(new Rectangle(shellOffset.x + 197,shellOffset.y + 94,109,112), result);
- result = display.map(button2, null, new Rectangle(15, 18, 121, 124));
- assertEquals(new Rectangle(shellOffset.x + 215,shellOffset.y + 118,121,124), result);
-
-
- button1.dispose();
- try {
- result = display.map(button1, button2, rect);
- fail("No exception thrown for map from control being disposed");
- } catch (IllegalArgumentException e) {
- assertEquals("Incorrect exception thrown for map from control being disposed", SWT.ERROR_INVALID_ARGUMENT, e);
- }
- try {
- result = display.map(button2, button1, rect);
- fail("No exception thrown for map to control being disposed");
- } catch (IllegalArgumentException e) {
- assertEquals("Incorrect exception thrown for map to control being disposed", SWT.ERROR_INVALID_ARGUMENT, e);
- }
-
- try {
- result = display.map(button2, button1, (Rectangle) null);
- fail("No exception thrown for null point");
- } catch (IllegalArgumentException e) {
- assertEquals("Incorrect exception thrown for rectangle being null", SWT.ERROR_NULL_ARGUMENT, e);
- }
-
- shell.dispose();
- } finally {
- display.dispose();
- }
-}
-
-public void test_postLorg_eclipse_swt_widgets_Event() {
- final int KEYCODE = SWT.SHIFT;
-
- Display display = new Display();
- try {
- try {
- display.post(null);
- fail("No exception thrown for post with null argument");
- } catch (IllegalArgumentException e) {
- assertEquals("Incorrect exception thrown for post with null argument", SWT.ERROR_NULL_ARGUMENT, e);
- }
-
- Shell shell = new Shell(display, SWT.NO_TRIM);
- shell.setBounds(display.getBounds());
- shell.open();
-
- Event event;
-
- // Test key events (down/up)
- event = new Event();
- event.type = SWT.KeyDown;
- event.keyCode = -1; // bogus key code
- assertTrue(display.post(event)); // uses default 0 character
- // don't test KeyDown/KeyUp with a character to avoid sending to
- // random window if test shell looses focus
-
- event = new Event();
- event.type = SWT.KeyUp;
- assertTrue(display.post(event));
-
- event.type = SWT.KeyDown;
- event.keyCode = KEYCODE;
- shell.setFocus();
- assertTrue(display.post(event));
- event.type = SWT.KeyUp;
- shell.setFocus();
- assertTrue(display.post(event));
-
- // Test mouse events (down/up/move)
- event = new Event();
- event.type = SWT.MouseMove;
- event.x = 0;
- event.y = 0;
- shell.setFocus();
- assertTrue(display.post(event));
-
- event = new Event();
- event.type = SWT.MouseDown;
- assertFalse(display.post(event)); // missing button
- event.button = 1;
- shell.setFocus();
- assertTrue(display.post(event));
-
- event = new Event();
- event.type = SWT.MouseUp;
- assertFalse(display.post(event)); // missing button
- event.button = 1;
- shell.setFocus();
- assertTrue(display.post(event));
-
- // Test unsupported event
- event = new Event();
- event.type = SWT.MouseDoubleClick;
- assertFalse(display.post(event));
-
- shell.dispose();
-
- // can't verify that the events were actually sent to a listener.
- // the test shell won't receive any events if it has lost focus,
- // e.g., due to user intervention or another process popping up
- // a window.
- } finally {
- display.dispose();
- }
-}
-
-public void test_readAndDispatch() {
- // The following tests rely on readAndDispatch in order to succeed,
- // thus no test is needed here.
- // test_getSyncThread()
- // test_postLorg_eclipse_swt_widgets_Event()
-}
-
-public void test_removeFilterILorg_eclipse_swt_widgets_Listener() {
- final int CLOSE_CALLBACK = 0;
- final int DISPOSE_CALLBACK = 1;
- final boolean[] callbackReceived = new boolean[] {false, false};
-
- Listener listener = new Listener() {
- public void handleEvent(Event e) {
- if (e.type == SWT.Close)
- callbackReceived[CLOSE_CALLBACK] = true;
- else if (e.type == SWT.Dispose)
- callbackReceived[DISPOSE_CALLBACK] = true;
- };
- };
-
- Display display = new Display();
- try {
- try {
- display.removeFilter(SWT.Dispose, null);
- fail("No exception thrown for removeFilter with null argument");
- } catch (IllegalArgumentException e) {
- assertEquals("Incorrect exception thrown for removeFilter with null argument", SWT.ERROR_NULL_ARGUMENT, e);
- }
-
- display.addFilter(SWT.Close, listener);
- display.removeFilter(SWT.Close, listener);
- } finally {
- display.close();
- }
- assertFalse(callbackReceived[CLOSE_CALLBACK]);
- assertFalse(callbackReceived[DISPOSE_CALLBACK]);
-}
-
-public void test_removeListenerILorg_eclipse_swt_widgets_Listener() {
- final int CLOSE_CALLBACK = 0;
- final int DISPOSE_CALLBACK = 1;
- final boolean[] callbackReceived = new boolean[] {false, false};
-
- Listener listener = new Listener() {
- public void handleEvent(Event e) {
- if (e.type == SWT.Close)
- callbackReceived[CLOSE_CALLBACK] = true;
- else if (e.type == SWT.Dispose)
- callbackReceived[DISPOSE_CALLBACK] = true;
- };
- };
-
- Display display = new Display();
- try {
- try {
- display.removeListener(SWT.Close, null);
- fail("No exception thrown for removeListener with null argument");
- } catch (IllegalArgumentException e) {
- assertEquals("Incorrect exception thrown for removeListener with null argument", SWT.ERROR_NULL_ARGUMENT, e);
- }
-
- display.addListener(SWT.Dispose, listener);
- display.removeListener(SWT.Dispose, listener);
- } finally {
- display.close();
- }
- assertFalse(callbackReceived[CLOSE_CALLBACK]);
- assertFalse(callbackReceived[DISPOSE_CALLBACK]);
-}
-
-public void test_release() {
- // Overriding test_release from Device.
-}
-
-public void test_setAppNameLjava_lang_String() {
- Display.setAppName("My Application Name");
-}
-
-public void test_setCursorLocationII() {
- Display display = new Display();
- try {
- display.setCursorLocation(0,0);
- } finally {
- display.dispose();
- }
-}
-
-public void test_setCursorLocationLorg_eclipse_swt_graphics_Point() {
- Display display = new Display();
- try {
- display.setCursorLocation(new Point(0,0));
- try {
- display.setCursorLocation(null);
- fail("No exception thrown for null argument");
- }
- catch (IllegalArgumentException e) {
- assertEquals("Incorrect exception thrown for setCursorLocation with null argument", SWT.ERROR_NULL_ARGUMENT, e);
- }
- } finally {
- display.dispose();
- }
-}
-
-public void test_setDataLjava_lang_Object() {
- Display display = new Display();
- try {
- display.setData(new Integer(10));
- Integer i = (Integer)display.getData();
- assertNotNull(i);
- assertTrue(i.equals(new Integer(10)));
- } finally {
- display.dispose();
- }
-}
-
-public void test_setDataLjava_lang_StringLjava_lang_Object() {
- Display display = new Display();
- try {
- display.setData("Integer", new Integer(10));
- display.setData("String", "xyz");
- Integer i = (Integer)display.getData("Integer");
- assertNotNull(i);
- assertTrue(i.equals(new Integer(10)));
- String s = (String)display.getData("String");
- assertNotNull(s);
- assertTrue(s.equals("xyz"));
- } finally {
- display.dispose();
- }
-}
-
-public void test_setSynchronizerLorg_eclipse_swt_widgets_Synchronizer() {
- final Display display = new Display();
- final boolean[] asyncExecRan = new boolean[] {false};
-
- try {
- try {
- display.setSynchronizer(null);
- fail("No exception thrown for post with null argument");
- } catch (IllegalArgumentException e) {
- assertEquals("Incorrect exception thrown for set synchronizer with null argument", SWT.ERROR_NULL_ARGUMENT, e);
- }
-
- class MySynchronizer extends Synchronizer {
- boolean invoked = false;
- MySynchronizer(Display d) {
- super(d);
- }
- protected void asyncExec (Runnable runnable) {
- invoked = true;
- super.asyncExec(runnable);
- }
- }
-
- MySynchronizer mySynchronizer = new MySynchronizer(display);
- display.setSynchronizer(mySynchronizer);
- display.asyncExec(new Runnable() {
- public void run() {
- asyncExecRan[0] = true;
- }
- });
- while (display.readAndDispatch()) {}
- assertTrue(mySynchronizer.invoked);
- assertTrue(asyncExecRan[0]);
- } finally {
- display.dispose();
- }
-}
-
-public void test_sleep() {
- final Display display = new Display();
- try {
- Thread thread;
- boolean eventQueued;
-
- // Ensure event queue is empty, otherwise sleep() will just return.
- while(display.readAndDispatch()) {}
- thread = new Thread() {
- public void run() {
- try {
- // Delay to ensure the UI thread has been put to sleep.
- sleep(3000);
- } catch (InterruptedException ex) {
- }
- // Use wake() to revive from sleep().
- display.wake();
- }
- };
- thread.start();
- // Note that sleep seems to always return true, at least
- // on Windows, since wake() uses a null event.
- eventQueued = display.sleep();
-
- // Ensure event queue is empty, otherwise sleep() will just return.
- while(display.readAndDispatch()) {}
- thread = new Thread() {
- public void run() {
- try {
- // Delay to ensure the UI thread has been put to sleep.
- sleep(3000);
- } catch (InterruptedException ex) {
- }
- // Cause OS to generate an event to revive from sleep().
- display.syncExec(new Runnable() {
- public void run() {
- Shell s = new Shell(display);
- s.open();
- s.dispose();
- }
- });
- }
- };
- thread.start();
- eventQueued = display.sleep();
- assertTrue(eventQueued);
- } finally {
- display.dispose();
- }
-}
-
-public void test_syncExecLjava_lang_Runnable() {
- final Display display = new Display();
- try {
- display.syncExec(new Runnable() {
- public void run() {
- display.beep();
- }
- });
- } finally {
- display.dispose();
- }
-}
-
-public void test_timerExecILjava_lang_Runnable() {
- final Display display = new Display();
- try {
- final boolean[] timerExecRan = new boolean[] {false};
- final boolean[] threadRan = new boolean[] {false};
-
- try {
- display.timerExec(0, null);
- fail("No exception thrown for timerExec with null runnable");
- } catch (IllegalArgumentException e) {
- assertEquals("Incorrect exception thrown for timerExec with null runnable", SWT.ERROR_NULL_ARGUMENT, e);
- }
-
- display.timerExec(-100, new Runnable() {
- public void run() {
- timerExecRan[0] = true;
- }
- });
-
- final int delay = 3000;
- final long startTime = System.currentTimeMillis();
- display.timerExec(delay, new Runnable() {
- public void run() {
- long endTime = System.currentTimeMillis();
- // debug intermittent test failure
- if (endTime < (startTime + delay)) {
- System.out.println("Display.timerExec ran early " + ((startTime + delay) - endTime));
- }
- //assertTrue("Timer ran early! ms early: ", endTime >= (startTime + delay));
- threadRan[0] = true;
- }
- });
- while (!threadRan[0]) {
- // The read and dispatch loop must be running in order
- // for the runnable in the timer exec to be executed.
- if (!display.readAndDispatch ()) display.sleep();
- }
-
- // Verify the timerExec with less than zero milliseconds didn't execute.
- assertFalse("< 0 ms timer did execute", timerExecRan[0]);
- } finally {
- display.dispose();
- }
-}
-
-public void test_update() {
- Display display = new Display();
- try {
- display.update();
- } finally {
- display.dispose();
- }
-}
-
-public void test_wake() {
- // tested in sleep() method
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_widgets_Display((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_Constructor");
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_graphics_DeviceData");
- methodNames.addElement("test_addFilterILorg_eclipse_swt_widgets_Listener");
- methodNames.addElement("test_addListenerILorg_eclipse_swt_widgets_Listener");
- methodNames.addElement("test_asyncExecLjava_lang_Runnable");
- methodNames.addElement("test_beep");
- methodNames.addElement("test_close");
- methodNames.addElement("test_disposeExecLjava_lang_Runnable");
- methodNames.addElement("test_findDisplayLjava_lang_Thread");
- methodNames.addElement("test_findWidgetI");
- methodNames.addElement("test_getActiveShell");
- methodNames.addElement("test_getBounds");
- methodNames.addElement("test_getClientArea");
- methodNames.addElement("test_getCurrent");
- methodNames.addElement("test_getCursorControl");
- methodNames.addElement("test_getCursorLocation");
- methodNames.addElement("test_getCursorSize");
- methodNames.addElement("test_getData");
- methodNames.addElement("test_getDataLjava_lang_String");
- methodNames.addElement("test_getDefault");
- methodNames.addElement("test_getDismissalAlignment");
- methodNames.addElement("test_getDoubleClickTime");
- methodNames.addElement("test_getFocusControl");
- methodNames.addElement("test_getIconDepth");
- methodNames.addElement("test_getMonitors");
- methodNames.addElement("test_getPrimaryMonitor");
- methodNames.addElement("test_getShells");
- methodNames.addElement("test_getSyncThread");
- methodNames.addElement("test_getSystemColorI");
- methodNames.addElement("test_getSystemFont");
- methodNames.addElement("test_getThread");
- methodNames.addElement("test_internal_dispose_GCILorg_eclipse_swt_graphics_GCData");
- methodNames.addElement("test_internal_new_GCLorg_eclipse_swt_graphics_GCData");
- methodNames.addElement("test_mapLorg_eclipse_swt_widgets_ControlLorg_eclipse_swt_widgets_ControlII");
- methodNames.addElement("test_mapLorg_eclipse_swt_widgets_ControlLorg_eclipse_swt_widgets_ControlIIII");
- methodNames.addElement("test_mapLorg_eclipse_swt_widgets_ControlLorg_eclipse_swt_widgets_ControlLorg_eclipse_swt_graphics_Point");
- methodNames.addElement("test_mapLorg_eclipse_swt_widgets_ControlLorg_eclipse_swt_widgets_ControlLorg_eclipse_swt_graphics_Rectangle");
- methodNames.addElement("test_postLorg_eclipse_swt_widgets_Event");
- methodNames.addElement("test_readAndDispatch");
- methodNames.addElement("test_removeFilterILorg_eclipse_swt_widgets_Listener");
- methodNames.addElement("test_removeListenerILorg_eclipse_swt_widgets_Listener");
- methodNames.addElement("test_setAppNameLjava_lang_String");
- methodNames.addElement("test_setCursorLocationII");
- methodNames.addElement("test_setCursorLocationLorg_eclipse_swt_graphics_Point");
- methodNames.addElement("test_setDataLjava_lang_Object");
- methodNames.addElement("test_setDataLjava_lang_StringLjava_lang_Object");
- methodNames.addElement("test_setSynchronizerLorg_eclipse_swt_widgets_Synchronizer");
- methodNames.addElement("test_sleep");
- methodNames.addElement("test_syncExecLjava_lang_Runnable");
- methodNames.addElement("test_timerExecILjava_lang_Runnable");
- methodNames.addElement("test_update");
- methodNames.addElement("test_wake");
- methodNames.addAll(Test_org_eclipse_swt_graphics_Device.methodNames()); // add superclass method names
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_Constructor")) test_Constructor();
- else if (getName().equals("test_ConstructorLorg_eclipse_swt_graphics_DeviceData")) test_ConstructorLorg_eclipse_swt_graphics_DeviceData();
- else if (getName().equals("test_addFilterILorg_eclipse_swt_widgets_Listener")) test_addFilterILorg_eclipse_swt_widgets_Listener();
- else if (getName().equals("test_addListenerILorg_eclipse_swt_widgets_Listener")) test_addListenerILorg_eclipse_swt_widgets_Listener();
- else if (getName().equals("test_asyncExecLjava_lang_Runnable")) test_asyncExecLjava_lang_Runnable();
- else if (getName().equals("test_beep")) test_beep();
- else if (getName().equals("test_close")) test_close();
- else if (getName().equals("test_disposeExecLjava_lang_Runnable")) test_disposeExecLjava_lang_Runnable();
- else if (getName().equals("test_findDisplayLjava_lang_Thread")) test_findDisplayLjava_lang_Thread();
- else if (getName().equals("test_findWidgetI")) test_findWidgetI();
- else if (getName().equals("test_getActiveShell")) test_getActiveShell();
- else if (getName().equals("test_getBounds")) test_getBounds();
- else if (getName().equals("test_getClientArea")) test_getClientArea();
- else if (getName().equals("test_getCurrent")) test_getCurrent();
- else if (getName().equals("test_getCursorControl")) test_getCursorControl();
- else if (getName().equals("test_getCursorLocation")) test_getCursorLocation();
- else if (getName().equals("test_getCursorSize")) test_getCursorSize();
- else if (getName().equals("test_getData")) test_getData();
- else if (getName().equals("test_getDataLjava_lang_String")) test_getDataLjava_lang_String();
- else if (getName().equals("test_getDefault")) test_getDefault();
- else if (getName().equals("test_getDismissalAlignment")) test_getDismissalAlignment();
- else if (getName().equals("test_getDoubleClickTime")) test_getDoubleClickTime();
- else if (getName().equals("test_getFocusControl")) test_getFocusControl();
- else if (getName().equals("test_getIconDepth")) test_getIconDepth();
- else if (getName().equals("test_getMonitors")) test_getMonitors();
- else if (getName().equals("test_getPrimaryMonitor")) test_getPrimaryMonitor();
- else if (getName().equals("test_getShells")) test_getShells();
- else if (getName().equals("test_getSyncThread")) test_getSyncThread();
- else if (getName().equals("test_getSystemColorI")) test_getSystemColorI();
- else if (getName().equals("test_getSystemFont")) test_getSystemFont();
- else if (getName().equals("test_getThread")) test_getThread();
- else if (getName().equals("test_internal_dispose_GCILorg_eclipse_swt_graphics_GCData")) test_internal_dispose_GCILorg_eclipse_swt_graphics_GCData();
- else if (getName().equals("test_internal_new_GCLorg_eclipse_swt_graphics_GCData")) test_internal_new_GCLorg_eclipse_swt_graphics_GCData();
- else if (getName().equals("test_mapLorg_eclipse_swt_widgets_ControlLorg_eclipse_swt_widgets_ControlII")) test_mapLorg_eclipse_swt_widgets_ControlLorg_eclipse_swt_widgets_ControlII();
- else if (getName().equals("test_mapLorg_eclipse_swt_widgets_ControlLorg_eclipse_swt_widgets_ControlIIII")) test_mapLorg_eclipse_swt_widgets_ControlLorg_eclipse_swt_widgets_ControlIIII();
- else if (getName().equals("test_mapLorg_eclipse_swt_widgets_ControlLorg_eclipse_swt_widgets_ControlLorg_eclipse_swt_graphics_Point")) test_mapLorg_eclipse_swt_widgets_ControlLorg_eclipse_swt_widgets_ControlLorg_eclipse_swt_graphics_Point();
- else if (getName().equals("test_mapLorg_eclipse_swt_widgets_ControlLorg_eclipse_swt_widgets_ControlLorg_eclipse_swt_graphics_Rectangle")) test_mapLorg_eclipse_swt_widgets_ControlLorg_eclipse_swt_widgets_ControlLorg_eclipse_swt_graphics_Rectangle();
- else if (getName().equals("test_postLorg_eclipse_swt_widgets_Event")) test_postLorg_eclipse_swt_widgets_Event();
- else if (getName().equals("test_readAndDispatch")) test_readAndDispatch();
- else if (getName().equals("test_removeFilterILorg_eclipse_swt_widgets_Listener")) test_removeFilterILorg_eclipse_swt_widgets_Listener();
- else if (getName().equals("test_removeListenerILorg_eclipse_swt_widgets_Listener")) test_removeListenerILorg_eclipse_swt_widgets_Listener();
- else if (getName().equals("test_setAppNameLjava_lang_String")) test_setAppNameLjava_lang_String();
- else if (getName().equals("test_setCursorLocationII")) test_setCursorLocationII();
- else if (getName().equals("test_setCursorLocationLorg_eclipse_swt_graphics_Point")) test_setCursorLocationLorg_eclipse_swt_graphics_Point();
- else if (getName().equals("test_setDataLjava_lang_Object")) test_setDataLjava_lang_Object();
- else if (getName().equals("test_setDataLjava_lang_StringLjava_lang_Object")) test_setDataLjava_lang_StringLjava_lang_Object();
- else if (getName().equals("test_setSynchronizerLorg_eclipse_swt_widgets_Synchronizer")) test_setSynchronizerLorg_eclipse_swt_widgets_Synchronizer();
- else if (getName().equals("test_sleep")) test_sleep();
- else if (getName().equals("test_syncExecLjava_lang_Runnable")) test_syncExecLjava_lang_Runnable();
- else if (getName().equals("test_timerExecILjava_lang_Runnable")) test_timerExecILjava_lang_Runnable();
- else if (getName().equals("test_update")) test_update();
- else if (getName().equals("test_wake")) test_wake();
- else super.runTest();
-}
-
-/* custom */
-boolean disposeExecRan;
-
-public void test_dispose() {
- // tested in virtually every method and in particular
- // test_disposeExecLjava_lang_Runnable
-}
-
-/* Overloaded tests from Test_org_eclipse_swt_graphics_Device */
-public void test_getDPI() {
- Display display = new Display();
- try {
- Point p = display.getDPI();
- assertTrue("horizontal DPI not greater than zero", p.x > 0);
- assertTrue("vertical DPI not greater than zero", p.y > 0);
- } finally {
- display.dispose();
- }
-}
-
-public void test_getDepth() {
- Display display = new Display();
- try {
- int d = display.getDepth();
- assertTrue("depth not greater than zero", d > 0);
- } finally {
- display.dispose();
- }
-}
-
-public void test_getFontListLjava_lang_StringZ() {
- Display display = new Display();
- try {
- FontData[] scalable = display.getFontList(null, true);
- FontData[] non_scalable = display.getFontList(null, false);
- assertTrue("no fonts detected", (scalable.length + non_scalable.length) > 0);
- } finally {
- display.dispose();
- }
-}
-
-public void test_getWarnings() {
- Display display = new Display();
- try {
- boolean result = display.getWarnings();
- // Since the behavior is platform specific, there's
- // no good test for the result value.
- } finally {
- display.dispose();
- }
-}
-
-public void test_isDisposed() {
- Display disp = new Display();
- assertFalse(disp.isDisposed());
- disp.dispose();
- assertTrue(disp.isDisposed());
-}
-
-public void test_setWarningsZ() {
- Display display = new Display();
- try {
- display.setWarnings(true);
- display.setWarnings(false);
- // Since the behavior is platform specific, there's
- // no good test for invoking this method.
- // Note that on Windows, the implementation is a no-op.
- } finally {
- display.dispose();
- }
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Event.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Event.java
deleted file mode 100644
index 7c6a338781..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Event.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import junit.framework.*;
-import junit.textui.*;
-import org.eclipse.swt.widgets.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.widgets.Event
- *
- * @see org.eclipse.swt.widgets.Event
- */
-public class Test_org_eclipse_swt_widgets_Event extends SwtTestCase {
-
-public Test_org_eclipse_swt_widgets_Event(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
-}
-
-protected void tearDown() {
-}
-
-public void test_Constructor() {
- Event event = new Event();
- assertNotNull(event);
-}
-
-public void test_getBounds() {
- warnUnimpl("Test test_getBounds not written");
-}
-
-public void test_setBoundsLorg_eclipse_swt_graphics_Rectangle() {
- warnUnimpl("Test test_setBoundsLorg_eclipse_swt_graphics_Rectangle not written");
-}
-
-public void test_toString() {
- Event event = new Event();
- assertNotNull(event.toString());
- assertTrue(event.toString().length() > 0);
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_widgets_Event((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_Constructor");
- methodNames.addElement("test_getBounds");
- methodNames.addElement("test_setBoundsLorg_eclipse_swt_graphics_Rectangle");
- methodNames.addElement("test_toString");
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_Constructor")) test_Constructor();
- else if (getName().equals("test_getBounds")) test_getBounds();
- else if (getName().equals("test_setBoundsLorg_eclipse_swt_graphics_Rectangle")) test_setBoundsLorg_eclipse_swt_graphics_Rectangle();
- else if (getName().equals("test_toString")) test_toString();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_FileDialog.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_FileDialog.java
deleted file mode 100644
index fe7564e635..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_FileDialog.java
+++ /dev/null
@@ -1,187 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.widgets.FileDialog
- *
- * @see org.eclipse.swt.widgets.FileDialog
- */
-public class Test_org_eclipse_swt_widgets_FileDialog extends Test_org_eclipse_swt_widgets_Dialog {
-
-public Test_org_eclipse_swt_widgets_FileDialog(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- super.setUp();
- fileDialog = new FileDialog(shell, SWT.NULL);
- setDialog(fileDialog);
-}
-
-protected void tearDown() {
- super.tearDown();
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_Shell() {
- // Test FileDialog(Shell)
- FileDialog fd = new FileDialog(shell);
- try {
- new FileDialog(null);
- fail("No exception thrown for parent == null");
- }
- catch (IllegalArgumentException e) {
- }
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_ShellI() {
- // Test FileDialog(Shell, int)
- FileDialog fd;
- fd = new FileDialog(shell, SWT.NULL);
- assertTrue(fd.getStyle()==SWT.NULL);
- fd = new FileDialog(shell, SWT.APPLICATION_MODAL);
- assertTrue(fd.getStyle()==SWT.APPLICATION_MODAL);
- fd = new FileDialog(shell, SWT.PRIMARY_MODAL);
- assertTrue(fd.getStyle()==SWT.PRIMARY_MODAL);
- fd = new FileDialog(shell, SWT.SYSTEM_MODAL);
- assertTrue(fd.getStyle()==SWT.SYSTEM_MODAL);
-}
-public void test_getFileName() {
- // tested in test_setFileNameLjava_lang_String()
-}
-
-public void test_getFileNames() {
- String[] names = fileDialog.getFileNames();
- assertTrue(names.length==0);
-}
-
-public void test_getFilterExtensions() {
- // tested in test_setFilterExtensions$Ljava_lang_String()
-}
-
-public void test_getFilterNames() {
- // tested in test_setFilterNames$Ljava_lang_String()
-}
-
-public void test_getFilterPath() {
- // tested in test_setFilterPathLjava_lang_String
-}
-
-public void test_open() {
- if (fTestDialogOpen)
- fileDialog.open();
-}
-
-public void test_setFileNameLjava_lang_String() {
- fileDialog.setFileName("");
- String name = fileDialog.getFileName();
- assertTrue(name.equals(""));
- fileDialog.setFileName(null);
- name = fileDialog.getFileName();
- assertTrue(name==null);
- fileDialog.setFileName("somefile.test");
- name = fileDialog.getFileName();
- assertTrue(name.equals("somefile.test"));
-}
-
-public void test_setFilterExtensions$Ljava_lang_String() {
- fileDialog.setFilterExtensions(new String[] {"txt","java"});
- String filters[] = fileDialog.getFilterExtensions();
- assertTrue(filters.length == 2);
- assertTrue(filters[0].equals("txt"));
- assertTrue(filters[1].equals("java"));
- fileDialog.setFilterExtensions(new String[] {""});
- filters = fileDialog.getFilterExtensions();
- assertTrue(filters.length == 1);
- fileDialog.setFilterExtensions(null);
- filters = fileDialog.getFilterExtensions();
- assertTrue(filters==null);
-}
-
-public void test_setFilterNames$Ljava_lang_String() {
- fileDialog.setFilterNames(new String[] {"a.txt","b.java"});
- String filters[] = fileDialog.getFilterNames();
- assertTrue(filters.length == 2);
- assertTrue(filters[0].equals("a.txt"));
- assertTrue(filters[1].equals("b.java"));
- fileDialog.setFilterNames(new String[] {""});
- filters = fileDialog.getFilterNames();
- assertTrue(filters.length == 1);
- fileDialog.setFilterNames(null);
- filters = fileDialog.getFilterNames();
- assertTrue(filters==null);
-}
-
-public void test_setFilterPathLjava_lang_String() {
- assertTrue(":1:", fileDialog.getFilterPath() == "");
- String testStr = "./*";
- fileDialog.setFilterPath(testStr);
- assertTrue(":2:", fileDialog.getFilterPath().equals(testStr));
- fileDialog.setFilterPath("");
- assertTrue(":3:", fileDialog.getFilterPath().equals(""));
- fileDialog.setFilterPath(null);
- assertTrue(":4:", fileDialog.getFilterPath() == null);
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_widgets_FileDialog((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_Shell");
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_ShellI");
- methodNames.addElement("test_getFileName");
- methodNames.addElement("test_getFileNames");
- methodNames.addElement("test_getFilterExtensions");
- methodNames.addElement("test_getFilterNames");
- methodNames.addElement("test_getFilterPath");
- methodNames.addElement("test_open");
- methodNames.addElement("test_setFileNameLjava_lang_String");
- methodNames.addElement("test_setFilterExtensions$Ljava_lang_String");
- methodNames.addElement("test_setFilterNames$Ljava_lang_String");
- methodNames.addElement("test_setFilterPathLjava_lang_String");
- methodNames.addAll(Test_org_eclipse_swt_widgets_Dialog.methodNames()); // add superclass method names
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_Shell")) test_ConstructorLorg_eclipse_swt_widgets_Shell();
- else if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_ShellI")) test_ConstructorLorg_eclipse_swt_widgets_ShellI();
- else if (getName().equals("test_getFileName")) test_getFileName();
- else if (getName().equals("test_getFileNames")) test_getFileNames();
- else if (getName().equals("test_getFilterExtensions")) test_getFilterExtensions();
- else if (getName().equals("test_getFilterNames")) test_getFilterNames();
- else if (getName().equals("test_getFilterPath")) test_getFilterPath();
- else if (getName().equals("test_open")) test_open();
- else if (getName().equals("test_setFileNameLjava_lang_String")) test_setFileNameLjava_lang_String();
- else if (getName().equals("test_setFilterExtensions$Ljava_lang_String")) test_setFilterExtensions$Ljava_lang_String();
- else if (getName().equals("test_setFilterNames$Ljava_lang_String")) test_setFilterNames$Ljava_lang_String();
- else if (getName().equals("test_setFilterPathLjava_lang_String")) test_setFilterPathLjava_lang_String();
- else super.runTest();
-}
-
-/* custom */
-FileDialog fileDialog;
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_FontDialog.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_FontDialog.java
deleted file mode 100644
index 21f81e9b3e..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_FontDialog.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.graphics.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.widgets.FontDialog
- *
- * @see org.eclipse.swt.widgets.FontDialog
- */
-public class Test_org_eclipse_swt_widgets_FontDialog extends Test_org_eclipse_swt_widgets_Dialog {
-
-public Test_org_eclipse_swt_widgets_FontDialog(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- super.setUp();
- fontDialog = new FontDialog(shell, SWT.NULL);
- setDialog(fontDialog);
-}
-
-protected void tearDown() {
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_Shell() {
- FontDialog fd = new FontDialog(shell);
- try {
- new FontDialog(null);
- fail("No exception thrown for parent == null");
- }
- catch (IllegalArgumentException e) {
- }
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_ShellI() {
- try {
- new FontDialog(null, SWT.NULL);
- fail("No exception thrown for parent == null");
- }
- catch (IllegalArgumentException e) {
- }
-}
-
-public void test_getFontData() {
- // tested in test_setFontDataLorg_eclipse_swt_graphics_FontData
-}
-
-public void test_getFontList() {
- warnUnimpl("Test test_getFontList not written");
-}
-
-public void test_getRGB() {
- // tested in test_setRGBLorg_eclipse_swt_graphics_RGB
-}
-
-public void test_open() {
- warnUnimpl("Test test_open not written");
-}
-
-public void test_setFontDataLorg_eclipse_swt_graphics_FontData() {
- FontData [] fontData = new FontData [1];
- fontData [0] = new FontData ();
-
- assertNull(fontDialog.getFontList());
-
- fontDialog.setFontList(fontData);
- assertEquals(fontDialog.getFontList(), fontData);
-
- fontDialog.setFontList(null);
- assertNull(fontDialog.getFontList());
-}
-
-public void test_setFontList$Lorg_eclipse_swt_graphics_FontData() {
- warnUnimpl("Test test_setFontList$Lorg_eclipse_swt_graphics_FontData not written");
-}
-
-public void test_setRGBLorg_eclipse_swt_graphics_RGB() {
- RGB rgb = new RGB(255, 0, 0);
- fontDialog.setRGB(rgb);
- RGB rgb2 = fontDialog.getRGB();
- assertEquals(rgb, rgb2);
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_widgets_FontDialog((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_Shell");
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_ShellI");
- methodNames.addElement("test_getFontData");
- methodNames.addElement("test_getFontList");
- methodNames.addElement("test_getRGB");
- methodNames.addElement("test_open");
- methodNames.addElement("test_setFontDataLorg_eclipse_swt_graphics_FontData");
- methodNames.addElement("test_setFontList$Lorg_eclipse_swt_graphics_FontData");
- methodNames.addElement("test_setRGBLorg_eclipse_swt_graphics_RGB");
- methodNames.addAll(Test_org_eclipse_swt_widgets_Dialog.methodNames()); // add superclass method names
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_Shell")) test_ConstructorLorg_eclipse_swt_widgets_Shell();
- else if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_ShellI")) test_ConstructorLorg_eclipse_swt_widgets_ShellI();
- else if (getName().equals("test_getFontData")) test_getFontData();
- else if (getName().equals("test_getFontList")) test_getFontList();
- else if (getName().equals("test_getRGB")) test_getRGB();
- else if (getName().equals("test_open")) test_open();
- else if (getName().equals("test_setFontDataLorg_eclipse_swt_graphics_FontData")) test_setFontDataLorg_eclipse_swt_graphics_FontData();
- else if (getName().equals("test_setFontList$Lorg_eclipse_swt_graphics_FontData")) test_setFontList$Lorg_eclipse_swt_graphics_FontData();
- else if (getName().equals("test_setRGBLorg_eclipse_swt_graphics_RGB")) test_setRGBLorg_eclipse_swt_graphics_RGB();
- else super.runTest();
-}
-
-/* custom */
-FontDialog fontDialog;
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Group.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Group.java
deleted file mode 100644
index 673bbde33e..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Group.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.widgets.Group
- *
- * @see org.eclipse.swt.widgets.Group
- */
-public class Test_org_eclipse_swt_widgets_Group extends Test_org_eclipse_swt_widgets_Composite {
-
-public Test_org_eclipse_swt_widgets_Group(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- super.setUp();
- group = new Group(shell, 0);
- setWidget(group);
-}
-
-protected void tearDown() {
- super.tearDown();
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_CompositeI() {
- try {
- group = new Group(null, 0);
- fail("No exception thrown for parent == null");
- }
- catch (IllegalArgumentException e) {
- }
-
- int[] cases = {SWT.SHADOW_IN, SWT.SHADOW_OUT, SWT.SHADOW_ETCHED_IN, SWT.SHADOW_ETCHED_OUT};
- for (int i = 0; i < cases.length; i++)
- group = new Group(shell, cases[i]);
-}
-
-public void test_computeTrimIIII() {
- warnUnimpl("Test test_computeTrimIIII not written");
-}
-
-public void test_getClientArea() {
- warnUnimpl("Test test_getClientArea not written");
-}
-
-public void test_getText() {
- // tested in test_setTextLjava_lang_String
-}
-
-public void test_setTextLjava_lang_String() {
- String[] cases = {"", "some text", "ldkashdoehufweovcnhslvhregojebckreavbkuhxbiufvcyhbifuyewvbiureyd.,cmnesljliewjfchvbwoifivbeworixuieurvbiuvbohflksjeahfcliureafgyciabelitvyrwtlicuyrtliureybcliuyreuceyvbliureybct"};
- for (int i = 0; i < cases.length; i++) {
- group.setText(cases[i]);
- assertTrue("case: " + String.valueOf(i), group.getText().equals(cases[i]));
- };
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_widgets_Group((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_CompositeI");
- methodNames.addElement("test_computeSizeIIZ");
- methodNames.addElement("test_computeTrimIIII");
- methodNames.addElement("test_getClientArea");
- methodNames.addElement("test_getText");
- methodNames.addElement("test_setTextLjava_lang_String");
- methodNames.addAll(Test_org_eclipse_swt_widgets_Composite.methodNames()); // add superclass method names
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_CompositeI")) test_ConstructorLorg_eclipse_swt_widgets_CompositeI();
- else if (getName().equals("test_computeSizeIIZ")) test_computeSizeIIZ();
- else if (getName().equals("test_computeTrimIIII")) test_computeTrimIIII();
- else if (getName().equals("test_getClientArea")) test_getClientArea();
- else if (getName().equals("test_getText")) test_getText();
- else if (getName().equals("test_setTextLjava_lang_String")) test_setTextLjava_lang_String();
- else super.runTest();
-}
-
-/* custom */
-Group group;
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Item.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Item.java
deleted file mode 100644
index 4bb203bb87..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Item.java
+++ /dev/null
@@ -1,149 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import java.io.*;
-
-import junit.framework.*;
-import junit.textui.TestRunner;
-
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.widgets.Item
- *
- * @see org.eclipse.swt.widgets.Item
- */
-public class Test_org_eclipse_swt_widgets_Item extends Test_org_eclipse_swt_widgets_Widget {
-
-public Test_org_eclipse_swt_widgets_Item(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- super.setUp();
- loadImages();
-}
-
-protected void tearDown() {
- super.tearDown();
- freeImages();
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_WidgetI() {
- // abstract class
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_WidgetII() {
- // abstract class
-}
-
-public void test_getImage() {
- // tested in test_setImageLorg_eclipse_swt_graphics_Image
-}
-
-public void test_getText() {
- // tested in test_setTextLjava_lang_String
-}
-
-public void test_setImageLorg_eclipse_swt_graphics_Image() {
- assertNull(item.getImage());
- item.setImage(images[0]);
- assertEquals(images[0], item.getImage());
- assertTrue(item.getImage() != images[1]);
- item.setImage(null);
- assertNull(item.getImage());
-}
-
-public void test_setTextLjava_lang_String() {
- String testStr = "test string";
- item.setText(testStr);
- assertTrue("a", item.getText().equals(testStr));
- item.setText("");
- assertTrue("b", item.getText().equals(""));
- try {
- item.setText(null);
- fail("No exception thrown for string == null");
- }
- catch (IllegalArgumentException e) {
- }
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_widgets_Item((String)e.nextElement()));
- }
- return suite;
-}
-
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_WidgetI");
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_WidgetII");
- methodNames.addElement("test_getImage");
- methodNames.addElement("test_getText");
- methodNames.addElement("test_setImageLorg_eclipse_swt_graphics_Image");
- methodNames.addElement("test_setTextLjava_lang_String");
- methodNames.addAll(Test_org_eclipse_swt_widgets_Widget.methodNames()); // add superclass method names
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_WidgetI")) test_ConstructorLorg_eclipse_swt_widgets_WidgetI();
- else if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_WidgetII")) test_ConstructorLorg_eclipse_swt_widgets_WidgetII();
- else if (getName().equals("test_getImage")) test_getImage();
- else if (getName().equals("test_getText")) test_getText();
- else if (getName().equals("test_setImageLorg_eclipse_swt_graphics_Image")) test_setImageLorg_eclipse_swt_graphics_Image();
- else if (getName().equals("test_setTextLjava_lang_String")) test_setTextLjava_lang_String();
- else super.runTest();
-}
-
-/* custom */
-Item item;
-Image[] images = new Image [SwtTestCase.imageFormats.length*SwtTestCase.imageFilenames.length];
-
-private void loadImages() {
- int numFormats = SwtTestCase.imageFormats.length;
- int numFiles = SwtTestCase.imageFilenames.length;
- for (int i=0; i<numFormats; i++) {
- String format = SwtTestCase.imageFormats[i];
- int index = i*numFiles;
- for (int j=0; j<numFiles; j++){
- String fileName = SwtTestCase.imageFilenames[j];
- InputStream resource = this.getClass().getResourceAsStream(fileName + "." + format);
- images [index+j] = new Image (shell.getDisplay(), resource);
- try {
- resource.close();
- } catch (IOException e) {
- // continue;
- }
- }
- }
-}
-protected void setWidget(Widget widget) {
- item = (Item) widget;
- super.setWidget(widget);
-}
-
-private void freeImages() {
- for (int i=0; i<images.length; i++) {
- if (images[i] != null)
- images[i].dispose();
- }
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Label.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Label.java
deleted file mode 100644
index 9d89d82e8e..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Label.java
+++ /dev/null
@@ -1,165 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.graphics.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.widgets.Label
- *
- * @see org.eclipse.swt.widgets.Label
- */
-public class Test_org_eclipse_swt_widgets_Label extends Test_org_eclipse_swt_widgets_Control {
-
-public Test_org_eclipse_swt_widgets_Label(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- super.setUp();
- label = new Label(shell, 0);
- setWidget(label);
-}
-
-protected void tearDown() {
-// super.tearDown();
-
- if (label != null) {
- assertEquals(shell.isDisposed(), false);
- assertEquals(label.isDisposed(), false);
- }
-
- shell.dispose();
- if (label != null) {
- assertTrue(shell.isDisposed());
- assertTrue(label.isDisposed());
- }
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_CompositeI(){
- try {
- label = new Label(null, 0);
- fail("No exception thrown"); //should never get here
- }
- catch (IllegalArgumentException e) {
- }
-
- label = new Label(shell, 0);
-
- int[] cases = {SWT.LEFT, SWT.RIGHT, SWT.CENTER, SWT.SEPARATOR, SWT.HORIZONTAL, SWT.VERTICAL, SWT.SHADOW_IN, SWT.SHADOW_OUT};
- for (int i = 0; i < cases.length; i++)
- label = new Label(shell, cases[i]);
-}
-
-public void test_computeSizeIIZ() {
- // super class test is sufficient
-}
-
-public void test_getAlignment(){
- int[] cases = {SWT.LEFT, SWT.RIGHT, SWT.CENTER};
- for (int i=0; i<cases.length; i++)
- {
- label = new Label(shell, cases[i]);
- assertEquals(label.getAlignment(), cases[i]);
- }
-}
-
-public void test_getImage(){
- Image[] cases = {null, new Image(null, 100, 100)};
- for(int i=0; i<cases.length; i++){
- label.setImage(cases[i]);
- assertEquals(label.getImage(), cases[i]);
- if (cases[i]!=null)
- cases[i].dispose();
- }
-}
-
-public void test_getText(){
- String[] cases = {"", "some name", "sdasdlkjshcdascecoewcwe"};
- for(int i=0; i<cases.length; i++){
- label.setText(cases[i]);
- assertEquals(label.getText(), cases[i]);
- }
-}
-
-public void test_setAlignmentI(){
- int[] cases = {SWT.LEFT, SWT.RIGHT, SWT.CENTER};
- for (int i=0; i<cases.length; i++)
- {
- label.setAlignment(cases[i]);
- assertEquals(label.getAlignment(), cases[i]);
- }
-}
-
-public void test_setFocus() {
- // super class test is sufficient
-}
-
-public void test_setImageLorg_eclipse_swt_graphics_Image() {
- // tested in getImage method
-}
-
-public void test_setTextLjava_lang_String(){
- try {
- label.setText(null);
- fail("No exception thrown for string == null");
- }
- catch (IllegalArgumentException e) {
- }
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_widgets_Label((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_CompositeI");
- methodNames.addElement("test_computeSizeIIZ");
- methodNames.addElement("test_getAlignment");
- methodNames.addElement("test_getImage");
- methodNames.addElement("test_getText");
- methodNames.addElement("test_setAlignmentI");
- methodNames.addElement("test_setFocus");
- methodNames.addElement("test_setImageLorg_eclipse_swt_graphics_Image");
- methodNames.addElement("test_setTextLjava_lang_String");
- methodNames.addAll(Test_org_eclipse_swt_widgets_Control.methodNames()); // add superclass method names
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_CompositeI")) test_ConstructorLorg_eclipse_swt_widgets_CompositeI();
- else if (getName().equals("test_computeSizeIIZ")) test_computeSizeIIZ();
- else if (getName().equals("test_getAlignment")) test_getAlignment();
- else if (getName().equals("test_getImage")) test_getImage();
- else if (getName().equals("test_getText")) test_getText();
- else if (getName().equals("test_setAlignmentI")) test_setAlignmentI();
- else if (getName().equals("test_setFocus")) test_setFocus();
- else if (getName().equals("test_setImageLorg_eclipse_swt_graphics_Image")) test_setImageLorg_eclipse_swt_graphics_Image();
- else if (getName().equals("test_setTextLjava_lang_String")) test_setTextLjava_lang_String();
- else super.runTest();
-}
-
-/* custom */
-Label label;
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Layout.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Layout.java
deleted file mode 100644
index d69a2eb3f3..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Layout.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.widgets.Layout
- *
- * @see org.eclipse.swt.widgets.Layout
- */
-public class Test_org_eclipse_swt_widgets_Layout extends SwtTestCase {
- Shell shell;
- Composite composite;
-
-public Test_org_eclipse_swt_widgets_Layout(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- shell = new Shell();
- composite = new Composite(shell, 0);
-}
-
-protected void tearDown() {
- if (composite != null) {
- composite.dispose();
- }
- if (shell != null) {
- shell.dispose();
- }
-}
-
-public void test_Constructor() {
- warnUnimpl("Test test_Constructor not written");
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_widgets_Layout((String)e.nextElement()));
- }
- return suite;
-}
-
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_Constructor");
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_Constructor")) test_Constructor();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_List.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_List.java
deleted file mode 100644
index 0da007ec4f..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_List.java
+++ /dev/null
@@ -1,2467 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import junit.framework.*;
-import junit.textui.*;
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.widgets.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.widgets.List
- *
- * @see org.eclipse.swt.widgets.List
- */
-public class Test_org_eclipse_swt_widgets_List extends Test_org_eclipse_swt_widgets_Scrollable {
-
-public Test_org_eclipse_swt_widgets_List(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- super.setUp();
- list = new List(shell, SWT.MULTI);
-
- setWidget(list);
-}
-
-protected void tearDown() {
- super.tearDown();
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_CompositeI() {
- try {
- list = new List(null, 0);
- fail("No exception thrown"); //should never get here
- } catch (IllegalArgumentException e) {
- }
-
- int[] cases =
- {
- 0,
- SWT.SINGLE,
- SWT.MULTI,
- SWT.MULTI | SWT.V_SCROLL,
- SWT.MULTI | SWT.H_SCROLL,
- SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL };
- for (int i = 0; i < cases.length; i++)
- list = new List(shell, cases[i]);
-}
-
-public void test_addLjava_lang_String() {
- try {
- list.add(null);
- fail("No exception thrown");
- } catch (IllegalArgumentException e) {
- }
- list.add("");
- assertSame(":a:", new String[] {""}, list.getItems());
- list.add("some \n text");
- assertSame(":b:", new String[] {"", "some \n text"}, list.getItems());
- list.add("some text");
- assertSame(":c:", new String[] {"", "some \n text", "some text"}, list.getItems());
-
- // test single-selection list
-
- setSingleList();
-
- try {
- list.add(null);
- fail("No exception thrown");
- } catch (IllegalArgumentException e) {
- }
-
- list.add("");
- assertSame(":a:", new String[] {""}, list.getItems());
- list.add("some \n text");
- assertSame(":b:", new String[] {"", "some \n text"}, list.getItems());
- list.add("some text");
- assertSame(":c:", new String[] {"", "some \n text", "some text"}, list.getItems());
-}
-
-public void test_addLjava_lang_StringI() {
- try {
- list.add("some text", 2);
- fail("No exception thrown");
- } catch (IllegalArgumentException e) {
- }
- assertEquals(0, list.getItemCount());
-
- list.add("", 0);
- assertSame(":a:", new String[] {""}, list.getItems());
- list.add("some \n text", 1);
- assertSame(":b:", new String[] {"", "some \n text"}, list.getItems());
- list.add("some text", 0);
- assertSame(":c:", new String[] {"some text", "", "some \n text" }, list.getItems());
-
- try {
- list.add(null, 0);
- fail("No exception thrown string == null");
- } catch (IllegalArgumentException e) {
- }
-
- try {
- list.add("string", -1);
- fail("No exception thrown index < 0");
- } catch (IllegalArgumentException e) {
- }
-
- // test single-selection list
-
- setSingleList();
-
- try {
- list.add("some text", 2);
- fail("No exception thrown");
- } catch (IllegalArgumentException e) {
- }
-
- assertEquals(0, list.getItemCount());
-
- list.add("", 0);
- assertSame(":a:", new String[] {""}, list.getItems());
- list.add("some \n text", 1);
- assertSame(":b:", new String[] {"", "some \n text"}, list.getItems());
- list.add("some text", 0);
- assertSame(":c:", new String[] {"some text", "", "some \n text" }, list.getItems());
-
- try {
- list.add(null, 0);
- fail("No exception thrown string == null");
- } catch (IllegalArgumentException e) {
- }
-
- try {
- list.add("string", -1);
- fail("No exception thrown index < 0");
- } catch (IllegalArgumentException e) {
- }
-}
-
-public void test_addSelectionListenerLorg_eclipse_swt_events_SelectionListener() {
- listenerCalled = false;
- boolean exceptionThrown = false;
- SelectionListener listener = new SelectionListener() {
- public void widgetSelected(SelectionEvent event) {
- listenerCalled = true;
- }
- public void widgetDefaultSelected(SelectionEvent event) {
- }
- };
- try {
- list.addSelectionListener(null);
- }
- catch (IllegalArgumentException e) {
- exceptionThrown = true;
- }
- assertTrue("Expected exception not thrown for listener == null", exceptionThrown);
-
- list.addSelectionListener(listener);
- list.select(0);
- assertTrue(":a:", listenerCalled == false);
- list.removeSelectionListener(listener);
- exceptionThrown = false;
- try {
- list.removeSelectionListener(null);
- }
- catch (IllegalArgumentException e) {
- exceptionThrown = true;
- }
- assertTrue("Expected exception not thrown for listener == null", exceptionThrown);
-
- // test single-selection list
-
- setSingleList();
-
- listenerCalled = false;
- exceptionThrown = false;
- try {
- list.addSelectionListener(null);
- }
- catch (IllegalArgumentException e) {
- exceptionThrown = true;
- }
- assertTrue("Expected exception not thrown for listener == null", exceptionThrown);
-
- list.addSelectionListener(listener);
- list.select(0);
- assertTrue(":a:", listenerCalled == false);
- list.removeSelectionListener(listener);
- exceptionThrown = false;
- try {
- list.removeSelectionListener(null);
- }
- catch (IllegalArgumentException e) {
- exceptionThrown = true;
- }
- assertTrue("Expected exception not thrown for listener == null", exceptionThrown);
-
-}
-
-public void test_computeSizeIIZ() {
- // super class test is sufficient
-}
-
-public void test_deselect$I() {
- String[] items = { "item0", "item1", "item2", "item3" };
- String[] empty = {
- };
- list.setItems(items);
- list.setSelection(items);
- assertSame(":a:", list.getSelection(), items);
- try {
- list.deselect(null);
- fail("No exception thrown");
- } catch (IllegalArgumentException e) {
- }
- assertSame(list.getSelection(), items);
- list.deselect(new int[] {
- });
- assertSame(list.getSelection(), items);
- list.deselect(new int[] { 0 });
- assertEquals(list.isSelected(0), false);
- assertTrue(list.isSelected(1));
- list.deselect(new int[] { 2, 0, 0 });
- assertSame(list.getSelectionIndices(), new int[] { 1, 3 });
- /* assert(":d:", !list.isSelected(0));
- assert(":dd:", !list.isSelected(2));
- assert(":ddd:", list.isSelected(1));
- assert(":ddd:", list.isSelected(1));*/
-
-
- setSingleList();
- list.setItems(items);
- list.setSelection(new String[] { "item3" });
- assertEquals(list.getSelection(), new String[] { "item3" });
- try {
- list.deselect(null);
- fail("No exception thrown");
- } catch (IllegalArgumentException e) {
- }
-
- assertEquals(list.getSelection(), new String[] { "item3" });
- list.deselect(new int[] {});
- assertEquals(list.getSelection(), new String[] { "item3" });
- list.deselect(new int[] { 1 });
- assertEquals(list.getSelectionIndices(), new int[] { 3 });
- list.deselect(new int[] { 0 });
- assertEquals(list.getSelectionIndices(), new int[] { 3 });
- list.deselect(new int[] { 3 });
- assertEquals(list.getSelectionIndices(), new int[] {});
- list.deselect(new int[] { 2, 0, 0 });
- assertEquals(list.getSelectionIndices(), new int[] {});
-
-}
-
-public void test_deselectAll() {
- String[] items = { "item0", "item1", "item2", "item3" };
- String[] empty = {
- };
- list.setItems(items);
- list.setSelection(items);
- assertSame(items, list.getSelection());
- list.deselectAll();
- assertEquals(empty, list.getSelection());
-
-
- setSingleList();
-
- list.setItems(items);
- list.setSelection(new String[] { "item3" });
- assertEquals(new String[] { "item3" }, list.getSelection());
- list.deselectAll();
- assertEquals(empty, list.getSelection());
-
-}
-
-public void test_deselectI() {
- int number = 5;
- String[] items = new String[number];
- for (int i = 0; i < number; i++)
- items[i] = "fred" + i;
- list.setItems(items);
-
- String[] items2 = { "item0", "item1", "item2", "item3" };
- String[] empty = {
- };
- list.setItems(items2);
- list.setSelection(items2);
- assertSame(items2, list.getSelection());
- list.deselect(5);
- assertSame(items2, list.getSelection());
- list.deselect(1);
- assertEquals(false, list.isSelected(1));
- list.deselect(1);
- assertEquals(false, list.isSelected(1));
-
-
- setSingleList();
- list.setItems(items2);
- list.setSelection(new String[] { "item3" });
- assertEquals(new String[] { "item3" }, list.getSelection());
- list.deselect(5);
- assertEquals(new String[] { "item3" }, list.getSelection());
- list.deselect(2);
- assertEquals(false, list.isSelected(2));
- list.deselect(1);
- assertEquals(false, list.isSelected(1));
- list.deselect(1);
- assertEquals(false, list.isSelected(1));
-}
-
-public void test_deselectII() {
- int number = 5;
- String[] items = new String[number];
- for (int i = 0; i < number; i++)
- items[i] = "fred" + i;
- list.setItems(items);
- list.setSelection(items);
-
- // tests if deselect(i, j) is the same as for (i=0; i<=j; ++i) deselect(i);
- int[][] cases = { { 3, 1 }, {
- -3, -2 }, {
- -2, -1 }, {
- -1, -1 }, {
- 10, 1 }
- };
-
- for (int i = 0; i < cases.length; ++i) {
- deselectII_helper(items, cases[i][0], cases[i][1], new int[] { 0, 1, 2, 3, 4 });
- }
- if (fCheckSWTPolicy) {
- deselectII_helper(items, -1, 3, new int[] { 4 });
- deselectII_helper(items, -1, 30, new int[] {
- });
- }
- deselectII_helper(items, 1, 3, new int[] { 0, 4 });
- deselectII_helper(items, 1, 1, new int[] { 0, 2, 3, 4 });
- // done
-
- String[] items2 = { "item0", "item1", "item2", "item3" };
- String[] empty = {
- };
- list.setItems(items2);
- list.setSelection(items2);
- assertSame(":a:", items2, list.getSelection());
- list.deselect(0, 0);
- assertSame(":b:", list.getSelectionIndices(), new int[] { 1, 2, 3 });
- list.deselect(0, 0);
- assertSame(":bbb:", list.getSelectionIndices(), new int[] { 1, 2, 3 });
- list.deselect(2, 3);
- assertEquals(":bb:", list.getSelectionIndices(), new int[] { 1 });
-
- list.setSelection(items2);
- list.deselect(0, 2);
- assertEquals(":dddd:", list.getSelectionIndices(), new int[] { 3 });
-
- list.setSelection(items2);
- list.deselect(2, 0);
- assertSame(
- ":ddddd:",
- list.getSelectionIndices(), new int[] { 0, 1, 2, 3 });
-
-
- setSingleList();
-
- list.setItems(items2);
- list.deselectAll();
-
- list.select(0);
-
- list.deselect(-3, -2);
- assertEquals(list.getSelectionIndices(), new int[] { 0 });
-
- list.deselect(-2, -1);
- assertEquals(list.getSelectionIndices(), new int[] { 0 });
-
- list.deselect(-1, -1);
- assertEquals(":e:", list.getSelectionIndices(), new int[] { 0 });
-
-
- list.setSelection(new String[] { "item3" });
- assertEquals(list.getSelection(), new String[] { "item3" });
-
- list.deselect(1, 1);
- assertEquals(list.getSelection(), new String[] { "item3" });
-
- list.deselect(0, 0);
- assertEquals(list.getSelection(), new String[] { "item3" });
-
- list.deselect(3, 3);
- assertEquals(list.getSelection(), new String[] {});
-
- list.setSelection(new String[] { "item3" });
- list.deselect(1, 2);
- assertEquals(list.getSelection(), new String[] { "item3" });
-
- list.setSelection(new String[] { "item3" });
- list.deselect(0, 2);
- assertEquals(list.getSelectionIndices(), new int[] { 3 });
-
- list.setSelection(new String[] { "item3" });
- list.deselect(1, 3);
- assertEquals(list.getSelectionIndices(), new int[] {});
-}
-
-public void test_getFocusIndex() {
- String[] items = { "item0", "item1", "item2"};
- list.setItems(items);
- list.setSelection(0);
- assertEquals(0, list.getFocusIndex());
- list.setSelection(2);
- assertEquals(2, list.getFocusIndex());
-}
-
-public void test_getItemCount() {
- String[] items = { "item0", "item1", "item2", "item3" };
-
- assertEquals(0, list.getItemCount());
- list.setItems(items);
- assertEquals(4, list.getItemCount());
- list.remove(2);
- assertEquals(3, list.getItemCount());
- list.removeAll();
- assertEquals(0, list.getItemCount());
-
-
- setSingleList();
- assertEquals(0, list.getItemCount());
- list.setItems(items);
- assertEquals(4, list.getItemCount());
- list.remove(2);
- assertEquals(3, list.getItemCount());
- list.removeAll();
- assertEquals(0, list.getItemCount());
-
-}
-
-public void test_getItemHeight() {
- FontData fontData = list.getFont().getFontData()[0];
- int lineHeight;
- Font font;
-
- font = new Font(list.getDisplay(), fontData.getName(), 8, fontData.getStyle());
- list.setFont(font);
- lineHeight = list.getItemHeight();
- list.setFont(null);
- font.dispose();
- font = new Font(list.getDisplay(), fontData.getName(), 12, fontData.getStyle());
- list.setFont(font);
- int newLineHeight = list.getItemHeight();
- assertTrue(":a:", newLineHeight > lineHeight);
- list.setFont(null);
- font.dispose();
-}
-
-public void test_getItemI() {
- String[] items = { "item0", "item1", "item2", "item3" };
- String[] empty = {
- };
- list.setItems(items);
- String item = null;
- try {
- item = list.getItem(5);
- fail("No exception thrown");
- } catch (IllegalArgumentException e) {
- }
-
- try {
- item = list.getItem(-1);
- fail("No exception thrown for index < 0");
- } catch (IllegalArgumentException e) {
- }
-
- assertEquals(list.getItem(3), "item3");
-
-
- setSingleList();
- list.setItems(items);
- try {
- item = list.getItem(5);
- fail("No exception thrown");
- } catch (IllegalArgumentException e) {
- }
-
- try {
- item = list.getItem(-1);
- fail("No exception thrown for index < 0");
- } catch (IllegalArgumentException e) {
- }
-
- //assert(":a:", list.getItem(5)==null);
- assertEquals("item3", list.getItem(3));
-
-}
-
-public void test_getItems() {
- String[][] cases = { {
- }, {
- "" }, {
- "", "" }, {
- "text1", "text2" }
- };
- for (int i = 0; i < cases.length; i++) {
- list.setItems(cases[i]);
- assertEquals("case: " + i, cases[i], list.getItems());
- }
-}
-
-public void test_getSelection() {
- String[][] cases = { {
- }, {
- "" }, {
- "", "" }, {
- "text1", "text2" }
- };
- for (int i = 0; i < cases.length; i++) {
- // System.out.println("loop:" + i);
- list.setItems(cases[i]);
- list.setSelection(cases[i]);
- // System.out.println("list:" + list.getSelection());
- // System.out.println("case:" + i + cases[i]);
- assertSame("case: " + i, cases[i], list.getSelection());
- }
-
- for (int i = 1; i < cases.length; i++) {
- list.setItems(cases[i]);
- list.setSelection(0);
- assertEquals(
- "case: " + String.valueOf(i),
- list.getSelection(), new String[] { cases[i][0] });
- }
-
- String[] items = { "text1", "text2", "text3" };
- list.setItems(items);
- int[] sel = { 0, 2 };
- list.setSelection(sel);
- assertEquals(list.getSelection().length, 2);
- String[] selItems = new String[] {items[0], items[2]};
- assertSame(list.getSelection(), selItems);
-
- list.setSelection(0, 1);
- assertEquals(list.getSelection().length, 2);
- selItems = new String[] {items[0], items[1]};
- assertSame(list.getSelection(), selItems);
-
- list.setSelection(1, 1);
- assertEquals(list.getSelection().length, 1);
- assertEquals(list.getSelection()[0], items[1]);
-
- list.setSelection(1, 0);
- String[] empty = {
- };
- assertEquals(empty, list.getSelection());
-
- String[] bogus_items = { "bogus_text1", "bogus_text2", "bogus_text3" };
- list.setSelection(bogus_items);
- assertEquals(empty, list.getSelection());
-
- // test single-selection lists
-
- setSingleList();
-
- list.setItems(items);
- sel = new int[] { 0 };
- list.setSelection(sel);
- assertEquals(1, list.getSelection().length);
- assertEquals(items[0], list.getSelection()[0]);
-
- list.setSelection(1, 1);
- assertEquals(1, list.getSelection().length);
- assertEquals(items[1], list.getSelection()[0]);
-}
-
-/**
- * Returns the number of selected items contained in the receiver.
- *
- * @return the number of selected items
- *
- * @exception SWTException <ul>
- * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
- * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
- * </ul>
- * @exception SWTError <ul>
- * <li>ERROR_CANNOT_GET_COUNT - if the operation fails because of an operating system failure</li>
- * </ul>
- */
-public void test_getSelectionCount() {
- String[] items = { "text1", "text2", "text3" };
-
- list.setItems(items);
- assertEquals(0, list.getSelectionCount());
-
- list.setSelection(items);
- assertEquals(3, list.getSelectionCount());
-
- list.deselectAll();
- try {
- list.setSelection((String[]) null);
- fail("No exception thrown for selection == null");
- } catch (IllegalArgumentException e) {
- }
- assertEquals(list.getSelectionCount(), 0);
-
-
- setSingleList();
-
- list.setItems(items);
- list.setSelection(new String[] { "text2" });
- assertEquals(1, list.getSelectionCount());
-}
-
-public void test_getSelectionIndex() {
- String[] items = { "text1", "text2", "text3" };
-
- // not properly spec'd for multi-select lists
- list.setItems(items);
- list.setSelection(items);
- assertEquals(0, list.getSelectionIndex());
-
-
- setSingleList();
-
- list.setItems(items);
- list.setSelection(items);
- assertEquals(-1, list.getSelectionIndex());
-
- list.setSelection(new String[] { "text1" });
- assertEquals(0, list.getSelectionIndex());
-
- list.setSelection(new String[] { "text2" });
- assertEquals(1, list.getSelectionIndex());
-
- list.setSelection(new String[] { "text3" });
- assertEquals(2, list.getSelectionIndex());
-
- list.setSelection(items);
- assertEquals(-1, list.getSelectionIndex());
-}
-
-public void test_getSelectionIndices() {
- String[] items = { "text1", "text2", "text3" };
-
- list.setItems(items);
-
- assertEquals(list.getSelectionIndices(), new int[] {});
-
- list.setSelection(items);
- int[] sel = { 0, 1, 2 };
- assertSame(sel, list.getSelectionIndices());
-
- list.setSelection(sel);
- assertSame(sel, list.getSelectionIndices());
-
- sel = new int[] { 0 };
- list.setSelection(sel);
- assertSame(sel, list.getSelectionIndices());
-
- sel = new int[] { 1 };
- list.setSelection(sel);
- assertSame(sel, list.getSelectionIndices());
-
- sel = new int[] { 2 };
- list.setSelection(sel);
- assertSame(sel, list.getSelectionIndices());
-
- sel = new int[] { 3 };
- list.setSelection(sel);
- assertSame(new int[] {}, list.getSelectionIndices());
-
- sel = new int[] { -1, 0, 1, 2, 3 };
- list.setSelection(sel);
- assertSame(new int[] { 0, 1, 2 }, list.getSelectionIndices());
-
- sel = new int[] { 1, 1, 2, 2 };
- list.setSelection(sel);
- assertSame(new int[] { 1, 2 }, list.getSelectionIndices());
-
-
- setSingleList();
-
- list.setItems(items);
-
- sel = new int[] { 0 };
- list.setSelection(sel);
- assertSame(sel, list.getSelectionIndices());
-
- sel = new int[] { 1 };
- list.setSelection(sel);
- assertSame(sel, list.getSelectionIndices());
-
- sel = new int[] { 2 };
- list.setSelection(sel);
- assertSame(sel, list.getSelectionIndices());
-
- sel = new int[] { 3 };
- list.setSelection(sel);
- assertSame(new int[] {}, list.getSelectionIndices());
-}
-
-public void test_getTopIndex() {
- String[] items = { "text1", "text2", "text3" };
-
- list.setItems(items);
- assertEquals(0, list.getTopIndex());
-
-
- setSingleList();
-
- list.setItems(items);
- assertEquals(0, list.getTopIndex());
-
-}
-
-public void test_indexOfLjava_lang_String() {
- String[] items = { "text1", "text2", "text3" };
-
- list.setItems(items);
- assertEquals(list.indexOf("text3"), 2);
- assertEquals(list.indexOf("text4"), -1);
-
- int ind;
- try {
- ind = list.indexOf(null);
- fail("No exception thrown for item == null");
- } catch (IllegalArgumentException e) {
- }
-
- String[] items2 = { "text1", "text2", "text2" }; //two identical
-
- list.setItems(items2);
- assertEquals(list.indexOf("text2"), 1);
-
-
- setSingleList();
-
- list.setItems(items);
- assertEquals(-1, list.indexOf("text3", 4));
-
-
- assertEquals(2, list.indexOf("text3"));
-
-
- assertEquals(-1, list.indexOf("text4"));
-
-
- try {
- ind = list.indexOf(null);
- fail("No exception thrown");
- } catch (IllegalArgumentException e) {
- }
-
-
- assertEquals(1, list.indexOf("text2"));
-}
-
-public void test_indexOfLjava_lang_StringI() {
- String[] items = { "text1", "text2", "text3" };
-
- list.setItems(items);
- assertEquals(-1, list.indexOf("text3", 4));
- assertEquals(2, list.indexOf("text3", 2));
- assertEquals(1, list.indexOf("text2", 0));
- assertEquals(1, list.indexOf("text2", 1));
- assertEquals(-1, list.indexOf("text2", 2));
-
- String[] items2 = { "text1", "text2", "text2" }; //two identical
- list.setItems(items2);
- assertEquals(list.indexOf("text2", 2), 2);
-
- try {
- list.indexOf(null, 0);
- fail("No exception thrown for string == null");
- } catch (IllegalArgumentException e) {
- }
-
- setSingleList();
-
- list.setItems(items2);
- // assert("list.indexOf(\"text2\", -1)==1", list.indexOf("text2", -1)==1);
- assertEquals(1, list.indexOf("text2", 0));
- assertEquals(1, list.indexOf("text2", 1));
- assertEquals(2, list.indexOf("text2", 2));
-
- try {
- list.indexOf(null, 0);
- fail("No exception thrown for string == null");
- } catch (IllegalArgumentException e) {
- }
-}
-
-public void test_isSelectedI() {
- String[] items = { "text1", "text2", "text2" }; //two identical
-
- list.setItems(items);
- list.setSelection(items);
- assertTrue(list.isSelected(0));
- assertTrue(list.isSelected(1));
- assertTrue(list.isSelected(2));
- assertEquals(false, list.isSelected(3));
-
-
- setSingleList();
-
- list.setItems(items);
- list.setSelection(items);
- if (fCheckSWTPolicy) {
- assertEquals(false, list.isSelected(0));
- assertTrue(list.isSelected(1));
- assertEquals(false, list.isSelected(2));
- assertEquals(false, list.isSelected(3));
- }
-
-}
-
-public void test_remove$I() {
- try {
- list.remove((int[]) null);
- fail("No exception thrown for indices == null");
- } catch (IllegalArgumentException e) {
- }
-
- String[] items = { "text0", "text1", "text2", "text3" };
-
- list.setItems(items);
- assertEquals(list.getItemCount(), 4);
-
- list.setItems(items);
- list.remove(new int[] { 1, 0, 1 });
- assertEquals(list.getItemCount(), 2);
-
- list.setItems(items);
-
- // index > number of elements in list
- try {
- list.remove(new int[] { 4, 1});
- fail("No exception thrown");
- } catch (IllegalArgumentException e) {
- }
- assertEquals(":a:", list.getItems(), items);
-
- try {
- list.remove(new int[] { 3, 1, -1 });
- fail("No exception thrown");
- } catch (IllegalArgumentException e) {
- }
- assertEquals(":a:", list.getItems(), items);
-
- list.setItems(items);
- assertEquals(list.getItemCount(), 4);
-
- try {
- list.remove(new int[] { -1, -1 });
- fail("No exception thrown");
- } catch (IllegalArgumentException e) {
- }
- assertEquals(":b:", list.getItems(), items);
-
- try {
- list.remove(new int[] { -2, -1 });
- fail("No exception thrown");
- } catch (IllegalArgumentException e) {
- }
- assertEquals(":c:", list.getItems(), items);
-
- list.setItems(items);
- assertEquals(list.getItemCount(), 4);
-
- list.remove(new int[] { 1, 1, 1 });
- assertEquals(
- ":d:",
- list.getItems(), new String[] { "text0", "text2", "text3" });
-
- list.setItems(items);
- assertEquals(list.getItemCount(), 4);
-
- list.remove(new int[] { 1, 3 });
- assertEquals(":e:", list.getItems(), new String[] { "text0", "text2" });
-
-
- setSingleList();
-
- try {
- int[] indices = null;
- list.remove(indices);
- fail("No exception thrown for indices == null");
- } catch (IllegalArgumentException e) {
- }
-
- list.setItems(items);
- assertEquals(4, list.getItemCount());
-
- list.remove(new int[] { 1, 3 });
- assertEquals(":f:", list.getItems(), new String[] { "text0", "text2" });
-
-
- list.setItems(items);
- assertEquals(4, list.getItemCount());
-
- list.remove(new int[] { 3, 1 });
- assertEquals(":g:", list.getItems(), new String[] { "text0", "text2" });
-
-
- list.setItems(items);
- assertEquals(4, list.getItemCount());
-
- // index > number of elements in list
- try {
- list.remove(new int[] { 4, 1});
- fail("No exception thrown");
- } catch (IllegalArgumentException e) {
- }
- assertEquals(":h:", list.getItems(), items);
-
- try {
- list.remove(new int[] { 3, 1, -1 });
- fail("No exception thrown");
- } catch (IllegalArgumentException e) {
- }
- assertEquals(":h:", list.getItems(), items);
-
-
- list.setItems(items);
- assertEquals(4, list.getItemCount());
-
- try {
- list.remove(new int[] { -1, -1 });
- fail("No exception thrown");
- } catch (IllegalArgumentException e) {
- }
-
- assertEquals(":i:", items, list.getItems());
-
-
- assertEquals(4, list.getItemCount());
-
- list.remove(new int[] { 1, 1, 1 });
- assertEquals(":j:",
- new String[] { "text0", "text2", "text3" }, list.getItems());
-
-}
-
-public void test_removeAll() {
- String[] items = { "text1", "text2", "text3", "test2" };
-
- list.setItems(items);
- assertEquals(list.getItemCount(), 4);
-
- list.removeAll();
- assertEquals(list.getItemCount(), 0);
- list.removeAll();
- assertEquals(list.getItemCount(), 0);
-
-
- setSingleList();
- list.setItems(items);
- assertEquals(4, list.getItemCount());
-
- list.removeAll();
- assertEquals(0, list.getItemCount());
-
-
- setSingleList();
- assertEquals(0, list.getItemCount());
- list.removeAll();
- assertEquals(0, list.getItemCount());
-
-}
-
-public void test_removeI() {
- String[] items = { "text1", "text2", "text3" };
-
- list.setItems(items);
- assertEquals(list.getItemCount(), 3);
-
- try {
- list.remove(3);
- fail("No exception thrown");
- } catch (IllegalArgumentException e) {
- }
- assertEquals(list.getItemCount(), 3);
-
- try {
- list.remove(-1);
- fail("No exception thrown");
- } catch (IllegalArgumentException e) {
- }
- assertEquals(list.getItemCount(), 3);
-
- list.remove(1);
- assertEquals(list.getItemCount(), 2);
- assertEquals(list.getItem(1), "text3");
-
- list.setItems(items);
- assertEquals(list.getItemCount(), 3);
-
- try {
- list.remove(3, 4);
- fail("No exception thrown");
- } catch (IllegalArgumentException e) {
- }
-
- assertEquals(list.getItemCount(), 3);
-
- try {
- list.remove(3, 3);
- fail("No exception thrown");
- } catch (IllegalArgumentException e) {
- }
-
- assertEquals(list.getItemCount(), 3);
-
- list.remove(0);
- assertEquals(list.getItemCount(), 2);
- list.remove(0);
- assertEquals(list.getItemCount(), 1);
- assertEquals(list.getItem(0), "text3");
- list.remove(0);
- assertEquals(list.getItemCount(), 0);
-
- list.setItems(items);
- list.remove(1, 2);
- assertEquals(list.getItemCount(), 1);
- assertEquals(list.getItem(0), "text1");
-
-
- setSingleList();
- list.setItems(items);
- assertEquals(3, list.getItemCount());
- try {
- list.remove(3);
- fail("No exception thrown");
- } catch (IllegalArgumentException e) {
- }
- assertEquals(3, list.getItemCount());
- /////////////////////////////////////////////////
- try {
- list.remove(-1);
- fail("No exception thrown");
- } catch (IllegalArgumentException e) {
- }
-
- assertEquals(3, list.getItemCount());
- ////////////////////////////////////////////////
- list.remove(1);
- assertEquals(2, list.getItemCount());
- //////////////////////////////////////////////////////
- assertTrue(list.getItem(1).equals("text3"));
-
- list.setItems(items);
- assertEquals(list.getItemCount(), 3);
-
- list.remove(0);
- assertEquals(list.getItemCount(), 2);
- list.remove(0);
- assertEquals(list.getItemCount(), 1);
- assertEquals(list.getItem(0), "text3");
- list.remove(0);
- assertEquals(list.getItemCount(), 0);
-
-}
-
-public void test_removeII() {
- String[] items = { "text1", "text2", "text3" };
-
- list.setItems(items);
- assertEquals(3, list.getItemCount());
-
- try {
- list.remove(3, 4);
- fail("No exception thrown");
- } catch (IllegalArgumentException e) {
- }
-
- assertEquals(3, list.getItemCount());
-
- try {
- list.remove(3, 3);
- fail("No exception thrown");
- } catch (IllegalArgumentException e) {
- }
- assertEquals(3, list.getItemCount());
-
- list.remove(0, 0);
- assertEquals(2, list.getItemCount());
- assertEquals("text3", list.getItem(1));
-
- list.setItems(items);
- assertEquals(3, list.getItemCount());
-
- try {
- list.remove(-1, 1);
- fail("No exception thrown for start index < 0");
- } catch (IllegalArgumentException e) {
- }
- assertEquals(3, list.getItemCount());
-
- try {
- list.remove(3, 4);
- fail("No exception thrown");
- } catch (IllegalArgumentException e) {
- }
- assertEquals(3, list.getItemCount());
-
- list.remove(0, 2);
- assertEquals(0, list.getItemCount());
-
- list.setItems(items);
- assertEquals(3, list.getItemCount());
-
- try {
- list.remove(3, 3);
- fail("No exception thrown");
- } catch (IllegalArgumentException e) {
- }
- assertEquals(3, list.getItemCount());
-
- list.remove(2, 0);
- assertEquals(3, list.getItemCount());
-
-
- setSingleList();
-
- list.setItems(items);
- assertEquals(3, list.getItemCount());
- //////////////////////////////////////////////////////////////
- try {
- list.remove(3, 4);
- fail("No exception thrown");
- } catch (IllegalArgumentException e) {
- }
-
- assertEquals(3, list.getItemCount());
- /////////////////////////////////////////////////////////
- try {
- list.remove(3, 3);
- fail("No exception thrown");
- } catch (IllegalArgumentException e) {
- }
-
- assertEquals(3, list.getItemCount());
- //////////////////////////////////////////////////////////////
-
- try {
- list.remove(-1, 1);
- fail("No exception thrown for start index < 0");
- } catch (IllegalArgumentException e) {
- }
- assertEquals(3, list.getItemCount());
-
- list.remove(1, 2);
- assertEquals(1, list.getItemCount());
- assertEquals("text1", list.getItem(0));
-
-
- list.setItems(items);
- assertEquals(3, list.getItemCount());
-
- try {
- list.remove(2, 10);
- fail("No exception thrown");
- } catch (IllegalArgumentException e) {
- }
- assertEquals(3, list.getItemCount());
- assertEquals("text2", list.getItem(1));
-
- list.remove(2, 0);
- assertEquals(3, list.getItemCount());
-}
-
-public void test_removeLjava_lang_String() {
- String[] items = { "text1", "text2", "text3", "test2" };
-
- list.setItems(items);
- assertEquals(list.getItemCount(), 4);
-
- try {
- list.remove((String) null);
- fail("No exception thrown");
- } catch (IllegalArgumentException e) {
- }
- assertEquals(list.getItemCount(), 4);
-
- try {
- list.remove("items989");
- fail("No exception thrown");
- } catch (IllegalArgumentException e) {
- }
- assertEquals(list.getItemCount(), 4);
-
- list.setItems(items);
- assertEquals(list.getItemCount(), 4);
-
- list.remove("text3");
- assertEquals(list.getItemCount(), 3);
-
- list.remove("text2");
- assertEquals(list.getItemCount(), 2);
-
-
- setSingleList();
- list.setItems(items);
- assertEquals(4, list.getItemCount());
-
- try {
- list.remove((String) null);
- fail("No exception thrown");
- } catch (IllegalArgumentException e) {
- }
- assertEquals(4, list.getItemCount());
- ////////////////////////////////////////
- try {
- list.remove("items989");
- fail("No exception thrown");
- } catch (IllegalArgumentException e) {
- }
- assertEquals(4, list.getItemCount());
-
-
- assertEquals(4, list.getItemCount());
-
- list.remove("text3");
- assertEquals(3, list.getItemCount());
-
- list.remove("text2");
- assertEquals(2, list.getItemCount());
-
-}
-
-public void test_removeSelectionListenerLorg_eclipse_swt_events_SelectionListener() {
- // tested in addSelectionListener method
-}
-
-public void test_select$I() {
- try {
- list.select((int[]) null);
- fail("No exception thrown");
- } catch (IllegalArgumentException e) {
- }
-
- String[] items = { "item0", "item1", "item2", "item3" };
- list.setItems(items);
-
- list.select(new int[] { 0, 2 });
- assertSame(list.getSelectionIndices(), new int[] { 0, 2 });
-
- list.select(new int[] { 1, 3 });
- assertSame(list.getSelectionIndices(), new int[] { 0, 1, 2, 3 });
-
- list.select(new int[] { 1, 3 });
- assertSame(list.getSelectionIndices(), new int[] { 0, 1, 2, 3 });
-
- list.select(new int[] { 1 });
- assertSame(list.getSelectionIndices(), new int[] { 0, 1, 2, 3 });
-
- list.add("item4");
-
- list.select(new int[] { -1, 0, 1, 2, 3 });
- assertSame(list.getSelectionIndices(), new int[] { 0, 1, 2, 3 });
-
- list.deselectAll();
- list.select(new int[] { 1, 2, 3 });
- assertSame(list.getSelectionIndices(), new int[] { 1, 2, 3 });
-
- int[] ind = new int[32];
- for (int i = 0; i < ind.length; i++) ind[i] = i;
- list.select(ind);
- assertSame(list.getSelectionIndices(), new int[] { 0, 1, 2, 3, 4 });
-
- list.setSelection(new int[] {});
- list.select(new int[] { 1 });
- assertEquals(list.getSelectionIndices(), new int[] { 1 });
-
- list.setSelection(new int[] {});
- list.select(new int[] { -1 });
- assertEquals(list.getSelectionIndices(), new int[] {});
-
- list.deselectAll();
- items = list.getItems();
-
- select$I_helper(items, 0, 3, new int[] { 0, 1, 2, 3 });
- select$I_helper(items, -1, 3, new int[] { 0, 1, 2, 3 });
- select$I_helper(items, -1, 30, new int[] { 0, 1, 2, 3, 4 });
-
-
- /*--- Single-select ---*/
-
- setSingleList();
- list.setItems(items);
-
- try {
- list.select((int[]) null);
- fail("No exception thrown");
- } catch (IllegalArgumentException e) {
- }
-
- list.select(new int[]{ -1 });
- assertEquals(list.getSelectionIndices(), new int[] {});
-
- list.select(new int[] { 0 });
- assertEquals(list.getSelectionIndices(), new int[] { 0 });
-
- list.select(new int[] { 1 });
- assertEquals(list.getSelectionIndices(), new int[] { 1 });
-
- list.select(new int[] { 2 });
- assertEquals(list.getSelectionIndices(), new int[] { 2 });
-
- list.select(new int[] { 3 });
- assertEquals(list.getSelectionIndices(), new int[] { 3 });
-
- list.select(new int[] { 4 });
- assertEquals(list.getSelectionIndices(), new int[] { 4 });
-
- list.select(new int[] { 5 });
- assertEquals(list.getSelectionIndices(), new int[] { 4 });
-
- list.deselectAll();
- list.select(new int[]{ 0, 1, 2, 3 });
- assertEquals(list.getSelectionIndices(), new int[] {});
-
- list.select(new int[]{ -1, 0, 1, 2, 3 });
- assertEquals(list.getSelectionIndices(), new int[] {});
-
- int[] selection = new int[32];
- for (int i = 0; i < selection.length; i++) selection[i] = i;
- list.select(selection);
- assertEquals(list.getSelectionIndices(), new int[] {});
-
- list.select(new int[]{ 1, 1, 1 });
- assertEquals(list.getSelectionIndices(), new int[]{});
-}
-
-public void test_selectAll() {
- String[] items = { "text1", "text2", "text3", "test2" };
-
- list.setItems(items);
- assertEquals(list.getSelectionCount(), 0);
- list.selectAll();
- assertEquals(list.getSelectionCount(), 4);
-
-
- setSingleList();
-
- list.setItems(items);
- assertEquals(0, list.getSelectionCount());
- list.selectAll();
- assertEquals(0, list.getSelectionCount());
-
-}
-
-public void test_selectI() {
- String[] items = { "item0", "item1", "item2", "item3" };
- list.setItems(items);
-
- list.select(2);
- assertEquals("select(2):", list.getSelectionIndices(), new int[] { 2 });
-
- list.select(1);
- assertSame("select(1):", list.getSelectionIndices(), new int[] { 1, 2 });
-
- list.select(3);
- assertSame(
- "select(3):",
- list.getSelectionIndices(), new int[] { 1, 2, 3 });
-
- list.select(5);
- assertSame(
- "select(5):",
- list.getSelectionIndices(), new int[] { 1, 2, 3 });
-
- list.deselectAll();
- list.select(0);
- assertEquals("select(0):", list.getSelectionIndices(), new int[] { 0 });
-
- list.deselectAll();
- list.select(-1);
- assertEquals("select(-1):", list.getSelectionIndices(), new int[] {});
-
- list.deselectAll();
- list.select(-2);
- assertEquals("select(-2):", list.getSelectionIndices(), new int[] {});
-
- list.deselectAll();
- list.select(4);
- assertEquals("select(4):", list.getSelectionIndices(), new int[] {});
-
- setSingleList();
- list.setItems(items);
-
- list.select(2);
- assertEquals(list.getSelectionIndices(), new int[] { 2 });
-
- list.select(1);
- assertEquals(list.getSelectionIndices(), new int[] { 1 });
-
- list.select(3);
- assertEquals(list.getSelectionIndices(), new int[] { 3 });
-
- list.select(5);
- assertEquals(list.getSelectionIndices(), new int[] { 3 });
-
- list.deselectAll();
- list.select(0);
- assertEquals("select(0):", list.getSelectionIndices(), new int[] { 0 });
-
- list.deselectAll();
- list.select(-1);
- assertEquals("select(-1):", list.getSelectionIndices(), new int[] {});
-
- list.deselectAll();
- list.select(-2);
- assertEquals("select(-2):", list.getSelectionIndices(), new int[] {});
-
- list.deselectAll();
- list.select(4);
- assertEquals("select(4):", list.getSelectionIndices(), new int[] {});
-}
-
-public void test_selectII() {
- list.select(0, 0);
- assertEquals("empty list", list.getSelectionIndices(), new int[] {});
-
- list.select(0, 1);
- assertEquals("empty list", list.getSelectionIndices(), new int[] {});
-
- list.select(-1, 0);
- assertEquals("empty list", list.getSelectionIndices(), new int[] {});
-
- int number = 5;
-
- String[] items = new String[number];
- int[] empty = {};
-
- for (int i = 0; i < number; i++)
- items[i] = "item" + i;
-
- selectII_helper(items, 10, 1, empty);
- selectII_helper(items, 3, 1, empty);
- selectII_helper(items, -1, -1, empty);
- selectII_helper(items, 5, 5, empty);
- selectII_helper(items, 4, 5, new int[] { 4 });
- selectII_helper(items, -1, 0, new int[] { 0 });
- selectII_helper(items, 2, 4, new int[] { 2, 3, 4 });
- selectII_helper(items, 0, 3, new int[] { 0, 1, 2, 3 });
- selectII_helper(items, 1, 1, new int[] { 1 });
- selectII_helper(items, -1, 30, new int[] { 0, 1, 2, 3, 4 });
- selectII_helper(items, -1, 3, new int[] { 0, 1, 2, 3 });
-
- list.select(0);
- assertEquals(list.getSelectionIndices(), new int[] { 0 });
-
- list.select(-10, -9);
- assertEquals(list.getSelectionIndices(), new int[] { 0 });
- list.deselectAll();
-
- list.select(1000, 2000);
- assertEquals(list.getSelectionCount(), 0);
-
- list.deselectAll();
- list.select(1, 2);
- assertSame(list.getSelectionIndices(), new int[] { 1, 2 });
-
- list.select(1, 3);
- assertSame(list.getSelectionIndices(), new int[] { 1, 2, 3 });
-
- list.select(2, 2);
- assertSame(list.getSelectionIndices(), new int[] { 1, 2, 3 });
-
- list.select(3, 5);
- assertSame(list.getSelectionIndices(), new int[] { 1, 2, 3, 4 });
-
-
- setSingleList();
- list.select(0, 0);
- assertEquals("empty list", list.getSelectionIndices(), new int[] {});
-
- list.select(0, 1);
- assertEquals("empty list", list.getSelectionIndices(), new int[] {});
-
- list.select(-1, 0);
- assertEquals("empty list", list.getSelectionIndices(), new int[] {});
-
- list.setItems(items);
- list.select(0);
- assertEquals(list.getSelectionIndices(), new int[] { 0 });
- list.select(-10, -9);
- assertEquals(list.getSelectionIndices(), new int[] { 0 });
-
- list.deselectAll();
- assertEquals(0, list.getSelectionCount());
-
- list.select(1000, 2000);
- assertEquals(0, list.getSelectionCount());
-
- list.deselectAll();
- assertEquals(0, list.getSelectionCount());
-
- list.select(0, 0);
- assertEquals(list.getSelectionIndices(), new int[] { 0 });
-
- list.select(1, 1);
- assertEquals(list.getSelectionIndices(), new int[] { 1 });
-
- list.select(2, 2);
- assertEquals(list.getSelectionIndices(), new int[] { 2 });
-
- list.select(3, 3);
- assertEquals(list.getSelectionIndices(), new int[] { 3 });
-
- list.select(4, 4);
- assertEquals(list.getSelectionIndices(), new int[] { 4 });
-
- list.select(5, 5);
- assertEquals(list.getSelectionIndices(), new int[] { 4 });
-
- list.deselectAll();
- list.select(5, 5);
- assertEquals(list.getSelectionIndices(), new int[] {});
-
- list.select(1, 2);
- assertEquals(list.getSelectionIndices(), new int[] {});
-
- list.select(1, 3);
- assertEquals(list.getSelectionIndices(), new int[] {});
-
- list.select(3, 5);
- assertEquals(list.getSelectionIndices(), new int[] {});
-
- selectII_helper(items, 0, 0, new int[]{0});
- selectII_helper(items, 1, 1, new int[]{1});
- selectII_helper(items, 2, 2, new int[]{2});
- selectII_helper(items, 3, 3, new int[]{3});
- selectII_helper(items, 4, 4, new int[]{4});
- selectII_helper(items, 5, 5, new int[]{});
- selectII_helper(items, 10, 1, new int[]{});
- selectII_helper(items, 3, 1, new int[]{});
- selectII_helper(items, -1, -1, new int[]{});
-}
-
-public void test_setFontLorg_eclipse_swt_graphics_Font() {
- FontData fontData = list.getFont().getFontData()[0];
- int lineHeight;
- Font font;
-
- font = new Font(list.getDisplay(), fontData.getName(), 8, fontData.getStyle());
- list.setFont(font);
- lineHeight = list.getItemHeight();
- list.setFont(null);
- font.dispose();
- font = new Font(list.getDisplay(), fontData.getName(), 12, fontData.getStyle());
- list.setFont(font);
- assertEquals(font, list.getFont());
- assertTrue("itemHeight=" + list.getItemHeight() + ", lineHeight=" + lineHeight, list.getItemHeight() > lineHeight);
- list.setFont(null);
- font.dispose();
-}
-
-public void test_setItemILjava_lang_String() {
- String[] items = { "item0", "item1", "item2", "item3" };
-
- assertEquals(list.getItemCount(), 0);
- int[] cases = { -10, 0, 10 };
- for (int i = 0; i < cases.length; i++) {
- try {
- list.setItem(cases[i], null);
- fail("No exception thrown");
- } catch (IllegalArgumentException e) {
- }
- }
- assertEquals(list.getItemCount(), 0);
-
- for (int i = 0; i < cases.length; i++) {
- try {
- list.setItem(cases[i], "");
- fail("No exception thrown");
- } catch (IllegalArgumentException e) {
- }
- }
- assertEquals(list.getItemCount(), 0);
-
- int cases2[] = { 10, 15, 0 };
- for (int i = 0; i < cases2.length; i++) {
- try {
- list.setItem(cases2[i], "fred");
- fail("No exception thrown");
- } catch (IllegalArgumentException e) {
- }
- assertEquals(list.getItemCount(), 0);
- }
-
- list.setItems(items);
- list.setItem(1, "new1");
- assertEquals(new String[] { "item0", "new1", "item2", "item3" }, list.getItems());
-
- setSingleList();
- assertEquals(0, list.getItemCount());
- for (int i = 0; i < cases.length; i++) {
- try {
- list.setItem(cases[i], null);
- fail("No exception thrown");
- } catch (IllegalArgumentException e) {
- }
-
- }
-
-
- setSingleList();
- for (int i = 0; i < cases.length; i++) {
- try {
- list.setItem(cases[i], "");
- fail("No exception thrown");
- } catch (IllegalArgumentException e) {
- }
- }
-
- assertEquals(0, list.getItemCount());
-
-
- setSingleList();
- for (int i = 0; i < cases2.length; i++) {
- try {
- list.setItem(cases2[i], "fred");
- fail("No exception thrown");
- } catch (IllegalArgumentException e) {
- }
-
- assertEquals(0, list.getItemCount());
- }
-
- list.setItems(items);
- list.setItem(1, "new1");
- assertEquals(new String[] { "item0", "new1", "item2", "item3" }, list.getItems());
-
-}
-
-public void test_setItems$Ljava_lang_String() {
- try {
- list.setItems(null);
- fail("No exception thrown for items == null");
- } catch (IllegalArgumentException e) {
- }
-
- // TODO An SWTError should never happen and should not
- // be part of the test case. List should throw an
- // SWTException.
-// String[][] cases = { { null }, {
-// "dsada", null, "dsdasdasd" }
-// };
-// for (int i = 0; i < cases.length; i++) {
-// try {
-// list.setItems(cases[i]);
-// fail("No exception thrown for items not found");
-// } catch (SWTError e) {
-// }
-// }
-
- String[][] itemArr = { {
- }, {
- "" }, {
- "sdasd" }, {
- "sdasd", "323434" }
- };
- for (int i = 0; i < itemArr.length; i++) {
- list.setItems(itemArr[i]);
- assertEquals(itemArr[i], list.getItems());
- }
-
- try {
- list.setItems(null);
- fail("No exception thrown");
- } catch (IllegalArgumentException e) {
- }
-
-
- setSingleList();
- for (int i = 0; i < itemArr.length; i++) {
- list.setItems(itemArr[i]);
- assertEquals("case:" + i, itemArr[i], list.getItems());
- }
-
-
- try {
- list.setItems(null);
- fail("No exception thrown");
- } catch (IllegalArgumentException e) {
- }
-}
-
-public void test_setSelection$I() {
- int number = 8;
- for (int i = 0; i < number; i++)
- list.add("fred" + i);
-
- list.setSelection(new int [0]);
- assertEquals("MULTI: setSelection(new int [0])", list.getSelectionIndices(), new int[0]);
-
- try {
- list.setSelection((int[]) null);
- fail("No exception thrown for MULTI: setSelection((int[]) null)");
- } catch (IllegalArgumentException e) {
- }
-
- list.setSelection(new int [] {2});
- assertEquals("MULTI: setSelection(new int [] {2})", list.getSelectionIndices(), new int[] {2});
- assertEquals("MULTI: setSelection(new int [] {2}) getFocusIndex()", list.getFocusIndex(), 2);
-
- list.setSelection(new int [] {number});
- assertEquals("MULTI: setSelection(new int [] {number})", list.getSelectionIndices(), new int[0]);
-
- list.setSelection(new int [] {3, 1, 5, 2});
- assertSame("MULTI: setSelection(new int [] {3, 1, 5, 2})", list.getSelectionIndices(), new int[] {1, 2, 3, 5});
-
- list.setSelection(new int [] {1, 0});
- assertSame("MULTI: setSelection(new int [] {1, 0})", list.getSelectionIndices(), new int[] {0, 1});
-
- list.setSelection(new int [] {-1, number});
- assertEquals("MULTI: setSelection(new int [] {-1, number})", list.getSelectionIndices(), new int[0]);
-
- list.setSelection(new int [] {number - 1, number});
- assertEquals("MULTI: setSelection(new int [] {number - 1, number})", list.getSelectionIndices(), new int[] {number - 1});
- assertEquals("MULTI: setSelection(new int [] {number - 1, number}) getFocusIndex()", list.getFocusIndex(), number - 1);
-
- list.setSelection(new int [] {-1, 0});
- assertEquals("MULTI: setSelection(new int [] {-1, 0})", list.getSelectionIndices(), new int[] {0});
-
- list.setSelection(new int [] {0, 1, 2, 3, 5});
- assertSame("MULTI: setSelection(new int [] {0, 1, 2, 3, 5})", list.getSelectionIndices(), new int [] {0, 1, 2, 3, 5});
-
- int[] indices = new int [number];
- for (int i = 0; i < number; i++) {
- indices[i] = i;
- }
- list.setSelection(indices);
- assertSame("MULTI: setSelection(indices)", indices, list.getSelectionIndices());
-
- list.setSelection(new int [] {number, number});
- assertEquals("MULTI: setSelection(new int [] {number, number})", new int[0], list.getSelectionIndices());
-
- list.setSelection(new int [] {number - 1, number - 1});
- assertEquals("MULTI: setSelection(new int [] {number - 1, number - 1})", list.getSelectionIndices(), new int[] {number - 1});
- assertEquals("MULTI: setSelection(new int [] {number - 1, number - 1}) getFocusIndex()", list.getFocusIndex(), number - 1);
-
- list.setSelection(new int [] {0, number, 1});
- assertSame("MULTI: setSelection(new int [] {0, number, 1})", list.getSelectionIndices(), new int[] {0, 1});
-
- list.setSelection(new int [] {number - 1, 0, number - 2});
- assertSame("MULTI: setSelection(new int [] {number - 1, 0, number - 2})", list.getSelectionIndices(), new int[] {0, number - 2, number - 1});
-
- list.removeAll();
-
- list.setSelection(new int [0]);
- assertEquals("EMPTY MULTI: setSelection(new int [0])", list.getSelectionIndices(), new int[0]);
- assertEquals("EMPTY MULTI: setSelection(new int [0]) getFocusIndex()", list.getFocusIndex(), -1);
-
- try {
- list.setSelection((int[]) null);
- fail("No exception thrown for EMPTY MULTI: setSelection((int[]) null)");
- } catch (IllegalArgumentException e) {
- }
-
- list.setSelection(new int [] {0});
- assertEquals("EMPTY MULTI: setSelection(new int [] {0})", list.getSelectionIndices(), new int[0]);
- assertEquals("EMPTY MULTI: setSelection(new int [] {0}) getFocusIndex()", list.getFocusIndex(), -1);
-
- list.setSelection(new int [] {-1});
- assertEquals("EMPTY MULTI: setSelection(new int [] {-1})", list.getSelectionIndices(), new int[0]);
- assertEquals("EMPTY MULTI: setSelection(new int [] {-1}) getFocusIndex()", list.getFocusIndex(), -1);
-
- list.setSelection(new int [] {0, 0});
- assertEquals("EMPTY MULTI: setSelection(new int [] {0, 0})", list.getSelectionIndices(), new int[0]);
- assertEquals("EMPTY MULTI: setSelection(new int [] {0, 0}) getFocusIndex()", list.getFocusIndex(), -1);
-
- list.setSelection(new int [] {-1, 0});
- assertEquals("EMPTY MULTI: setSelection(new int [] {-1, 0})", list.getSelectionIndices(), new int[0]);
- assertEquals("EMPTY MULTI: setSelection(new int [] {-1, 0}) getFocusIndex()", list.getFocusIndex(), -1);
-
- list.setSelection(new int [] {0, -1});
- assertEquals("EMPTY MULTI: setSelection(new int [] {0, -1})", list.getSelectionIndices(), new int[0]);
- assertEquals("EMPTY MULTI: setSelection(new int [] {0, -1}) getFocusIndex()", list.getFocusIndex(), -1);
-
-
- setSingleList();
- for (int i = 0; i < number; i++)
- list.add("fred" + i);
-
- list.setSelection(new int [0]);
- assertEquals("SINGLE: setSelection(new int [0])", list.getSelectionIndices(), new int[0]);
-
- try {
- list.setSelection((int[]) null);
- fail("No exception thrown for SINGLE: setSelection((int[]) null)");
- } catch (IllegalArgumentException e) {
- }
-
- list.setSelection(new int [] {2});
- assertEquals("SINGLE: setSelection(new int [] {2})", list.getSelectionIndices(), new int[] {2});
- assertEquals("SINGLE: setSelection(new int [] {2}) getFocusIndex()", list.getFocusIndex(), 2);
-
- list.setSelection(new int [] {number});
- assertEquals("SINGLE: setSelection(new int [] {number})", list.getSelectionIndices(), new int[0]);
-
- list.setSelection(new int [] {1, 0});
- assertEquals("SINGLE: setSelection(new int [] {1, 0})", list.getSelectionIndices(), new int[] {});
-
- list.setSelection(new int [] {0, 1, 2, 3, 5});
- assertEquals("SINGLE: setSelection(new int [] {0, 1, 2, 3, 5})", list.getSelectionIndices(), new int [] {});
-
- list.setSelection(new int [] {-1, number});
- assertEquals("SINGLE: setSelection(new int [] {-1, number})", list.getSelectionIndices(), new int[0]);
-
- list.setSelection(new int [] {number - 1, number});
- assertEquals("SINGLE: setSelection(new int [] {number - 1, number})", list.getSelectionIndices(), new int[] {});
-
- list.setSelection(new int [] {-1, 0});
- assertEquals("SINGLE: setSelection(new int [] {-1, 0})", list.getSelectionIndices(), new int[] {});
-
- indices = new int [number];
- for (int i = 0; i < number; i++) {
- indices[i] = i;
- }
- list.setSelection(indices);
- assertEquals("SINGLE: setSelection(indices)", list.getSelectionIndices(), new int[] {});
-
- list.setSelection(new int [] {number, number});
- assertEquals("SINGLE: setSelection(new int [] {number, number})", list.getSelectionIndices(), new int[0]);
-
- list.setSelection(new int [] {number - 1, number - 1});
- assertEquals("SINGLE: setSelection(new int [] {number - 1, number - 1})", list.getSelectionIndices(), new int[] {});
-
- list.setSelection(new int [] {0, number, 1});
- assertEquals("SINGLE: setSelection(new int [] {0, number, 1})", list.getSelectionIndices(), new int[] {});
-
- list.setSelection(new int [] {number - 1, 0, number - 2});
- assertEquals("SINGLE: setSelection(new int [] {number - 1, 0, number - 2})", list.getSelectionIndices(), new int[] {});
-
- list.removeAll();
-
- list.setSelection(new int [0]);
- assertEquals("EMPTY SINGLE: setSelection(new int [0])", list.getSelectionIndices(), new int[0]);
- assertEquals("EMPTY SINGLE: setSelection(new int [0]) getFocusIndex()", list.getFocusIndex(), -1);
-
- try {
- list.setSelection((int[]) null);
- fail("No exception thrown for EMPTY SINGLE: setSelection((int[]) null)");
- } catch (IllegalArgumentException e) {
- }
-
- list.setSelection(new int [] {0});
- assertEquals("EMPTY SINGLE: setSelection(new int [] {0})", list.getSelectionIndices(), new int[0]);
- assertEquals("EMPTY SINGLE: setSelection(new int [] {0}) getFocusIndex()", list.getFocusIndex(), -1);
-
- list.setSelection(new int [] {-1});
- assertEquals("EMPTY SINGLE: setSelection(new int [] {-1})", list.getSelectionIndices(), new int[0]);
- assertEquals("EMPTY SINGLE: setSelection(new int [] {-1}) getFocusIndex()", list.getFocusIndex(), -1);
-
- list.setSelection(new int [] {0, 0});
- assertEquals("EMPTY SINGLE: setSelection(new int [] {0, 0})", list.getSelectionIndices(), new int[0]);
- assertEquals("EMPTY SINGLE: setSelection(new int [] {0, 0}) getFocusIndex()", list.getFocusIndex(), -1);
-
- list.setSelection(new int [] {-1, 0});
- assertEquals("EMPTY SINGLE: setSelection(new int [] {-1, 0})", list.getSelectionIndices(), new int[0]);
- assertEquals("EMPTY SINGLE: setSelection(new int [] {-1, 0}) getFocusIndex()", list.getFocusIndex(), -1);
-
- list.setSelection(new int [] {0, -1});
- assertEquals("EMPTY SINGLE: setSelection(new int [] {0, -1})", list.getSelectionIndices(), new int[0]);
- assertEquals("EMPTY SINGLE: setSelection(new int [] {0, -1}) getFocusIndex()", list.getFocusIndex(), -1);
-}
-
-public void test_setSelection$Ljava_lang_String() {
- int number = 8;
- for (int i = 0; i < number; i++)
- list.add("fred " + i);
-
- list.setSelection(new String [0]);
- assertEquals(list.getSelection(), new String[0]);
- if (fCheckSWTPolicy) {
- assertEquals(list.getFocusIndex(), -1);
- }
-
- try {
- list.setSelection((String[]) null);
- fail("No exception thrown");
- } catch (IllegalArgumentException e) {
- }
-
- list.setSelection(new String [] {"fred 2"});
- assertEquals(list.getSelection(), new String [] {"fred 2"});
- assertEquals(list.getFocusIndex(), 2);
-
- list.setSelection(new String [] {"fred " + number});
- assertEquals(list.getSelection(), new String [0]);
-
- list.setSelection(new String [] {"fred 1", "fred 0"});
- assertSame(list.getSelection(), new String [] {"fred 0", "fred 1"});
-
- list.setSelection(new String [] {"fred -1", "fred " + number});
- assertEquals(list.getSelection(), new String [0]);
-
- list.setSelection(new String [] {"fred " + (number - 1), "fred " + number});
- assertEquals(list.getSelection(), new String [] {"fred " + (number - 1)});
-
- list.setSelection(new String [] {"fred -1", "fred 0"});
- assertEquals(list.getSelection(), new String [] {"fred 0"});
-
- String[] items = new String [number];
- for (int i = 0; i < number; i++) {
- items[i] = "fred " + i;
- }
- list.setSelection(items);
- assertSame(list.getSelection(), items);
-
- list.setSelection(new String [] {"fred " + number, "fred " + number});
- assertEquals(list.getSelection(), new String [0]);
-
- list.setSelection(new String [] {"fred " + (number - 1), "fred " + (number - 1)});
- assertEquals(list.getSelection(), new String[] {"fred " + (number - 1)});
-
- list.setSelection(new String [] {"fred 0", "fred " + number, "fred 1"});
- assertSame(list.getSelection(), new String[] {"fred 0", "fred 1"});
-
- list.removeAll();
-
- list.setSelection(new String [0]);
- assertEquals(list.getSelection(), new String[0]);
- assertEquals(list.getFocusIndex(), -1);
-
- try {
- list.setSelection((String[]) null);
- fail("No exception thrown");
- } catch (IllegalArgumentException e) {
- }
-
- list.setSelection(new String [] {"fred 0"});
- assertEquals(list.getSelection(), new String[0]);
- assertEquals(list.getFocusIndex(), -1);
-
- list.setSelection(new String [] {"fred 0", "fred 0"});
- assertEquals(list.getSelection(), new String[0]);
- assertEquals(list.getFocusIndex(), -1);
-
-
- setSingleList();
- for (int i = 0; i < number; i++)
- list.add("fred " + i);
-
- list.setSelection(new String [0]);
- assertEquals(list.getSelection(), new String[0]);
-
- try {
- list.setSelection((String[]) null);
- fail("No exception thrown");
- } catch (IllegalArgumentException e) {
- }
-
- list.setSelection(new String [] {"fred 2"});
- assertEquals(list.getSelection(), new String[] {"fred 2"});
- assertEquals(list.getFocusIndex(), 2);
-
- list.setSelection(new String [] {"fred " + number});
- assertEquals(list.getSelection(), new String[0]);
-
- list.setSelection(new String [] {"fred 1", "fred 0"});
- assertEquals(list.getSelection(), new String[] {});
-
- list.setSelection(new String [] {"fred -1", "fred " + number});
- assertEquals(list.getSelection(), new String[0]);
-
- list.setSelection(new String [] {"fred " + (number - 1)});
- assertEquals(list.getSelection(), new String[] {"fred " + (number - 1)});
-
- items = new String[number];
- for (int i = 0; i < number; i++) {
- items[i] = "fred " + i;
- }
- list.setSelection(items);
- assertEquals(list.getSelection(), new String[] {});
-
- list.setSelection(new String [] {"fred " + number, "fred " + number});
- assertEquals(list.getSelection(), new String[0]);
-
- list.setSelection(new String [] {"fred " + (number - 1), "fred " + (number - 1)});
- assertEquals(list.getSelection(), new String[] {});
-
- list.setSelection(new String [] {"fred 0", "fred " + number, "fred 1"});
- assertEquals(list.getSelection(), new String[] {});
-
- list.removeAll();
-
- list.setSelection(new String [0]);
- assertEquals(list.getSelection(), new String[0]);
- assertEquals(list.getFocusIndex(), -1);
-
- try {
- list.setSelection((String[]) null);
- fail("No exception thrown");
- } catch (IllegalArgumentException e) {
- }
-
- list.setSelection(new String [] {"fred 0"});
- assertEquals(list.getSelection(), new String[0]);
- assertEquals(list.getFocusIndex(), -1);
-
- list.setSelection(new String [] {"fred 0", "fred 0"});
- assertEquals(list.getSelection(), new String[0]);
- assertEquals(list.getFocusIndex(), -1);
-}
-
-public void test_setSelectionI() {
- int number = 8;
- for (int i = 0; i < number; i++) {
- list.add("fred" + i);
- }
-
- list.setSelection(2);
- assertEquals(list.getSelectionIndices(), new int[] {2});
- assertEquals(list.getFocusIndex(), 2);
-
- list.setSelection(-5);
- assertEquals(list.getSelectionIndices(), new int[0]);
-
- list.setSelection(0);
- assertEquals(list.getSelectionIndices(), new int[] {0});
- assertEquals(list.getFocusIndex(), 0);
-
- list.setSelection(number);
- assertEquals(list.getSelectionIndices(), new int[0]);
-
- list.setSelection(number - 1);
- assertEquals(list.getSelectionIndices(), new int[] {number - 1});
-
- list.setSelection(-1);
- assertEquals(list.getSelectionIndices(), new int[0]);
-
- list.removeAll();
-
- list.setSelection(-2);
- assertEquals(list.getSelectionIndices(), new int[0]);
- assertEquals(list.getFocusIndex(), -1);
-
- list.setSelection(0);
- assertEquals(list.getSelectionIndices(), new int[0]);
- assertEquals(list.getFocusIndex(), -1);
-
- list.setSelection(-1);
- assertEquals(list.getSelectionIndices(), new int[0]);
- assertEquals(list.getFocusIndex(), -1);
-
- setSingleList();
-
- for (int i = 0; i < number; i++) {
- list.add("fred" + i);
- }
-
- list.setSelection(2);
- assertEquals(list.getSelectionIndices(), new int[] {2});
- assertEquals(list.getFocusIndex(), 2);
-
- list.setSelection(-5);
- assertEquals(list.getSelectionIndices(), new int[] {2});
-
- list.setSelection(0);
- assertEquals(list.getSelectionIndices(), new int[] {0});
- assertEquals(list.getFocusIndex(), 0);
-
- list.setSelection(number);
- assertEquals(list.getSelectionIndices(), new int[] {0});
-
- list.setSelection(number - 1);
- assertEquals(list.getSelectionIndices(), new int[] {number - 1});
- assertEquals(list.getFocusIndex(), number - 1);
-
- list.setSelection(-1);
- assertEquals(list.getSelectionIndices(), new int[] {number - 1});
-
- list.removeAll();
-
- list.setSelection(0);
- assertEquals(list.getSelectionIndices(), new int[0]);
- assertEquals(list.getFocusIndex(), -1);
-
- list.setSelection(-1);
- assertEquals(list.getSelectionIndices(), new int[0]);
- assertEquals(list.getFocusIndex(), -1);
-
- list.setSelection(-2);
- assertEquals(list.getSelectionIndices(), new int[0]);
- assertEquals(list.getFocusIndex(), -1);
-}
-
-public void test_setSelectionII() {
- int number = 8;
- String[] items = new String[number];
- for (int i = 0; i < number; i++)
- items[i] = "fred" + i;
-
- list.setItems(items);
-
- list.setSelection(1, 2);
- assertSame(list.getSelectionIndices(), new int[] {1, 2});
-
- list.setSelection(-3, -2);
- assertEquals(list.getSelectionIndices(), new int[0]);
-
- list.setSelection(0, 1);
- assertSame(list.getSelectionIndices(), new int[] {0, 1});
-
- list.setSelection(-2, -1);
- assertEquals(list.getSelectionIndices(), new int[0]);
-
- list.setSelection(number - 2, number - 1);
- assertSame(list.getSelectionIndices(), new int[] {number - 2, number - 1});
-
- list.setSelection(number - 1, number);
- assertEquals(list.getSelectionIndices(), new int[] {number - 1});
-
- list.setSelection(-1, 0);
- assertEquals(list.getSelectionIndices(), new int[] {0});
-
- list.setSelection(number, number + 1);
- assertEquals(list.getSelectionIndices(), new int[0]);
-
- list.setSelection(0, 0);
- assertEquals(list.getSelectionIndices(), new int[] {0});
- assertEquals(list.getFocusIndex(), 0);
-
- list.setSelection(2, 1);
- assertEquals(list.getSelectionIndices(), new int[0]);
-
- list.setSelection(number - 1, number - 1);
- assertEquals(list.getSelectionIndices(), new int[] {number - 1});
- assertEquals(list.getFocusIndex(), number - 1);
-
- list.setSelection(-1, -1);
- assertEquals(list.getSelectionIndices(), new int[0]);
-
- list.removeAll();
-
- list.setSelection(-2, -1);
- assertEquals(list.getSelectionIndices(), new int[0]);
- assertEquals(list.getFocusIndex(), -1);
-
- list.setSelection(-1, 0);
- assertEquals(list.getSelectionIndices(), new int[0]);
- assertEquals(list.getFocusIndex(), -1);
-
- list.setSelection(0, 1);
- assertEquals(list.getSelectionIndices(), new int[0]);
- assertEquals(list.getFocusIndex(), -1);
-
- list.setSelection(1, 0);
- assertEquals(list.getSelectionIndices(), new int[0]);
- assertEquals(list.getFocusIndex(), -1);
-
- list.setSelection(0, -1);
- assertEquals(list.getSelectionIndices(), new int[0]);
- assertEquals(list.getFocusIndex(), -1);
-
-
- setSingleList();
- list.setItems(items);
-
- list.setSelection(0, 0);
- assertEquals(list.getSelectionIndices(), new int[] {0});
- assertEquals(list.getFocusIndex(), 0);
-
- list.setSelection(1, 1);
- assertEquals(list.getSelectionIndices(), new int[] {1});
- assertEquals(list.getFocusIndex(), 1);
-
- list.setSelection(4, 4);
- assertEquals(list.getSelectionIndices(), new int[] {4});
- assertEquals(list.getFocusIndex(), 4);
-
- list.setSelection(number - 1, number - 1);
- assertEquals(list.getSelectionIndices(), new int[] {number - 1});
- assertEquals(list.getFocusIndex(), number - 1);
-
- list.setSelection(number, number);
- assertEquals(list.getSelectionIndices(), new int[] {});
-
- list.setSelection(-3, -2);
- assertEquals(list.getSelectionIndices(), new int[] {});
-
- list.setSelection(0, 1);
- assertEquals(list.getSelectionIndices(), new int[] {});
-
- list.setSelection(-2, -1);
- assertEquals(list.getSelectionIndices(), new int[] {});
-
- list.setSelection(number - 2, number - 1);
- assertEquals(list.getSelectionIndices(), new int[] {});
-
- list.setSelection(number - 1, number);
- assertEquals(list.getSelectionIndices(), new int[] {});
-
- list.setSelection(-1, 0);
- assertEquals(list.getSelectionIndices(), new int[] {});
-
- list.setSelection(number, number + 1);
- assertEquals(list.getSelectionIndices(), new int[] {});
-
- list.setSelection(2, 1);
- assertEquals(list.getSelectionIndices(), new int[] {});
-
- list.setSelection(number - 1, number - 1);
- assertEquals(list.getSelectionIndices(), new int[] {number - 1});
- assertEquals(list.getFocusIndex(), number - 1);
-
- list.setSelection(-1, -1);
- assertEquals(list.getSelectionIndices(), new int[] {});
-}
-
-public void test_setTopIndexI() {
- list.setTopIndex(3);
- assertEquals("MULTI: setTopIndex(3) in empty list", 0, list.getTopIndex());
- String[] items = { "item0", "item1", "item2", "item3" };
- list.setItems(items);
- for (int i = 0; i < items.length; i++) {
- list.setTopIndex(i);
- assertEquals("MULTI: setTopIndex(i=" + i + ")", i, list.getTopIndex());
- }
-
-
- setSingleList();
- list.setTopIndex(3);
- assertEquals("SINGLE: setTopIndex(3) in empty list", 0, list.getTopIndex());
-
- list.setItems(items);
- for (int i = 0; i < items.length; i++) {
- list.setTopIndex(i);
- assertEquals("SINGLE: setTopIndex(i=" + i + ")", i, list.getTopIndex());
- }
-
-}
-
-public void test_showSelection() {
- String[] items = { "item0", "item1", "item2", "item3" };
- list.setItems(items);
- list.setSelection(items);
- list.showSelection();
-
-
- setSingleList();
-
- list.setItems(items);
- list.setSelection(items);
- list.showSelection();
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_widgets_List((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_CompositeI");
- methodNames.addElement("test_addLjava_lang_String");
- methodNames.addElement("test_addLjava_lang_StringI");
- methodNames.addElement("test_addSelectionListenerLorg_eclipse_swt_events_SelectionListener");
- methodNames.addElement("test_computeSizeIIZ");
- methodNames.addElement("test_deselect$I");
- methodNames.addElement("test_deselectAll");
- methodNames.addElement("test_deselectI");
- methodNames.addElement("test_deselectII");
- methodNames.addElement("test_getFocusIndex");
- methodNames.addElement("test_getItemCount");
- methodNames.addElement("test_getItemHeight");
- methodNames.addElement("test_getItemI");
- methodNames.addElement("test_getItems");
- methodNames.addElement("test_getSelection");
- methodNames.addElement("test_getSelectionCount");
- methodNames.addElement("test_getSelectionIndex");
- methodNames.addElement("test_getSelectionIndices");
- methodNames.addElement("test_getTopIndex");
- methodNames.addElement("test_indexOfLjava_lang_String");
- methodNames.addElement("test_indexOfLjava_lang_StringI");
- methodNames.addElement("test_isSelectedI");
- methodNames.addElement("test_remove$I");
- methodNames.addElement("test_removeAll");
- methodNames.addElement("test_removeI");
- methodNames.addElement("test_removeII");
- methodNames.addElement("test_removeLjava_lang_String");
- methodNames.addElement("test_removeSelectionListenerLorg_eclipse_swt_events_SelectionListener");
- methodNames.addElement("test_select$I");
- methodNames.addElement("test_selectAll");
- methodNames.addElement("test_selectI");
- methodNames.addElement("test_selectII");
- methodNames.addElement("test_setFontLorg_eclipse_swt_graphics_Font");
- methodNames.addElement("test_setItemILjava_lang_String");
- methodNames.addElement("test_setItems$Ljava_lang_String");
- methodNames.addElement("test_setSelection$I");
- methodNames.addElement("test_setSelection$Ljava_lang_String");
- methodNames.addElement("test_setSelectionI");
- methodNames.addElement("test_setSelectionII");
- methodNames.addElement("test_setTopIndexI");
- methodNames.addElement("test_showSelection");
- methodNames.addAll(Test_org_eclipse_swt_widgets_Scrollable.methodNames()); // add superclass method names
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_CompositeI")) test_ConstructorLorg_eclipse_swt_widgets_CompositeI();
- else if (getName().equals("test_addLjava_lang_String")) test_addLjava_lang_String();
- else if (getName().equals("test_addLjava_lang_StringI")) test_addLjava_lang_StringI();
- else if (getName().equals("test_addSelectionListenerLorg_eclipse_swt_events_SelectionListener")) test_addSelectionListenerLorg_eclipse_swt_events_SelectionListener();
- else if (getName().equals("test_computeSizeIIZ")) test_computeSizeIIZ();
- else if (getName().equals("test_deselect$I")) test_deselect$I();
- else if (getName().equals("test_deselectAll")) test_deselectAll();
- else if (getName().equals("test_deselectI")) test_deselectI();
- else if (getName().equals("test_deselectII")) test_deselectII();
- else if (getName().equals("test_getFocusIndex")) test_getFocusIndex();
- else if (getName().equals("test_getItemCount")) test_getItemCount();
- else if (getName().equals("test_getItemHeight")) test_getItemHeight();
- else if (getName().equals("test_getItemI")) test_getItemI();
- else if (getName().equals("test_getItems")) test_getItems();
- else if (getName().equals("test_getSelection")) test_getSelection();
- else if (getName().equals("test_getSelectionCount")) test_getSelectionCount();
- else if (getName().equals("test_getSelectionIndex")) test_getSelectionIndex();
- else if (getName().equals("test_getSelectionIndices")) test_getSelectionIndices();
- else if (getName().equals("test_getTopIndex")) test_getTopIndex();
- else if (getName().equals("test_indexOfLjava_lang_String")) test_indexOfLjava_lang_String();
- else if (getName().equals("test_indexOfLjava_lang_StringI")) test_indexOfLjava_lang_StringI();
- else if (getName().equals("test_isSelectedI")) test_isSelectedI();
- else if (getName().equals("test_remove$I")) test_remove$I();
- else if (getName().equals("test_removeAll")) test_removeAll();
- else if (getName().equals("test_removeI")) test_removeI();
- else if (getName().equals("test_removeII")) test_removeII();
- else if (getName().equals("test_removeLjava_lang_String")) test_removeLjava_lang_String();
- else if (getName().equals("test_removeSelectionListenerLorg_eclipse_swt_events_SelectionListener")) test_removeSelectionListenerLorg_eclipse_swt_events_SelectionListener();
- else if (getName().equals("test_select$I")) test_select$I();
- else if (getName().equals("test_selectAll")) test_selectAll();
- else if (getName().equals("test_selectI")) test_selectI();
- else if (getName().equals("test_selectII")) test_selectII();
- else if (getName().equals("test_setFontLorg_eclipse_swt_graphics_Font")) test_setFontLorg_eclipse_swt_graphics_Font();
- else if (getName().equals("test_setItemILjava_lang_String")) test_setItemILjava_lang_String();
- else if (getName().equals("test_setItems$Ljava_lang_String")) test_setItems$Ljava_lang_String();
- else if (getName().equals("test_setSelection$I")) test_setSelection$I();
- else if (getName().equals("test_setSelection$Ljava_lang_String")) test_setSelection$Ljava_lang_String();
- else if (getName().equals("test_setSelectionI")) test_setSelectionI();
- else if (getName().equals("test_setSelectionII")) test_setSelectionII();
- else if (getName().equals("test_setTopIndexI")) test_setTopIndexI();
- else if (getName().equals("test_showSelection")) test_showSelection();
- else super.runTest();
-}
-
-/* custom */
-List list;
-/**
- * Test if 'deselect(u, v)' is the same as 'for (i=u; i<=v; ++i) deselect(i);'
- */
-protected void deselectII_helper(
- String[] items,
- int start,
- int end,
- int[] expectedIndices) {
-
- list.setItems(items);
- list.setSelection(items);
-
- list.deselect(start, end);
- assertSame(
- ":(" + start + ", " + end + "):",
- expectedIndices, list.getSelectionIndices());
-
- list.setSelection(items);
- if ( 0 != (list.getStyle() & SWT.MULTI) ) {
- assertSame("setSelection(items):", items, list.getSelection());
- }
-
- for (int i = start; i <= end; ++i) {
- list.deselect(i);
- }
- assertSame(
- ":(" + start + ", " + end + "):",
- expectedIndices, list.getSelectionIndices());
-
- list.deselectAll();
-}
-/**
- * Dispose of the main list and create a new, single-selection one.
- */
-protected List setSingleList() {
- list.dispose();
- list = new List(shell, SWT.SINGLE);
- setWidget(list);
- return list;
-}
-/**
- * Similar to deselectII_helper, checks if select(u, v) is the same as
- * for (i=u; i<=v; ++i) select(i)
- */
-protected void selectII_helper(
- String[] items,
- int start,
- int end,
- int[] expectedIndices) {
- list.setItems(items);
- list.select(start, end);
- assertSame(
- ":(" + start + ", " + end + "):",
- expectedIndices, list.getSelectionIndices());
-
- list.deselectAll();
- assertEquals("deselectAll:", list.getSelectionIndices(), new int[] {});
-
- for (int i = start; i <= end; i++) // <= on purpose
- list.select(i);
-
- assertSame(":(" + start + ", " + end + "):",
- expectedIndices, list.getSelectionIndices());
-
- list.deselectAll();
-}
-/**
- * Similar to deselectII_helper, checks if select(int []arr) gives the same
- * result as several individual select(int) calls. The int[] used for selection
- * will be filled all integers from start to end inclusive, in order.
- */
-protected void select$I_helper(
- String[] items,
- int start,
- int end,
- int[] expectedIndices) {
- int[] selection = new int[end - start + 1];
- for (int i = 0; i < selection.length; ++i) {
- selection[i] = i + start;
- }
-
- list.select(selection);
-
- assertSame(
- ":(" + start + ", " + end + "):",
- expectedIndices, list.getSelectionIndices());
-
- list.deselectAll();
- assertEquals("deselectAll:", list.getSelectionIndices(), new int[] {});
-
- for (int i = start; i <= end; i++) // <= on purpose
- list.select(i);
-
- assertSame(
- ":(" + start + ", " + end + "):",
- expectedIndices, list.getSelectionIndices());
-
- list.deselectAll();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Listener.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Listener.java
deleted file mode 100644
index 086354f2ff..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Listener.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.widgets.Listener
- *
- * @see org.eclipse.swt.widgets.Listener
- */
-public class Test_org_eclipse_swt_widgets_Listener extends SwtTestCase {
-
-public Test_org_eclipse_swt_widgets_Listener(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
-}
-
-protected void tearDown() {
-}
-
-public void test_handleEventLorg_eclipse_swt_widgets_Event() {
- warnUnimpl("Test test_handleEventLorg_eclipse_swt_widgets_Event not written");
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_widgets_Listener((String)e.nextElement()));
- }
- return suite;
-}
-
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_handleEventLorg_eclipse_swt_widgets_Event");
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_handleEventLorg_eclipse_swt_widgets_Event")) test_handleEventLorg_eclipse_swt_widgets_Event();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Menu.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Menu.java
deleted file mode 100644
index 1c69f033b9..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Menu.java
+++ /dev/null
@@ -1,382 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.graphics.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.widgets.Menu
- *
- * @see org.eclipse.swt.widgets.Menu
- */
-public class Test_org_eclipse_swt_widgets_Menu extends Test_org_eclipse_swt_widgets_Widget {
-
-public Test_org_eclipse_swt_widgets_Menu(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- super.setUp();
- menu = new Menu(shell);
- setWidget(menu);
-}
-
-protected void tearDown() {
- super.tearDown();
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_Control() {
- Composite comp = new Composite(shell, SWT.NULL);
- Menu testMenu = new Menu(comp);
- comp.dispose();
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_DecorationsI() {
- Menu newMenu;
- Shell nullShell = null;
- try {
- newMenu = new Menu(nullShell, SWT.NULL);
- newMenu.dispose();
- fail("No exception thrown for parent == null");
- } catch (IllegalArgumentException e) {
- }
-
- newMenu = new Menu(shell, SWT.NULL);
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_Menu() {
- Menu newMenu;
- newMenu = new Menu(menu);
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_MenuItem() {
- Menu newMenu;
- MenuItem mItem = null;
- try {
- newMenu = new Menu(mItem);
- newMenu.dispose();
- fail("No exception thrown for parent == null");
- } catch (IllegalArgumentException e) {
- }
-
- mItem = new MenuItem(menu, SWT.NULL);
- newMenu = new Menu(mItem);
-}
-
-public void test_addHelpListenerLorg_eclipse_swt_events_HelpListener() {
- listenerCalled = false;
- HelpListener listener = new HelpListener() {
- public void helpRequested(HelpEvent e) {
- listenerCalled = true;
- };
- };
-
- try {
- menu.addHelpListener(null);
- fail("No exception thrown for addHelpListener with null argument");
- } catch (IllegalArgumentException e) {
- }
-
- menu.addHelpListener(listener);
- menu.notifyListeners(SWT.Help, new Event());
- assertTrue(listenerCalled);
-
- try {
- menu.removeHelpListener(null);
- fail("No exception thrown for removeHelpListener with null argument");
- } catch (IllegalArgumentException e) {
- }
-
- listenerCalled = false;
- menu.removeHelpListener(listener);
- menu.notifyListeners(SWT.Help, new Event());
- assertFalse(listenerCalled);
-}
-
-public void test_addMenuListenerLorg_eclipse_swt_events_MenuListener() {
- listenerCalled = false;
- MenuListener menuListener = new MenuListener() {
- public void menuShown(MenuEvent e) {
- listenerCalled = true;
- };
- public void menuHidden(MenuEvent e) {
- listenerCalled = true;
- };
- };
-
- try {
- menu.addMenuListener(null);
- fail("No exception thrown for addMenuListener with null argument");
- } catch (IllegalArgumentException e) {
- }
-
- menu.addMenuListener(menuListener);
- menu.notifyListeners(SWT.Show, new Event());
- assertTrue(":a:", listenerCalled);
-
- listenerCalled = false;
- menu.notifyListeners(SWT.Hide, new Event());
- assertTrue(":b:", listenerCalled);
-
- try {
- menu.removeMenuListener(null);
- fail("No exception thrown for removeMenuListener with null argument");
- } catch (IllegalArgumentException e) {
- }
-
- listenerCalled = false;
- menu.removeMenuListener(menuListener);
- menu.notifyListeners(SWT.Show, new Event());
- assertFalse(listenerCalled);
-}
-
-public void test_getDefaultItem() {
- // tested in setDefaultItem method
-}
-
-public void test_getEnabled() {
- // tested in setEnabled method
-}
-
-public void test_getItemCount() {
- int number = 10;
- MenuItem ti;
- for (int i = 0; i<number ; i++){
- assertEquals(menu.getItemCount(), i);
- ti = new MenuItem(menu, 0);
- }
-}
-
-public void test_getItemI() {
- MenuItem mItem0 = new MenuItem(menu, SWT.NULL);
- MenuItem mItem1 = new MenuItem(menu, SWT.NULL);
- assertEquals(menu.getItem(0), mItem0);
- assertEquals(menu.getItem(1), mItem1);
-}
-
-public void test_getItems() {
- int number = 5;
- MenuItem[] items = new MenuItem[number];
- for (int i = 0; i<number ; i++){
- items[i] = new MenuItem(menu, 0);
- }
- assertEquals(":a:", items, menu.getItems());
-
- menu.getItems()[0].dispose();
- assertEquals(":b:", new MenuItem[]{items[1], items[2], items[3], items[4]}, menu.getItems());
-
- menu.getItems()[3].dispose();
- assertEquals(":c:", new MenuItem[]{items[1], items[2], items[3]}, menu.getItems());
-
- menu.getItems()[1].dispose();
- assertEquals(":d:", new MenuItem[]{items[1], items[3]}, menu.getItems());
-}
-
-public void test_getParent() {
- assertEquals(menu.getParent(), shell);
-}
-
-public void test_getParentItem() {
- MenuItem mItem = new MenuItem(menu, SWT.CASCADE);
- Menu newMenu = new Menu(shell, SWT.DROP_DOWN);
- assertNull(newMenu.getParentItem());
- mItem.setMenu(newMenu);
- assertEquals(newMenu.getParentItem(), mItem);
-}
-
-public void test_getParentMenu() {
- MenuItem mItem = new MenuItem(menu, SWT.CASCADE);
- Menu newMenu = new Menu(shell, SWT.DROP_DOWN);
- assertNull(newMenu.getParentMenu());
- mItem.setMenu(newMenu);
- assertEquals(newMenu.getParentMenu(), menu);
-}
-
-public void test_getShell() {
- assertEquals(menu.getShell(), shell);
-}
-
-public void test_getVisible() {
- // tested in setVisible method
-}
-
-public void test_indexOfLorg_eclipse_swt_widgets_MenuItem() {
- int number = 10;
- MenuItem[] mis = new MenuItem[number];
- for (int i = 0; i<number ; i++){
- mis[i] = new MenuItem(menu, SWT.NULL);
- }
- for (int i = 0; i<number ; i++){
- assertEquals(menu.indexOf(mis[i]), i);
- if (i>1)
- assertTrue(menu.indexOf(mis[i-1]) != i);
- }
-}
-
-public void test_isEnabled() {
- // tested in setEnabled method
-}
-
-public void test_isVisible() {
- // This test can not be run as it currently is written. On Windows, if a
- // menu has no menu items, it will not become visible.
- // If we add menu items to the menu then a second problem is encountered
- // because menu.setVisible() enters into a modal loop and execution of
- // the JUnit test case will not continue until the menu is selected and closed.
- if (true) return;
- menu.setVisible(true);
- assertTrue(menu.isVisible());
-
- // api not implemented yet
- if (fCheckVisibility) {
- menu.setVisible(false);
- assertEquals(menu.isVisible(), false);
- }
-}
-
-public void test_removeHelpListenerLorg_eclipse_swt_events_HelpListener() {
- // tested in addHelpListener method
-}
-
-public void test_removeMenuListenerLorg_eclipse_swt_events_MenuListener() {
- // tested in addMenuListener method
-}
-
-public void test_setDefaultItemLorg_eclipse_swt_widgets_MenuItem() {
- MenuItem mItem0 = new MenuItem(menu, SWT.NULL);
- MenuItem mItem1 = new MenuItem(menu, SWT.NULL);
- menu.setDefaultItem(mItem0);
- assertEquals(menu.getDefaultItem(), mItem0);
- assertTrue("After setDefaultItem(mItem0):", menu.getDefaultItem() != mItem1);
- menu.setDefaultItem(mItem1);
- assertEquals(menu.getDefaultItem(), mItem1);
- assertTrue("After setDefaultItem(mItem1):", menu.getDefaultItem() != mItem0);
-}
-
-public void test_setEnabledZ() {
- menu.setEnabled(true);
- assertTrue(menu.getEnabled());
- menu.setEnabled(false);
- assertFalse(menu.getEnabled());
-}
-
-public void test_setLocationII() {
- menu.setLocation(0,0);
-}
-
-public void test_setLocationLorg_eclipse_swt_graphics_Point() {
- menu.setLocation(new Point(0,0));
- try {
- menu.setLocation(null);
- fail("No exception thrown for null argument");
- }
- catch (IllegalArgumentException e) {
- }
-}
-
-public void test_setVisibleZ() {
- // This test can not be run as it currently is written. On Windows, if a
- // menu has no menu items, it will not become visible.
- // If we add menu items to the menu then a second problem is encountered
- // because menu.setVisible() enters into a modal loop and execution of
- // the JUnit test case will not continue until the menu is selected and closed.
- if (true) return;
- menu.setVisible(true);
- assertTrue(menu.getVisible());
- // API not implemented yet
- if (fCheckVisibility) {
- menu.setVisible(false);
- assertEquals(menu.getVisible(), false);
- }
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_widgets_Menu((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_Control");
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_DecorationsI");
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_Menu");
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_MenuItem");
- methodNames.addElement("test_addHelpListenerLorg_eclipse_swt_events_HelpListener");
- methodNames.addElement("test_addMenuListenerLorg_eclipse_swt_events_MenuListener");
- methodNames.addElement("test_getDefaultItem");
- methodNames.addElement("test_getEnabled");
- methodNames.addElement("test_getItemCount");
- methodNames.addElement("test_getItemI");
- methodNames.addElement("test_getItems");
- methodNames.addElement("test_getParent");
- methodNames.addElement("test_getParentItem");
- methodNames.addElement("test_getParentMenu");
- methodNames.addElement("test_getShell");
- methodNames.addElement("test_getVisible");
- methodNames.addElement("test_indexOfLorg_eclipse_swt_widgets_MenuItem");
- methodNames.addElement("test_isEnabled");
- methodNames.addElement("test_isVisible");
- methodNames.addElement("test_removeHelpListenerLorg_eclipse_swt_events_HelpListener");
- methodNames.addElement("test_removeMenuListenerLorg_eclipse_swt_events_MenuListener");
- methodNames.addElement("test_setDefaultItemLorg_eclipse_swt_widgets_MenuItem");
- methodNames.addElement("test_setEnabledZ");
- methodNames.addElement("test_setLocationII");
- methodNames.addElement("test_setLocationLorg_eclipse_swt_graphics_Point");
- methodNames.addElement("test_setVisibleZ");
- methodNames.addAll(Test_org_eclipse_swt_widgets_Widget.methodNames()); // add superclass method names
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_Control")) test_ConstructorLorg_eclipse_swt_widgets_Control();
- else if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_DecorationsI")) test_ConstructorLorg_eclipse_swt_widgets_DecorationsI();
- else if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_Menu")) test_ConstructorLorg_eclipse_swt_widgets_Menu();
- else if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_MenuItem")) test_ConstructorLorg_eclipse_swt_widgets_MenuItem();
- else if (getName().equals("test_addHelpListenerLorg_eclipse_swt_events_HelpListener")) test_addHelpListenerLorg_eclipse_swt_events_HelpListener();
- else if (getName().equals("test_addMenuListenerLorg_eclipse_swt_events_MenuListener")) test_addMenuListenerLorg_eclipse_swt_events_MenuListener();
- else if (getName().equals("test_getDefaultItem")) test_getDefaultItem();
- else if (getName().equals("test_getEnabled")) test_getEnabled();
- else if (getName().equals("test_getItemCount")) test_getItemCount();
- else if (getName().equals("test_getItemI")) test_getItemI();
- else if (getName().equals("test_getItems")) test_getItems();
- else if (getName().equals("test_getParent")) test_getParent();
- else if (getName().equals("test_getParentItem")) test_getParentItem();
- else if (getName().equals("test_getParentMenu")) test_getParentMenu();
- else if (getName().equals("test_getShell")) test_getShell();
- else if (getName().equals("test_getVisible")) test_getVisible();
- else if (getName().equals("test_indexOfLorg_eclipse_swt_widgets_MenuItem")) test_indexOfLorg_eclipse_swt_widgets_MenuItem();
- else if (getName().equals("test_isEnabled")) test_isEnabled();
- else if (getName().equals("test_isVisible")) test_isVisible();
- else if (getName().equals("test_removeHelpListenerLorg_eclipse_swt_events_HelpListener")) test_removeHelpListenerLorg_eclipse_swt_events_HelpListener();
- else if (getName().equals("test_removeMenuListenerLorg_eclipse_swt_events_MenuListener")) test_removeMenuListenerLorg_eclipse_swt_events_MenuListener();
- else if (getName().equals("test_setDefaultItemLorg_eclipse_swt_widgets_MenuItem")) test_setDefaultItemLorg_eclipse_swt_widgets_MenuItem();
- else if (getName().equals("test_setEnabledZ")) test_setEnabledZ();
- else if (getName().equals("test_setLocationII")) test_setLocationII();
- else if (getName().equals("test_setLocationLorg_eclipse_swt_graphics_Point")) test_setLocationLorg_eclipse_swt_graphics_Point();
- else if (getName().equals("test_setVisibleZ")) test_setVisibleZ();
- else super.runTest();
-}
-
-/* custom */
-Menu menu;
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_MenuItem.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_MenuItem.java
deleted file mode 100644
index 80523c4f88..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_MenuItem.java
+++ /dev/null
@@ -1,334 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-import org.eclipse.swt.*;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.widgets.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.widgets.MenuItem
- *
- * @see org.eclipse.swt.widgets.MenuItem
- */
-public class Test_org_eclipse_swt_widgets_MenuItem extends Test_org_eclipse_swt_widgets_Item {
-
-public Test_org_eclipse_swt_widgets_MenuItem(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- super.setUp();
- menu = new Menu(shell);
- menuItem = new MenuItem(menu, 0);
- setWidget(menuItem);
-}
-
-protected void tearDown() {
- super.tearDown();
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_MenuI() {
- MenuItem mItem = new MenuItem(menu, SWT.NULL);
- assertNotNull(mItem);
-
- try {
- new MenuItem(null, SWT.NULL);
- fail("No exception thrown");
- }
- catch (IllegalArgumentException e) {
- }
- mItem = new MenuItem(menu, SWT.CHECK);
- assertTrue(mItem.getStyle()==SWT.CHECK);
- mItem.dispose();
- mItem = new MenuItem(menu, SWT.CASCADE);
- assertTrue(mItem.getStyle()==SWT.CASCADE);
- mItem.dispose();
- mItem = new MenuItem(menu, SWT.PUSH);
- assertTrue(mItem.getStyle()==SWT.PUSH);
- mItem.dispose();
- mItem = new MenuItem(menu, SWT.SEPARATOR);
- assertTrue(mItem.getStyle()==SWT.SEPARATOR);
- mItem.dispose();
- mItem = new MenuItem(menu, SWT.RADIO);
- assertTrue(mItem.getStyle()==SWT.RADIO);
- mItem.dispose();
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_MenuII() {
- MenuItem mItem = new MenuItem(menu, SWT.NULL, 0); //create a menu item at index 0
- assertNotNull(mItem);
- assertTrue(menu.getItem(0).equals(mItem));
- mItem = new MenuItem(menu, SWT.NULL, 1);
- assertNotNull(mItem);
- assertTrue(menu.getItem(1).equals(mItem));
-}
-
-public void test_addArmListenerLorg_eclipse_swt_events_ArmListener() {
- listenerCalled = false;
- ArmListener listener = new ArmListener() {
- public void widgetArmed(ArmEvent e) {
- listenerCalled = true;
- };
- };
-
- try {
- menuItem.addArmListener(null);
- fail("No exception thrown for addArmListener with null argument");
- } catch (IllegalArgumentException e) {
- }
-
- menuItem.addArmListener(listener);
- menuItem.notifyListeners(SWT.Arm, new Event());
- assertTrue(listenerCalled);
-
- try {
- menuItem.removeArmListener(null);
- fail("No exception thrown for removeArmListener with null argument");
- } catch (IllegalArgumentException e) {
- }
- listenerCalled = false;
- menuItem.removeArmListener(listener);
- menuItem.notifyListeners(SWT.Arm, new Event());
- assertFalse(listenerCalled);
-}
-
-public void test_addHelpListenerLorg_eclipse_swt_events_HelpListener() {
- listenerCalled = false;
- HelpListener listener = new HelpListener() {
- public void helpRequested(HelpEvent e) {
- listenerCalled = true;
- };
- };
-
- try {
- menuItem.addHelpListener(null);
- fail("No exception thrown for addHelpListener with null argument");
- } catch (IllegalArgumentException e) {
- }
-
- menuItem.addHelpListener(listener);
- menuItem.notifyListeners(SWT.Help, new Event());
- assertTrue(listenerCalled);
-
- try {
- menuItem.removeHelpListener(null);
- fail("No exception thrown for removeHelpListener with null argument");
- } catch (IllegalArgumentException e) {
- }
- listenerCalled = false;
- menuItem.removeHelpListener(listener);
- menuItem.notifyListeners(SWT.Help, new Event());
- assertFalse(listenerCalled);
-}
-
-public void test_addSelectionListenerLorg_eclipse_swt_events_SelectionListener() {
- listenerCalled = false;
- SelectionListener listener = new SelectionListener() {
- public void widgetSelected(SelectionEvent e) {
- listenerCalled = true;
- };
- public void widgetDefaultSelected(SelectionEvent e) {
- };
- };
-
- try {
- menuItem.addSelectionListener(null);
- fail("No exception thrown for addSelectionListener with null argument");
- } catch (IllegalArgumentException e) {
- }
-
- menuItem.addSelectionListener(listener);
- menuItem.notifyListeners(SWT.Selection, new Event());
- assertTrue(listenerCalled);
-
- try {
- menuItem.removeSelectionListener(null);
- fail("No exception thrown for removeSelectionListener with null argument");
- } catch (IllegalArgumentException e) {
- }
- listenerCalled = false;
- menuItem.removeSelectionListener(listener);
- menuItem.notifyListeners(SWT.Selection, new Event());
- assertFalse(listenerCalled);
-}
-
-public void test_getAccelerator() {
- menuItem.setAccelerator(SWT.MOD1 + 'X');
- assertEquals(menuItem.getAccelerator(), SWT.MOD1 + 'X');
- menuItem.setAccelerator(SWT.MOD2 + 'Y');
- assertEquals(menuItem.getAccelerator(), SWT.MOD2 + 'Y');
- menuItem.setAccelerator(SWT.MOD3 + 'Z');
- assertEquals(menuItem.getAccelerator(), SWT.MOD3 + 'Z');
-}
-
-public void test_getEnabled() {
- // tested in test_setEnabledZ()
-}
-
-public void test_getMenu() {
- // tested in test_setMenuLorg_eclipse_swt_widgets_Menu
-}
-
-public void test_getParent() {
- assertEquals(menuItem.getParent(), menu);
-}
-
-public void test_getSelection() {
- // tested in test_setSelectionZ()
-}
-
-public void test_isEnabled() {
- menuItem.setEnabled(true);
- assertTrue(menuItem.isEnabled());
- menuItem.setEnabled(false);
- assertEquals(menuItem.isEnabled(), false);
-}
-
-public void test_removeArmListenerLorg_eclipse_swt_events_ArmListener() {
- // tested in test_addArmListenerLorg_eclipse_swt_events_ArmListener()
-}
-
-public void test_removeHelpListenerLorg_eclipse_swt_events_HelpListener() {
- // tested in test_addHelpListenerLorg_eclipse_swt_events_HelpListener()
-}
-
-public void test_removeSelectionListenerLorg_eclipse_swt_events_SelectionListener() {
- // tested in test_addSelectionListenerLorg_eclipse_swt_events_SelectionListener
-}
-
-public void test_setAcceleratorI() {
- menuItem.setAccelerator(SWT.CTRL + 'Z');
- assertEquals(menuItem.getAccelerator(), SWT.CTRL + 'Z');
-}
-
-public void test_setEnabledZ() {
- menuItem.setEnabled(true);
- assertTrue(menuItem.getEnabled());
- menuItem.setEnabled(false);
- assertEquals(menuItem.getEnabled(), false);
-}
-
-public void test_setImageLorg_eclipse_swt_graphics_Image() {
- assertNull(menuItem.getImage());
- menuItem.setImage(images[0]);
- assertEquals(images[0], menuItem.getImage());
- assertTrue(menuItem.getImage() != images[1]);
- menuItem.setImage(null);
- assertNull(menuItem.getImage());
-}
-
-public void test_setMenuLorg_eclipse_swt_widgets_Menu() {
- assertNull(menuItem.getMenu());
- MenuItem mItem = new MenuItem(menu, SWT.CASCADE);
- Menu newMenu = new Menu(shell, SWT.DROP_DOWN);
- mItem.setMenu(newMenu);
- assertEquals(mItem.getMenu(), newMenu);
-}
-
-public void test_setSelectionZ() {
-
- int[] itemStyles = {SWT.CHECK, SWT.RADIO};
- for (int i=0; i<itemStyles.length; i++)
- {
- MenuItem mItem = new MenuItem(menu, itemStyles[i]);
- mItem.setSelection(false);
- assertEquals(mItem.getSelection(), false);
- mItem.setSelection(true);
- assertTrue(mItem.getSelection());
- mItem.dispose();
- }
-}
-
-public void test_setTextLjava_lang_String() {
- menuItem.setText("ABCDEFG");
- assertTrue(menuItem.getText().equals("ABCDEFG"));
- try {
- menuItem.setText(null);
- fail("No exception thrown for addArmListener with null argument");
- } catch (IllegalArgumentException e) {
- }
- menuItem.setText("ABCDEFG");
- menuItem.setAccelerator(SWT.MOD1 + 'A');
- assertTrue(menuItem.getText().startsWith("ABCDEFG"));
- menuItem.setAccelerator(0);
- menuItem.setText("AB&CDEFG");
- assertTrue(menuItem.getText().equals("AB&CDEFG"));
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_widgets_MenuItem((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_MenuI");
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_MenuII");
- methodNames.addElement("test_addArmListenerLorg_eclipse_swt_events_ArmListener");
- methodNames.addElement("test_addHelpListenerLorg_eclipse_swt_events_HelpListener");
- methodNames.addElement("test_addSelectionListenerLorg_eclipse_swt_events_SelectionListener");
- methodNames.addElement("test_getAccelerator");
- methodNames.addElement("test_getEnabled");
- methodNames.addElement("test_getMenu");
- methodNames.addElement("test_getParent");
- methodNames.addElement("test_getSelection");
- methodNames.addElement("test_isEnabled");
- methodNames.addElement("test_removeArmListenerLorg_eclipse_swt_events_ArmListener");
- methodNames.addElement("test_removeHelpListenerLorg_eclipse_swt_events_HelpListener");
- methodNames.addElement("test_removeSelectionListenerLorg_eclipse_swt_events_SelectionListener");
- methodNames.addElement("test_setAcceleratorI");
- methodNames.addElement("test_setEnabledZ");
- methodNames.addElement("test_setImageLorg_eclipse_swt_graphics_Image");
- methodNames.addElement("test_setMenuLorg_eclipse_swt_widgets_Menu");
- methodNames.addElement("test_setSelectionZ");
- methodNames.addElement("test_setTextLjava_lang_String");
- methodNames.addAll(Test_org_eclipse_swt_widgets_Item.methodNames()); // add superclass method names
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_MenuI")) test_ConstructorLorg_eclipse_swt_widgets_MenuI();
- else if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_MenuII")) test_ConstructorLorg_eclipse_swt_widgets_MenuII();
- else if (getName().equals("test_addArmListenerLorg_eclipse_swt_events_ArmListener")) test_addArmListenerLorg_eclipse_swt_events_ArmListener();
- else if (getName().equals("test_addHelpListenerLorg_eclipse_swt_events_HelpListener")) test_addHelpListenerLorg_eclipse_swt_events_HelpListener();
- else if (getName().equals("test_addSelectionListenerLorg_eclipse_swt_events_SelectionListener")) test_addSelectionListenerLorg_eclipse_swt_events_SelectionListener();
- else if (getName().equals("test_getAccelerator")) test_getAccelerator();
- else if (getName().equals("test_getEnabled")) test_getEnabled();
- else if (getName().equals("test_getMenu")) test_getMenu();
- else if (getName().equals("test_getParent")) test_getParent();
- else if (getName().equals("test_getSelection")) test_getSelection();
- else if (getName().equals("test_isEnabled")) test_isEnabled();
- else if (getName().equals("test_removeArmListenerLorg_eclipse_swt_events_ArmListener")) test_removeArmListenerLorg_eclipse_swt_events_ArmListener();
- else if (getName().equals("test_removeHelpListenerLorg_eclipse_swt_events_HelpListener")) test_removeHelpListenerLorg_eclipse_swt_events_HelpListener();
- else if (getName().equals("test_removeSelectionListenerLorg_eclipse_swt_events_SelectionListener")) test_removeSelectionListenerLorg_eclipse_swt_events_SelectionListener();
- else if (getName().equals("test_setAcceleratorI")) test_setAcceleratorI();
- else if (getName().equals("test_setEnabledZ")) test_setEnabledZ();
- else if (getName().equals("test_setImageLorg_eclipse_swt_graphics_Image")) test_setImageLorg_eclipse_swt_graphics_Image();
- else if (getName().equals("test_setMenuLorg_eclipse_swt_widgets_Menu")) test_setMenuLorg_eclipse_swt_widgets_Menu();
- else if (getName().equals("test_setSelectionZ")) test_setSelectionZ();
- else if (getName().equals("test_setTextLjava_lang_String")) test_setTextLjava_lang_String();
- else super.runTest();
-}
-
-/* custom */
-Menu menu;
-MenuItem menuItem;
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_MessageBox.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_MessageBox.java
deleted file mode 100644
index d761cfcf11..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_MessageBox.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.widgets.MessageBox
- *
- * @see org.eclipse.swt.widgets.MessageBox
- */
-public class Test_org_eclipse_swt_widgets_MessageBox extends Test_org_eclipse_swt_widgets_Dialog {
-
-public Test_org_eclipse_swt_widgets_MessageBox(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- super.setUp();
- messageBox = new MessageBox(shell, SWT.NULL);
- setDialog(messageBox);
-}
-
-protected void tearDown() {
- super.tearDown();
-}
-
-/**
- * Possible exceptions:
- *
- * @exception IllegalArgumentException <ul>
- * <li>ERROR_NULL_ARGUMENT - if the parent is null</li>
- * </ul>
- * @exception SWTException <ul>
- * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the parent</li>
- * <li>ERROR_INVALID_SUBCLASS - if this class is not an allowed subclass</li>
- * </ul>
- */
-public void test_ConstructorLorg_eclipse_swt_widgets_Shell(){
- MessageBox mb = new MessageBox(shell);
- try {
- new MessageBox(null);
- fail("No exception thrown for parent == null");
- }
- catch (IllegalArgumentException e) {
- }
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_ShellI() {
- warnUnimpl("Test test_ConstructorLorg_eclipse_swt_widgets_ShellI not written");
-}
-
-public void test_getMessage() {
- warnUnimpl("Test test_getMessage not written");
-}
-
-/**
- * Makes the dialog visible and brings it to the front
- * of the display.
- *
- * @return the ID of the button that was selected to dismiss the
- * message box (e.g. SWT.OK, SWT.CANCEL, etc...)
- */
-public void test_open(){
- if (fTestDialogOpen)
- messageBox.open();
-}
-
-/**
- * Sets the dialog's message, which is a description of
- * the purpose for which it was opened. This message will be
- * visible on the dialog while it is open.
- */
-public void test_setMessageLjava_lang_String(){
- assertEquals(messageBox.getMessage(), "");
- String testStr = "test string";
- messageBox.setMessage(testStr);
- assertEquals(messageBox.getMessage(), testStr);
- messageBox.setMessage("");
- assertEquals(messageBox.getMessage(), "");
- try {
- messageBox.setMessage(null);
- fail("No exception thrown");
- }
- catch (IllegalArgumentException e) {
- }
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_widgets_MessageBox((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_Shell");
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_ShellI");
- methodNames.addElement("test_getMessage");
- methodNames.addElement("test_open");
- methodNames.addElement("test_setMessageLjava_lang_String");
- methodNames.addAll(Test_org_eclipse_swt_widgets_Dialog.methodNames()); // add superclass method names
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_Shell")) test_ConstructorLorg_eclipse_swt_widgets_Shell();
- else if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_ShellI")) test_ConstructorLorg_eclipse_swt_widgets_ShellI();
- else if (getName().equals("test_getMessage")) test_getMessage();
- else if (getName().equals("test_open")) test_open();
- else if (getName().equals("test_setMessageLjava_lang_String")) test_setMessageLjava_lang_String();
- else super.runTest();
-}
-
-/* custom */
-MessageBox messageBox;
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Monitor.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Monitor.java
deleted file mode 100644
index 0ef64928cf..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Monitor.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.graphics.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.widgets.Monitor
- *
- * @see org.eclipse.swt.widgets.Monitor
- */
-public class Test_org_eclipse_swt_widgets_Monitor extends SwtTestCase {
-
-public Test_org_eclipse_swt_widgets_Monitor(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- display = Display.getDefault();
- monitors = display.getMonitors();
- primary = display.getPrimaryMonitor();
-}
-
-protected void tearDown() {
-}
-
-public void test_equalsLjava_lang_Object() {
- int i;
- for (i = 0; i < monitors.length; i++) {
- if (primary.equals(monitors[i])) break;
- }
- if (i == monitors.length) fail();
- for (i = 0; i < monitors.length; i++) {
- Monitor test = monitors[i];
- for (int j = 0; j < monitors.length; j++) {
- if (test.equals(monitors[j])) {
- if (i != j) fail("Monitors "+i+" and "+j+" should not be equal");
- }
- }
- }
-}
-
-public void test_getBounds() {
- Rectangle bounds = primary.getBounds();
- assertNotNull(bounds);
- for (int i = 0; i < monitors.length; i++) {
- bounds = monitors[i].getBounds();
- assertNotNull(bounds);
- }
-}
-
-public void test_getClientArea() {
- Rectangle bounds = primary.getClientArea();
- assertNotNull(bounds);
- for (int i = 0; i < monitors.length; i++) {
- bounds = monitors[i].getClientArea();
- assertNotNull(bounds);
- }
-}
-
-public void test_hashCode() {
- for (int i = 0; i < monitors.length; i++) {
- if (primary.equals(monitors[i])) {
- assertTrue(primary.hashCode() == monitors[i].hashCode());
- break;
- }
- }
-}
-
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_widgets_Monitor((String)e.nextElement()));
- }
- return suite;
-}
-
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_equalsLjava_lang_Object");
- methodNames.addElement("test_getBounds");
- methodNames.addElement("test_getClientArea");
- methodNames.addElement("test_hashCode");
- return methodNames;
-}
-
-protected void runTest() throws Throwable {
- if (getName().equals("test_equalsLjava_lang_Object")) test_equalsLjava_lang_Object();
- else if (getName().equals("test_getBounds")) test_getBounds();
- else if (getName().equals("test_getClientArea")) test_getClientArea();
- else if (getName().equals("test_hashCode")) test_hashCode();
-}
-
-/* custom */
-Display display = null;
-Monitor[] monitors = null;
-Monitor primary = null;
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_ProgressBar.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_ProgressBar.java
deleted file mode 100644
index 5dbecbd4ea..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_ProgressBar.java
+++ /dev/null
@@ -1,610 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.widgets.ProgressBar
- *
- * @see org.eclipse.swt.widgets.ProgressBar
- */
-public class Test_org_eclipse_swt_widgets_ProgressBar extends Test_org_eclipse_swt_widgets_Control {
-
-public Test_org_eclipse_swt_widgets_ProgressBar(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- super.setUp();
- progressBar = new ProgressBar(shell, 0);
- setWidget(progressBar);
-}
-
-protected void tearDown() {
- super.tearDown();
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_CompositeI() {
- try {
- progressBar = new ProgressBar(null, 0);
- fail("No exception thrown"); //should never get here
- }
- catch (IllegalArgumentException e) {
- }
-
- int[] cases = {0, SWT.HORIZONTAL, SWT.VERTICAL};
- for (int i = 0; i < cases.length; i++)
- progressBar = new ProgressBar(shell, cases[i]);
-}
-
-public void test_computeSizeIIZ() {
- warnUnimpl("Test test_computeSizeIIZ not written");
-}
-
-public void test_getMaximum() {
- warnUnimpl("Test test_getMaximum not written");
-}
-
-public void test_getMinimum() {
- warnUnimpl("Test test_getMinimum not written");
-}
-
-public void test_getSelection() {
- warnUnimpl("Test test_getSelection not written");
-}
-
-public void test_setFocus() {
- warnUnimpl("Test test_setFocus not written");
-}
-
-public void test_setMaximumI() {
-
- int [][] testValues = getSetMaximumValues();
-
- for (int i = 0; i < testValues.length; i++) {
- int[] intArray = testValues[i];
- setDefaults();
- progressBar.setMaximum(intArray[0]);
- report("setMaximum", intArray[0], intArray[1], intArray[2], intArray[3]);
- }
-}
-
-public void test_setMinimumI() {
-
- int [][] testValues = getSetMinimumValues();
-
- for (int i = 0; i < testValues.length; i++) {
- int[] intArray = testValues[i];
- setDefaults();
- progressBar.setMinimum(intArray[0]);
- report("setMinimum", intArray[0], intArray[1], intArray[2], intArray[3]);
- }
-}
-
-public void test_setSelectionI() {
- int [][] testValues = getSetSelectionValues();
- for (int i = 0; i < testValues.length; i++) {
- int[] intArray = testValues[i];
- setDefaults();
- progressBar.setSelection(intArray[0]);
- report("setSelection", intArray[0], intArray[1], intArray[2], intArray[3]);
- }
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_widgets_ProgressBar((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_CompositeI");
- methodNames.addElement("test_computeSizeIIZ");
- methodNames.addElement("test_getMaximum");
- methodNames.addElement("test_getMinimum");
- methodNames.addElement("test_getSelection");
- methodNames.addElement("test_setFocus");
- methodNames.addElement("test_setMaximumI");
- methodNames.addElement("test_setMinimumI");
- methodNames.addElement("test_setSelectionI");
- methodNames.addAll(Test_org_eclipse_swt_widgets_Control.methodNames()); // add superclass method names
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_CompositeI")) test_ConstructorLorg_eclipse_swt_widgets_CompositeI();
- else if (getName().equals("test_computeSizeIIZ")) test_computeSizeIIZ();
- else if (getName().equals("test_getMaximum")) test_getMaximum();
- else if (getName().equals("test_getMinimum")) test_getMinimum();
- else if (getName().equals("test_getSelection")) test_getSelection();
- else if (getName().equals("test_setFocus")) test_setFocus();
- else if (getName().equals("test_setMaximumI")) test_setMaximumI();
- else if (getName().equals("test_setMinimumI")) test_setMinimumI();
- else if (getName().equals("test_setSelectionI")) test_setSelectionI();
- else super.runTest();
-}
-
-/* custom */
-ProgressBar progressBar;
-// this method must be private or protected so the auto-gen tool keeps it
-private void report(String call, int set, int minExpected, int maxExpected, int selectionExpected) {
- // Uncomment these lines and comment out call to check() if you want the test to report all errors without
- // stopping.
-
- //if (progressBar.getMinimum() != minExpected)
- //System.out.println(call + "(" + set + "): Minimum Expected: " + minExpected + " Actual: " + progressBar.getMinimum());
- //if (progressBar.getMaximum() != maxExpected)
- //System.out.println(call + "(" + set + "): Maximum Expected: " + maxExpected + " Actual: " + progressBar.getMaximum());
- //if (progressBar.getSelection() != selectionExpected)
- //System.out.println(call + "(" + set + "): Selection Expected: " + selectionExpected + " Actual: " + progressBar.getSelection());
-
- check(minExpected, maxExpected, selectionExpected);
-}
-// this method must be private or protected so the auto-gen tool keeps it
-private void check(int minExpected, int maxExpected, int selectionExpected) {
- assertEquals(progressBar.getMaximum(), maxExpected);
- assertEquals(progressBar.getMinimum(), minExpected);
- assertEquals(progressBar.getSelection(), selectionExpected);
-}
-// this method must be private or protected so the auto-gen tool keeps it
-private int[][] getSetMinimumValues() {
-return new int[][] {
-{-15, 10, 100, 50, },
-{-14, 10, 100, 50, },
-{-13, 10, 100, 50, },
-{-12, 10, 100, 50, },
-{-11, 10, 100, 50, },
-{-10, 10, 100, 50, },
-{-9, 10, 100, 50, },
-{-8, 10, 100, 50, },
-{-7, 10, 100, 50, },
-{-6, 10, 100, 50, },
-{-5, 10, 100, 50, },
-{-4, 10, 100, 50, },
-{-3, 10, 100, 50, },
-{-2, 10, 100, 50, },
-{-1, 10, 100, 50, },
-{0, 0, 100, 50, },
-{1, 1, 100, 50, },
-{2, 2, 100, 50, },
-{3, 3, 100, 50, },
-{4, 4, 100, 50, },
-{5, 5, 100, 50, },
-{6, 6, 100, 50, },
-{7, 7, 100, 50, },
-{8, 8, 100, 50, },
-{9, 9, 100, 50, },
-{10, 10, 100, 50, },
-{11, 11, 100, 50, },
-{12, 12, 100, 50, },
-{13, 13, 100, 50, },
-{14, 14, 100, 50, },
-{15, 15, 100, 50, },
-{16, 16, 100, 50, },
-{17, 17, 100, 50, },
-{18, 18, 100, 50, },
-{19, 19, 100, 50, },
-{20, 20, 100, 50, },
-{21, 21, 100, 50, },
-{22, 22, 100, 50, },
-{23, 23, 100, 50, },
-{24, 24, 100, 50, },
-{25, 25, 100, 50, },
-{26, 26, 100, 50, },
-{27, 27, 100, 50, },
-{28, 28, 100, 50, },
-{29, 29, 100, 50, },
-{30, 30, 100, 50, },
-{31, 31, 100, 50, },
-{32, 32, 100, 50, },
-{33, 33, 100, 50, },
-{34, 34, 100, 50, },
-{35, 35, 100, 50, },
-{36, 36, 100, 50, },
-{37, 37, 100, 50, },
-{38, 38, 100, 50, },
-{39, 39, 100, 50, },
-{40, 40, 100, 50, },
-{41, 41, 100, 50, },
-{42, 42, 100, 50, },
-{43, 43, 100, 50, },
-{44, 44, 100, 50, },
-{45, 45, 100, 50, },
-{46, 46, 100, 50, },
-{47, 47, 100, 50, },
-{48, 48, 100, 50, },
-{49, 49, 100, 50, },
-{50, 50, 100, 50, },
-{51, 51, 100, 51, },
-{52, 52, 100, 52, },
-{53, 53, 100, 53, },
-{54, 54, 100, 54, },
-{55, 55, 100, 55, },
-{56, 56, 100, 56, },
-{57, 57, 100, 57, },
-{58, 58, 100, 58, },
-{59, 59, 100, 59, },
-{60, 60, 100, 60, },
-{61, 61, 100, 61, },
-{62, 62, 100, 62, },
-{63, 63, 100, 63, },
-{64, 64, 100, 64, },
-{65, 65, 100, 65, },
-{66, 66, 100, 66, },
-{67, 67, 100, 67, },
-{68, 68, 100, 68, },
-{69, 69, 100, 69, },
-{70, 70, 100, 70, },
-{71, 71, 100, 71, },
-{72, 72, 100, 72, },
-{73, 73, 100, 73, },
-{74, 74, 100, 74, },
-{75, 75, 100, 75, },
-{76, 76, 100, 76, },
-{77, 77, 100, 77, },
-{78, 78, 100, 78, },
-{79, 79, 100, 79, },
-{80, 80, 100, 80, },
-{81, 81, 100, 81, },
-{82, 82, 100, 82, },
-{83, 83, 100, 83, },
-{84, 84, 100, 84, },
-{85, 85, 100, 85, },
-{86, 86, 100, 86, },
-{87, 87, 100, 87, },
-{88, 88, 100, 88, },
-{89, 89, 100, 89, },
-{90, 90, 100, 90, },
-{91, 91, 100, 91, },
-{92, 92, 100, 92, },
-{93, 93, 100, 93, },
-{94, 94, 100, 94, },
-{95, 95, 100, 95, },
-{96, 96, 100, 96, },
-{97, 97, 100, 97, },
-{98, 98, 100, 98, },
-{99, 99, 100, 99, },
-{100, 10, 100, 50, },
-{101, 10, 100, 50, },
-{102, 10, 100, 50, },
-{103, 10, 100, 50, },
-{104, 10, 100, 50, },
-{105, 10, 100, 50, },
-{106, 10, 100, 50, },
-{107, 10, 100, 50, },
-{108, 10, 100, 50, },
-{109, 10, 100, 50, },
-{110, 10, 100, 50, },
-{111, 10, 100, 50, },
-{112, 10, 100, 50, },
-{113, 10, 100, 50, },
-{114, 10, 100, 50, },
-{115, 10, 100, 50, },
-{116, 10, 100, 50, },
-{117, 10, 100, 50, },
-{118, 10, 100, 50, },
-{119, 10, 100, 50, },
-{120, 10, 100, 50, },
-{121, 10, 100, 50, },
-{122, 10, 100, 50, },
-{123, 10, 100, 50, },
-{124, 10, 100, 50, },
-};
-}
-// this method must be private or protected so the auto-gen tool keeps it
-private int[][] getSetMaximumValues() {
-return new int[][] {
-{-15, 10, 100, 50, },
-{-14, 10, 100, 50, },
-{-13, 10, 100, 50, },
-{-12, 10, 100, 50, },
-{-11, 10, 100, 50, },
-{-10, 10, 100, 50, },
-{-9, 10, 100, 50, },
-{-8, 10, 100, 50, },
-{-7, 10, 100, 50, },
-{-6, 10, 100, 50, },
-{-5, 10, 100, 50, },
-{-4, 10, 100, 50, },
-{-3, 10, 100, 50, },
-{-2, 10, 100, 50, },
-{-1, 10, 100, 50, },
-{0, 10, 100, 50, },
-{1, 10, 100, 50, },
-{2, 10, 100, 50, },
-{3, 10, 100, 50, },
-{4, 10, 100, 50, },
-{5, 10, 100, 50, },
-{6, 10, 100, 50, },
-{7, 10, 100, 50, },
-{8, 10, 100, 50, },
-{9, 10, 100, 50, },
-{10, 10, 100, 50, },
-{11, 10, 11, 11, },
-{12, 10, 12, 12, },
-{13, 10, 13, 13, },
-{14, 10, 14, 14, },
-{15, 10, 15, 15, },
-{16, 10, 16, 16, },
-{17, 10, 17, 17, },
-{18, 10, 18, 18, },
-{19, 10, 19, 19, },
-{20, 10, 20, 20, },
-{21, 10, 21, 21, },
-{22, 10, 22, 22, },
-{23, 10, 23, 23, },
-{24, 10, 24, 24, },
-{25, 10, 25, 25, },
-{26, 10, 26, 26, },
-{27, 10, 27, 27, },
-{28, 10, 28, 28, },
-{29, 10, 29, 29, },
-{30, 10, 30, 30, },
-{31, 10, 31, 31, },
-{32, 10, 32, 32, },
-{33, 10, 33, 33, },
-{34, 10, 34, 34, },
-{35, 10, 35, 35, },
-{36, 10, 36, 36, },
-{37, 10, 37, 37, },
-{38, 10, 38, 38, },
-{39, 10, 39, 39, },
-{40, 10, 40, 40, },
-{41, 10, 41, 41, },
-{42, 10, 42, 42, },
-{43, 10, 43, 43, },
-{44, 10, 44, 44, },
-{45, 10, 45, 45, },
-{46, 10, 46, 46, },
-{47, 10, 47, 47, },
-{48, 10, 48, 48, },
-{49, 10, 49, 49, },
-{50, 10, 50, 50, },
-{51, 10, 51, 50, },
-{52, 10, 52, 50, },
-{53, 10, 53, 50, },
-{54, 10, 54, 50, },
-{55, 10, 55, 50, },
-{56, 10, 56, 50, },
-{57, 10, 57, 50, },
-{58, 10, 58, 50, },
-{59, 10, 59, 50, },
-{60, 10, 60, 50, },
-{61, 10, 61, 50, },
-{62, 10, 62, 50, },
-{63, 10, 63, 50, },
-{64, 10, 64, 50, },
-{65, 10, 65, 50, },
-{66, 10, 66, 50, },
-{67, 10, 67, 50, },
-{68, 10, 68, 50, },
-{69, 10, 69, 50, },
-{70, 10, 70, 50, },
-{71, 10, 71, 50, },
-{72, 10, 72, 50, },
-{73, 10, 73, 50, },
-{74, 10, 74, 50, },
-{75, 10, 75, 50, },
-{76, 10, 76, 50, },
-{77, 10, 77, 50, },
-{78, 10, 78, 50, },
-{79, 10, 79, 50, },
-{80, 10, 80, 50, },
-{81, 10, 81, 50, },
-{82, 10, 82, 50, },
-{83, 10, 83, 50, },
-{84, 10, 84, 50, },
-{85, 10, 85, 50, },
-{86, 10, 86, 50, },
-{87, 10, 87, 50, },
-{88, 10, 88, 50, },
-{89, 10, 89, 50, },
-{90, 10, 90, 50, },
-{91, 10, 91, 50, },
-{92, 10, 92, 50, },
-{93, 10, 93, 50, },
-{94, 10, 94, 50, },
-{95, 10, 95, 50, },
-{96, 10, 96, 50, },
-{97, 10, 97, 50, },
-{98, 10, 98, 50, },
-{99, 10, 99, 50, },
-{100, 10, 100, 50, },
-{101, 10, 101, 50, },
-{102, 10, 102, 50, },
-{103, 10, 103, 50, },
-{104, 10, 104, 50, },
-{105, 10, 105, 50, },
-{106, 10, 106, 50, },
-{107, 10, 107, 50, },
-{108, 10, 108, 50, },
-{109, 10, 109, 50, },
-{110, 10, 110, 50, },
-{111, 10, 111, 50, },
-{112, 10, 112, 50, },
-{113, 10, 113, 50, },
-{114, 10, 114, 50, },
-{115, 10, 115, 50, },
-{116, 10, 116, 50, },
-{117, 10, 117, 50, },
-{118, 10, 118, 50, },
-{119, 10, 119, 50, },
-{120, 10, 120, 50, },
-{121, 10, 121, 50, },
-{122, 10, 122, 50, },
-{123, 10, 123, 50, },
-{124, 10, 124, 50, },
-};
-}
-// this method must be private or protected so the auto-gen tool keeps it
-private void setDefaults() {
- progressBar.setMaximum(100);
- progressBar.setMinimum(10);
- progressBar.setSelection(50);
-}
-// this method must be private or protected so the auto-gen tool keeps it
-private int[][] getSetSelectionValues() {
-return new int[][] {
-{-15, 10, 100, 10, },
-{-14, 10, 100, 10, },
-{-13, 10, 100, 10, },
-{-12, 10, 100, 10, },
-{-11, 10, 100, 10, },
-{-10, 10, 100, 10, },
-{-9, 10, 100, 10, },
-{-8, 10, 100, 10, },
-{-7, 10, 100, 10, },
-{-6, 10, 100, 10, },
-{-5, 10, 100, 10, },
-{-4, 10, 100, 10, },
-{-3, 10, 100, 10, },
-{-2, 10, 100, 10, },
-{-1, 10, 100, 10, },
-{0, 10, 100, 10, },
-{1, 10, 100, 10, },
-{2, 10, 100, 10, },
-{3, 10, 100, 10, },
-{4, 10, 100, 10, },
-{5, 10, 100, 10, },
-{6, 10, 100, 10, },
-{7, 10, 100, 10, },
-{8, 10, 100, 10, },
-{9, 10, 100, 10, },
-{10, 10, 100, 10, },
-{11, 10, 100, 11, },
-{12, 10, 100, 12, },
-{13, 10, 100, 13, },
-{14, 10, 100, 14, },
-{15, 10, 100, 15, },
-{16, 10, 100, 16, },
-{17, 10, 100, 17, },
-{18, 10, 100, 18, },
-{19, 10, 100, 19, },
-{20, 10, 100, 20, },
-{21, 10, 100, 21, },
-{22, 10, 100, 22, },
-{23, 10, 100, 23, },
-{24, 10, 100, 24, },
-{25, 10, 100, 25, },
-{26, 10, 100, 26, },
-{27, 10, 100, 27, },
-{28, 10, 100, 28, },
-{29, 10, 100, 29, },
-{30, 10, 100, 30, },
-{31, 10, 100, 31, },
-{32, 10, 100, 32, },
-{33, 10, 100, 33, },
-{34, 10, 100, 34, },
-{35, 10, 100, 35, },
-{36, 10, 100, 36, },
-{37, 10, 100, 37, },
-{38, 10, 100, 38, },
-{39, 10, 100, 39, },
-{40, 10, 100, 40, },
-{41, 10, 100, 41, },
-{42, 10, 100, 42, },
-{43, 10, 100, 43, },
-{44, 10, 100, 44, },
-{45, 10, 100, 45, },
-{46, 10, 100, 46, },
-{47, 10, 100, 47, },
-{48, 10, 100, 48, },
-{49, 10, 100, 49, },
-{50, 10, 100, 50, },
-{51, 10, 100, 51, },
-{52, 10, 100, 52, },
-{53, 10, 100, 53, },
-{54, 10, 100, 54, },
-{55, 10, 100, 55, },
-{56, 10, 100, 56, },
-{57, 10, 100, 57, },
-{58, 10, 100, 58, },
-{59, 10, 100, 59, },
-{60, 10, 100, 60, },
-{61, 10, 100, 61, },
-{62, 10, 100, 62, },
-{63, 10, 100, 63, },
-{64, 10, 100, 64, },
-{65, 10, 100, 65, },
-{66, 10, 100, 66, },
-{67, 10, 100, 67, },
-{68, 10, 100, 68, },
-{69, 10, 100, 69, },
-{70, 10, 100, 70, },
-{71, 10, 100, 71, },
-{72, 10, 100, 72, },
-{73, 10, 100, 73, },
-{74, 10, 100, 74, },
-{75, 10, 100, 75, },
-{76, 10, 100, 76, },
-{77, 10, 100, 77, },
-{78, 10, 100, 78, },
-{79, 10, 100, 79, },
-{80, 10, 100, 80, },
-{81, 10, 100, 81, },
-{82, 10, 100, 82, },
-{83, 10, 100, 83, },
-{84, 10, 100, 84, },
-{85, 10, 100, 85, },
-{86, 10, 100, 86, },
-{87, 10, 100, 87, },
-{88, 10, 100, 88, },
-{89, 10, 100, 89, },
-{90, 10, 100, 90, },
-{91, 10, 100, 91, },
-{92, 10, 100, 92, },
-{93, 10, 100, 93, },
-{94, 10, 100, 94, },
-{95, 10, 100, 95, },
-{96, 10, 100, 96, },
-{97, 10, 100, 97, },
-{98, 10, 100, 98, },
-{99, 10, 100, 99, },
-{100, 10, 100, 100, },
-{101, 10, 100, 100, },
-{102, 10, 100, 100, },
-{103, 10, 100, 100, },
-{104, 10, 100, 100, },
-{105, 10, 100, 100, },
-{106, 10, 100, 100, },
-{107, 10, 100, 100, },
-{108, 10, 100, 100, },
-{109, 10, 100, 100, },
-{110, 10, 100, 100, },
-{111, 10, 100, 100, },
-{112, 10, 100, 100, },
-{113, 10, 100, 100, },
-{114, 10, 100, 100, },
-{115, 10, 100, 100, },
-{116, 10, 100, 100, },
-{117, 10, 100, 100, },
-{118, 10, 100, 100, },
-{119, 10, 100, 100, },
-{120, 10, 100, 100, },
-{121, 10, 100, 100, },
-{122, 10, 100, 100, },
-{123, 10, 100, 100, },
-{124, 10, 100, 100, },
-};
-}
-
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Sash.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Sash.java
deleted file mode 100644
index 44763b34be..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Sash.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.widgets.Sash
- *
- * @see org.eclipse.swt.widgets.Sash
- */
-public class Test_org_eclipse_swt_widgets_Sash extends Test_org_eclipse_swt_widgets_Control {
-
-public Test_org_eclipse_swt_widgets_Sash(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- super.setUp();
- sash = new Sash(shell, 0);
- setWidget(sash);
-}
-
-protected void tearDown() {
- super.tearDown();
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_CompositeI() {
- try {
- sash = new Sash(null, 0);
- fail("No exception thrown"); //should never get here
- }
- catch (IllegalArgumentException e) {
- }
-
- int[] cases = {0, SWT.HORIZONTAL, SWT.VERTICAL};
- for (int i = 0; i < cases.length; i++)
- sash = new Sash(shell, cases[i]);
-}
-
-public void test_addSelectionListenerLorg_eclipse_swt_events_SelectionListener() {
- warnUnimpl("Test test_addSelectionListenerLorg_eclipse_swt_events_SelectionListener not written");
-}
-
-public void test_computeSizeIIZ() {
- warnUnimpl("Test test_computeSizeIIZ not written");
-}
-
-public void test_removeSelectionListenerLorg_eclipse_swt_events_SelectionListener() {
- warnUnimpl("Test test_removeSelectionListenerLorg_eclipse_swt_events_SelectionListener not written");
-}
-
-public void test_setFontLorg_eclipse_swt_graphics_Font() {
- // overridden from Control because it does not make sense
- // to set the font of a Sash.
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_widgets_Sash((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_CompositeI");
- methodNames.addElement("test_addSelectionListenerLorg_eclipse_swt_events_SelectionListener");
- methodNames.addElement("test_computeSizeIIZ");
- methodNames.addElement("test_removeSelectionListenerLorg_eclipse_swt_events_SelectionListener");
- methodNames.addAll(Test_org_eclipse_swt_widgets_Control.methodNames()); // add superclass method names
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_CompositeI")) test_ConstructorLorg_eclipse_swt_widgets_CompositeI();
- else if (getName().equals("test_addSelectionListenerLorg_eclipse_swt_events_SelectionListener")) test_addSelectionListenerLorg_eclipse_swt_events_SelectionListener();
- else if (getName().equals("test_computeSizeIIZ")) test_computeSizeIIZ();
- else if (getName().equals("test_removeSelectionListenerLorg_eclipse_swt_events_SelectionListener")) test_removeSelectionListenerLorg_eclipse_swt_events_SelectionListener();
- else super.runTest();
-}
-
-/* custom */
-Sash sash;
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Scale.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Scale.java
deleted file mode 100644
index 4023671733..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Scale.java
+++ /dev/null
@@ -1,646 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import junit.framework.*;
-import junit.textui.*;
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.widgets.Scale
- *
- * @see org.eclipse.swt.widgets.Scale
- */
-public class Test_org_eclipse_swt_widgets_Scale extends Test_org_eclipse_swt_widgets_Control {
-
-public Test_org_eclipse_swt_widgets_Scale(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- super.setUp();
- scale = new Scale(shell, 0);
- setWidget(scale);
-}
-
-protected void tearDown() {
- super.tearDown();
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_CompositeI() {
- try {
- scale = new Scale(null, 0);
- fail("No exception occurred"); //should never get here
- }
- catch (IllegalArgumentException e) {
- }
-
- int[] cases = {0, SWT.HORIZONTAL, SWT.VERTICAL};
- for (int i = 0; i < cases.length; i++)
- scale = new Scale(shell, cases[i]);
-}
-
-public void test_addSelectionListenerLorg_eclipse_swt_events_SelectionListener() {
- warnUnimpl("Test test_addSelectionListenerLorg_eclipse_swt_events_SelectionListener not written");
-}
-
-public void test_computeSizeIIZ() {
- warnUnimpl("Test test_computeSizeIIZ not written");
-}
-
-public void test_getIncrement() {
- warnUnimpl("Test test_getIncrement not written");
-}
-
-public void test_getMaximum() {
- warnUnimpl("Test test_getMaximum not written");
-}
-
-public void test_getMinimum() {
- warnUnimpl("Test test_getMinimum not written");
-}
-
-public void test_getPageIncrement() {
- warnUnimpl("Test test_getPageIncrement not written");
-}
-
-public void test_getSelection() {
- warnUnimpl("Test test_getSelection not written");
-}
-
-public void test_removeSelectionListenerLorg_eclipse_swt_events_SelectionListener() {
- warnUnimpl("Test test_removeSelectionListenerLorg_eclipse_swt_events_SelectionListener not written");
-}
-
-public void test_setIncrementI() {
- warnUnimpl("Test test_setIncrementI not written");
-}
-
-public void test_setMaximumI() {
-
- int [][] testValues = getSetMaximumValues();
-
- for (int i = 0; i < testValues.length; i++) {
- int[] intArray = testValues[i];
- setDefaults();
- scale.setMaximum(intArray[0]);
- report("setMaximum", intArray[0], intArray[1], intArray[2], intArray[3]);
- }
-}
-
-public void test_setMinimumI() {
-
-
- int [][] testValues = getSetMinimumValues();
-
- for (int i = 0; i < testValues.length; i++) {
- int[] intArray = testValues[i];
- setDefaults();
- scale.setMinimum(intArray[0]);
- report("setMinimum", intArray[0], intArray[1], intArray[2], intArray[3]);
- }
-}
-
-public void test_setPageIncrementI() {
- warnUnimpl("Test test_setPageIncrementI not written");
-}
-
-public void test_setSelectionI() {
- int [][] testValues = getSetSelectionValues();
- for (int i = 0; i < testValues.length; i++) {
- int[] intArray = testValues[i];
- setDefaults();
- scale.setSelection(intArray[0]);
- report("setSelection", intArray[0], intArray[1], intArray[2], intArray[3]);
- }
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_widgets_Scale((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_CompositeI");
- methodNames.addElement("test_addSelectionListenerLorg_eclipse_swt_events_SelectionListener");
- methodNames.addElement("test_computeSizeIIZ");
- methodNames.addElement("test_getIncrement");
- methodNames.addElement("test_getMaximum");
- methodNames.addElement("test_getMinimum");
- methodNames.addElement("test_getPageIncrement");
- methodNames.addElement("test_getSelection");
- methodNames.addElement("test_removeSelectionListenerLorg_eclipse_swt_events_SelectionListener");
- methodNames.addElement("test_setIncrementI");
- methodNames.addElement("test_setMaximumI");
- methodNames.addElement("test_setMinimumI");
- methodNames.addElement("test_setPageIncrementI");
- methodNames.addElement("test_setSelectionI");
- methodNames.addAll(Test_org_eclipse_swt_widgets_Control.methodNames()); // add superclass method names
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_CompositeI")) test_ConstructorLorg_eclipse_swt_widgets_CompositeI();
- else if (getName().equals("test_addSelectionListenerLorg_eclipse_swt_events_SelectionListener")) test_addSelectionListenerLorg_eclipse_swt_events_SelectionListener();
- else if (getName().equals("test_computeSizeIIZ")) test_computeSizeIIZ();
- else if (getName().equals("test_getIncrement")) test_getIncrement();
- else if (getName().equals("test_getMaximum")) test_getMaximum();
- else if (getName().equals("test_getMinimum")) test_getMinimum();
- else if (getName().equals("test_getPageIncrement")) test_getPageIncrement();
- else if (getName().equals("test_getSelection")) test_getSelection();
- else if (getName().equals("test_removeSelectionListenerLorg_eclipse_swt_events_SelectionListener")) test_removeSelectionListenerLorg_eclipse_swt_events_SelectionListener();
- else if (getName().equals("test_setIncrementI")) test_setIncrementI();
- else if (getName().equals("test_setMaximumI")) test_setMaximumI();
- else if (getName().equals("test_setMinimumI")) test_setMinimumI();
- else if (getName().equals("test_setPageIncrementI")) test_setPageIncrementI();
- else if (getName().equals("test_setSelectionI")) test_setSelectionI();
- else super.runTest();
-}
-
-/* custom */
-public void test_setFontLorg_eclipse_swt_graphics_Font() {
- // overridden from Control because it does not make sense
- // to set the font of a Scale.
-}
-
-Scale scale;
-
-// this method must be private or protected so the auto-gen tool keeps it
-private void report(String call, int set, int minExpected, int maxExpected, int selectionExpected) {
- //Uncomment these lines and comment out call to check() if you want the test to report all errors without
- //stopping.
-
- //if (trackBar.getMinimum() != minExpected)
- //System.out.println(call + "(" + set + "): Minimum Expected: " + minExpected + " Actual: " + trackBar.getMinimum());
- //if (trackBar.getMaximum() != maxExpected)
- //System.out.println(call + "(" + set + "): Maximum Expected: " + maxExpected + " Actual: " + trackBar.getMaximum());
- //if (trackBar.getSelection() != selectionExpected)
- //System.out.println(call + "(" + set + "): Selection Expected: " + selectionExpected + " Actual: " + trackBar.getSelection());
- check(minExpected, maxExpected, selectionExpected);
-}
-// this method must be private or protected so the auto-gen tool keeps it
-private void check(int minExpected, int maxExpected, int selectionExpected) {
- assertEquals(scale.getMaximum(), maxExpected);
- assertEquals(scale.getMinimum(), minExpected);
- assertEquals(scale.getSelection(), selectionExpected);
-}
-// this method must be private or protected so the auto-gen tool keeps it
-private int[][] getSetMinimumValues() {
-return new int[][] {
-{-15, 10, 100, 50, },
-{-14, 10, 100, 50, },
-{-13, 10, 100, 50, },
-{-12, 10, 100, 50, },
-{-11, 10, 100, 50, },
-{-10, 10, 100, 50, },
-{-9, 10, 100, 50, },
-{-8, 10, 100, 50, },
-{-7, 10, 100, 50, },
-{-6, 10, 100, 50, },
-{-5, 10, 100, 50, },
-{-4, 10, 100, 50, },
-{-3, 10, 100, 50, },
-{-2, 10, 100, 50, },
-{-1, 10, 100, 50, },
-{0, 0, 100, 50, },
-{1, 1, 100, 50, },
-{2, 2, 100, 50, },
-{3, 3, 100, 50, },
-{4, 4, 100, 50, },
-{5, 5, 100, 50, },
-{6, 6, 100, 50, },
-{7, 7, 100, 50, },
-{8, 8, 100, 50, },
-{9, 9, 100, 50, },
-{10, 10, 100, 50, },
-{11, 11, 100, 50, },
-{12, 12, 100, 50, },
-{13, 13, 100, 50, },
-{14, 14, 100, 50, },
-{15, 15, 100, 50, },
-{16, 16, 100, 50, },
-{17, 17, 100, 50, },
-{18, 18, 100, 50, },
-{19, 19, 100, 50, },
-{20, 20, 100, 50, },
-{21, 21, 100, 50, },
-{22, 22, 100, 50, },
-{23, 23, 100, 50, },
-{24, 24, 100, 50, },
-{25, 25, 100, 50, },
-{26, 26, 100, 50, },
-{27, 27, 100, 50, },
-{28, 28, 100, 50, },
-{29, 29, 100, 50, },
-{30, 30, 100, 50, },
-{31, 31, 100, 50, },
-{32, 32, 100, 50, },
-{33, 33, 100, 50, },
-{34, 34, 100, 50, },
-{35, 35, 100, 50, },
-{36, 36, 100, 50, },
-{37, 37, 100, 50, },
-{38, 38, 100, 50, },
-{39, 39, 100, 50, },
-{40, 40, 100, 50, },
-{41, 41, 100, 50, },
-{42, 42, 100, 50, },
-{43, 43, 100, 50, },
-{44, 44, 100, 50, },
-{45, 45, 100, 50, },
-{46, 46, 100, 50, },
-{47, 47, 100, 50, },
-{48, 48, 100, 50, },
-{49, 49, 100, 50, },
-{50, 50, 100, 50, },
-{51, 51, 100, 51, },
-{52, 52, 100, 52, },
-{53, 53, 100, 53, },
-{54, 54, 100, 54, },
-{55, 55, 100, 55, },
-{56, 56, 100, 56, },
-{57, 57, 100, 57, },
-{58, 58, 100, 58, },
-{59, 59, 100, 59, },
-{60, 60, 100, 60, },
-{61, 61, 100, 61, },
-{62, 62, 100, 62, },
-{63, 63, 100, 63, },
-{64, 64, 100, 64, },
-{65, 65, 100, 65, },
-{66, 66, 100, 66, },
-{67, 67, 100, 67, },
-{68, 68, 100, 68, },
-{69, 69, 100, 69, },
-{70, 70, 100, 70, },
-{71, 71, 100, 71, },
-{72, 72, 100, 72, },
-{73, 73, 100, 73, },
-{74, 74, 100, 74, },
-{75, 75, 100, 75, },
-{76, 76, 100, 76, },
-{77, 77, 100, 77, },
-{78, 78, 100, 78, },
-{79, 79, 100, 79, },
-{80, 80, 100, 80, },
-{81, 81, 100, 81, },
-{82, 82, 100, 82, },
-{83, 83, 100, 83, },
-{84, 84, 100, 84, },
-{85, 85, 100, 85, },
-{86, 86, 100, 86, },
-{87, 87, 100, 87, },
-{88, 88, 100, 88, },
-{89, 89, 100, 89, },
-{90, 90, 100, 90, },
-{91, 91, 100, 91, },
-{92, 92, 100, 92, },
-{93, 93, 100, 93, },
-{94, 94, 100, 94, },
-{95, 95, 100, 95, },
-{96, 96, 100, 96, },
-{97, 97, 100, 97, },
-{98, 98, 100, 98, },
-{99, 99, 100, 99, },
-{100, 10, 100, 50, },
-{101, 10, 100, 50, },
-{102, 10, 100, 50, },
-{103, 10, 100, 50, },
-{104, 10, 100, 50, },
-{105, 10, 100, 50, },
-{106, 10, 100, 50, },
-{107, 10, 100, 50, },
-{108, 10, 100, 50, },
-{109, 10, 100, 50, },
-{110, 10, 100, 50, },
-{111, 10, 100, 50, },
-{112, 10, 100, 50, },
-{113, 10, 100, 50, },
-{114, 10, 100, 50, },
-{115, 10, 100, 50, },
-{116, 10, 100, 50, },
-{117, 10, 100, 50, },
-{118, 10, 100, 50, },
-{119, 10, 100, 50, },
-{120, 10, 100, 50, },
-{121, 10, 100, 50, },
-{122, 10, 100, 50, },
-{123, 10, 100, 50, },
-{124, 10, 100, 50, },
-};
-}
-// this method must be private or protected so the auto-gen tool keeps it
-private int[][] getSetMaximumValues() {
-return new int[][] {
-{-15, 10, 100, 50, },
-{-14, 10, 100, 50, },
-{-13, 10, 100, 50, },
-{-12, 10, 100, 50, },
-{-11, 10, 100, 50, },
-{-10, 10, 100, 50, },
-{-9, 10, 100, 50, },
-{-8, 10, 100, 50, },
-{-7, 10, 100, 50, },
-{-6, 10, 100, 50, },
-{-5, 10, 100, 50, },
-{-4, 10, 100, 50, },
-{-3, 10, 100, 50, },
-{-2, 10, 100, 50, },
-{-1, 10, 100, 50, },
-{0, 10, 100, 50, },
-{1, 10, 100, 50, },
-{2, 10, 100, 50, },
-{3, 10, 100, 50, },
-{4, 10, 100, 50, },
-{5, 10, 100, 50, },
-{6, 10, 100, 50, },
-{7, 10, 100, 50, },
-{8, 10, 100, 50, },
-{9, 10, 100, 50, },
-{10, 10, 100, 50, },
-{11, 10, 11, 11, },
-{12, 10, 12, 12, },
-{13, 10, 13, 13, },
-{14, 10, 14, 14, },
-{15, 10, 15, 15, },
-{16, 10, 16, 16, },
-{17, 10, 17, 17, },
-{18, 10, 18, 18, },
-{19, 10, 19, 19, },
-{20, 10, 20, 20, },
-{21, 10, 21, 21, },
-{22, 10, 22, 22, },
-{23, 10, 23, 23, },
-{24, 10, 24, 24, },
-{25, 10, 25, 25, },
-{26, 10, 26, 26, },
-{27, 10, 27, 27, },
-{28, 10, 28, 28, },
-{29, 10, 29, 29, },
-{30, 10, 30, 30, },
-{31, 10, 31, 31, },
-{32, 10, 32, 32, },
-{33, 10, 33, 33, },
-{34, 10, 34, 34, },
-{35, 10, 35, 35, },
-{36, 10, 36, 36, },
-{37, 10, 37, 37, },
-{38, 10, 38, 38, },
-{39, 10, 39, 39, },
-{40, 10, 40, 40, },
-{41, 10, 41, 41, },
-{42, 10, 42, 42, },
-{43, 10, 43, 43, },
-{44, 10, 44, 44, },
-{45, 10, 45, 45, },
-{46, 10, 46, 46, },
-{47, 10, 47, 47, },
-{48, 10, 48, 48, },
-{49, 10, 49, 49, },
-{50, 10, 50, 50, },
-{51, 10, 51, 50, },
-{52, 10, 52, 50, },
-{53, 10, 53, 50, },
-{54, 10, 54, 50, },
-{55, 10, 55, 50, },
-{56, 10, 56, 50, },
-{57, 10, 57, 50, },
-{58, 10, 58, 50, },
-{59, 10, 59, 50, },
-{60, 10, 60, 50, },
-{61, 10, 61, 50, },
-{62, 10, 62, 50, },
-{63, 10, 63, 50, },
-{64, 10, 64, 50, },
-{65, 10, 65, 50, },
-{66, 10, 66, 50, },
-{67, 10, 67, 50, },
-{68, 10, 68, 50, },
-{69, 10, 69, 50, },
-{70, 10, 70, 50, },
-{71, 10, 71, 50, },
-{72, 10, 72, 50, },
-{73, 10, 73, 50, },
-{74, 10, 74, 50, },
-{75, 10, 75, 50, },
-{76, 10, 76, 50, },
-{77, 10, 77, 50, },
-{78, 10, 78, 50, },
-{79, 10, 79, 50, },
-{80, 10, 80, 50, },
-{81, 10, 81, 50, },
-{82, 10, 82, 50, },
-{83, 10, 83, 50, },
-{84, 10, 84, 50, },
-{85, 10, 85, 50, },
-{86, 10, 86, 50, },
-{87, 10, 87, 50, },
-{88, 10, 88, 50, },
-{89, 10, 89, 50, },
-{90, 10, 90, 50, },
-{91, 10, 91, 50, },
-{92, 10, 92, 50, },
-{93, 10, 93, 50, },
-{94, 10, 94, 50, },
-{95, 10, 95, 50, },
-{96, 10, 96, 50, },
-{97, 10, 97, 50, },
-{98, 10, 98, 50, },
-{99, 10, 99, 50, },
-{100, 10, 100, 50, },
-{101, 10, 101, 50, },
-{102, 10, 102, 50, },
-{103, 10, 103, 50, },
-{104, 10, 104, 50, },
-{105, 10, 105, 50, },
-{106, 10, 106, 50, },
-{107, 10, 107, 50, },
-{108, 10, 108, 50, },
-{109, 10, 109, 50, },
-{110, 10, 110, 50, },
-{111, 10, 111, 50, },
-{112, 10, 112, 50, },
-{113, 10, 113, 50, },
-{114, 10, 114, 50, },
-{115, 10, 115, 50, },
-{116, 10, 116, 50, },
-{117, 10, 117, 50, },
-{118, 10, 118, 50, },
-{119, 10, 119, 50, },
-{120, 10, 120, 50, },
-{121, 10, 121, 50, },
-{122, 10, 122, 50, },
-{123, 10, 123, 50, },
-{124, 10, 124, 50, },
-};
-}
-// this method must be private or protected so the auto-gen tool keeps it
-private void setDefaults() {
- scale.setMaximum(100);
- scale.setMinimum(10);
- scale.setSelection(50);
-}
-// this method must be private or protected so the auto-gen tool keeps it
-private int[][] getSetSelectionValues() {
-return new int[][] {
-{-15, 10, 100, 10, },
-{-14, 10, 100, 10, },
-{-13, 10, 100, 10, },
-{-12, 10, 100, 10, },
-{-11, 10, 100, 10, },
-{-10, 10, 100, 10, },
-{-9, 10, 100, 10, },
-{-8, 10, 100, 10, },
-{-7, 10, 100, 10, },
-{-6, 10, 100, 10, },
-{-5, 10, 100, 10, },
-{-4, 10, 100, 10, },
-{-3, 10, 100, 10, },
-{-2, 10, 100, 10, },
-{-1, 10, 100, 10, },
-{0, 10, 100, 10, },
-{1, 10, 100, 10, },
-{2, 10, 100, 10, },
-{3, 10, 100, 10, },
-{4, 10, 100, 10, },
-{5, 10, 100, 10, },
-{6, 10, 100, 10, },
-{7, 10, 100, 10, },
-{8, 10, 100, 10, },
-{9, 10, 100, 10, },
-{10, 10, 100, 10, },
-{11, 10, 100, 11, },
-{12, 10, 100, 12, },
-{13, 10, 100, 13, },
-{14, 10, 100, 14, },
-{15, 10, 100, 15, },
-{16, 10, 100, 16, },
-{17, 10, 100, 17, },
-{18, 10, 100, 18, },
-{19, 10, 100, 19, },
-{20, 10, 100, 20, },
-{21, 10, 100, 21, },
-{22, 10, 100, 22, },
-{23, 10, 100, 23, },
-{24, 10, 100, 24, },
-{25, 10, 100, 25, },
-{26, 10, 100, 26, },
-{27, 10, 100, 27, },
-{28, 10, 100, 28, },
-{29, 10, 100, 29, },
-{30, 10, 100, 30, },
-{31, 10, 100, 31, },
-{32, 10, 100, 32, },
-{33, 10, 100, 33, },
-{34, 10, 100, 34, },
-{35, 10, 100, 35, },
-{36, 10, 100, 36, },
-{37, 10, 100, 37, },
-{38, 10, 100, 38, },
-{39, 10, 100, 39, },
-{40, 10, 100, 40, },
-{41, 10, 100, 41, },
-{42, 10, 100, 42, },
-{43, 10, 100, 43, },
-{44, 10, 100, 44, },
-{45, 10, 100, 45, },
-{46, 10, 100, 46, },
-{47, 10, 100, 47, },
-{48, 10, 100, 48, },
-{49, 10, 100, 49, },
-{50, 10, 100, 50, },
-{51, 10, 100, 51, },
-{52, 10, 100, 52, },
-{53, 10, 100, 53, },
-{54, 10, 100, 54, },
-{55, 10, 100, 55, },
-{56, 10, 100, 56, },
-{57, 10, 100, 57, },
-{58, 10, 100, 58, },
-{59, 10, 100, 59, },
-{60, 10, 100, 60, },
-{61, 10, 100, 61, },
-{62, 10, 100, 62, },
-{63, 10, 100, 63, },
-{64, 10, 100, 64, },
-{65, 10, 100, 65, },
-{66, 10, 100, 66, },
-{67, 10, 100, 67, },
-{68, 10, 100, 68, },
-{69, 10, 100, 69, },
-{70, 10, 100, 70, },
-{71, 10, 100, 71, },
-{72, 10, 100, 72, },
-{73, 10, 100, 73, },
-{74, 10, 100, 74, },
-{75, 10, 100, 75, },
-{76, 10, 100, 76, },
-{77, 10, 100, 77, },
-{78, 10, 100, 78, },
-{79, 10, 100, 79, },
-{80, 10, 100, 80, },
-{81, 10, 100, 81, },
-{82, 10, 100, 82, },
-{83, 10, 100, 83, },
-{84, 10, 100, 84, },
-{85, 10, 100, 85, },
-{86, 10, 100, 86, },
-{87, 10, 100, 87, },
-{88, 10, 100, 88, },
-{89, 10, 100, 89, },
-{90, 10, 100, 90, },
-{91, 10, 100, 91, },
-{92, 10, 100, 92, },
-{93, 10, 100, 93, },
-{94, 10, 100, 94, },
-{95, 10, 100, 95, },
-{96, 10, 100, 96, },
-{97, 10, 100, 97, },
-{98, 10, 100, 98, },
-{99, 10, 100, 99, },
-{100, 10, 100, 100, },
-{101, 10, 100, 100, },
-{102, 10, 100, 100, },
-{103, 10, 100, 100, },
-{104, 10, 100, 100, },
-{105, 10, 100, 100, },
-{106, 10, 100, 100, },
-{107, 10, 100, 100, },
-{108, 10, 100, 100, },
-{109, 10, 100, 100, },
-{110, 10, 100, 100, },
-{111, 10, 100, 100, },
-{112, 10, 100, 100, },
-{113, 10, 100, 100, },
-{114, 10, 100, 100, },
-{115, 10, 100, 100, },
-{116, 10, 100, 100, },
-{117, 10, 100, 100, },
-{118, 10, 100, 100, },
-{119, 10, 100, 100, },
-{120, 10, 100, 100, },
-{121, 10, 100, 100, },
-{122, 10, 100, 100, },
-{123, 10, 100, 100, },
-{124, 10, 100, 100, },
-};
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_ScrollBar.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_ScrollBar.java
deleted file mode 100644
index 3c0a95ff03..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_ScrollBar.java
+++ /dev/null
@@ -1,922 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-import org.eclipse.swt.*;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.widgets.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.widgets.ScrollBar
- *
- * @see org.eclipse.swt.widgets.ScrollBar
- */
-public class Test_org_eclipse_swt_widgets_ScrollBar extends Test_org_eclipse_swt_widgets_Widget {
-
-public Test_org_eclipse_swt_widgets_ScrollBar(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- super.setUp();
- canvas = new Canvas(shell, SWT.H_SCROLL);
- scrollBar = canvas.getHorizontalBar();
- canvas.setSize(100,100);
- setWidget(scrollBar);
- shell.pack();
- shell.open();
-}
-
-protected void tearDown() {
- super.tearDown();
-}
-protected String valueString(int[] intArray) {
- return " ("+intArray[1]+","+intArray[2]+","+intArray[3]+","+intArray[4]+")";
-}
-public void test_addSelectionListenerLorg_eclipse_swt_events_SelectionListener() {
- listenerCalled = false;
- boolean exceptionThrown = false;
- SelectionListener listener = new SelectionListener() {
- public void widgetSelected(SelectionEvent event) {
- listenerCalled = true;
- }
- public void widgetDefaultSelected(SelectionEvent event) {
- }
- };
- try {
- scrollBar.addSelectionListener(null);
- }
- catch (IllegalArgumentException e) {
- exceptionThrown = true;
- }
- scrollBar.addSelectionListener(listener);
- scrollBar.setSelection(100);
- assertTrue(":a:", listenerCalled == false);
- scrollBar.removeSelectionListener(listener);
- try {
- scrollBar.removeSelectionListener(null);
- }
- catch (IllegalArgumentException e) {
- exceptionThrown = true;
- }
-}
-
-public void test_dispose() {
- // tested in tearDown
-}
-
-public void test_getEnabled() {
- // tested in test_setEnabled() method
-}
-
-public void test_getIncrement() {
- // tested in test_setIncrement() method
-}
-
-public void test_getMaximum() {
- // tested in test_setMaximum() method
-}
-
-public void test_getMinimum() {
- // tested in test_setMinimum() method
-}
-
-public void test_getPageIncrement() {
- // tested in test_setPageIncrement() method
-}
-
-public void test_getParent() {
- assertEquals(canvas, scrollBar.getParent());
-}
-
-public void test_getSelection() {
- // tested in test_setSelection() method
-}
-
-public void test_getSize() {
- assertTrue(scrollBar.getSize().x > 0);
- assertTrue(scrollBar.getSize().y > 0);
-}
-
-public void test_getThumb() {
- // tested in test_setThumb() method
-}
-
-public void test_getVisible() {
- // tested in test_setVisible() method
-}
-
-public void test_isEnabled() {
- scrollBar.setEnabled(true);
- assertTrue(scrollBar.isEnabled());
-
- scrollBar.setEnabled(false);
- assertTrue(!scrollBar.isEnabled());
-}
-
-public void test_isVisible() {
- scrollBar.setVisible(true);
- assertTrue(scrollBar.isVisible());
- scrollBar.setVisible(false);
- assertTrue(!scrollBar.isVisible());
-}
-
-public void test_removeSelectionListenerLorg_eclipse_swt_events_SelectionListener() {
- // tested in addSelectionListener method
-}
-
-public void test_setEnabledZ() {
- scrollBar.setEnabled(true);
- assertTrue(scrollBar.getEnabled());
-
- scrollBar.setEnabled(false);
- assertTrue(!scrollBar.getEnabled());
-}
-
-public void test_setIncrementI() {
- int[] cases = {1, 10, 10000};
- for (int i=0; i < cases.length; i++)
- {
- scrollBar.setIncrement(cases[i]);
- assertEquals(cases[i], scrollBar.getIncrement());
- }
-
- scrollBar.setIncrement(25);
- scrollBar.setIncrement(0); // setting to 0 fails silently
- assertEquals(25, scrollBar.getIncrement());
-}
-
-public void test_setMaximumI(){
- int [][] testValues = getSetMaximumValues();
-
- for (int i = 0; i < testValues.length; i++) {
- int[] intArray = testValues[i];
- setDefaults();
- scrollBar.setMaximum(intArray[0]);
- String valueString = valueString(intArray);
- report("setMax "+intArray[0]+ valueString, intArray[0], intArray[1], intArray[2], intArray[3], intArray[4]);
- }
-}
-
-public void test_setMinimumI(){
- int [][] testValues = getSetMinimumValues();
-
- for (int i = 0; i < testValues.length; i++) {
- int[] intArray = testValues[i];
- setDefaults();
- scrollBar.setMinimum(intArray[0]);
- String valueString = valueString(intArray);
- report("setMin "+intArray[0]+valueString, intArray[0], intArray[1], intArray[2], intArray[3], intArray[4]);
- }
-}
-
-public void test_setPageIncrementI(){
- int[] cases = {1, 10, 10000};
- for (int i=0; i<cases.length; i++)
- {
- scrollBar.setPageIncrement(cases[i]);
- assertEquals(scrollBar.getPageIncrement(), cases[i]);
- }
-
- scrollBar.setPageIncrement(25);
- scrollBar.setPageIncrement(0); // setting to 0 fails silently
- assertEquals(25, scrollBar.getPageIncrement());
-}
-
-public void test_setSelectionI(){
- int [][] testValues = getSetSelectionValues();
- for (int i = 0; i < testValues.length; i++) {
- int[] intArray = testValues[i];
- setDefaults();
- scrollBar.setSelection(intArray[0]);
- String valueString = valueString(intArray);
- report("setSel "+intArray[0]+valueString,intArray[0], intArray[1], intArray[2], intArray[3], intArray[4]);
- }
-}
-
-public void test_setThumbI(){
- int [][] testValues = getSetThumbValues();
- for (int i = 0; i < testValues.length; i++) {
- int[] intArray = testValues[i];
- setDefaults();
- scrollBar.setThumb(intArray[0]);
- String valueString = valueString(intArray);
- report("setThmb "+intArray[0]+valueString,intArray[0], intArray[1], intArray[2], intArray[3], intArray[4]);
- }
-}
-
-public void test_setValuesIIIIII() {
- scrollBar.setValues(10, 10, 50, 2, 5, 10);
- assertTrue(":a:", scrollBar.getSelection() == 10);
- assertTrue(":b:", scrollBar.getMinimum() == 10);
- assertTrue(":c:", scrollBar.getMaximum() == 50);
- assertTrue(":d:", scrollBar.getThumb() == 2);
- assertTrue(":e:", scrollBar.getIncrement() == 5);
- assertTrue(":f:", scrollBar.getPageIncrement() == 10);
-}
-
-public void test_setVisibleZ() {
- scrollBar.setVisible(true);
- assertTrue(scrollBar.getVisible());
-
- scrollBar.setVisible(false);
- assertTrue(!scrollBar.getVisible());
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_widgets_ScrollBar((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_addSelectionListenerLorg_eclipse_swt_events_SelectionListener");
- methodNames.addElement("test_dispose");
- methodNames.addElement("test_getEnabled");
- methodNames.addElement("test_getIncrement");
- methodNames.addElement("test_getMaximum");
- methodNames.addElement("test_getMinimum");
- methodNames.addElement("test_getPageIncrement");
- methodNames.addElement("test_getParent");
- methodNames.addElement("test_getSelection");
- methodNames.addElement("test_getSize");
- methodNames.addElement("test_getThumb");
- methodNames.addElement("test_getVisible");
- methodNames.addElement("test_isEnabled");
- methodNames.addElement("test_isVisible");
- methodNames.addElement("test_removeSelectionListenerLorg_eclipse_swt_events_SelectionListener");
- methodNames.addElement("test_setEnabledZ");
- methodNames.addElement("test_setIncrementI");
- methodNames.addElement("test_setMaximumI");
- methodNames.addElement("test_setMinimumI");
- methodNames.addElement("test_setPageIncrementI");
- methodNames.addElement("test_setSelectionI");
- methodNames.addElement("test_setThumbI");
- methodNames.addElement("test_setValuesIIIIII");
- methodNames.addElement("test_setVisibleZ");
- methodNames.addAll(Test_org_eclipse_swt_widgets_Widget.methodNames()); // add superclass method names
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_addSelectionListenerLorg_eclipse_swt_events_SelectionListener")) test_addSelectionListenerLorg_eclipse_swt_events_SelectionListener();
- else if (getName().equals("test_dispose")) test_dispose();
- else if (getName().equals("test_getEnabled")) test_getEnabled();
- else if (getName().equals("test_getIncrement")) test_getIncrement();
- else if (getName().equals("test_getMaximum")) test_getMaximum();
- else if (getName().equals("test_getMinimum")) test_getMinimum();
- else if (getName().equals("test_getPageIncrement")) test_getPageIncrement();
- else if (getName().equals("test_getParent")) test_getParent();
- else if (getName().equals("test_getSelection")) test_getSelection();
- else if (getName().equals("test_getSize")) test_getSize();
- else if (getName().equals("test_getThumb")) test_getThumb();
- else if (getName().equals("test_getVisible")) test_getVisible();
- else if (getName().equals("test_isEnabled")) test_isEnabled();
- else if (getName().equals("test_isVisible")) test_isVisible();
- else if (getName().equals("test_removeSelectionListenerLorg_eclipse_swt_events_SelectionListener")) test_removeSelectionListenerLorg_eclipse_swt_events_SelectionListener();
- else if (getName().equals("test_setEnabledZ")) test_setEnabledZ();
- else if (getName().equals("test_setIncrementI")) test_setIncrementI();
- else if (getName().equals("test_setMaximumI")) test_setMaximumI();
- else if (getName().equals("test_setMinimumI")) test_setMinimumI();
- else if (getName().equals("test_setPageIncrementI")) test_setPageIncrementI();
- else if (getName().equals("test_setSelectionI")) test_setSelectionI();
- else if (getName().equals("test_setThumbI")) test_setThumbI();
- else if (getName().equals("test_setValuesIIIIII")) test_setValuesIIIIII();
- else if (getName().equals("test_setVisibleZ")) test_setVisibleZ();
- else super.runTest();
-}
-
-/* custom */
-ScrollBar scrollBar;
-Canvas canvas;
-
-// this method must be private or protected so the auto-gen tool keeps it
-private void report(String call, int set, int minExpected, int maxExpected, int selectionExpected, int thumbExpected) {
- // Uncomment these lines and comment out call to check() if you want the test to report all errors without
- // stopping.
-// if (scrollBar.getMinimum() != minExpected) {
-// System.out.println(call + " : Minimum Expected: " + minExpected + " Actual: " + scrollBar.getMinimum());
-// }
-// if (scrollBar.getMaximum() != maxExpected){
-// System.out.println(call + " : Maximum Expected: " + maxExpected + " Actual: " + scrollBar.getMaximum());
-// }
-// if (scrollBar.getSelection() != selectionExpected) {
-// System.out.println(call + " : Selection Expected: " + selectionExpected + " Actual: " + scrollBar.getSelection());
-// }
-// if (scrollBar.getThumb() != thumbExpected) {
-// System.out.println(call + " : Thumb Expected: " + thumbExpected + " Actual: " + scrollBar.getThumb());
-// }
- check(call, minExpected, maxExpected, selectionExpected, thumbExpected);
-}
-// this method must be private or protected so the auto-gen tool keeps it
-private void check(String call, int minExpected, int maxExpected, int selectionExpected, int thumbExpected) {
- assertEquals(call+" max ", maxExpected, scrollBar.getMaximum());
- assertEquals(call+" min ", minExpected, scrollBar.getMinimum());
- assertEquals(call+" sel ", selectionExpected, scrollBar.getSelection());
- assertEquals(call+" thmb ", thumbExpected, scrollBar.getThumb());
-}
-// this method must be private or protected so the auto-gen tool keeps it
-private int[][] getSetThumbValues() {
-return new int[][] {
-{-15, 10, 100, 50, 10},
-{-14, 10, 100, 50, 10},
-{-13, 10, 100, 50, 10},
-{-12, 10, 100, 50, 10},
-{-11, 10, 100, 50, 10},
-{-10, 10, 100, 50, 10},
-{-9, 10, 100, 50, 10},
-{-8, 10, 100, 50, 10},
-{-7, 10, 100, 50, 10},
-{-6, 10, 100, 50, 10},
-{-5, 10, 100, 50, 10},
-{-4, 10, 100, 50, 10},
-{-3, 10, 100, 50, 10},
-{-2, 10, 100, 50, 10},
-{-1, 10, 100, 50, 10},
-{0, 10, 100, 50, 10},
-{1, 10, 100, 50, 1},
-{2, 10, 100, 50, 2},
-{3, 10, 100, 50, 3},
-{4, 10, 100, 50, 4},
-{5, 10, 100, 50, 5},
-{6, 10, 100, 50, 6},
-{7, 10, 100, 50, 7},
-{8, 10, 100, 50, 8},
-{9, 10, 100, 50, 9},
-{10, 10, 100, 50, 10},
-{11, 10, 100, 50, 11},
-{12, 10, 100, 50, 12},
-{13, 10, 100, 50, 13},
-{14, 10, 100, 50, 14},
-{15, 10, 100, 50, 15},
-{16, 10, 100, 50, 16},
-{17, 10, 100, 50, 17},
-{18, 10, 100, 50, 18},
-{19, 10, 100, 50, 19},
-{20, 10, 100, 50, 20},
-{21, 10, 100, 50, 21},
-{22, 10, 100, 50, 22},
-{23, 10, 100, 50, 23},
-{24, 10, 100, 50, 24},
-{25, 10, 100, 50, 25},
-{26, 10, 100, 50, 26},
-{27, 10, 100, 50, 27},
-{28, 10, 100, 50, 28},
-{29, 10, 100, 50, 29},
-{30, 10, 100, 50, 30},
-{31, 10, 100, 50, 31},
-{32, 10, 100, 50, 32},
-{33, 10, 100, 50, 33},
-{34, 10, 100, 50, 34},
-{35, 10, 100, 50, 35},
-{36, 10, 100, 50, 36},
-{37, 10, 100, 50, 37},
-{38, 10, 100, 50, 38},
-{39, 10, 100, 50, 39},
-{40, 10, 100, 50, 40},
-{41, 10, 100, 50, 41},
-{42, 10, 100, 50, 42},
-{43, 10, 100, 50, 43},
-{44, 10, 100, 50, 44},
-{45, 10, 100, 50, 45},
-{46, 10, 100, 50, 46},
-{47, 10, 100, 50, 47},
-{48, 10, 100, 50, 48},
-{49, 10, 100, 50, 49},
-{50, 10, 100, 50, 50},
-{51, 10, 100, 49, 51},
-{52, 10, 100, 48, 52},
-{53, 10, 100, 47, 53},
-{54, 10, 100, 46, 54},
-{55, 10, 100, 45, 55},
-{56, 10, 100, 44, 56},
-{57, 10, 100, 43, 57},
-{58, 10, 100, 42, 58},
-{59, 10, 100, 41, 59},
-{60, 10, 100, 40, 60},
-{61, 10, 100, 39, 61},
-{62, 10, 100, 38, 62},
-{63, 10, 100, 37, 63},
-{64, 10, 100, 36, 64},
-{65, 10, 100, 35, 65},
-{66, 10, 100, 34, 66},
-{67, 10, 100, 33, 67},
-{68, 10, 100, 32, 68},
-{69, 10, 100, 31, 69},
-{70, 10, 100, 30, 70},
-{71, 10, 100, 29, 71},
-{72, 10, 100, 28, 72},
-{73, 10, 100, 27, 73},
-{74, 10, 100, 26, 74},
-{75, 10, 100, 25, 75},
-{76, 10, 100, 24, 76},
-{77, 10, 100, 23, 77},
-{78, 10, 100, 22, 78},
-{79, 10, 100, 21, 79},
-{80, 10, 100, 20, 80},
-{81, 10, 100, 19, 81},
-{82, 10, 100, 18, 82},
-{83, 10, 100, 17, 83},
-{84, 10, 100, 16, 84},
-{85, 10, 100, 15, 85},
-{86, 10, 100, 14, 86},
-{87, 10, 100, 13, 87},
-{88, 10, 100, 12, 88},
-{89, 10, 100, 11, 89},
-{90, 10, 100, 10, 90},
-{91, 10, 100, 10, 90},
-{92, 10, 100, 10, 90},
-{93, 10, 100, 10, 90},
-{94, 10, 100, 10, 90},
-{95, 10, 100, 10, 90},
-{96, 10, 100, 10, 90},
-{97, 10, 100, 10, 90},
-{98, 10, 100, 10, 90},
-{99, 10, 100, 10, 90},
-{100, 10, 100, 10, 90},
-{101, 10, 100, 10, 90},
-{102, 10, 100, 10, 90},
-{103, 10, 100, 10, 90},
-{104, 10, 100, 10, 90},
-{105, 10, 100, 10, 90},
-{106, 10, 100, 10, 90},
-{107, 10, 100, 10, 90},
-{108, 10, 100, 10, 90},
-{109, 10, 100, 10, 90},
-{110, 10, 100, 10, 90},
-{111, 10, 100, 10, 90},
-{112, 10, 100, 10, 90},
-{113, 10, 100, 10, 90},
-{114, 10, 100, 10, 90},
-{115, 10, 100, 10, 90},
-{116, 10, 100, 10, 90},
-{117, 10, 100, 10, 90},
-{118, 10, 100, 10, 90},
-{119, 10, 100, 10, 90},
-{120, 10, 100, 10, 90},
-{121, 10, 100, 10, 90},
-{122, 10, 100, 10, 90},
-{123, 10, 100, 10, 90},
-{124, 10, 100, 10, 90},
-};
-}
-// this method must be private or protected so the auto-gen tool keeps it
-private int[][] getSetMinimumValues() {
-return new int[][] {
-{-15, 10, 100, 50, 10},
-{-14, 10, 100, 50, 10},
-{-13, 10, 100, 50, 10},
-{-12, 10, 100, 50, 10},
-{-11, 10, 100, 50, 10},
-{-10, 10, 100, 50, 10},
-{-9, 10, 100, 50, 10},
-{-8, 10, 100, 50, 10},
-{-7, 10, 100, 50, 10},
-{-6, 10, 100, 50, 10},
-{-5, 10, 100, 50, 10},
-{-4, 10, 100, 50, 10},
-{-3, 10, 100, 50, 10},
-{-2, 10, 100, 50, 10},
-{-1, 10, 100, 50, 10},
-{0, 0, 100, 50, 10},
-{1, 1, 100, 50, 10},
-{2, 2, 100, 50, 10},
-{3, 3, 100, 50, 10},
-{4, 4, 100, 50, 10},
-{5, 5, 100, 50, 10},
-{6, 6, 100, 50, 10},
-{7, 7, 100, 50, 10},
-{8, 8, 100, 50, 10},
-{9, 9, 100, 50, 10},
-{10, 10, 100, 50, 10},
-{11, 11, 100, 50, 10},
-{12, 12, 100, 50, 10},
-{13, 13, 100, 50, 10},
-{14, 14, 100, 50, 10},
-{15, 15, 100, 50, 10},
-{16, 16, 100, 50, 10},
-{17, 17, 100, 50, 10},
-{18, 18, 100, 50, 10},
-{19, 19, 100, 50, 10},
-{20, 20, 100, 50, 10},
-{21, 21, 100, 50, 10},
-{22, 22, 100, 50, 10},
-{23, 23, 100, 50, 10},
-{24, 24, 100, 50, 10},
-{25, 25, 100, 50, 10},
-{26, 26, 100, 50, 10},
-{27, 27, 100, 50, 10},
-{28, 28, 100, 50, 10},
-{29, 29, 100, 50, 10},
-{30, 30, 100, 50, 10},
-{31, 31, 100, 50, 10},
-{32, 32, 100, 50, 10},
-{33, 33, 100, 50, 10},
-{34, 34, 100, 50, 10},
-{35, 35, 100, 50, 10},
-{36, 36, 100, 50, 10},
-{37, 37, 100, 50, 10},
-{38, 38, 100, 50, 10},
-{39, 39, 100, 50, 10},
-{40, 40, 100, 50, 10},
-{41, 41, 100, 50, 10},
-{42, 42, 100, 50, 10},
-{43, 43, 100, 50, 10},
-{44, 44, 100, 50, 10},
-{45, 45, 100, 50, 10},
-{46, 46, 100, 50, 10},
-{47, 47, 100, 50, 10},
-{48, 48, 100, 50, 10},
-{49, 49, 100, 50, 10},
-{50, 50, 100, 50, 10},
-{51, 51, 100, 51, 10},
-{52, 52, 100, 52, 10},
-{53, 53, 100, 53, 10},
-{54, 54, 100, 54, 10},
-{55, 55, 100, 55, 10},
-{56, 56, 100, 56, 10},
-{57, 57, 100, 57, 10},
-{58, 58, 100, 58, 10},
-{59, 59, 100, 59, 10},
-{60, 60, 100, 60, 10},
-{61, 61, 100, 61, 10},
-{62, 62, 100, 62, 10},
-{63, 63, 100, 63, 10},
-{64, 64, 100, 64, 10},
-{65, 65, 100, 65, 10},
-{66, 66, 100, 66, 10},
-{67, 67, 100, 67, 10},
-{68, 68, 100, 68, 10},
-{69, 69, 100, 69, 10},
-{70, 70, 100, 70, 10},
-{71, 71, 100, 71, 10},
-{72, 72, 100, 72, 10},
-{73, 73, 100, 73, 10},
-{74, 74, 100, 74, 10},
-{75, 75, 100, 75, 10},
-{76, 76, 100, 76, 10},
-{77, 77, 100, 77, 10},
-{78, 78, 100, 78, 10},
-{79, 79, 100, 79, 10},
-{80, 80, 100, 80, 10},
-{81, 81, 100, 81, 10},
-{82, 82, 100, 82, 10},
-{83, 83, 100, 83, 10},
-{84, 84, 100, 84, 10},
-{85, 85, 100, 85, 10},
-{86, 86, 100, 86, 10},
-{87, 87, 100, 87, 10},
-{88, 88, 100, 88, 10},
-{89, 89, 100, 89, 10},
-{90, 90, 100, 90, 10},
-{91, 91, 100, 91, 9},
-{92, 92, 100, 92, 8},
-{93, 93, 100, 93, 7},
-{94, 94, 100, 94, 6},
-{95, 95, 100, 95, 5},
-{96, 96, 100, 96, 4},
-{97, 97, 100, 97, 3},
-{98, 98, 100, 98, 2},
-{99, 99, 100, 99, 1},
-{100, 10, 100, 50, 10},
-{101, 10, 100, 50, 10},
-{102, 10, 100, 50, 10},
-{103, 10, 100, 50, 10},
-{104, 10, 100, 50, 10},
-{105, 10, 100, 50, 10},
-{106, 10, 100, 50, 10},
-{107, 10, 100, 50, 10},
-{108, 10, 100, 50, 10},
-{109, 10, 100, 50, 10},
-{110, 10, 100, 50, 10},
-{111, 10, 100, 50, 10},
-{112, 10, 100, 50, 10},
-{113, 10, 100, 50, 10},
-{114, 10, 100, 50, 10},
-{115, 10, 100, 50, 10},
-{116, 10, 100, 50, 10},
-{117, 10, 100, 50, 10},
-{118, 10, 100, 50, 10},
-{119, 10, 100, 50, 10},
-{120, 10, 100, 50, 10},
-{121, 10, 100, 50, 10},
-{122, 10, 100, 50, 10},
-{123, 10, 100, 50, 10},
-{124, 10, 100, 50, 10},
-};
-}
-// this method must be private or protected so the auto-gen tool keeps it
-private int[][] getSetMaximumValues() {
-return new int[][] {
-{-15, 10, 100, 50, 10},
-{-14, 10, 100, 50, 10},
-{-13, 10, 100, 50, 10},
-{-12, 10, 100, 50, 10},
-{-11, 10, 100, 50, 10},
-{-10, 10, 100, 50, 10},
-{-9, 10, 100, 50, 10},
-{-8, 10, 100, 50, 10},
-{-7, 10, 100, 50, 10},
-{-6, 10, 100, 50, 10},
-{-5, 10, 100, 50, 10},
-{-4, 10, 100, 50, 10},
-{-3, 10, 100, 50, 10},
-{-2, 10, 100, 50, 10},
-{-1, 10, 100, 50, 10},
-{0, 10, 100, 50, 10},
-{1, 10, 100, 50, 10},
-{2, 10, 100, 50, 10},
-{3, 10, 100, 50, 10},
-{4, 10, 100, 50, 10},
-{5, 10, 100, 50, 10},
-{6, 10, 100, 50, 10},
-{7, 10, 100, 50, 10},
-{8, 10, 100, 50, 10},
-{9, 10, 100, 50, 10},
-{10, 10, 100, 50, 10},
-{11, 10, 11, 10, 1},
-{12, 10, 12, 10, 2},
-{13, 10, 13, 10, 3},
-{14, 10, 14, 10, 4},
-{15, 10, 15, 10, 5},
-{16, 10, 16, 10, 6},
-{17, 10, 17, 10, 7},
-{18, 10, 18, 10, 8},
-{19, 10, 19, 10, 9},
-{20, 10, 20, 10, 10},
-{21, 10, 21, 11, 10},
-{22, 10, 22, 12, 10},
-{23, 10, 23, 13, 10},
-{24, 10, 24, 14, 10},
-{25, 10, 25, 15, 10},
-{26, 10, 26, 16, 10},
-{27, 10, 27, 17, 10},
-{28, 10, 28, 18, 10},
-{29, 10, 29, 19, 10},
-{30, 10, 30, 20, 10},
-{31, 10, 31, 21, 10},
-{32, 10, 32, 22, 10},
-{33, 10, 33, 23, 10},
-{34, 10, 34, 24, 10},
-{35, 10, 35, 25, 10},
-{36, 10, 36, 26, 10},
-{37, 10, 37, 27, 10},
-{38, 10, 38, 28, 10},
-{39, 10, 39, 29, 10},
-{40, 10, 40, 30, 10},
-{41, 10, 41, 31, 10},
-{42, 10, 42, 32, 10},
-{43, 10, 43, 33, 10},
-{44, 10, 44, 34, 10},
-{45, 10, 45, 35, 10},
-{46, 10, 46, 36, 10},
-{47, 10, 47, 37, 10},
-{48, 10, 48, 38, 10},
-{49, 10, 49, 39, 10},
-{50, 10, 50, 40, 10},
-{51, 10, 51, 41, 10},
-{52, 10, 52, 42, 10},
-{53, 10, 53, 43, 10},
-{54, 10, 54, 44, 10},
-{55, 10, 55, 45, 10},
-{56, 10, 56, 46, 10},
-{57, 10, 57, 47, 10},
-{58, 10, 58, 48, 10},
-{59, 10, 59, 49, 10},
-{60, 10, 60, 50, 10},
-{61, 10, 61, 50, 10},
-{62, 10, 62, 50, 10},
-{63, 10, 63, 50, 10},
-{64, 10, 64, 50, 10},
-{65, 10, 65, 50, 10},
-{66, 10, 66, 50, 10},
-{67, 10, 67, 50, 10},
-{68, 10, 68, 50, 10},
-{69, 10, 69, 50, 10},
-{70, 10, 70, 50, 10},
-{71, 10, 71, 50, 10},
-{72, 10, 72, 50, 10},
-{73, 10, 73, 50, 10},
-{74, 10, 74, 50, 10},
-{75, 10, 75, 50, 10},
-{76, 10, 76, 50, 10},
-{77, 10, 77, 50, 10},
-{78, 10, 78, 50, 10},
-{79, 10, 79, 50, 10},
-{80, 10, 80, 50, 10},
-{81, 10, 81, 50, 10},
-{82, 10, 82, 50, 10},
-{83, 10, 83, 50, 10},
-{84, 10, 84, 50, 10},
-{85, 10, 85, 50, 10},
-{86, 10, 86, 50, 10},
-{87, 10, 87, 50, 10},
-{88, 10, 88, 50, 10},
-{89, 10, 89, 50, 10},
-{90, 10, 90, 50, 10},
-{91, 10, 91, 50, 10},
-{92, 10, 92, 50, 10},
-{93, 10, 93, 50, 10},
-{94, 10, 94, 50, 10},
-{95, 10, 95, 50, 10},
-{96, 10, 96, 50, 10},
-{97, 10, 97, 50, 10},
-{98, 10, 98, 50, 10},
-{99, 10, 99, 50, 10},
-{100, 10, 100, 50, 10},
-{101, 10, 101, 50, 10},
-{102, 10, 102, 50, 10},
-{103, 10, 103, 50, 10},
-{104, 10, 104, 50, 10},
-{105, 10, 105, 50, 10},
-{106, 10, 106, 50, 10},
-{107, 10, 107, 50, 10},
-{108, 10, 108, 50, 10},
-{109, 10, 109, 50, 10},
-{110, 10, 110, 50, 10},
-{111, 10, 111, 50, 10},
-{112, 10, 112, 50, 10},
-{113, 10, 113, 50, 10},
-{114, 10, 114, 50, 10},
-{115, 10, 115, 50, 10},
-{116, 10, 116, 50, 10},
-{117, 10, 117, 50, 10},
-{118, 10, 118, 50, 10},
-{119, 10, 119, 50, 10},
-{120, 10, 120, 50, 10},
-{121, 10, 121, 50, 10},
-{122, 10, 122, 50, 10},
-{123, 10, 123, 50, 10},
-{124, 10, 124, 50, 10},
-};
-}
-// this method must be private or protected so the auto-gen tool keeps it
-private void setDefaults() {
- scrollBar.setMaximum(100);
- scrollBar.setMinimum(10);
- scrollBar.setThumb(10);
- scrollBar.setSelection(50);
-}
-// this method must be private or protected so the auto-gen tool keeps it
-private int[][] getSetSelectionValues() {
-return new int[][] {
-{-15, 10, 100, 10, 10},
-{-14, 10, 100, 10, 10},
-{-13, 10, 100, 10, 10},
-{-12, 10, 100, 10, 10},
-{-11, 10, 100, 10, 10},
-{-10, 10, 100, 10, 10},
-{-9, 10, 100, 10, 10},
-{-8, 10, 100, 10, 10},
-{-7, 10, 100, 10, 10},
-{-6, 10, 100, 10, 10},
-{-5, 10, 100, 10, 10},
-{-4, 10, 100, 10, 10},
-{-3, 10, 100, 10, 10},
-{-2, 10, 100, 10, 10},
-{-1, 10, 100, 10, 10},
-{0, 10, 100, 10, 10},
-{1, 10, 100, 10, 10},
-{2, 10, 100, 10, 10},
-{3, 10, 100, 10, 10},
-{4, 10, 100, 10, 10},
-{5, 10, 100, 10, 10},
-{6, 10, 100, 10, 10},
-{7, 10, 100, 10, 10},
-{8, 10, 100, 10, 10},
-{9, 10, 100, 10, 10},
-{10, 10, 100, 10, 10},
-{11, 10, 100, 11, 10},
-{12, 10, 100, 12, 10},
-{13, 10, 100, 13, 10},
-{14, 10, 100, 14, 10},
-{15, 10, 100, 15, 10},
-{16, 10, 100, 16, 10},
-{17, 10, 100, 17, 10},
-{18, 10, 100, 18, 10},
-{19, 10, 100, 19, 10},
-{20, 10, 100, 20, 10},
-{21, 10, 100, 21, 10},
-{22, 10, 100, 22, 10},
-{23, 10, 100, 23, 10},
-{24, 10, 100, 24, 10},
-{25, 10, 100, 25, 10},
-{26, 10, 100, 26, 10},
-{27, 10, 100, 27, 10},
-{28, 10, 100, 28, 10},
-{29, 10, 100, 29, 10},
-{30, 10, 100, 30, 10},
-{31, 10, 100, 31, 10},
-{32, 10, 100, 32, 10},
-{33, 10, 100, 33, 10},
-{34, 10, 100, 34, 10},
-{35, 10, 100, 35, 10},
-{36, 10, 100, 36, 10},
-{37, 10, 100, 37, 10},
-{38, 10, 100, 38, 10},
-{39, 10, 100, 39, 10},
-{40, 10, 100, 40, 10},
-{41, 10, 100, 41, 10},
-{42, 10, 100, 42, 10},
-{43, 10, 100, 43, 10},
-{44, 10, 100, 44, 10},
-{45, 10, 100, 45, 10},
-{46, 10, 100, 46, 10},
-{47, 10, 100, 47, 10},
-{48, 10, 100, 48, 10},
-{49, 10, 100, 49, 10},
-{50, 10, 100, 50, 10},
-{51, 10, 100, 51, 10},
-{52, 10, 100, 52, 10},
-{53, 10, 100, 53, 10},
-{54, 10, 100, 54, 10},
-{55, 10, 100, 55, 10},
-{56, 10, 100, 56, 10},
-{57, 10, 100, 57, 10},
-{58, 10, 100, 58, 10},
-{59, 10, 100, 59, 10},
-{60, 10, 100, 60, 10},
-{61, 10, 100, 61, 10},
-{62, 10, 100, 62, 10},
-{63, 10, 100, 63, 10},
-{64, 10, 100, 64, 10},
-{65, 10, 100, 65, 10},
-{66, 10, 100, 66, 10},
-{67, 10, 100, 67, 10},
-{68, 10, 100, 68, 10},
-{69, 10, 100, 69, 10},
-{70, 10, 100, 70, 10},
-{71, 10, 100, 71, 10},
-{72, 10, 100, 72, 10},
-{73, 10, 100, 73, 10},
-{74, 10, 100, 74, 10},
-{75, 10, 100, 75, 10},
-{76, 10, 100, 76, 10},
-{77, 10, 100, 77, 10},
-{78, 10, 100, 78, 10},
-{79, 10, 100, 79, 10},
-{80, 10, 100, 80, 10},
-{81, 10, 100, 81, 10},
-{82, 10, 100, 82, 10},
-{83, 10, 100, 83, 10},
-{84, 10, 100, 84, 10},
-{85, 10, 100, 85, 10},
-{86, 10, 100, 86, 10},
-{87, 10, 100, 87, 10},
-{88, 10, 100, 88, 10},
-{89, 10, 100, 89, 10},
-{90, 10, 100, 90, 10},
-{91, 10, 100, 90, 10},
-{92, 10, 100, 90, 10},
-{93, 10, 100, 90, 10},
-{94, 10, 100, 90, 10},
-{95, 10, 100, 90, 10},
-{96, 10, 100, 90, 10},
-{97, 10, 100, 90, 10},
-{98, 10, 100, 90, 10},
-{99, 10, 100, 90, 10},
-{100, 10, 100, 90, 10},
-{101, 10, 100, 90, 10},
-{102, 10, 100, 90, 10},
-{103, 10, 100, 90, 10},
-{104, 10, 100, 90, 10},
-{105, 10, 100, 90, 10},
-{106, 10, 100, 90, 10},
-{107, 10, 100, 90, 10},
-{108, 10, 100, 90, 10},
-{109, 10, 100, 90, 10},
-{110, 10, 100, 90, 10},
-{111, 10, 100, 90, 10},
-{112, 10, 100, 90, 10},
-{113, 10, 100, 90, 10},
-{114, 10, 100, 90, 10},
-{115, 10, 100, 90, 10},
-{116, 10, 100, 90, 10},
-{117, 10, 100, 90, 10},
-{118, 10, 100, 90, 10},
-{119, 10, 100, 90, 10},
-{120, 10, 100, 90, 10},
-{121, 10, 100, 90, 10},
-{122, 10, 100, 90, 10},
-{123, 10, 100, 90, 10},
-{124, 10, 100, 90, 10},
-};
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Scrollable.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Scrollable.java
deleted file mode 100644
index 08b7469c99..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Scrollable.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-import org.eclipse.swt.widgets.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.widgets.Scrollable
- *
- * @see org.eclipse.swt.widgets.Scrollable
- */
-public class Test_org_eclipse_swt_widgets_Scrollable extends Test_org_eclipse_swt_widgets_Control {
-
-public Test_org_eclipse_swt_widgets_Scrollable(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- super.setUp();
-}
-
-protected void tearDown() {
- super.tearDown();
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_CompositeI() {
- // abstract class
-}
-
-public void test_computeTrimIIII() {
- scrollable.computeTrim(0, 0, 0, 0);
-}
-
-public void test_getClientArea() {
- scrollable.getClientArea();
-}
-
-public void test_getHorizontalBar() {
- ScrollBar hbar = scrollable.getHorizontalBar();
-}
-
-public void test_getVerticalBar() {
- ScrollBar vbar = scrollable.getVerticalBar();
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_widgets_Scrollable((String)e.nextElement()));
- }
- return suite;
-}
-
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_CompositeI");
- methodNames.addElement("test_computeTrimIIII");
- methodNames.addElement("test_getClientArea");
- methodNames.addElement("test_getHorizontalBar");
- methodNames.addElement("test_getVerticalBar");
- methodNames.addAll(Test_org_eclipse_swt_widgets_Control.methodNames()); // add superclass method names
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_CompositeI")) test_ConstructorLorg_eclipse_swt_widgets_CompositeI();
- else if (getName().equals("test_computeTrimIIII")) test_computeTrimIIII();
- else if (getName().equals("test_getClientArea")) test_getClientArea();
- else if (getName().equals("test_getHorizontalBar")) test_getHorizontalBar();
- else if (getName().equals("test_getVerticalBar")) test_getVerticalBar();
- else super.runTest();
-}
-
-/* custom */
- Scrollable scrollable;
-
-protected void setWidget(Widget w) {
- scrollable = (Scrollable)w;
- super.setWidget(w);
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Shell.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Shell.java
deleted file mode 100644
index 1fc62f72b5..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Shell.java
+++ /dev/null
@@ -1,523 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.widgets.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.widgets.Shell
- *
- * @see org.eclipse.swt.widgets.Shell
- */
-public class Test_org_eclipse_swt_widgets_Shell extends Test_org_eclipse_swt_widgets_Decorations {
-
-public Test_org_eclipse_swt_widgets_Shell(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- super.setUp();
- testShell = new Shell(shell, SWT.NULL);
- setWidget(shell);
- assertTrue(testShell.getParent() == shell);
-}
-
-protected void tearDown() {
- super.tearDown();
-}
-
-public void test_Constructor() {
- Shell newShell = new Shell();
- assertNotNull("a: ", newShell.getDisplay());
- newShell.dispose();
-}
-
-public void test_ConstructorI() {
- /* this should test various combinations of STYLE bits, for now just test individual bits */
- int[] cases = {SWT.NO_TRIM, SWT.RESIZE, SWT.TITLE, SWT.CLOSE, SWT.MENU, SWT.MIN, SWT.BORDER,
- SWT.CLIP_CHILDREN, SWT.CLIP_SIBLINGS, SWT.ON_TOP, SWT.FLAT, SWT.SMOOTH};
- Shell newShell;
- for (int i = 0; i < cases.length; i++) {
- newShell = new Shell(cases[i]);
- assertTrue("a " +i, newShell.getDisplay() == shell.getDisplay());
- newShell.dispose();
- }
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_Display() {
- Display display = shell.getDisplay();
- Shell newShell = new Shell(display);
- assertTrue("a: ", newShell.getDisplay() == display);
- newShell.dispose();
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_DisplayI() {
- int[] cases = {SWT.NO_TRIM, SWT.RESIZE, SWT.TITLE, SWT.CLOSE, SWT.MENU, SWT.MIN, SWT.BORDER,
- SWT.CLIP_CHILDREN, SWT.CLIP_SIBLINGS, SWT.ON_TOP, SWT.FLAT, SWT.SMOOTH};
- Shell newShell;
- Display display = shell.getDisplay();
- for (int i = 0; i < cases.length; i++) {
- newShell = new Shell(display, cases[i]);
- assertTrue("a " +i, newShell.getDisplay() == shell.getDisplay());
- newShell.dispose();
- }
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_Shell() {
- Shell newShell = new Shell(shell);
- assertTrue("a: ", newShell.getParent() == shell);
- newShell.dispose();
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_ShellI() {
- /* this should test various combinations of STYLE bits, for now just test individual bits */
- int[] cases = {SWT.NO_TRIM, SWT.RESIZE, SWT.TITLE, SWT.CLOSE, SWT.MENU, SWT.MIN, SWT.BORDER,
- SWT.CLIP_CHILDREN, SWT.CLIP_SIBLINGS, SWT.ON_TOP, SWT.FLAT, SWT.SMOOTH};
- Shell newShell;
- for (int i = 0; i < cases.length; i++) {
- newShell = new Shell(shell, cases[i]);
- assertTrue("a " +i, newShell.getParent() == shell);
- newShell.dispose();
- }
-}
-
-public void test_addShellListenerLorg_eclipse_swt_events_ShellListener() {
- listenerCalled = false;
- boolean exceptionThrown = false;
- ShellListener listener = new ShellListener() {
- public void shellActivated(ShellEvent e) {
- listenerCalled = true;
- }
- public void shellClosed(ShellEvent e) {
- }
- public void shellDeactivated(ShellEvent e) {
- }
- public void shellDeiconified(ShellEvent e) {
- }
- public void shellIconified(ShellEvent e) {
- }
- };
- try {
- shell.addShellListener(null);
- }
- catch (IllegalArgumentException e) {
- exceptionThrown = true;
- }
- shell.addShellListener(listener);
- shell.forceActive();
- /* can't assume listener is synchronously called when forceActive returned */
- /* assertTrue(":a:", listenerCalled == true); */
-
- listenerCalled = false;
- shell.removeShellListener(listener);
- shell.forceActive();
- /* can't assume listener is synchronously called when forceActive returned */
- /* assertTrue(":b:", listenerCalled == false); */
- try {
- shell.removeShellListener(null);
- }
- catch (IllegalArgumentException e) {
- exceptionThrown = true;
- }
-}
-
-public void test_close() {
-
- // bogus line that 'enabled' gpfs
- // Shell newShell = new Shell();
- testShell.setBounds(20,30,200, 200);
- testShell.open();
- testShell.close();
- shell.setBounds(20,30,200, 200);
- shell.open();
-}
-
-public void test_dispose() {
- Shell newShell = new Shell();
- newShell.dispose();
-}
-
-public void test_forceActive() {
- shell.forceActive();
- /* can't assume listener is synchronously called when forceActive returned */
- /* assertTrue(":a:", shell.getDisplay().getActiveShell() == shell); */
-}
-
-public void test_getBounds() {
- // tested in test_setBoundsIIII and test_setBoundsLorg_eclipse_swt_graphics_Rectangle
-}
-
-public void test_getEnabled() {
- assertTrue(":a0:", shell.getEnabled());
- shell.setEnabled(false);
- assertTrue(":a:", !shell.getEnabled());
- shell.setEnabled(true);
- assertTrue(":b:", shell.getEnabled());
-}
-
-public void test_getImeInputMode() {
- int mode = shell.getImeInputMode();
- assertTrue(":a:", mode >= 0);
-}
-
-public void test_getLocation() {
- shell.setLocation(10,15);
- assertTrue(":a:", shell.getLocation().x == 10);
- assertTrue(":b:", shell.getLocation().y == 15);
-}
-
-public void test_getRegion() {
- // tested in test_setRegion()
-}
-
-public void test_getShell() {
- assertTrue(":a:", shell.getShell()==shell);
- Shell shell_1 = new Shell(shell);
- assertTrue(":b:", shell_1.getShell()== shell_1);
- shell_1.dispose();
-}
-
-public void test_getShells() {
- int num = shell.getShells().length;
- assertTrue(":a:", num == 1);
- Shell shell_1 = new Shell(shell);
- num = shell.getShells().length;
- assertTrue(":a:", num == 2);
- shell_1.dispose();
-}
-
-public void test_isEnabled() {
- assertTrue(":a:", shell.isEnabled());
- shell.setEnabled(false);
- assertTrue(":b:", !shell.isEnabled());
- if (fCheckBogusTestCases)
- assertTrue(":b1:", !testShell.isEnabled());
- shell.setEnabled(true);
- assertTrue(":c:", shell.isEnabled());
- assertTrue(":a:", testShell.isEnabled());
- testShell.setEnabled(false);
- assertTrue(":b:", !testShell.isEnabled());
- testShell.setEnabled(true);
- assertTrue(":c:", testShell.isEnabled());
-}
-
-public void test_open() {
- shell.open();
-}
-
-
-public void test_removeShellListenerLorg_eclipse_swt_events_ShellListener() {
- // tested in removeShellListener method
-}
-
-public void test_setActive() {
- shell.setActive();
- assertTrue(":a:", shell.getDisplay().getActiveShell() == shell);
-}
-
-public void test_setEnabledZ() {
- // tested in getEnabled method
-}
-
-public void test_setImeInputModeI() {
- shell.setImeInputMode(SWT.NONE);
- assertTrue(":a:", shell.getImeInputMode() == SWT.NONE);
-}
-
-public void test_setRegionLorg_eclipse_swt_graphics_Region() {
- warnUnimpl("Test test_setRegionLorg_eclipse_swt_graphics_Region not written");
-}
-
-public void test_setVisibleZ() {
- shell.setVisible(false);
- assertTrue(":a:", !shell.isVisible());
- shell.setVisible(true);
- assertTrue(":b:", shell.isVisible());
-}
-
-public void test_win32_newLorg_eclipse_swt_widgets_DisplayI() {
- warnUnimpl("Test test_win32_newLorg_eclipse_swt_widgets_DisplayI not written");
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_widgets_Shell((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_Constructor");
- methodNames.addElement("test_ConstructorI");
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_Display");
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_DisplayI");
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_Shell");
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_ShellI");
- methodNames.addElement("test_addShellListenerLorg_eclipse_swt_events_ShellListener");
- methodNames.addElement("test_close");
- methodNames.addElement("test_dispose");
- methodNames.addElement("test_forceActive");
- methodNames.addElement("test_getBounds");
- methodNames.addElement("test_getEnabled");
- methodNames.addElement("test_getImeInputMode");
- methodNames.addElement("test_getLocation");
- methodNames.addElement("test_getRegion");
- methodNames.addElement("test_getShell");
- methodNames.addElement("test_getShells");
- methodNames.addElement("test_isEnabled");
- methodNames.addElement("test_open");
- methodNames.addElement("test_removeShellListenerLorg_eclipse_swt_events_ShellListener");
- methodNames.addElement("test_setActive");
- methodNames.addElement("test_setEnabledZ");
- methodNames.addElement("test_setImeInputModeI");
- methodNames.addElement("test_setRegionLorg_eclipse_swt_graphics_Region");
- methodNames.addElement("test_setVisibleZ");
- methodNames.addElement("test_win32_newLorg_eclipse_swt_widgets_DisplayI");
- methodNames.addAll(Test_org_eclipse_swt_widgets_Decorations.methodNames()); // add superclass method names
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_Constructor")) test_Constructor();
- else if (getName().equals("test_ConstructorI")) test_ConstructorI();
- else if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_Display")) test_ConstructorLorg_eclipse_swt_widgets_Display();
- else if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_DisplayI")) test_ConstructorLorg_eclipse_swt_widgets_DisplayI();
- else if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_Shell")) test_ConstructorLorg_eclipse_swt_widgets_Shell();
- else if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_ShellI")) test_ConstructorLorg_eclipse_swt_widgets_ShellI();
- else if (getName().equals("test_addShellListenerLorg_eclipse_swt_events_ShellListener")) test_addShellListenerLorg_eclipse_swt_events_ShellListener();
- else if (getName().equals("test_close")) test_close();
- else if (getName().equals("test_dispose")) test_dispose();
- else if (getName().equals("test_forceActive")) test_forceActive();
- else if (getName().equals("test_getBounds")) test_getBounds();
- else if (getName().equals("test_getEnabled")) test_getEnabled();
- else if (getName().equals("test_getImeInputMode")) test_getImeInputMode();
- else if (getName().equals("test_getLocation")) test_getLocation();
- else if (getName().equals("test_getRegion")) test_getRegion();
- else if (getName().equals("test_getShell")) test_getShell();
- else if (getName().equals("test_getShells")) test_getShells();
- else if (getName().equals("test_isEnabled")) test_isEnabled();
- else if (getName().equals("test_open")) test_open();
- else if (getName().equals("test_removeShellListenerLorg_eclipse_swt_events_ShellListener")) test_removeShellListenerLorg_eclipse_swt_events_ShellListener();
- else if (getName().equals("test_setActive")) test_setActive();
- else if (getName().equals("test_setEnabledZ")) test_setEnabledZ();
- else if (getName().equals("test_setImeInputModeI")) test_setImeInputModeI();
- else if (getName().equals("test_setRegionLorg_eclipse_swt_graphics_Region")) test_setRegionLorg_eclipse_swt_graphics_Region();
- else if (getName().equals("test_setVisibleZ")) test_setVisibleZ();
- else if (getName().equals("test_win32_newLorg_eclipse_swt_widgets_DisplayI")) test_win32_newLorg_eclipse_swt_widgets_DisplayI();
- else super.runTest();
-}
-
-/* custom */
-public void test_getParent () {
- // overriding Control.test_getParent
- assertTrue(shell.getParent()==null);
- assertTrue(testShell.getParent() == shell);
-}
-
-public void test_getStyle() {
- // overriding Widget.test_getStyle
- assertTrue("testShell not modeless", (testShell.getStyle () & SWT.MODELESS) == SWT.MODELESS);
- int[] cases = {SWT.MODELESS, SWT.PRIMARY_MODAL, SWT.APPLICATION_MODAL, SWT.SYSTEM_MODAL};
- for (int i = 0; i < cases.length; i++) {
- Shell testShell2 = new Shell(shell, cases[i]);
- assertTrue("shell " + i, (testShell2.getStyle () & cases[i]) == cases[i]);
- testShell2.dispose();
- }
-}
-
-public void test_isVisible() {
- // overriding Control.test_isVisible
- testShell.setVisible(true);
- assertTrue(testShell.isVisible());
- shell.setVisible(true);
- assertTrue(shell.isVisible());
-
- testShell.setVisible(true);
- shell.setVisible(true);
- assertTrue("shell.isVisible() a:", shell.isVisible());
- shell.setVisible(false);
- assertTrue("shell.isVisible() b:", !shell.isVisible());
- if (fCheckBogusTestCases)
- assertTrue("testShell.isVisible() c:", !testShell.isVisible());
-}
-
-public void test_setBoundsIIII() {
- // overridden from Control because Shells have a minimum size
-}
-
-public void test_setBoundsLorg_eclipse_swt_graphics_Rectangle() {
- // overridden from Control because Shells have a minimum size
-// /* windows */
-// /* note that there is a minimum size for a shell, this test will fail if p1.x < 112 or p1.y < 27 */
-// /* note that there is a maximum size for a shell, this test will fail if p1.x > 1292 or p1.y > 1036 */
-// if (SwtJunit.isWindows) {
-// Point p1 = new Point(112, 27);
-// Rectangle r1 = new Rectangle(20, 30, p1.x, p1.y);
-// Rectangle r2;
-// for (int i = 0; i < 11; i++) {
-// testShell.setBounds(r1);
-// r2 = testShell.getBounds();
-// assert("child shell iteration " + i + " set=" + r1 + " get=" + r2, r1.equals(r2));
-// r1.width += 100;
-// r1.height += 100;
-// }
-// r1 = new Rectangle(20, 30, p1.x, p1.y);
-// for (int i = 0; i < 11; i++) {
-// shell.setBounds(r1);
-// r2 = shell.getBounds();
-// assert("parent shell iteration " + i + " set=" + r1 + " get=" + r2, r1.equals(r2));
-// r1.width += 100;
-// r1.height += 100;
-// }
-// }
-// /* motif */
-// /* note that there is a minimum size for a shell, this test will fail if p1.x < 112 or p1.y < 27 */
-// /* note that there is a maximum size for a shell, this test will fail if p1.x > 1292 or p1.y > 1036 */
-// if (SwtJunit.isMotif) {
-// Point p1 = new Point(15,35);
-// Rectangle r1 = new Rectangle(20, 30, p1.x, p1.y);
-// Rectangle r2;
-//
-// for (int i = 0; i < 15; i++) {
-// testShell.setBounds(r1);
-// r2 = testShell.getBounds();
-// assert("child shell iteration " + i + " set=" + r1 + " get=" + r2, r1.equals(r2));
-// r1.width += 100;
-// r1.height += 100;
-// }
-// r1 = new Rectangle(50, 50, p1.x, p1.y);
-// for (int i = 0; i < 11; i++) {
-// shell.setBounds(r1);
-// r2 = shell.getBounds();
-// assert("parent shell iteration " + i + " set=" + r1 + " get=" + r2, r1.equals(r2));
-// r1.width += 100;
-// r1.height += 100;
-// }
-// }
-}
-public void test_setRegion() {
- Region region = new Region();
- region.add(new Rectangle(10, 20, 100, 200));
- // test shell without style SWT.NO_TRIM
- assertTrue(":a:", shell.getRegion() == null);
- shell.setRegion(region);
- assertTrue(":b:", shell.getRegion() == null);
- shell.setRegion(null);
- assertTrue(":c:", shell.getRegion() == null);
- // test shell with style SWT.NO_TRIM
- Display display = shell.getDisplay();
- Shell shell2 = new Shell(display, SWT.NO_TRIM);
- assertTrue(":d:", shell2.getRegion() == null);
- shell2.setRegion(region);
- assertTrue(":e:", shell2.getRegion().handle == region.handle);
- region.dispose();
- assertTrue(":f:", shell2.getRegion().isDisposed());
- shell2.setRegion(null);
- assertTrue(":g:", shell2.getRegion() == null);
-}
-public void test_setSizeII() {
- /* windows */
- /* note that there is a minimum size for a shell, this test will fail if p1.x < 112 or p1.y < 27 */
- /* note that there is a maximum size for a shell, this test will fail if p1.x > 1292 or p1.y > 1036 */
- if (SwtJunit.isWindows) {
- Point newSize = new Point(112, 27);
- for (int i = 0; i < 10; i++) {
- testShell.setSize(newSize.x, newSize.y);
- assertEquals(newSize, testShell.getSize());
- newSize.x += 100;
- newSize.y += 100;
- }
- newSize = new Point(1292, 1036);
- for (int i = 0; i < 10; i++) {
- testShell.setSize(newSize.x, newSize.y);
- assertEquals(newSize, testShell.getSize());
- newSize.x -= 100;
- newSize.y -= 100;
- }
- }
-
- /* motif */
- /* note that there is a minimum size for a shell, this test will fail if p1.x < ?? or p1.y < ?? */
- /* note that there is a maximum size for a shell, this test will fail if p1.x > ?? or p1.y > ?? */
- if (SwtJunit.isMotif) {
- Point newSize = new Point(2, 2);
- for (int i = 0; i < 10; i++) {
- testShell.setSize(newSize.x, newSize.y);
- assertEquals(newSize, testShell.getSize());
- newSize.x += 100;
- newSize.y += 100;
- }
- newSize = new Point(1600, 1600);
- for (int i = 0; i < 10; i++) {
- testShell.setSize(newSize.x, newSize.y);
- assertEquals(newSize, testShell.getSize());
- newSize.x -= 100;
- newSize.y -= 100;
- }
- }
-}
-
-public void test_setSizeLorg_eclipse_swt_graphics_Point() {
- /* windows */
- /* note that there is a minimum size for a shell, this test will fail if p1.x < 112 or p1.y < 27 */
- /* note that there is a maximum size for a shell, this test will fail if p1.x > 1292 or p1.y > 1036 */
- if (SwtJunit.isWindows) {
- Point newSize = new Point(112, 27);
- for (int i = 0; i < 10; i++) {
- testShell.setSize(newSize);
- assertEquals(newSize, testShell.getSize());
- newSize.x += 100;
- newSize.y += 100;
- }
- newSize = new Point(1292, 1036);
- for (int i = 0; i < 10; i++) {
- testShell.setSize(newSize);
- assertEquals(newSize, testShell.getSize());
- newSize.x -= 100;
- newSize.y -= 100;
- }
- }
-
- /* motif */
- /* note that there is a minimum size for a shell, this test will fail if p1.x < ?? or p1.y < ?? */
- /* note that there is a maximum size for a shell, this test will fail if p1.x > ?? or p1.y > ?? */
- if (SwtJunit.isMotif) {
- Point newSize = new Point(2, 2);
- for (int i = 0; i < 10; i++) {
- testShell.setSize(newSize);
- assertEquals(newSize, testShell.getSize());
- newSize.x += 100;
- newSize.y += 100;
- }
- newSize = new Point(1600, 1600);
- for (int i = 0; i < 10; i++) {
- testShell.setSize(newSize);
- assertEquals(newSize, testShell.getSize());
- newSize.x -= 100;
- newSize.y -= 100;
- }
- }
-}
-
-Shell testShell;
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Slider.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Slider.java
deleted file mode 100644
index a5011a4fb0..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Slider.java
+++ /dev/null
@@ -1,909 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.widgets.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.widgets.Slider
- *
- * @see org.eclipse.swt.widgets.Slider
- */
-public class Test_org_eclipse_swt_widgets_Slider extends Test_org_eclipse_swt_widgets_Control {
-
-public Test_org_eclipse_swt_widgets_Slider(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- super.setUp();
- slider = new Slider(shell, 0);
- setWidget(slider);
-}
-
-protected void tearDown() {
- super.tearDown();
-}
-protected String valueString(int[] intArray) {
- return " ("+intArray[1]+","+intArray[2]+","+intArray[3]+","+intArray[4]+")";
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_CompositeI() {
- try {
- slider = new Slider(null, 0);
- fail("No exception thrown for parent == null");
- }
- catch (IllegalArgumentException e) {
- }
-
- int[] cases = {0, SWT.HORIZONTAL, SWT.VERTICAL};
- for (int i = 0; i < cases.length; i++)
- slider = new Slider(shell, cases[i]);
-}
-
-public void test_addSelectionListenerLorg_eclipse_swt_events_SelectionListener() {
- listenerCalled = false;
- boolean exceptionThrown = false;
- SelectionListener listener = new SelectionListener() {
- public void widgetSelected(SelectionEvent event) {
- listenerCalled = true;
- }
- public void widgetDefaultSelected(SelectionEvent event) {
- }
- };
- try {
- slider.addSelectionListener(null);
- }
- catch (IllegalArgumentException e) {
- exceptionThrown = true;
- }
- slider.addSelectionListener(listener);
- slider.setSelection(0);
- assertTrue(":a:", listenerCalled == false);
- slider.removeSelectionListener(listener);
- try {
- slider.removeSelectionListener(null);
- }
- catch (IllegalArgumentException e) {
- exceptionThrown = true;
- }
-}
-
-public void test_computeSizeIIZ() {
- // super class method sufficient test
-}
-
-public void test_getEnabled() {
- // tested in setEnabled method
-}
-
-public void test_getIncrement() {
- int[] cases = {1, 10, 10000};
- for (int i=0; i<cases.length; i++)
- {
- slider.setIncrement(cases[i]);
- assertTrue("case: " + String.valueOf(i), slider.getIncrement()==cases[i]);
- }
-}
-
-public void test_getMaximum() {
- slider.setMaximum(2000);
- assertTrue(":a:", slider.getMaximum() == 2000);
- slider.setMaximum(20);
- assertTrue(":b:", slider.getMaximum() == 20);
- slider.setMaximum(-1);
- assertTrue(":c:", slider.getMaximum() == 20);
- slider.setMaximum(0);
- assertTrue(":d:", slider.getMaximum() == 20);
- slider.setMaximum(10);
- assertTrue(":d:", slider.getMaximum() == 10);
-}
-
-public void test_getMinimum() {
- slider.setMinimum(5);
- assertTrue(":a:", slider.getMinimum() == 5);
- slider.setMinimum(20);
- assertTrue(":b:", slider.getMinimum() == 20);
- slider.setMinimum(-1);
- assertTrue(":c:", slider.getMinimum() == 20);
- slider.setMinimum(0);
- assertTrue(":d:", slider.getMinimum() == 0);
- slider.setMinimum(10);
- assertTrue(":d:", slider.getMinimum() == 10);
-}
-
-public void test_getPageIncrement() {
- int[] cases = {1, 10, 10000};
- for (int i=0; i<cases.length; i++)
- {
- slider.setPageIncrement(cases[i]);
- assertTrue("case: " + String.valueOf(i), slider.getPageIncrement()==cases[i]);
- }
-}
-
-public void test_getSelection() {
- slider.setSelection(10);
- assertTrue(":a:", slider.getSelection()== 10);
-
-}
-
-public void test_getThumb() {
- // tested in test_setThumb() method
-}
-
-public void test_removeSelectionListenerLorg_eclipse_swt_events_SelectionListener() {
- // tested in addSelectionListener method
-}
-
-public void test_setEnabledZ() {
- slider.setEnabled(true);
- assertTrue(slider.getEnabled());
- slider.setEnabled(false);
- assertEquals(slider.getEnabled(), false);
-}
-
-public void test_setIncrementI() {
- // tested in getIncrement method
-}
-
-public void test_setMaximumI() {
-
- int [][] testValues = getSetMaximumValues();
-
- for (int i = 0; i < testValues.length; i++) {
- int[] intArray = testValues[i];
- setDefaults();
- slider.setMaximum(intArray[0]);
- String valueString = valueString(intArray);
- report("setMax "+intArray[0]+ valueString, intArray[0], intArray[1], intArray[2], intArray[3], intArray[4]);
- }
-}
-
-public void test_setMinimumI() {
-
- int [][] testValues = getSetMinimumValues();
-
- for (int i = 0; i < testValues.length; i++) {
- int[] intArray = testValues[i];
- setDefaults();
- slider.setMinimum(intArray[0]);
- String valueString = valueString(intArray);
- report("setMin "+intArray[0]+valueString, intArray[0], intArray[1], intArray[2], intArray[3], intArray[4]);
- }
-}
-
-public void test_setPageIncrementI() {
- slider.setPageIncrement(3);
- assertTrue(":a:", slider.getPageIncrement()== 3);
-}
-
-public void test_setSelectionI() {
- int [][] testValues = getSetSelectionValues();
- for (int i = 0; i < testValues.length; i++) {
- int[] intArray = testValues[i];
- setDefaults();
- slider.setSelection(intArray[0]);
- String valueString = valueString(intArray);
- report("setSel "+intArray[0]+valueString,intArray[0], intArray[1], intArray[2], intArray[3], intArray[4]);
- }
-}
-
-public void test_setThumbI() {
-
- int [][] testValues = getSetThumbValues();
-
- for (int i = 0; i < testValues.length; i++) {
- int[] intArray = testValues[i];
- setDefaults();
- slider.setThumb(intArray[0]);
- String valueString = valueString(intArray);
- report("setThmb "+intArray[0]+valueString,intArray[0], intArray[1], intArray[2], intArray[3], intArray[4]);
- }
-}
-
-public void test_setValuesIIIIII() {
- slider.setValues(10, 10, 50, 2, 5, 10);
- assertTrue(":a:", slider.getSelection() == 10);
- assertTrue(":b:", slider.getMinimum() == 10);
- assertTrue(":c:", slider.getMaximum() == 50);
- assertTrue(":d:", slider.getThumb() == 2);
- assertTrue(":e:", slider.getIncrement() == 5);
- assertTrue(":f:", slider.getPageIncrement() == 10);
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_widgets_Slider((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_CompositeI");
- methodNames.addElement("test_addSelectionListenerLorg_eclipse_swt_events_SelectionListener");
- methodNames.addElement("test_computeSizeIIZ");
- methodNames.addElement("test_getEnabled");
- methodNames.addElement("test_getIncrement");
- methodNames.addElement("test_getMaximum");
- methodNames.addElement("test_getMinimum");
- methodNames.addElement("test_getPageIncrement");
- methodNames.addElement("test_getSelection");
- methodNames.addElement("test_getThumb");
- methodNames.addElement("test_removeSelectionListenerLorg_eclipse_swt_events_SelectionListener");
- methodNames.addElement("test_setEnabledZ");
- methodNames.addElement("test_setIncrementI");
- methodNames.addElement("test_setMaximumI");
- methodNames.addElement("test_setMinimumI");
- methodNames.addElement("test_setPageIncrementI");
- methodNames.addElement("test_setSelectionI");
- methodNames.addElement("test_setThumbI");
- methodNames.addElement("test_setValuesIIIIII");
- methodNames.addAll(Test_org_eclipse_swt_widgets_Control.methodNames()); // add superclass method names
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_CompositeI")) test_ConstructorLorg_eclipse_swt_widgets_CompositeI();
- else if (getName().equals("test_addSelectionListenerLorg_eclipse_swt_events_SelectionListener")) test_addSelectionListenerLorg_eclipse_swt_events_SelectionListener();
- else if (getName().equals("test_computeSizeIIZ")) test_computeSizeIIZ();
- else if (getName().equals("test_getEnabled")) test_getEnabled();
- else if (getName().equals("test_getIncrement")) test_getIncrement();
- else if (getName().equals("test_getMaximum")) test_getMaximum();
- else if (getName().equals("test_getMinimum")) test_getMinimum();
- else if (getName().equals("test_getPageIncrement")) test_getPageIncrement();
- else if (getName().equals("test_getSelection")) test_getSelection();
- else if (getName().equals("test_getThumb")) test_getThumb();
- else if (getName().equals("test_removeSelectionListenerLorg_eclipse_swt_events_SelectionListener")) test_removeSelectionListenerLorg_eclipse_swt_events_SelectionListener();
- else if (getName().equals("test_setEnabledZ")) test_setEnabledZ();
- else if (getName().equals("test_setIncrementI")) test_setIncrementI();
- else if (getName().equals("test_setMaximumI")) test_setMaximumI();
- else if (getName().equals("test_setMinimumI")) test_setMinimumI();
- else if (getName().equals("test_setPageIncrementI")) test_setPageIncrementI();
- else if (getName().equals("test_setSelectionI")) test_setSelectionI();
- else if (getName().equals("test_setThumbI")) test_setThumbI();
- else if (getName().equals("test_setValuesIIIIII")) test_setValuesIIIIII();
- else super.runTest();
-}
-
-/* custom */
-public void test_setFontLorg_eclipse_swt_graphics_Font() {
- // overridden from Control because it does not make sense
- // to set the font of a Slider.
-}
-
-Slider slider;
-
-// this method must be private or protected so the auto-gen tool keeps it
-private void report(String call, int set, int minExpected, int maxExpected, int selectionExpected, int thumbExpected) {
- // Uncomment these lines and comment out call to check() if you want the test to report all errors without
- // stopping.
-// if (slider.getMinimum() != minExpected) {
-// System.out.println(call + " : Minimum Expected: " + minExpected + " Actual: " + slider.getMinimum());
-// }
-// if (slider.getMaximum() != maxExpected){
-// System.out.println(call + " : Maximum Expected: " + maxExpected + " Actual: " + slider.getMaximum());
-// }
-// if (slider.getSelection() != selectionExpected) {
-// System.out.println(call + " : Selection Expected: " + selectionExpected + " Actual: " + slider.getSelection());
-// }
-// if (slider.getThumb() != thumbExpected) {
-// System.out.println(call + " : Thumb Expected: " + thumbExpected + " Actual: " + slider.getThumb());
-// }
- check(call, minExpected, maxExpected, selectionExpected, thumbExpected);
-}
-// this method must be private or protected so the auto-gen tool keeps it
-private void check(String call, int minExpected, int maxExpected, int selectionExpected, int thumbExpected) {
- assertEquals(call+" max ", maxExpected, slider.getMaximum());
- assertEquals(call+" min ", minExpected, slider.getMinimum());
- assertEquals(call+" sel ", selectionExpected, slider.getSelection());
- assertEquals(call+" thmb ", thumbExpected, slider.getThumb());
-}
-// this method must be private or protected so the auto-gen tool keeps it
-private int[][] getSetThumbValues() {
-return new int[][] {
-{-15, 10, 100, 50, 10},
-{-14, 10, 100, 50, 10},
-{-13, 10, 100, 50, 10},
-{-12, 10, 100, 50, 10},
-{-11, 10, 100, 50, 10},
-{-10, 10, 100, 50, 10},
-{-9, 10, 100, 50, 10},
-{-8, 10, 100, 50, 10},
-{-7, 10, 100, 50, 10},
-{-6, 10, 100, 50, 10},
-{-5, 10, 100, 50, 10},
-{-4, 10, 100, 50, 10},
-{-3, 10, 100, 50, 10},
-{-2, 10, 100, 50, 10},
-{-1, 10, 100, 50, 10},
-{0, 10, 100, 50, 10},
-{1, 10, 100, 50, 1},
-{2, 10, 100, 50, 2},
-{3, 10, 100, 50, 3},
-{4, 10, 100, 50, 4},
-{5, 10, 100, 50, 5},
-{6, 10, 100, 50, 6},
-{7, 10, 100, 50, 7},
-{8, 10, 100, 50, 8},
-{9, 10, 100, 50, 9},
-{10, 10, 100, 50, 10},
-{11, 10, 100, 50, 11},
-{12, 10, 100, 50, 12},
-{13, 10, 100, 50, 13},
-{14, 10, 100, 50, 14},
-{15, 10, 100, 50, 15},
-{16, 10, 100, 50, 16},
-{17, 10, 100, 50, 17},
-{18, 10, 100, 50, 18},
-{19, 10, 100, 50, 19},
-{20, 10, 100, 50, 20},
-{21, 10, 100, 50, 21},
-{22, 10, 100, 50, 22},
-{23, 10, 100, 50, 23},
-{24, 10, 100, 50, 24},
-{25, 10, 100, 50, 25},
-{26, 10, 100, 50, 26},
-{27, 10, 100, 50, 27},
-{28, 10, 100, 50, 28},
-{29, 10, 100, 50, 29},
-{30, 10, 100, 50, 30},
-{31, 10, 100, 50, 31},
-{32, 10, 100, 50, 32},
-{33, 10, 100, 50, 33},
-{34, 10, 100, 50, 34},
-{35, 10, 100, 50, 35},
-{36, 10, 100, 50, 36},
-{37, 10, 100, 50, 37},
-{38, 10, 100, 50, 38},
-{39, 10, 100, 50, 39},
-{40, 10, 100, 50, 40},
-{41, 10, 100, 50, 41},
-{42, 10, 100, 50, 42},
-{43, 10, 100, 50, 43},
-{44, 10, 100, 50, 44},
-{45, 10, 100, 50, 45},
-{46, 10, 100, 50, 46},
-{47, 10, 100, 50, 47},
-{48, 10, 100, 50, 48},
-{49, 10, 100, 50, 49},
-{50, 10, 100, 50, 50},
-{51, 10, 100, 49, 51},
-{52, 10, 100, 48, 52},
-{53, 10, 100, 47, 53},
-{54, 10, 100, 46, 54},
-{55, 10, 100, 45, 55},
-{56, 10, 100, 44, 56},
-{57, 10, 100, 43, 57},
-{58, 10, 100, 42, 58},
-{59, 10, 100, 41, 59},
-{60, 10, 100, 40, 60},
-{61, 10, 100, 39, 61},
-{62, 10, 100, 38, 62},
-{63, 10, 100, 37, 63},
-{64, 10, 100, 36, 64},
-{65, 10, 100, 35, 65},
-{66, 10, 100, 34, 66},
-{67, 10, 100, 33, 67},
-{68, 10, 100, 32, 68},
-{69, 10, 100, 31, 69},
-{70, 10, 100, 30, 70},
-{71, 10, 100, 29, 71},
-{72, 10, 100, 28, 72},
-{73, 10, 100, 27, 73},
-{74, 10, 100, 26, 74},
-{75, 10, 100, 25, 75},
-{76, 10, 100, 24, 76},
-{77, 10, 100, 23, 77},
-{78, 10, 100, 22, 78},
-{79, 10, 100, 21, 79},
-{80, 10, 100, 20, 80},
-{81, 10, 100, 19, 81},
-{82, 10, 100, 18, 82},
-{83, 10, 100, 17, 83},
-{84, 10, 100, 16, 84},
-{85, 10, 100, 15, 85},
-{86, 10, 100, 14, 86},
-{87, 10, 100, 13, 87},
-{88, 10, 100, 12, 88},
-{89, 10, 100, 11, 89},
-{90, 10, 100, 10, 90},
-{91, 10, 100, 10, 90},
-{92, 10, 100, 10, 90},
-{93, 10, 100, 10, 90},
-{94, 10, 100, 10, 90},
-{95, 10, 100, 10, 90},
-{96, 10, 100, 10, 90},
-{97, 10, 100, 10, 90},
-{98, 10, 100, 10, 90},
-{99, 10, 100, 10, 90},
-{100, 10, 100, 10, 90},
-{101, 10, 100, 10, 90},
-{102, 10, 100, 10, 90},
-{103, 10, 100, 10, 90},
-{104, 10, 100, 10, 90},
-{105, 10, 100, 10, 90},
-{106, 10, 100, 10, 90},
-{107, 10, 100, 10, 90},
-{108, 10, 100, 10, 90},
-{109, 10, 100, 10, 90},
-{110, 10, 100, 10, 90},
-{111, 10, 100, 10, 90},
-{112, 10, 100, 10, 90},
-{113, 10, 100, 10, 90},
-{114, 10, 100, 10, 90},
-{115, 10, 100, 10, 90},
-{116, 10, 100, 10, 90},
-{117, 10, 100, 10, 90},
-{118, 10, 100, 10, 90},
-{119, 10, 100, 10, 90},
-{120, 10, 100, 10, 90},
-{121, 10, 100, 10, 90},
-{122, 10, 100, 10, 90},
-{123, 10, 100, 10, 90},
-{124, 10, 100, 10, 90},
-};
-}
-// this method must be private or protected so the auto-gen tool keeps it
-private int[][] getSetMinimumValues() {
-return new int[][] {
-{-15, 10, 100, 50, 10},
-{-14, 10, 100, 50, 10},
-{-13, 10, 100, 50, 10},
-{-12, 10, 100, 50, 10},
-{-11, 10, 100, 50, 10},
-{-10, 10, 100, 50, 10},
-{-9, 10, 100, 50, 10},
-{-8, 10, 100, 50, 10},
-{-7, 10, 100, 50, 10},
-{-6, 10, 100, 50, 10},
-{-5, 10, 100, 50, 10},
-{-4, 10, 100, 50, 10},
-{-3, 10, 100, 50, 10},
-{-2, 10, 100, 50, 10},
-{-1, 10, 100, 50, 10},
-{0, 0, 100, 50, 10},
-{1, 1, 100, 50, 10},
-{2, 2, 100, 50, 10},
-{3, 3, 100, 50, 10},
-{4, 4, 100, 50, 10},
-{5, 5, 100, 50, 10},
-{6, 6, 100, 50, 10},
-{7, 7, 100, 50, 10},
-{8, 8, 100, 50, 10},
-{9, 9, 100, 50, 10},
-{10, 10, 100, 50, 10},
-{11, 11, 100, 50, 10},
-{12, 12, 100, 50, 10},
-{13, 13, 100, 50, 10},
-{14, 14, 100, 50, 10},
-{15, 15, 100, 50, 10},
-{16, 16, 100, 50, 10},
-{17, 17, 100, 50, 10},
-{18, 18, 100, 50, 10},
-{19, 19, 100, 50, 10},
-{20, 20, 100, 50, 10},
-{21, 21, 100, 50, 10},
-{22, 22, 100, 50, 10},
-{23, 23, 100, 50, 10},
-{24, 24, 100, 50, 10},
-{25, 25, 100, 50, 10},
-{26, 26, 100, 50, 10},
-{27, 27, 100, 50, 10},
-{28, 28, 100, 50, 10},
-{29, 29, 100, 50, 10},
-{30, 30, 100, 50, 10},
-{31, 31, 100, 50, 10},
-{32, 32, 100, 50, 10},
-{33, 33, 100, 50, 10},
-{34, 34, 100, 50, 10},
-{35, 35, 100, 50, 10},
-{36, 36, 100, 50, 10},
-{37, 37, 100, 50, 10},
-{38, 38, 100, 50, 10},
-{39, 39, 100, 50, 10},
-{40, 40, 100, 50, 10},
-{41, 41, 100, 50, 10},
-{42, 42, 100, 50, 10},
-{43, 43, 100, 50, 10},
-{44, 44, 100, 50, 10},
-{45, 45, 100, 50, 10},
-{46, 46, 100, 50, 10},
-{47, 47, 100, 50, 10},
-{48, 48, 100, 50, 10},
-{49, 49, 100, 50, 10},
-{50, 50, 100, 50, 10},
-{51, 51, 100, 51, 10},
-{52, 52, 100, 52, 10},
-{53, 53, 100, 53, 10},
-{54, 54, 100, 54, 10},
-{55, 55, 100, 55, 10},
-{56, 56, 100, 56, 10},
-{57, 57, 100, 57, 10},
-{58, 58, 100, 58, 10},
-{59, 59, 100, 59, 10},
-{60, 60, 100, 60, 10},
-{61, 61, 100, 61, 10},
-{62, 62, 100, 62, 10},
-{63, 63, 100, 63, 10},
-{64, 64, 100, 64, 10},
-{65, 65, 100, 65, 10},
-{66, 66, 100, 66, 10},
-{67, 67, 100, 67, 10},
-{68, 68, 100, 68, 10},
-{69, 69, 100, 69, 10},
-{70, 70, 100, 70, 10},
-{71, 71, 100, 71, 10},
-{72, 72, 100, 72, 10},
-{73, 73, 100, 73, 10},
-{74, 74, 100, 74, 10},
-{75, 75, 100, 75, 10},
-{76, 76, 100, 76, 10},
-{77, 77, 100, 77, 10},
-{78, 78, 100, 78, 10},
-{79, 79, 100, 79, 10},
-{80, 80, 100, 80, 10},
-{81, 81, 100, 81, 10},
-{82, 82, 100, 82, 10},
-{83, 83, 100, 83, 10},
-{84, 84, 100, 84, 10},
-{85, 85, 100, 85, 10},
-{86, 86, 100, 86, 10},
-{87, 87, 100, 87, 10},
-{88, 88, 100, 88, 10},
-{89, 89, 100, 89, 10},
-{90, 90, 100, 90, 10},
-{91, 91, 100, 91, 9},
-{92, 92, 100, 92, 8},
-{93, 93, 100, 93, 7},
-{94, 94, 100, 94, 6},
-{95, 95, 100, 95, 5},
-{96, 96, 100, 96, 4},
-{97, 97, 100, 97, 3},
-{98, 98, 100, 98, 2},
-{99, 99, 100, 99, 1},
-{100, 10, 100, 50, 10},
-{101, 10, 100, 50, 10},
-{102, 10, 100, 50, 10},
-{103, 10, 100, 50, 10},
-{104, 10, 100, 50, 10},
-{105, 10, 100, 50, 10},
-{106, 10, 100, 50, 10},
-{107, 10, 100, 50, 10},
-{108, 10, 100, 50, 10},
-{109, 10, 100, 50, 10},
-{110, 10, 100, 50, 10},
-{111, 10, 100, 50, 10},
-{112, 10, 100, 50, 10},
-{113, 10, 100, 50, 10},
-{114, 10, 100, 50, 10},
-{115, 10, 100, 50, 10},
-{116, 10, 100, 50, 10},
-{117, 10, 100, 50, 10},
-{118, 10, 100, 50, 10},
-{119, 10, 100, 50, 10},
-{120, 10, 100, 50, 10},
-{121, 10, 100, 50, 10},
-{122, 10, 100, 50, 10},
-{123, 10, 100, 50, 10},
-{124, 10, 100, 50, 10},
-};
-}
-// this method must be private or protected so the auto-gen tool keeps it
-private int[][] getSetMaximumValues() {
-return new int[][] {
-{-15, 10, 100, 50, 10},
-{-14, 10, 100, 50, 10},
-{-13, 10, 100, 50, 10},
-{-12, 10, 100, 50, 10},
-{-11, 10, 100, 50, 10},
-{-10, 10, 100, 50, 10},
-{-9, 10, 100, 50, 10},
-{-8, 10, 100, 50, 10},
-{-7, 10, 100, 50, 10},
-{-6, 10, 100, 50, 10},
-{-5, 10, 100, 50, 10},
-{-4, 10, 100, 50, 10},
-{-3, 10, 100, 50, 10},
-{-2, 10, 100, 50, 10},
-{-1, 10, 100, 50, 10},
-{0, 10, 100, 50, 10},
-{1, 10, 100, 50, 10},
-{2, 10, 100, 50, 10},
-{3, 10, 100, 50, 10},
-{4, 10, 100, 50, 10},
-{5, 10, 100, 50, 10},
-{6, 10, 100, 50, 10},
-{7, 10, 100, 50, 10},
-{8, 10, 100, 50, 10},
-{9, 10, 100, 50, 10},
-{10, 10, 100, 50, 10},
-{11, 10, 11, 10, 1},
-{12, 10, 12, 10, 2},
-{13, 10, 13, 10, 3},
-{14, 10, 14, 10, 4},
-{15, 10, 15, 10, 5},
-{16, 10, 16, 10, 6},
-{17, 10, 17, 10, 7},
-{18, 10, 18, 10, 8},
-{19, 10, 19, 10, 9},
-{20, 10, 20, 10, 10},
-{21, 10, 21, 11, 10},
-{22, 10, 22, 12, 10},
-{23, 10, 23, 13, 10},
-{24, 10, 24, 14, 10},
-{25, 10, 25, 15, 10},
-{26, 10, 26, 16, 10},
-{27, 10, 27, 17, 10},
-{28, 10, 28, 18, 10},
-{29, 10, 29, 19, 10},
-{30, 10, 30, 20, 10},
-{31, 10, 31, 21, 10},
-{32, 10, 32, 22, 10},
-{33, 10, 33, 23, 10},
-{34, 10, 34, 24, 10},
-{35, 10, 35, 25, 10},
-{36, 10, 36, 26, 10},
-{37, 10, 37, 27, 10},
-{38, 10, 38, 28, 10},
-{39, 10, 39, 29, 10},
-{40, 10, 40, 30, 10},
-{41, 10, 41, 31, 10},
-{42, 10, 42, 32, 10},
-{43, 10, 43, 33, 10},
-{44, 10, 44, 34, 10},
-{45, 10, 45, 35, 10},
-{46, 10, 46, 36, 10},
-{47, 10, 47, 37, 10},
-{48, 10, 48, 38, 10},
-{49, 10, 49, 39, 10},
-{50, 10, 50, 40, 10},
-{51, 10, 51, 41, 10},
-{52, 10, 52, 42, 10},
-{53, 10, 53, 43, 10},
-{54, 10, 54, 44, 10},
-{55, 10, 55, 45, 10},
-{56, 10, 56, 46, 10},
-{57, 10, 57, 47, 10},
-{58, 10, 58, 48, 10},
-{59, 10, 59, 49, 10},
-{60, 10, 60, 50, 10},
-{61, 10, 61, 50, 10},
-{62, 10, 62, 50, 10},
-{63, 10, 63, 50, 10},
-{64, 10, 64, 50, 10},
-{65, 10, 65, 50, 10},
-{66, 10, 66, 50, 10},
-{67, 10, 67, 50, 10},
-{68, 10, 68, 50, 10},
-{69, 10, 69, 50, 10},
-{70, 10, 70, 50, 10},
-{71, 10, 71, 50, 10},
-{72, 10, 72, 50, 10},
-{73, 10, 73, 50, 10},
-{74, 10, 74, 50, 10},
-{75, 10, 75, 50, 10},
-{76, 10, 76, 50, 10},
-{77, 10, 77, 50, 10},
-{78, 10, 78, 50, 10},
-{79, 10, 79, 50, 10},
-{80, 10, 80, 50, 10},
-{81, 10, 81, 50, 10},
-{82, 10, 82, 50, 10},
-{83, 10, 83, 50, 10},
-{84, 10, 84, 50, 10},
-{85, 10, 85, 50, 10},
-{86, 10, 86, 50, 10},
-{87, 10, 87, 50, 10},
-{88, 10, 88, 50, 10},
-{89, 10, 89, 50, 10},
-{90, 10, 90, 50, 10},
-{91, 10, 91, 50, 10},
-{92, 10, 92, 50, 10},
-{93, 10, 93, 50, 10},
-{94, 10, 94, 50, 10},
-{95, 10, 95, 50, 10},
-{96, 10, 96, 50, 10},
-{97, 10, 97, 50, 10},
-{98, 10, 98, 50, 10},
-{99, 10, 99, 50, 10},
-{100, 10, 100, 50, 10},
-{101, 10, 101, 50, 10},
-{102, 10, 102, 50, 10},
-{103, 10, 103, 50, 10},
-{104, 10, 104, 50, 10},
-{105, 10, 105, 50, 10},
-{106, 10, 106, 50, 10},
-{107, 10, 107, 50, 10},
-{108, 10, 108, 50, 10},
-{109, 10, 109, 50, 10},
-{110, 10, 110, 50, 10},
-{111, 10, 111, 50, 10},
-{112, 10, 112, 50, 10},
-{113, 10, 113, 50, 10},
-{114, 10, 114, 50, 10},
-{115, 10, 115, 50, 10},
-{116, 10, 116, 50, 10},
-{117, 10, 117, 50, 10},
-{118, 10, 118, 50, 10},
-{119, 10, 119, 50, 10},
-{120, 10, 120, 50, 10},
-{121, 10, 121, 50, 10},
-{122, 10, 122, 50, 10},
-{123, 10, 123, 50, 10},
-{124, 10, 124, 50, 10},
-};
-}
-// this method must be private or protected so the auto-gen tool keeps it
-private void setDefaults() {
-
- slider.setMaximum(100);
- slider.setMinimum(10);
- slider.setThumb(10);
- slider.setSelection(50);
-
-}
-// this method must be private or protected so the auto-gen tool keeps it
-private int[][] getSetSelectionValues() {
-return new int[][] {
-{-15, 10, 100, 10, 10},
-{-14, 10, 100, 10, 10},
-{-13, 10, 100, 10, 10},
-{-12, 10, 100, 10, 10},
-{-11, 10, 100, 10, 10},
-{-10, 10, 100, 10, 10},
-{-9, 10, 100, 10, 10},
-{-8, 10, 100, 10, 10},
-{-7, 10, 100, 10, 10},
-{-6, 10, 100, 10, 10},
-{-5, 10, 100, 10, 10},
-{-4, 10, 100, 10, 10},
-{-3, 10, 100, 10, 10},
-{-2, 10, 100, 10, 10},
-{-1, 10, 100, 10, 10},
-{0, 10, 100, 10, 10},
-{1, 10, 100, 10, 10},
-{2, 10, 100, 10, 10},
-{3, 10, 100, 10, 10},
-{4, 10, 100, 10, 10},
-{5, 10, 100, 10, 10},
-{6, 10, 100, 10, 10},
-{7, 10, 100, 10, 10},
-{8, 10, 100, 10, 10},
-{9, 10, 100, 10, 10},
-{10, 10, 100, 10, 10},
-{11, 10, 100, 11, 10},
-{12, 10, 100, 12, 10},
-{13, 10, 100, 13, 10},
-{14, 10, 100, 14, 10},
-{15, 10, 100, 15, 10},
-{16, 10, 100, 16, 10},
-{17, 10, 100, 17, 10},
-{18, 10, 100, 18, 10},
-{19, 10, 100, 19, 10},
-{20, 10, 100, 20, 10},
-{21, 10, 100, 21, 10},
-{22, 10, 100, 22, 10},
-{23, 10, 100, 23, 10},
-{24, 10, 100, 24, 10},
-{25, 10, 100, 25, 10},
-{26, 10, 100, 26, 10},
-{27, 10, 100, 27, 10},
-{28, 10, 100, 28, 10},
-{29, 10, 100, 29, 10},
-{30, 10, 100, 30, 10},
-{31, 10, 100, 31, 10},
-{32, 10, 100, 32, 10},
-{33, 10, 100, 33, 10},
-{34, 10, 100, 34, 10},
-{35, 10, 100, 35, 10},
-{36, 10, 100, 36, 10},
-{37, 10, 100, 37, 10},
-{38, 10, 100, 38, 10},
-{39, 10, 100, 39, 10},
-{40, 10, 100, 40, 10},
-{41, 10, 100, 41, 10},
-{42, 10, 100, 42, 10},
-{43, 10, 100, 43, 10},
-{44, 10, 100, 44, 10},
-{45, 10, 100, 45, 10},
-{46, 10, 100, 46, 10},
-{47, 10, 100, 47, 10},
-{48, 10, 100, 48, 10},
-{49, 10, 100, 49, 10},
-{50, 10, 100, 50, 10},
-{51, 10, 100, 51, 10},
-{52, 10, 100, 52, 10},
-{53, 10, 100, 53, 10},
-{54, 10, 100, 54, 10},
-{55, 10, 100, 55, 10},
-{56, 10, 100, 56, 10},
-{57, 10, 100, 57, 10},
-{58, 10, 100, 58, 10},
-{59, 10, 100, 59, 10},
-{60, 10, 100, 60, 10},
-{61, 10, 100, 61, 10},
-{62, 10, 100, 62, 10},
-{63, 10, 100, 63, 10},
-{64, 10, 100, 64, 10},
-{65, 10, 100, 65, 10},
-{66, 10, 100, 66, 10},
-{67, 10, 100, 67, 10},
-{68, 10, 100, 68, 10},
-{69, 10, 100, 69, 10},
-{70, 10, 100, 70, 10},
-{71, 10, 100, 71, 10},
-{72, 10, 100, 72, 10},
-{73, 10, 100, 73, 10},
-{74, 10, 100, 74, 10},
-{75, 10, 100, 75, 10},
-{76, 10, 100, 76, 10},
-{77, 10, 100, 77, 10},
-{78, 10, 100, 78, 10},
-{79, 10, 100, 79, 10},
-{80, 10, 100, 80, 10},
-{81, 10, 100, 81, 10},
-{82, 10, 100, 82, 10},
-{83, 10, 100, 83, 10},
-{84, 10, 100, 84, 10},
-{85, 10, 100, 85, 10},
-{86, 10, 100, 86, 10},
-{87, 10, 100, 87, 10},
-{88, 10, 100, 88, 10},
-{89, 10, 100, 89, 10},
-{90, 10, 100, 90, 10},
-{91, 10, 100, 90, 10},
-{92, 10, 100, 90, 10},
-{93, 10, 100, 90, 10},
-{94, 10, 100, 90, 10},
-{95, 10, 100, 90, 10},
-{96, 10, 100, 90, 10},
-{97, 10, 100, 90, 10},
-{98, 10, 100, 90, 10},
-{99, 10, 100, 90, 10},
-{100, 10, 100, 90, 10},
-{101, 10, 100, 90, 10},
-{102, 10, 100, 90, 10},
-{103, 10, 100, 90, 10},
-{104, 10, 100, 90, 10},
-{105, 10, 100, 90, 10},
-{106, 10, 100, 90, 10},
-{107, 10, 100, 90, 10},
-{108, 10, 100, 90, 10},
-{109, 10, 100, 90, 10},
-{110, 10, 100, 90, 10},
-{111, 10, 100, 90, 10},
-{112, 10, 100, 90, 10},
-{113, 10, 100, 90, 10},
-{114, 10, 100, 90, 10},
-{115, 10, 100, 90, 10},
-{116, 10, 100, 90, 10},
-{117, 10, 100, 90, 10},
-{118, 10, 100, 90, 10},
-{119, 10, 100, 90, 10},
-{120, 10, 100, 90, 10},
-{121, 10, 100, 90, 10},
-{122, 10, 100, 90, 10},
-{123, 10, 100, 90, 10},
-{124, 10, 100, 90, 10},
-};
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Synchronizer.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Synchronizer.java
deleted file mode 100644
index 5d5ecf805a..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Synchronizer.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.widgets.Synchronizer
- *
- * @see org.eclipse.swt.widgets.Synchronizer
- */
-public class Test_org_eclipse_swt_widgets_Synchronizer extends SwtTestCase {
-
-public Test_org_eclipse_swt_widgets_Synchronizer(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
-}
-
-protected void tearDown() {
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_Display() {
- // tested in Test_org_eclipse_swt_widgets_Display.test_setSynchronizerLorg_eclipse_swt_widgets_Synchronizer
-}
-
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_widgets_Synchronizer((String)e.nextElement()));
- }
- return suite;
-}
-
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_Display");
- return methodNames;
-}
-
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_Display")) test_ConstructorLorg_eclipse_swt_widgets_Display();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_TabFolder.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_TabFolder.java
deleted file mode 100644
index 6640b1e61d..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_TabFolder.java
+++ /dev/null
@@ -1,383 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.widgets.TabFolder
- *
- * @see org.eclipse.swt.widgets.TabFolder
- */
-public class Test_org_eclipse_swt_widgets_TabFolder extends Test_org_eclipse_swt_widgets_Composite {
-
-public Test_org_eclipse_swt_widgets_TabFolder(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- super.setUp();
- makeCleanEnvironment();
-}
-
-protected void tearDown() {
- super.tearDown();
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_CompositeI() {
- TabFolder newTabFolder;
- try {
- newTabFolder = new TabFolder(null, 0);
- fail("No exception thrown for parent == null");
- }
- catch (IllegalArgumentException e) {
- }
-}
-
-public void test_addSelectionListenerLorg_eclipse_swt_events_SelectionListener() {
- warnUnimpl("Test test_addSelectionListenerLorg_eclipse_swt_events_SelectionListener not written");
-}
-
-public void test_computeSizeIIZ() {
- warnUnimpl("Test test_computeSizeIIZ not written");
-}
-
-public void test_computeTrimIIII() {
- warnUnimpl("Test test_computeTrimIIII not written");
-}
-
-public void test_getClientArea() {
- warnUnimpl("Test test_getClientArea not written");
-}
-
-public void test_getItemCount() {
- int number = 10;
- TabItem ti;
- for (int i = 0; i<number ; i++){
- assertTrue(":a:" + i, tabFolder.getItemCount()==i);
- ti = new TabItem(tabFolder, 0);
- }
-}
-
-public void test_getItemI() {
- int number = 15;
- TabItem[] items = new TabItem[number];
- for (int i = 0; i < number; i++) {
- items[i] = new TabItem(tabFolder, 0);
- }
-
- for (int i = 0; i < number; i++) {
- assertTrue(":a:" +String.valueOf(i), tabFolder.getItem(i).equals(items[i]));
- }
- try {
- tabFolder.getItem(number);
- fail("No exception thrown for illegal index argument");
- }
- catch (IllegalArgumentException e) {
- }
-
- try {
- tabFolder.getItem(number+1);
- fail("No exception thrown for illegal index argument");
- }
- catch (IllegalArgumentException e) {
- }
-
- try {
- tabFolder.getItem(-1);
- fail("No exception thrown for index == -1");
- }
- catch (IllegalArgumentException e) {
- }
-}
-
-public void test_getItems() {
- int number = 5;
- TabItem[] items = new TabItem[number];
-
- assertEquals(0, tabFolder.getItems().length);
-
- for (int i = 0; i<number ; i++){
- items[i] = new TabItem(tabFolder, 0);
- }
- assertEquals(items, tabFolder.getItems());
-
- tabFolder.getItems()[0].dispose();
- assertEquals(new TabItem[]{items[1], items[2], items[3], items[4]}, tabFolder.getItems());
-
- tabFolder.getItems()[3].dispose();
- assertEquals(new TabItem[]{items[1], items[2], items[3]}, tabFolder.getItems());
-
- tabFolder.getItems()[1].dispose();
- assertEquals(new TabItem[]{items[1], items[3]}, tabFolder.getItems());
-}
-
-public void test_getSelection() {
- int number = 10;
- TabItem[] tis = new TabItem[number];
- for (int i = 0; i<number ; i++){
- tis[i] = new TabItem(tabFolder, 0);
- }
- assertTrue(":a:", tabFolder.getSelection()[0] == tis[0]);
- for (int i = 0; i<number ; i++){
- tabFolder.setSelection(i);
- assertTrue(":b:" + i, tabFolder.getSelection()[0]==tis[i]);
- }
-}
-
-public void test_getSelectionIndex() {
- int number = 15;
- TabItem[] items = new TabItem[number];
- for (int i = 0; i < number; i++)
- items[i] = new TabItem(tabFolder, 0);
-
- assertTrue(":a:", tabFolder.getSelectionIndex()==0);
-
- tabFolder.setSelection(new TabItem[]{items[2], items[number-1], items[10]});
- assertTrue(":b:", tabFolder.getSelectionIndex()==2);
-
- tabFolder.setSelection(items);
- assertTrue(":c:", tabFolder.getSelectionIndex()==0);
-}
-
-public void test_indexOfLorg_eclipse_swt_widgets_TabItem() {
- int number = 10;
- TabItem[] tis = new TabItem[number];
- for (int i = 0; i<number ; i++){
- tis[i] = new TabItem(tabFolder, 0);
- }
- for (int i = 0; i<number ; i++){
- assertTrue(":a:" + i, tabFolder.indexOf(tis[i])==i);
- }
-
- //
- makeCleanEnvironment();
-
- for (int i = 0; i<number ; i++){
- tis[i] = new TabItem(tabFolder, 0);
- }
- for (int i = 0; i<number ; i++){
- try {
- tabFolder.indexOf(null);
- fail("No exception thrown for tabItem == null");
- }
- catch (IllegalArgumentException e) {
- }
- }
-
- //
- makeCleanEnvironment();
- number = 20;
- TabItem[] items = new TabItem[number];
-
- for (int i = 0; i < number; i++) {
- items[i] = new TabItem(tabFolder, 0);
- items[i].setText(String.valueOf(i));
- }
-
- //another tabFolder
- TabFolder tabFolder_2 = new TabFolder(shell, 0);
- TabItem[] items_2 = new TabItem[number];
- for (int i = 0; i < number; i++) {
- items_2[i] = new TabItem(tabFolder_2, 0);
- items_2[i].setText(String.valueOf(i));
- }
-
- for (int i = 0; i < number; i++) {
- assertTrue(":a:" + String.valueOf(i), tabFolder.indexOf(items_2[i])==-1);
- }
-
- //
- TabFolder tabFolder2 = new TabFolder(shell, SWT.NULL);
- TabItem tabItem = new TabItem(tabFolder2, SWT.NULL);
-
- assertTrue(":a:", tabFolder.indexOf(tabItem) == -1);
-}
-
-public void test_removeSelectionListenerLorg_eclipse_swt_events_SelectionListener() {
- warnUnimpl("Test test_removeSelectionListenerLorg_eclipse_swt_events_SelectionListener not written");
-}
-
-public void test_setSelection$Lorg_eclipse_swt_widgets_TabItem() {
- warnUnimpl("Test test_setSelection$Lorg_eclipse_swt_widgets_TabItem not written");
-}
-
-public void test_setSelectionI() {
- int number = 10;
- TabItem ti;
- for (int i = 0; i<number ; i++){
- ti = new TabItem(tabFolder, 0);
- }
- for (int i = 0; i<number ; i++){
- tabFolder.setSelection(i);
- assertEquals(i, tabFolder.getSelectionIndex());
- }
-
- //
- makeCleanEnvironment();
-
- for (int i = 0; i<number ; i++){
- ti = new TabItem(tabFolder, 0);
- assertEquals("i=" + i, 0, tabFolder.getSelectionIndex());
- }
-
- //
- makeCleanEnvironment();
-
- number = 5;
- TabItem[] items = new TabItem[number];
- for (int i = 0; i < number; i++)
- items[i] = new TabItem(tabFolder, 0);
- try {
- tabFolder.setSelection((TabItem[]) null);
- fail("No exception thrown for selection == null");
- }
- catch (IllegalArgumentException e) {
- }
- finally {
- assertEquals(new TabItem[]{items[0]}, tabFolder.getSelection());
- }
-
- //
- makeCleanEnvironment();
-
- items = new TabItem[number];
- for (int i = 0; i < number; i++)
- items[i] = new TabItem(tabFolder, 0);
-
- tabFolder.setSelection(0);
- assertEquals(new TabItem[]{items[0]}, tabFolder.getSelection());
-
- tabFolder.setSelection(4);
- assertEquals(new TabItem[]{items[4]}, tabFolder.getSelection());
-
- tabFolder.setSelection(2);
- assertEquals(new TabItem[]{items[2]}, tabFolder.getSelection());
-
- tabFolder.setSelection(1);
- assertEquals(new TabItem[]{items[1]}, tabFolder.getSelection());
-
- tabFolder.setSelection(number + 1);
- assertEquals(new TabItem[]{items[1]}, tabFolder.getSelection());
-
-// tabFolder.setSelection(-1);
-// assertEquals(0, tabFolder.getSelection().length);
-
- tabFolder.setSelection(3);
- assertEquals(new TabItem[]{items[3]}, tabFolder.getSelection());
-
-// tabFolder.setSelection(-2);
-// assertEquals(0, tabFolder.getSelection().length);
-
- //
- makeCleanEnvironment();
-
- for (int i = 0; i < number; i++)
- items[i] = new TabItem(tabFolder, 0);
-
- tabFolder.setSelection(new TabItem[]{});
- assertEquals(new TabItem[]{}, tabFolder.getSelection());
-
- tabFolder.setSelection(new TabItem[] {items[0]});
- assertEquals(new TabItem[] {items[0]}, tabFolder.getSelection());
-
- tabFolder.setSelection(new TabItem[] {items[3]});
- assertEquals(new TabItem[] {items[3]}, tabFolder.getSelection());
-
- tabFolder.setSelection(new TabItem[] {items[4]});
- assertEquals(new TabItem[] {items[4]}, tabFolder.getSelection());
-
- tabFolder.setSelection(new TabItem[] {items[2]});
- assertEquals(new TabItem[] {items[2]}, tabFolder.getSelection());
-
- tabFolder.setSelection(new TabItem[] {items[1]});
- assertEquals(new TabItem[] {items[1]}, tabFolder.getSelection());
-
- //
- makeCleanEnvironment();
-
- for (int i = 0; i < number; i++)
- items[i] = new TabItem(tabFolder, 0);
- try {
- tabFolder.setSelection( new TabItem[]{items[0], null});
- tabFolder.setSelection( new TabItem[]{null});
- fail("No exception thrown for selection == null");
- }
- catch (IllegalArgumentException e) {
- }
- finally {
- assertEquals(new TabItem[]{items[0]}, tabFolder.getSelection());
- }
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_widgets_TabFolder((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_CompositeI");
- methodNames.addElement("test_addSelectionListenerLorg_eclipse_swt_events_SelectionListener");
- methodNames.addElement("test_computeSizeIIZ");
- methodNames.addElement("test_computeTrimIIII");
- methodNames.addElement("test_getClientArea");
- methodNames.addElement("test_getItemCount");
- methodNames.addElement("test_getItemI");
- methodNames.addElement("test_getItems");
- methodNames.addElement("test_getSelection");
- methodNames.addElement("test_getSelectionIndex");
- methodNames.addElement("test_indexOfLorg_eclipse_swt_widgets_TabItem");
- methodNames.addElement("test_removeSelectionListenerLorg_eclipse_swt_events_SelectionListener");
- methodNames.addElement("test_setSelection$Lorg_eclipse_swt_widgets_TabItem");
- methodNames.addElement("test_setSelectionI");
- methodNames.addAll(Test_org_eclipse_swt_widgets_Composite.methodNames()); // add superclass method names
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_CompositeI")) test_ConstructorLorg_eclipse_swt_widgets_CompositeI();
- else if (getName().equals("test_addSelectionListenerLorg_eclipse_swt_events_SelectionListener")) test_addSelectionListenerLorg_eclipse_swt_events_SelectionListener();
- else if (getName().equals("test_computeSizeIIZ")) test_computeSizeIIZ();
- else if (getName().equals("test_computeTrimIIII")) test_computeTrimIIII();
- else if (getName().equals("test_getClientArea")) test_getClientArea();
- else if (getName().equals("test_getItemCount")) test_getItemCount();
- else if (getName().equals("test_getItemI")) test_getItemI();
- else if (getName().equals("test_getItems")) test_getItems();
- else if (getName().equals("test_getSelection")) test_getSelection();
- else if (getName().equals("test_getSelectionIndex")) test_getSelectionIndex();
- else if (getName().equals("test_indexOfLorg_eclipse_swt_widgets_TabItem")) test_indexOfLorg_eclipse_swt_widgets_TabItem();
- else if (getName().equals("test_removeSelectionListenerLorg_eclipse_swt_events_SelectionListener")) test_removeSelectionListenerLorg_eclipse_swt_events_SelectionListener();
- else if (getName().equals("test_setSelection$Lorg_eclipse_swt_widgets_TabItem")) test_setSelection$Lorg_eclipse_swt_widgets_TabItem();
- else if (getName().equals("test_setSelectionI")) test_setSelectionI();
- else super.runTest();
-}
-
-/* custom */
-protected TabFolder tabFolder;
-
-private void makeCleanEnvironment() {
-// this method must be private or protected so the auto-gen tool keeps it
- tabFolder = new TabFolder(shell, 0);
- setWidget(tabFolder);
-}
-
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_TabItem.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_TabItem.java
deleted file mode 100644
index 866824d5a4..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_TabItem.java
+++ /dev/null
@@ -1,172 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import junit.framework.*;
-import junit.textui.*;
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.widgets.TabItem
- *
- * @see org.eclipse.swt.widgets.TabItem
- */
-public class Test_org_eclipse_swt_widgets_TabItem extends Test_org_eclipse_swt_widgets_Item {
-
-public Test_org_eclipse_swt_widgets_TabItem(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- super.setUp();
- tabFolder = new TabFolder(shell, 0);
- tabItem = new TabItem(tabFolder, 0);
- setWidget(tabItem);
-}
-
-protected void tearDown() {
- super.tearDown();
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_TabFolderI() {
- try {
- new TabItem(null, SWT.NULL);
- fail("No exception thrown for parent == null");
- }
- catch (IllegalArgumentException e) {
- }
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_TabFolderII() {
- TabItem tItem = new TabItem(tabFolder, SWT.NULL, 0);
-
- assertTrue(":a:", tabFolder.getItems()[0] == tItem);
-
- tItem = new TabItem(tabFolder, SWT.NULL, 1);
- assertTrue(":b:", tabFolder.getItems()[1] == tItem);
-
- tItem = new TabItem(tabFolder, SWT.NULL, 1);
- assertTrue(":c:", tabFolder.getItems()[1] == tItem);
-
- try {
- new TabItem(tabFolder, SWT.NULL, -1);
- fail("No exception thrown");
- }
- catch (IllegalArgumentException e) {
- }
- finally {
- assertTrue(":d:", tabFolder.getItems()[1] == tItem);
- }
- try {
- new TabItem(tabFolder, SWT.NULL, tabFolder.getItemCount() + 1);
- fail("No exception thrown");
- }
- catch (IllegalArgumentException e) {
- }
- finally {
- assertTrue(":e:", tabFolder.getItems()[1] == tItem);
- }
- try {
- new TabItem(null, SWT.NULL, 0);
- fail("No exception thrown");
- }
- catch (IllegalArgumentException e) {
- }
-}
-
-public void test_getControl() {
- warnUnimpl("Test test_getControl not written");
-}
-
-public void test_getParent() {
- assertTrue(":a: ", tabItem.getParent() == tabFolder);
-}
-
-public void test_getToolTipText() {
- warnUnimpl("Test test_getToolTipText not written");
-}
-
-public void test_setControlLorg_eclipse_swt_widgets_Control() {
- Control control = new Table(tabFolder, SWT.NULL);
-
- assertTrue(":a: ", tabItem.getControl() == null);
-
- tabItem.setControl(control);
- assertTrue(":b: ", tabItem.getControl() == control);
-
- tabItem.setControl(null);
- assertTrue(":c: ", tabItem.getControl() == null);
-}
-
-public void test_setImageLorg_eclipse_swt_graphics_Image() {
- warnUnimpl("Test test_setImageLorg_eclipse_swt_graphics_Image not written");
-}
-
-public void test_setTextLjava_lang_String() {
- warnUnimpl("Test test_setTextLjava_lang_String not written");
-}
-
-public void test_setToolTipTextLjava_lang_String() {
- tabItem.setToolTipText("fred");
- assertTrue(":a: ", tabItem.getToolTipText().equals("fred"));
- tabItem.setToolTipText("fredttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt");
- assertTrue(":b: ", tabItem.getToolTipText().equals("fredttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt"));
- tabItem.setToolTipText(null);
- assertTrue(":c: ", tabItem.getToolTipText() == null);
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_widgets_TabItem((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_TabFolderI");
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_TabFolderII");
- methodNames.addElement("test_getControl");
- methodNames.addElement("test_getParent");
- methodNames.addElement("test_getToolTipText");
- methodNames.addElement("test_setControlLorg_eclipse_swt_widgets_Control");
- methodNames.addElement("test_setImageLorg_eclipse_swt_graphics_Image");
- methodNames.addElement("test_setTextLjava_lang_String");
- methodNames.addElement("test_setToolTipTextLjava_lang_String");
- methodNames.addAll(Test_org_eclipse_swt_widgets_Item.methodNames()); // add superclass method names
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_TabFolderI")) test_ConstructorLorg_eclipse_swt_widgets_TabFolderI();
- else if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_TabFolderII")) test_ConstructorLorg_eclipse_swt_widgets_TabFolderII();
- else if (getName().equals("test_getControl")) test_getControl();
- else if (getName().equals("test_getParent")) test_getParent();
- else if (getName().equals("test_getToolTipText")) test_getToolTipText();
- else if (getName().equals("test_setControlLorg_eclipse_swt_widgets_Control")) test_setControlLorg_eclipse_swt_widgets_Control();
- else if (getName().equals("test_setImageLorg_eclipse_swt_graphics_Image")) test_setImageLorg_eclipse_swt_graphics_Image();
- else if (getName().equals("test_setTextLjava_lang_String")) test_setTextLjava_lang_String();
- else if (getName().equals("test_setToolTipTextLjava_lang_String")) test_setToolTipTextLjava_lang_String();
- else super.runTest();
-}
-
-/* custom */
-TabFolder tabFolder;
-TabItem tabItem;
-
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Table.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Table.java
deleted file mode 100644
index 868c0d849c..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Table.java
+++ /dev/null
@@ -1,1613 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import junit.framework.*;
-import junit.textui.*;
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.widgets.Table
- *
- * @see org.eclipse.swt.widgets.Table
- */
-public class Test_org_eclipse_swt_widgets_Table extends Test_org_eclipse_swt_widgets_Composite {
-
-public Test_org_eclipse_swt_widgets_Table(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- super.setUp();
- makeCleanEnvironment(false); // by default, use multi-select table.
-}
-
-protected void tearDown() {
- super.tearDown();
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_CompositeI() {
- try {
- new Table(null, 0);
- fail("No exception thrown for parent == null");
- }
- catch (IllegalArgumentException e) {
- }
-}
-
-public void test_addSelectionListenerLorg_eclipse_swt_events_SelectionListener() {
- warnUnimpl("Test test_addSelectionListenerLorg_eclipse_swt_events_SelectionListener not written");
-}
-
-public void test_computeSizeIIZ() {
- warnUnimpl("Test test_computeSizeIIZ not written");
-}
-
-public void test_deselect$I() {
- int number = 15;
- TableItem[] items = new TableItem[number];
- for (int i = 0; i < number; i++)
- items[i] = new TableItem(table, 0);
-
- table.select(new int[] {0, 3});
- assertEquals(2, table.getSelectionCount());
-
- table.deselect(new int[] {1, 2});
- assertEquals(2, table.getSelectionCount());
-
- table.deselect(new int[] {1, 3, 5});
- assertEquals(1, table.getSelectionCount());
-
- table.deselect(new int[] {9, 3, 0});
- assertEquals(0, table.getSelectionCount());
-
- makeCleanEnvironment(false);
-
- items = new TableItem[number];
- for (int i = 0; i < number; i++)
- items[i] = new TableItem(table, 0);
-
- table.selectAll();
- assertEquals(number, table.getSelectionCount());
-
- try{
- table.deselect(null);
- fail("No exception thrown for selection == null");
- }
- catch (IllegalArgumentException e) {
- }
- assertEquals(number, table.getSelectionCount());
- table.selectAll();
-
- table.deselect(new int[] {});
- assertEquals(number, table.getSelectionCount());
- table.selectAll();
-
- table.deselect(new int[] {-1, 100, -1000});
- assertEquals(number, table.getSelectionCount());
- table.selectAll();
-
- table.deselect(new int[] {2, -1, 1, 100, 2});
- assertEquals(number-2, table.getSelectionCount());
-
- table.deselect(new int[] {2, -1, 1, 100, 2});
- assertEquals(number-2, table.getSelectionCount());
-
- table.deselect(new int[] {2, -1, 3, 100, 2});
- assertEquals(number-3, table.getSelectionCount());
-}
-
-public void test_deselectAll() {
- int number = 15;
- TableItem[] items = new TableItem[number];
- for (int i = 0; i < number; i++)
- items[i] = new TableItem(table, 0);
-
- assertEquals(0, table.getSelectionCount());
- table.select(new int[] {2, 4, 5, 10});
-
- assertEquals(4, table.getSelectionCount());
-
- table.deselectAll();
- assertEquals(0, table.getSelectionCount());
-
- table.selectAll();
- assertEquals(number, table.getSelectionCount());
-
- table.deselectAll();
- assertEquals(0, table.getSelectionCount());
-}
-
-public void test_deselectI() {
- int number = 15;
- TableItem[] items = new TableItem[number];
- for (int i = 0; i < number; i++) {
- items[i] = new TableItem(table, 0);
- }
- assertEquals(0, table.getSelectionCount());
-
- table.deselect(0);
- assertEquals(0, table.getSelectionCount());
-
- table.select(new int[] {0, 3, 6});
- assertEquals(3, table.getSelectionCount());
-
- table.deselect(0);
- assertEquals(2, table.getSelectionCount());
-
- table.deselect(0);
- assertEquals(2, table.getSelectionCount());
-
- table.deselect(5);
- assertEquals(2, table.getSelectionCount());
-
- table.deselect(3);
- assertEquals(1, table.getSelectionCount());
-
- table.deselect(100);
- assertEquals(1, table.getSelectionCount());
-}
-
-public void test_deselectII() {
- int number = 15;
- TableItem[] items = new TableItem[number];
- for (int i = 0; i < number; i++)
- items[i] = new TableItem(table, 0);
-
- table.select(new int[] {0, 3, 6});
- assertEquals(3, table.getSelectionCount());
-
- table.deselect(7, 10);
- assertEquals(3, table.getSelectionCount());
-
- table.deselect(6, 10);
- assertEquals(2, table.getSelectionCount());
-
- table.deselect(1, 10);
- assertEquals(1, table.getSelectionCount());
-
- table.deselect(0, 10);
- assertEquals(0, table.getSelectionCount());
-
- table.deselect(0, 100);
- assertEquals(0, table.getSelectionCount());
-
- makeCleanEnvironment(false);
-
- items = new TableItem[number];
- for (int i = 0; i < number; i++)
- items[i] = new TableItem(table, 0);
-
- table.selectAll();
- assertEquals(number, table.getSelectionCount());
-
- table.deselect(-10, 2);
- assertEquals(number-3, table.getSelectionCount());
- table.selectAll();
-
- table.deselect(-10, 2000);
- assertEquals(0, table.getSelectionCount());
- table.selectAll();
-
- table.deselect(2000, -10);
- assertEquals(number, table.getSelectionCount());
- table.selectAll();
-
- table.deselect(0, number-1);
- assertEquals(0, table.getSelectionCount());
- table.selectAll();
-
- table.deselect(0, 0);
- assertEquals(number-1, table.getSelectionCount());
- table.selectAll();
-
- table.deselect(number-1, number-1);
- assertEquals(number-1, table.getSelectionCount());
- table.selectAll();
- table.deselect(-1, -1);
- assertEquals(number, table.getSelectionCount());
- table.selectAll();
-
- table.deselect(number, number);
- assertEquals(number, table.getSelectionCount());
- table.selectAll();
-}
-
-public void test_getColumnCount() {
- warnUnimpl("Test test_getColumnCount not written");
-}
-
-public void test_getColumnI() {
- warnUnimpl("Test test_getColumnI not written");
-}
-
-public void test_getColumns() {
- warnUnimpl("Test test_getColumns not written");
-}
-
-public void test_getGridLineWidth() {
- table.getGridLineWidth();
-}
-
-public void test_getHeaderHeight() {
- warnUnimpl("Test test_getHeaderHeight not written");
-}
-
-public void test_getHeaderVisible() {
- warnUnimpl("Test test_getHeaderVisible not written");
-}
-
-public void test_getItemCount() {
- int[] cases = {0, 10, 100};
- for (int j = 0; j < cases.length; j++) {
- for (int i = 0; i < cases[j]; i++) {
- TableItem ti = new TableItem(table, 0);
- }
- assertEquals("j="+ j, cases[j], table.getItemCount());
- table.removeAll();
- }
-
- // note: SWT.SINGLE
- makeCleanEnvironment(true);
- for (int j = 0; j < cases.length; j++) {
- for (int i = 0; i < cases[j]; i++) {
- TableItem ti = new TableItem(table, 0);
- }
- assertEquals("j="+ j, cases[j], table.getItemCount());
- table.removeAll();
- }
-}
-
-public void test_getItemHeight() {
- assertTrue(":a: Item height <= 0", table.getItemHeight() > 0);
- new TableItem(table, 0);
- assertTrue(":b: Item height <= 0", table.getItemHeight() > 0);
-}
-
-public void test_getItemI() {
- int number = 15;
- TableItem[] items = new TableItem[number];
- for (int i = 0; i < number; i++)
- items[i] = new TableItem(table, 0);
-
- for (int i = 0; i < number; i++)
- assertEquals("i=" + i, items[i], table.getItem(i));
- try {
- table.getItem(number);
- fail("No exception thrown for illegal index argument");
- }
- catch (IllegalArgumentException e) {
- }
-
- try {
- table.getItem(number+1);
- fail("No exception thrown for illegal index argument");
- }
- catch (IllegalArgumentException e) {
- }
-
- // note: SWT.SINGLE
- makeCleanEnvironment(true);
-
- for (int i = 0; i < number; i++)
- items[i] = new TableItem(table, 0);
- for (int i = 0; i < number; i++) {
- assertEquals("i=" + i, items[i], table.getItem(i));
- }
- try {
- table.getItem(number);
- fail("No exception thrown for illegal index argument");
- }
- catch (IllegalArgumentException e) {
- }
-
- try {
- table.getItem(number+1);
- fail("No exception thrown for illegal index argument");
- }
- catch (IllegalArgumentException e) {
- }
-}
-
-public void test_getItemLorg_eclipse_swt_graphics_Point() {
- warnUnimpl("Test test_getItemLorg_eclipse_swt_graphics_Point not written");
-}
-
-public void test_getItems() {
- int[] cases = {0, 10, 100};
- for (int j = 0; j < cases.length; j++) {
- for (int i = 0; i < cases[j]; i++) {
- TableItem ti = new TableItem(table, 0);
- }
- assertEquals("j=" + j, cases[j], table.getItems().length);
- table.removeAll();
- }
-
- for (int j = 0; j < cases.length; j++) {
- for (int i = 0; i < cases[j]; i++) {
- TableItem ti = new TableItem(table, 0);
- ti.setText(String.valueOf(i));
- }
- TableItem[] items = table.getItems();
- for (int i = 0; i < items.length; i++) {
- assertEquals("j=" + j + ", i=" + i, String.valueOf(i), items[i].getText());
- }
- table.removeAll();
- }
-
- // note SWT.SINGLE
- makeCleanEnvironment(true);
-
- for (int j = 0; j < cases.length; j++) {
- for (int i = 0; i < cases[j]; i++) {
- TableItem ti = new TableItem(table, 0);
- }
- assertEquals("j=" + j, cases[j], table.getItems().length);
- table.removeAll();
- }
-
- makeCleanEnvironment(true);
-
- for (int j = 0; j < cases.length; j++) {
- for (int i = 0; i < cases[j]; i++) {
- TableItem ti = new TableItem(table, 0);
- ti.setText(String.valueOf(i));
- }
- TableItem[] items = table.getItems();
- for (int i = 0; i < items.length; i++) {
- assertEquals("j=" + j + ", i=" + i, String.valueOf(i), items[i].getText());
- }
- table.removeAll();
- }
-}
-
-public void test_getLinesVisible() {
- warnUnimpl("Test test_getLinesVisible not written");
-}
-
-public void test_getSelection() {
- int number = 15;
- TableItem[] items = new TableItem[number];
- for (int i = 0; i < number; i++)
- items[i] = new TableItem(table, 0);
-
- assertEquals(new TableItem[] {}, table.getSelection());
-
- table.setSelection(new TableItem[]{items[2], items[number-1], items[10]});
- assertSame(new TableItem[] {items[2], items[10], items[number-1]}, table.getSelection());
-
- table.setSelection(items);
- assertSame(items, table.getSelection());
-
- // note: SWT.SINGLE
- makeCleanEnvironment(true);
-
- for (int i = 0; i < number; i++)
- items[i] = new TableItem(table, 0);
-
- assertEquals(new TableItem[] {}, table.getSelection());
-
- table.setSelection(new TableItem[]{items[10]});
- assertEquals(new TableItem[] {items[10]}, table.getSelection());
-
- table.setSelection(new TableItem[]{items[number-1]});
- assertEquals(new TableItem[] {items[number-1]}, table.getSelection());
-
- table.setSelection(new TableItem[]{items[2]});
- assertEquals(new TableItem[] {items[2]}, table.getSelection());
-
- table.setSelection(new TableItem[]{items[10], items[number-1], items[2]});
- assertEquals(new TableItem[] {}, table.getSelection());
-
- table.setSelection(items);
- assertEquals(new TableItem[] {}, table.getSelection());
-}
-
-public void test_getSelectionCount() {
- int number = 15;
- TableItem[] items = new TableItem[number];
- for (int i = 0; i < number; i++)
- items[i] = new TableItem(table, 0);
-
- assertEquals(0, table.getSelectionCount());
-
- table.setSelection(new TableItem[]{items[2], items[number-1], items[10]});
- assertEquals(3, table.getSelectionCount());
-
- table.setSelection(items);
- assertEquals(number, table.getSelectionCount());
-
- // note: SWT.SINGLE
- makeCleanEnvironment(true);
-
- for (int i = 0; i < number; i++)
- items[i] = new TableItem(table, 0);
-
- assertEquals(0, table.getSelectionCount());
-
- table.setSelection(new TableItem[]{items[2]});
- assertEquals(1, table.getSelectionCount());
-
- table.setSelection(new TableItem[]{items[number-1]});
- assertEquals(1, table.getSelectionCount());
-
- table.setSelection(new TableItem[]{items[10]});
- assertEquals(1, table.getSelectionCount());
-
- table.setSelection(new TableItem[]{items[2], items[number-1], items[10]});
- assertEquals(0, table.getSelectionCount());
-
- table.setSelection(items);
- assertEquals(0, table.getSelectionCount());
-}
-
-public void test_getSelectionIndex() {
- int number = 15;
- TableItem[] items = new TableItem[number];
- for (int i = 0; i < number; i++)
- items[i] = new TableItem(table, 0);
-
- assertEquals(-1, table.getSelectionIndex());
-
- table.setSelection(new TableItem[]{items[2], items[number-1], items[10]});
- assertEquals(2, table.getSelectionIndex());
-
- table.setSelection(items);
- assertEquals(0, table.getSelectionIndex());
-
- // note: SWT.SINGLE
- makeCleanEnvironment(true);
-
- for (int i = 0; i < number; i++)
- items[i] = new TableItem(table, 0);
-
- assertEquals(-1, table.getSelectionIndex());
-
- table.setSelection(new TableItem[]{items[2]});
- assertEquals(2, table.getSelectionIndex());
-
- table.setSelection(new TableItem[]{items[number-1]});
- assertEquals(number - 1, table.getSelectionIndex());
-
- table.setSelection(new TableItem[]{items[10]});
- assertEquals(10, table.getSelectionIndex());
-
- table.setSelection(new TableItem[]{items[2], items[number-1], items[10]});
- assertEquals(-1, table.getSelectionIndex());
-
- table.setSelection(items);
- assertEquals(-1, table.getSelectionIndex());
-}
-
-public void test_getSelectionIndices() {
- int number = 15;
- TableItem[] items = new TableItem[number];
- for (int i = 0; i < number; i++)
- items[i] = new TableItem(table, 0);
-
- assertEquals(new int[]{}, table.getSelectionIndices());
- table.setSelection(new TableItem[]{items[2], items[number-1], items[10]});
- assertSame(new int[]{2, 10, number-1}, table.getSelectionIndices()); // 10 < number
-
- int[] all = new int[number];
- for (int i = 0; i<number; i++)
- all[i]=i;
- table.setSelection(items);
- assertSame(all, table.getSelectionIndices());
-
- // note: SWT.SINGLE
- makeCleanEnvironment(true);
-
- for (int i = 0; i < number; i++)
- items[i] = new TableItem(table, 0);
-
- assertEquals(new int[]{}, table.getSelectionIndices());
-
- table.setSelection(new TableItem[]{items[2]});
- assertEquals(new int[]{2}, table.getSelectionIndices());
-
- table.setSelection(new TableItem[]{items[number-1]});
- assertEquals(new int[]{number-1}, table.getSelectionIndices());
-
- table.setSelection(new TableItem[]{items[10]});
- assertEquals(new int[]{10}, table.getSelectionIndices());
-
- table.setSelection(new TableItem[]{items[2], items[number-1], items[10]});
- assertEquals(new int[]{}, table.getSelectionIndices());
-
- table.setSelection(items);
- assertEquals(new int[]{}, table.getSelectionIndices());
-}
-
-public void test_getTopIndex() {
- warnUnimpl("Test test_getTopIndex not written");
-}
-
-public void test_indexOfLorg_eclipse_swt_widgets_TableColumn() {
- warnUnimpl("Test test_indexOfLorg_eclipse_swt_widgets_TableColumn not written");
-}
-
-public void test_indexOfLorg_eclipse_swt_widgets_TableItem() {
- int number = 20;
- TableItem[] items = new TableItem[number];
-
- for (int i = 0; i < number; i++) {
- items[i] = new TableItem(table, 0);
- items[i].setText(String.valueOf(i));
- }
-
- for (int i = 0; i < number; i++) {
- assertEquals(i, table.indexOf(items[i]));
- }
-
- for (int i = 0; i < number; i++) {
- try {
- table.indexOf((TableItem)null);
- fail("No exception thrown for tableItem == null");
- }
- catch (IllegalArgumentException e) {
- }
- }
-
- // another table
- Table table_2 = new Table(shell, 0);
- TableItem[] items_2 = new TableItem[number];
- for (int i = 0; i < number; i++) {
- items_2[i] = new TableItem(table_2, 0);
- items_2[i].setText(String.valueOf(i));
- }
-
- for (int i = 0; i < number; i++) {
- assertEquals("i=" + i, -1, table.indexOf(items_2[i]));
- }
-
- // note: SWT.SINGLE
- makeCleanEnvironment(true);
-
- number = 20;
- items = new TableItem[number];
-
- for (int i = 0; i < number; i++) {
- items[i] = new TableItem(table, 0);
- items[i].setText(String.valueOf(i));
- }
-
- for (int i = 0; i < number; i++) {
- assertEquals(i, table.indexOf(items[i]));
- }
-
- makeCleanEnvironment(true);
-
- for (int i = 0; i < number; i++) {
- items[i] = new TableItem(table, 0);
- items[i].setText(String.valueOf(i));
- }
-
- for (int i = 0; i < number; i++) {
- try {
- table.indexOf((TableItem)null);
- fail("No exception thrown for tableItem == null");
- }
- catch (IllegalArgumentException e) {
- }
- }
-
- makeCleanEnvironment(true);
-
- for (int i = 0; i < number; i++) {
- items[i] = new TableItem(table, 0);
- items[i].setText(String.valueOf(i));
- }
-
- // another table
- table_2 = new Table(shell, 0);
- items_2 = new TableItem[number];
- for (int i = 0; i < number; i++) {
- items_2[i] = new TableItem(table_2, 0);
- items_2[i].setText(String.valueOf(i));
- }
-
- for (int i = 0; i < number; i++) {
- assertEquals("i=" + i, -1, table.indexOf(items_2[i]));
- }
-}
-
-public void test_isSelectedI() {
- int number = 15;
- TableItem[] items = new TableItem[number];
- for (int i = 0; i < number; i++)
- items[i] = new TableItem(table, 0);
- for (int i = 0; i < number; i++)
- assertTrue(":a:" + i, !table.isSelected(i));
- table.setSelection(new TableItem[] {items[2], items[number-1], items[10]});
- for (int i = 0; i < number; i++) {
- if (i == 2 || i == number-1 || i == 10)
- assertTrue(":b:" + i, table.isSelected(i));
- else
- assertTrue(":b:" + i, !table.isSelected(i));
- }
-
- table.setSelection(items);
- for (int i = 0; i < number; i++)
- assertTrue(":c:" + i, table.isSelected(i));
-
- // note: SWT.SINGLE
- makeCleanEnvironment(true);
-
- for (int i = 0; i < number; i++)
- items[i] = new TableItem(table, 0);
- for (int i = 0; i < number; i++)
- assertTrue(":d:" + i, !table.isSelected(i));
- table.setSelection(new TableItem[] {items[10]});
- for (int i = 0; i < number; i++) {
- if (i == 10)
- assertTrue(":e:" + i, table.isSelected(i));
- else
- assertTrue(":e:" + i, !table.isSelected(i));
- }
-
- table.setSelection(items);
- for (int i = 0; i < number; i++){
- assertTrue(":f:" + i, !table.isSelected(i));
- }
-}
-
-public void test_remove$I() {
- int number = 15;
- TableItem[] items = new TableItem[number];
- for (int i = 0; i < number; i++)
- items[i] = new TableItem(table, 0);
- try {
- table.remove(null);
- fail("No exception thrown for tableItems == null");
- }
- catch (IllegalArgumentException e) {
- }
-
- try {
- table.remove(new int[] {2, 1, 0, -100, 5, 5, 2, 1, 0, 0, 0});
- fail("No exception thrown for illegal index arguments");
- }
- catch (IllegalArgumentException e) {
- }
-
- try {
- table.remove(new int[] {2, 1, 0, number, 5, 5, 2, 1, 0, 0, 0});
- fail("No exception thrown for illegal index arguments");
- }
- catch (IllegalArgumentException e) {
- }
-
- table.remove(new int[] {});
-
- makeCleanEnvironment(false);
-
- for (int i = 0; i < number; i++)
- items[i] = new TableItem(table, 0);
-
- assertTrue(":a:", !items[2].isDisposed());
- table.remove(new int[] {2});
- assertTrue(":b:", items[2].isDisposed());
- assertEquals(number-1, table.getItemCount());
-
- assertTrue(":c:", !items[number-1].isDisposed());
- table.remove(new int[] {number-2});
- assertTrue(":d:", items[number-1].isDisposed());
- assertEquals(number-2, table.getItemCount());
-
- assertTrue(":e:", !items[3].isDisposed());
- table.remove(new int[] {2});
- assertTrue(":f:", items[3].isDisposed());
- assertEquals(number-3, table.getItemCount());
-
- assertTrue(":g:", !items[0].isDisposed());
- table.remove(new int[] {0});
- assertTrue(":h:", items[0].isDisposed());
- assertEquals(number-4, table.getItemCount());
-}
-
-public void test_removeAll() {
- int number = 15;
- TableItem[] items = new TableItem[number];
- for (int i = 0; i < number; i++)
- items[i] = new TableItem(table, 0);
-
- table.removeAll();
-
- makeCleanEnvironment(false);
-
- for (int i = 0; i < number; i++)
- items[i] = new TableItem(table, 0);
-
- table.removeAll();
- table.removeAll();
-}
-
-public void test_removeI() {
- warnUnimpl("Test test_removeI not written");
-}
-
-public void test_removeII() {
- int number = 5;
- TableItem[] items = new TableItem[number];
- for (int i = 0; i < number; i++)
- items[i] = new TableItem(table, 0);
- try {
- table.remove(-number, number + 100);
- fail("No exception thrown for illegal index range");
- } catch (IllegalArgumentException e) {}
-
- makeCleanEnvironment(false);
-
- items = new TableItem[number];
- for (int i = 0; i < number; i++)
- items[i] = new TableItem(table, 0);
- table.remove(2, 3);
- assertEquals(new TableItem[]{items[0], items[1], items[4]}, table.getItems());
-
- makeCleanEnvironment(false);
-
- items = new TableItem[number];
- for (int i = 0; i < number; i++)
- items[i] = new TableItem(table, 0);
- try {
- table.remove(2, 100);
- fail("No exception thrown for illegal index range");
- } catch (IllegalArgumentException e) {}
- assertEquals(items, table.getItems());
-
- makeCleanEnvironment(false);
-
- items = new TableItem[number];
- for (int i = 0; i < number; i++)
- items[i] = new TableItem(table, 0);
- try {
- table.remove(2, number);
- fail("No exception thrown for illegal index range");
- } catch (IllegalArgumentException e) {}
- assertEquals(items, table.getItems());
-
- makeCleanEnvironment(false);
-
- items = new TableItem[number];
- for (int i = 0; i < number; i++)
- items[i] = new TableItem(table, 0);
- table.remove(2, number-1);
- assertEquals(new TableItem[] {items[0], items[1]}, table.getItems());
-
- makeCleanEnvironment(false);
-
- for (int i = 0; i < number; i++)
- items[i] = new TableItem(table, 0);
- table.remove(0, 3);
- assertEquals(new TableItem[] {items[4]}, table.getItems());
-
- makeCleanEnvironment(false);
-
- for (int i = 0; i < number; i++)
- items[i] = new TableItem(table, 0);
- table.remove(0, number-1);
- assertEquals(new TableItem[] {}, table.getItems());
-
- makeCleanEnvironment(false);
-
- for (int i = 0; i < number; i++)
- items[i] = new TableItem(table, 0);
-
- table.remove(new int[] {});
- assertEquals(number, table.getItemCount());
-
- makeCleanEnvironment(false);
-
- for (int i = 0; i < number; i++)
- items[i] = new TableItem(table, 0);
- try {
- table.remove(-20, -10);
- fail("No exception thrown for illegal index range");
- } catch (IllegalArgumentException e) {}
- assertEquals(items, table.getItems());
-
- makeCleanEnvironment(false);
-
- for (int i = 0; i < number; i++)
- items[i] = new TableItem(table, 0);
- try {
- table.remove(20, 40);
- fail("No exception thrown for illegal index range");
- } catch (IllegalArgumentException e) {}
- assertEquals(items, table.getItems());
-
- makeCleanEnvironment(false);
-
- for (int i = 0; i < number; i++)
- items[i] = new TableItem(table, 0);
- table.remove(200, 40);
- assertEquals(items, table.getItems());
-
- makeCleanEnvironment(false);
-
- for (int i = 0; i < number; i++)
- items[i] = new TableItem(table, 0);
- table.remove(2, 2);
- assertEquals(new TableItem[]{items[0], items[1], items[3], items[4]}, table.getItems());
-
- makeCleanEnvironment(false);
-
- for (int i = 0; i < number; i++)
- items[i] = new TableItem(table, 0);
- table.remove(0, 0);
- assertEquals(new TableItem[]{items[1], items[2], items[3], items[4]}, table.getItems());
-
- makeCleanEnvironment(false);
-
- for (int i = 0; i < number; i++)
- items[i] = new TableItem(table, 0);
- table.remove(4, 4);
- assertEquals(new TableItem[]{items[0], items[1], items[2], items[3]}, table.getItems());
-
- makeCleanEnvironment(false);
-
- for (int i = 0; i < number; i++)
- items[i] = new TableItem(table, 0);
- assertEquals(number, table.getItemCount());
- try {
- table.remove(-10, 2);
- fail("No exception thrown for illegal index range");
- } catch (IllegalArgumentException e) {}
- assertEquals(number, table.getItemCount());
- if (fCheckSWTPolicy) {
- table.remove(10, 2);
- assertEquals(number, table.getItemCount());
- }
- table.remove(0, 2);
- assertEquals(number - 3, table.getItemCount());
- assertEquals(new TableItem[] {items[3], items[4]}, table.getItems());
- try {
- table.remove(1, 200);
- fail("No exception thrown for illegal index range");
- } catch (IllegalArgumentException e) {}
- assertEquals(number - 3, table.getItemCount());
- assertEquals(new TableItem[] {items[3], items[4]}, table.getItems());
-
- makeCleanEnvironment(false);
-
- for (int i = 0; i < number; i++)
- items[i] = new TableItem(table, 0);
-
- table.remove(0, number-1);
- assertEquals(0, table.getItemCount());
-
- makeCleanEnvironment(false);
-
- for (int i = 0; i < number; i++)
- items[i] = new TableItem(table, 0);
- try {
- table.remove(number, number);
- fail("No exception thrown for illegal index range");
- } catch (IllegalArgumentException e) {}
-
- makeCleanEnvironment(false);
-
- for (int i = 0; i < number; i++)
- items[i] = new TableItem(table, 0);
- try {
- table.remove(number, number + 100);
- fail("No exception thrown for illegal index range");
- } catch (IllegalArgumentException e) {}
-
- makeCleanEnvironment(false);
-
- number = 15;
- items = new TableItem[number];
- for (int i = 0; i < number; i++)
- items[i] = new TableItem(table, 0);
-
- table.remove(new int[] {2, 1, 0, 5, 5});
- assertEquals(number-4, table.getItemCount());
-}
-
-public void test_removeSelectionListenerLorg_eclipse_swt_events_SelectionListener() {
- warnUnimpl("Test test_removeSelectionListenerLorg_eclipse_swt_events_SelectionListener not written");
-}
-
-public void test_select$I() {
- try {
- table.select(null);
- fail("No exception thrown for selection == null");
- }
- catch (IllegalArgumentException e) {
- }
-
- int number = 15;
- TableItem[] items = new TableItem[number];
- for (int i = 0; i < number; i++)
- items[i] = new TableItem(table, 0);
-
- table.select(new int[] {2, 10, 14});
- assertSame(new int[] {2, 10, 14}, table.getSelectionIndices());
-
- table.deselectAll();
- table.select(new int[] {10, 2, 14});
- assertSame(new int[] {2, 10, 14}, table.getSelectionIndices());
-
- table.deselectAll();
- table.select(new int[] {number, 0, number-1});
- assertSame(new int[] {0, number-1}, table.getSelectionIndices());
-
- table.deselectAll();
- table.select(new int[] {number, 0, -1});
- assertSame(new int[] {0}, table.getSelectionIndices());
-
- table.deselectAll();
- table.select(new int[] {0});
- assertSame(new int[] {0}, table.getSelectionIndices());
-
- table.select(new int[] {10});
- assertSame(new int[] {0, 10}, table.getSelectionIndices());
-
- table.select(new int[] {2});
- assertSame(new int[] {0, 2, 10}, table.getSelectionIndices());
-
- table.select(new int[] {14});
- assertSame(new int[] {0, 2, 10, 14}, table.getSelectionIndices());
-
- table.deselectAll();
- table.select(new int[] {15});
- assertSame(new int[] {}, table.getSelectionIndices());
-
- table.select(new int[] {-1});
- assertSame(new int[] {}, table.getSelectionIndices());
-
- table.select(new int[] {4, 4, 4});
- assertSame(new int[] {4}, table.getSelectionIndices());
-
- // note: SWT.SINGLE
- makeCleanEnvironment(true);
-
- items = new TableItem[number];
- for (int i = 0; i < number; i++)
- items[i] = new TableItem(table, 0);
-
- try {
- table.select(null);
- fail("No exception thrown for selection == null");
- }
- catch (IllegalArgumentException e) {
- }
- finally {
- assertEquals(0, table.getSelectionCount());
- }
-
- table.select(new int[] {0});
- assertSame(new int[] {0}, table.getSelectionIndices());
-
- table.select(new int[] {10});
- assertSame(new int[] {10}, table.getSelectionIndices());
-
- table.select(new int[] {2});
- assertSame(new int[] {2}, table.getSelectionIndices());
-
- table.select(new int[] {14});
- assertSame(new int[] {14}, table.getSelectionIndices());
-
- table.deselectAll();
- table.select(new int[] {15});
- assertSame(new int[] {}, table.getSelectionIndices());
-
- table.select(new int[] {-1});
- assertSame(new int[] {}, table.getSelectionIndices());
-
- table.select(new int[] {10, 2, 14});
- assertSame(new int[] {}, table.getSelectionIndices());
-
- table.select(new int[] {4, 4, 4});
- assertSame(new int[] {}, table.getSelectionIndices());
-}
-
-public void test_selectAll() {
- int number = 5;
- TableItem[] items = new TableItem[number];
- for (int i = 0; i < number; i++)
- items[i] = new TableItem(table, 0);
-
- assertEquals(new int[]{}, table.getSelectionIndices());
- table.selectAll();
- assertSame(new int[]{0, 1, 2, 3, 4}, table.getSelectionIndices());
-
- // test single-selection table
- makeCleanEnvironment(true);
- for (int i = 0; i < number; i++)
- items[i] = new TableItem(table, 0);
-
- assertEquals(new int[]{}, table.getSelectionIndices());
- table.selectAll();
- assertEquals(new int[]{}, table.getSelectionIndices());
-}
-
-public void test_selectI() {
- int number = 15;
- TableItem[] items = new TableItem[number];
- for (int i = 0; i < number; i++)
- items[i] = new TableItem(table, 0);
-
- table.select(new int[] {10, 2, 14});
- assertSame(new int[] {2, 10, 14}, table.getSelectionIndices());
-
- table.select(7);
- assertSame(new int[]{2, 7, 10, 14}, table.getSelectionIndices());
-
- table.select(0);
- assertSame(new int[]{0, 2, 7, 10, 14}, table.getSelectionIndices());
-
- // note: SWT.SINGLE
- makeCleanEnvironment(true);
-
- for (int i = 0; i < number; i++)
- items[i] = new TableItem(table, 0);
-
- table.select(0);
- assertEquals(new int[] {0}, table.getSelectionIndices());
-
- table.select(1);
- assertEquals(new int[] {1}, table.getSelectionIndices());
-
- table.select(10);
- assertEquals(new int[] {10}, table.getSelectionIndices());
-
- table.select(number-1);
- assertEquals(new int[] {number-1}, table.getSelectionIndices());
-
- table.deselectAll();
- table.select(number);
- assertEquals(new int[] {}, table.getSelectionIndices());
-
- table.select(-1);
- assertEquals(new int[] {}, table.getSelectionIndices());
-
-}
-
-public void test_selectII() {
- int number = 15;
- TableItem[] items = new TableItem[number];
- for (int i = 0; i < number; i++)
- items[i] = new TableItem(table, 0);
-
- table.select(new int[] {10, 2, 14});
- assertSame(new int[] {2, 10, 14}, table.getSelectionIndices());
-
- table.select(7);
- assertSame(new int[]{2, 7, 10, 14}, table.getSelectionIndices());
-
- table.select(0);
- assertSame(new int[]{0, 2, 7, 10, 14}, table.getSelectionIndices());
-
- table.select(4, 10);
- assertSame(new int[]{0, 2, 4, 5, 6, 7, 8, 9, 10, 14}, table.getSelectionIndices());
-
- table.select(4, 14);
- assertSame(new int[]{0, 2, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14}, table.getSelectionIndices());
-
- table.select(0, 7);
- assertSame(new int[]{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14}, table.getSelectionIndices());
-
- table.select(9, 5);
- assertSame(new int[]{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14}, table.getSelectionIndices());
-
- makeCleanEnvironment(false);
-
- for (int i = 0; i < number; i++)
- items[i] = new TableItem(table, 0);
-
- table.select(-100, 1000);
- assertEquals(number, table.getSelectionCount());
- table.deselectAll();
- assertEquals(0, table.getSelectionCount());
- table.select(0, 1000);
- assertEquals(number, table.getSelectionCount());
- table.deselectAll();
-
- table.select(0, number-1);
- assertEquals(number, table.getSelectionCount());
- table.deselectAll();
-
- table.select(0, 0);
- assertEquals(1, table.getSelectionCount());
- table.deselectAll();
-
- table.select(number-1, number);
- assertEquals(1, table.getSelectionCount());
- table.deselectAll();
-
- table.select(number, number);
- assertEquals(0, table.getSelectionCount());
- table.deselectAll();
-
- // note: SWT.SINGLE
- makeCleanEnvironment(true);
- for (int i = 0; i < number; i++)
- items[i] = new TableItem(table, 0);
-
- table.select(0, 0);
- assertEquals(1, table.getSelectionCount());
- assertEquals(0, table.getSelectionIndex());
- assertEquals(new int[] {0}, table.getSelectionIndices());
-
- table.select(4, 4);
- assertEquals(new int[] {4}, table.getSelectionIndices());
-
- table.select(10, 10);
- assertEquals(new int[] {10}, table.getSelectionIndices());
-
- table.select(number-1, number-1);
- assertEquals(new int[] {number-1}, table.getSelectionIndices());
-
- table.deselectAll();
- table.select(number, number);
- assertEquals(new int[] {}, table.getSelectionIndices());
-
- table.select(0, number-1);
- assertEquals(new int[] {}, table.getSelectionIndices());
-
- table.select(-1, number);
- assertEquals(new int[] {}, table.getSelectionIndices());
-
- table.select(4, 5);
- assertEquals(new int[] {}, table.getSelectionIndices());
-
- table.select(5, 4);
- assertEquals(new int[] {}, table.getSelectionIndices());
-
- table.select(-1, -1);
- assertEquals(new int[] {}, table.getSelectionIndices());
-}
-
-public void test_setFontLorg_eclipse_swt_graphics_Font() {
- warnUnimpl("Test test_setFontLorg_eclipse_swt_graphics_Font not written");
-}
-
-public void test_setHeaderVisibleZ() {
- table.setHeaderVisible(true);
- assertTrue(table.getHeaderVisible());
-
- table.setHeaderVisible(false);
- assertTrue(!table.getHeaderVisible());
-}
-
-public void test_setLinesVisibleZ() {
- table.setLinesVisible(true);
- assertTrue(table.getLinesVisible());
-
- table.setLinesVisible(false);
- assertTrue(!table.getLinesVisible());
-}
-
-public void test_setRedrawZ() {
- warnUnimpl("Test test_setRedrawZ not written");
-}
-
-public void test_setSelection$I() {
- int number = 5;
- TableItem[] items = new TableItem[number];
- for (int i = 0; i < number; i++)
- items[i] = new TableItem(table, 0);
- try {
- table.setSelection((int[]) null);
- fail("No exception thrown for selection == null");
- }
- catch (IllegalArgumentException e) {
- }
-
- table.setSelection(new int[]{});
- assertEquals(new int[]{}, table.getSelectionIndices());
-
- table.setSelection(new int[]{0, 3, 2});
- assertSame(new int[]{0, 2, 3}, table.getSelectionIndices());
-
- table.setSelection(new int[]{3, 2, 1});
- assertSame(new int[]{1, 2, 3}, table.getSelectionIndices());
-
- table.setSelection(new int[]{1, 4, 0});
- assertSame(new int[]{0, 1, 4}, table.getSelectionIndices());
-
- table.setSelection(new int[]{0, 4, 0});
- assertSame(new int[]{0, 4}, table.getSelectionIndices());
-
- table.setSelection(new int[]{2, 3, 4});
- assertSame(new int[]{2, 3, 4}, table.getSelectionIndices());
-
- table.setSelection(new int[]{4, 4, 4, 4, 4, 4, 4});
- assertEquals(new int[]{4}, table.getSelectionIndices());
-
- table.setSelection(new int[]{4});
- assertEquals(new int[]{4}, table.getSelectionIndices());
-
- // test single-selection table
- makeCleanEnvironment(true);
-
- for (int i = 0; i < number; i++)
- items[i] = new TableItem(table, 0);
-
- try {
- table.setSelection((int[]) null);
- fail("No exception thrown for selection range == null");
- }
- catch (IllegalArgumentException e) {
- }
- finally {
- assertEquals(0, table.getSelectionCount());
- }
-
- table.setSelection(new int[] {});
- assertEquals(new int[] {}, table.getSelectionIndices());
-
- table.setSelection(new int[] {0});
- assertEquals(new int[] {0}, table.getSelectionIndices());
-
- table.setSelection(new int[] {2});
- assertEquals(new int[] {2}, table.getSelectionIndices());
-
- table.setSelection(new int[] {4});
- assertEquals(new int[] {4}, table.getSelectionIndices());
-
- table.setSelection(new int[] {number-1});
- assertEquals(new int[] {number-1}, table.getSelectionIndices());
-
- table.setSelection(new int[] {number});
- assertEquals(new int[] {}, table.getSelectionIndices());
-
- table.setSelection(new int[] {-1});
- assertEquals(new int[] {}, table.getSelectionIndices());
-
- table.setSelection(new int[] {0, 3, 2});
- assertEquals(new int[] {}, table.getSelectionIndices());
-
- table.setSelection(new int[] {3, 2, 1});
- assertEquals(new int[] {}, table.getSelectionIndices());
-
- table.setSelection(new int[] {4, 4, 4, 4, 4, 4, 4});
- assertEquals(new int[] {}, table.getSelectionIndices());
-}
-
-public void test_setSelection$Lorg_eclipse_swt_widgets_TableItem() {
- int number = 5;
- TableItem[] items = new TableItem[number];
- for (int i = 0; i < number; i++)
- items[i] = new TableItem(table, 0);
- try {
- table.setSelection((TableItem[]) null);
- fail("No exception thrown for selection range == null");
- }
- catch (IllegalArgumentException e) {
- }
- finally {
- assertEquals(0, table.getSelectionCount());
- }
-
- table.setSelection(new TableItem[]{});
- assertEquals(0, table.getSelectionCount());
-
- table.setSelection(new TableItem[]{items[0], items[3], items[2]});
- assertSame(new TableItem[]{items[0], items[2], items[3]}, table.getSelection());
- table.setSelection(new TableItem[]{items[3], items[2], items[1]});
- assertSame(new TableItem[]{items[1], items[2], items[3]}, table.getSelection());
-
- table.setSelection(new TableItem[]{items[1], items[4], items[0]});
- assertSame(new TableItem[]{items[0], items[1], items[4]}, table.getSelection());
- table.setSelection(new TableItem[]{items[0], items[4], items[0]});
- assertSame(new TableItem[]{items[0], items[4]}, table.getSelection());
-
- table.setSelection(new TableItem[]{items[2], items[3], items[4]});
- assertSame(new TableItem[]{items[2], items[3], items[4]}, table.getSelection());
-
- table.setSelection(new TableItem[]{items[4], items[4], items[4], items[4], items[4], items[4]});
- assertEquals(new TableItem[]{items[4]}, table.getSelection());
- table.setSelection(new TableItem[]{items[4]});
- assertEquals(new TableItem[]{items[4]}, table.getSelection());
-
- makeCleanEnvironment(false);
-
- for (int i = 0; i < number; i++)
- items[i] = new TableItem(table, 0);
-
- table.setSelection(new TableItem[] {items[0]});
- assertEquals(new TableItem[] {items[0]}, table.getSelection());
-
- table.setSelection(new TableItem[] {items[3]});
- assertEquals(new TableItem[] {items[3]}, table.getSelection());
-
- table.setSelection(new TableItem[] {items[4]});
- assertEquals(new TableItem[] {items[4]}, table.getSelection());
- table.setSelection(new TableItem[] {items[2]});
- assertEquals(new TableItem[] {items[2]}, table.getSelection());
- table.setSelection(new TableItem[] {items[1]});
- assertEquals(new TableItem[] {items[1]}, table.getSelection());
-
- // test single-selection table
- makeCleanEnvironment(true);
-
- for (int i = 0; i < number; i++)
- items[i] = new TableItem(table, 0);
-
- table.setSelection(new TableItem[]{});
- assertEquals(0, table.getSelectionCount());
-
- table.setSelection(new TableItem[]{items[0], items[3], items[2]});
- assertEquals(new TableItem[]{}, table.getSelection());
-
- table.setSelection(new TableItem[]{items[3], items[2], items[1]});
- assertEquals(new TableItem[]{}, table.getSelection());
-
- table.setSelection(new TableItem[]{items[1], items[4], items[0]});
- assertEquals(new TableItem[]{}, table.getSelection());
-
- table.setSelection(new TableItem[]{items[0], items[4], items[0]});
- assertEquals(new TableItem[]{}, table.getSelection());
-
- table.setSelection(new TableItem[]{items[2], items[3], items[4]});
- assertEquals(new TableItem[]{}, table.getSelection());
-
- table.setSelection(new TableItem[]{items[4]});
- assertEquals(new TableItem[]{items[4]}, table.getSelection());
-
- table.setSelection(new TableItem[] {items[0]});
- assertEquals(new TableItem[] {items[0]}, table.getSelection());
-
- table.setSelection(new TableItem[] {items[3]});
- assertEquals(new TableItem[] {items[3]}, table.getSelection());
-
- table.setSelection(new TableItem[] {items[4]});
- assertEquals(new TableItem[] {items[4]}, table.getSelection());
-
- table.setSelection(new TableItem[] {items[2]});
- assertEquals(new TableItem[] {items[2]}, table.getSelection());
-
- table.setSelection(new TableItem[] {items[1]});
- assertEquals(new TableItem[] {items[1]}, table.getSelection());
-
- table.setSelection(new TableItem[]{items[4], items[4], items[4], items[4], items[4], items[4]});
- assertEquals(new TableItem[]{}, table.getSelection());
-}
-
-public void test_setSelectionI() {
- int number = 5;
- TableItem[] items = new TableItem[number];
- for (int i = 0; i < number; i++)
- items[i] = new TableItem(table, 0);
-
- table.setSelection(0);
- assertEquals(new int[]{0}, table.getSelectionIndices());
- table.setSelection(3);
- assertEquals(new int[]{3}, table.getSelectionIndices());
- table.setSelection(4);
- assertEquals(new int[]{4}, table.getSelectionIndices());
-
- table.setSelection(2);
- assertEquals(new int[]{2}, table.getSelectionIndices());
-
- table.setSelection(1);
- assertEquals(new int[]{1}, table.getSelectionIndices());
-
- // test single-selection table
- makeCleanEnvironment(true);
-
- for (int i = 0; i < number; i++)
- items[i] = new TableItem(table, 0);
-
- table.setSelection(0);
- assertEquals(new int[]{0}, table.getSelectionIndices());
-
- table.setSelection(3);
- assertEquals(new int[]{3}, table.getSelectionIndices());
-
- table.setSelection(4);
- assertEquals(new int[]{4}, table.getSelectionIndices());
-
- table.setSelection(2);
- assertEquals(new int[]{2}, table.getSelectionIndices());
-
- table.setSelection(1);
- assertEquals(new int[]{1}, table.getSelectionIndices());
-
-}
-
-public void test_setSelectionII() {
- int number = 5;
- TableItem[] items = new TableItem[number];
- for (int i = 0; i < number; i++)
- items[i] = new TableItem(table, 0);
-
- table.setSelection(0, 1);
- assertSame(new int[]{0, 1}, table.getSelectionIndices());
-
- table.setSelection(2, 4);
- assertSame(new int[]{2, 3, 4}, table.getSelectionIndices());
-
- table.setSelection(3, 4);
- assertSame(new int[]{3, 4}, table.getSelectionIndices());
-
- table.setSelection(5, 4);
- assertEquals(new int[]{}, table.getSelectionIndices());
-
- table.setSelection(2, 2);
- assertEquals(new int[]{2}, table.getSelectionIndices());
-
- table.setSelection(1, 4);
- assertSame(new int[]{1, 2, 3, 4}, table.getSelectionIndices());
-
- table.setSelection(0, 4);
- assertSame(new int[]{0, 1, 2, 3, 4}, table.getSelectionIndices());
-
- // test single-selection table
- makeCleanEnvironment(true);
-
- for (int i = 0; i < number; i++)
- items[i] = new TableItem(table, 0);
- table.setSelection(0, 1);
- if (fCheckSWTPolicy)
- assertEquals(new int[] {1}, table.getSelectionIndices());
- table.setSelection(2, 4);
- if (fCheckSWTPolicy)
- assertEquals(new int[] {4}, table.getSelectionIndices());
- table.setSelection(5, 4);
- if (fCheckSWTPolicy)
- assertEquals(new int[] {}, table.getSelectionIndices());
- table.setSelection(2, 2);
- assertEquals(new int[] {2}, table.getSelectionIndices());
- table.setSelection(1, 4);
- if (fCheckSWTPolicy)
- assertEquals(new int[] {4}, table.getSelectionIndices());
- table.setSelection(0, 4);
- if (fCheckSWTPolicy)
- assertEquals(new int[] {4}, table.getSelectionIndices());
-}
-
-public void test_setTopIndexI() {
- warnUnimpl("Test test_setTopIndexI not written");
-}
-
-public void test_showItemLorg_eclipse_swt_widgets_TableItem() {
- warnUnimpl("Test test_showItemLorg_eclipse_swt_widgets_TableItem not written");
-}
-
-public void test_showSelection() {
- table.showSelection();
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_widgets_Table((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_CompositeI");
- methodNames.addElement("test_addSelectionListenerLorg_eclipse_swt_events_SelectionListener");
- methodNames.addElement("test_computeSizeIIZ");
- methodNames.addElement("test_deselect$I");
- methodNames.addElement("test_deselectAll");
- methodNames.addElement("test_deselectI");
- methodNames.addElement("test_deselectII");
- methodNames.addElement("test_getColumnCount");
- methodNames.addElement("test_getColumnI");
- methodNames.addElement("test_getColumns");
- methodNames.addElement("test_getGridLineWidth");
- methodNames.addElement("test_getHeaderHeight");
- methodNames.addElement("test_getHeaderVisible");
- methodNames.addElement("test_getItemCount");
- methodNames.addElement("test_getItemHeight");
- methodNames.addElement("test_getItemI");
- methodNames.addElement("test_getItemLorg_eclipse_swt_graphics_Point");
- methodNames.addElement("test_getItems");
- methodNames.addElement("test_getLinesVisible");
- methodNames.addElement("test_getSelection");
- methodNames.addElement("test_getSelectionCount");
- methodNames.addElement("test_getSelectionIndex");
- methodNames.addElement("test_getSelectionIndices");
- methodNames.addElement("test_getTopIndex");
- methodNames.addElement("test_indexOfLorg_eclipse_swt_widgets_TableColumn");
- methodNames.addElement("test_indexOfLorg_eclipse_swt_widgets_TableItem");
- methodNames.addElement("test_isSelectedI");
- methodNames.addElement("test_remove$I");
- methodNames.addElement("test_removeAll");
- methodNames.addElement("test_removeI");
- methodNames.addElement("test_removeII");
- methodNames.addElement("test_removeSelectionListenerLorg_eclipse_swt_events_SelectionListener");
- methodNames.addElement("test_select$I");
- methodNames.addElement("test_selectAll");
- methodNames.addElement("test_selectI");
- methodNames.addElement("test_selectII");
- methodNames.addElement("test_setFontLorg_eclipse_swt_graphics_Font");
- methodNames.addElement("test_setHeaderVisibleZ");
- methodNames.addElement("test_setLinesVisibleZ");
- methodNames.addElement("test_setRedrawZ");
- methodNames.addElement("test_setSelection$I");
- methodNames.addElement("test_setSelection$Lorg_eclipse_swt_widgets_TableItem");
- methodNames.addElement("test_setSelectionI");
- methodNames.addElement("test_setSelectionII");
- methodNames.addElement("test_setTopIndexI");
- methodNames.addElement("test_showItemLorg_eclipse_swt_widgets_TableItem");
- methodNames.addElement("test_showSelection");
- methodNames.addAll(Test_org_eclipse_swt_widgets_Composite.methodNames()); // add superclass method names
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_CompositeI")) test_ConstructorLorg_eclipse_swt_widgets_CompositeI();
- else if (getName().equals("test_addSelectionListenerLorg_eclipse_swt_events_SelectionListener")) test_addSelectionListenerLorg_eclipse_swt_events_SelectionListener();
- else if (getName().equals("test_computeSizeIIZ")) test_computeSizeIIZ();
- else if (getName().equals("test_deselect$I")) test_deselect$I();
- else if (getName().equals("test_deselectAll")) test_deselectAll();
- else if (getName().equals("test_deselectI")) test_deselectI();
- else if (getName().equals("test_deselectII")) test_deselectII();
- else if (getName().equals("test_getColumnCount")) test_getColumnCount();
- else if (getName().equals("test_getColumnI")) test_getColumnI();
- else if (getName().equals("test_getColumns")) test_getColumns();
- else if (getName().equals("test_getGridLineWidth")) test_getGridLineWidth();
- else if (getName().equals("test_getHeaderHeight")) test_getHeaderHeight();
- else if (getName().equals("test_getHeaderVisible")) test_getHeaderVisible();
- else if (getName().equals("test_getItemCount")) test_getItemCount();
- else if (getName().equals("test_getItemHeight")) test_getItemHeight();
- else if (getName().equals("test_getItemI")) test_getItemI();
- else if (getName().equals("test_getItemLorg_eclipse_swt_graphics_Point")) test_getItemLorg_eclipse_swt_graphics_Point();
- else if (getName().equals("test_getItems")) test_getItems();
- else if (getName().equals("test_getLinesVisible")) test_getLinesVisible();
- else if (getName().equals("test_getSelection")) test_getSelection();
- else if (getName().equals("test_getSelectionCount")) test_getSelectionCount();
- else if (getName().equals("test_getSelectionIndex")) test_getSelectionIndex();
- else if (getName().equals("test_getSelectionIndices")) test_getSelectionIndices();
- else if (getName().equals("test_getTopIndex")) test_getTopIndex();
- else if (getName().equals("test_indexOfLorg_eclipse_swt_widgets_TableColumn")) test_indexOfLorg_eclipse_swt_widgets_TableColumn();
- else if (getName().equals("test_indexOfLorg_eclipse_swt_widgets_TableItem")) test_indexOfLorg_eclipse_swt_widgets_TableItem();
- else if (getName().equals("test_isSelectedI")) test_isSelectedI();
- else if (getName().equals("test_remove$I")) test_remove$I();
- else if (getName().equals("test_removeAll")) test_removeAll();
- else if (getName().equals("test_removeI")) test_removeI();
- else if (getName().equals("test_removeII")) test_removeII();
- else if (getName().equals("test_removeSelectionListenerLorg_eclipse_swt_events_SelectionListener")) test_removeSelectionListenerLorg_eclipse_swt_events_SelectionListener();
- else if (getName().equals("test_select$I")) test_select$I();
- else if (getName().equals("test_selectAll")) test_selectAll();
- else if (getName().equals("test_selectI")) test_selectI();
- else if (getName().equals("test_selectII")) test_selectII();
- else if (getName().equals("test_setFontLorg_eclipse_swt_graphics_Font")) test_setFontLorg_eclipse_swt_graphics_Font();
- else if (getName().equals("test_setHeaderVisibleZ")) test_setHeaderVisibleZ();
- else if (getName().equals("test_setLinesVisibleZ")) test_setLinesVisibleZ();
- else if (getName().equals("test_setRedrawZ")) test_setRedrawZ();
- else if (getName().equals("test_setSelection$I")) test_setSelection$I();
- else if (getName().equals("test_setSelection$Lorg_eclipse_swt_widgets_TableItem")) test_setSelection$Lorg_eclipse_swt_widgets_TableItem();
- else if (getName().equals("test_setSelectionI")) test_setSelectionI();
- else if (getName().equals("test_setSelectionII")) test_setSelectionII();
- else if (getName().equals("test_setTopIndexI")) test_setTopIndexI();
- else if (getName().equals("test_showItemLorg_eclipse_swt_widgets_TableItem")) test_showItemLorg_eclipse_swt_widgets_TableItem();
- else if (getName().equals("test_showSelection")) test_showSelection();
- else super.runTest();
-}
-
-/* custom */
-protected Table table;
-
-private void makeCleanEnvironment(boolean singleMode) {
-// this method must be private or protected so the auto-gen tool keeps it
- if ( singleMode == false )
- table = new Table(shell, SWT.MULTI);
- else
- table = new Table(shell, SWT.SINGLE);
- setWidget(table);
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_TableColumn.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_TableColumn.java
deleted file mode 100644
index 46934d4bdf..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_TableColumn.java
+++ /dev/null
@@ -1,261 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-import org.eclipse.swt.*;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.widgets.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.widgets.TableColumn
- *
- * @see org.eclipse.swt.widgets.TableColumn
- */
-public class Test_org_eclipse_swt_widgets_TableColumn extends Test_org_eclipse_swt_widgets_Item {
-
-public Test_org_eclipse_swt_widgets_TableColumn(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- super.setUp();
- table = new Table(shell, SWT.SINGLE);
- tableColumn = new TableColumn(table, SWT.NULL);
- setWidget(tableColumn);
-}
-
-protected void tearDown() {
- super.tearDown();
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_TableI() {
- try {
- new TableColumn(null, SWT.NULL);
- fail("No exception thrown for parent == null");
- }
- catch (IllegalArgumentException e) {
- }
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_TableII() {
- try {
- new TableColumn(null, SWT.NULL, 0);
- fail("No exception thrown for parent == null");
- }
- catch (IllegalArgumentException e) {
- }
-
- try {
- new TableColumn(table, SWT.NULL, -1);
- fail("No exception thrown for index == -1");
- }
- catch (IllegalArgumentException e) {
- }
-
- try {
- new TableColumn(table, SWT.NULL, 2);
- fail("No exception thrown for illegal index argument");
- }
- catch (IllegalArgumentException e) {
- }
-}
-
-public void test_addControlListenerLorg_eclipse_swt_events_ControlListener() {
- warnUnimpl("Test test_addControlListenerLorg_eclipse_swt_events_ControlListener not written");
-}
-
-public void test_addSelectionListenerLorg_eclipse_swt_events_SelectionListener() {
- try {
- tableColumn.addSelectionListener(null);
- fail("No exception thrown for selectionListener == null");
- }
- catch (IllegalArgumentException e) {
- }
-}
-
-public void test_getAlignment() {
- warnUnimpl("Test test_getAlignment not written");
-}
-
-public void test_getParent() {
- warnUnimpl("Test test_getParent not written");
-}
-
-public void test_getResizable() {
- warnUnimpl("Test test_getResizable not written");
-}
-
-public void test_getWidth() {
- int testWidth = 42;
-
-// try {
-// tableColumn.setWidth(-1);
-// assertTrue("No exception thrown", false);
-// }
-// catch (IllegalArgumentException e) {
-// assertTrue("Wrong error thrown: " + e, e.getMessage().equals("Argument not valid"));
-// }
-// catch (SWTException e) {
-// assertTrue("Wrong error thrown: " + e, e.getMessage().equals("Argument not valid"));
-// }
-
- tableColumn.setWidth(0);
- assertTrue(":a: width=" + tableColumn.getWidth() + " should be=" + 0, tableColumn.getWidth() == 0);
-
- tableColumn.setWidth(testWidth);
- assertTrue(":b: width=" + tableColumn.getWidth() + " should be=" + testWidth, tableColumn.getWidth() == testWidth);
-
- tableColumn.setWidth(testWidth);
- assertTrue(":c: width=" + tableColumn.getWidth() + " should be=" + testWidth, tableColumn.getWidth() == testWidth);
-}
-
-public void test_pack() {
- warnUnimpl("Test test_pack not written");
-}
-
-public void test_removeControlListenerLorg_eclipse_swt_events_ControlListener() {
- warnUnimpl("Test test_removeControlListenerLorg_eclipse_swt_events_ControlListener not written");
-}
-
-public void test_removeSelectionListenerLorg_eclipse_swt_events_SelectionListener() {
- SelectionListener listener = new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {}};
-
- tableColumn.removeSelectionListener(listener);
- tableColumn.addSelectionListener(listener);
- tableColumn.removeSelectionListener(listener);
- try {
- tableColumn.removeSelectionListener(null);
- fail("No exception thrown for selectionListener == null");
- }
- catch (IllegalArgumentException e) {
- }
-}
-
-public void test_setAlignmentI() {
- TableColumn column2;
-
- assertTrue(":a:", tableColumn.getAlignment() == SWT.LEFT);
-
- tableColumn.setAlignment(-1);
- assertTrue(":b:", tableColumn.getAlignment() == SWT.LEFT);
-
- tableColumn.setAlignment(SWT.RIGHT);
- assertTrue(
- ":c: Should not be allowed to set alignment of the first column",
- tableColumn.getAlignment() == SWT.LEFT);
-
- column2 = new TableColumn(table, SWT.NULL);
- column2.setAlignment(SWT.RIGHT);
- assertTrue(":d:", column2.getAlignment() == SWT.RIGHT);
-
- column2.setAlignment(SWT.CENTER);
- assertTrue(":e:", column2.getAlignment() == SWT.CENTER);
-
- column2.setAlignment(SWT.LEFT);
- assertTrue(":f:", column2.getAlignment() == SWT.LEFT);
-}
-
-public void test_setImageLorg_eclipse_swt_graphics_Image() {
- warnUnimpl("Test test_setImageLorg_eclipse_swt_graphics_Image not written");
-}
-
-public void test_setResizableZ() {
- assertTrue(":a:", tableColumn.getResizable() == true);
-
- tableColumn.setResizable(false);
- assertTrue(":b:", tableColumn.getResizable() == false);
-
- tableColumn.setResizable(false);
- assertTrue(":c:", tableColumn.getResizable() == false);
-
- tableColumn.setResizable(true);
- assertTrue(":d:", tableColumn.getResizable() == true);
-}
-
-public void test_setTextLjava_lang_String() {
- assertTrue(":a:", tableColumn.getText() == "");
-
- tableColumn.setText("text");
- assertTrue(":b:", tableColumn.getText() == "text");
-
- try {
- tableColumn.setText(null);
- fail("No exception thrown for column header == null");
- }
- catch (IllegalArgumentException e) {
- }
-}
-
-public void test_setWidthI() {
- warnUnimpl("Test test_setWidthI not written");
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_widgets_TableColumn((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_TableI");
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_TableII");
- methodNames.addElement("test_addControlListenerLorg_eclipse_swt_events_ControlListener");
- methodNames.addElement("test_addSelectionListenerLorg_eclipse_swt_events_SelectionListener");
- methodNames.addElement("test_getAlignment");
- methodNames.addElement("test_getParent");
- methodNames.addElement("test_getResizable");
- methodNames.addElement("test_getWidth");
- methodNames.addElement("test_pack");
- methodNames.addElement("test_removeControlListenerLorg_eclipse_swt_events_ControlListener");
- methodNames.addElement("test_removeSelectionListenerLorg_eclipse_swt_events_SelectionListener");
- methodNames.addElement("test_setAlignmentI");
- methodNames.addElement("test_setImageLorg_eclipse_swt_graphics_Image");
- methodNames.addElement("test_setResizableZ");
- methodNames.addElement("test_setTextLjava_lang_String");
- methodNames.addElement("test_setWidthI");
- methodNames.addAll(Test_org_eclipse_swt_widgets_Item.methodNames()); // add superclass method names
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_TableI")) test_ConstructorLorg_eclipse_swt_widgets_TableI();
- else if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_TableII")) test_ConstructorLorg_eclipse_swt_widgets_TableII();
- else if (getName().equals("test_addControlListenerLorg_eclipse_swt_events_ControlListener")) test_addControlListenerLorg_eclipse_swt_events_ControlListener();
- else if (getName().equals("test_addSelectionListenerLorg_eclipse_swt_events_SelectionListener")) test_addSelectionListenerLorg_eclipse_swt_events_SelectionListener();
- else if (getName().equals("test_getAlignment")) test_getAlignment();
- else if (getName().equals("test_getParent")) test_getParent();
- else if (getName().equals("test_getResizable")) test_getResizable();
- else if (getName().equals("test_getWidth")) test_getWidth();
- else if (getName().equals("test_pack")) test_pack();
- else if (getName().equals("test_removeControlListenerLorg_eclipse_swt_events_ControlListener")) test_removeControlListenerLorg_eclipse_swt_events_ControlListener();
- else if (getName().equals("test_removeSelectionListenerLorg_eclipse_swt_events_SelectionListener")) test_removeSelectionListenerLorg_eclipse_swt_events_SelectionListener();
- else if (getName().equals("test_setAlignmentI")) test_setAlignmentI();
- else if (getName().equals("test_setImageLorg_eclipse_swt_graphics_Image")) test_setImageLorg_eclipse_swt_graphics_Image();
- else if (getName().equals("test_setResizableZ")) test_setResizableZ();
- else if (getName().equals("test_setTextLjava_lang_String")) test_setTextLjava_lang_String();
- else if (getName().equals("test_setWidthI")) test_setWidthI();
- else super.runTest();
-}
-
-/* custom */
-protected TableColumn tableColumn;
-protected Table table;
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_TableItem.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_TableItem.java
deleted file mode 100644
index ff2b0124fe..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_TableItem.java
+++ /dev/null
@@ -1,591 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.graphics.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.widgets.TableItem
- *
- * @see org.eclipse.swt.widgets.TableItem
- */
-public class Test_org_eclipse_swt_widgets_TableItem extends Test_org_eclipse_swt_widgets_Item {
-
-public Test_org_eclipse_swt_widgets_TableItem(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- super.setUp();
- makeCleanEnvironment();
-}
-
-protected void tearDown() {
- super.tearDown();
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_TableI() {
- try {
- new TableItem(null, SWT.NULL);
- fail("No exception thrown for parent == null");
- }
- catch (IllegalArgumentException e) {
- }
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_TableII() {
- warnUnimpl("Test test_ConstructorLorg_eclipse_swt_widgets_TableII not written");
-}
-
-public void test_getBackground() {
- // tested in test_setBackgroundLorg_eclipse_swt_graphics_Color
-}
-
-public void test_getBackgroundI() {
- warnUnimpl("Test test_getBackgroundI not written");
-}
-
-public void test_getBoundsI() {
- int boundsX;
- Rectangle bounds;
- Table table2 = new Table(shell, SWT.CHECK);
- TableItem tableItem2 = new TableItem(table2, SWT.NULL);
- bounds = tableItem.getBounds(0);
- assertTrue(":a:", bounds.x > 0 && bounds.width > 0);
- boundsX = bounds.x;
- bounds = tableItem.getBounds(-1);
- assertTrue(":b:", bounds.equals(new Rectangle(0, 0, 0, 0)));
- bounds = tableItem.getBounds(1);
- assertTrue(":c:", bounds.equals(new Rectangle(0, 0, 0, 0)));
- //table2.setWidths(new int[] {30});
- TableColumn column = new TableColumn(table2, SWT.NONE, 0);
- column.setWidth(30);
- bounds = tableItem2.getBounds(0);
- assertTrue(":d:", bounds.x > boundsX && bounds.width > 0);
- bounds = tableItem2.getBounds(-1);
- assertEquals(new Rectangle(0, 0, 0, 0), bounds);
- bounds = tableItem2.getBounds(1);
- assertEquals(new Rectangle(0, 0, 0, 0), bounds);
-
-
- //
- makeCleanEnvironment();
-
- Image image = images[0];
- table2.dispose();
- table2 = new Table(shell, SWT.CHECK);
- tableItem2.dispose();
- tableItem2 = new TableItem(table2, SWT.NULL);
- column.dispose();
-
- new TableColumn(table, SWT.NULL);
- new TableColumn(table, SWT.NULL);
- tableItem.setImage(1, image);
- bounds = tableItem.getBounds(0);
- assertTrue(":a:", bounds.x >= 0 && bounds.width >= 0);
- boundsX = bounds.x;
- bounds = tableItem.getBounds(-1);
- assertEquals(new Rectangle(0, 0, 0, 0), bounds);
- bounds = tableItem.getBounds(1);
- //assert(":c:", bounds.x > 0 && bounds.width > 0); // ?? setting the image in one column does not affect width of other columns
- assertTrue(":c:", bounds.x >= 0 && bounds.height >= 0);
-
- column = new TableColumn(table2, SWT.NULL);
- column.setWidth(30);
- new TableColumn(table2, SWT.NULL);
- tableItem2.setImage(1, image);
- bounds = tableItem2.getBounds(0);
- assertTrue(":d:", bounds.x > boundsX && bounds.width > 0);
- bounds = tableItem2.getBounds(-1);
- assertEquals(new Rectangle(0, 0, 0, 0), bounds);
- bounds = tableItem2.getBounds(1);
- //assert(":f:", bounds.x > 0 && bounds.width > 0); // ?? setting the image in one column does not affect width of other columns
- assertTrue(":f:", bounds.x > 0 && bounds.height > 0);
-}
-
-public void test_getChecked() {
- warnUnimpl("Test test_getChecked not written");
-}
-
-public void test_getFont() {
- // tested in test_setFontLorg_eclipse_swt_graphics_Font
-}
-
-public void test_getFontI() {
- // tested in test_setFontILorg_eclipse_swt_graphics_Font
-}
-
-public void test_getForeground() {
- // tested in test_setForegroundLorg_eclipse_swt_graphics_Color
-}
-
-public void test_getForegroundI() {
- warnUnimpl("Test test_getForegroundI not written");
-}
-
-public void test_getGrayed() {
- warnUnimpl("Test test_getGrayed not written");
-}
-
-public void test_getImageBoundsI() {
-/**
- * Test without item image
- */
- Rectangle bounds;
- Table table2 = new Table(shell, SWT.CHECK);
- TableItem tableItem2 = new TableItem(table2, SWT.NULL);
- int imageX;
-
- assertEquals(new Rectangle(0, 0, 0, 0), tableItem.getImageBounds(-1));
-
- bounds = tableItem.getImageBounds(0);
- assertTrue(":b:", bounds.x > 0 && bounds.width == 0);
- imageX = bounds.x;
-
- assertEquals(new Rectangle(0, 0, 0, 0), tableItem.getImageBounds(1));
-
- assertEquals(new Rectangle(0, 0, 0, 0), tableItem2.getImageBounds(-1));
-
- bounds = tableItem2.getImageBounds(0);
- assertTrue(":e:", bounds.x > imageX && bounds.width == 0);
-
- assertEquals(new Rectangle(0, 0, 0, 0), tableItem2.getImageBounds(1));
- //
- makeCleanEnvironment();
-
- Image image = images[0];
- int imageWidth = image.getBounds().width;
- int imageHeight;
-
- tableItem.setImage(0, image);
- imageHeight = table.getItemHeight() - table.getGridLineWidth();
- assertEquals(new Rectangle(0, 0, 0, 0), tableItem.getImageBounds(-1));
-
- bounds = tableItem.getImageBounds(0);
-// assertTrue(":b:", bounds.x > 0 && bounds.width == imageWidth && bounds.height == imageHeight);
-// assertEquals(new Rectangle(0, 0, 0, 0), tableItem.getImageBounds(1));
-
-
- //
- makeCleanEnvironment();
-
- table2.dispose();
- table2 = new Table(shell, SWT.CHECK);
- tableItem2.dispose();
- tableItem2 = new TableItem(table2, SWT.NULL);
- Rectangle imageBounds = image.getBounds();
- imageWidth = imageBounds.width; tableItem2.setImage(0, image);
- imageHeight = table2.getItemHeight() - table2.getGridLineWidth();
- assertEquals(new Rectangle(0, 0, 0, 0), tableItem2.getImageBounds(-1));
-
- bounds = tableItem2.getImageBounds(0); // bounds.width should be check box width if they are wider than image
-// assertTrue(":b:", bounds.x > 0 && bounds.width > 0 && bounds.height == imageHeight);
-// assertEquals(new Rectangle(0, 0, 0, 0), tableItem2.getImageBounds(1));
-
-
- //
- makeCleanEnvironment();
-
- table2.dispose();
- table2 = new Table(shell, SWT.CHECK);
- tableItem2.dispose();
- tableItem2 = new TableItem(table2, SWT.NULL);
- image = images[1];
- imageBounds = image.getBounds();
- imageWidth = imageBounds.width;
- tableItem2.setImage(0, image);
- imageHeight = table2.getItemHeight() - table2.getGridLineWidth();
- assertEquals(new Rectangle(0, 0, 0, 0), tableItem2.getImageBounds(-1));
- bounds = tableItem2.getImageBounds(0); // bounds.width should be check box width if check box is wider than image
-// assertTrue(":b:", bounds.x > 0 && bounds.width > 0 && bounds.height == imageHeight);
- assertEquals(new Rectangle(0, 0, 0, 0), tableItem2.getImageBounds(1));
-}
-
-public void test_getImageI() {
- warnUnimpl("Test test_getImageI not written");
-}
-
-public void test_getImageIndent() {
- warnUnimpl("Test test_getImageIndent not written");
-}
-
-public void test_getParent() {
- assertEquals(table, tableItem.getParent());
-}
-
-public void test_getTextI() {
- warnUnimpl("Test test_getTextI not written");
-}
-
-public void test_setBackgroundILorg_eclipse_swt_graphics_Color() {
- warnUnimpl("Test test_setBackgroundILorg_eclipse_swt_graphics_Color not written");
-}
-
-public void test_setBackgroundLorg_eclipse_swt_graphics_Color() {
- Color color = new Color(tableItem.getDisplay(), 255, 0, 0);
- tableItem.setBackground(color);
- assertEquals(color, tableItem.getBackground());
- tableItem.setBackground(null);
- assertEquals(table.getBackground(),tableItem.getBackground());
- color.dispose();
- try {
- tableItem.setBackground(color);
- fail("No exception thrown for color disposed");
- } catch (IllegalArgumentException e) {
- }
-}
-
-public void test_setCheckedZ() {
- assertEquals(false, tableItem.getChecked());
-
- tableItem.setChecked(true);
- assertEquals(false, tableItem.getChecked());
- Table t = new Table(shell, SWT.CHECK);
- TableItem ti = new TableItem(t, SWT.NULL);
- ti.setChecked(true);
- assertTrue(ti.getChecked());
-
- ti.setChecked(false);
- assertEquals(false, ti.getChecked());
- t.dispose();
-}
-
-public void test_setFontLorg_eclipse_swt_graphics_Font() {
- Font font = tableItem.getFont();
- tableItem.setFont(font);
- assertEquals(font, tableItem.getFont());
-
- font = new Font(tableItem.getDisplay(), SwtJunit.testFontName, 10, SWT.NORMAL);
- tableItem.setFont(font);
- assertEquals(font, tableItem.getFont());
-
- tableItem.setFont(null);
- font.dispose();
- try {
- tableItem.setFont(font);
- tableItem.setFont(null);
- fail("No exception thrown for disposed font");
- } catch (IllegalArgumentException e) {
- }
-}
-
-public void test_setFontILorg_eclipse_swt_graphics_Font() {
- Font font = tableItem.getFont(0);
- tableItem.setFont(0, font);
- assertEquals(font, tableItem.getFont(0));
-
- font = new Font(tableItem.getDisplay(), SwtJunit.testFontName, 10, SWT.NORMAL);
- tableItem.setFont(0, font);
- assertEquals(font, tableItem.getFont(0));
-
- tableItem.setFont(0, null);
- font.dispose();
- try {
- tableItem.setFont(0, font);
- tableItem.setFont(0, null);
- fail("No exception thrown for disposed font");
- } catch (IllegalArgumentException e) {
- }
-}
-
-public void test_setForegroundILorg_eclipse_swt_graphics_Color() {
- warnUnimpl("Test test_setForegroundILorg_eclipse_swt_graphics_Color not written");
-}
-
-public void test_setForegroundLorg_eclipse_swt_graphics_Color() {
- Color color = new Color(tableItem.getDisplay(), 255, 0, 0);
- tableItem.setForeground(color);
- assertEquals(color, tableItem.getForeground());
- tableItem.setForeground(null);
- assertEquals(table.getForeground(),tableItem.getForeground());
- color.dispose();
- try {
- tableItem.setForeground(color);
- fail("No exception thrown for color disposed");
- } catch (IllegalArgumentException e) {
- }
-}
-
-public void test_setGrayedZ() {
- warnUnimpl("Test test_setGrayedZ not written");
-}
-
-public void test_setImage$Lorg_eclipse_swt_graphics_Image() {
- assertNull(tableItem.getImage(1));
- tableItem.setImage(-1, null);
- assertNull(tableItem.getImage(-1));
-
- tableItem.setImage(0, images[0]);
- assertEquals(images[0], tableItem.getImage(0));
- String texts[] = new String[images.length];
- for (int i = 0; i < texts.length; i++) {
- texts[i] = String.valueOf(i);
- }
-
- //table.setText(texts); // create enough columns for TableItem.setImage(Image[]) to work
- int columnCount = table.getColumnCount();
- if (columnCount < texts.length) {
- for (int i = columnCount; i < texts.length; i++){
- TableColumn column = new TableColumn(table, SWT.NONE);
- }
- }
- TableColumn[] columns = table.getColumns();
- for (int i = 0; i < texts.length; i++) {
- columns[i].setText(texts[i]);
- }
- tableItem.setImage(1, images[1]);
- assertEquals(images[1], tableItem.getImage(1));
- tableItem.setImage(images);
- for (int i = 0; i < images.length; i++) {
- assertEquals(images[i], tableItem.getImage(i));
- }
- try {
- tableItem.setImage((Image []) null);
- fail("No exception thrown for images == null");
- }
- catch (IllegalArgumentException e) {
- }
-}
-
-public void test_setImageILorg_eclipse_swt_graphics_Image() {
- warnUnimpl("Test test_setImageILorg_eclipse_swt_graphics_Image not written");
-}
-
-public void test_setImageIndentI() {
- assertEquals(0, tableItem.getImageIndent());
- tableItem.setImageIndent(1);
- assertEquals(1, tableItem.getImageIndent());
- tableItem.setImageIndent(-1);
- assertEquals(1, tableItem.getImageIndent());
-}
-
-public void test_setImageLorg_eclipse_swt_graphics_Image() {
- warnUnimpl("Test test_setImageLorg_eclipse_swt_graphics_Image not written");
-}
-
-public void test_setText$Ljava_lang_String() {
- final String TestString = "test";
- final String TestStrings[] = new String[] {TestString, TestString + "1", TestString + "2"};
-
- try {
- tableItem.setText((String []) null);
- fail("No exception thrown for strings == null");
- }
- catch (IllegalArgumentException e) {
- }
-
- /*
- * Test the getText/setText API with a Table that has only
- * the default column.
- */
-
- assertEquals(0, tableItem.getText(1).length());
-
- tableItem.setText(TestStrings);
- assertEquals(TestStrings[0], tableItem.getText(0));
- for (int i = 1; i < TestStrings.length; i++) {
- assertEquals(0, tableItem.getText(i).length());
- }
-
-
- /*
- * Test the getText/setText API with a Table that enough
- * columns to fit all test item texts.
- */
-
- int columnCount = table.getColumnCount();
- if (columnCount < images.length) {
- for (int i = columnCount; i < images.length; i++){
- TableColumn column = new TableColumn(table, SWT.NONE);
- }
- }
- TableColumn[] columns = table.getColumns();
- for (int i = 0; i < TestStrings.length; i++) {
- columns[i].setText(TestStrings[i]);
- }
- assertEquals(0, tableItem.getText(1).length());
-
-}
-
-public void test_setTextILjava_lang_String(){
- final String TestString = "test";
- final String TestStrings[] = new String[] {TestString, TestString + "1", TestString + "2"};
-
- /*
- * Test the getText/setText API with a Table that has only
- * the default column.
- */
-
- assertEquals(0, tableItem.getText(1).length());
- tableItem.setText(1, TestString);
- assertEquals(0, tableItem.getText(1).length());
- assertEquals(0, tableItem.getText(0).length());
-
- tableItem.setText(0, TestString);
- assertEquals(TestString, tableItem.getText(0));
- tableItem.setText(-1, TestStrings[1]);
- assertEquals(0, tableItem.getText(-1).length());
-
- /*
- * Test the getText/setText API with a Table that enough
- * columns to fit all test item texts.
- */
-
- makeCleanEnvironment();
-
- //table.setText(TestStrings); // create anough columns for TableItem.setText(String[]) to work
- int columnCount = table.getColumnCount();
- if (columnCount < images.length) {
- for (int i = columnCount; i < images.length; i++){
- TableColumn column = new TableColumn(table, SWT.NONE);
- }
- }
- TableColumn[] columns = table.getColumns();
- for (int i = 0; i < TestStrings.length; i++) {
- columns[i].setText(TestStrings[i]);
- }
- assertEquals(0, tableItem.getText(1).length());
-
-
- tableItem.setText(1, TestString);
- assertEquals(TestString, tableItem.getText(1));
- assertEquals(0, tableItem.getText(0).length());
-
- tableItem.setText(0, TestString);
- assertEquals(TestString, tableItem.getText(0));
-
-
- tableItem.setText(-1, TestStrings[1]);
- assertEquals(0, tableItem.getText(-1).length());
-
-
- try {
- tableItem.setText(-1, null);
- fail("No exception thrown for string == null");
- }
- catch (IllegalArgumentException e) {
- }
-
- try {
- tableItem.setText(0, null);
- fail("No exception thrown for string == null");
- }
- catch (IllegalArgumentException e) {
- }
-
-
-}
-
-public void test_setTextLjava_lang_String() {
- warnUnimpl("Test test_setTextLjava_lang_String not written");
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_widgets_TableItem((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_TableI");
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_TableII");
- methodNames.addElement("test_getBackground");
- methodNames.addElement("test_getBackgroundI");
- methodNames.addElement("test_getBoundsI");
- methodNames.addElement("test_getChecked");
- methodNames.addElement("test_getFont");
- methodNames.addElement("test_getFontI");
- methodNames.addElement("test_getForeground");
- methodNames.addElement("test_getForegroundI");
- methodNames.addElement("test_getGrayed");
- methodNames.addElement("test_getImageBoundsI");
- methodNames.addElement("test_getImageI");
- methodNames.addElement("test_getImageIndent");
- methodNames.addElement("test_getParent");
- methodNames.addElement("test_getTextI");
- methodNames.addElement("test_setBackgroundILorg_eclipse_swt_graphics_Color");
- methodNames.addElement("test_setBackgroundLorg_eclipse_swt_graphics_Color");
- methodNames.addElement("test_setCheckedZ");
- methodNames.addElement("test_setFontILorg_eclipse_swt_graphics_Font");
- methodNames.addElement("test_setFontLorg_eclipse_swt_graphics_Font");
- methodNames.addElement("test_setForegroundILorg_eclipse_swt_graphics_Color");
- methodNames.addElement("test_setForegroundLorg_eclipse_swt_graphics_Color");
- methodNames.addElement("test_setGrayedZ");
- methodNames.addElement("test_setImage$Lorg_eclipse_swt_graphics_Image");
- methodNames.addElement("test_setImageILorg_eclipse_swt_graphics_Image");
- methodNames.addElement("test_setImageIndentI");
- methodNames.addElement("test_setImageLorg_eclipse_swt_graphics_Image");
- methodNames.addElement("test_setText$Ljava_lang_String");
- methodNames.addElement("test_setTextILjava_lang_String");
- methodNames.addElement("test_setTextLjava_lang_String");
- methodNames.addAll(Test_org_eclipse_swt_widgets_Item.methodNames()); // add superclass method names
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_TableI")) test_ConstructorLorg_eclipse_swt_widgets_TableI();
- else if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_TableII")) test_ConstructorLorg_eclipse_swt_widgets_TableII();
- else if (getName().equals("test_getBackground")) test_getBackground();
- else if (getName().equals("test_getBackgroundI")) test_getBackgroundI();
- else if (getName().equals("test_getBoundsI")) test_getBoundsI();
- else if (getName().equals("test_getChecked")) test_getChecked();
- else if (getName().equals("test_getFont")) test_getFont();
- else if (getName().equals("test_getFontI")) test_getFontI();
- else if (getName().equals("test_getForeground")) test_getForeground();
- else if (getName().equals("test_getForegroundI")) test_getForegroundI();
- else if (getName().equals("test_getGrayed")) test_getGrayed();
- else if (getName().equals("test_getImageBoundsI")) test_getImageBoundsI();
- else if (getName().equals("test_getImageI")) test_getImageI();
- else if (getName().equals("test_getImageIndent")) test_getImageIndent();
- else if (getName().equals("test_getParent")) test_getParent();
- else if (getName().equals("test_getTextI")) test_getTextI();
- else if (getName().equals("test_setBackgroundILorg_eclipse_swt_graphics_Color")) test_setBackgroundILorg_eclipse_swt_graphics_Color();
- else if (getName().equals("test_setBackgroundLorg_eclipse_swt_graphics_Color")) test_setBackgroundLorg_eclipse_swt_graphics_Color();
- else if (getName().equals("test_setCheckedZ")) test_setCheckedZ();
- else if (getName().equals("test_setFontILorg_eclipse_swt_graphics_Font")) test_setFontILorg_eclipse_swt_graphics_Font();
- else if (getName().equals("test_setFontLorg_eclipse_swt_graphics_Font")) test_setFontLorg_eclipse_swt_graphics_Font();
- else if (getName().equals("test_setForegroundILorg_eclipse_swt_graphics_Color")) test_setForegroundILorg_eclipse_swt_graphics_Color();
- else if (getName().equals("test_setForegroundLorg_eclipse_swt_graphics_Color")) test_setForegroundLorg_eclipse_swt_graphics_Color();
- else if (getName().equals("test_setGrayedZ")) test_setGrayedZ();
- else if (getName().equals("test_setImage$Lorg_eclipse_swt_graphics_Image")) test_setImage$Lorg_eclipse_swt_graphics_Image();
- else if (getName().equals("test_setImageILorg_eclipse_swt_graphics_Image")) test_setImageILorg_eclipse_swt_graphics_Image();
- else if (getName().equals("test_setImageIndentI")) test_setImageIndentI();
- else if (getName().equals("test_setImageLorg_eclipse_swt_graphics_Image")) test_setImageLorg_eclipse_swt_graphics_Image();
- else if (getName().equals("test_setText$Ljava_lang_String")) test_setText$Ljava_lang_String();
- else if (getName().equals("test_setTextILjava_lang_String")) test_setTextILjava_lang_String();
- else if (getName().equals("test_setTextLjava_lang_String")) test_setTextLjava_lang_String();
- else super.runTest();
-}
-
-/* custom */
-Table table;
-TableItem tableItem;
-
-// this method must be private or protected so the auto-gen tool keeps it
-private void makeCleanEnvironment() {
- if ( tableItem != null ) tableItem.dispose();
- if ( table != null ) table.dispose();
- table = new Table(shell, 0);
- tableItem = new TableItem(table, 0);
- setWidget(tableItem);
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Text.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Text.java
deleted file mode 100644
index 9add5a6ca3..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Text.java
+++ /dev/null
@@ -1,1324 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.widgets.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.widgets.Text
- *
- * @see org.eclipse.swt.widgets.Text
- */
-public class Test_org_eclipse_swt_widgets_Text extends Test_org_eclipse_swt_widgets_Scrollable {
-
-public Test_org_eclipse_swt_widgets_Text(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- super.setUp();
- shell.pack();
- shell.open();
- makeCleanEnvironment(false); // use multi-line by default
-}
-
-protected void tearDown() {
- super.tearDown();
- shell.dispose();
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_CompositeI() {
- try {
- text = new Text(null, 0);
- fail("No exception thrown for parent == null");
- }
- catch (IllegalArgumentException e) {
- }
-
- int[] cases = {0, SWT.SINGLE, SWT.MULTI, SWT.MULTI | SWT.V_SCROLL, SWT.MULTI | SWT.H_SCROLL, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL,
- SWT.WRAP};
- for (int i = 0; i < cases.length; i++)
- text = new Text(shell, cases[i]);
-}
-
-public void test_addModifyListenerLorg_eclipse_swt_events_ModifyListener() {
- boolean exceptionThrown = false;
- ModifyListener listener = new ModifyListener() {
- public void modifyText(ModifyEvent event) {
- listenerCalled = true;
- }
- };
- try {
- text.addModifyListener(null);
- }
- catch (IllegalArgumentException e) {
- exceptionThrown = true;
- }
- assertTrue("Expected exception not thrown", exceptionThrown);
-
- // test whether all content modifying API methods send a Modify event
- text.addModifyListener(listener);
- listenerCalled = false;
- text.setText("new text");
- assertTrue("setText does not send event", listenerCalled);
-
- listenerCalled = false;
- text.removeModifyListener(listener);
- // cause to call the listener.
- text.setText("line");
- assertTrue("Listener not removed", listenerCalled == false);
- try {
- text.removeModifyListener(null);
- }
- catch (IllegalArgumentException e) {
- exceptionThrown = true;
- }
-}
-
-public void test_addSelectionListenerLorg_eclipse_swt_events_SelectionListener() {
- boolean exceptionThrown = false;
- listenerCalled = false;
- SelectionListener listener = new SelectionListener() {
- public void widgetSelected(SelectionEvent event) {
- listenerCalled = true;
- }
- public void widgetDefaultSelected(SelectionEvent event) {
- }
- };
- try {
- text.addSelectionListener(null);
- }
- catch (IllegalArgumentException e) {
- exceptionThrown = true;
- }
- text.addSelectionListener(listener);
- text.setText("12345");
- text.setSelection(1,3);
- assertTrue(":a:", listenerCalled == false);
- text.removeSelectionListener(listener);
- try {
- text.removeSelectionListener(null);
- }
- catch (IllegalArgumentException e) {
- exceptionThrown = true;
- }
-}
-
-public void test_addVerifyListenerLorg_eclipse_swt_events_VerifyListener() {
- final String line = "Line1";
- final String newLine = "NewLine1";
- boolean exceptionThrown = false;
- text.setText("");
-
- // test null listener case
- try {
- text.addVerifyListener(null);
- }
- catch (IllegalArgumentException e) {
- exceptionThrown = true;
- }
- assertTrue("Expected exception not thrown", exceptionThrown);
-
- // test append case
- VerifyListener listener = new VerifyListener() {
- public void verifyText(VerifyEvent event) {
- listenerCalled = true;
- assertEquals("Verify event data invalid", 0, event.start);
- assertEquals("Verify event data invalid", 0, event.end);
- assertEquals("Verify event data invalid", line, event.text);
- event.text = newLine;
- }
- };
- text.addVerifyListener(listener);
- listenerCalled = false;
- text.append(line);
- assertTrue("append does not send event", listenerCalled);
- assertEquals("Listener failed", newLine, text.getText());
- text.removeVerifyListener(listener);
-
- // test insert case
- listener = new VerifyListener() {
- public void verifyText(VerifyEvent event) {
- listenerCalled = true;
- assertEquals("Verify event data invalid", 8, event.start);
- assertEquals("Verify event data invalid", 8, event.end);
- assertEquals("Verify event data invalid", line, event.text);
- event.text = newLine;
- }
- };
- text.addVerifyListener(listener);
- listenerCalled = false;
- text.insert(line);
- assertTrue("insert does not send event", listenerCalled);
- assertEquals("Listener failed", newLine + newLine, text.getText());
- text.removeVerifyListener(listener);
-
- // test setText case
- listener = new VerifyListener() {
- public void verifyText(VerifyEvent event) {
- listenerCalled = true;
- assertEquals("Verify event data invalid", 0, event.start);
- assertEquals("Verify event data invalid", 16, event.end);
- assertEquals("Verify event data invalid", line, event.text);
- event.text = newLine;
- }
- };
- text.addVerifyListener(listener);
- text.setText(line);
- assertTrue("setText does not send event", listenerCalled);
- assertEquals("Listener failed", newLine, text.getText());
-
- // test remove case
- listenerCalled = false;
- text.removeVerifyListener(listener);
- text.setText(line);
- assertTrue("Listener not removed", listenerCalled == false);
-}
-
-public void test_appendLjava_lang_String() {
- try {
- text.append(null);
- fail("No exception thrown for string == null");
- }
- catch (IllegalArgumentException e) {
- }
-
- text.setText("01");
- text.append("23");
- assertEquals("0123", text.getText());
- text.append("45");
- assertEquals("012345", text.getText());
- text.setSelection(0);
- text.append("67");
- assertEquals("01234567", text.getText());
-
- text.setText("01");
- text.append("23");
- assertEquals("0123", text.getText());
- text.append("4" + delimiterString+ "5");
- assertEquals("01234" + delimiterString +"5", text.getText());
- text.setSelection(0);
- text.append("67");
- assertEquals("01234" + delimiterString+"567", text.getText());
-
- // tests a SINGLE line text editor
- makeCleanEnvironment(true);
-
- try {
- text.append(null);
- fail("No exception thrown on string == null");
- }
- catch (IllegalArgumentException e) {
- }
-
- // tests a SINGLE line text editor
- makeCleanEnvironment(true);
-
- text.setText("01");
- text.append("23");
- assertEquals("0123", text.getText());
- text.append("45");
- assertEquals("012345", text.getText());
- text.setSelection(0);
- text.append("67");
- assertEquals("01234567", text.getText());
-
- // tests a SINGLE line text editor
- makeCleanEnvironment(true);
-
- text.setText("01");
- text.append("23");
- assertEquals("0123", text.getText());
- text.append("4" + delimiterString+"5");
- assertEquals("01234" + delimiterString+"5", text.getText());
- text.setSelection(0);
- text.append("67");
- assertEquals("01234" + delimiterString+"567", text.getText());
-}
-
-public void test_clearSelection() {
- text.setText("01234567890");
- assertEquals("", text.getSelectionText());
- text.selectAll();
- assertEquals("01234567890", text.getSelectionText());
- text.clearSelection();
- assertEquals("", text.getSelectionText());
-
- text.setText("01234567890");
- assertEquals("", text.getSelectionText());
- text.selectAll();
- assertEquals("01234567890", text.getSelectionText());
- text.clearSelection();
- assertEquals("", text.getSelectionText());
-
- // tests a SINGLE line text editor
- makeCleanEnvironment(true);
-
- text.setText("01234567890");
- assertEquals("", text.getSelectionText());
- text.selectAll();
- assertEquals("01234567890", text.getSelectionText());
- text.clearSelection();
- assertEquals("", text.getSelectionText());
-}
-
-public void test_computeSizeIIZ() {
- // super class test is sufficient
-}
-
-public void test_copy() {
- text.copy();
-
- text.selectAll();
- text.copy();
- assertEquals("", text.getSelectionText());
-
- text.setText("00000");
- text.selectAll();
- text.copy();
- text.setSelection(2);
- assertEquals("", text.getSelectionText());
-
- text.setText("");
- text.paste();
- assertEquals("00000", text.getText());
-
- // tests a SINGLE line text editor
- makeCleanEnvironment(true);
-
- text.copy();
-
- text.selectAll();
- text.copy();
- assertEquals("", text.getSelectionText());
-
- text.setText("00000");
- text.selectAll();
- text.copy();
- text.setSelection(2);
- assertEquals("", text.getSelectionText());
-
- text.setText("");
- text.paste();
- assertEquals("00000", text.getText());
-}
-
-public void test_cut() {
- text.cut();
- text.setText("01234567890");
- text.setSelection(2, 5);
- text.cut();
- assertEquals("01567890", text.getText());
-
- text.selectAll();
- text.cut();
- assertEquals("", text.getText());
-
- // tests a SINGLE line text editor
- makeCleanEnvironment(true);
-
- text.cut();
-
- text.setText("01234567890");
- text.setSelection(2, 5);
- text.cut();
- assertEquals("01567890", text.getText());
-
- text.selectAll();
- text.cut();
- assertEquals("", text.getText());
-}
-
-public void test_getCaretLineNumber() {
- assertTrue(":a:", text.getCaretLineNumber() == 0);
- text.setText("Line0\r\n");
- assertTrue(":b:", text.getCaretLineNumber() == 0);
- text.setTopIndex(1);
- assertTrue(":c:", text.getCaretLineNumber() == 0);
-
- text.append("Line1");
- assertTrue(":d:", text.getCaretLineNumber() == 1);
- String newText = "Line-1\r\n";
- text.setSelection(0,0);
- text.insert(newText);
- assertTrue(":e:", text.getCaretLineNumber() == 1);
-
- text.setSelection(0,0);
- assertTrue(":f:", text.getCaretLineNumber() == 0);
- text.setSelection(8,8);
- assertTrue(":g:", text.getCaretLineNumber() == 1);
-}
-
-public void test_getCaretLocation() {
- // account for insets when asserting
- text.setSize(200,50);
- text.setSelection(0,0);
- text.insert("");
- assertTrue(":a:", text.getCaretLocation().x >= 0);
- assertTrue(":a:", text.getCaretLocation().y >= 0);
- text.setText("Line0\r\nLine1\r\nLine2");
- text.insert("");
- assertTrue(":b:", text.getCaretLocation().x >= 0);
- assertTrue(":b:", text.getCaretLocation().y >= 0);
- text.setSelection(1,1);
- assertTrue(":c:", text.getCaretLocation().x > 0);
- assertTrue(":c:", text.getCaretLocation().y >= 0);
-}
-
-public void test_getCaretPosition() {
- text.setText("Line");
- assertTrue(":a:", text.getCaretPosition() == 0);
- text.append("123");
- assertTrue(":b:", text.getCaretPosition() == 7);
- text.setSelection(1,3);
- text.insert("123");
- assertTrue(":b:", text.getCaretPosition() == 4);
-}
-
-public void test_getCharCount() {
- assertEquals(0, text.getCharCount());
- text.setText("");
- assertEquals(0, text.getCharCount());
- text.setText("01234567890");
- assertEquals(11, text.getCharCount());
-
- text.setText("012345" + delimiterString+"67890");
- assertEquals(11 + delimiterString.length(), text.getCharCount()); //might be bogus on UNIX
-
- text.setText("");
- assertEquals(0, text.getCharCount());
-
- text.setText("01234\t567890");
- assertEquals(12, text.getCharCount());
-
- //
- text.setText("");
- assertEquals(0, text.getCharCount());
- text.setText("01234567890");
- assertEquals(11, text.getCharCount());
-
- text.setText("012345" + delimiterString+"67890");
- assertEquals(11 + delimiterString.length(), text.getCharCount()); //might be bogus on UNIX
-
- text.setText("");
- assertEquals(0, text.getCharCount());
-
- text.setText("01234\t567890");
- assertEquals(12, text.getCharCount());
-
- // tests a SINGLE line text editor
- makeCleanEnvironment(true);
-
- assertEquals(0, text.getCharCount());
- text.setText("");
- assertEquals(0, text.getCharCount());
- text.setText("01234567890");
- assertEquals(11, text.getCharCount());
- if (fCheckBogusTestCases) {
- text.setText("012345"+ delimiterString + "67890");
- assertEquals(11 + delimiterString.length(), text.getCharCount()); //might be bogus on UNIX
- }
- text.setText("");
- assertEquals(0, text.getCharCount());
- if (!SwtJunit.isAIX) {
- text.setText("01234\t567890");
- assertEquals(12, text.getCharCount());
- }
-}
-
-public void test_getDoubleClickEnabled() {
- text.setDoubleClickEnabled(true);
- assertTrue(text.getDoubleClickEnabled());
-
- text.setDoubleClickEnabled(false);
- assertEquals(false, text.getDoubleClickEnabled());
-
- // this method tests a SINGLE line text editor
- makeCleanEnvironment(true);
-
- text.setDoubleClickEnabled(true);
- assertTrue(text.getDoubleClickEnabled());
-
- text.setDoubleClickEnabled(false);
- assertEquals(false, text.getDoubleClickEnabled());
-}
-
-public void test_getEchoChar() {
- // tests a SINGLE line text editor
- makeCleanEnvironment(true);
-
- text.setEchoChar('a');
- assertEquals('a', text.getEchoChar());
-}
-
-public void test_getEditable() {
- assertTrue(":a:", text.getEditable() == true);
- text.setEditable(true);
- assertTrue(":b:", text.getEditable() == true);
- text.setEditable(false);
- assertTrue(":c:", text.getEditable() == false);
- text.setEditable(false);
- assertTrue(":d:", text.getEditable() == false);
- text.setEditable(true);
- assertTrue(":e:", text.getEditable() == true);
-}
-
-public void test_getLineCount() {
- assertEquals(1, text.getLineCount());
- text.append("dddasd" + delimiterString);
- assertEquals(2, text.getLineCount());
- text.append("ddasdasdasdasd" + delimiterString);
- assertEquals(3, text.getLineCount());
-
- // tests a SINGLE line text editor
- makeCleanEnvironment(true);
-
- assertEquals(1, text.getLineCount());
- text.append("dddasd" + delimiterString);
- assertEquals(1, text.getLineCount());
- text.append("ddasdasdasdasd" + delimiterString);
- assertEquals(1, text.getLineCount());
-}
-
-public void test_getLineDelimiter() {
- String platform = SWT.getPlatform();
- String delimiter = text.getLineDelimiter();
- if (platform.equals("win32")) {
- assertTrue(":a:", delimiter.equals("\r\n"));
- } else if (platform.equals("motif")) {
- assertTrue(":a:", delimiter.equals("\n"));
- }
-}
-
-public void test_getLineHeight() {
- assertTrue(":a:", text.getLineHeight() > 0);
-}
-
-public void test_getOrientation() {
- // tested in setOrientation
-}
-
-public void test_getSelection() {
- text.setText("01234567890");
- text.setSelection(new Point(2, 2));
- assertTrue(":b:", text.getSelection().equals(new Point(2, 2)));
- text.setSelection(new Point(2, 3));
- assertTrue(":c:", text.getSelection().equals(new Point(2, 3)));
- text.setSelection(new Point(3, 11));
- assertTrue(":d:", text.getSelection().equals(new Point(3, 11)));
- text.setText("01234567890");
- text.setSelection(4);
- assertTrue(":a:", text.getSelection().equals(new Point(4, 4)));
- text.setSelection(11);
- assertTrue(":b:", text.getSelection().equals(new Point(11, 11)));
- text.setSelection(new Point(3, 2));
- assertTrue(":c:", text.getSelection().equals(new Point(2, 3)));
-}
-
-public void test_getSelectionCount() {
- text.setText("01234567890");
- assertTrue(":a:", text.getSelectionCount()==0);
- text.setSelection(2, 4);
- assertTrue(":b:", text.getSelectionCount()==2);
- text.setSelection(2, 11);
- assertTrue(":c:", text.getSelectionCount()==9);
- text.setText("0123\n4567890");
- assertTrue(":d:", text.getSelectionCount()==0);
- text.setSelection(2, 4);
- assertTrue(":e:", text.getSelectionCount()==2);
- text.setSelection(2, 12);
- assertTrue(":f:", text.getSelectionCount()==10);
-}
-
-public void test_getSelectionText() {
- text.setText("01234567890");
- assertEquals("", text.getSelectionText());
- text.setSelection(3, 7);
- assertEquals("3456", text.getSelectionText());
-
- text.selectAll();
- assertEquals("01234567890", text.getSelectionText());
-}
-
-public void test_getTabs() {
- if (SWT.getPlatform().equals("win32")) {
- // API not supported on all platforms (e.g., Motif)
- text.setTabs(1);
- assertTrue(":a:", text.getTabs() == 1);
- text.setTabs(8);
- assertTrue(":b:", text.getTabs() == 8);
- text.setText("Line\t1\r\n");
- assertTrue(":c:", text.getTabs() == 8);
- text.setTabs(7);
- assertTrue(":d:", text.getTabs() == 7);
- }
-}
-
-public void test_getText() {
- assertEquals("", text.getText());
- text.setText("01234567890");
- assertEquals("01234567890", text.getText());
- text.setText("");
- assertEquals("", text.getText());
- String string = "012345" + delimiterString + "67890";
- text.setText(string);
- assertEquals(string, text.getText());
-}
-
-public void test_getTextII() {
- assertEquals("", text.getText());
- assertEquals("", text.getText(-4,-4));
- assertEquals("", text.getText(-4,-2));
- assertEquals("", text.getText(-2,-1));
- assertEquals("", text.getText(-1,-1));
- assertEquals("", text.getText(-1,0));
- assertEquals("", text.getText(0,0));
- assertEquals("", text.getText(0,1));
-
- text.setText("a");
- assertEquals("", text.getText(-4,-4));
- assertEquals("", text.getText(-4,-2));
- assertEquals("", text.getText(-2,-1));
- assertEquals("", text.getText(-1,-1));
- assertEquals("a", text.getText(-1,0));
- assertEquals("a", text.getText(0,0));
- assertEquals("a", text.getText(0,1));
-
- text.setText("01234567890");
- assertEquals("345", text.getText(3, 5));
- assertEquals("012", text.getText(-1, 2));
- assertEquals("34567890", text.getText(3, 100));
- assertEquals("", text.getText(5, 3));
-
- text.setText("");
- text.setEchoChar('*');
-
- assertEquals("", text.getText());
- assertEquals("", text.getText(-4,-4));
- assertEquals("", text.getText(-4,-2));
- assertEquals("", text.getText(-2,-1));
- assertEquals("", text.getText(-1,-1));
- assertEquals("", text.getText(-1,0));
- assertEquals("", text.getText(0,0));
- assertEquals("", text.getText(0,1));
-
- text.setText("a");
- assertEquals("", text.getText(-4,-4));
- assertEquals("", text.getText(-4,-2));
- assertEquals("", text.getText(-2,-1));
- assertEquals("", text.getText(-1,-1));
- assertEquals("a", text.getText(-1,0));
- assertEquals("a", text.getText(0,0));
- assertEquals("a", text.getText(0,1));
-
- text.setText("01234567890");
- assertEquals("345", text.getText(3, 5));
- assertEquals("012", text.getText(-1, 2));
- assertEquals("34567890", text.getText(3, 100));
- assertEquals("", text.getText(5, 3));
-}
-
-public void test_getTextLimit() {
- text.setTextLimit(10);
- assertTrue(":a:", text.getTextLimit() == 10);
-}
-
-public void test_getTopIndex() {
- text.setSize(50,text.getLineHeight() * 2);
- text.setTopIndex(0);
- assertEquals(0, text.getTopIndex());
- text.append(delimiterString +"0123456789");
- text.setTopIndex(1);
- assertEquals(1, text.getTopIndex());
- text.setTopIndex(17);
- assertEquals(1, text.getTopIndex());
-}
-
-public void test_getTopPixel() {
- text.setText("Line0\r\nLine0a\r\n");
-
- assertTrue(":a:", text.getTopPixel() == 0);
- text.setTopIndex(-2);
- assertTrue(":b:", text.getTopPixel() == 0);
- text.setTopIndex(-1);
- assertTrue(":c:", text.getTopPixel() == 0);
- text.setTopIndex(1);
- assertTrue(":d:", text.getTopPixel() == text.getLineHeight());
- text.setSize(10, text.getLineHeight());
- text.setTopIndex(2);
- assertTrue(":e:", text.getTopPixel() == text.getLineHeight() * 2);
- text.setTopIndex(0);
- assertTrue(":f:", text.getTopPixel() == 0);
- text.setTopIndex(3);
- assertTrue(":g:", text.getTopPixel() == text.getLineHeight() * 2);
-}
-
-public void test_insertLjava_lang_String() {
- try {
- text.insert(null);
- fail("No exception thrown for string == null");
- }
- catch (IllegalArgumentException e) {
- }
-
- assertEquals("", text.getText());
- text.insert("");
- assertEquals("", text.getText());
- text.insert("fred");
- assertEquals("fred", text.getText());
- text.setSelection(2);
- text.insert("helmut");
- assertEquals("frhelmuted", text.getText());
-
- text.setText("01234567890");
- text.setSelection(4);
- assertEquals(1, text.getLineCount());
- text.insert(delimiterString);
- assertEquals(2, text.getLineCount());
-
- // tests a SINGLE line text editor
- makeCleanEnvironment(true);
-
- try {
- text.insert(null);
- fail("No exception thrown on string == null");
- }
- catch (IllegalArgumentException e) {
- }
-
- // tests a SINGLE line text editor
- makeCleanEnvironment(true);
-
- assertEquals("", text.getText());
- text.insert("");
- assertEquals("", text.getText());
- text.insert("fred");
- assertEquals("fred", text.getText());
- text.setSelection(2);
- text.insert("helmut");
- assertEquals("frhelmuted", text.getText());
-
- // tests a SINGLE line text editor
- makeCleanEnvironment(true);
-
- text.setText("01234567890");
- text.setSelection(4);
- assertEquals(1, text.getLineCount());
- text.insert(Text.DELIMITER);
- assertEquals(1, text.getLineCount());
-
- // tests a SINGLE line text editor
- makeCleanEnvironment(true);
-
- try {
- text.insert(null);
- fail("No exception thrown on string == null");
- }
- catch (IllegalArgumentException e) {
- }
-}
-
-public void test_isVisible() {
- // overriding test_isVisible() from Control
- control.setVisible(true);
- assertTrue(control.isVisible());
-
- control.setVisible(false);
- assertTrue(!control.isVisible());
-
- if (!SwtJunit.isAIX) {
- control.setVisible(true);
- shell.setVisible(true);
- assertTrue("Window should be visible", control.isVisible());
- shell.setVisible(false);
- assertTrue("Window should not be visible", !control.isVisible());
- }
-}
-
-public void test_paste() {
- text.setText("01234567890");
- text.setSelection(2, 4);
- assertEquals("01234567890", text.getText());
- text.copy();
- text.setSelection(0);
- text.paste();
- assertEquals("2301234567890", text.getText());
- text.copy();
- text.setSelection(3);
- text.paste();
- assertEquals("230231234567890", text.getText());
-
- text.setText("0" + delimiterString + "1");
- text.selectAll();
- text.copy();
- text.setSelection(0);
- text.paste();
- assertEquals("0" + delimiterString + "1" + "0" + delimiterString + "1", text.getText());
-
- // tests a SINGLE line text editor
- makeCleanEnvironment(true);
-
- text.setText("01234567890");
- text.setSelection(2, 4);
- assertEquals("01234567890", text.getText());
- text.copy();
- text.setSelection(0);
- text.paste();
- assertEquals("2301234567890", text.getText());
- text.copy();
- text.setSelection(3);
- text.paste();
- assertEquals("230231234567890", text.getText());
-
- // tests a SINGLE line text editor
- makeCleanEnvironment(true);
-
- text.setText("0" + delimiterString + "1");
- text.selectAll();
- text.copy();
- text.setSelection(0);
- text.paste();
-
- if (fCheckSWTPolicy)
- assertEquals("0" + delimiterString + "1" + "0" + delimiterString + "1", text.getText());
-}
-
-public void test_removeModifyListenerLorg_eclipse_swt_events_ModifyListener() {
- // tested in addModifyListener method
-}
-
-public void test_removeSelectionListenerLorg_eclipse_swt_events_SelectionListener() {
- // tested in addSelectionListener method
-}
-
-public void test_removeVerifyListenerLorg_eclipse_swt_events_VerifyListener() {
- // tested in addVerifyListener method
-}
-
-public void test_selectAll() {
- text.setText("01234567890");
- assertEquals("01234567890", text.getText());
- text.selectAll();
- assertEquals("01234567890", text.getSelectionText());
- text.cut();
- assertEquals("", text.getText());
-
- text.setText("01234" + delimiterString+"567890");
- assertEquals("01234" + delimiterString+"567890", text.getText());
- text.selectAll();
- assertEquals("01234" + delimiterString+"567890", text.getSelectionText());
- text.cut();
- assertEquals("", text.getText());
-
- // tests a SINGLE line text editor
- makeCleanEnvironment(true);
-
- text.setText("01234567890");
- assertEquals("01234567890", text.getText());
- text.selectAll();
- assertEquals("01234567890", text.getSelectionText());
- text.cut();
- assertEquals("", text.getText());
-
- // tests a SINGLE line text editor
- if (fCheckBogusTestCases) {
- text.setText("01234" + delimiterString+"567890");
- assertEquals("01234" + delimiterString+"567890", text.getText());
- text.selectAll();
- assertEquals("01234" + delimiterString+"567890", text.getSelectionText());
- text.cut();
- assertEquals("", text.getText());
- }
-}
-
-public void test_setDoubleClickEnabledZ() {
- text.setDoubleClickEnabled(true);
- assertTrue(text.getDoubleClickEnabled());
-
- text.setDoubleClickEnabled(false);
- assertEquals(false, text.getDoubleClickEnabled());
-
- // tests a SINGLE line text editor
- makeCleanEnvironment(true);
-
- text.setDoubleClickEnabled(true);
- assertTrue(text.getDoubleClickEnabled());
-
- text.setDoubleClickEnabled(false);
- assertEquals(false, text.getDoubleClickEnabled());
-}
-
-public void test_setEchoCharC() {
- // tests a SINGLE line text editor
- makeCleanEnvironment(true);
-
- for (int i=0; i<128; i++){
- text.setEchoChar((char) i);
- assertEquals((char)i, text.getEchoChar());
- }
-
- // tests a SINGLE line text editor
- makeCleanEnvironment(true);
-
- text.setEchoChar('a');
- assertEquals('a', text.getEchoChar());
-
- text.setEchoChar((char) 0);
- assertEquals((char)0, text.getEchoChar());
-
- text.setEchoChar('\n');
- assertEquals('\n', text.getEchoChar());
-
- for (int i=0; i<128; i++){
- text.setEchoChar((char) i);
- assertEquals((char)i, text.getEchoChar());
- }
-}
-
-public void test_setEditableZ() {
- text.setEditable(true);
- assertTrue(":a:", text.getEditable() == true);
- text.setEditable(false);
- assertTrue(":b:", text.getEditable() == false);
- text.setEditable(false);
- assertTrue(":c:", text.getEditable() == false);
- text.setEditable(true);
- assertTrue(":d:", text.getEditable() == true);
-}
-
-public void test_setFontLorg_eclipse_swt_graphics_Font() {
- FontData fontData = text.getFont().getFontData()[0];
- int lineHeight;
- Font font;
-
- font = new Font(text.getDisplay(), fontData.getName(), 8, fontData.getStyle());
- text.setFont(font);
- lineHeight = text.getLineHeight();
- text.setFont(null);
- font.dispose();
- font = new Font(text.getDisplay(), fontData.getName(), 12, fontData.getStyle());
- text.setFont(font);
- assertTrue(":a:", text.getLineHeight() > lineHeight && font.equals(text.getFont()));
- text.setFont(null);
- font.dispose();
-}
-
-public void test_setOrientationI() {
- text.setOrientation(SWT.RIGHT_TO_LEFT);
- if ((text.getStyle() & SWT.MIRRORED) != 0) {
- assertTrue(":a:", text.getOrientation()==SWT.RIGHT_TO_LEFT);
- }
- text.setOrientation(SWT.LEFT_TO_RIGHT);
- assertTrue(":b:", text.getOrientation()==SWT.LEFT_TO_RIGHT);
-}
-
-public void test_setRedrawZ() {
- text.setRedraw(false);
- text.setRedraw(true);
-}
-
-public void test_setSelectionI() {
- text.setText("01234567890");
- assertEquals("", text.getSelectionText());
- text.setSelection(3, 7);
- assertEquals("3456", text.getSelectionText());
- text.setSelection(3, 0);
- assertEquals("012", text.getSelectionText());
-}
-
-public void test_setSelectionII() {
- text.setText("01234567890");
- assertEquals(0, text.getSelectionCount());
- text.setSelection(2, 4);
- assertEquals(2, text.getSelectionCount());
- text.setSelection(2, 100);
- assertEquals(9, text.getSelectionCount());
-
- text.setText("0123" + delimiterString +"4567890");
- assertEquals(0, text.getSelectionCount());
- text.setSelection(2, 4);
- assertEquals(2, text.getSelectionCount());
- text.setSelection(2, 100);
- assertEquals(9 + delimiterString.length(), text.getSelectionCount());
-
- // tests a SINGLE line text editor
- makeCleanEnvironment(true);
-
- text.setText("01234567890");
- assertEquals(0, text.getSelectionCount());
- text.setSelection(2, 4);
- assertEquals(2, text.getSelectionCount());
- text.setSelection(2, 100);
- assertEquals(9, text.getSelectionCount());
-
- // tests a SINGLE line text editor
- makeCleanEnvironment(true);
-
- text.setText("0123"+ delimiterString+"4567890");
- assertEquals(0, text.getSelectionCount());
- text.setSelection(2, 4);
- assertEquals(2, text.getSelectionCount());
- if (fCheckBogusTestCases) {
- text.setSelection(2, 100);
- assertEquals(9 +delimiterString.length(), text.getSelectionCount());
- }
-}
-
-public void test_setSelectionLorg_eclipse_swt_graphics_Point() {
- text.setText("dsdsdasdslaasdas");
- try {
- text.setSelection((Point) null);
- fail("No exception thrown for selection == null");
- }
- catch (IllegalArgumentException e) {
- }
-
- text.setText("01234567890");
- text.setSelection(new Point(2, 2));
- assertEquals(new Point(2, 2), text.getSelection());
-
- text.setSelection(new Point(3, 2));
- assertEquals(new Point(2, 3), text.getSelection());
-
- text.setSelection(new Point(3, 100));
- assertEquals(new Point(3, 11), text.getSelection());
-
- text.setText("01234567890");
- text.setSelection(4);
- assertEquals(new Point(4, 4), text.getSelection());
-
- text.setSelection(100);
- assertEquals(new Point(11, 11), text.getSelection());
-
- // tests a SINGLE line text editor
- makeCleanEnvironment(true);
-
- text.setText("dsdsdasdslaasdas");
- try {
- text.setSelection((Point) null);
- fail("No exception thrown for selection == null");
- }
- catch (IllegalArgumentException e) {
- }
-
- // tests a SINGLE line text editor
- makeCleanEnvironment(true);
-
- text.setText("01234567890");
-
- text.setSelection(new Point(2, 2));
- assertEquals(new Point(2, 2), text.getSelection());
-
- text.setSelection(new Point(3, 2));
- assertEquals(new Point(2, 3), text.getSelection());
-
- text.setSelection(new Point(3, 100));
- assertEquals(new Point(3, 11), text.getSelection());
-
- // tests a SINGLE line text editor
- makeCleanEnvironment(true);
-
- text.setText("01234567890");
- text.setSelection(4);
- assertEquals(new Point(4, 4), text.getSelection());
-
- text.setSelection(100);
- assertEquals(new Point(11, 11), text.getSelection());
-}
-
-public void test_setTabsI() {
- if (SwtJunit.isMotif) {
- for (int i = 0; i < 200; i++) {
- text.setTabs(i);
- assertEquals(8, text.getTabs());
- }
- } else {
- for (int i = 0; i < 200; i++) {
- text.setTabs(i);
- assertEquals(i, text.getTabs());
- }
- }
-}
-
-public void test_setTextLimitI() {
- boolean exceptionThrown = false;
-
- text.setTextLimit(10);
- assertTrue(":a:", text.getTextLimit() == 10);
-
- text.setTextLimit(Text.LIMIT);
- assertTrue(":b:", text.getTextLimit() == Text.LIMIT);
-
- try {
- text.setTextLimit(0);
- }
- catch (IllegalArgumentException e) {
- exceptionThrown = true;
- }
- assertTrue(":c:", exceptionThrown == true);
- exceptionThrown = false;
-}
-
-public void test_setTextLjava_lang_String() {
- try {
- text.setText(null);
- fail("No exception thrown for string == null");
- }
- catch (IllegalArgumentException e) {
- }
-
- text.setText("");
-
- // tests a SINGLE line text editor
- makeCleanEnvironment(true);
-
- assertEquals("", text.getText());
- text.setText("01234567890");
- assertEquals("01234567890", text.getText());
- text.setText("");
- assertEquals("", text.getText());
- if (fCheckBogusTestCases) {
- text.setText("012345" + delimiterString+ "67890");
- assertEquals("012345" + delimiterString +"67890", text.getText());
- }
-
- // tests a SINGLE line text editor
- makeCleanEnvironment(true);
-
- assertEquals("", text.getText());
-
- text.setText("01234567890");
- assertEquals("345", text.getText(3, 5));
- assertEquals("012", text.getText(-1, 2));
- assertEquals("34567890", text.getText(3, 100));
- assertEquals("", text.getText(5, 3));
-
- text.setText("");
- assertEquals("", text.getText(-1, 0));
- assertEquals("", text.getText(0, 10));
- assertEquals("", text.getText(1, 0));
-}
-
-public void test_setTopIndexI() {
- int number = 100;
- for (int i = 0; i < number; i++) {
- text.append("01234\n");
- }
- for (int i = 1; i < number; i++) {
- text.setTopIndex(i);
- assertEquals(i, text.getTopIndex());
- }
-
- text.setTopIndex(number+5);
- assertEquals(number, text.getTopIndex());
-
- // tests a SINGLE line text editor
- makeCleanEnvironment(true);
-
- text.setText("01234567890");
- text.append(Text.DELIMITER +"01234567890");
- text.setTopIndex(0);
- assertEquals(0, text.getTopIndex());
- text.setTopIndex(1);
- assertEquals(0, text.getTopIndex());
- text.setTopIndex(17);
- assertEquals(0, text.getTopIndex());
-
- text.setText("");
- for (int i = 0; i < number; i++) {
- text.append("01234" + Text.DELIMITER);
- }
- for (int i = 0; i < number; i++) {
- text.setTopIndex(i);
- assertEquals(0, text.getTopIndex());
- }
-}
-
-public void test_showSelection() {
- text.showSelection();
-
- text.selectAll();
- text.showSelection();
-
- text.setText("00000");
- text.selectAll();
- text.showSelection();
- text.clearSelection();
- text.showSelection();
-
- // this method tests a SINGLE line text editor
- makeCleanEnvironment(true);
-
- text.showSelection();
-
- text.selectAll();
- text.showSelection();
-
-
- text.setText("00000");
- text.selectAll();
- text.showSelection();
-
- text.clearSelection();
- text.showSelection();
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_widgets_Text((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_CompositeI");
- methodNames.addElement("test_addModifyListenerLorg_eclipse_swt_events_ModifyListener");
- methodNames.addElement("test_addSelectionListenerLorg_eclipse_swt_events_SelectionListener");
- methodNames.addElement("test_addVerifyListenerLorg_eclipse_swt_events_VerifyListener");
- methodNames.addElement("test_appendLjava_lang_String");
- methodNames.addElement("test_clearSelection");
- methodNames.addElement("test_computeSizeIIZ");
- methodNames.addElement("test_copy");
- methodNames.addElement("test_cut");
- methodNames.addElement("test_getCaretLineNumber");
- methodNames.addElement("test_getCaretLocation");
- methodNames.addElement("test_getCaretPosition");
- methodNames.addElement("test_getCharCount");
- methodNames.addElement("test_getDoubleClickEnabled");
- methodNames.addElement("test_getEchoChar");
- methodNames.addElement("test_getEditable");
- methodNames.addElement("test_getLineCount");
- methodNames.addElement("test_getLineDelimiter");
- methodNames.addElement("test_getLineHeight");
- methodNames.addElement("test_getOrientation");
- methodNames.addElement("test_getSelection");
- methodNames.addElement("test_getSelectionCount");
- methodNames.addElement("test_getSelectionText");
- methodNames.addElement("test_getTabs");
- methodNames.addElement("test_getText");
- methodNames.addElement("test_getTextII");
- methodNames.addElement("test_getTextLimit");
- methodNames.addElement("test_getTopIndex");
- methodNames.addElement("test_getTopPixel");
- methodNames.addElement("test_insertLjava_lang_String");
- methodNames.addElement("test_paste");
- methodNames.addElement("test_removeModifyListenerLorg_eclipse_swt_events_ModifyListener");
- methodNames.addElement("test_removeSelectionListenerLorg_eclipse_swt_events_SelectionListener");
- methodNames.addElement("test_removeVerifyListenerLorg_eclipse_swt_events_VerifyListener");
- methodNames.addElement("test_selectAll");
- methodNames.addElement("test_setDoubleClickEnabledZ");
- methodNames.addElement("test_setEchoCharC");
- methodNames.addElement("test_setEditableZ");
- methodNames.addElement("test_setFontLorg_eclipse_swt_graphics_Font");
- methodNames.addElement("test_setOrientationI");
- methodNames.addElement("test_setRedrawZ");
- methodNames.addElement("test_setSelectionI");
- methodNames.addElement("test_setSelectionII");
- methodNames.addElement("test_setSelectionLorg_eclipse_swt_graphics_Point");
- methodNames.addElement("test_setTabsI");
- methodNames.addElement("test_setTextLimitI");
- methodNames.addElement("test_setTextLjava_lang_String");
- methodNames.addElement("test_setTopIndexI");
- methodNames.addElement("test_showSelection");
- methodNames.addAll(Test_org_eclipse_swt_widgets_Scrollable.methodNames()); // add superclass method names
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_CompositeI")) test_ConstructorLorg_eclipse_swt_widgets_CompositeI();
- else if (getName().equals("test_addModifyListenerLorg_eclipse_swt_events_ModifyListener")) test_addModifyListenerLorg_eclipse_swt_events_ModifyListener();
- else if (getName().equals("test_addSelectionListenerLorg_eclipse_swt_events_SelectionListener")) test_addSelectionListenerLorg_eclipse_swt_events_SelectionListener();
- else if (getName().equals("test_addVerifyListenerLorg_eclipse_swt_events_VerifyListener")) test_addVerifyListenerLorg_eclipse_swt_events_VerifyListener();
- else if (getName().equals("test_appendLjava_lang_String")) test_appendLjava_lang_String();
- else if (getName().equals("test_clearSelection")) test_clearSelection();
- else if (getName().equals("test_computeSizeIIZ")) test_computeSizeIIZ();
- else if (getName().equals("test_copy")) test_copy();
- else if (getName().equals("test_cut")) test_cut();
- else if (getName().equals("test_getCaretLineNumber")) test_getCaretLineNumber();
- else if (getName().equals("test_getCaretLocation")) test_getCaretLocation();
- else if (getName().equals("test_getCaretPosition")) test_getCaretPosition();
- else if (getName().equals("test_getCharCount")) test_getCharCount();
- else if (getName().equals("test_getDoubleClickEnabled")) test_getDoubleClickEnabled();
- else if (getName().equals("test_getEchoChar")) test_getEchoChar();
- else if (getName().equals("test_getEditable")) test_getEditable();
- else if (getName().equals("test_getLineCount")) test_getLineCount();
- else if (getName().equals("test_getLineDelimiter")) test_getLineDelimiter();
- else if (getName().equals("test_getLineHeight")) test_getLineHeight();
- else if (getName().equals("test_getOrientation")) test_getOrientation();
- else if (getName().equals("test_getSelection")) test_getSelection();
- else if (getName().equals("test_getSelectionCount")) test_getSelectionCount();
- else if (getName().equals("test_getSelectionText")) test_getSelectionText();
- else if (getName().equals("test_getTabs")) test_getTabs();
- else if (getName().equals("test_getText")) test_getText();
- else if (getName().equals("test_getTextII")) test_getTextII();
- else if (getName().equals("test_getTextLimit")) test_getTextLimit();
- else if (getName().equals("test_getTopIndex")) test_getTopIndex();
- else if (getName().equals("test_getTopPixel")) test_getTopPixel();
- else if (getName().equals("test_insertLjava_lang_String")) test_insertLjava_lang_String();
- else if (getName().equals("test_paste")) test_paste();
- else if (getName().equals("test_removeModifyListenerLorg_eclipse_swt_events_ModifyListener")) test_removeModifyListenerLorg_eclipse_swt_events_ModifyListener();
- else if (getName().equals("test_removeSelectionListenerLorg_eclipse_swt_events_SelectionListener")) test_removeSelectionListenerLorg_eclipse_swt_events_SelectionListener();
- else if (getName().equals("test_removeVerifyListenerLorg_eclipse_swt_events_VerifyListener")) test_removeVerifyListenerLorg_eclipse_swt_events_VerifyListener();
- else if (getName().equals("test_selectAll")) test_selectAll();
- else if (getName().equals("test_setDoubleClickEnabledZ")) test_setDoubleClickEnabledZ();
- else if (getName().equals("test_setEchoCharC")) test_setEchoCharC();
- else if (getName().equals("test_setEditableZ")) test_setEditableZ();
- else if (getName().equals("test_setFontLorg_eclipse_swt_graphics_Font")) test_setFontLorg_eclipse_swt_graphics_Font();
- else if (getName().equals("test_setOrientationI")) test_setOrientationI();
- else if (getName().equals("test_setRedrawZ")) test_setRedrawZ();
- else if (getName().equals("test_setSelectionI")) test_setSelectionI();
- else if (getName().equals("test_setSelectionII")) test_setSelectionII();
- else if (getName().equals("test_setSelectionLorg_eclipse_swt_graphics_Point")) test_setSelectionLorg_eclipse_swt_graphics_Point();
- else if (getName().equals("test_setTabsI")) test_setTabsI();
- else if (getName().equals("test_setTextLimitI")) test_setTextLimitI();
- else if (getName().equals("test_setTextLjava_lang_String")) test_setTextLjava_lang_String();
- else if (getName().equals("test_setTopIndexI")) test_setTopIndexI();
- else if (getName().equals("test_showSelection")) test_showSelection();
- else super.runTest();
-}
-
-/* custom */
-Text text;
-String delimiterString;
-
-/**
- * Clean up the environment for a new test.
- *
- * @param single true if the new text widget should be single-line.
- */
-private void makeCleanEnvironment(boolean single) {
-// this method must be private or protected so the auto-gen tool keeps it
- if ( text != null ) text.dispose();
-
- if ( single == true )
- text = new Text(shell, SWT.SINGLE);
- else
- text = new Text(shell, SWT.MULTI | SWT.V_SCROLL | SWT.H_SCROLL);
- setWidget(text);
- delimiterString = Text.DELIMITER;
-}
-protected void setWidget(Widget w) {
- text = (Text)w;
- super.setWidget(w);
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_ToolBar.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_ToolBar.java
deleted file mode 100644
index 193f5ee366..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_ToolBar.java
+++ /dev/null
@@ -1,196 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.widgets.ToolBar
- *
- * @see org.eclipse.swt.widgets.ToolBar
- */
-public class Test_org_eclipse_swt_widgets_ToolBar extends Test_org_eclipse_swt_widgets_Composite {
-
-public Test_org_eclipse_swt_widgets_ToolBar(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- super.setUp();
- toolBar = new ToolBar(shell, 0);
- setWidget(toolBar);
-}
-
-protected void tearDown() {
- super.tearDown();
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_CompositeI() {
- try {
- new ToolBar(null, 0);
- fail("No exception thrown for parent == null");
- }
- catch (IllegalArgumentException e) {
- }
-}
-
-public void test_computeSizeIIZ() {
- warnUnimpl("Test test_computeSizeIIZ not written");
-}
-
-public void test_computeTrimIIII() {
- warnUnimpl("Test test_computeTrimIIII not written");
-}
-
-public void test_getItemCount() {
- int number = 10;
- ToolItem ti;
- for (int i = 0; i<number ; i++){
- assertTrue(":a:" + i, toolBar.getItemCount()==i);
- ti = new ToolItem(toolBar, 0);
- }
-}
-
-public void test_getItemI() {
- int number = 5;
- ToolItem[] items = new ToolItem[number];
- for (int i = 0; i<number ; i++){
- items[i] = new ToolItem(toolBar, 0);
- }
- for (int i = 0; i<number ; i++){
- assertTrue(":a:", toolBar.getItem(i)==items[i]);
- }
-
- toolBar = new ToolBar(shell, 0);
- number = 5;
- items = new ToolItem[number];
- for (int i = 0; i<number ; i++){
- items[i] = new ToolItem(toolBar, 0);
- }
- try {
- toolBar.getItem(number);
- fail("No exception thrown for illegal index argument");
- }
- catch (IllegalArgumentException e) {
- }
-}
-
-public void test_getItemLorg_eclipse_swt_graphics_Point() {
- warnUnimpl("Test test_getItemLorg_eclipse_swt_graphics_Point not written");
-}
-
-public void test_getItems() {
- int number = 5;
- ToolItem[] items = new ToolItem[number];
- for (int i = 0; i<number ; i++){
- items[i] = new ToolItem(toolBar, 0);
- }
- assertEquals(items, toolBar.getItems());
-
- toolBar.getItems()[0].dispose();
- assertEquals(new ToolItem[]{items[1], items[2], items[3], items[4]}, toolBar.getItems());
-
- toolBar.getItems()[3].dispose();
- assertEquals(new ToolItem[]{items[1], items[2], items[3]}, toolBar.getItems());
-
- toolBar.getItems()[1].dispose();
- assertEquals(new ToolItem[]{items[1], items[3]}, toolBar.getItems());
-}
-
-public void test_getRowCount() {
- toolBar = new ToolBar(shell, SWT.WRAP);
- int number = 5;
- ToolItem[] items = new ToolItem[number];
- for (int i = 0; i<number ; i++){
- items[i] = new ToolItem(toolBar, 0);
- }
- assertTrue(":a:" + toolBar.getRowCount(), toolBar.getRowCount()==number); //???? because of Size(0, 0)
-
- toolBar = new ToolBar(shell, 0);
- number = 5;
- items = new ToolItem[number];
- for (int i = 0; i<number ; i++){
- items[i] = new ToolItem(toolBar, 0);
- }
- assertTrue(":a:", toolBar.getRowCount()==1);
-}
-
-public void test_indexOfLorg_eclipse_swt_widgets_ToolItem() {
- int number = 10;
- ToolItem[] tis = new ToolItem[number];
- for (int i = 0; i<number ; i++){
- tis[i] = new ToolItem(toolBar, 0);
- }
- for (int i = 0; i<number ; i++){
- assertTrue(":a:" + i, toolBar.indexOf(tis[i])==i);
- }
-
- number = 10;
- tis = new ToolItem[number];
- for (int i = 0; i<number ; i++){
- tis[i] = new ToolItem(toolBar, 0);
- }
- for (int i = 0; i<number ; i++){
- try {
- toolBar.indexOf(null);
- fail("No exception thrown for toolItem == null");
- }
- catch (IllegalArgumentException e) {
- }
- }
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_widgets_ToolBar((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_CompositeI");
- methodNames.addElement("test_computeSizeIIZ");
- methodNames.addElement("test_computeTrimIIII");
- methodNames.addElement("test_getItemCount");
- methodNames.addElement("test_getItemI");
- methodNames.addElement("test_getItemLorg_eclipse_swt_graphics_Point");
- methodNames.addElement("test_getItems");
- methodNames.addElement("test_getRowCount");
- methodNames.addElement("test_indexOfLorg_eclipse_swt_widgets_ToolItem");
- methodNames.addAll(Test_org_eclipse_swt_widgets_Composite.methodNames()); // add superclass method names
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_CompositeI")) test_ConstructorLorg_eclipse_swt_widgets_CompositeI();
- else if (getName().equals("test_computeSizeIIZ")) test_computeSizeIIZ();
- else if (getName().equals("test_computeTrimIIII")) test_computeTrimIIII();
- else if (getName().equals("test_getItemCount")) test_getItemCount();
- else if (getName().equals("test_getItemI")) test_getItemI();
- else if (getName().equals("test_getItemLorg_eclipse_swt_graphics_Point")) test_getItemLorg_eclipse_swt_graphics_Point();
- else if (getName().equals("test_getItems")) test_getItems();
- else if (getName().equals("test_getRowCount")) test_getRowCount();
- else if (getName().equals("test_indexOfLorg_eclipse_swt_widgets_ToolItem")) test_indexOfLorg_eclipse_swt_widgets_ToolItem();
- else super.runTest();
-}
-
-/* custom */
-protected ToolBar toolBar;
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_ToolItem.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_ToolItem.java
deleted file mode 100644
index aad2025e86..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_ToolItem.java
+++ /dev/null
@@ -1,215 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import junit.framework.*;
-import junit.textui.*;
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.widgets.ToolItem
- *
- * @see org.eclipse.swt.widgets.ToolItem
- */
-public class Test_org_eclipse_swt_widgets_ToolItem extends Test_org_eclipse_swt_widgets_Item {
-
-public Test_org_eclipse_swt_widgets_ToolItem(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- super.setUp();
- toolBar = new ToolBar(shell, 0);
- toolItem = new ToolItem(toolBar, 0);
- setWidget(toolItem);
-}
-
-protected void tearDown() {
- super.tearDown();
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_ToolBarI() {
- try {
- new ToolItem(null, SWT.NULL);
- fail("No exception thrown for parent == null");
- }
- catch (IllegalArgumentException e) {
- }
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_ToolBarII() {
- warnUnimpl("Test test_ConstructorLorg_eclipse_swt_widgets_ToolBarII not written");
-}
-
-public void test_addSelectionListenerLorg_eclipse_swt_events_SelectionListener() {
- warnUnimpl("Test test_addSelectionListenerLorg_eclipse_swt_events_SelectionListener not written");
-}
-
-public void test_getBounds() {
- warnUnimpl("Test test_getBounds not written");
-}
-
-public void test_getControl() {
- warnUnimpl("Test test_getControl not written");
-}
-
-public void test_getDisabledImage() {
- warnUnimpl("Test test_getDisabledImage not written");
-}
-
-public void test_getEnabled() {
- warnUnimpl("Test test_getEnabled not written");
-}
-
-public void test_getHotImage() {
- warnUnimpl("Test test_getHotImage not written");
-}
-
-public void test_getParent() {
- warnUnimpl("Test test_getParent not written");
-}
-
-public void test_getSelection() {
- // Test for method boolean org.eclipse.swt.widgets.ToolItem.getSelection()
- warnUnimpl( "Test Test_org_eclipse_swt_widgets_ToolItem.test_5_getSelection not written");
-}
-
-public void test_getToolTipText() {
- toolItem.setToolTipText("fred");
- assertTrue(":a: ", toolItem.getToolTipText().equals("fred"));
- toolItem.setToolTipText("fredttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt");
- assertTrue(":a: ", toolItem.getToolTipText().equals("fredttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt"));
-}
-
-public void test_getWidth() {
- warnUnimpl("Test test_getWidth not written");
-}
-
-public void test_isEnabled() {
- // Test for method boolean org.eclipse.swt.widgets.ToolItem.isEnabled()
- warnUnimpl( "Test Test_org_eclipse_swt_widgets_ToolItem.test_7_isEnabled not written");
-}
-
-public void test_removeSelectionListenerLorg_eclipse_swt_events_SelectionListener() {
- warnUnimpl("Test test_removeSelectionListenerLorg_eclipse_swt_events_SelectionListener not written");
-}
-
-public void test_setControlLorg_eclipse_swt_widgets_Control() {
- warnUnimpl("Test test_setControlLorg_eclipse_swt_widgets_Control not written");
-}
-
-public void test_setDisabledImageLorg_eclipse_swt_graphics_Image() {
- warnUnimpl("Test test_setDisabledImageLorg_eclipse_swt_graphics_Image not written");
-}
-
-public void test_setEnabledZ() {
- // Test for method void org.eclipse.swt.widgets.ToolItem.setEnabled(boolean)
- warnUnimpl( "Test Test_org_eclipse_swt_widgets_ToolItem.test_8_setEnabled not written");
-}
-
-public void test_setHotImageLorg_eclipse_swt_graphics_Image() {
- warnUnimpl("Test test_setHotImageLorg_eclipse_swt_graphics_Image not written");
-}
-
-public void test_setImageLorg_eclipse_swt_graphics_Image() {
- warnUnimpl("Test test_setImageLorg_eclipse_swt_graphics_Image not written");
-}
-
-public void test_setSelectionZ() {
- warnUnimpl("Test test_setSelectionZ not written");
-}
-
-public void test_setTextLjava_lang_String() {
- warnUnimpl("Test test_setTextLjava_lang_String not written");
-}
-
-public void test_setToolTipTextLjava_lang_String() {
- warnUnimpl("Test test_setToolTipTextLjava_lang_String not written");
-}
-
-public void test_setWidthI() {
- warnUnimpl("Test test_setWidthI not written");
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_widgets_ToolItem((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_ToolBarI");
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_ToolBarII");
- methodNames.addElement("test_addSelectionListenerLorg_eclipse_swt_events_SelectionListener");
- methodNames.addElement("test_getBounds");
- methodNames.addElement("test_getControl");
- methodNames.addElement("test_getDisabledImage");
- methodNames.addElement("test_getEnabled");
- methodNames.addElement("test_getHotImage");
- methodNames.addElement("test_getParent");
- methodNames.addElement("test_getSelection");
- methodNames.addElement("test_getToolTipText");
- methodNames.addElement("test_getWidth");
- methodNames.addElement("test_isEnabled");
- methodNames.addElement("test_removeSelectionListenerLorg_eclipse_swt_events_SelectionListener");
- methodNames.addElement("test_setControlLorg_eclipse_swt_widgets_Control");
- methodNames.addElement("test_setDisabledImageLorg_eclipse_swt_graphics_Image");
- methodNames.addElement("test_setEnabledZ");
- methodNames.addElement("test_setHotImageLorg_eclipse_swt_graphics_Image");
- methodNames.addElement("test_setImageLorg_eclipse_swt_graphics_Image");
- methodNames.addElement("test_setSelectionZ");
- methodNames.addElement("test_setTextLjava_lang_String");
- methodNames.addElement("test_setToolTipTextLjava_lang_String");
- methodNames.addElement("test_setWidthI");
- methodNames.addAll(Test_org_eclipse_swt_widgets_Item.methodNames()); // add superclass method names
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_ToolBarI")) test_ConstructorLorg_eclipse_swt_widgets_ToolBarI();
- else if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_ToolBarII")) test_ConstructorLorg_eclipse_swt_widgets_ToolBarII();
- else if (getName().equals("test_addSelectionListenerLorg_eclipse_swt_events_SelectionListener")) test_addSelectionListenerLorg_eclipse_swt_events_SelectionListener();
- else if (getName().equals("test_getBounds")) test_getBounds();
- else if (getName().equals("test_getControl")) test_getControl();
- else if (getName().equals("test_getDisabledImage")) test_getDisabledImage();
- else if (getName().equals("test_getEnabled")) test_getEnabled();
- else if (getName().equals("test_getHotImage")) test_getHotImage();
- else if (getName().equals("test_getParent")) test_getParent();
- else if (getName().equals("test_getSelection")) test_getSelection();
- else if (getName().equals("test_getToolTipText")) test_getToolTipText();
- else if (getName().equals("test_getWidth")) test_getWidth();
- else if (getName().equals("test_isEnabled")) test_isEnabled();
- else if (getName().equals("test_removeSelectionListenerLorg_eclipse_swt_events_SelectionListener")) test_removeSelectionListenerLorg_eclipse_swt_events_SelectionListener();
- else if (getName().equals("test_setControlLorg_eclipse_swt_widgets_Control")) test_setControlLorg_eclipse_swt_widgets_Control();
- else if (getName().equals("test_setDisabledImageLorg_eclipse_swt_graphics_Image")) test_setDisabledImageLorg_eclipse_swt_graphics_Image();
- else if (getName().equals("test_setEnabledZ")) test_setEnabledZ();
- else if (getName().equals("test_setHotImageLorg_eclipse_swt_graphics_Image")) test_setHotImageLorg_eclipse_swt_graphics_Image();
- else if (getName().equals("test_setImageLorg_eclipse_swt_graphics_Image")) test_setImageLorg_eclipse_swt_graphics_Image();
- else if (getName().equals("test_setSelectionZ")) test_setSelectionZ();
- else if (getName().equals("test_setTextLjava_lang_String")) test_setTextLjava_lang_String();
- else if (getName().equals("test_setToolTipTextLjava_lang_String")) test_setToolTipTextLjava_lang_String();
- else if (getName().equals("test_setWidthI")) test_setWidthI();
- else super.runTest();
-}
-
-/* custom */
-ToolBar toolBar;
-ToolItem toolItem;
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Tracker.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Tracker.java
deleted file mode 100644
index 4b3fca6440..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Tracker.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-import org.eclipse.swt.widgets.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.widgets.Tracker
- *
- * @see org.eclipse.swt.widgets.Tracker
- */
-public class Test_org_eclipse_swt_widgets_Tracker extends Test_org_eclipse_swt_widgets_Widget {
-
-public Test_org_eclipse_swt_widgets_Tracker(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- super.setUp();
- tracker = new Tracker(shell, 0);
- setWidget(tracker);
-}
-
-protected void tearDown() {
- super.tearDown();
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_CompositeI() {
- warnUnimpl("Test test_ConstructorLorg_eclipse_swt_widgets_CompositeI not written");
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_DisplayI() {
- warnUnimpl("Test test_ConstructorLorg_eclipse_swt_widgets_DisplayI not written");
-}
-
-public void test_addControlListenerLorg_eclipse_swt_events_ControlListener() {
- warnUnimpl("Test test_addControlListenerLorg_eclipse_swt_events_ControlListener not written");
-}
-
-public void test_close() {
- warnUnimpl("Test test_close not written");
-}
-
-public void test_getRectangles() {
- warnUnimpl("Test test_getRectangles not written");
-}
-
-public void test_getStippled() {
- warnUnimpl("Test test_getStippled not written");
-}
-
-public void test_open() {
- warnUnimpl("Test test_open not written");
-}
-
-public void test_removeControlListenerLorg_eclipse_swt_events_ControlListener() {
- warnUnimpl("Test test_removeControlListenerLorg_eclipse_swt_events_ControlListener not written");
-}
-
-public void test_setCursorLorg_eclipse_swt_graphics_Cursor() {
- warnUnimpl("Test test_setCursorLorg_eclipse_swt_graphics_Cursor not written");
-}
-
-public void test_setRectangles$Lorg_eclipse_swt_graphics_Rectangle() {
- warnUnimpl("Test test_setRectangles$Lorg_eclipse_swt_graphics_Rectangle not written");
-}
-
-public void test_setStippledZ() {
- warnUnimpl("Test test_setStippledZ not written");
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_widgets_Tracker((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_CompositeI");
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_DisplayI");
- methodNames.addElement("test_addControlListenerLorg_eclipse_swt_events_ControlListener");
- methodNames.addElement("test_close");
- methodNames.addElement("test_getRectangles");
- methodNames.addElement("test_getStippled");
- methodNames.addElement("test_open");
- methodNames.addElement("test_removeControlListenerLorg_eclipse_swt_events_ControlListener");
- methodNames.addElement("test_setCursorLorg_eclipse_swt_graphics_Cursor");
- methodNames.addElement("test_setRectangles$Lorg_eclipse_swt_graphics_Rectangle");
- methodNames.addElement("test_setStippledZ");
- methodNames.addAll(Test_org_eclipse_swt_widgets_Widget.methodNames()); // add superclass method names
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_CompositeI")) test_ConstructorLorg_eclipse_swt_widgets_CompositeI();
- else if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_DisplayI")) test_ConstructorLorg_eclipse_swt_widgets_DisplayI();
- else if (getName().equals("test_addControlListenerLorg_eclipse_swt_events_ControlListener")) test_addControlListenerLorg_eclipse_swt_events_ControlListener();
- else if (getName().equals("test_close")) test_close();
- else if (getName().equals("test_getRectangles")) test_getRectangles();
- else if (getName().equals("test_getStippled")) test_getStippled();
- else if (getName().equals("test_open")) test_open();
- else if (getName().equals("test_removeControlListenerLorg_eclipse_swt_events_ControlListener")) test_removeControlListenerLorg_eclipse_swt_events_ControlListener();
- else if (getName().equals("test_setCursorLorg_eclipse_swt_graphics_Cursor")) test_setCursorLorg_eclipse_swt_graphics_Cursor();
- else if (getName().equals("test_setRectangles$Lorg_eclipse_swt_graphics_Rectangle")) test_setRectangles$Lorg_eclipse_swt_graphics_Rectangle();
- else if (getName().equals("test_setStippledZ")) test_setStippledZ();
- else super.runTest();
-}
-
-/* custom */
- Tracker tracker;
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Tree.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Tree.java
deleted file mode 100644
index e93775849d..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Tree.java
+++ /dev/null
@@ -1,568 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.widgets.Tree
- *
- * @see org.eclipse.swt.widgets.Tree
- */
-public class Test_org_eclipse_swt_widgets_Tree extends Test_org_eclipse_swt_widgets_Composite {
-
-public Test_org_eclipse_swt_widgets_Tree(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- super.setUp();
- tree = new Tree(shell, SWT.MULTI);
- setWidget(tree);
-}
-
-protected void tearDown() {
- super.tearDown();
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_CompositeI() {
- try {
- tree = new Tree(null, 0);
- fail("No exception thrown for parent == null");
- }
- catch (IllegalArgumentException e) {
- }
-
- int[] cases = {0, SWT.BORDER};
- for (int i = 0; i < cases.length; i++)
- tree = new Tree(shell, cases[i]);
-
- cases = new int[]{0, 10, 100};
- for (int j = 0; j < cases.length; j++) {
- for (int i = 0; i < cases[j]; i++) {
- TreeItem ti = new TreeItem(tree, 0);
- }
- assertEquals(cases[j], tree.getItemCount());
- tree.removeAll();
- }
-}
-
-public void test_addSelectionListenerLorg_eclipse_swt_events_SelectionListener() {
- warnUnimpl("Test test_addSelectionListenerLorg_eclipse_swt_events_SelectionListener not written");
-}
-
-public void test_addTreeListenerLorg_eclipse_swt_events_TreeListener() {
- warnUnimpl("Test test_addTreeListenerLorg_eclipse_swt_events_TreeListener not written");
-}
-
-public void test_computeSizeIIZ() {
- warnUnimpl("Test test_computeSizeIIZ not written");
-}
-
-public void test_deselectAll() {
- int number = 15;
- TreeItem[] items = new TreeItem[number];
- for (int i = 0; i < number; i++)
- items[i] = new TreeItem(tree, 0);
-
- assertEquals(0, tree.getSelectionCount());
- tree.setSelection(new TreeItem[] {items[2], items[4], items[5], items[10]});
-
- assertEquals(4, tree.getSelectionCount());
-
- tree.deselectAll();
- assertEquals(0, tree.getSelectionCount());
-
- tree.selectAll();
- assertEquals(number, tree.getSelectionCount());
-
- tree.deselectAll();
- assertEquals(0, tree.getSelectionCount());
-}
-
-public void test_getItemCount() {
- warnUnimpl("Test test_getItemCount not written");
-}
-
-public void test_getItemHeight() {
- assertTrue(":a: Item height is 0", tree.getItemHeight() > 0);
- new TreeItem(tree, 0);
- assertTrue(":b: Item height is 0", tree.getItemHeight() > 0);
-}
-
-public void test_getItemLorg_eclipse_swt_graphics_Point() {
- warnUnimpl("Test test_getItemLorg_eclipse_swt_graphics_Point not written");
-}
-
-public void test_getItems() {
- int[] cases = {0, 10, 100};
- for (int j = 0; j < cases.length; j++) {
- for (int i = 0; i < cases[j]; i++) {
- TreeItem ti = new TreeItem(tree, 0);
- }
- assertEquals(cases[j], tree.getItems().length);
- tree.removeAll();
- assertEquals(0, tree.getItemCount());
- }
-
- makeCleanEnvironment(false);
-
- for (int j = 0; j < cases.length; j++) {
- for (int i = 0; i < cases[j]; i++) {
- TreeItem ti = new TreeItem(tree, 0);
- ti.setText(String.valueOf(i));
- }
- TreeItem[] items = tree.getItems();
- for (int i = 0; i < items.length; i++) {
- assertEquals(String.valueOf(i), items[i].getText());
- }
- tree.removeAll();
- assertEquals(0, tree.getItemCount());
- }
-}
-
-public void test_getParentItem() {
- assertNull(tree.getParentItem());
-}
-
-public void test_getSelection() {
- // Tested in setSelection.
-}
-
-public void test_getSelectionCount() {
- int number = 15;
- TreeItem[] items = new TreeItem[number];
- for (int i = 0; i < number; i++)
- items[i] = new TreeItem(tree, 0);
-
- assertEquals(0, tree.getSelectionCount());
-
- tree.setSelection(new TreeItem[]{items[2]});
- assertEquals(1, tree.getSelectionCount());
-
- tree.setSelection(new TreeItem[]{items[number-1]});
- assertEquals(1, tree.getSelectionCount());
-
- tree.setSelection(new TreeItem[]{items[10]});
- assertEquals(1, tree.getSelectionCount());
-
- tree.setSelection(new TreeItem[]{items[2], items[number-1], items[10]});
- assertEquals(3, tree.getSelectionCount());
-
- tree.setSelection(items);
- assertEquals(15, tree.getSelectionCount());
-
- tree.setSelection(new TreeItem[]{});
- assertEquals(0, tree.getSelectionCount());
-
-
- makeCleanEnvironment(true); // use single-selection tree.
-
- items = new TreeItem[number];
- for (int i = 0; i < number; i++)
- items[i] = new TreeItem(tree, 0);
-
- assertEquals(0, tree.getSelectionCount());
-
- tree.setSelection(new TreeItem[]{items[2]});
- assertEquals(1, tree.getSelectionCount());
-
- tree.setSelection(new TreeItem[]{items[number-1]});
- assertEquals(1, tree.getSelectionCount());
-
- tree.setSelection(new TreeItem[]{items[10]});
- assertEquals(1, tree.getSelectionCount());
-
- tree.setSelection(new TreeItem[]{items[2], items[number-1], items[10]});
- assertEquals(0, tree.getSelectionCount());
-
- tree.setSelection(items);
- assertEquals(0, tree.getSelectionCount());
-
- tree.setSelection(new TreeItem[]{});
- assertEquals(0, tree.getSelectionCount());
-}
-
-public void test_getTopItem() {
-// tested in test_setTopItemLorg_eclipse_swt_widgets_TreeItem
-}
-
-public void test_removeAll() {
- tree.removeAll();
- assertEquals(0, tree.getItemCount());
-
- int number = 20;
- TreeItem[] items = new TreeItem[number];
- for (int i = 0; i < number; i++) {
- items[i] = new TreeItem(tree, 0);
- }
- assertEquals(number, tree.getItemCount());
-
- tree.removeAll();
- assertEquals(0, tree.getItemCount());
-}
-
-public void test_removeSelectionListenerLorg_eclipse_swt_events_SelectionListener() {
- warnUnimpl("Test test_removeSelectionListenerLorg_eclipse_swt_events_SelectionListener not written");
-}
-
-public void test_removeTreeListenerLorg_eclipse_swt_events_TreeListener() {
- warnUnimpl("Test test_removeTreeListenerLorg_eclipse_swt_events_TreeListener not written");
-}
-
-public void test_selectAll() {
- int number = 5;
- TreeItem[] items = new TreeItem[number];
- for (int i = 0; i < number; i++)
- items[i] = new TreeItem(tree, 0);
-
- assertEquals(0, tree.getSelectionCount());
- tree.selectAll();
- assertEquals(number, tree.getSelectionCount());
-
- makeCleanEnvironment(true); // single-selection tree
-
- items = new TreeItem[number];
- for (int i = 0; i < number; i++)
- items[i] = new TreeItem(tree, 0);
-
- assertEquals(0, tree.getSelectionCount());
- tree.selectAll();
- assertEquals(0, tree.getSelectionCount());
-}
-
-public void test_setInsertMarkLorg_eclipse_swt_widgets_TreeItemZ() {
- warnUnimpl("Test test_setInsertMarkLorg_eclipse_swt_widgets_TreeItemZ not written");
-}
-
-public void test_setRedrawZ() {
- warnUnimpl("Test test_setRedrawZ not written");
-}
-
-public void test_setSelection$Lorg_eclipse_swt_widgets_TreeItem() {
- int number = 20;
- TreeItem[] items = new TreeItem[number];
- for (int i = 0; i < number; i++) {
- items[i] = new TreeItem(tree, 0);
- }
-
- assertEquals(new TreeItem[] {}, tree.getSelection());
-
- tree.setSelection(new TreeItem[] {items[5], items[16], items[19]});
- assertSame(new TreeItem[] {items[5], items[16], items[19]}, tree.getSelection());
-
- tree.setSelection(items);
- assertSame(items, tree.getSelection());
-
- tree.setSelection(tree.getItems());
- assertSame(tree.getItems(), tree.getSelection());
-
- tree.setSelection(new TreeItem[] {});
- assertEquals(new TreeItem[] {}, tree.getSelection());
- assertEquals(0, tree.getSelectionCount());
-
- try {
- tree.setSelection((TreeItem[]) null);
- fail("No exception thrown for items == null");
- }
- catch (IllegalArgumentException e) {
- }
-
- tree.setSelection(new TreeItem[]{items[10]});
- assertEquals(new TreeItem[] {items[10]}, tree.getSelection());
-
- tree.setSelection(new TreeItem[]{items[number-1]});
- assertEquals(new TreeItem[] {items[number-1]}, tree.getSelection());
-
- tree.setSelection(new TreeItem[]{items[2]});
- assertEquals(new TreeItem[] {items[2]}, tree.getSelection());
-
- tree.setSelection(new TreeItem[]{items[10], items[number-1], items[2]});
- assertSame(new TreeItem[] {items[2], items[10], items[number - 1]}, tree.getSelection());
-
- tree.setSelection(new TreeItem[]{items[0], items[3], items[2]});
- assertSame(new TreeItem[]{items[0], items[2], items[3]}, tree.getSelection());
-
- tree.setSelection(new TreeItem[]{items[3], items[2], items[1]});
- assertSame(new TreeItem[]{items[1], items[2], items[3]}, tree.getSelection());
-
- tree.setSelection(new TreeItem[]{items[1], items[4], items[0]});
- assertSame(new TreeItem[]{items[0], items[1], items[4]}, tree.getSelection());
-
- tree.setSelection(new TreeItem[]{items[0], items[4], items[0]});
- assertSame(new TreeItem[]{items[0], items[4]}, tree.getSelection());
-
- tree.setSelection(new TreeItem[]{items[2], items[3], items[4]});
- assertSame(new TreeItem[]{items[2], items[3], items[4]}, tree.getSelection());
-
- tree.setSelection(new TreeItem[]{items[4], items[4], items[4], items[4], items[4], items[4]});
- assertEquals(new TreeItem[]{items[4]}, tree.getSelection());
-
- tree.setSelection(new TreeItem[] {items[0]});
- assertEquals(new TreeItem[] {items[0]}, tree.getSelection());
-
- tree.setSelection(new TreeItem[] {items[3]});
- assertEquals(new TreeItem[] {items[3]}, tree.getSelection());
-
- tree.setSelection(new TreeItem[] {items[4]});
- assertEquals(new TreeItem[] {items[4]}, tree.getSelection());
-
- tree.setSelection(new TreeItem[] {items[2]});
- assertEquals(new TreeItem[] {items[2]}, tree.getSelection());
-
- tree.setSelection(new TreeItem[] {items[1]});
- assertEquals(new TreeItem[] {items[1]}, tree.getSelection());
-
- tree.removeAll();
- tree.setSelection(new TreeItem[] {});
- assertEquals(new TreeItem[] {}, tree.getSelection());
-
-
- makeCleanEnvironment(true); // single-selection tree
-
- items = new TreeItem[number];
- for (int i = 0; i < number; i++)
- items[i] = new TreeItem(tree, 0);
-
- assertEquals(new TreeItem[] {}, tree.getSelection());
-
- tree.setSelection(new TreeItem[] {items[5], items[16], items[19]});
- assertEquals(new TreeItem[] {}, tree.getSelection());
-
- tree.setSelection(items);
- assertEquals(new TreeItem[] {}, tree.getSelection());
-
- tree.setSelection(tree.getItems());
- assertEquals(new TreeItem[] {}, tree.getSelection());
-
- tree.setSelection(new TreeItem[] {});
- assertEquals(new TreeItem[] {}, tree.getSelection());
- assertEquals(0, tree.getSelectionCount());
-
- try {
- tree.setSelection((TreeItem[]) null);
- fail("No exception thrown for items == null");
- }
- catch (IllegalArgumentException e) {
- }
-
- tree.setSelection(new TreeItem[]{items[10]});
- assertEquals(new TreeItem[] {items[10]}, tree.getSelection());
-
- tree.setSelection(new TreeItem[]{items[number-1]});
- assertEquals(new TreeItem[] {items[number-1]}, tree.getSelection());
-
- tree.setSelection(new TreeItem[]{items[2]});
- assertEquals(new TreeItem[] {items[2]}, tree.getSelection());
-
- tree.setSelection(new TreeItem[]{items[10], items[number-1], items[2]});
- assertEquals(new TreeItem[] {}, tree.getSelection());
-
- tree.setSelection(new TreeItem[]{items[0], items[3], items[2]});
- assertEquals(new TreeItem[]{}, tree.getSelection());
-
- tree.setSelection(new TreeItem[]{items[3], items[2], items[1]});
- assertEquals(new TreeItem[]{}, tree.getSelection());
-
- tree.setSelection(new TreeItem[]{items[1], items[4], items[0]});
- assertEquals(new TreeItem[]{}, tree.getSelection());
-
- tree.setSelection(new TreeItem[]{items[0], items[4], items[0]});
- assertEquals(new TreeItem[]{}, tree.getSelection());
-
- tree.setSelection(new TreeItem[]{items[2], items[3], items[4]});
- assertEquals(new TreeItem[]{}, tree.getSelection());
-
- tree.setSelection(new TreeItem[]{items[4], items[4], items[4], items[4], items[4], items[4]});
- assertEquals(new TreeItem[]{}, tree.getSelection());
-
- tree.setSelection(new TreeItem[] {items[0]});
- assertEquals(new TreeItem[] {items[0]}, tree.getSelection());
-
- tree.setSelection(new TreeItem[] {items[3]});
- assertEquals(new TreeItem[] {items[3]}, tree.getSelection());
-
- tree.setSelection(new TreeItem[] {items[4]});
- assertEquals(new TreeItem[] {items[4]}, tree.getSelection());
-
- tree.setSelection(new TreeItem[] {items[2]});
- assertEquals(new TreeItem[] {items[2]}, tree.getSelection());
-
- tree.setSelection(new TreeItem[] {items[1]});
- assertEquals(new TreeItem[] {items[1]}, tree.getSelection());
-
- tree.removeAll();
- tree.setSelection(new TreeItem[] {});
- assertEquals(new TreeItem[] {}, tree.getSelection());
-}
-
-public void test_setTopItemLorg_eclipse_swt_widgets_TreeItem() {
- tree.removeAll();
- for (int i = 0; i < 10; i++) {
- TreeItem item = new TreeItem(tree, 0);
- }
- TreeItem top = new TreeItem(tree, 0);
- for (int i = 0; i < 10; i++) {
- TreeItem item = new TreeItem(tree, 0);
- }
- tree.setSize(50,50);
- shell.open();
- tree.setTopItem(top);
- for (int i = 0; i < 10; i++) {
- TreeItem item = new TreeItem(tree, 0);
- }
- TreeItem top2 = tree.getTopItem();
- shell.setVisible(false);
- assertEquals(top, top2);
- try {
- shell.setVisible(true);
- tree.setTopItem(null);
- fail("No exception thrown for item == null");
- } catch (IllegalArgumentException e) {
- } finally {
- shell.setVisible (false);
- }
-}
-
-public void test_showItemLorg_eclipse_swt_widgets_TreeItem() {
- try {
- tree.showItem(null);
- fail("No exception thrown for item == null");
- }
- catch (IllegalArgumentException e) {
- }
-
- int number = 20;
- TreeItem[] items = new TreeItem[number];
- for (int i = 0; i < number; i++) {
- items[i] = new TreeItem(tree, 0);
- }
- for(int i=0; i<number; i++)
- tree.showItem(items[i]);
-
- tree.removeAll();
-
- makeCleanEnvironment(false);
- //showing somebody else's items
-
- items = new TreeItem[number];
- for (int i = 0; i < number; i++) {
- items[i] = new TreeItem(tree, 0);
- }
-
- Tree tree2 = new Tree(shell, 0);
- TreeItem[] items2 = new TreeItem[number];
- for (int i = 0; i < number; i++) {
- items2[i] = new TreeItem(tree2, 0);
- };
-
- for(int i=0; i<number; i++)
- tree.showItem(items2[i]);
-
- tree.removeAll();
-}
-
-public void test_showSelection() {
- TreeItem item;
-
- tree.showSelection();
- item = new TreeItem(tree, 0);
- tree.setSelection(new TreeItem[]{item});
- tree.showSelection();
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_widgets_Tree((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_CompositeI");
- methodNames.addElement("test_addSelectionListenerLorg_eclipse_swt_events_SelectionListener");
- methodNames.addElement("test_addTreeListenerLorg_eclipse_swt_events_TreeListener");
- methodNames.addElement("test_computeSizeIIZ");
- methodNames.addElement("test_deselectAll");
- methodNames.addElement("test_getItemCount");
- methodNames.addElement("test_getItemHeight");
- methodNames.addElement("test_getItemLorg_eclipse_swt_graphics_Point");
- methodNames.addElement("test_getItems");
- methodNames.addElement("test_getParentItem");
- methodNames.addElement("test_getSelection");
- methodNames.addElement("test_getSelectionCount");
- methodNames.addElement("test_getTopItem");
- methodNames.addElement("test_removeAll");
- methodNames.addElement("test_removeSelectionListenerLorg_eclipse_swt_events_SelectionListener");
- methodNames.addElement("test_removeTreeListenerLorg_eclipse_swt_events_TreeListener");
- methodNames.addElement("test_selectAll");
- methodNames.addElement("test_setInsertMarkLorg_eclipse_swt_widgets_TreeItemZ");
- methodNames.addElement("test_setRedrawZ");
- methodNames.addElement("test_setSelection$Lorg_eclipse_swt_widgets_TreeItem");
- methodNames.addElement("test_setTopItemLorg_eclipse_swt_widgets_TreeItem");
- methodNames.addElement("test_showItemLorg_eclipse_swt_widgets_TreeItem");
- methodNames.addElement("test_showSelection");
- methodNames.addAll(Test_org_eclipse_swt_widgets_Composite.methodNames()); // add superclass method names
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_CompositeI")) test_ConstructorLorg_eclipse_swt_widgets_CompositeI();
- else if (getName().equals("test_addSelectionListenerLorg_eclipse_swt_events_SelectionListener")) test_addSelectionListenerLorg_eclipse_swt_events_SelectionListener();
- else if (getName().equals("test_addTreeListenerLorg_eclipse_swt_events_TreeListener")) test_addTreeListenerLorg_eclipse_swt_events_TreeListener();
- else if (getName().equals("test_computeSizeIIZ")) test_computeSizeIIZ();
- else if (getName().equals("test_deselectAll")) test_deselectAll();
- else if (getName().equals("test_getItemCount")) test_getItemCount();
- else if (getName().equals("test_getItemHeight")) test_getItemHeight();
- else if (getName().equals("test_getItemLorg_eclipse_swt_graphics_Point")) test_getItemLorg_eclipse_swt_graphics_Point();
- else if (getName().equals("test_getItems")) test_getItems();
- else if (getName().equals("test_getParentItem")) test_getParentItem();
- else if (getName().equals("test_getSelection")) test_getSelection();
- else if (getName().equals("test_getSelectionCount")) test_getSelectionCount();
- else if (getName().equals("test_getTopItem")) test_getTopItem();
- else if (getName().equals("test_removeAll")) test_removeAll();
- else if (getName().equals("test_removeSelectionListenerLorg_eclipse_swt_events_SelectionListener")) test_removeSelectionListenerLorg_eclipse_swt_events_SelectionListener();
- else if (getName().equals("test_removeTreeListenerLorg_eclipse_swt_events_TreeListener")) test_removeTreeListenerLorg_eclipse_swt_events_TreeListener();
- else if (getName().equals("test_selectAll")) test_selectAll();
- else if (getName().equals("test_setInsertMarkLorg_eclipse_swt_widgets_TreeItemZ")) test_setInsertMarkLorg_eclipse_swt_widgets_TreeItemZ();
- else if (getName().equals("test_setRedrawZ")) test_setRedrawZ();
- else if (getName().equals("test_setSelection$Lorg_eclipse_swt_widgets_TreeItem")) test_setSelection$Lorg_eclipse_swt_widgets_TreeItem();
- else if (getName().equals("test_setTopItemLorg_eclipse_swt_widgets_TreeItem")) test_setTopItemLorg_eclipse_swt_widgets_TreeItem();
- else if (getName().equals("test_showItemLorg_eclipse_swt_widgets_TreeItem")) test_showItemLorg_eclipse_swt_widgets_TreeItem();
- else if (getName().equals("test_showSelection")) test_showSelection();
- else super.runTest();
-}
-
-/* custom */
-public Tree tree;
-
-/**
- * Clean up the environment for a new test.
- *
- * @param single true if the new tree should be a single-selection one,
- * otherwise use multi-selection.
- */
-private void makeCleanEnvironment(boolean single) {
-// this method must be private or protected so the auto-gen tool keeps it
- tree.dispose();
- tree = new Tree(shell, single?SWT.SINGLE:SWT.MULTI);
- setWidget(tree);
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_TreeItem.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_TreeItem.java
deleted file mode 100644
index 045455bfe1..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_TreeItem.java
+++ /dev/null
@@ -1,300 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.graphics.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.widgets.TreeItem
- *
- * @see org.eclipse.swt.widgets.TreeItem
- */
-public class Test_org_eclipse_swt_widgets_TreeItem extends Test_org_eclipse_swt_widgets_Item {
-
-public Test_org_eclipse_swt_widgets_TreeItem(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- super.setUp();
- tree = new Tree(shell, 0);
- treeItem = new TreeItem(tree, 0);
- setWidget(treeItem);
-}
-
-protected void tearDown() {
- super.tearDown();
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_TreeI() {
- try {
- new TreeItem((TreeItem)null, SWT.NULL);
- fail("No exception thrown for parent == null");
- }
- catch (IllegalArgumentException e) {
- }
-
- for (int i=0; i<10; i++) {
- new TreeItem(tree, 0);
- }
- assertEquals(11, tree.getItemCount());
- new TreeItem(tree, 0, 5);
- assertEquals(12, tree.getItemCount());
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_TreeII() {
- try {
- new TreeItem(tree, 0, 5);
- fail("No exception thrown for illegal index argument");
- }
- catch (IllegalArgumentException e) {
- }
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_TreeItemI() {
- for (int i = 0; i < 10; i++) {
- new TreeItem(treeItem, 0);
- }
- assertEquals(10, treeItem.getItemCount());
- new TreeItem(treeItem, 0, 5);
- assertEquals(1, tree.getItemCount());
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_TreeItemII() {
- try {
- new TreeItem(treeItem, 0, 5);
- fail("No exception thrown for illegal index argument");
- }
- catch (IllegalArgumentException e) {}
- assertEquals(1, tree.getItemCount());
-}
-
-public void test_getBackground() {
- // tested in test_setBackgroundLorg_eclipse_swt_graphics_Color
-}
-
-public void test_getBounds() {
- warnUnimpl("Test test_getBounds not written");
-}
-
-public void test_getChecked() {
- Tree newTree = new Tree(shell, SWT.CHECK);
- TreeItem tItem = new TreeItem(newTree,0);
- assertEquals(false, tItem.getChecked());
- tItem.setChecked(true);
- assertTrue(tItem.getChecked());
- tItem.setChecked(false);
- assertEquals(false, tItem.getChecked());
-}
-
-public void test_getExpanded() {
- assertEquals(false, treeItem.getExpanded());
- // there must be at least one subitem before you can set the treeitem expanded
- new TreeItem(treeItem, 0);
- treeItem.setExpanded(true);
- assertTrue(treeItem.getExpanded());
- treeItem.setExpanded(false);
- assertEquals(false, treeItem.getExpanded());
-}
-
-public void test_getForeground() {
- // tested in test_setForegroundLorg_eclipse_swt_graphics_Color
-}
-
-public void test_getGrayed() {
- warnUnimpl("Test test_getGrayed not written");
-}
-
-public void test_getItemCount() {
- for (int i = 0; i < 10; i++) {
- assertEquals(i, treeItem.getItemCount());
- new TreeItem(treeItem, 0);
- }
- assertTrue("b: ", treeItem.getItemCount() == 10);
-}
-
-public void test_getItems() {
- if (fCheckBogusTestCases) {
- int[] cases = {2, 10, 100};
- for (int j = 0; j < cases.length; j++) {
- for (int i = 0; i < cases[j]; i++) {
- TreeItem ti = new TreeItem(tree, 0);
- }
- assertEquals(cases[j], tree.getItems().length);
- tree.removeAll();
- assertEquals(0, tree.getItemCount());
- }
- }
-}
-
-public void test_getParent() {
- assertEquals(tree, treeItem.getParent());
-}
-
-public void test_getParentItem() {
- TreeItem tItem = new TreeItem(treeItem, SWT.NULL);
- assertEquals(treeItem, tItem.getParentItem());
-}
-
-public void test_setBackgroundLorg_eclipse_swt_graphics_Color() {
- Color color = new Color(treeItem.getDisplay(), 255, 0, 0);
- treeItem.setBackground(color);
- assertEquals(color, treeItem.getBackground());
- treeItem.setBackground(null);
- assertEquals(tree.getBackground(),treeItem.getBackground());
- color.dispose();
- try {
- treeItem.setBackground(color);
- fail("No exception thrown for color disposed");
- } catch (IllegalArgumentException e) {
- }
-}
-
-
-public void test_setCheckedZ() {
- assertEquals(false, treeItem.getChecked());
-
- treeItem.setChecked(true);
- assertEquals(false, treeItem.getChecked());
-
- Tree t = new Tree(shell, SWT.CHECK);
- TreeItem ti = new TreeItem(t, SWT.NULL);
- ti.setChecked(true);
- assertTrue(ti.getChecked());
-
- ti.setChecked(false);
- assertEquals(false, ti.getChecked());
- t.dispose();
-}
-
-public void test_setExpandedZ() {
- assertEquals(false, treeItem.getExpanded());
-
- // there must be at least one subitem before you can set the treeitem expanded
- treeItem.setExpanded(true);
- assertEquals(false, treeItem.getExpanded());
-
-
- new TreeItem(treeItem, SWT.NULL);
- treeItem.setExpanded(true);
- assertTrue(treeItem.getExpanded());
- treeItem.setExpanded(false);
- assertEquals(false, treeItem.getExpanded());
-
- TreeItem ti = new TreeItem(treeItem, SWT.NULL);
- ti.setExpanded(true);
- treeItem.setExpanded(false);
- assertEquals(false, ti.getExpanded());
-}
-
-public void test_setForegroundLorg_eclipse_swt_graphics_Color() {
- Color color = new Color(treeItem.getDisplay(), 255, 0, 0);
- treeItem.setForeground(color);
- assertEquals(color, treeItem.getForeground());
- treeItem.setForeground(null);
- assertEquals(tree.getForeground(),treeItem.getForeground());
- color.dispose();
- try {
- treeItem.setForeground(color);
- fail("No exception thrown for color disposed");
- } catch (IllegalArgumentException e) {
- }
-}
-
-public void test_setGrayedZ() {
- warnUnimpl("Test test_setGrayedZ not written");
-}
-
-public void test_setImageLorg_eclipse_swt_graphics_Image() {
- warnUnimpl("Test test_setImageLorg_eclipse_swt_graphics_Image not written");
-}
-
-public void test_setTextLjava_lang_String() {
- try {
- treeItem.setText(null);
- fail("No exception thrown for string == null");
- }
- catch (IllegalArgumentException e) {
- }
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_widgets_TreeItem((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_TreeI");
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_TreeII");
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_TreeItemI");
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_TreeItemII");
- methodNames.addElement("test_getBackground");
- methodNames.addElement("test_getBounds");
- methodNames.addElement("test_getChecked");
- methodNames.addElement("test_getExpanded");
- methodNames.addElement("test_getForeground");
- methodNames.addElement("test_getGrayed");
- methodNames.addElement("test_getItemCount");
- methodNames.addElement("test_getItems");
- methodNames.addElement("test_getParent");
- methodNames.addElement("test_getParentItem");
- methodNames.addElement("test_setBackgroundLorg_eclipse_swt_graphics_Color");
- methodNames.addElement("test_setCheckedZ");
- methodNames.addElement("test_setExpandedZ");
- methodNames.addElement("test_setForegroundLorg_eclipse_swt_graphics_Color");
- methodNames.addElement("test_setGrayedZ");
- methodNames.addElement("test_setImageLorg_eclipse_swt_graphics_Image");
- methodNames.addElement("test_setTextLjava_lang_String");
- methodNames.addAll(Test_org_eclipse_swt_widgets_Item.methodNames()); // add superclass method names
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_TreeI")) test_ConstructorLorg_eclipse_swt_widgets_TreeI();
- else if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_TreeII")) test_ConstructorLorg_eclipse_swt_widgets_TreeII();
- else if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_TreeItemI")) test_ConstructorLorg_eclipse_swt_widgets_TreeItemI();
- else if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_TreeItemII")) test_ConstructorLorg_eclipse_swt_widgets_TreeItemII();
- else if (getName().equals("test_getBackground")) test_getBackground();
- else if (getName().equals("test_getBounds")) test_getBounds();
- else if (getName().equals("test_getChecked")) test_getChecked();
- else if (getName().equals("test_getExpanded")) test_getExpanded();
- else if (getName().equals("test_getForeground")) test_getForeground();
- else if (getName().equals("test_getGrayed")) test_getGrayed();
- else if (getName().equals("test_getItemCount")) test_getItemCount();
- else if (getName().equals("test_getItems")) test_getItems();
- else if (getName().equals("test_getParent")) test_getParent();
- else if (getName().equals("test_getParentItem")) test_getParentItem();
- else if (getName().equals("test_setBackgroundLorg_eclipse_swt_graphics_Color")) test_setBackgroundLorg_eclipse_swt_graphics_Color();
- else if (getName().equals("test_setCheckedZ")) test_setCheckedZ();
- else if (getName().equals("test_setExpandedZ")) test_setExpandedZ();
- else if (getName().equals("test_setForegroundLorg_eclipse_swt_graphics_Color")) test_setForegroundLorg_eclipse_swt_graphics_Color();
- else if (getName().equals("test_setGrayedZ")) test_setGrayedZ();
- else if (getName().equals("test_setImageLorg_eclipse_swt_graphics_Image")) test_setImageLorg_eclipse_swt_graphics_Image();
- else if (getName().equals("test_setTextLjava_lang_String")) test_setTextLjava_lang_String();
- else super.runTest();
-}
-
-/* custom */
-TreeItem treeItem;
-Tree tree;
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_TypedListener.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_TypedListener.java
deleted file mode 100644
index 47ec82f0ea..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_TypedListener.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.widgets.TypedListener
- *
- * @see org.eclipse.swt.widgets.TypedListener
- */
-public class Test_org_eclipse_swt_widgets_TypedListener extends SwtTestCase {
-
-public Test_org_eclipse_swt_widgets_TypedListener(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
-}
-
-protected void tearDown() {
-}
-
-public void test_ConstructorLorg_eclipse_swt_internal_SWTEventListener() {
- // do not test internal public methods (non-API)
-}
-
-public void test_getEventListener() {
- // do not test internal public methods (non-API)
-}
-
-public void test_handleEventLorg_eclipse_swt_widgets_Event() {
- // do not test internal public methods (non-API)
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_widgets_TypedListener((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_internal_SWTEventListener");
- methodNames.addElement("test_getEventListener");
- methodNames.addElement("test_handleEventLorg_eclipse_swt_widgets_Event");
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLorg_eclipse_swt_internal_SWTEventListener")) test_ConstructorLorg_eclipse_swt_internal_SWTEventListener();
- else if (getName().equals("test_getEventListener")) test_getEventListener();
- else if (getName().equals("test_handleEventLorg_eclipse_swt_widgets_Event")) test_handleEventLorg_eclipse_swt_widgets_Event();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Widget.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Widget.java
deleted file mode 100644
index 95c89efd12..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Widget.java
+++ /dev/null
@@ -1,218 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit;
-
-import junit.framework.*;
-import junit.textui.*;
-import org.eclipse.swt.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.graphics.GC;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.widgets.Widget
- *
- * @see org.eclipse.swt.widgets.Widget
- */
-public class Test_org_eclipse_swt_widgets_Widget extends SwtTestCase {
- // Use this variable to help validate callbacks
- boolean listenerCalled;
-
-public Test_org_eclipse_swt_widgets_Widget(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
- shell = new Shell();
-}
-
-protected void tearDown() {
- if (widget != null) {
- assertEquals(false, widget.isDisposed());
- }
- assertEquals(false, shell.isDisposed());
- shell.dispose();
- if (widget != null) {
- assertTrue(widget.isDisposed());
- }
- assertTrue(shell.isDisposed());
-}
-
-public void test_ConstructorLorg_eclipse_swt_widgets_WidgetI() {
- // abstract class
-}
-
-public void test_addDisposeListenerLorg_eclipse_swt_events_DisposeListener() {
- DisposeListener listener = new DisposeListener() {
- public void widgetDisposed(DisposeEvent e) {
- }
- };
- widget.addDisposeListener(listener);
- widget.removeDisposeListener(listener);
-}
-
-public void test_addListenerILorg_eclipse_swt_widgets_Listener() {
- try {
- widget.addListener(SWT.Dispose, null);
- fail("No exception thrown for listener == null");
- }
- catch (IllegalArgumentException e) {
- }
-
- Listener listener = new Listener() {
- public void handleEvent(Event e) {
- }
- };
- widget.addListener(SWT.Dispose, listener);
- widget.removeListener(SWT.Dispose, listener);
-}
-
-public void test_dispose() {
- // tested in tearDown
-}
-
-public void test_getData() {
- // tested in test_setDataLjava_lang_Object
-}
-
-public void test_getDataLjava_lang_String() {
- // tested in test_setDataLjava_lang_StringLjava_lang_Object
-}
-
-public void test_getDisplay() {
- assertEquals(widget.getDisplay(), widget.getDisplay());
-}
-
-public void test_getStyle() {
- // this test should be overridden by leaf subclasses
-}
-
-public void test_isDisposed() {
- assertEquals(false, widget.isDisposed());
-}
-
-public void test_notifyListenersILorg_eclipse_swt_widgets_Event() {
- widget.notifyListeners(0, null);
- Event event = new Event();
- GC gc = null;
- if (widget instanceof Control) {
- gc = event.gc = new GC((Control)widget);
- }
- widget.notifyListeners(SWT.Paint, event);
- if (gc != null) gc.dispose();
-}
-
-public void test_removeDisposeListenerLorg_eclipse_swt_events_DisposeListener() {
- // tested in test_addDisposeListenerLorg_eclipse_swt_events_DisposeListener
-}
-
-public void test_removeListenerILorg_eclipse_swt_widgets_Listener() {
- // this method is further tested by all of the removeTypedListener tests
- try {
- widget.removeListener(SWT.Paint, null);
- fail("No exception thrown for listener == null");
- }
- catch (IllegalArgumentException e) {
- }
-
- widget.removeListener(SWT.Paint, new Listener() {
- public void handleEvent(Event e) {
- }
- });
-
- Listener listener = new Listener() {
- public void handleEvent(Event e) {
- }
- };
- widget.addListener(SWT.Paint, listener);
- widget.removeListener(SWT.Paint, listener);
-}
-
-public void test_setDataLjava_lang_Object() {
- widget.setData(widget);
- assertEquals(widget, widget.getData());
-
- widget.setData(null);
- assertNull(widget.getData());
-}
-
-public void test_setDataLjava_lang_StringLjava_lang_Object() {
- widget.setData("the widget", widget);
- assertEquals(widget, widget.getData("the widget"));
-
- widget.setData("the widget", null);
- assertNull(widget.getData("the widget"));
-}
-
-public void test_toString() {
- assertNotNull(widget.toString());
- assertTrue(widget.toString().length() > 0);
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_widgets_Widget((String)e.nextElement()));
- }
- return suite;
-}
-
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_widgets_WidgetI");
- methodNames.addElement("test_addDisposeListenerLorg_eclipse_swt_events_DisposeListener");
- methodNames.addElement("test_addListenerILorg_eclipse_swt_widgets_Listener");
- methodNames.addElement("test_dispose");
- methodNames.addElement("test_getData");
- methodNames.addElement("test_getDataLjava_lang_String");
- methodNames.addElement("test_getDisplay");
- methodNames.addElement("test_getStyle");
- methodNames.addElement("test_isDisposed");
- methodNames.addElement("test_notifyListenersILorg_eclipse_swt_widgets_Event");
- methodNames.addElement("test_removeDisposeListenerLorg_eclipse_swt_events_DisposeListener");
- methodNames.addElement("test_removeListenerILorg_eclipse_swt_widgets_Listener");
- methodNames.addElement("test_setDataLjava_lang_Object");
- methodNames.addElement("test_setDataLjava_lang_StringLjava_lang_Object");
- methodNames.addElement("test_toString");
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLorg_eclipse_swt_widgets_WidgetI")) test_ConstructorLorg_eclipse_swt_widgets_WidgetI();
- else if (getName().equals("test_addDisposeListenerLorg_eclipse_swt_events_DisposeListener")) test_addDisposeListenerLorg_eclipse_swt_events_DisposeListener();
- else if (getName().equals("test_addListenerILorg_eclipse_swt_widgets_Listener")) test_addListenerILorg_eclipse_swt_widgets_Listener();
- else if (getName().equals("test_dispose")) test_dispose();
- else if (getName().equals("test_getData")) test_getData();
- else if (getName().equals("test_getDataLjava_lang_String")) test_getDataLjava_lang_String();
- else if (getName().equals("test_getDisplay")) test_getDisplay();
- else if (getName().equals("test_getStyle")) test_getStyle();
- else if (getName().equals("test_isDisposed")) test_isDisposed();
- else if (getName().equals("test_notifyListenersILorg_eclipse_swt_widgets_Event")) test_notifyListenersILorg_eclipse_swt_widgets_Event();
- else if (getName().equals("test_removeDisposeListenerLorg_eclipse_swt_events_DisposeListener")) test_removeDisposeListenerLorg_eclipse_swt_events_DisposeListener();
- else if (getName().equals("test_removeListenerILorg_eclipse_swt_widgets_Listener")) test_removeListenerILorg_eclipse_swt_widgets_Listener();
- else if (getName().equals("test_setDataLjava_lang_Object")) test_setDataLjava_lang_Object();
- else if (getName().equals("test_setDataLjava_lang_StringLjava_lang_Object")) test_setDataLjava_lang_StringLjava_lang_Object();
- else if (getName().equals("test_toString")) test_toString();
-}
-
-/* custom */
-public Shell shell;
-private Widget widget;
-
-protected void setWidget(Widget w) {
- widget = w;
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/browser/Browser1.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/browser/Browser1.java
deleted file mode 100644
index 6b630d87bc..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/browser/Browser1.java
+++ /dev/null
@@ -1,211 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit.browser;
-
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.browser.*;
-import org.eclipse.swt.*;
-
-public class Browser1 {
- public static boolean passed = false;
- public static boolean locationChanging = false;
- public static boolean locationChanged = false;
- public static boolean progressCompleted = false;
-
- public static boolean test1(String url) {
- System.out.println("URL Loading - args: "+url+" Expected Event Sequence: Location.changing > Location.changed (top true)> Progress.completed");
- passed = false;
- locationChanging = locationChanged = progressCompleted = false;
-
- final Display display = new Display();
- final Shell shell = new Shell(display);
- shell.setLayout(new FillLayout());
- Browser browser = new Browser(shell, SWT.NONE);
- browser.addLocationListener(new LocationListener() {
- public void changing(LocationEvent event) {
- System.out.println("changing "+event.location);
- /* certain browsers do send multiple changing events. Safari does this. */
- /* verify the page has not been reported as being loaded */
- passed = !progressCompleted;
- locationChanging = true;
- if (!passed) shell.close();
- }
- public void changed(LocationEvent event) {
- System.out.println("changed "+event.location);
- /* ignore non top frame loading */
- if (!event.top) return;
- /* verify a changed follows at least one changing */
- /* verify the page has not been reported as being loaded */
- passed = locationChanging && !progressCompleted;
- locationChanged = true;
- if (!passed) shell.close();
- }
- });
- browser.addProgressListener(new ProgressListener() {
- public void changed(ProgressEvent event) {
- }
- public void completed(ProgressEvent event) {
- System.out.println("completed");
- passed = locationChanging && locationChanged && !progressCompleted;
- progressCompleted = true;
- if (!passed) shell.close();
- if (passed) {
- /* wait a little bit more before declaring it a success,
- * in case bogus events follow this one.
- */
- new Thread() {
- public void run() {
- System.out.println("timer start");
- try { sleep(2000); } catch (Exception e) {};
- if (!display.isDisposed())
- display.asyncExec(new Runnable(){
- public void run() {
- System.out.println("timer asyncexec shell.close");
- if (!shell.isDisposed()) shell.close();
- }
- });
- System.out.println("timer over");
- };
- }.start();
- }
- }
- });
-
- shell.open();
- browser.setUrl(url);
-
- boolean timeout = runLoopTimer(display, shell, 600);
- if (timeout) passed = false;
- display.dispose();
- return passed;
- }
-
- public static boolean test2(String url) {
- System.out.println("URL Loading Filtering - args: "+url+" Expected Event Sequence: Location.changing cancel true > no Location.changed, no Progress.completed");
- locationChanging = locationChanged = progressCompleted = false;
- passed = false;
- final String[] locationCancelled = new String[1];
- final Display display = new Display();
- final Shell shell = new Shell(display);
- shell.setLayout(new FillLayout());
- final Browser browser = new Browser(shell, SWT.NONE);
- browser.addLocationListener(new LocationListener() {
- public void changing(LocationEvent event) {
- System.out.println("changing "+event.location);
- passed = !locationChanging && !locationChanged && !progressCompleted;
- locationChanging = true;
- if (!passed) {
- shell.close();
- return;
- }
- event.doit = false;
- new Thread() {
- public void run() {
- System.out.println("timer start");
- try { sleep(2000); } catch (Exception e) {};
- if (!display.isDisposed())
- display.asyncExec(new Runnable(){
- public void run() {
- System.out.println("timer asyncexec shell.close");
- if (!shell.isDisposed()) shell.close();
- }
- });
- System.out.println("timer over");
- };
- }.start();
- }
- public void changed(LocationEvent event) {
- /*
- * Feature on Internet Explorer. If there is no current location, IE still fires a DocumentComplete
- * following the BeforeNavigate2 cancel event. This DocumentComplete event contains an empty URL
- * since the URL in BeforeNavigate2 was correctly cancelled.
- * The test considers it is OK to send a Location.changed and a Progress.completed events after
- * a Location.changing cancel true - at the condition that the current location is empty,
- * otherwise it is considered that the location was not successfully cancelled.
- */
- passed = event.location.length() == 0;
- System.out.println("changed "+event.location+" "+passed);
- locationChanged = true;
- }
- });
- browser.addProgressListener(new ProgressListener() {
- public void changed(ProgressEvent event) {
- }
- public void completed(ProgressEvent event) {
- /*
- * Feature on Internet Explorer. If there is no current location, IE still fires a DocumentComplete
- * following the BeforeNavigate2 cancel event. This DocumentComplete event contains an empty URL
- * since the URL in BeforeNavigate2 was correctly cancelled.
- * The test considers it is OK to send a Location.changed and a Progress.completed events after
- * a Location.changing cancel true - at the condition that the current location is empty,
- * otherwise it is considered that the location was not successfully cancelled.
- */
- String location = browser.getUrl();
- passed = location.length() == 0;
- System.out.println("completed "+passed);
- progressCompleted = true;
- }
- });
- shell.open();
- browser.setUrl(url);
- boolean timeout = runLoopTimer(display, shell, 600);
- if (timeout) passed = false;
- display.dispose();
- return passed;
- }
-
- static boolean runLoopTimer(final Display display, final Shell shell, final int seconds) {
- final boolean[] timeout = {false};
- new Thread() {
- public void run() {
- try {
- for (int i = 0; i < seconds; i++) {
- Thread.sleep(1000);
- if (display.isDisposed() || shell.isDisposed()) return;
- }
- }
- catch (Exception e) {}
- timeout[0] = true;
- /* wake up the event loop */
- if (!display.isDisposed()) {
- display.asyncExec(new Runnable() {
- public void run() {
- if (!shell.isDisposed()) shell.redraw();
- }
- });
- }
- }
- }.start();
- while (!timeout[0] && !shell.isDisposed()) if (!display.readAndDispatch()) display.sleep();
- return timeout[0];
- }
-
- public static boolean test() {
- int fail = 0;
- String[] urls = {"http://www.eclipse.org", "http://www.google.com", "http://www.ibm.com"};
- for (int i = 0; i < urls.length; i++) {
- boolean result = test1(urls[i]);
- System.out.print(result ? "." : "E");
- if (!result) fail++;
- }
- for (int i = 0; i < urls.length; i++) {
- boolean result = test2(urls[i]);
- System.out.print(result ? "." : "E");
- if (!result) fail++;
- }
- return fail == 0;
- }
-
- public static void main(String[] argv) {
- System.out.println("\r\nTests Finished. SUCCESS: "+test());
- }
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/browser/Browser2.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/browser/Browser2.java
deleted file mode 100644
index 8d11e01cbb..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/browser/Browser2.java
+++ /dev/null
@@ -1,221 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit.browser;
-
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.browser.*;
-import org.eclipse.swt.*;
-
-public class Browser2 {
- public static boolean passed = false;
- public static boolean locationChanging = false;
- public static boolean locationChanged = false;
- public static boolean progressCompleted = false;
-
- public static boolean test1(String html) {
- System.out.println("setText - args: "+html+" Expected Event Sequence: Location.changing > Location.changed > Progress.completed");
- passed = false;
- locationChanging = locationChanged = progressCompleted = false;
-
- final Display display = new Display();
- final Shell shell = new Shell(display);
- shell.setLayout(new FillLayout());
- Browser browser = new Browser(shell, SWT.NONE);
- browser.addLocationListener(new LocationListener() {
- public void changing(LocationEvent event) {
- System.out.println("changing "+event.location);
- /* certain browsers do send multiple changing events. Safari does this. */
- passed = !locationChanged && !progressCompleted;
- locationChanging = true;
- if (!passed) shell.close();
- }
- public void changed(LocationEvent event) {
- System.out.println("changed "+event.location);
- passed = locationChanging && !locationChanged && !progressCompleted;
- locationChanged = true;
- if (!passed) shell.close();
- }
- });
- browser.addProgressListener(new ProgressListener() {
- public void changed(ProgressEvent event) {
- }
- public void completed(ProgressEvent event) {
- System.out.println("completed");
- passed = locationChanging && locationChanged && !progressCompleted;
- progressCompleted = true;
- if (!passed) shell.close();
- if (passed) {
- /* wait a little bit more before declaring it a success,
- * in case bogus events follow this one.
- */
- new Thread() {
- public void run() {
- System.out.println("timer start");
- try { sleep(2000); } catch (Exception e) {};
- if (!display.isDisposed())
- display.asyncExec(new Runnable(){
- public void run() {
- System.out.println("timer asyncexec shell.close");
- if (!shell.isDisposed()) shell.close();
- }
- });
- System.out.println("timer over");
- };
- }.start();
- }
- }
- });
-
- shell.open();
- browser.setText(html);
-
- boolean timeout = runLoopTimer(display, shell, 600);
- if (timeout) passed = false;
- display.dispose();
- return passed;
- }
-
- public static boolean test2(String html) {
- System.out.println("setText URL Loading Filtering - args: "+html+" Expected Event Sequence: Location.changing cancel true > no Location.changed, no Progress.completed");
- locationChanging = locationChanged = progressCompleted = false;
- passed = false;
- final String[] locationCancelled = new String[1];
- final Display display = new Display();
- final Shell shell = new Shell(display);
- shell.setLayout(new FillLayout());
- final Browser browser = new Browser(shell, SWT.NONE);
- browser.addLocationListener(new LocationListener() {
- public void changing(LocationEvent event) {
- System.out.println("changing "+event.location);
- /*
- * Feature on Internet Explorer. When pending requests are stopped, IE
- * emits a Location.changing with res://C:\WINDOWS\System32\shdoclc.dll/navcancl.htm.
- * Pending requests are stopped before going to the blank page to set HTML in memory
- * with setText.
- * The test considers it is OK to get multiple Location.changing events at the condition
- * that no locationChanged and progressCompleted are reported.
- */
- passed = !locationChanged && !progressCompleted;
- locationChanging = true;
- if (!passed) {
- shell.close();
- return;
- }
- event.doit = false;
- new Thread() {
- public void run() {
- System.out.println("timer start");
- try { sleep(2000); } catch (Exception e) {};
- if (!display.isDisposed())
- display.asyncExec(new Runnable(){
- public void run() {
- System.out.println("timer asyncexec shell.close");
- if (!shell.isDisposed()) shell.close();
- }
- });
- System.out.println("timer over");
- };
- }.start();
- }
- public void changed(LocationEvent event) {
- /*
- * Feature on Internet Explorer. If there is no current location, IE still fires a DocumentComplete
- * following the BeforeNavigate2 cancel event. This DocumentComplete event contains an empty URL
- * since the URL in BeforeNavigate2 was correctly cancelled.
- * The test considers it is OK to send a Location.changed and a Progress.completed events after
- * a Location.changing cancel true - at the condition that the current location is empty,
- * otherwise it is considered that the location was not successfully cancelled.
- */
- passed = event.location.length() == 0;
- System.out.println("changed "+event.location+" "+passed);
- /* ignore LocationChanged that are empty */
- locationChanged = !passed;
- }
- });
- browser.addProgressListener(new ProgressListener() {
- public void changed(ProgressEvent event) {
- }
- public void completed(ProgressEvent event) {
- /*
- * Feature on Internet Explorer. If there is no current location, IE still fires a DocumentComplete
- * following the BeforeNavigate2 cancel event. This DocumentComplete event contains an empty URL
- * since the URL in BeforeNavigate2 was correctly cancelled.
- * The test considers it is OK to send a Location.changed and a Progress.completed events after
- * a Location.changing cancel true - at the condition that the current location is empty,
- * otherwise it is considered that the location was not successfully cancelled.
- */
- String location = browser.getUrl();
- passed = location.length() == 0;
- System.out.println("completed "+passed);
- progressCompleted = true;
- }
- });
- shell.open();
- browser.setText(html);
- boolean timeout = runLoopTimer(display, shell, 600);
- if (timeout) passed = false;
- display.dispose();
- return passed;
- }
-
- static boolean runLoopTimer(final Display display, final Shell shell, final int seconds) {
- final boolean[] timeout = {false};
- new Thread() {
- public void run() {
- try {
- for (int i = 0; i < seconds; i++) {
- Thread.sleep(1000);
- if (display.isDisposed() || shell.isDisposed()) return;
- }
- }
- catch (Exception e) {}
- timeout[0] = true;
- /* wake up the event loop */
- if (!display.isDisposed()) {
- display.asyncExec(new Runnable() {
- public void run() {
- if (!shell.isDisposed()) shell.redraw();
- }
- });
- }
- }
- }.start();
- while (!timeout[0] && !shell.isDisposed()) if (!display.readAndDispatch()) display.sleep();
- return timeout[0];
- }
-
- public static boolean test() {
- int fail = 0;
- String[] html = {file1};
- for (int i = 0; i < html.length; i++) {
- boolean result = test1(html[i]);
- System.out.print(result ? "." : "E");
- if (!result) fail++;
- }
- for (int i = 0; i < html.length; i++) {
- boolean result = test2(html[i]);
- System.out.print(result ? "." : "E");
- if (!result) fail++;
- }
- return fail == 0;
- }
-
- public static void main(String[] argv) {
- System.out.println("\r\nTests Finished. SUCCESS: "+test());
- }
-
- public static String file1 = "<HTML><HEAD>"+
- "<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=iso-8859-1\">"+
- "<TITLE>Test with 2 frames</TITLE>"+
- "</HEAD><BODY>some simple test case here</BODY></HTML>";
-
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/browser/Browser3.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/browser/Browser3.java
deleted file mode 100644
index b827577bb1..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/browser/Browser3.java
+++ /dev/null
@@ -1,166 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit.browser;
-
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.browser.*;
-import org.eclipse.swt.*;
-
-public class Browser3 {
- public static boolean passed = false;
- public static boolean openWindow, locationChanging, locationChanged, visibilityShow, progressCompleted;
-
- public static boolean test1(String url) {
- System.out.println("javascript window.open - args: "+url+" Expected Event Sequence: Browser1:OpenWindow.open > { Browser2:Location.changing, Browser2:Visibility.show, Browser2:Location.changed } > Browser2:Progress.completed");
- passed = false;
- locationChanging = locationChanged = progressCompleted = false;
-
- final Display display = new Display();
- final Shell shell = new Shell(display);
- shell.setLayout(new FillLayout());
- final Browser browser1 = new Browser(shell, SWT.NONE);
- final Shell shell2 = new Shell(display);
- shell2.setLayout(new FillLayout());
- final Browser browser2 = new Browser(shell2, SWT.NONE);
- browser1.addOpenWindowListener(new OpenWindowListener() {
- public void open(WindowEvent event) {
- openWindow = true;
- Browser src = (Browser)event.widget;
- if (src != browser1) {
- System.out.println("Failure - expected "+browser1+", got "+src);
- passed = false;
- shell.close();
- return;
- }
- if (event.browser != null) {
- System.out.println("Failure - expected null, got "+event.browser);
- passed = false;
- shell.close();
- return;
- }
- event.browser = browser2;
- }
- });
- browser2.addLocationListener(new LocationListener() {
- public void changed(LocationEvent event) {
- if (!openWindow || !locationChanging) {
- System.out.println("Failure - LocationEvent.changing received at wrong time");
- passed = false;
- shell.close();
- return;
- }
- locationChanged = true;
- }
- public void changing(LocationEvent event) {
- if (!openWindow) {
- System.out.println("Failure - LocationEvent.changing received at wrong time");
- passed = false;
- shell.close();
- return;
- }
- locationChanging = true;
- }
- });
- browser2.addVisibilityWindowListener(new VisibilityWindowListener() {
- public void hide(WindowEvent event) {
- System.out.println("Failure - did not expect VisibilityEvent.hide");
- passed = false;
- shell.close();
- }
- public void show(WindowEvent event) {
- if (!openWindow) {
- System.out.println("Failure - VisibilityEvent.show received at wrong time");
- passed = false;
- shell.close();
- return;
- }
- shell2.open();
- }
- });
- browser2.addProgressListener(new ProgressListener() {
- public void changed(ProgressEvent event) {
- }
-
- public void completed(ProgressEvent event) {
- new Thread() {
- public void run() {
- System.out.println("timer start");
- try { sleep(2000); } catch (Exception e) {};
- passed = true;
- if (!display.isDisposed())
- display.asyncExec(new Runnable(){
- public void run() {
- System.out.println("timer asyncexec shell.close");
- if (!shell.isDisposed()) shell.close();
- }
- });
- System.out.println("timer over");
- };
- }.start();
- }
- });
-
- shell.open();
- browser1.setUrl(url);
-
- boolean timeout = runLoopTimer(display, shell, 600);
- if (timeout) passed = false;
- display.dispose();
- return passed;
- }
-
- static boolean runLoopTimer(final Display display, final Shell shell, final int seconds) {
- final boolean[] timeout = {false};
- new Thread() {
- public void run() {
- try {
- for (int i = 0; i < seconds; i++) {
- Thread.sleep(1000);
- if (display.isDisposed() || shell.isDisposed()) return;
- }
- }
- catch (Exception e) {}
- timeout[0] = true;
- /* wake up the event loop */
- if (!display.isDisposed()) {
- display.asyncExec(new Runnable() {
- public void run() {
- if (!shell.isDisposed()) shell.redraw();
- }
- });
- }
- }
- }.start();
- while (!timeout[0] && !shell.isDisposed()) if (!display.readAndDispatch()) display.sleep();
- return timeout[0];
- }
-
- public static boolean test() {
- int fail = 0;
- String url;
- String pluginPath = System.getProperty("PLUGIN_PATH");
- System.out.println("PLUGIN_PATH <"+pluginPath+">");
- if (pluginPath == null) url = Browser3.class.getClassLoader().getResource("browser3.html").toString();
- else url = pluginPath + "/data/browser3.html";
- String[] urls = {url};
- for (int i = 0; i < urls.length; i++) {
- boolean result = test1(urls[i]);
- System.out.print(result ? "." : "E");
- if (!result) fail++;
- }
- return fail == 0;
- }
-
- public static void main(String[] argv) {
- System.out.println("\r\nTests Finished. SUCCESS: "+test());
- }
-} \ No newline at end of file
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/browser/Browser4.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/browser/Browser4.java
deleted file mode 100644
index 8de44b4028..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/browser/Browser4.java
+++ /dev/null
@@ -1,189 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit.browser;
-
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.browser.*;
-import org.eclipse.swt.*;
-
-public class Browser4 {
- public static boolean passed = false;
- public static boolean openWindow, locationChanging, locationChanged, visibilityShow, progressCompleted, closeWindow;
-
- public static boolean test1(String url) {
- System.out.println("javascript window.open - args: "+url+" Expected Event Sequence: Browser1:OpenWindow.open > { Browser2:Location.changing, Browser2:Visibility.show, Browser2:Location.changed } > Browser2:Progress.completed > Browser2.CloseWindow.close");
- passed = false;
- locationChanging = locationChanged = progressCompleted = false;
-
- final Display display = new Display();
- final Shell shell = new Shell(display);
- shell.setLayout(new FillLayout());
- final Browser browser1 = new Browser(shell, SWT.NONE);
- final Shell shell2 = new Shell(display);
- shell2.setLayout(new FillLayout());
- final Browser browser2 = new Browser(shell2, SWT.NONE);
- browser1.addOpenWindowListener(new OpenWindowListener() {
- public void open(WindowEvent event) {
- openWindow = true;
- Browser src = (Browser)event.widget;
- if (src != browser1) {
- System.out.println("Failure - expected "+browser1+", got "+src);
- passed = false;
- shell.close();
- return;
- }
- if (event.browser != null) {
- System.out.println("Failure - expected null, got "+event.browser);
- passed = false;
- shell.close();
- return;
- }
- event.browser = browser2;
- }
- });
- browser2.addLocationListener(new LocationListener() {
- public void changed(LocationEvent event) {
- if (!openWindow || !locationChanging) {
- System.out.println("Failure - Location.changing received at wrong time");
- passed = false;
- shell.close();
- return;
- }
- locationChanged = true;
- }
- public void changing(LocationEvent event) {
- if (!openWindow) {
- System.out.println("Failure - Location.changing received at wrong time");
- passed = false;
- shell.close();
- return;
- }
- locationChanging = true;
- }
- });
- browser2.addVisibilityWindowListener(new VisibilityWindowListener() {
- public void hide(WindowEvent event) {
- System.out.println("Failure - did not expect VisibilityEvent.hide");
- passed = false;
- shell.close();
- }
- public void show(WindowEvent event) {
- if (!openWindow) {
- System.out.println("Failure - Visibility.show received at wrong time");
- passed = false;
- shell.close();
- return;
- }
- shell2.open();
- visibilityShow = true;
- }
- });
- browser2.addProgressListener(new ProgressListener() {
- public void changed(ProgressEvent event) {
- }
-
- public void completed(ProgressEvent event) {
- if (!locationChanging || !locationChanged || !visibilityShow) {
- System.out.println("Failure - Progress.completed received at wrong time");
- passed = false;
- shell.close();
- return;
- }
- progressCompleted = true;
- }
- });
- browser2.addCloseWindowListener(new CloseWindowListener() {
- public void close(WindowEvent event) {
- if (!progressCompleted) {
- System.out.println("Failure - CloseWindow.close received at wrong time");
- passed = false;
- shell.close();
- return;
- }
- closeWindow = true;
- final Browser browser = (Browser)event.widget;
- Shell parent = browser.getShell();
- parent.close();
-
- new Thread() {
- public void run() {
- System.out.println("timer start");
- try { sleep(2000); } catch (Exception e) {};
- passed = true;
- if (!display.isDisposed())
- display.asyncExec(new Runnable(){
- public void run() {
- System.out.println("timer asyncexec shell.close");
- if (!shell.isDisposed()) shell.close();
- }
- });
- System.out.println("timer over");
- };
- }.start();
- }
- });
-
- shell.open();
- browser1.setUrl(url);
-
- boolean timeout = runLoopTimer(display, shell, 600);
- if (timeout) passed = false;
- display.dispose();
- return passed;
- }
-
- static boolean runLoopTimer(final Display display, final Shell shell, final int seconds) {
- final boolean[] timeout = {false};
- new Thread() {
- public void run() {
- try {
- for (int i = 0; i < seconds; i++) {
- Thread.sleep(1000);
- if (display.isDisposed() || shell.isDisposed()) return;
- }
- }
- catch (Exception e) {}
- timeout[0] = true;
- /* wake up the event loop */
- if (!display.isDisposed()) {
- display.asyncExec(new Runnable() {
- public void run() {
- if (!shell.isDisposed()) shell.redraw();
- }
- });
- }
- }
- }.start();
- while (!timeout[0] && !shell.isDisposed()) if (!display.readAndDispatch()) display.sleep();
- return timeout[0];
- }
-
- public static boolean test() {
- int fail = 0;
- String url;
- String pluginPath = System.getProperty("PLUGIN_PATH");
- System.out.println("PLUGIN_PATH <"+pluginPath+">");
- if (pluginPath == null) url = Browser4.class.getClassLoader().getResource("browser4.html").toString();
- else url = pluginPath + "/data/browser4.html";
- String[] urls = {url};
- for (int i = 0; i < urls.length; i++) {
- boolean result = test1(urls[i]);
- System.out.print(result ? "." : "E");
- if (!result) fail++;
- }
- return fail == 0;
- }
-
- public static void main(String[] argv) {
- System.out.println("\r\nTests Finished. SUCCESS: "+test());
- }
-} \ No newline at end of file
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/browser/Browser5.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/browser/Browser5.java
deleted file mode 100644
index ef16cc2183..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/browser/Browser5.java
+++ /dev/null
@@ -1,162 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit.browser;
-
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.browser.*;
-import org.eclipse.swt.*;
-import org.eclipse.swt.graphics.*;
-
-public class Browser5 {
- public static boolean passed = false;
- static Point[][] regressionBounds = {
- {new Point(10,200), new Point(300,100)},
- {new Point(10,200), null},
- {null, new Point(300,100)},
- {null, null}};
- static int index = 0;
- static int cntPassed = 0;
- static int cntClosed = 0;
-
- public static boolean test1(String url) {
- System.out.println("javascript window.open with location and size parameters - args: "+url+" Expected Event Sequence: Visibility.open");
- passed = false;
-
- final Display display = new Display();
- final Shell shell = new Shell(display);
- shell.setLayout(new FillLayout());
- final Browser browser = new Browser(shell, SWT.NONE);
- browser.addOpenWindowListener(new OpenWindowListener() {
- public void open(WindowEvent event) {
- System.out.println("OpenWindow "+index);
- Shell newShell = new Shell(display);
- newShell.setLayout(new FillLayout());
- Browser browser = new Browser(newShell, SWT.NONE);
- browser.setData("index", new Integer(index));
- browser.addVisibilityWindowListener(new VisibilityWindowListener() {
- public void hide(WindowEvent event) {
- }
- public void show(WindowEvent event) {
- Browser browser = (Browser)event.widget;
- Shell parent = browser.getShell();
- if (event.location != null) parent.setLocation(event.location);
- if (event.size != null) parent.setSize(event.size);
- int index = ((Integer)browser.getData("index")).intValue();
- parent.setText("SWT Browser shell "+index);
- parent.open();
- if (index < 0) {
- /* Certain browsers fire multiple show events for no good reason. Further show events
- * are considered 'legal' as long as they don't contain size and location information.
- */
- if (event.location != null || event.size != null) {
- System.out.println("Failure - Browser "+index+" is receiving multiple show events");
- passed = false;
- shell.close();
- } else {
- System.out.println("Unnecessary (but harmless) visibility.show event Browser "+index);
- }
- } else {
- browser.setData("index", new Integer(-100-index));
- System.out.println("Visibility.show browser "+index+" location "+event.location+" size "+event.size);
- /* Certain browsers include decorations to the expected size. Accept size that are larger or equal than
- * expected. Certain browsers invent size or location when some parameters are missing. If we expect
- * null for one of size or location, also accept non null answers.
- */
- boolean checkLocation = (event.location == null && regressionBounds[index][0] == null) ||
- (event.location != null && event.location.equals(regressionBounds[index][0]) ||
- (event.location != null && regressionBounds[index][0] == null));
- boolean checkSize = ((event.size == null && regressionBounds[index][1] == null) ||
- (event.size != null && event.size.equals(regressionBounds[index][1])) ||
- (event.size != null && regressionBounds[index][1] == null) ||
- (event.size != null && event.size.x >= regressionBounds[index][1].x && event.size.y >= regressionBounds[index][1].y));
- System.out.println("Expected location "+regressionBounds[index][0]+" size "+regressionBounds[index][1]);
- if (!checkSize || !checkLocation || ((event.size != null || event.location != null) && regressionBounds[index][0] == null && regressionBounds[index][1] == null)) {
- System.out.println(" Failure ");
- passed = false;
- shell.close();
- return;
- } else cntPassed++;
- }
- }
- });
- browser.addCloseWindowListener(new CloseWindowListener() {
- public void close(WindowEvent event) {
- cntClosed++;
- System.out.println("Close");
- Browser browser = (Browser)event.widget;
- browser.getShell().close();
- if (cntPassed == regressionBounds.length) passed = true;
- if (cntClosed == regressionBounds.length) {
- shell.close();
- return;
- }
- }
- });
- event.browser = browser;
- index++;
- }
- });
- shell.open();
- browser.setUrl(url);
-
- boolean timeout = runLoopTimer(display, shell, 600);
- if (timeout) passed = false;
- display.dispose();
- return passed;
- }
-
- static boolean runLoopTimer(final Display display, final Shell shell, final int seconds) {
- final boolean[] timeout = {false};
- new Thread() {
- public void run() {
- try {
- for (int i = 0; i < seconds; i++) {
- Thread.sleep(1000);
- if (display.isDisposed() || shell.isDisposed()) return;
- }
- }
- catch (Exception e) {}
- timeout[0] = true;
- /* wake up the event loop */
- if (!display.isDisposed()) {
- display.asyncExec(new Runnable() {
- public void run() {
- if (!shell.isDisposed()) shell.redraw();
- }
- });
- }
- }
- }.start();
- while (!timeout[0] && !shell.isDisposed()) if (!display.readAndDispatch()) display.sleep();
- return timeout[0];
- }
-
- public static boolean test() {
- int fail = 0;
- String url;
- String pluginPath = System.getProperty("PLUGIN_PATH");
- System.out.println("PLUGIN_PATH <"+pluginPath+">");
- if (pluginPath == null) url = Browser5.class.getClassLoader().getResource("browser5.html").toString();
- else url = pluginPath + "/data/browser5.html";
- String[] urls = {url};
- for (int i = 0; i < urls.length; i++) {
- boolean result = test1(urls[i]);
- System.out.print(result ? "." : "E");
- if (!result) fail++;
- }
- return fail == 0;
- }
-
- public static void main(String[] argv) {
- System.out.println("\r\nTests Finished. SUCCESS: "+test());
- }
-} \ No newline at end of file
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/browser/Browser6.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/browser/Browser6.java
deleted file mode 100644
index ef6ab1c035..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/browser/Browser6.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit.browser;
-
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.browser.*;
-import org.eclipse.swt.*;
-
-public class Browser6 {
- public static boolean passed = false;
-
- public static boolean test1(String url) {
- System.out.println("URL Loading, verify get title event - args: "+url+" Expected Event Sequence: Title.changed");
- passed = false;
-
- final Display display = new Display();
- final Shell shell = new Shell(display);
- shell.setLayout(new FillLayout());
- Browser browser = new Browser(shell, SWT.NONE);
- browser.addTitleListener(new TitleListener() {
- public void changed(TitleEvent event) {
- Browser browser = (Browser)event.widget;
- String url = browser.getUrl();
- System.out.println("Title changed <"+event.title+"> for location <"+url+">");
- passed = true;
- shell.close();
- }
- });
-
- shell.open();
- browser.setUrl(url);
-
- boolean timeout = runLoopTimer(display, shell, 600);
- if (timeout) passed = false;
- display.dispose();
- return passed;
- }
-
- public static boolean test2(String url, final String expectedTitle) {
- System.out.println("URL Loading, verify get title event - args: "+url+" Expected Event Sequence: Title.changed");
- passed = false;
-
- final Display display = new Display();
- final Shell shell = new Shell(display);
- shell.setLayout(new FillLayout());
- Browser browser = new Browser(shell, SWT.NONE);
- browser.addTitleListener(new TitleListener() {
- public void changed(TitleEvent event) {
- Browser browser = (Browser)event.widget;
- String url = browser.getUrl();
- System.out.println("Title changed <"+event.title+"> for location <"+url+">");
- if (event.title.equals(expectedTitle)) {
- passed = true;
- shell.close();
- }
- }
- });
- browser.addProgressListener(new ProgressListener() {
- public void changed(ProgressEvent event) {
- }
- public void completed(ProgressEvent event) {
- shell.close();
- }
- });
- shell.open();
- browser.setUrl(url);
-
- boolean timeout = runLoopTimer(display, shell, 600);
- if (timeout) passed = false;
- display.dispose();
- return passed;
- }
-
- static boolean runLoopTimer(final Display display, final Shell shell, final int seconds) {
- final boolean[] timeout = {false};
- new Thread() {
- public void run() {
- try {
- for (int i = 0; i < seconds; i++) {
- Thread.sleep(1000);
- if (display.isDisposed() || shell.isDisposed()) return;
- }
- }
- catch (Exception e) {}
- timeout[0] = true;
- /* wake up the event loop */
- if (!display.isDisposed()) {
- display.asyncExec(new Runnable() {
- public void run() {
- if (!shell.isDisposed()) shell.redraw();
- }
- });
- }
- }
- }.start();
- while (!timeout[0] && !shell.isDisposed()) if (!display.readAndDispatch()) display.sleep();
- return timeout[0];
- }
-
- public static boolean test() {
- int fail = 0;
-
- String[] urls = {"http://www.eclipse.org", "http://www.google.com", "http://www.ibm.com"};
- for (int i = 0; i < urls.length; i++) {
- boolean result = test1(urls[i]);
- System.out.print(result ? "." : "E");
- if (!result) fail++;
- }
-
- String pluginPath = System.getProperty("PLUGIN_PATH");
- System.out.println("PLUGIN_PATH <"+pluginPath+">");
- String url;
- if (pluginPath == null) url = Browser6.class.getClassLoader().getResource("browser6.html").toString();
- else url = pluginPath + "/data/browser6.html";
- urls = new String[] {url};
- String[] titles = {"This is a test title that must be carefully checked when that page is loaded"};
- for (int i = 0; i < urls.length; i++) {
- boolean result = test2(urls[i], titles[i]);
- System.out.print(result ? "." : "E");
- if (!result) fail++;
- }
-
-
- return fail == 0;
- }
-
- public static void main(String[] argv) {
- System.out.println("\r\nTests Finished. SUCCESS: "+test());
- }
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/browser/Browser7.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/browser/Browser7.java
deleted file mode 100644
index b43a304952..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/browser/Browser7.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit.browser;
-
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.browser.*;
-import org.eclipse.swt.*;
-import org.eclipse.swt.graphics.*;
-
-public class Browser7 {
- public static boolean passed = false;
-
- static int cntOpen = 0;
- static int cntShow = 0;
-
- public static boolean test(String url) {
- System.out.println("window.open, verify get Window.open and Window.show events - args: "+url+" Expected Event Sequence: Window.open, Window.show multiple times");
- passed = false;
-
- cntOpen = 0;
- cntShow = 0;
-
- final Display display = new Display();
- final Shell shell = new Shell(display);
- shell.setLayout(new FillLayout());
- Browser browser = new Browser(shell, SWT.NONE);
- initialize(display, browser);
-
- shell.open();
- browser.setUrl(url);
-
- boolean timeout = runLoopTimer(display, shell, 10);
- System.out.println("Window opened: "+cntOpen+" Window shown: "+cntShow);
- /*
- * Bug in Mozilla. Multiple show events are fired by Mozilla.
- */
- if (timeout) passed = cntOpen == 4 && cntShow >= 4;
- display.dispose();
- return passed;
- }
-
- static void initialize(final Display display, Browser browser) {
- browser.addOpenWindowListener(new OpenWindowListener() {
- public void open(WindowEvent event) {
- System.out.println("VisibilityWindowListener.open");
- Shell shell = new Shell(display);
- shell.setText("New Window");
- shell.setLayout(new FillLayout());
- Browser browser = new Browser(shell, SWT.NONE);
- initialize(display, browser);
- event.browser = browser;
- cntOpen++;
- }
- });
- browser.addVisibilityWindowListener(new VisibilityWindowListener() {
- public void hide(WindowEvent event) {
- Browser browser = (Browser)event.widget;
- Shell shell = browser.getShell();
- shell.setVisible(false);
- }
- public void show(WindowEvent event) {
- System.out.println("VisibilityWindowListener.show location="+event.location+" size="+event.size+" addressBar="+event.addressBar+" menuBar="+event.menuBar+" statusBar="+event.statusBar+" toolBar="+event.toolBar);
- Browser browser = (Browser)event.widget;
- Shell shell = browser.getShell();
- if (event.location != null) shell.setLocation(event.location);
- if (event.size != null) {
- Point size = event.size;
- shell.setSize(shell.computeSize(size.x, size.y));
- }
- cntShow++;
- shell.open();
- }
- });
- browser.addCloseWindowListener(new CloseWindowListener() {
- public void close(WindowEvent event) {
- Browser browser = (Browser)event.widget;
- Shell shell = browser.getShell();
- shell.close();
- }
- });
-}
-
- static boolean runLoopTimer(final Display display, final Shell shell, final int seconds) {
- final boolean[] timeout = {false};
- new Thread() {
- public void run() {
- try {
- for (int i = 0; i < seconds; i++) {
- Thread.sleep(1000);
- if (display.isDisposed() || shell.isDisposed()) return;
- }
- }
- catch (Exception e) {}
- timeout[0] = true;
- /* wake up the event loop */
- if (!display.isDisposed()) {
- display.asyncExec(new Runnable() {
- public void run() {
- if (!shell.isDisposed()) shell.redraw();
- }
- });
- }
- }
- }.start();
- while (!timeout[0] && !shell.isDisposed()) if (!display.readAndDispatch()) display.sleep();
- return timeout[0];
- }
-
- public static boolean test() {
- int fail = 0;
-
- String pluginPath = System.getProperty("PLUGIN_PATH");
- System.out.println("PLUGIN_PATH <"+pluginPath+">");
- String url;
- if (pluginPath == null) url = Browser7.class.getClassLoader().getResource("browser7.html").toString();
- else url = pluginPath + "/data/browser7.html";
- String[] urls = new String[] {url};
- for (int i = 0; i < urls.length; i++) {
- boolean result = test(urls[i]);
- System.out.print(result ? "." : "E");
- if (!result) fail++;
- }
- return fail == 0;
- }
-
- public static void main(String[] argv) {
- System.out.println("\r\nTests Finished. SUCCESS: "+test());
- }
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/browser/Test_BrowserSuite.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/browser/Test_BrowserSuite.java
deleted file mode 100644
index dd43ada836..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/browser/Test_BrowserSuite.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit.browser;
-
-import junit.framework.*;
-import junit.textui.*;
-import org.eclipse.swt.tests.junit.*;
-import org.eclipse.swt.widgets.*;
-
-/**
- * Automated Test Suite for class org.eclipse.swt.browser.StatusTextListener
- *
- * @see org.eclipse.swt.browser.StatusTextListener
- */
-public class Test_BrowserSuite extends SwtTestCase {
-
-public Test_BrowserSuite(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() {
-}
-
-protected void tearDown() {
-}
-
-public void Browser1() {
- System.out.println("** Browser1 **");
- boolean result = Browser1.test();
- assertTrue(result);
-}
-
-public void Browser2() {
- System.out.println("** Browser2 **");
- boolean result = Browser2.test();
- assertTrue(result);
-}
-
-public void Browser3() {
- System.out.println("** Browser3 **");
- boolean result = Browser3.test();
- assertTrue(result);
-}
-
-public void Browser4() {
- System.out.println("** Browser4 **");
- boolean result = Browser4.test();
- assertTrue(result);
-}
-
-public void Browser5() {
- System.out.println("** Browser5 **");
- boolean result = Browser5.test();
- assertTrue(result);
-}
-
-public void Browser6() {
- System.out.println("** Browser6 **");
- boolean result = Browser6.test();
- assertTrue(result);
-}
-
-public void Browser7() {
- System.out.println("** Browser7 **");
- boolean result = Browser7.test();
- assertTrue(result);
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_BrowserSuite((String)e.nextElement()));
- }
- return suite;
-}
-
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("Browser1");
- methodNames.addElement("Browser2");
- methodNames.addElement("Browser3");
- methodNames.addElement("Browser4");
- methodNames.addElement("Browser5");
- methodNames.addElement("Browser6");
- methodNames.addElement("Browser7");
- return methodNames;
-}
-
-protected void runTest() throws Throwable {
- /*
- * The tests in this suite manage their own Display and event loop
- * to validate asynchronous use cases.
- * Dispose any previously existing display for the calling thread
- * before starting the tests.
- */
- Display display = Display.getCurrent();
- if (display != null) display.dispose();
-
- if (getName().equals("Browser1")) Browser1();
- if (getName().equals("Browser2")) Browser2();
- if (getName().equals("Browser3")) Browser3();
- if (getName().equals("Browser4")) Browser4();
- if (getName().equals("Browser5")) Browser5();
- if (getName().equals("Browser6")) Browser6();
- if (getName().equals("Browser7")) Browser7();
-
- /*
- * Ensure we don't leave a Display from the tests we run.
- */
- display = Display.getCurrent();
- if (display != null) display.dispose();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/corrupt.bmp b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/corrupt.bmp
deleted file mode 100644
index 7d1d3ab890..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/corrupt.bmp
+++ /dev/null
Binary files differ
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/corrupt.gif b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/corrupt.gif
deleted file mode 100644
index 1b4369bce5..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/corrupt.gif
+++ /dev/null
Binary files differ
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/corrupt.jpg b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/corrupt.jpg
deleted file mode 100644
index f728fba6c9..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/corrupt.jpg
+++ /dev/null
Binary files differ
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/corrupt.png b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/corrupt.png
deleted file mode 100644
index aecbc78845..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/corrupt.png
+++ /dev/null
Binary files differ
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/corruptBadBitDepth.png b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/corruptBadBitDepth.png
deleted file mode 100644
index b43cb915f8..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/corruptBadBitDepth.png
+++ /dev/null
Binary files differ
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/empty.txt b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/empty.txt
deleted file mode 100644
index e69de29bb2..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/empty.txt
+++ /dev/null
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/folder.bmp b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/folder.bmp
deleted file mode 100644
index 574351fbd4..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/folder.bmp
+++ /dev/null
Binary files differ
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/folder.gif b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/folder.gif
deleted file mode 100644
index 4e17c75cc2..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/folder.gif
+++ /dev/null
Binary files differ
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/folder.jpg b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/folder.jpg
deleted file mode 100644
index 3870170878..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/folder.jpg
+++ /dev/null
Binary files differ
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/folder.png b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/folder.png
deleted file mode 100644
index 9ef2dc09d2..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/folder.png
+++ /dev/null
Binary files differ
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/folderOpen.bmp b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/folderOpen.bmp
deleted file mode 100644
index 6ba1214663..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/folderOpen.bmp
+++ /dev/null
Binary files differ
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/folderOpen.gif b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/folderOpen.gif
deleted file mode 100644
index 64886bbbfd..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/folderOpen.gif
+++ /dev/null
Binary files differ
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/folderOpen.jpg b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/folderOpen.jpg
deleted file mode 100644
index faf88826b1..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/folderOpen.jpg
+++ /dev/null
Binary files differ
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/folderOpen.png b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/folderOpen.png
deleted file mode 100644
index 9b36d62b38..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/folderOpen.png
+++ /dev/null
Binary files differ
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/interlaced_target.png b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/interlaced_target.png
deleted file mode 100644
index 5b4745825b..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/interlaced_target.png
+++ /dev/null
Binary files differ
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/junitGen.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/junitGen.java
deleted file mode 100644
index ac7e450c67..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/junitGen.java
+++ /dev/null
@@ -1,749 +0,0 @@
-package org.eclipse.swt.tests.junit;
-
-import java.util.zip.*;
-import java.util.*;
-import java.lang.reflect.*;
-import java.io.*;
-import java.net.*;
-
-/**
- * Create SWT Junit stubs based on a swt jar used as a reference
- * Command line tool - run without parameters to get help information
- */
-public class junitGen {
- String destFolder = null;
- int counter = 0;
-
- /**
- * @param jarfile the url of a jar file
- * @return all public classes in the jar
- */
- public Vector getClasses(String jarfile) {
- Vector vector = new Vector();
- try {
- ZipFile zipFile = new ZipFile(jarfile);
- File file = new File(jarfile);
- URL url = file.toURL();
- ClassLoader loader = new URLClassLoader(new URL[] { url });
-
- Enumeration entries = zipFile.entries();
- while (entries.hasMoreElements()) {
- ZipEntry entry = (ZipEntry)entries.nextElement();
- String name = entry.getName();
- if (name.endsWith(".class")) {
- name = name.substring(0, name.length() - ".class".length());
- name = name.replace('/', '.');
- Class clazz = Class.forName(name, false, loader);
- if (filterClass(clazz)) vector.add(clazz);
- }
- }
- } catch (Exception e) {
- System.out.println("Exception " + e);
- return null;
- }
- return vector;
- }
- /**
- * Create a Junit java test file
- * @param clazz class to create the test for
- */
- public void createFileTest(Class clazz) {
- try {
- String name = getClassName(clazz);
- name = destFolder + "/" + name + ".java";
- FileWriter writer = new FileWriter(name);
- createSwtTest(writer, clazz);
- writer.close();
- } catch (Exception e) {
- System.out.println("Exception " + e);
- }
-
- }
-
- void createSwtTest(FileWriter writer, Class clazz) throws IOException {
- SwtTest test = new SwtTest(writer, clazz);
- test.writeCopyRights();
- test.writePackage();
- test.newLine();
- test.writeImports();
- test.newLine();
- test.writeClassComments();
- test.writeClassDeclaration();
- test.newLine();
- test.writeConstructor();
- test.newLine();
- test.writeMain();
- test.newLine();
- test.writeSetUp();
- test.newLine();
- test.writeTearDown();
- test.newLine();
- test.writeMethods();
- test.newLine();
- test.writeSuite();
- test.newLine();
- test.writeMethodNames();
- test.newLine();
- test.writeRunTest();
- test.writeClassClosure();
- }
-
- public void setDestinationFolder(String dest) {
- destFolder = dest;
- }
-
- public void incrementCounter() {
- counter++;
- }
-
- public int getCounter() {
- return counter;
- }
-
- public static void createTests(String jarfile, String destFolder) {
- junitGen gen = new junitGen();
- Vector classes = gen.getClasses(jarfile);
- gen.setDestinationFolder(destFolder);
- if (classes == null) {
- System.out.println("No classes found.");
- return;
- }
- Enumeration entries = classes.elements();
- while (entries.hasMoreElements()) {
- gen.createFileTest((Class)entries.nextElement());
- }
- System.out.println("Test stubs written: " + gen.getCounter());
- }
-
- public void diff(Vector oldClasses, Vector newClasses) {
- SwtDiff diff = new SwtDiff(oldClasses, newClasses);
- diff.compute();
- }
-
- public static void diffTests(String jarfileOld, String jarfileNew) {
- junitGen gen = new junitGen();
- Vector oldClasses = gen.getClasses(jarfileOld);
- if (oldClasses == null) {
- System.out.println("No classes found in old jar");
- return;
- }
- Vector newClasses = gen.getClasses(jarfileNew);
- if (newClasses == null) {
- System.out.println("No classes found in new jar");
- return;
- }
- gen.diff(oldClasses, newClasses);
- }
-
- public static void main(String[] args) {
- if (args == null || args.length < 3) {
- System.out.println("Usage: java junitGen flag arg1 arg2 ...");
- System.out.println(" where flag is one of:");
- System.out.println("create: create the junit test stubs");
- System.out.println(" arg1: source jar e.g. d:/swt.jar");
- System.out.println(" arg2: destination e.g. d:/tests");
- System.out.println("diff: diff 2 jars showing which tests must be removed,");
- System.out.println(" and added");
- System.out.println(" arg1: old jar e.g. d:/old/swt.jar");
- System.out.println(" arg2: new jar e.g. d:/new/swt.jar");
- return;
- }
- if (args[0].equals("create")) createTests(args[1], args[2]);
- else if (args[0].equals("diff")) diffTests(args[1], args[2]);
- }
-
- boolean filterClass(Class clazz) {
- /* JUnit tests for public classes only */
- int modifiers = clazz.getModifiers();
- if (!Modifier.isPublic(modifiers)) return false;
-
- /* JUnit tests for classes which are not part of an internal package */
- String packageName = clazz.getPackage().getName();
- if (packageName.indexOf("internal") != -1) return false;
-
- /* JUnit tests for classes with public constructors or public methods */
- Constructor[] constructors = getFilteredConstructors(clazz);
- Method[] methods = getFilteredMethods(clazz);
- if (constructors.length == 0 && methods.length == 0) return false;
- return true;
- }
-
- String getClassName(Class clazz) {
- String name = clazz.getName();
- name = "Test_" + name.replace('.', '_');
- return name;
- }
-
- String getMethodName(Constructor constructor) {
- String name = "test_Constructor";
- Class[] parameters = constructor.getParameterTypes();
- for (int i = 0; i < parameters.length; i++) {
- name += getTypeSignature(parameters[i]);
- }
- return name;
- }
-
- String getMethodName(Method method) {
- String name = "test_" + method.getName();
- Class[] parameters = method.getParameterTypes();
- for (int i = 0; i < parameters.length; i++) {
- name += getTypeSignature(parameters[i]);
- }
- return name;
- }
-
- String getTypeSignature(Class clazz) {
- if (clazz == Integer.TYPE) return "I";
- if (clazz == Boolean.TYPE) return "Z";
- if (clazz == Long.TYPE) return "J";
- if (clazz == Short.TYPE) return "S";
- if (clazz == Character.TYPE) return "C";
- if (clazz == Byte.TYPE) return "B";
- if (clazz == Float.TYPE) return "F";
- if (clazz == Double.TYPE) return "D";
- if (clazz.isArray()) {
- Class componentType = clazz.getComponentType();
- return "$" + getTypeSignature(componentType);
- }
- return "L" + clazz.getName().replace('.', '_');
- }
-
- Constructor[] getFilteredConstructors(Class clazz) {
- Constructor[] constructors = clazz.getConstructors();
- Arrays.sort(constructors, new Comparator() {
- public int compare(Object a, Object b) {
- return (getMethodName((Constructor)a).compareTo(getMethodName((Constructor)b)));
- }
- });
- int count = 0;
- for (int i = 0; i < constructors.length; i++) {
- Constructor constructor = constructors[i];
- int modifiers = constructor.getModifiers();
- if (Modifier.isPublic(modifiers)) {
- constructors[count++] = constructors[i];
- }
- }
- Constructor[] result = new Constructor[count];
- System.arraycopy(constructors, 0, result, 0, count);
- return result;
- }
-
- Method[] getFilteredMethods(Class clazz) {
- Method[] methods = clazz.getDeclaredMethods();
- Arrays.sort(methods, new Comparator() {
- public int compare(Object a, Object b) {
- return (getMethodName((Method)a).compareTo(getMethodName((Method)b)));
- }
- });
- int count = 0;
- for (int i = 0; i < methods.length; i++) {
- Method method = methods[i];
- int modifiers = method.getModifiers();
- if (Modifier.isPublic(modifiers)) {
- methods[count++] = methods[i];
- }
- }
- Method[] result = new Method[count];
- System.arraycopy(methods, 0, result, 0, count);
- return result;
- }
-
-
- public class SwtTest {
- FileWriter writer;
- Class clazz;
- String lineSep = "\r\n";
-
- SwtTest(FileWriter writer, Class clazz) {
- this.writer = writer;
- this.clazz = clazz;
- }
-
- void newLine() throws IOException {
- writer.write(lineSep);
- }
-
- void writePackage() throws IOException {
- writer.write("package org.eclipse.swt.tests.junit;");
- writer.write(lineSep);
- writer.write(lineSep);
- }
-
- void writeCopyRights() throws IOException {
- writer.write(
- "/*******************************************************************************" + lineSep +
- " * Copyright (c) 2000, 2003 IBM Corporation and others." + lineSep +
- " * All rights reserved. This program and the accompanying materials " + lineSep +
- " * are made available under the terms of the Common Public License v1.0" + lineSep +
- " * which accompanies this distribution, and is available at" + lineSep +
- " * http://www.eclipse.org/legal/cpl-v10.html" + lineSep +
- " * " + lineSep +
- " * Contributors:" + lineSep +
- " * IBM Corporation - initial API and implementation" + lineSep +
- " *******************************************************************************/");
- writer.write(lineSep);
- }
-
- void writeImports() throws IOException {
- writer.write(
- "import junit.framework.*;" + lineSep +
- "import junit.textui.*;");
- writer.write(lineSep);
- }
-
- void writeClassComments() throws IOException {
- writer.write(
- "/**" + lineSep +
- " * Automated Test Suite for class " + clazz.getName() + lineSep +
- " *" + lineSep +
- " * @see " + clazz.getName() + lineSep +
- " */"
- );
- writer.write(lineSep);
- }
-
- boolean hasSwtJunitSuperClass(Class clazz) {
- Class superClass = clazz.getSuperclass();
- if (superClass == null) return false;
- String packageName = superClass.getPackage().getName();
- if (!packageName.startsWith("org.eclipse.swt")) return false;
- if (!filterClass(superClass)) return false;
- return true;
- }
-
- String getSwtJunitSuperClassName(Class clazz) {
- String defaultClass = "SwtTestCase";
- Class superClass = clazz.getSuperclass();
- if (superClass == null) return defaultClass;
- String packageName = superClass.getPackage().getName();
- if (!packageName.startsWith("org.eclipse.swt")) return defaultClass;
- if (!filterClass(superClass)) return defaultClass;
- return getClassName(superClass);
- }
-
- void writeClassDeclaration() throws IOException {
- String name = getClassName(clazz);
- String superClassName = getSwtJunitSuperClassName(clazz);
- writer.write(
- "public class " + name + " extends " + superClassName +" {"
- );
- writer.write(lineSep);
- }
-
- void writeConstructor() throws IOException {
- String name = getClassName(clazz);
- writer.write(
- "public " + name + "(String name) {" + lineSep +
- " super(name);" + lineSep +
- "}"
- );
- writer.write(lineSep);
- }
-
- void writeMain() throws IOException {
- writer.write(
- "public static void main(String[] args) {" + lineSep +
- " TestRunner.run(suite());" + lineSep +
- "}"
- );
- writer.write(lineSep);
- }
-
- void writeSetUp() throws IOException {
- writer.write(
- "protected void setUp() {"
- );
- writer.write(lineSep);
- if (hasSwtJunitSuperClass(clazz)) {
- writer.write(" super.setUp();");
- writer.write(lineSep);
- }
- writer.write("}");
- writer.write(lineSep);
- }
-
- void writeTearDown() throws IOException {
- writer.write(
- "protected void tearDown() {"
- );
- writer.write(lineSep);
- if (hasSwtJunitSuperClass(clazz)) {
- writer.write(" super.tearDown();");
- writer.write(lineSep);
- }
- writer.write("}");
- writer.write(lineSep);
- }
-
- void writeMethods() throws IOException {
- Constructor[] constructors = getFilteredConstructors(clazz);
- for (int i = 0; i < constructors.length; i++) {
- writeMethod(constructors[i]);
- if (i < constructors.length - 1) writer.write(lineSep);
- }
-
- Method[] methods = getFilteredMethods(clazz);
- if (constructors.length > 0 && methods.length > 0) writer.write(lineSep);
- for (int i = 0; i < methods.length; i++) {
- writeMethod(methods[i]);
- if (i < methods.length - 1) writer.write(lineSep);
- }
- }
-
- void writeMethod(Constructor constructor) throws IOException {
- String name = getMethodName(constructor);
- writer.write(
- "public void " + name + "() {" + lineSep +
- " warnUnimpl(\"Test " + name + " not written\");" + lineSep +
- "}"
- );
- writer.write(lineSep);
- incrementCounter();
- }
-
- void writeMethod(Method method) throws IOException {
- String name = getMethodName(method);
- writer.write(
- "public void " + name + "() {" + lineSep +
- " warnUnimpl(\"Test " + name + " not written\");" + lineSep +
- "}"
- );
- writer.write(lineSep);
- incrementCounter();
- }
-
- void writeSuite() throws IOException {
- String name = getClassName(clazz);
- writer.write(
- "public static Test suite() {" + lineSep +
- " TestSuite suite = new TestSuite();" + lineSep +
- " java.util.Vector methodNames = methodNames();" + lineSep +
- " java.util.Enumeration e = methodNames.elements();" + lineSep +
- " while (e.hasMoreElements()) {" + lineSep +
- " suite.addTest(new " + name + "((String)e.nextElement()));" + lineSep +
- " }" + lineSep +
- " return suite;" + lineSep +
- "}"
- );
- writer.write(lineSep);
- }
-
- void writeMethodNames() throws IOException {
- writer.write(
- "public static java.util.Vector methodNames() {" + lineSep +
- " java.util.Vector methodNames = new java.util.Vector();"
- );
- writer.write(lineSep);
- Constructor[] constructors = getFilteredConstructors(clazz);
- for (int i = 0; i < constructors.length; i++) {
- String name = getMethodName(constructors[i]);
- writer.write(
- " methodNames.addElement(\"" + name + "\");"
- );
- writer.write(lineSep);
- }
- Method[] methods = getFilteredMethods(clazz);
- for (int i = 0; i < methods.length; i++) {
- String name = getMethodName(methods[i]);
- writer.write(
- " methodNames.addElement(\"" + name + "\");"
- );
- writer.write(lineSep);
- }
- if (hasSwtJunitSuperClass(clazz)) {
- String superClassName = getSwtJunitSuperClassName(clazz);
- writer.write(" methodNames.addAll(" + superClassName + ".methodNames()); // add superclass method names");
- writer.write(lineSep);
- }
- writer.write(
- " return methodNames;" + lineSep +
- "}"
- );
- writer.write(lineSep);
- }
-
- void writeRunTest() throws IOException {
- writer.write(
- "protected void runTest() throws Throwable {"
- );
- writer.write(lineSep);
- Constructor[] constructors = getFilteredConstructors(clazz);
- Method[] methods = getFilteredMethods(clazz);
- for (int i = 0; i < constructors.length + methods.length; i++) {
- if (i == 0) writer.write(" if"); else writer.write(" else if");
- String name = i < constructors.length ? getMethodName(constructors[i]) : getMethodName(methods[i - constructors.length]);
- writer.write(
- " (getName().equals(\"" + name + "\")) " + name + "();"
- );
- writer.write(lineSep);
- }
- if (hasSwtJunitSuperClass(clazz)) {
- if (constructors.length + methods.length > 0) {
- writer.write(" else ");
- } else {
- writer.write(" ");
- }
- writer.write("super.runTest();");
- writer.write(lineSep);
- }
- writer.write("}");
- writer.write(lineSep);
- }
-
- void writeClassClosure() throws IOException {
- writer.write("}");
- writer.write(lineSep);
- }
- }
-
- public class DiffClass {
- /* the newClass has been added */
- public static final int NEW = 1;
- /* the oldClass has been removed */
- public static final int REMOVED = 2;
- /* the removedMethods from oldClass have been removed (if any)
- * the newMethods from newClass have been added
- */
- public static final int MODIFIED = 3;
-
- int type;
- Class oldClass;
- Class newClass;
- Method[] removedMethods;
- Method[] newMethods;
- Constructor[] removedConstructors;
- Constructor[] newConstructors;
-
- public DiffClass(int type,
- Class oldClass, Class newClass,
- Method[] removedMethods, Method[] newMethods,
- Constructor[] removedConstructors, Constructor[] newConstructors) {
- this.type = type;
- this.oldClass = oldClass;
- this.newClass = newClass;
- this.removedMethods = removedMethods;
- this.newMethods = newMethods;
- this.removedConstructors = removedConstructors;
- this.newConstructors = newConstructors;
- }
-
- public String toString() {
- switch (type) {
- case NEW: {
- return "NEW: " + getClassName(newClass);
- }
- case REMOVED: {
- return "REMOVED: " + getClassName(oldClass);
- }
- case MODIFIED: {
- String string = "MODIFIED: " + getClassName(oldClass);
- if (removedConstructors != null) {
- string += "\r\n\t" + removedConstructors.length + " constructor(s) removed";
- for (int i = 0; i < removedConstructors.length; i++) {
- string += "\r\n\t" + getMethodName(removedConstructors[i]);
- }
- }
-
- if (newConstructors != null) {
- string += "\r\n\t" + newConstructors.length + " constructor(s) added";
- for (int i = 0; i < newConstructors.length; i++) {
- string += "\r\n\t" + getMethodName(newConstructors[i]);
- }
- }
- if (removedMethods != null) {
- string += "\r\n\t" + removedMethods.length + " method(s) removed";
- for (int i = 0; i < removedMethods.length; i++) {
- string += "\r\n\t" + getMethodName(removedMethods[i]);
- }
- }
-
- if (newMethods != null) {
- string += "\r\n\t" + newMethods.length + " method(s) added";
- for (int i = 0; i < newMethods.length; i++) {
- string += "\r\n\t" + getMethodName(newMethods[i]);
- }
- }
- return string;
- }
- default: {
- return "invalid DiffClass "+type;
- }
- }
- }
- }
-
- public class SwtDiff {
- Class[] oldClasses, newClasses;
- /* removed[i] true means oldClasses[i] has been removed */
- boolean[] removed;
- /* added[i] true means newClasses[i] has been added */
- boolean[] added;
- /* old2New[i] == j >= 0 means oldClasses[i] corresponds to newClasses[j] */
- int[] old2New;
- int[] new2Old;
- Vector diffs = new Vector();
-
- public SwtDiff(Vector oldClasses, Vector newClasses) {
- Enumeration oldClassesEnum = oldClasses.elements();
- this.oldClasses = new Class[oldClasses.size()];
- int cnt = 0;
- while (oldClassesEnum.hasMoreElements()) {
- this.oldClasses[cnt++] = (Class)oldClassesEnum.nextElement();
- }
-
- Enumeration newClassesEnum = newClasses.elements();
- this.newClasses = new Class[newClasses.size()];
- cnt = 0;
- while (newClassesEnum.hasMoreElements()) {
- this.newClasses[cnt++] = (Class)newClassesEnum.nextElement();
- }
- old2New = new int[this.oldClasses.length];
- new2Old = new int[this.newClasses.length];
- }
-
- public void compute() {
- compareClasses();
- createClassDiff();
- outputClassDiff();
- }
-
- void compareClasses() {
- for (int i = 0; i < oldClasses.length; i++) {
- old2New[i] = -1;
- for (int j = 0; j < newClasses.length; j++) {
- if (oldClasses[i].getName().equals(newClasses[j].getName())) {
- old2New[i] = j;
- }
- }
- }
-
- for (int i = 0; i < newClasses.length; i++) {
- new2Old[i] = -1;
- for (int j = 0; j < oldClasses.length; j++) {
- if (newClasses[i].getName().equals(oldClasses[j].getName())) {
- new2Old[i] = j;
- }
- }
- }
- }
-
- void createClassDiff() {
- for (int i = 0; i < old2New.length; i++) {
- if (old2New[i] < 0) {
- /* Found a class which has been removed */
- DiffClass diff = new DiffClass(
- DiffClass.REMOVED,
- oldClasses[i],
- null,
- null,
- null,
- null,
- null);
- diffs.add(diff);
- } else {
- /* Found a class which is either identical or which contains
- * modified methods
- */
- Class oldClass = oldClasses[i];
- Class newClass = newClasses[old2New[i]];
- Method[] removedMethods = getRemovedMethods(oldClass, newClass);
- Method[] addedMethods = getAddedMethods(oldClass, newClass);
- Constructor[] removedConstructors = getRemovedConstructors(oldClass, newClass);
- Constructor[] addedConstructors = getAddedConstructors(oldClass, newClass);
- if (removedMethods != null || addedMethods != null ||
- removedConstructors != null || addedConstructors != null) {
- DiffClass diff = new DiffClass(
- DiffClass.MODIFIED,
- oldClass,
- newClass,
- removedMethods,
- addedMethods,
- removedConstructors,
- addedConstructors
- );
- diffs.add(diff);
- }
- }
- }
- for (int i = 0; i < new2Old.length; i++) {
- if (new2Old[i] < 0) {
- /* Found a class which has been added */
- DiffClass diff = new DiffClass(
- DiffClass.NEW,
- null,
- newClasses[i],
- null,
- null,
- null,
- null
- );
- diffs.add(diff);
- }
- }
- }
-
- Method[] getRemovedMethods(Class oldClass, Class newClass) {
- Method[] oldMethods = getFilteredMethods(oldClass);
- Method[] newMethods = getFilteredMethods(newClass);
-
- int count = 0;
- for (int i = 0; i < oldMethods.length; i++) {
- String oldName = getMethodName(oldMethods[i]);
- boolean removed = true;
- for (int j = 0; j < newMethods.length; j++) {
- String newName = getMethodName(newMethods[j]);
- if (oldName.equals(newName)) {
- removed = false;
- break;
- }
- }
- if (removed) oldMethods[count++] = oldMethods[i];
- }
- if (count == 0) return null;
- Method[] result = new Method[count];
- System.arraycopy(oldMethods, 0, result, 0, count);
- return result;
- }
-
- Method[] getAddedMethods(Class oldClass, Class newClass) {
- return getRemovedMethods(newClass, oldClass);
- }
-
- Constructor[] getRemovedConstructors(Class oldClass, Class newClass) {
- Constructor[] oldConstructors = getFilteredConstructors(oldClass);
- Constructor[] newConstructors = getFilteredConstructors(newClass);
-
- int count = 0;
- for (int i = 0; i < oldConstructors.length; i++) {
- String oldName = getMethodName(oldConstructors[i]);
- boolean removed = true;
- for (int j = 0; j < newConstructors.length; j++) {
- String newName = getMethodName(newConstructors[j]);
- if (oldName.equals(newName)) {
- removed = false;
- break;
- }
- }
- if (removed) oldConstructors[count++] = oldConstructors[i];
- }
- if (count == 0) return null;
- Constructor[] result = new Constructor[count];
- System.arraycopy(oldConstructors, 0, result, 0, count);
- return result;
- }
-
- Constructor[] getAddedConstructors(Class oldClass, Class newClass) {
- return getRemovedConstructors(newClass, oldClass);
- }
-
- void outputClassDiff() {
- Enumeration elements = diffs.elements();
- int changes = 0;
- while (elements.hasMoreElements()) {
- DiffClass diff = (DiffClass)elements.nextElement();
- System.out.println("["+changes+"] "+ diff);
- changes++;
- }
- }
- }
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/PerformanceTests.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/PerformanceTests.java
deleted file mode 100644
index 11dafb0e1e..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/PerformanceTests.java
+++ /dev/null
@@ -1,224 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit.performance;
-
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Suite for running SWT performance test cases.
- */
-public class PerformanceTests extends TestSuite {
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-public static Test suite() {
- return new PerformanceTests();
-}
-
-public PerformanceTests() {
- super();
-
- /* The logical order to run the tests in is:
- * - SWT, SWTError, SWTException
- * - Display
- * - graphics classes
- * - items and Caret, etc
- * - widgets
- * - dialogs
- * - layout
- * - custom widgets
- * - printing and program
- * - events
- * - drag & drop
- * - accessibility
- * - OLE
- * - browser
- */
-// addTest(Test_org_eclipse_swt_SWT.suite());
-// addTest(Test_org_eclipse_swt_SWTException.suite());
-// addTest(Test_org_eclipse_swt_SWTError.suite());
-
- /* NOTE: If the Display test suite is run, it must be run
- * before any other tests that need a display (i.e. graphics
- * or widget tests, etc). Otherwise, an InvalidThreadAccess
- * exception will be thrown for each Display test.
- */
-// addTest(Test_org_eclipse_swt_widgets_Display.suite());
-
- addTest(Test_org_eclipse_swt_graphics_Image.suite());
- addTest(Test_org_eclipse_swt_graphics_Cursor.suite());
- addTest(Test_org_eclipse_swt_graphics_DeviceData.suite());
- addTest(Test_org_eclipse_swt_graphics_ImageLoaderEvent.suite());
- addTest(Test_org_eclipse_swt_graphics_RGB.suite());
- addTest(Test_org_eclipse_swt_graphics_Font.suite());
- addTest(Test_org_eclipse_swt_graphics_Rectangle.suite());
- addTest(Test_org_eclipse_swt_graphics_FontData.suite());
- addTest(Test_org_eclipse_swt_graphics_GC.suite());
- addTest(Test_org_eclipse_swt_graphics_ImageData.suite());
- addTest(Test_org_eclipse_swt_graphics_Region.suite());
-// addTest(Test_org_eclipse_swt_graphics_GCData.suite());
- addTest(Test_org_eclipse_swt_graphics_FontMetrics.suite());
- addTest(Test_org_eclipse_swt_graphics_Color.suite());
- addTest(Test_org_eclipse_swt_graphics_Point.suite());
- addTest(Test_org_eclipse_swt_graphics_PaletteData.suite());
- addTest(Test_org_eclipse_swt_graphics_ImageLoader.suite());
-
-// addTest(Test_org_eclipse_swt_widgets_MenuItem.suite());
-// addTest(Test_org_eclipse_swt_widgets_ToolItem.suite());
-// //addTest(Test_org_eclipse_swt_widgets_CoolItem.suite());
-// addTest(Test_org_eclipse_swt_widgets_TabItem.suite());
-// addTest(Test_org_eclipse_swt_widgets_TableItem.suite());
-// addTest(Test_org_eclipse_swt_widgets_TableColumn.suite());
-// addTest(Test_org_eclipse_swt_widgets_TreeItem.suite());
-// addTest(Test_org_eclipse_swt_widgets_Caret.suite());
-// addTest(Test_org_eclipse_swt_widgets_Event.suite());
-// addTest(Test_org_eclipse_swt_widgets_TypedListener.suite());
-// addTest(Test_org_eclipse_swt_widgets_Menu.suite());
-// //addTest(Test_org_eclipse_swt_widgets_Tracker.suite());
-// addTest(Test_org_eclipse_swt_widgets_Synchronizer.suite());
-
-// addTest(Test_org_eclipse_swt_widgets_Shell.suite());
-// //addTest(Test_org_eclipse_swt_widgets_Decorations.suite());
-// addTest(Test_org_eclipse_swt_widgets_Label.suite());
-// addTest(Test_org_eclipse_swt_widgets_Button.suite());
-// addTest(Test_org_eclipse_swt_widgets_List.suite());
-// addTest(Test_org_eclipse_swt_widgets_Text.suite());
-// addTest(Test_org_eclipse_swt_widgets_ScrollBar.suite());
-// addTest(Test_org_eclipse_swt_widgets_Sash.suite());
-// addTest(Test_org_eclipse_swt_widgets_Tree.suite());
-// addTest(Test_org_eclipse_swt_widgets_TabFolder.suite());
-// addTest(Test_org_eclipse_swt_widgets_Combo.suite());
-// addTest(Test_org_eclipse_swt_widgets_Group.suite());
-// addTest(Test_org_eclipse_swt_widgets_ToolBar.suite());
-// addTest(Test_org_eclipse_swt_widgets_Table.suite());
-// addTest(Test_org_eclipse_swt_widgets_Canvas.suite());
-// addTest(Test_org_eclipse_swt_widgets_Scale.suite());
-// addTest(Test_org_eclipse_swt_widgets_Slider.suite());
-// addTest(Test_org_eclipse_swt_widgets_ProgressBar.suite());
-// addTest(Test_org_eclipse_swt_widgets_Composite.suite());
-// //addTest(Test_org_eclipse_swt_widgets_CoolBar.suite());
-//
-// addTest(Test_org_eclipse_swt_widgets_ColorDialog.suite());
-// addTest(Test_org_eclipse_swt_widgets_FileDialog.suite());
-// addTest(Test_org_eclipse_swt_widgets_DirectoryDialog.suite());
-// addTest(Test_org_eclipse_swt_widgets_FontDialog.suite());
-// addTest(Test_org_eclipse_swt_widgets_MessageBox.suite());
-// addTest(Test_org_eclipse_swt_widgets_Monitor.suite());
-// addTest(Test_org_eclipse_swt_layout_GridData.suite());
-// addTest(Test_org_eclipse_swt_layout_RowData.suite());
-// addTest(Test_org_eclipse_swt_layout_GridLayout.suite());
-// addTest(Test_org_eclipse_swt_layout_FillLayout.suite());
-// addTest(Test_org_eclipse_swt_layout_RowLayout.suite());
-// addTest(Test_org_eclipse_swt_layout_FormLayout.suite());
-//
-// addTest(Test_org_eclipse_swt_custom_TableTree.suite());
-// addTest(Test_org_eclipse_swt_custom_BidiSegmentEvent.suite());
-// addTest(Test_org_eclipse_swt_custom_LineBackgroundEvent.suite());
-// addTest(Test_org_eclipse_swt_custom_LineStyleEvent.suite());
-// addTest(Test_org_eclipse_swt_custom_SashForm.suite());
-// addTest(Test_org_eclipse_swt_custom_TableEditor.suite());
-// addTest(Test_org_eclipse_swt_custom_AnimatedProgress.suite());
-// addTest(Test_org_eclipse_swt_custom_StyleRange.suite());
-// addTest(Test_org_eclipse_swt_custom_TextChangedEvent.suite());
-// addTest(Test_org_eclipse_swt_custom_StackLayout.suite());
-// addTest(Test_org_eclipse_swt_custom_CTabFolderEvent.suite());
-// addTest(Test_org_eclipse_swt_custom_ExtendedModifyEvent.suite());
-// addTest(Test_org_eclipse_swt_custom_CCombo.suite());
-// addTest(Test_org_eclipse_swt_custom_TableTreeItem.suite());
-// addTest(Test_org_eclipse_swt_custom_ViewForm.suite());
-// addTest(Test_org_eclipse_swt_custom_CTabFolderAdapter.suite());
-// addTest(Test_org_eclipse_swt_custom_CLabel.suite());
-// addTest(Test_org_eclipse_swt_custom_TableTreeEditor.suite());
-// addTest(Test_org_eclipse_swt_custom_TextChangingEvent.suite());
-// addTest(Test_org_eclipse_swt_custom_ScrolledComposite.suite());
-// addTest(Test_org_eclipse_swt_custom_TreeEditor.suite());
-// addTest(Test_org_eclipse_swt_custom_PopupList.suite());
-// addTest(Test_org_eclipse_swt_custom_CTabItem.suite());
-// addTest(Test_org_eclipse_swt_custom_BusyIndicator.suite());
-// addTest(Test_org_eclipse_swt_custom_StyledText.suite());
-// addTest(Test_org_eclipse_swt_custom_ControlEditor.suite());
-// addTest(Test_org_eclipse_swt_custom_ST.suite());
-// addTest(Test_org_eclipse_swt_custom_CTabFolder.suite());
-//
-// addTest(Test_org_eclipse_swt_events_ControlEvent.suite());
-// addTest(Test_org_eclipse_swt_events_ModifyEvent.suite());
-// addTest(Test_org_eclipse_swt_events_ArmEvent.suite());
-// addTest(Test_org_eclipse_swt_events_ShellEvent.suite());
-// addTest(Test_org_eclipse_swt_events_TypedEvent.suite());
-// addTest(Test_org_eclipse_swt_events_PaintEvent.suite());
-// addTest(Test_org_eclipse_swt_events_VerifyEvent.suite());
-// addTest(Test_org_eclipse_swt_events_KeyEvent.suite());
-// addTest(Test_org_eclipse_swt_events_TraverseEvent.suite());
-// addTest(Test_org_eclipse_swt_events_MouseTrackAdapter.suite());
-// addTest(Test_org_eclipse_swt_events_DisposeEvent.suite());
-// addTest(Test_org_eclipse_swt_events_SelectionEvent.suite());
-// addTest(Test_org_eclipse_swt_events_HelpEvent.suite());
-// addTest(Test_org_eclipse_swt_events_FocusEvent.suite());
-// addTest(Test_org_eclipse_swt_events_MouseEvent.suite());
-// addTest(Test_org_eclipse_swt_events_MenuEvent.suite());
-// addTest(Test_org_eclipse_swt_events_TreeEvent.suite());
-//
-// addTest(Test_org_eclipse_swt_printing_PrintDialog.suite());
-// addTest(Test_org_eclipse_swt_printing_PrinterData.suite());
-// addTest(Test_org_eclipse_swt_printing_Printer.suite());
-//
-// addTest(Test_org_eclipse_swt_program_Program.suite());
-
- // addTest(Test_org_eclipse_swt_dnd_FileTransfer.suite());
- // addTest(Test_org_eclipse_swt_dnd_DragSourceAdapter.suite());
- // addTest(Test_org_eclipse_swt_dnd_DropTargetAdapter.suite());
- // addTest(Test_org_eclipse_swt_dnd_TextTransfer.suite());
- // addTest(Test_org_eclipse_swt_dnd_DragSourceEvent.suite());
- // addTest(Test_org_eclipse_swt_dnd_DragSource.suite());
- // addTest(Test_org_eclipse_swt_dnd_DND.suite());
- // addTest(Test_org_eclipse_swt_dnd_TransferData.suite());
- // addTest(Test_org_eclipse_swt_dnd_RTFTransfer.suite());
- // addTest(Test_org_eclipse_swt_dnd_Clipboard.suite());
- // addTest(Test_org_eclipse_swt_dnd_DropTargetEvent.suite());
- // addTest(Test_org_eclipse_swt_dnd_DropTarget.suite());
-
-// addTest(Test_org_eclipse_swt_accessibility_ACC.suite());
-// addTest(Test_org_eclipse_swt_accessibility_Accessible.suite());
-// addTest(Test_org_eclipse_swt_accessibility_AccessibleAdapter.suite());
-// addTest(Test_org_eclipse_swt_accessibility_AccessibleControlAdapter.suite());
-// addTest(Test_org_eclipse_swt_accessibility_AccessibleControlEvent.suite());
-// addTest(Test_org_eclipse_swt_accessibility_AccessibleControlListener.suite());
-// addTest(Test_org_eclipse_swt_accessibility_AccessibleEvent.suite());
-// addTest(Test_org_eclipse_swt_accessibility_AccessibleListener.suite());
-
-// addTest(Test_org_eclipse_swt_ole_win32_OLE.suite());
-// addTest(Test_org_eclipse_swt_ole_win32_OleAutomation.suite());
-// addTest(Test_org_eclipse_swt_ole_win32_OleClientSite.suite());
-// addTest(Test_org_eclipse_swt_ole_win32_OleControlSite.suite());
-// addTest(Test_org_eclipse_swt_ole_win32_OleEvent.suite());
-// addTest(Test_org_eclipse_swt_ole_win32_OleFrame.suite());
-// addTest(Test_org_eclipse_swt_ole_win32_OleFunctionDescription.suite());
-// addTest(Test_org_eclipse_swt_ole_win32_OleListener.suite());
-// addTest(Test_org_eclipse_swt_ole_win32_OleParameterDescription.suite());
-// addTest(Test_org_eclipse_swt_ole_win32_Variant.suite());
-
-// addTest(Test_org_eclipse_swt_browser_Browser.suite());
-// addTest(Test_org_eclipse_swt_browser_CloseWindowListener.suite());
-// addTest(Test_org_eclipse_swt_browser_LocationAdapter.suite());
-// addTest(Test_org_eclipse_swt_browser_LocationListener.suite());
-// addTest(Test_org_eclipse_swt_browser_OpenWindowListener.suite());
-// addTest(Test_org_eclipse_swt_browser_ProgressAdapter.suite());
-// addTest(Test_org_eclipse_swt_browser_ProgressListener.suite());
-// addTest(Test_org_eclipse_swt_browser_StatusTextListener.suite());
-// addTest(Test_org_eclipse_swt_browser_TitleListener.suite());
-// addTest(Test_org_eclipse_swt_browser_VisibilityWindowAdapter.suite());
-// addTest(Test_org_eclipse_swt_browser_VisibilityWindowListener.suite());
-// addTest(org.eclipse.swt.tests.junit.browser.Test_BrowserSuite.suite());
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/SwtPerformanceTestCase.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/SwtPerformanceTestCase.java
deleted file mode 100644
index 580dc36d5f..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/SwtPerformanceTestCase.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit.performance;
-
-
-import java.io.*;
-import java.net.URL;
-
-import junit.framework.TestCase;
-
-import org.eclipse.swt.internal.*;
-import org.eclipse.test.performance.*;
-
-
-public class SwtPerformanceTestCase extends TestCase {
- // used to specify verbose mode, if true unimplemented warning messages will
- // be written to System.out
- public static boolean verbose = false;
-
- // allow specific image formats to be tested
- public static String[] imageFormats = new String[] {"bmp", "jpg", "gif", "png"};
- public static String[] imageFilenames = new String[] {"folder", "folderOpen", "target"};
- public static String[] transparentImageFilenames = new String[] {"transparent.png"};
-
-
-public SwtPerformanceTestCase(String name) {
- super(name);
-}
-
-protected PerformanceMeter createMeter() {
- return createMeter(null);
-}
-
-protected PerformanceMeter createMeter(String id) {
- Performance performance = Performance.getDefault();
- String scenarioId = performance.getDefaultScenarioId(this);
- if (id != null) scenarioId += ": " + id;
- return performance.createPerformanceMeter(scenarioId);
-}
-
-protected void disposeMeter(PerformanceMeter meter) {
- try {
- meter.commit();
- Performance.getDefault().assertPerformance(meter);
- } finally {
- meter.dispose();
- }
-}
-
-protected String getPath(String fileName) {
- String urlPath;
-
- String pluginPath = System.getProperty("PLUGIN_PATH");
- if (verbose) {
- System.out.println("PLUGIN_PATH <"+pluginPath+">");
- }
- if (pluginPath == null) {
- URL url = getClass().getClassLoader().getResource(fileName);
- if (url == null) {
- fail("URL == null for file " + fileName);
- }
- urlPath = url.getFile();
- } else {
- urlPath = pluginPath + "/data/" + fileName;
- }
-
- if (File.separatorChar != '/') urlPath = urlPath.replace('/', File.separatorChar);
- if (urlPath.indexOf(File.separatorChar) == 0) urlPath = urlPath.substring(1);
- urlPath = urlPath.replaceAll("%20", " ");
-
- if (verbose) {
- System.out.println("Resolved file name for " + fileName + " = " + urlPath);
- }
- return urlPath;
-}
-
-protected boolean isJ2ME() {
- try {
- Compatibility.newFileInputStream("");
- } catch (FileNotFoundException e) {
- return false;
- } catch (IOException e) {
- }
- return true;
-}
-
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/Test_org_eclipse_swt_graphics_Color.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/Test_org_eclipse_swt_graphics_Color.java
deleted file mode 100644
index 9bfb37d7fe..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/Test_org_eclipse_swt_graphics_Color.java
+++ /dev/null
@@ -1,276 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit.performance;
-
-import junit.framework.*;
-import junit.textui.*;
-
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.test.performance.PerformanceMeter;
-
-/**
- * Automated Performance Test Suite for class org.eclipse.swt.graphics.Color
- *
- * @see org.eclipse.swt.graphics.Color
- */
-public class Test_org_eclipse_swt_graphics_Color extends SwtPerformanceTestCase {
- static final int COUNT = 10000;
-
-public Test_org_eclipse_swt_graphics_Color(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() throws Exception {
- super.setUp();
- display = Display.getDefault();
-}
-
-public void test_ConstructorLorg_eclipse_swt_graphics_DeviceIII() {
- Color[] colors = new Color [COUNT];
-
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- colors[i] = new Color(display, 102, 255, 3);
- }
- meter.stop();
-
- for (int i = 0; i < COUNT; i++) {
- colors[i].dispose();
- }
-
- disposeMeter(meter);
-}
-
-public void test_ConstructorLorg_eclipse_swt_graphics_DeviceLorg_eclipse_swt_graphics_RGB() {
- Color[] colors = new Color [COUNT];
- RGB rgb = new RGB(102, 255, 3);
-
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- colors[i] = new Color(display, rgb);
- }
- meter.stop();
-
- for (int i = 0; i < COUNT; i++) {
- colors[i].dispose();
- }
-
- disposeMeter(meter);
-}
-
-public void test_dispose() {
- Color[] colors = new Color [COUNT];
- for (int i = 0; i < COUNT; i++) {
- colors[i] = new Color(display, 255,0,128);
- }
-
- PerformanceMeter meter = createMeter("not disposed");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- colors[i].dispose(); // dispose
- }
- meter.stop();
-
- disposeMeter(meter);
-
- meter = createMeter("already disposed");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- colors[i].dispose(); // dispose disposed
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_equalsLjava_lang_Object() {
- Color color1 = new Color(display, 0, 128, 255);
- Color color2 = new Color(display, 0, 128, 255);
-
- PerformanceMeter meter = createMeter("equal");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- color1.equals(color2); // equal
- }
- meter.stop();
-
- color1.dispose();
- color2.dispose();
-
- disposeMeter(meter);
-
- color1 = new Color(display, 0, 128, 255);
- color2 = new Color(display, 128, 255, 0);
-
- meter = createMeter("not equal");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- color1.equals(color2); // not equal
- }
- meter.stop();
-
- color1.dispose();
- color2.dispose();
-
- disposeMeter(meter);
-}
-
-public void test_getBlue() {
- Color color = new Color(display, 128, 64, 255);
-
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- color.getBlue();
- }
- meter.stop();
-
- color.dispose();
-
- disposeMeter(meter);
-}
-
-public void test_getGreen() {
- Color color = new Color(display, 128, 64, 255);
-
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- color.getGreen();
- }
- meter.stop();
-
- color.dispose();
-
- disposeMeter(meter);
-}
-
-public void test_getRGB() {
- Color color = new Color(display, 128, 64, 255);
-
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- color.getRGB();
- }
- meter.stop();
-
- color.dispose();
-
- disposeMeter(meter);
-}
-
-public void test_getRed() {
- Color color = new Color(display, 128, 64, 255);
-
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- color.getRed();
- }
- meter.stop();
-
- color.dispose();
-
- disposeMeter(meter);
-}
-
-public void test_hashCode() {
- Color color = new Color(display, 128, 64, 255);
-
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- color.hashCode();
- }
- meter.stop();
-
- color.dispose();
-
- disposeMeter(meter);
-}
-
-public void test_isDisposed() {
- Color color = new Color(display, 128, 128, 128);
-
- PerformanceMeter meter = createMeter("not disposed");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- color.isDisposed(); // not disposed
- }
- meter.stop();
-
- color.dispose();
-
- disposeMeter(meter);
-
- meter = createMeter("disposed");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- color.isDisposed(); // disposed
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_win32_newLorg_eclipse_swt_graphics_DeviceI() {
- // do not test - Windows platform only
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_graphics_Color((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_graphics_DeviceIII");
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_graphics_DeviceLorg_eclipse_swt_graphics_RGB");
- methodNames.addElement("test_dispose");
- methodNames.addElement("test_equalsLjava_lang_Object");
- methodNames.addElement("test_getBlue");
- methodNames.addElement("test_getGreen");
- methodNames.addElement("test_getRGB");
- methodNames.addElement("test_getRed");
- methodNames.addElement("test_hashCode");
- methodNames.addElement("test_isDisposed");
- methodNames.addElement("test_win32_newLorg_eclipse_swt_graphics_DeviceI");
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLorg_eclipse_swt_graphics_DeviceIII")) test_ConstructorLorg_eclipse_swt_graphics_DeviceIII();
- else if (getName().equals("test_ConstructorLorg_eclipse_swt_graphics_DeviceLorg_eclipse_swt_graphics_RGB")) test_ConstructorLorg_eclipse_swt_graphics_DeviceLorg_eclipse_swt_graphics_RGB();
- else if (getName().equals("test_dispose")) test_dispose();
- else if (getName().equals("test_equalsLjava_lang_Object")) test_equalsLjava_lang_Object();
- else if (getName().equals("test_getBlue")) test_getBlue();
- else if (getName().equals("test_getGreen")) test_getGreen();
- else if (getName().equals("test_getRGB")) test_getRGB();
- else if (getName().equals("test_getRed")) test_getRed();
- else if (getName().equals("test_hashCode")) test_hashCode();
- else if (getName().equals("test_isDisposed")) test_isDisposed();
- else if (getName().equals("test_win32_newLorg_eclipse_swt_graphics_DeviceI")) test_win32_newLorg_eclipse_swt_graphics_DeviceI();
-}
-
-/* custom */
-Display display;
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/Test_org_eclipse_swt_graphics_Cursor.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/Test_org_eclipse_swt_graphics_Cursor.java
deleted file mode 100644
index 51a60e857e..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/Test_org_eclipse_swt_graphics_Cursor.java
+++ /dev/null
@@ -1,226 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit.performance;
-
-
-import java.io.*;
-
-import junit.framework.*;
-import junit.textui.TestRunner;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.test.performance.PerformanceMeter;
-
-/**
- * Automated Performance Test Suite for class org.eclipse.swt.graphics.Cursor
- *
- * @see org.eclipse.swt.graphics.Cursor
- */
-public class Test_org_eclipse_swt_graphics_Cursor extends SwtPerformanceTestCase {
- static final int COUNT = 10000;
-
-public Test_org_eclipse_swt_graphics_Cursor(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() throws Exception {
- super.setUp();
- display = Display.getDefault();
-}
-
-public void test_ConstructorLorg_eclipse_swt_graphics_DeviceI() {
- PerformanceMeter meter = createMeter();
- meter.start();
- Cursor[] cursors = new Cursor [COUNT];
- for (int i = 0; i < COUNT; i++) {
- cursors[i] = new Cursor(display, SWT.CURSOR_ARROW);
- }
- meter.stop();
-
- for (int i = 0; i < COUNT; i++) {
- cursors[i].dispose();
- }
-
- disposeMeter(meter);
-}
-
-public void test_ConstructorLorg_eclipse_swt_graphics_DeviceLorg_eclipse_swt_graphics_ImageDataII() {
- // TODO
-}
-
-public void test_ConstructorLorg_eclipse_swt_graphics_DeviceLorg_eclipse_swt_graphics_ImageDataLorg_eclipse_swt_graphics_ImageDataII() {
- int numFormats = imageFormats.length;
- String fileName = imageFilenames[0];
- for (int i = 0; i < numFormats; i++) {
- String format = imageFormats[i];
- ImageLoader loader = new ImageLoader();
- FileInputStream inStream = null;
- try {
- inStream = new FileInputStream(getPath (fileName + "." + format));
- } catch (FileNotFoundException e1) {
- e1.printStackTrace();
- }
- ImageData source = loader.load(inStream)[0];
- try {
- inStream.close();
- } catch (IOException e2) {
- e2.printStackTrace();
- }
- ImageData mask = source.getTransparencyMask();
- if (mask != null && (source.depth == 1)) {
- Cursor[] cursors = new Cursor[COUNT];
-
- PerformanceMeter meter = createMeter(format);
- meter.start();
- for (int j = 0; j < COUNT; j++) {
- cursors[j] = new Cursor(display, source, mask, 0, 0);
- }
- meter.stop();
-
- for (int j = 0; j < COUNT; j++) {
- cursors[j].dispose();
- }
-
- disposeMeter(meter);
- }
- }
-}
-public void test_dispose() {
- Cursor[] cursors = new Cursor [COUNT];
- for (int i = 0; i < COUNT; i++) {
- cursors[i] = new Cursor(display, SWT.CURSOR_ARROW);
- }
-
- PerformanceMeter meter = createMeter("not disposed");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- cursors[i].dispose(); // dispose
- }
- meter.stop();
-
- disposeMeter(meter);
-
- meter = createMeter("disposed");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- cursors[i].dispose(); // dispose disposed
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_equalsLjava_lang_Object() {
- /*
- * Note: Two cursors are only considered equal if their handles are equal.
- * So since Windows reuses cursor handles, and other platforms do not,
- * it does not make sense to test whether cursor.equals(sameCursor).
- */
- Cursor cursor = new Cursor(display, SWT.CURSOR_WAIT);
- Cursor otherCursor = new Cursor(display, SWT.CURSOR_CROSS);
-
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- cursor.equals(otherCursor);
- }
- meter.stop();
-
- cursor.dispose();
- otherCursor.dispose();
-
- disposeMeter(meter);
-}
-
-public void test_hashCode() {
- Cursor cursor = new Cursor(display, SWT.CURSOR_WAIT);
-
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- cursor.hashCode();
- }
- meter.stop();
-
- cursor.dispose();
-
- disposeMeter(meter);
-}
-
-public void test_isDisposed() {
- Cursor cursor = new Cursor(display, SWT.CURSOR_WAIT);
-
- PerformanceMeter meter = createMeter("not disposed");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- cursor.isDisposed(); // not disposed
- }
- meter.stop();
-
- cursor.dispose();
-
- disposeMeter(meter);
-
- meter = createMeter("disposed");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- cursor.isDisposed(); // disposed
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_win32_newLorg_eclipse_swt_graphics_DeviceI() {
- // do not test - Windows only
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_graphics_Cursor((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_graphics_DeviceI");
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_graphics_DeviceLorg_eclipse_swt_graphics_ImageDataII");
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_graphics_DeviceLorg_eclipse_swt_graphics_ImageDataLorg_eclipse_swt_graphics_ImageDataII");
- methodNames.addElement("test_dispose");
- methodNames.addElement("test_equalsLjava_lang_Object");
- methodNames.addElement("test_hashCode");
- methodNames.addElement("test_isDisposed");
- methodNames.addElement("test_win32_newLorg_eclipse_swt_graphics_DeviceI");
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLorg_eclipse_swt_graphics_DeviceI")) test_ConstructorLorg_eclipse_swt_graphics_DeviceI();
- else if (getName().equals("test_ConstructorLorg_eclipse_swt_graphics_DeviceLorg_eclipse_swt_graphics_ImageDataII")) test_ConstructorLorg_eclipse_swt_graphics_DeviceLorg_eclipse_swt_graphics_ImageDataII();
- else if (getName().equals("test_ConstructorLorg_eclipse_swt_graphics_DeviceLorg_eclipse_swt_graphics_ImageDataLorg_eclipse_swt_graphics_ImageDataII")) test_ConstructorLorg_eclipse_swt_graphics_DeviceLorg_eclipse_swt_graphics_ImageDataLorg_eclipse_swt_graphics_ImageDataII();
- else if (getName().equals("test_dispose")) test_dispose();
- else if (getName().equals("test_equalsLjava_lang_Object")) test_equalsLjava_lang_Object();
- else if (getName().equals("test_hashCode")) test_hashCode();
- else if (getName().equals("test_isDisposed")) test_isDisposed();
- else if (getName().equals("test_win32_newLorg_eclipse_swt_graphics_DeviceI")) test_win32_newLorg_eclipse_swt_graphics_DeviceI();
-}
-
-/* custom */
-Display display;
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/Test_org_eclipse_swt_graphics_DeviceData.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/Test_org_eclipse_swt_graphics_DeviceData.java
deleted file mode 100644
index 395107f81a..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/Test_org_eclipse_swt_graphics_DeviceData.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit.performance;
-
-
-import junit.framework.*;
-import junit.textui.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.test.performance.PerformanceMeter;
-
-/**
- * Automated Performance Test Suite for class org.eclipse.swt.graphics.DeviceData
- *
- * @see org.eclipse.swt.graphics.DeviceData
- */
-public class Test_org_eclipse_swt_graphics_DeviceData extends SwtPerformanceTestCase {
- static final int COUNT = 1000;
-
-public Test_org_eclipse_swt_graphics_DeviceData(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-public void test_Constructor() {
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- new DeviceData();
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_graphics_DeviceData((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_Constructor");
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_Constructor")) test_Constructor();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/Test_org_eclipse_swt_graphics_Font.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/Test_org_eclipse_swt_graphics_Font.java
deleted file mode 100644
index f5514b105e..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/Test_org_eclipse_swt_graphics_Font.java
+++ /dev/null
@@ -1,331 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit.performance;
-
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.tests.junit.SwtJunit;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.test.performance.PerformanceMeter;
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Performance Test Suite for class org.eclipse.swt.graphics.Font
- *
- * @see org.eclipse.swt.graphics.Font
- */
-public class Test_org_eclipse_swt_graphics_Font extends SwtPerformanceTestCase {
- static final int COUNT = 1000;
- Display display;
-
-public Test_org_eclipse_swt_graphics_Font(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() throws Exception {
- super.setUp();
- display = Display.getDefault();
-}
-
-public void test_ConstructorLorg_eclipse_swt_graphics_Device$Lorg_eclipse_swt_graphics_FontData() {
- FontData[] data = new FontData [1];
- data[0] = new FontData (SwtJunit.testFontName, 10, SWT.BOLD | SWT.ITALIC);
- Font[] fonts = new Font[COUNT];
-
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- fonts[i] = new Font(display, data);
- }
- meter.stop();
-
- for (int i = 0; i < COUNT; i++) {
- fonts[i].dispose();
- }
-
- disposeMeter(meter);
-}
-
-public void test_ConstructorLorg_eclipse_swt_graphics_DeviceLorg_eclipse_swt_graphics_FontData() {
- FontData data = new FontData (SwtJunit.testFontName, 10, SWT.BOLD | SWT.ITALIC);
- Font[] fonts = new Font[COUNT];
-
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- fonts[i] = new Font(display, data);
- }
- meter.stop();
-
- for (int i = 0; i < COUNT; i++) {
- fonts[i].dispose();
- }
-
- disposeMeter(meter);
-}
-
-public void test_ConstructorLorg_eclipse_swt_graphics_DeviceLjava_lang_StringII() {
- Font[] fonts = new Font[COUNT];
-
- PerformanceMeter meter = createMeter("no name");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- // valid font with no name
- fonts[i] = new Font(display, "", 10, SWT.NORMAL);
- }
- meter.stop();
-
- for (int i = 0; i < COUNT; i++) {
- fonts[i].dispose();
- }
-
- disposeMeter(meter);
-
- meter = createMeter("unknown name");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- // valid font with unknown name
- fonts[i] = new Font(display, "bad-font", 10, SWT.NORMAL);
- }
- meter.stop();
-
- for (int i = 0; i < COUNT; i++) {
- fonts[i].dispose();
- }
-
- disposeMeter(meter);
-
- meter = createMeter("0 height");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- // valid font with 0 height
- fonts[i] = new Font(display, SwtJunit.testFontName, 0, SWT.NORMAL);
- }
- meter.stop();
-
- for (int i = 0; i < COUNT; i++) {
- fonts[i].dispose();
- }
-
- disposeMeter(meter);
-
- meter = createMeter("10 pt");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- // valid normal 10-point font
- fonts[i] = new Font(display, SwtJunit.testFontName, 10, SWT.NORMAL);
- }
- meter.stop();
-
- for (int i = 0; i < COUNT; i++) {
- fonts[i].dispose();
- }
-
- disposeMeter(meter);
-
- meter = createMeter("100 pt");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- // valid normal 100-point font
- fonts[i] = new Font(display, SwtJunit.testFontName, 100, SWT.NORMAL);
- }
- meter.stop();
-
- for (int i = 0; i < COUNT; i++) {
- fonts[i].dispose();
- }
-
- disposeMeter(meter);
-
- meter = createMeter("bold italic");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- // valid bold italic 10-point font
- fonts[i] = new Font(display, SwtJunit.testFontName, 10, SWT.BOLD | SWT.ITALIC);
- }
- meter.stop();
-
- for (int i = 0; i < COUNT; i++) {
- fonts[i].dispose();
- }
-
- disposeMeter(meter);
-
- meter = createMeter("null device");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- // device == null (valid)
- fonts[i] = new Font(null, SwtJunit.testFontName, 10, SWT.NORMAL);
- }
- meter.stop();
-
- for (int i = 0; i < COUNT; i++) {
- fonts[i].dispose();
- }
-
- disposeMeter(meter);
-}
-
-public void test_dispose() {
- Font[] fonts = new Font [COUNT];
- for (int i = 0; i < COUNT; i++) {
- fonts[i] = new Font(display, SwtJunit.testFontName, 10, SWT.NORMAL);
- }
-
- PerformanceMeter meter = createMeter("not disposed");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- fonts[i].dispose(); // dispose
- }
- meter.stop();
-
- disposeMeter(meter);
-
- meter = createMeter("disposed");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- fonts[i].dispose(); // dispose disposed
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_equalsLjava_lang_Object() {
- // Fonts are only equal if their handles are the same
- Font font = new Font(display, SwtJunit.testFontName, 10, SWT.NORMAL);
-
- PerformanceMeter meter = createMeter("equal");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- font.equals(font); // same
- }
- meter.stop();
-
- font.dispose();
-
- disposeMeter(meter);
-
- font = new Font(display, SwtJunit.testFontName, 10, SWT.NORMAL);
- Font otherFont = new Font(display, SwtJunit.testFontName, 20, SWT.NORMAL);
-
- meter = createMeter("not equal");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- font.equals(otherFont); // different
- }
- meter.stop();
-
- font.dispose();
- otherFont.dispose();
-
- disposeMeter(meter);
-}
-
-public void test_getFontData() {
- Font font = new Font(display, SwtJunit.testFontName, 40, SWT.BOLD | SWT.ITALIC);
-
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- font.getFontData();
- }
- meter.stop();
-
- font.dispose();
-
- disposeMeter(meter);
-}
-
-public void test_hashCode() {
- Font font = new Font(display, SwtJunit.testFontName, 40, SWT.BOLD | SWT.ITALIC);
-
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- font.hashCode();
- }
- meter.stop();
-
- font.dispose();
-
- disposeMeter(meter);
-}
-
-public void test_isDisposed() {
- Font font = new Font(display, SwtJunit.testFontName, 10, SWT.NORMAL);
-
- PerformanceMeter meter = createMeter("not disposed");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- font.isDisposed(); // not disposed
- }
- meter.stop();
-
- font.dispose();
-
- disposeMeter(meter);
-
- meter = createMeter("disposed");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- font.isDisposed(); // disposed
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_win32_newLorg_eclipse_swt_graphics_DeviceI() {
- // do not test - Windows only
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_graphics_Font((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_graphics_Device$Lorg_eclipse_swt_graphics_FontData");
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_graphics_DeviceLorg_eclipse_swt_graphics_FontData");
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_graphics_DeviceLjava_lang_StringII");
- methodNames.addElement("test_dispose");
- methodNames.addElement("test_equalsLjava_lang_Object");
- methodNames.addElement("test_getFontData");
- methodNames.addElement("test_hashCode");
- methodNames.addElement("test_isDisposed");
- methodNames.addElement("test_win32_newLorg_eclipse_swt_graphics_DeviceI");
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLorg_eclipse_swt_graphics_Device$Lorg_eclipse_swt_graphics_FontData")) test_ConstructorLorg_eclipse_swt_graphics_Device$Lorg_eclipse_swt_graphics_FontData();
- else if (getName().equals("test_ConstructorLorg_eclipse_swt_graphics_DeviceLorg_eclipse_swt_graphics_FontData")) test_ConstructorLorg_eclipse_swt_graphics_DeviceLorg_eclipse_swt_graphics_FontData();
- else if (getName().equals("test_ConstructorLorg_eclipse_swt_graphics_DeviceLjava_lang_StringII")) test_ConstructorLorg_eclipse_swt_graphics_DeviceLjava_lang_StringII();
- else if (getName().equals("test_dispose")) test_dispose();
- else if (getName().equals("test_equalsLjava_lang_Object")) test_equalsLjava_lang_Object();
- else if (getName().equals("test_getFontData")) test_getFontData();
- else if (getName().equals("test_hashCode")) test_hashCode();
- else if (getName().equals("test_isDisposed")) test_isDisposed();
- else if (getName().equals("test_win32_newLorg_eclipse_swt_graphics_DeviceI")) test_win32_newLorg_eclipse_swt_graphics_DeviceI();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/Test_org_eclipse_swt_graphics_FontData.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/Test_org_eclipse_swt_graphics_FontData.java
deleted file mode 100644
index 28475450ee..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/Test_org_eclipse_swt_graphics_FontData.java
+++ /dev/null
@@ -1,265 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit.performance;
-
-import java.util.*;
-import junit.framework.*;
-import junit.textui.*;
-import org.eclipse.swt.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.tests.junit.SwtJunit;
-import org.eclipse.test.performance.PerformanceMeter;
-
-/**
- * Automated Performance Test Suite for class org.eclipse.swt.graphics.FontData
- *
- * @see org.eclipse.swt.graphics.FontData
- */
-public class Test_org_eclipse_swt_graphics_FontData extends SwtPerformanceTestCase {
- static final int COUNT = 10000;
-
-public Test_org_eclipse_swt_graphics_FontData(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-public void test_Constructor() {
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- new FontData();
- }
- meter.stop();
- disposeMeter(meter);
-}
-
-public void test_ConstructorLjava_lang_String() {
- FontData fd = new FontData(SwtJunit.testFontName, 10, SWT.NORMAL);
- String fdString = fd.toString();
-
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- new FontData(fdString);
- }
- meter.stop();
- disposeMeter(meter);
-}
-
-public void test_ConstructorLjava_lang_StringII() {
- FontData fd = new FontData(SwtJunit.testFontName, 10, SWT.NORMAL);
- String fdString = fd.toString();
-
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- new FontData(SwtJunit.testFontName, 10, SWT.NORMAL);
- }
- meter.stop();
- disposeMeter(meter);
-
-}
-
-public void test_equalsLjava_lang_Object() {
- FontData fd1 = new FontData(SwtJunit.testFontName, 10, SWT.NORMAL);
- FontData fd2 = new FontData(SwtJunit.testFontName, 10, SWT.NORMAL);
- FontData fd3 = new FontData(SwtJunit.testFontName, 12, SWT.NORMAL);
-
- PerformanceMeter meter = createMeter("equal");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- fd1.equals(fd2); // equal
- }
- meter.stop();
- disposeMeter(meter);
-
- meter = createMeter("not equal");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- fd1.equals(fd3); // not equal
- }
- meter.stop();
- disposeMeter(meter);
-}
-
-public void test_getHeight() {
- FontData data = new FontData(SwtJunit.testFontName, 10, SWT.NORMAL);
-
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- data.getHeight();
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_getLocale() {
- FontData data = new FontData(SwtJunit.testFontName, 10, SWT.NORMAL);
-
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- data.getLocale();
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_getName() {
- FontData data = new FontData(SwtJunit.testFontName, 10, SWT.NORMAL);
-
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- data.getName();
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_getStyle() {
- FontData data = new FontData(SwtJunit.testFontName, 10, SWT.NORMAL);
-
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- data.getStyle();
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_hashCode() {
- FontData data = new FontData(SwtJunit.testFontName, 10, SWT.NORMAL);
-
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- data.hashCode();
- }
- meter.stop();
-
- disposeMeter(meter);
-
-}
-
-public void test_setHeightI() {
- FontData data = new FontData(SwtJunit.testFontName, 10, SWT.NORMAL);
-
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- data.setHeight(12);
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_setLocaleLjava_lang_String() {
- FontData data = new FontData(SwtJunit.testFontName, 10, SWT.NORMAL);
- String localeString = Locale.ENGLISH.toString();
-
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- data.setLocale(localeString);
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_setNameLjava_lang_String() {
- FontData data = new FontData(SwtJunit.testFontName, 10, SWT.NORMAL);
- String name = "name";
-
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- data.setName(name);
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_setStyleI() {
- FontData data = new FontData(SwtJunit.testFontName, 10, SWT.NORMAL);
- int style = SWT.ITALIC | SWT.BOLD;
-
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- data.setStyle(style);
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-
-public void test_win32_newLorg_eclipse_swt_internal_win32_LOGFONTI() {
- // do not test - Windows only
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_graphics_FontData((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_Constructor");
- methodNames.addElement("test_ConstructorLjava_lang_String");
- methodNames.addElement("test_ConstructorLjava_lang_StringII");
- methodNames.addElement("test_equalsLjava_lang_Object");
- methodNames.addElement("test_getHeight");
- methodNames.addElement("test_getLocale");
- methodNames.addElement("test_getName");
- methodNames.addElement("test_getStyle");
- methodNames.addElement("test_hashCode");
- methodNames.addElement("test_setHeightI");
- methodNames.addElement("test_setLocaleLjava_lang_String");
- methodNames.addElement("test_setNameLjava_lang_String");
- methodNames.addElement("test_setStyleI");
- methodNames.addElement("test_win32_newLorg_eclipse_swt_internal_win32_LOGFONTI");
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_Constructor")) test_Constructor();
- else if (getName().equals("test_ConstructorLjava_lang_String")) test_ConstructorLjava_lang_String();
- else if (getName().equals("test_ConstructorLjava_lang_StringII")) test_ConstructorLjava_lang_StringII();
- else if (getName().equals("test_equalsLjava_lang_Object")) test_equalsLjava_lang_Object();
- else if (getName().equals("test_getHeight")) test_getHeight();
- else if (getName().equals("test_getLocale")) test_getLocale();
- else if (getName().equals("test_getName")) test_getName();
- else if (getName().equals("test_getStyle")) test_getStyle();
- else if (getName().equals("test_hashCode")) test_hashCode();
- else if (getName().equals("test_setHeightI")) test_setHeightI();
- else if (getName().equals("test_setLocaleLjava_lang_String")) test_setLocaleLjava_lang_String();
- else if (getName().equals("test_setNameLjava_lang_String")) test_setNameLjava_lang_String();
- else if (getName().equals("test_setStyleI")) test_setStyleI();
- else if (getName().equals("test_win32_newLorg_eclipse_swt_internal_win32_LOGFONTI")) test_win32_newLorg_eclipse_swt_internal_win32_LOGFONTI();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/Test_org_eclipse_swt_graphics_FontMetrics.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/Test_org_eclipse_swt_graphics_FontMetrics.java
deleted file mode 100644
index f2f158ee6f..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/Test_org_eclipse_swt_graphics_FontMetrics.java
+++ /dev/null
@@ -1,199 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit.performance;
-
-
-import junit.framework.*;
-import junit.textui.*;
-
-import org.eclipse.swt.widgets.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.test.performance.PerformanceMeter;
-
-/**
- * Automated Performance Test Suite for class org.eclipse.swt.graphics.FontMetrics
- *
- * @see org.eclipse.swt.graphics.FontMetrics
- */
-public class Test_org_eclipse_swt_graphics_FontMetrics extends SwtPerformanceTestCase {
- static final int COUNT = 1000;
-
-public Test_org_eclipse_swt_graphics_FontMetrics(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() throws Exception {
- super.setUp();
- display = Display.getDefault();
- shell = new Shell(display);
- gc = new GC(shell);
-}
-
-protected void tearDown() throws Exception {
- super.tearDown();
- gc.dispose();
- shell.dispose();
-}
-
-public void test_equalsLjava_lang_Object() {
- FontMetrics fm1 = gc.getFontMetrics();
-
- Font oldFont = gc.getFont();
- FontData newFontData = oldFont.getFontData()[0];
- newFontData.setHeight(newFontData.getHeight() + 6);
-
- Font newFont = new Font(display, newFontData);
- gc.setFont(newFont);
- FontMetrics fm2 = gc.getFontMetrics();
- gc.setFont(oldFont);
- newFont.dispose();
-
- PerformanceMeter meter = createMeter("equals");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- fm1.equals(fm1); // same
- }
- meter.stop();
-
- disposeMeter(meter);
-
- meter = createMeter("not equals");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- fm1.equals(fm2); // different
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_getAscent() {
- FontMetrics fm = gc.getFontMetrics();
-
- PerformanceMeter meter = createMeter();
- meter.start(); for (int i = 0; i < COUNT; i++) {
- fm.getAscent();
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_getAverageCharWidth() {
- FontMetrics fm = gc.getFontMetrics();
-
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- fm.getAverageCharWidth();
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_getDescent() {
- FontMetrics fm = gc.getFontMetrics();
-
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- fm.getDescent();
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_getHeight() {
- FontMetrics fm = gc.getFontMetrics();
-
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- fm.getHeight();
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_getLeading() {
- FontMetrics fm = gc.getFontMetrics();
-
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- fm.getLeading();
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_hashCode() {
- FontMetrics fm = gc.getFontMetrics();
-
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- fm.hashCode();
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_win32_newLorg_eclipse_swt_internal_win32_TEXTMETRIC() {
- // do not test - Windows only
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_graphics_FontMetrics((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_equalsLjava_lang_Object");
- methodNames.addElement("test_getAscent");
- methodNames.addElement("test_getAverageCharWidth");
- methodNames.addElement("test_getDescent");
- methodNames.addElement("test_getHeight");
- methodNames.addElement("test_getLeading");
- methodNames.addElement("test_hashCode");
- methodNames.addElement("test_win32_newLorg_eclipse_swt_internal_win32_TEXTMETRIC");
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_equalsLjava_lang_Object")) test_equalsLjava_lang_Object();
- else if (getName().equals("test_getAscent")) test_getAscent();
- else if (getName().equals("test_getAverageCharWidth")) test_getAverageCharWidth();
- else if (getName().equals("test_getDescent")) test_getDescent();
- else if (getName().equals("test_getHeight")) test_getHeight();
- else if (getName().equals("test_getLeading")) test_getLeading();
- else if (getName().equals("test_hashCode")) test_hashCode();
- else if (getName().equals("test_win32_newLorg_eclipse_swt_internal_win32_TEXTMETRIC")) test_win32_newLorg_eclipse_swt_internal_win32_TEXTMETRIC();
-}
-
-/* custom */
- Display display;
- Shell shell;
- GC gc;
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/Test_org_eclipse_swt_graphics_GC.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/Test_org_eclipse_swt_graphics_GC.java
deleted file mode 100644
index 69e96d33ed..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/Test_org_eclipse_swt_graphics_GC.java
+++ /dev/null
@@ -1,1489 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit.performance;
-
-import junit.framework.*;
-import junit.textui.*;
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.printing.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.test.performance.PerformanceMeter;
-
-/**
- * Automated Performance Test Suite for class org.eclipse.swt.graphics.GC
- *
- * @see org.eclipse.swt.graphics.GC
- */
-public class Test_org_eclipse_swt_graphics_GC extends SwtPerformanceTestCase {
- static final int COUNT = 10000;
-
-public Test_org_eclipse_swt_graphics_GC(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() throws Exception {
- super.setUp();
- display = Display.getDefault();
- shell = new Shell(display);
- shell.setBounds(0,30,240,290);
- image = new Image(display, 200, 200);
- gc = new GC(image);
-}
-
-protected void tearDown() throws Exception {
- super.tearDown();
- gc.dispose();
- image.dispose();
- shell.dispose();
-}
-public void test_ConstructorLorg_eclipse_swt_graphics_Drawable() {
- final int count = COUNT / 10;
- Image[] images = new Image [count];
- for (int i = 0; i < count; i++) {
- images[i] = new Image(display, 10, 10);
- }
- GC[] gcs = new GC[count];
-
- PerformanceMeter meter = createMeter("image");
- meter.start();
- for (int i = 0; i < count; i++) {
- gcs[i] = new GC(images[i]);
- }
- meter.stop();
-
- for (int i = 0; i < count; i++) {
- gcs[i].dispose();
- images[i].dispose();
- }
-
- disposeMeter(meter);
-
- final int count2 = COUNT % 100;
-
- Class printerClass = null;
- try {
- printerClass = Class.forName("org.eclipse.swt.printing.Printer");
- } catch (ClassNotFoundException e) {
- // Printer class not present (eSWT). Skip test.
- return;
- }
- Object[] printers = new Object[count2];
- try {
- for (int i = 0; i < count2; i++) {
- printers[i] = printerClass.newInstance();
- }
- } catch (InstantiationException e1) {
- return;
- } catch (IllegalAccessException e1) {
- return;
- }
-
- meter = createMeter("printer");
- meter.start();
- for (int i = 0; i < count2; i++) {
- gcs[i] = new GC((Printer) printers[i]);
- }
- meter.stop();
-
- for (int i = 0; i < count2; i++) {
- gcs[i].dispose();
- }
-
- disposeMeter(meter);
-}
-
-public void test_ConstructorLorg_eclipse_swt_graphics_DrawableI() {
- final int count = COUNT / 10;
-
- Image[] images = new Image[count];
- for (int i = 0; i < count; i++) {
- images[i] = new Image(display, 10, 10);
- }
- GC[] gcs = new GC[count];
-
- PerformanceMeter meter = createMeter("image");
- meter.start();
- for (int i = 0; i < count; i++) {
- gcs[i] = new GC(images[i], SWT.RIGHT_TO_LEFT);
- }
- meter.stop();
-
- for (int i = 0; i < count; i++) {
- gcs[i].dispose();
- images[i].dispose();
- }
-
- disposeMeter(meter);
-
- final int count2 = COUNT / 100;
- Class printerClass = null;
- try {
- printerClass = Class.forName("org.eclipse.swt.printing.Printer");
- } catch (ClassNotFoundException e) {
- // Printer class not present (eSWT). Skip test.
- return;
- }
- Object[] printers = new Object[count2];
- try {
- for (int i = 0; i < count2; i++) {
- printers[i] = printerClass.newInstance();
- }
- } catch (InstantiationException e1) {
- return;
- } catch (IllegalAccessException e1) {
- return;
- }
-
- meter = createMeter("printer");
- meter.start();
- for (int i = 0; i < count2; i++) {
- gcs[i] = new GC((Printer) printers[i], SWT.RIGHT_TO_LEFT);
- }
- meter.stop();
-
- for (int i = 0; i < count2; i++) {
- gcs[i].dispose();
- }
-
- disposeMeter(meter);
-}
-
-public void test_copyAreaIIIIII() {
- // precompute points
- Rectangle bounds = gc.getClipping();
- final int[][] coords = new int[COUNT][];
- int y = 0;
- for (int i = 0; i < COUNT; i++) {
- int x = i % bounds.width;
- coords[i] = new int[] {x,y};
- if (x == 0) y += 3;
- }
-
- gc.setBackground(display.getSystemColor(SWT.COLOR_WHITE));
- gc.setForeground(display.getSystemColor(SWT.COLOR_WHITE));
- gc.fillRectangle(image.getBounds());
- gc.setForeground(display.getSystemColor(SWT.COLOR_BLUE));
- gc.drawLine(5, 5, 10, 10);
- gc.drawLine(5, 10, 10, 5);
-
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- gc.copyArea(5, 5, 10, 10, coords[i][0], coords[i][1]);
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_copyAreaLorg_eclipse_swt_graphics_ImageII() {
- // precompute points
- Rectangle bounds = gc.getClipping();
- final int[][] coords = new int[COUNT][];
- int y = 0;
- for (int i = 0; i < COUNT; i++) {
- int x = i % bounds.width;
- coords[i] = new int[] {x,y};
- if (x == 0) y += 3;
- }
-
- gc.setBackground(display.getSystemColor(SWT.COLOR_WHITE));
- gc.setForeground(display.getSystemColor(SWT.COLOR_WHITE));
- gc.fillRectangle(image.getBounds());
- gc.setForeground(display.getSystemColor(SWT.COLOR_BLUE));
- gc.drawLine(5, 5, 10, 10);
- gc.drawLine(5, 10, 10, 5);
-
- final int count = COUNT / 10;
-
- Image[] images = new Image[count];
- for (int i = 0; i < count; i++) {
- images[i] = new Image(display, 15, 15);
- }
-
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < count; i++) {
- gc.copyArea(images[i], coords[i][0], coords[i][1]);
- }
- meter.stop();
-
- for (int i = 0; i < count; i++) {
- images[i].dispose();
- }
-
- disposeMeter(meter);
-}
-
-public void test_dispose() {
- final int count = COUNT / 10;
- Image[] images = new Image [count];
- for (int i = 0; i < count; i++) {
- images[i] = new Image(display, 10, 10);
- }
- GC[] gcs = new GC [count];
- for (int i = 0; i < count; i++) {
- gcs[i] = new GC(images[i]);
- }
-
- PerformanceMeter meter = createMeter("not disposed");
- meter.start();
- for (int i = 0; i < count; i++) {
- gcs[i].dispose(); // dispose
- }
- meter.stop();
-
- for (int i = 0; i < count; i++) {
- images[i].dispose();
- }
-
- disposeMeter(meter);
-
- meter = createMeter("disposed");
- meter.start();
- for (int i = 0; i < count; i++) {
- gcs[i].dispose(); // dispose disposed
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_drawArcIIIIII() {
- // precompute points
- Rectangle bounds = gc.getClipping();
- final int[][] coords = new int[COUNT][];
- int y = 0;
- for (int i = 0; i < COUNT; i++) {
- int x = i % bounds.width;
- coords[i] = new int[] {x,y};
- if (x == 0) y += 3;
- }
-
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- gc.drawArc(coords[i][0], coords[i][1], 50, 25, 90, 90);
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_drawFocusIIII() {
- // precompute points
- Rectangle bounds = gc.getClipping();
- final int[][] coords = new int[COUNT][];
- int y = 0;
- for (int i = 0; i < COUNT; i++) {
- int x = i % bounds.width;
- coords[i] = new int[] {x,y};
- if (x == 0) y += 3;
- }
-
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- gc.drawFocus(coords[i][0], coords[i][1], 30, 20);
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_drawImageLorg_eclipse_swt_graphics_ImageII() {
- // precompute points
- Rectangle bounds = gc.getClipping();
- final int[][] coords = new int[COUNT][];
- int y = 0;
- for (int i = 0; i < COUNT; i++) {
- int x = i % bounds.width;
- coords[i] = new int[] {x,y};
- if (x == 0) y += 3;
- }
-
- Color red = display.getSystemColor(SWT.COLOR_RED);
- Color black = display.getSystemColor(SWT.COLOR_BLACK);
- Color green = display.getSystemColor(SWT.COLOR_GREEN);
- PaletteData paletteData = new PaletteData(new RGB[] {red.getRGB(), black.getRGB(), green.getRGB()});
- ImageData data = new ImageData(30,30, 8, paletteData);
- for (y = 0; y < data.height; y++) {
- for (int x = 0; x < data.width; x++) {
- if (x > y) data.setPixel(x, y, paletteData.getPixel(red.getRGB()));
- else if (x < y) data.setPixel(x, y, paletteData.getPixel(black.getRGB()));
- else data.setPixel(x, y, paletteData.getPixel(green.getRGB()));
- }
- }
- Image imageNormal = new Image(display, data);
- data = imageNormal.getImageData();
- data.transparentPixel = paletteData.getPixel(red.getRGB());
- Image imageTransparent = new Image(display, data);
- data.transparentPixel = -1;
- for (y = 0; y < data.height; y++) {
- for (int x = 0; x < data.width; x++) {
- data.setAlpha(x, y, 127);
- }
- }
- Image imageAlpha = new Image(display, data);
- gc.drawImage(imageNormal, 100, 100);
- gc.drawImage(imageTransparent, 130, 100);
- gc.drawImage(imageAlpha, 160, 100);
-
- try {
- PerformanceMeter meter = createMeter("normal");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- gc.drawImage(imageNormal, coords[i][0], coords[i][1]); // normal image
- }
- meter.stop();
-
- disposeMeter(meter);
-
- meter = createMeter("transparent");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- gc.drawImage(imageTransparent, coords[i][0], coords[i][1]); // transparent image
- }
- meter.stop();
-
- disposeMeter(meter);
-
- meter = createMeter("alpha");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- gc.drawImage(imageAlpha, coords[i][0], coords[i][1]); // alpha image
- }
- meter.stop();
-
- disposeMeter(meter);
- } finally {
- imageNormal.dispose();
- imageTransparent.dispose();
- imageAlpha.dispose();
- }
-}
-
-public void test_drawImageLorg_eclipse_swt_graphics_ImageIIIIIIII() {
- // TODO
-// Color c1 = new Color(display, 255, 0, 0);
-// Color c2 = new Color(display, 0, 0, 0);
-// Color c3 = new Color(display, 255, 255, 0);
-//
-// PaletteData paletteData = new PaletteData(new RGB[] {c1.getRGB(), c2.getRGB(), c3.getRGB()});
-// ImageData data = new ImageData(30,30, 8, paletteData);
-// for (int y = 0; y < data.height; y++) {
-// for (int x = 0; x < data.width; x++) {
-// if (x > y) data.setPixel(x, y, paletteData.getPixel(c1.getRGB()));
-// else if (x < y) data.setPixel(x, y, paletteData.getPixel(c2.getRGB()));
-// else data.setPixel(x, y, paletteData.getPixel(c3.getRGB()));
-// }
-// }
-// Image image = new Image(display, data);
-// data = image.getImageData();
-// data.transparentPixel = paletteData.getPixel(c1.getRGB());
-// Image imageTransparent = new Image(display, data);
-// data.transparentPixel = -1;
-// for (int y = 0; y < data.height; y++) {
-// for (int x = 0; x < data.width; x++) {
-// data.setAlpha(x, y, 127);
-// }
-// }
-// Image imageAlpha = new Image(display, data);
-//
-// gc.drawImage(image, 10, 5, 20, 15, 100, 120, 50, 60);
-// gc.drawImage(imageTransparent, 10, 5, 20, 15, 100, 120, 10, 10);
-// gc.drawImage(imageAlpha, 10, 5, 20, 15, 100, 120, 20, 15);
-// try {
-// gc.drawImage(null, 10, 5, 20, 15, 100, 120, 50, 60);
-// fail("No exception thrown"); //should never get here
-// }
-// catch (IllegalArgumentException e) {
-// }
-// image.dispose();
-// imageAlpha.dispose();
-// imageTransparent.dispose();
-}
-
-public void test_drawLineIIII() {
- // precompute points
- Rectangle bounds = gc.getClipping();
- final int[][] coords = new int[COUNT][];
- int y = 0;
- for (int i = 0; i < COUNT; i++) {
- int x = i % bounds.width;
- coords[i] = new int[] {x,y, x+5,y+5};
- if (x == 0) y += 3;
- }
-
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- gc.drawLine(coords[i][0],coords[i][1], coords[i][2],coords[i][3]);
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_drawOvalIIII() {
- // precompute points
- Rectangle bounds = gc.getClipping();
- final int[][] coords = new int[COUNT][];
- int y = 0;
- for (int i = 0; i < COUNT; i++) {
- int x = i % bounds.width;
- coords[i] = new int[] {x,y};
- if (x == 0) y += 3;
- }
-
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- gc.drawOval(coords[i][0], coords[i][1], 20, 30);
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_drawPointII() {
- // precompute points
- Rectangle bounds = gc.getClipping();
- final int[][] coords = new int[COUNT][];
- int y = 0;
- for (int i = 0; i < COUNT; i++) {
- int x = i % bounds.width;
- coords[i] = new int[] {x,y};
- if (x == 0) y += 3;
- }
-
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- gc.drawPoint(coords[i][0], coords[i][1]);
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_drawPolygon$I() {
- // precompute points
- Rectangle bounds = gc.getClipping();
- final int[][] coords = new int[COUNT][];
- int y = 0;
- for (int i = 0; i < COUNT; i++) {
- int x = i % bounds.width;
- coords[i] = new int[] {x,y, x+5,y+10, x,y+20};
- if (x == 0) y += 3;
- }
-
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- gc.drawPolygon(coords[i]);
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_drawPolyline$I() {
- // precompute points
- Rectangle bounds = gc.getClipping();
- final int[][] coords = new int[COUNT][];
- int y = 0;
- for (int i = 0; i < COUNT; i++) {
- int x = i % bounds.width;
- coords[i] = new int[] {x,y, x+5,y+10, x,y+20};
- if (x == 0) y += 3;
- }
-
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- gc.drawPolyline(coords[i]);
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_drawRectangleIIII() {
- // precompute points
- Rectangle bounds = gc.getClipping();
- final int[][] coords = new int[COUNT][];
- int y = 0;
- for (int i = 0; i < COUNT; i++) {
- int x = i % bounds.width;
- coords[i] = new int[] {x,y};
- if (x == 0) y += 3;
- }
-
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- gc.drawRectangle(coords[i][0], coords[i][1], 20, 30);
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_drawRectangleLorg_eclipse_swt_graphics_Rectangle() {
- // precompute points
- Rectangle bounds = gc.getClipping();
- final Rectangle[] coords = new Rectangle[COUNT];
- int y = 0;
- for (int i = 0; i < COUNT; i++) {
- int x = i % bounds.width;
- coords[i] = new Rectangle (x, y, 20, 30);
- if (x == 0) y += 3;
- }
-
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- gc.drawRectangle(coords[i]);
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_drawRoundRectangleIIIIII() {
- // precompute points
- Rectangle bounds = gc.getClipping();
- final int[][] coords = new int[COUNT][];
- int y = 0;
- for (int i = 0; i < COUNT; i++) {
- int x = i % bounds.width;
- coords[i] = new int[] {x,y};
- if (x == 0) y += 3;
- }
-
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- gc.drawRoundRectangle(coords[i][0], coords[i][1], 20, 30, 3, 3);
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_drawStringLjava_lang_StringII() {
- // precompute points
- Rectangle bounds = gc.getClipping();
- final int[][] coords = new int[COUNT][];
- int y = 0;
- for (int i = 0; i < COUNT; i++) {
- int x = i % bounds.width;
- coords[i] = new int[] {x,y};
- if (x == 0) y += 3;
- }
-
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- gc.drawString("test string", coords[i][0], coords[i][1]);
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_drawStringLjava_lang_StringIIZ() {
- // precompute points
- Rectangle bounds = gc.getClipping();
- final int[][] coords = new int[COUNT][];
- int y = 0;
- for (int i = 0; i < COUNT; i++) {
- int x = i % bounds.width;
- coords[i] = new int[] {x,y};
- if (x == 0) y += 3;
- }
-
- PerformanceMeter meter = createMeter("transparent");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- gc.drawString("test string", coords[i][0], coords[i][1], true);
- }
- meter.stop();
-
- disposeMeter(meter);
-
- meter = createMeter("not transparent");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- gc.drawString("test string", coords[i][0], coords[i][1], false);
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_drawTextLjava_lang_StringII() {
- // precompute points
- Rectangle bounds = gc.getClipping();
- final int[][] coords = new int[COUNT][];
- int y = 0;
- for (int i = 0; i < COUNT; i++) {
- int x = i % bounds.width;
- coords[i] = new int[] {x,y};
- if (x == 0) y += 3;
- }
-
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- gc.drawText("test string", coords[i][0], coords[i][1], true);
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_drawTextLjava_lang_StringIII() {
- // precompute points
- Rectangle bounds = gc.getClipping();
- final int[][] coords = new int[COUNT][];
- int y = 0;
- for (int i = 0; i < COUNT; i++) {
- int x = i % bounds.width;
- coords[i] = new int[] {x,y};
- if (x == 0) y += 3;
- }
-
- PerformanceMeter meter = createMeter("transparent");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- gc.drawText("\t\r\na&bc&", coords[i][0], coords[i][1], SWT.DRAW_TRANSPARENT);
- }
- meter.stop();
-
- disposeMeter(meter);
-
- meter = createMeter("delimiter");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- gc.drawText("\t\r\na&bc&", coords[i][0], coords[i][1], SWT.DRAW_DELIMITER);
- }
- meter.stop();
-
- disposeMeter(meter);
-
- meter = createMeter("mnemonic");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- gc.drawText("\t\r\na&bc&", coords[i][0], coords[i][1], SWT.DRAW_MNEMONIC);
- }
- meter.stop();
-
- disposeMeter(meter);
-
- meter = createMeter("tab");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- gc.drawText("\t\r\na&bc&", coords[i][0], coords[i][1], SWT.DRAW_TAB);
- }
- meter.stop();
-
- disposeMeter(meter);
-
- meter = createMeter("no flags");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- gc.drawText("\t\r\na&bc&", coords[i][0], coords[i][1], SWT.NONE);
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_drawTextLjava_lang_StringIIZ() {
- // precompute points
- Rectangle bounds = gc.getClipping();
- final int[][] coords = new int[COUNT][];
- int y = 0;
- for (int i = 0; i < COUNT; i++) {
- int x = i % bounds.width;
- coords[i] = new int[] {x,y};
- if (x == 0) y += 3;
- }
-
- PerformanceMeter meter = createMeter("transparent");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- gc.drawText("test string", coords[i][0], coords[i][1], true);
- }
- meter.stop();
-
- disposeMeter(meter);
-
- meter = createMeter("not transparent");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- gc.drawText("test string", coords[i][0], coords[i][1], false);
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_equalsLjava_lang_Object() {
- GC gc1 = new GC(display);
-
- PerformanceMeter meter = createMeter("equal");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- gc1.equals(gc1); // equal
- }
- meter.stop();
-
- gc1.dispose();
-
- disposeMeter(meter);
-
- gc1 = new GC(display);
- Color gc2 = new Color(display, 128, 255, 0);
-
- meter = createMeter("not equal");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- gc1.equals(gc2); // not equal
- }
- meter.stop();
-
- gc1.dispose();
- gc2.dispose();
-
- disposeMeter(meter);
-}
-
-public void test_fillArcIIIIII() {
- // precompute points
- Rectangle bounds = gc.getClipping();
- final int[][] coords = new int[COUNT][];
- int y = 0;
- for (int i = 0; i < COUNT; i++) {
- int x = i % bounds.width;
- coords[i] = new int[] {x,y};
- if (x == 0) y += 10;
- }
-
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- gc.fillArc(coords[i][0], coords[i][1], 20, 10, 90, 90);
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_fillGradientRectangleIIIIZ() {
- // precompute points
- Rectangle bounds = gc.getClipping();
- final int[][] coords = new int[COUNT][];
- int y = 0;
- for (int i = 0; i < COUNT; i++) {
- int x = i % bounds.width;
- coords[i] = new int[] {x,y};
- if (x == 0) y += 10;
- }
-
- PerformanceMeter meter = createMeter("vertical");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- gc.fillGradientRectangle(coords[i][0], coords[i][1], 20, 10, true);
- }
- meter.stop();
-
- disposeMeter(meter);
-
- meter = createMeter("horizontal");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- gc.fillGradientRectangle(coords[i][0], coords[i][1], 20, 10, false);
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_fillOvalIIII() {
- // precompute points
- Rectangle bounds = gc.getClipping();
- final int[][] coords = new int[COUNT][];
- int y = 0;
- for (int i = 0; i < COUNT; i++) {
- int x = i % bounds.width;
- coords[i] = new int[] {x,y};
- if (x == 0) y += 10;
- }
-
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- gc.fillOval(coords[i][0], coords[i][1], 20, 10);
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_fillPolygon$I() {
- // precompute points
- Rectangle bounds = gc.getClipping();
- final int[][] coords = new int[COUNT][];
- int y = 0;
- for (int i = 0; i < COUNT; i++) {
- int x = i % bounds.width;
- coords[i] = new int[] {x,y, x+5,y+5, x,y+10};
- if (x == 0) y += 10;
- }
-
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- gc.fillPolygon(coords[i]);
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_fillRectangleIIII() {
- // precompute points
- Rectangle bounds = gc.getClipping();
- final int[][] coords = new int[COUNT][];
- int y = 0;
- for (int i = 0; i < COUNT; i++) {
- int x = i % bounds.width;
- coords[i] = new int[] {x,y};
- if (x == 0) y += 10;
- }
-
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- gc.fillRectangle(coords[i][0], coords[i][1], 20, 10);
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_fillRectangleLorg_eclipse_swt_graphics_Rectangle() {
- // precompute points
- Rectangle bounds = gc.getClipping();
- final Rectangle[] coords = new Rectangle[COUNT];
- int y = 0;
- for (int i = 0; i < COUNT; i++) {
- int x = i % bounds.width;
- coords[i] = new Rectangle (x, y, 20, 10);
- if (x == 0) y += 10;
- }
-
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- gc.fillRectangle(coords[i]);
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_fillRoundRectangleIIIIII() {
- // precompute points
- Rectangle bounds = gc.getClipping();
- final int[][] coords = new int[COUNT][];
- int y = 0;
- for (int i = 0; i < COUNT; i++) {
- int x = i % bounds.width;
- coords[i] = new int[] {x,y};
- if (x == 0) y += 3;
- }
-
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- gc.fillRoundRectangle(coords[i][0], coords[i][1], 20, 30, 3, 3);
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_getAdvanceWidthC() {
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- gc.getAdvanceWidth('a');
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_getBackground() {
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- gc.getBackground();
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_getCharWidthC() {
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- gc.getCharWidth('a');
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_getClipping() {
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- gc.getClipping();
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_getClippingLorg_eclipse_swt_graphics_Region() {
- final int count = COUNT / 10;
- Region[] regions = new Region[count];
- for (int i = 0; i < count; i++) {
- regions[i] = new Region(display);
- }
-
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < count; i++) {
- gc.getClipping(regions[i]);
- }
- meter.stop();
-
- for (int i = 0; i < count; i++) {
- regions[i].dispose();
- }
-
- disposeMeter(meter);
-}
-
-public void test_getFont() {
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- gc.getFont();
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_getFontMetrics() {
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- gc.getFontMetrics();
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_getForeground() {
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- gc.getForeground();
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_getLineStyle() {
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- gc.getLineStyle();
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_getLineWidth() {
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- gc.getLineWidth();
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_getStyle() {
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- gc.getStyle();
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_getXORMode() {
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- gc.getXORMode();
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_hashCode() {
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- gc.hashCode();
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_isClipped() {
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- gc.isClipped();
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_isDisposed() {
- GC gc = new GC(display);
-
- PerformanceMeter meter = createMeter("not disposed");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- gc.isDisposed(); // not disposed
- }
- meter.stop();
-
- gc.dispose();
-
- disposeMeter(meter);
-
- meter = createMeter("disposed");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- gc.isDisposed(); // disposed
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_setBackgroundLorg_eclipse_swt_graphics_Color() {
- final Color color = display.getSystemColor(SWT.COLOR_RED);
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- gc.setBackground(color);
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_setClippingIIII() {
- // TODO
- // intermittently fails on XP for reasons unknown, comment out the test case
- // until the problem is figured out
-// Canvas canvas = new Canvas(shell, SWT.BORDER);
-// shell.setSize(110,110);
-// canvas.setSize(100,100);
-// shell.open();
-// GC testGc = new GC(canvas);
-// testGc.setClipping(0,5,10,20);
-// Rectangle rect = testGc.getClipping();
-// assertTrue(rect.x == 0);
-// assertTrue(rect.y == 5);
-// assertTrue(rect.width == 10);
-// assertTrue(rect.height == 20);
-// testGc.dispose();
-// canvas.dispose();
-}
-
-public void test_setClippingLorg_eclipse_swt_graphics_Rectangle() {
- // TODO
- // intermittently fails on XP for reasons unknown, comment out the test case
- // until the problem is figured out
-// Canvas canvas = new Canvas(shell, SWT.BORDER);
-// shell.setSize(110,110);
-// canvas.setSize(100,100);
-// shell.open();
-// GC testGc = new GC(canvas);
-// testGc.setClipping(new Rectangle(0,5,10,20));
-// Rectangle rect = testGc.getClipping();
-// assertTrue(rect.x == 0);
-// assertTrue(rect.y == 5);
-// assertTrue(rect.width == 10);
-// assertTrue(rect.height == 20);
-// testGc.dispose();
-// canvas.dispose();
-}
-
-public void test_setClippingLorg_eclipse_swt_graphics_Region() {
- // TODO
-}
-
-public void test_setFontLorg_eclipse_swt_graphics_Font() {
- // TODO
- gc.setFont(shell.getDisplay().getSystemFont());
- Font font = gc.getFont();
- assertTrue(font.equals(shell.getDisplay().getSystemFont()));
-}
-
-public void test_setForegroundLorg_eclipse_swt_graphics_Color() {
- final Color color = display.getSystemColor(SWT.COLOR_RED);
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- gc.setForeground(color);
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_setLineStyleI() {
- // precompute the styles
- final int[] styles = new int[COUNT];
- for (int i = 0; i < COUNT; i++) {
- switch (i % 5) {
- case 0: styles[i] = SWT.LINE_DASH; break;
- case 1: styles[i] = SWT.LINE_DASHDOT; break;
- case 2: styles[i] = SWT.LINE_DASHDOTDOT; break;
- case 3: styles[i] = SWT.LINE_DOT; break;
- case 4: styles[i] = SWT.LINE_SOLID; break;
- }
- }
-
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- gc.setLineStyle(styles[i]);
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_setLineWidthI() {
- // precompute the widths
- final int[] widths = new int[COUNT];
- for (int i = 0; i < COUNT; i++) {
- widths[i] = i % 10 + 1;
- }
-
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- gc.setLineWidth(widths[i]);
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_setXORModeZ() {
- // precompute the values
- final boolean[] values = new boolean[COUNT];
- for (int i = 0; i < COUNT; i++) {
- values[i] = (i % 2 == 0);
- }
-
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- gc.setXORMode(values[i]);
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_stringExtentLjava_lang_String() {
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- gc.stringExtent("test \t\nstring");
- }
- meter.stop();
- disposeMeter(meter);
-}
-
-public void test_textExtentLjava_lang_String() {
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- gc.textExtent("test \t\nstring");
- }
- meter.stop();
- disposeMeter(meter);
-}
-
-public void test_textExtentLjava_lang_StringI() {
- PerformanceMeter meter = createMeter("transparent");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- gc.textExtent("\t\r\na&bc&", SWT.DRAW_TRANSPARENT);
- }
- meter.stop();
-
- disposeMeter(meter);
-
- meter = createMeter("delimiter");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- gc.textExtent("\t\r\na&bc&", SWT.DRAW_DELIMITER);
- }
- meter.stop();
-
- disposeMeter(meter);
-
- meter = createMeter("mnemonic");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- gc.textExtent("\t\r\na&bc&", SWT.DRAW_MNEMONIC);
- }
- meter.stop();
-
- disposeMeter(meter);
-
- meter = createMeter("tab");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- gc.textExtent("\t\r\na&bc&", SWT.DRAW_TAB);
- }
- meter.stop();
-
- disposeMeter(meter);
-
- meter = createMeter("no flags");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- gc.textExtent("\t\r\na&bc&", SWT.NONE);
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_win32_newILorg_eclipse_swt_graphics_GCData() {
- // do not test - Windows only
-}
-
-public void test_win32_newLorg_eclipse_swt_graphics_DrawableLorg_eclipse_swt_graphics_GCData() {
- // do not test - Windows only
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_graphics_GC((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_graphics_Drawable");
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_graphics_DrawableI");
- methodNames.addElement("test_copyAreaIIIIII");
- methodNames.addElement("test_copyAreaLorg_eclipse_swt_graphics_ImageII");
- methodNames.addElement("test_dispose");
- methodNames.addElement("test_drawArcIIIIII");
- methodNames.addElement("test_drawFocusIIII");
- methodNames.addElement("test_drawImageLorg_eclipse_swt_graphics_ImageII");
- methodNames.addElement("test_drawImageLorg_eclipse_swt_graphics_ImageIIIIIIII");
- methodNames.addElement("test_drawLineIIII");
- methodNames.addElement("test_drawOvalIIII");
- methodNames.addElement("test_drawPointII");
- methodNames.addElement("test_drawPolygon$I");
- methodNames.addElement("test_drawPolyline$I");
- methodNames.addElement("test_drawRectangleIIII");
- methodNames.addElement("test_drawRectangleLorg_eclipse_swt_graphics_Rectangle");
- methodNames.addElement("test_drawRoundRectangleIIIIII");
- methodNames.addElement("test_drawStringLjava_lang_StringII");
- methodNames.addElement("test_drawStringLjava_lang_StringIIZ");
- methodNames.addElement("test_drawTextLjava_lang_StringII");
- methodNames.addElement("test_drawTextLjava_lang_StringIII");
- methodNames.addElement("test_drawTextLjava_lang_StringIIZ");
- methodNames.addElement("test_equalsLjava_lang_Object");
- methodNames.addElement("test_fillArcIIIIII");
- methodNames.addElement("test_fillGradientRectangleIIIIZ");
- methodNames.addElement("test_fillOvalIIII");
- methodNames.addElement("test_fillPolygon$I");
- methodNames.addElement("test_fillRectangleIIII");
- methodNames.addElement("test_fillRectangleLorg_eclipse_swt_graphics_Rectangle");
- methodNames.addElement("test_fillRoundRectangleIIIIII");
- methodNames.addElement("test_getAdvanceWidthC");
- methodNames.addElement("test_getBackground");
- methodNames.addElement("test_getCharWidthC");
- methodNames.addElement("test_getClipping");
- methodNames.addElement("test_getClippingLorg_eclipse_swt_graphics_Region");
- methodNames.addElement("test_getFont");
- methodNames.addElement("test_getFontMetrics");
- methodNames.addElement("test_getForeground");
- methodNames.addElement("test_getLineStyle");
- methodNames.addElement("test_getLineWidth");
- methodNames.addElement("test_getStyle");
- methodNames.addElement("test_getXORMode");
- methodNames.addElement("test_hashCode");
- methodNames.addElement("test_isClipped");
- methodNames.addElement("test_isDisposed");
- methodNames.addElement("test_setBackgroundLorg_eclipse_swt_graphics_Color");
- methodNames.addElement("test_setClippingIIII");
- methodNames.addElement("test_setClippingLorg_eclipse_swt_graphics_Rectangle");
- methodNames.addElement("test_setClippingLorg_eclipse_swt_graphics_Region");
- methodNames.addElement("test_setFontLorg_eclipse_swt_graphics_Font");
- methodNames.addElement("test_setForegroundLorg_eclipse_swt_graphics_Color");
- methodNames.addElement("test_setLineStyleI");
- methodNames.addElement("test_setLineWidthI");
- methodNames.addElement("test_setXORModeZ");
- methodNames.addElement("test_stringExtentLjava_lang_String");
- methodNames.addElement("test_textExtentLjava_lang_String");
- methodNames.addElement("test_textExtentLjava_lang_StringI");
- methodNames.addElement("test_win32_newILorg_eclipse_swt_graphics_GCData");
- methodNames.addElement("test_win32_newLorg_eclipse_swt_graphics_DrawableLorg_eclipse_swt_graphics_GCData");
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLorg_eclipse_swt_graphics_Drawable")) test_ConstructorLorg_eclipse_swt_graphics_Drawable();
- else if (getName().equals("test_ConstructorLorg_eclipse_swt_graphics_DrawableI")) test_ConstructorLorg_eclipse_swt_graphics_DrawableI();
- else if (getName().equals("test_copyAreaIIIIII")) test_copyAreaIIIIII();
- else if (getName().equals("test_copyAreaLorg_eclipse_swt_graphics_ImageII")) test_copyAreaLorg_eclipse_swt_graphics_ImageII();
- else if (getName().equals("test_dispose")) test_dispose();
- else if (getName().equals("test_drawArcIIIIII")) test_drawArcIIIIII();
- else if (getName().equals("test_drawFocusIIII")) test_drawFocusIIII();
- else if (getName().equals("test_drawImageLorg_eclipse_swt_graphics_ImageII")) test_drawImageLorg_eclipse_swt_graphics_ImageII();
- else if (getName().equals("test_drawImageLorg_eclipse_swt_graphics_ImageIIIIIIII")) test_drawImageLorg_eclipse_swt_graphics_ImageIIIIIIII();
- else if (getName().equals("test_drawLineIIII")) test_drawLineIIII();
- else if (getName().equals("test_drawOvalIIII")) test_drawOvalIIII();
- else if (getName().equals("test_drawPointII")) test_drawPointII();
- else if (getName().equals("test_drawPolygon$I")) test_drawPolygon$I();
- else if (getName().equals("test_drawPolyline$I")) test_drawPolyline$I();
- else if (getName().equals("test_drawRectangleIIII")) test_drawRectangleIIII();
- else if (getName().equals("test_drawRectangleLorg_eclipse_swt_graphics_Rectangle")) test_drawRectangleLorg_eclipse_swt_graphics_Rectangle();
- else if (getName().equals("test_drawRoundRectangleIIIIII")) test_drawRoundRectangleIIIIII();
- else if (getName().equals("test_drawStringLjava_lang_StringII")) test_drawStringLjava_lang_StringII();
- else if (getName().equals("test_drawStringLjava_lang_StringIIZ")) test_drawStringLjava_lang_StringIIZ();
- else if (getName().equals("test_drawTextLjava_lang_StringII")) test_drawTextLjava_lang_StringII();
- else if (getName().equals("test_drawTextLjava_lang_StringIII")) test_drawTextLjava_lang_StringIII();
- else if (getName().equals("test_drawTextLjava_lang_StringIIZ")) test_drawTextLjava_lang_StringIIZ();
- else if (getName().equals("test_equalsLjava_lang_Object")) test_equalsLjava_lang_Object();
- else if (getName().equals("test_fillArcIIIIII")) test_fillArcIIIIII();
- else if (getName().equals("test_fillGradientRectangleIIIIZ")) test_fillGradientRectangleIIIIZ();
- else if (getName().equals("test_fillOvalIIII")) test_fillOvalIIII();
- else if (getName().equals("test_fillPolygon$I")) test_fillPolygon$I();
- else if (getName().equals("test_fillRectangleIIII")) test_fillRectangleIIII();
- else if (getName().equals("test_fillRectangleLorg_eclipse_swt_graphics_Rectangle")) test_fillRectangleLorg_eclipse_swt_graphics_Rectangle();
- else if (getName().equals("test_fillRoundRectangleIIIIII")) test_fillRoundRectangleIIIIII();
- else if (getName().equals("test_getAdvanceWidthC")) test_getAdvanceWidthC();
- else if (getName().equals("test_getBackground")) test_getBackground();
- else if (getName().equals("test_getCharWidthC")) test_getCharWidthC();
- else if (getName().equals("test_getClipping")) test_getClipping();
- else if (getName().equals("test_getClippingLorg_eclipse_swt_graphics_Region")) test_getClippingLorg_eclipse_swt_graphics_Region();
- else if (getName().equals("test_getFont")) test_getFont();
- else if (getName().equals("test_getFontMetrics")) test_getFontMetrics();
- else if (getName().equals("test_getForeground")) test_getForeground();
- else if (getName().equals("test_getLineStyle")) test_getLineStyle();
- else if (getName().equals("test_getLineWidth")) test_getLineWidth();
- else if (getName().equals("test_getStyle")) test_getStyle();
- else if (getName().equals("test_getXORMode")) test_getXORMode();
- else if (getName().equals("test_hashCode")) test_hashCode();
- else if (getName().equals("test_isClipped")) test_isClipped();
- else if (getName().equals("test_isDisposed")) test_isDisposed();
- else if (getName().equals("test_setBackgroundLorg_eclipse_swt_graphics_Color")) test_setBackgroundLorg_eclipse_swt_graphics_Color();
- else if (getName().equals("test_setClippingIIII")) test_setClippingIIII();
- else if (getName().equals("test_setClippingLorg_eclipse_swt_graphics_Rectangle")) test_setClippingLorg_eclipse_swt_graphics_Rectangle();
- else if (getName().equals("test_setClippingLorg_eclipse_swt_graphics_Region")) test_setClippingLorg_eclipse_swt_graphics_Region();
- else if (getName().equals("test_setFontLorg_eclipse_swt_graphics_Font")) test_setFontLorg_eclipse_swt_graphics_Font();
- else if (getName().equals("test_setForegroundLorg_eclipse_swt_graphics_Color")) test_setForegroundLorg_eclipse_swt_graphics_Color();
- else if (getName().equals("test_setLineStyleI")) test_setLineStyleI();
- else if (getName().equals("test_setLineWidthI")) test_setLineWidthI();
- else if (getName().equals("test_setXORModeZ")) test_setXORModeZ();
- else if (getName().equals("test_stringExtentLjava_lang_String")) test_stringExtentLjava_lang_String();
- else if (getName().equals("test_textExtentLjava_lang_String")) test_textExtentLjava_lang_String();
- else if (getName().equals("test_textExtentLjava_lang_StringI")) test_textExtentLjava_lang_StringI();
- else if (getName().equals("test_win32_newILorg_eclipse_swt_graphics_GCData")) test_win32_newILorg_eclipse_swt_graphics_GCData();
- else if (getName().equals("test_win32_newLorg_eclipse_swt_graphics_DrawableLorg_eclipse_swt_graphics_GCData")) test_win32_newLorg_eclipse_swt_graphics_DrawableLorg_eclipse_swt_graphics_GCData();
-}
-
-/* custom */
-Display display;
-Shell shell;
-Image image;
-GC gc;
-
-/**
- * Return the actual RGB value used for rendering for the given Color.
- * This may be different from the Color's RGB value on lower-color displays
- * (16bpp or less).
- */
-RGB getRealRGB(Color color) {
- Image colorImage = new Image(display, 10, 10);
- GC imageGc = new GC(colorImage);
- ImageData imageData;
- PaletteData palette;
- int pixel;
-
- imageGc.setBackground(color);
- imageGc.setForeground(color);
- imageGc.fillRectangle(0, 0, 10, 10);
- imageData = colorImage.getImageData();
- palette = imageData.palette;
- imageGc.dispose();
- colorImage.dispose();
- pixel = imageData.getPixel(0, 0);
- return palette.getRGB(pixel);
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/Test_org_eclipse_swt_graphics_Image.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/Test_org_eclipse_swt_graphics_Image.java
deleted file mode 100644
index 89f2c551e8..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/Test_org_eclipse_swt_graphics_Image.java
+++ /dev/null
@@ -1,463 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit.performance;
-
-
-import java.io.*;
-
-import junit.framework.*;
-import junit.textui.*;
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.test.performance.PerformanceMeter;
-
-/**
- * Automated Performance Test Suite for class org.eclipse.swt.graphics.Image
- *
- * @see org.eclipse.swt.graphics.Image
- */
-public class Test_org_eclipse_swt_graphics_Image extends SwtPerformanceTestCase {
- static final int COUNT = 1000;
-
-public Test_org_eclipse_swt_graphics_Image(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() throws Exception {
- super.setUp();
- display = Display.getDefault();
-}
-
-public void test_ConstructorLorg_eclipse_swt_graphics_DeviceII() {
- Image[] images = new Image[COUNT];
-
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- images[i] = new Image(display, 100, 100);
- }
- meter.stop();
-
- for (int i = 0; i < COUNT; i++) {
- images[i].dispose();
- }
-
- disposeMeter(meter);
-}
-
-public void test_ConstructorLorg_eclipse_swt_graphics_DeviceLorg_eclipse_swt_graphics_ImageI() {
- String name = getPath(imageFilenames[0] + "." + imageFormats[0]);
- FileInputStream inStream = null;
- try {
- inStream = new FileInputStream(name);
- } catch (FileNotFoundException e1) {
- e1.printStackTrace();
- }
- ImageData[] data = new ImageLoader().load(inStream);
- try {
- inStream.close();
- } catch (IOException e) {
- e.printStackTrace();
- }
- Image image = new Image (display, data[0]);
- image.setBackground(display.getSystemColor(SWT.COLOR_GREEN));
-
- Image[] images = new Image[COUNT];
-
- PerformanceMeter meter = createMeter("copy");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- images[i] = new Image(display, image, SWT.IMAGE_COPY);
- }
- meter.stop();
-
- for (int i = 0; i < COUNT; i++) {
- images[i].dispose();
- }
-
- disposeMeter(meter);
-
- meter = createMeter("disable");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- images[i] = new Image(display, image, SWT.IMAGE_DISABLE);
- }
- meter.stop();
-
- for (int i = 0; i < COUNT; i++) {
- images[i].dispose();
- }
-
- disposeMeter(meter);
-
- meter = createMeter("gray");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- images[i] = new Image(display, image, SWT.IMAGE_GRAY);
- }
- meter.stop();
-
- for (int i = 0; i < COUNT; i++) {
- images[i].dispose();
- }
-
- disposeMeter(meter);
-}
-
-public void test_ConstructorLorg_eclipse_swt_graphics_DeviceLorg_eclipse_swt_graphics_Rectangle() {
- Image[] images = new Image[COUNT];
- Rectangle rectangle = new Rectangle(0, 0, 100, 100);
-
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- images[i] = new Image(display, rectangle);
- }
- meter.stop();
-
- for (int i = 0; i < COUNT; i++) {
- images[i].dispose();
- }
-
- disposeMeter(meter);
-}
-
-public void test_ConstructorLorg_eclipse_swt_graphics_DeviceLorg_eclipse_swt_graphics_ImageData() {
- String name = getPath(imageFilenames[0] + "." + imageFormats[0]);
- FileInputStream inStream = null;
- try {
- inStream = new FileInputStream(name);
- } catch (FileNotFoundException e) {
- e.printStackTrace();
- }
- ImageData[] imageData = new ImageLoader().load(inStream);
- Image[] images = new Image[COUNT];
- try {
- inStream.close();
- } catch (IOException e1) {
- e1.printStackTrace();
- }
-
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- images[i] = new Image(display, imageData[0]);
- }
- meter.stop();
-
- for (int i = 0; i < COUNT; i++) {
- images[i].dispose();
- }
-
- disposeMeter(meter);
-}
-
-public void test_ConstructorLorg_eclipse_swt_graphics_DeviceLorg_eclipse_swt_graphics_ImageDataLorg_eclipse_swt_graphics_ImageData() {
- Image[] images = new Image[COUNT];
- String name = getPath(imageFilenames[0] + "." + imageFormats[0]);
- FileInputStream inStream = null;
- try {
- inStream = new FileInputStream(name);
- } catch (FileNotFoundException e) {
- e.printStackTrace();
- }
- ImageData imageData = new ImageLoader().load(inStream)[0];
- ImageData imageData1 = new ImageData(imageData.width, imageData.height, 8, new PaletteData(new RGB[] {new RGB(0, 0, 0)}));
- try {
- inStream.close();
- } catch (IOException e1) {
- e1.printStackTrace();
- }
-
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- images[i] = new Image(display, imageData, imageData1);
- }
- meter.stop();
-
- for (int i = 0; i < COUNT; i++) {
- images[i].dispose();
- }
-
- disposeMeter(meter);
-}
-
-public void test_ConstructorLorg_eclipse_swt_graphics_DeviceLjava_io_InputStream() {
- // TODO
-}
-
-public void test_ConstructorLorg_eclipse_swt_graphics_DeviceLjava_lang_String() {
- int numFileNames = imageFilenames.length;
- int numFormats = imageFormats.length;
- for (int k=0; k<numFileNames; k++) {
- String fileName = imageFilenames[k];
- for (int i=0; i<numFormats; i++) {
- String format = imageFormats[i];
- String pathName = getPath(fileName + "." + format);
- Image[] images = new Image[COUNT];
-
- PerformanceMeter meter = createMeter(pathName);
- meter.start();
- for (int j = 0; j < COUNT; j++) {
- images[j] = new Image(display, pathName);
- }
- meter.stop();
-
- for (int j = 0; j < COUNT; j++) {
- images[j].dispose();
- }
-
- disposeMeter(meter);
- }
- }
-}
-
-public void test_dispose() {
- Image[] images = new Image [COUNT];
- for (int i = 0; i < COUNT; i++) {
- images[i] = new Image(display, 100, 100);
- }
-
- PerformanceMeter meter = createMeter("not disposed");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- images[i].dispose(); // dispose
- }
- meter.stop();
-
- disposeMeter(meter);
-
- meter = createMeter("disposed");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- images[i].dispose(); // dispose disposed
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_equalsLjava_lang_Object() {
- ImageData imageData = new ImageData(10, 10, 1, new PaletteData(new RGB[] {new RGB(0, 0, 0)}));
- Image image1 = new Image(display, imageData);
- Image image2 = new Image(display, imageData);
-
- PerformanceMeter meter = createMeter("equal");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- image1.equals(image2); // equal
- }
- meter.stop();
-
- image1.dispose();
- image2.dispose();
-
- disposeMeter(meter);
-
- image1 = new Image(display, imageData);
- image2 = new Image(display, 8, 8);
-
- meter = createMeter("not equal");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- image1.equals(image2); // not equal
- }
- meter.stop();
-
- image1.dispose();
- image2.dispose();
-
- disposeMeter(meter);
-}
-
-public void test_getBackground() {
- Image image = new Image(display, 100, 100);
- image.setBackground(display.getSystemColor(SWT.COLOR_GREEN));
-
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- image.getBackground();
- }
- meter.stop();
-
- image.dispose();
-
- disposeMeter(meter);
-}
-
-public void test_getBounds() {
- Image image = new Image(display, 10, 20);
-
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- image.getBounds();
- }
- meter.stop();
-
- image.dispose();
-
- disposeMeter(meter);
-}
-
-public void test_getImageData() {
- ImageData imageData = new ImageData(10, 10, 1, new PaletteData(new RGB[] {new RGB(0, 0, 0)}));
- Image image = new Image(display, imageData);
-
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- image.getImageData();
- }
- meter.stop();
-
- image.dispose();
-
- disposeMeter(meter);
-}
-
-public void test_hashCode() {
- ImageData imageData = new ImageData(10, 10, 1, new PaletteData(new RGB[] {new RGB(0, 0, 0)}));
- Image image = new Image(display, imageData);
-
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- image.hashCode();
- }
- meter.stop();
-
- image.dispose();
-
- disposeMeter(meter);
-}
-
-public void test_internal_new_GCLorg_eclipse_swt_graphics_GCData() {
- // javadoc states:
- // <b>IMPORTANT:</b> This method is <em>not</em> part of the public
- // API for <code>Image</code>
-}
-
-public void test_internal_dispose_GCILorg_eclipse_swt_graphics_GCData() {
- // javadoc states:
- // <b>IMPORTANT:</b> This method is <em>not</em> part of the public
- // API for <code>Image</code>
-}
-
-public void test_isDisposed() {
- Image image = new Image(display, 10, 10);
-
- PerformanceMeter meter = createMeter("not disposed");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- image.isDisposed(); // not disposed
- }
- meter.stop();
-
- image.dispose();
-
- disposeMeter(meter);
-
- meter = createMeter("disposed");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- image.isDisposed(); // disposed
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_setBackgroundLorg_eclipse_swt_graphics_Color() {
- Image image = new Image(display, 100, 100);
- Color color1 = display.getSystemColor(SWT.COLOR_GREEN);
- Color color2 = display.getSystemColor(SWT.COLOR_RED);
-
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT / 2; i++) {
- image.setBackground(color1);
- image.setBackground(color2);
- }
- meter.stop();
-
- image.dispose();
-
- disposeMeter(meter);
-}
-
-public void test_win32_newLorg_eclipse_swt_graphics_DeviceII() {
- // do not test - Windows only
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_graphics_Image((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_graphics_DeviceII");
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_graphics_DeviceLjava_io_InputStream");
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_graphics_DeviceLjava_lang_String");
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_graphics_DeviceLorg_eclipse_swt_graphics_ImageData");
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_graphics_DeviceLorg_eclipse_swt_graphics_ImageDataLorg_eclipse_swt_graphics_ImageData");
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_graphics_DeviceLorg_eclipse_swt_graphics_ImageI");
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_graphics_DeviceLorg_eclipse_swt_graphics_Rectangle");
- methodNames.addElement("test_dispose");
- methodNames.addElement("test_equalsLjava_lang_Object");
- methodNames.addElement("test_getBackground");
- methodNames.addElement("test_getBounds");
- methodNames.addElement("test_getImageData");
- methodNames.addElement("test_hashCode");
- methodNames.addElement("test_internal_dispose_GCILorg_eclipse_swt_graphics_GCData");
- methodNames.addElement("test_internal_new_GCLorg_eclipse_swt_graphics_GCData");
- methodNames.addElement("test_isDisposed");
- methodNames.addElement("test_setBackgroundLorg_eclipse_swt_graphics_Color");
- methodNames.addElement("test_win32_newLorg_eclipse_swt_graphics_DeviceII");
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLorg_eclipse_swt_graphics_DeviceII")) test_ConstructorLorg_eclipse_swt_graphics_DeviceII();
- else if (getName().equals("test_ConstructorLorg_eclipse_swt_graphics_DeviceLjava_io_InputStream")) test_ConstructorLorg_eclipse_swt_graphics_DeviceLjava_io_InputStream();
- else if (getName().equals("test_ConstructorLorg_eclipse_swt_graphics_DeviceLjava_lang_String")) test_ConstructorLorg_eclipse_swt_graphics_DeviceLjava_lang_String();
- else if (getName().equals("test_ConstructorLorg_eclipse_swt_graphics_DeviceLorg_eclipse_swt_graphics_ImageData")) test_ConstructorLorg_eclipse_swt_graphics_DeviceLorg_eclipse_swt_graphics_ImageData();
- else if (getName().equals("test_ConstructorLorg_eclipse_swt_graphics_DeviceLorg_eclipse_swt_graphics_ImageDataLorg_eclipse_swt_graphics_ImageData")) test_ConstructorLorg_eclipse_swt_graphics_DeviceLorg_eclipse_swt_graphics_ImageDataLorg_eclipse_swt_graphics_ImageData();
- else if (getName().equals("test_ConstructorLorg_eclipse_swt_graphics_DeviceLorg_eclipse_swt_graphics_ImageI")) test_ConstructorLorg_eclipse_swt_graphics_DeviceLorg_eclipse_swt_graphics_ImageI();
- else if (getName().equals("test_ConstructorLorg_eclipse_swt_graphics_DeviceLorg_eclipse_swt_graphics_Rectangle")) test_ConstructorLorg_eclipse_swt_graphics_DeviceLorg_eclipse_swt_graphics_Rectangle();
- else if (getName().equals("test_dispose")) test_dispose();
- else if (getName().equals("test_equalsLjava_lang_Object")) test_equalsLjava_lang_Object();
- else if (getName().equals("test_getBackground")) test_getBackground();
- else if (getName().equals("test_getBounds")) test_getBounds();
- else if (getName().equals("test_getImageData")) test_getImageData();
- else if (getName().equals("test_hashCode")) test_hashCode();
- else if (getName().equals("test_internal_dispose_GCILorg_eclipse_swt_graphics_GCData")) test_internal_dispose_GCILorg_eclipse_swt_graphics_GCData();
- else if (getName().equals("test_internal_new_GCLorg_eclipse_swt_graphics_GCData")) test_internal_new_GCLorg_eclipse_swt_graphics_GCData();
- else if (getName().equals("test_isDisposed")) test_isDisposed();
- else if (getName().equals("test_setBackgroundLorg_eclipse_swt_graphics_Color")) test_setBackgroundLorg_eclipse_swt_graphics_Color();
- else if (getName().equals("test_win32_newLorg_eclipse_swt_graphics_DeviceII")) test_win32_newLorg_eclipse_swt_graphics_DeviceII();
-}
-/* custom */
-Display display;
-
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/Test_org_eclipse_swt_graphics_ImageData.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/Test_org_eclipse_swt_graphics_ImageData.java
deleted file mode 100644
index b8570d90bd..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/Test_org_eclipse_swt_graphics_ImageData.java
+++ /dev/null
@@ -1,448 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit.performance;
-
-
-import java.io.*;
-
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.test.performance.PerformanceMeter;
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Performance Test Suite for class org.eclipse.swt.graphics.ImageData
- *
- * @see org.eclipse.swt.graphics.ImageData
- */
-public class Test_org_eclipse_swt_graphics_ImageData extends SwtPerformanceTestCase {
- static final int COUNT = 1000;
-
-public Test_org_eclipse_swt_graphics_ImageData(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() throws Exception {
- super.setUp();
- imageData = new ImageData(IMAGE_DIMENSION, IMAGE_DIMENSION, 32, new PaletteData(0xFF0000, 0xFF00, 0xFF));
-}
-
-public void test_ConstructorIIILorg_eclipse_swt_graphics_PaletteData() {
- int[] validDepths = {1, 2, 4, 8, 16, 24, 32};
- PaletteData paletteData = new PaletteData(new RGB[] {new RGB(0, 0, 0)});
- for (int i = 0; i < validDepths.length; i++) {
- PerformanceMeter meter = createMeter("" + validDepths[i]);
- meter.start();
- for (int j = 0; j < COUNT; j++) {
- new ImageData(100, 100, validDepths[i], paletteData);
- }
- meter.stop();
- disposeMeter(meter);
- };
-}
-
-public void test_ConstructorIIILorg_eclipse_swt_graphics_PaletteDataI$B() {
- PaletteData paletteData = new PaletteData(new RGB[] {new RGB(0, 0, 0)});
- byte[] data = new byte[] {};
- int[] validDepths = {1, 2, 4, 8, 16, 24, 32};
-
- for (int i = 0; i < validDepths.length; i++) {
- PerformanceMeter meter = createMeter("" + validDepths[i]);
- meter.start();
- for (int j = 0; j < COUNT; j++) {
- new ImageData(100, 100, validDepths[i], paletteData, 1, data);
- }
- meter.stop();
- disposeMeter(meter);
- }
-}
-
-public void test_ConstructorLjava_io_InputStream() {
- // TODO
-}
-
-public void test_ConstructorLjava_lang_String() {
- // j2se and j2me(cdc) can load from a filename but, j2me(cldc) throws an exception
- if (isJ2ME()) return;
-
- int numFormats = imageFormats.length;
- int numFileNames = imageFilenames.length;
- for (int k = 0; k < numFileNames; k++) {
- String fileName = imageFilenames[k];
- for (int i = 0; i < numFormats; i++) {
- String format = imageFormats[i];
- String fullName = getPath(fileName + "." + format);
-
- PerformanceMeter meter = createMeter(fullName);
- meter.start();
- for (int j = 0; j < COUNT; j++) {
- new ImageData(fullName);
- }
- meter.stop();
-
- disposeMeter(meter);
- }
- }
-}
-
-public void test_clone() {
- String name = getPath(imageFilenames[0] + "." + imageFormats[0]);
- FileInputStream inStream = null;
- try {
- inStream = new FileInputStream (name);
- } catch (FileNotFoundException e1) {
- e1.printStackTrace();
- }
- ImageLoader loader = new ImageLoader();
- ImageData data = loader.load(inStream)[0];
- try {
- inStream.close();
- } catch (Exception e) {
- e.printStackTrace();
- }
-
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- data.clone();
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_getAlphaII() {
- imageData.setAlpha(0, 0, 0xAA);
-
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- imageData.getAlpha(0, 0);
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_getAlphasIII$BI() {
- byte value = (byte)0xAA;
- byte[] values = new byte[] {value, (byte) (value+1), (byte) (value+2), (byte) (value+3), (byte) (value+4)};
- byte[] alphaData = new byte[20];
- imageData.setAlphas(0, 1, values.length, values, 0);
-
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- imageData.getAlphas(0, 1, 10, alphaData, 10);
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_getPixelII() {
- imageData.setPixel(0, 0, 0xAA);
-
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- imageData.getPixel(0, 0);
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_getPixelsIII$BI() {
- byte[] pixelData = new byte[20];
- PaletteData paletteData = new PaletteData(0xFF0000, 0xFF00, 0xFF);
- imageData = new ImageData(IMAGE_DIMENSION, IMAGE_DIMENSION, 8, paletteData);
-
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- imageData.getPixels(0, 1, 10, pixelData, 10);
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_getPixelsIII$II() {
- int[] pixelData = new int[20];
- PaletteData paletteData = new PaletteData(0xFF0000, 0xFF00, 0xFF);
- imageData = new ImageData(IMAGE_DIMENSION, IMAGE_DIMENSION, 32, paletteData);
-
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- imageData.getPixels(0, 1, 10, pixelData, 10);
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_getRGBs() {
- RGB[] rgbs = new RGB[]{new RGB(0, 0, 0), new RGB(255, 255, 255)};
- imageData = new ImageData(IMAGE_DIMENSION, IMAGE_DIMENSION, 8, new PaletteData(rgbs));
-
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- imageData.getRGBs();
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_getTransparencyMask() {
- String name = getPath(transparentImageFilenames[0]);
- FileInputStream inStream = null;
- try {
- inStream = new FileInputStream(name);
- } catch (FileNotFoundException e) {
- e.printStackTrace();
- }
- Image image = new Image(Display.getDefault(), inStream);
- imageData = image.getImageData();
- image.dispose();
- try {
- inStream.close();
- } catch (IOException e1) {
- e1.printStackTrace();
- }
-
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- imageData.getTransparencyMask();
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_getTransparencyType() {
- FileInputStream inStream = null;
- String name = getPath(imageFilenames[0] + '.' + imageFormats[imageFormats.length-1]);
- try {
- inStream = new FileInputStream(name);
- } catch (FileNotFoundException e) {
- e.printStackTrace();
- }
- Image image = new Image(Display.getDefault(), inStream);
- imageData = image.getImageData();
- image.dispose();
- try {
- inStream.close();
- } catch (IOException e1) {
- e1.printStackTrace();
- }
-
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- imageData.getTransparencyType();
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_internal_newIIILorg_eclipse_swt_graphics_PaletteDataI$BI$B$BIIIIIII() {
- // do not test internal API
- // javadoc states:
- // <b>IMPORTANT:</b> This method is <em>not</em> part of the public
- // API for <code>ImageData</code>. It is marked public only so that it
- // can be shared within the packages provided by SWT. It is subject
- // to change without notice, and should never be called from
- // application code.
-}
-
-public void test_scaledToII() {
- int imageDimension = 8;
- RGB[] rgbs = new RGB[]{new RGB(0, 0, 0), new RGB(255, 255, 255)};
- byte[] pixelData = new byte[(imageDimension*imageDimension) / 8];
- pixelData[0] = 0x4F;
- imageData = new ImageData(imageDimension, imageDimension, 1, new PaletteData(rgbs), 1, pixelData);
- int newHeight = imageDimension * 10;
-
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- imageData.scaledTo(imageDimension, newHeight);
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_setAlphaIII() {
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- imageData.setAlpha(0, 0, 0xAA);
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_setAlphasIII$BI() {
- byte value = (byte) 0xAA;
- int OFFSET = 1;
- byte[] alphaData = new byte[20];
- byte[] values = new byte[] {value, (byte) (value+1), (byte) (value+2), (byte) (value+3), (byte) (value+4)};
- imageData.setAlphas(0, 1, values.length - OFFSET, values, OFFSET);
- int putWidth = values.length - OFFSET;
-
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- imageData.setAlphas(0, 1, putWidth, values, OFFSET);
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_setPixelIII() {
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- imageData.setPixel(0, 0, 0xAA);
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_setPixelsIII$BI() {
- int OFFSET = 1;
- byte[] values = new byte[]{0x1, 0x2, 0x3, 0xF, (byte)0xFF};
- imageData = new ImageData(IMAGE_DIMENSION, IMAGE_DIMENSION, 8, new PaletteData(0xFF0000, 0xFF00, 0xFF));
-
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- imageData.setPixels(0, 1, values.length - OFFSET, values, OFFSET);
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_setPixelsIII$II() {
- int OFFSET = 1;
- imageData = new ImageData(IMAGE_DIMENSION, IMAGE_DIMENSION, 32, new PaletteData(0xFF000000, 0xFF00, 0xFF));
- int[] values = new int[]{0, 0xFF, 0xFFAA, 0xFF00AA00};
- imageData.setPixels(0, 1, values.length - OFFSET, values, OFFSET);
-
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- imageData.setPixels(0, 1, values.length - OFFSET, values, OFFSET);
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_graphics_ImageData((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorIIILorg_eclipse_swt_graphics_PaletteData");
- methodNames.addElement("test_ConstructorIIILorg_eclipse_swt_graphics_PaletteDataI$B");
- methodNames.addElement("test_ConstructorLjava_io_InputStream");
- methodNames.addElement("test_ConstructorLjava_lang_String");
- methodNames.addElement("test_clone");
- methodNames.addElement("test_getAlphaII");
- methodNames.addElement("test_getAlphasIII$BI");
- methodNames.addElement("test_getPixelII");
- methodNames.addElement("test_getPixelsIII$BI");
- methodNames.addElement("test_getPixelsIII$II");
- methodNames.addElement("test_getRGBs");
- methodNames.addElement("test_getTransparencyMask");
- methodNames.addElement("test_getTransparencyType");
- methodNames.addElement("test_internal_newIIILorg_eclipse_swt_graphics_PaletteDataI$BI$B$BIIIIIII");
- methodNames.addElement("test_scaledToII");
- methodNames.addElement("test_setAlphaIII");
- methodNames.addElement("test_setAlphasIII$BI");
- methodNames.addElement("test_setPixelIII");
- methodNames.addElement("test_setPixelsIII$BI");
- methodNames.addElement("test_setPixelsIII$II");
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorIIILorg_eclipse_swt_graphics_PaletteData")) test_ConstructorIIILorg_eclipse_swt_graphics_PaletteData();
- else if (getName().equals("test_ConstructorIIILorg_eclipse_swt_graphics_PaletteDataI$B")) test_ConstructorIIILorg_eclipse_swt_graphics_PaletteDataI$B();
- else if (getName().equals("test_ConstructorLjava_io_InputStream")) test_ConstructorLjava_io_InputStream();
- else if (getName().equals("test_ConstructorLjava_lang_String")) test_ConstructorLjava_lang_String();
- else if (getName().equals("test_clone")) test_clone();
- else if (getName().equals("test_getAlphaII")) test_getAlphaII();
- else if (getName().equals("test_getAlphasIII$BI")) test_getAlphasIII$BI();
- else if (getName().equals("test_getPixelII")) test_getPixelII();
- else if (getName().equals("test_getPixelsIII$BI")) test_getPixelsIII$BI();
- else if (getName().equals("test_getPixelsIII$II")) test_getPixelsIII$II();
- else if (getName().equals("test_getRGBs")) test_getRGBs();
- else if (getName().equals("test_getTransparencyMask")) test_getTransparencyMask();
- else if (getName().equals("test_getTransparencyType")) test_getTransparencyType();
- else if (getName().equals("test_internal_newIIILorg_eclipse_swt_graphics_PaletteDataI$BI$B$BIIIIIII")) test_internal_newIIILorg_eclipse_swt_graphics_PaletteDataI$BI$B$BIIIIIII();
- else if (getName().equals("test_scaledToII")) test_scaledToII();
- else if (getName().equals("test_setAlphaIII")) test_setAlphaIII();
- else if (getName().equals("test_setAlphasIII$BI")) test_setAlphasIII$BI();
- else if (getName().equals("test_setPixelIII")) test_setPixelIII();
- else if (getName().equals("test_setPixelsIII$BI")) test_setPixelsIII$BI();
- else if (getName().equals("test_setPixelsIII$II")) test_setPixelsIII$II();
-}
-/* custom */
-ImageData imageData;
-int IMAGE_DIMENSION = 10;
-
-void assertEquals(String message, byte expected[], byte actual[]) {
- if (expected == null && actual == null)
- return;
- boolean equal = false;
- if (expected != null && actual != null && expected.length == actual.length) {
- if (expected.length == 0)
- return;
- equal = true;
- for (int i = 0; i < expected.length; i++) {
- if (expected[i] != actual[i]) {
- equal = false;
- }
- }
- }
- if (!equal) {
- String formatted= "";
- if (message != null)
- formatted= message+" ";
- fail(formatted+"expected:<"+expected+"> but was:<"+actual+">");
- }
-}
-
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/Test_org_eclipse_swt_graphics_ImageLoader.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/Test_org_eclipse_swt_graphics_ImageLoader.java
deleted file mode 100644
index 15e59dc17c..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/Test_org_eclipse_swt_graphics_ImageLoader.java
+++ /dev/null
@@ -1,290 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit.performance;
-
-
-import java.io.*;
-
-import junit.framework.*;
-import junit.textui.*;
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.test.performance.PerformanceMeter;
-
-/**
- * Automated Performance Test Suite for class org.eclipse.swt.graphics.ImageLoader
- *
- * @see org.eclipse.swt.graphics.ImageLoader
- */
-public class Test_org_eclipse_swt_graphics_ImageLoader extends SwtPerformanceTestCase {
- static final int COUNT = 1000;
-
-public Test_org_eclipse_swt_graphics_ImageLoader(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-public void test_Constructor() {
- ImageLoader loader = new ImageLoader();
-}
-
-public void test_addImageLoaderListenerLorg_eclipse_swt_graphics_ImageLoaderListener() {
- ImageLoader loader = new ImageLoader();
- ImageLoaderListener loaderListener = new ImageLoaderListener() {
- public void imageDataLoaded(ImageLoaderEvent e) {
- };
- };
-
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- loader.addImageLoaderListener(loaderListener);
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_hasListeners() {
- ImageLoader loader = new ImageLoader();
-
- PerformanceMeter meter = createMeter("no listeners");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- loader.hasListeners(); // no listeners
- }
- meter.stop();
-
- disposeMeter(meter);
-
- loader.addImageLoaderListener(new ImageLoaderListener() {
- public void imageDataLoaded(ImageLoaderEvent e) {
- };
- });
-
- meter = createMeter("has listeners");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- loader.hasListeners(); // has listener
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_loadLjava_io_InputStream() {
- // TODO
-}
-
-public void test_loadLjava_lang_String() {
- // j2se and j2me(cdc) can load from a filename but, j2me(cldc) throws an exception
- if (isJ2ME()) return;
-
- ImageLoader loader = new ImageLoader();
- String fileName = getPath(imageFilenames[0] + "." + imageFormats[0]);
-
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- loader.load(fileName);
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_notifyListenersLorg_eclipse_swt_graphics_ImageLoaderEvent() {
- ImageLoader loader = new ImageLoader();
- ImageLoaderEvent event = new ImageLoaderEvent(loader, null, 0, true);
- for (int i = 0; i < COUNT; i++) {
- loader.addImageLoaderListener(
- new ImageLoaderListener() {
- public void imageDataLoaded(ImageLoaderEvent e) {}
- });
- }
-
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- loader.notifyListeners(event);
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_removeImageLoaderListenerLorg_eclipse_swt_graphics_ImageLoaderListener() {
- ImageLoader loader = new ImageLoader();
- ImageLoaderListener[] listeners = new ImageLoaderListener[COUNT];
- for (int i = 0; i < COUNT; i++) {
- listeners[i] = new ImageLoaderListener() {
- public void imageDataLoaded(ImageLoaderEvent e) {}
- };
- loader.addImageLoaderListener(listeners[i]);
- }
-
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- loader.removeImageLoaderListener(listeners[i]);
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_saveLjava_io_OutputStreamI() {
- ImageLoader loader = new ImageLoader();
- boolean jpgSupported = false;
- for (int i=0; i<imageFormats.length; i++) {
- if (imageFormats[i].equals("jpg")) {
- jpgSupported = true;
- break;
- }
- }
- if (!jpgSupported) return;
-
- String filename = imageFilenames[0];
- // must use jpg since save is not implemented yet in png format
- String filetype = "jpg";
- FileInputStream inStream = null;
- try {
- inStream = new FileInputStream(getPath(filename + "." + filetype));
- } catch (FileNotFoundException e1) {
- e1.printStackTrace();
- }
- loader.load(inStream);
- try {
- inStream.close();
- } catch (IOException e) {
- e.printStackTrace();
- }
- ByteArrayOutputStream outStream = new ByteArrayOutputStream();
- try {
- for (int i = 0; i < imageFormats.length; i++) {
- if (imageFormats[i].equals(filetype)) {
-
- PerformanceMeter meter = createMeter("" + i);
- meter.start();
- for (int j = 0; j < COUNT; j++) {
- loader.save(outStream, i);
- }
- meter.stop();
-
- disposeMeter(meter);
-
- break;
- }
- }
- } finally {
- try {
- outStream.close();
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-}
-
-public void test_saveLjava_lang_StringI() {
- // j2se and j2me(cdc) can load from a filename but, j2me(cldc) throws an exception
- if (isJ2ME()) return;
-
- ImageLoader loader = new ImageLoader();
- String name = getPath(imageFilenames[0] + "." + imageFormats[0]);
- InputStream inStream = null;
- try {
- inStream = new FileInputStream(name);
- } catch (FileNotFoundException e) {
- e.printStackTrace();
- }
- loader.load(inStream);
- try {
- inStream.close();
- } catch (IOException e2) {
- e2.printStackTrace();
- }
-
- OutputStream outStream = new ByteArrayOutputStream();
-
- try {
- PerformanceMeter meter = createMeter("gif");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- loader.save(outStream, SWT.IMAGE_GIF);
- }
- meter.stop();
-
- disposeMeter(meter);
-
- meter = createMeter("ico");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- loader.save(outStream, SWT.IMAGE_ICO);
- }
- meter.stop();
-
- disposeMeter(meter);
-
- meter = createMeter("jpg");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- loader.save(outStream, SWT.IMAGE_JPEG);
- }
- meter.stop();
-
- disposeMeter(meter);
- } finally {
- try {
- outStream.close();
- } catch (IOException e1) {
- e1.printStackTrace();
- }
- }
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_graphics_ImageLoader((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_Constructor");
- methodNames.addElement("test_addImageLoaderListenerLorg_eclipse_swt_graphics_ImageLoaderListener");
- methodNames.addElement("test_hasListeners");
- methodNames.addElement("test_loadLjava_io_InputStream");
- methodNames.addElement("test_loadLjava_lang_String");
- methodNames.addElement("test_notifyListenersLorg_eclipse_swt_graphics_ImageLoaderEvent");
- methodNames.addElement("test_removeImageLoaderListenerLorg_eclipse_swt_graphics_ImageLoaderListener");
- methodNames.addElement("test_saveLjava_io_OutputStreamI");
- methodNames.addElement("test_saveLjava_lang_StringI");
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_Constructor")) test_Constructor();
- else if (getName().equals("test_addImageLoaderListenerLorg_eclipse_swt_graphics_ImageLoaderListener")) test_addImageLoaderListenerLorg_eclipse_swt_graphics_ImageLoaderListener();
- else if (getName().equals("test_hasListeners")) test_hasListeners();
- else if (getName().equals("test_loadLjava_io_InputStream")) test_loadLjava_io_InputStream();
- else if (getName().equals("test_loadLjava_lang_String")) test_loadLjava_lang_String();
- else if (getName().equals("test_notifyListenersLorg_eclipse_swt_graphics_ImageLoaderEvent")) test_notifyListenersLorg_eclipse_swt_graphics_ImageLoaderEvent();
- else if (getName().equals("test_removeImageLoaderListenerLorg_eclipse_swt_graphics_ImageLoaderListener")) test_removeImageLoaderListenerLorg_eclipse_swt_graphics_ImageLoaderListener();
- else if (getName().equals("test_saveLjava_io_OutputStreamI")) test_saveLjava_io_OutputStreamI();
- else if (getName().equals("test_saveLjava_lang_StringI")) test_saveLjava_lang_StringI();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/Test_org_eclipse_swt_graphics_ImageLoaderEvent.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/Test_org_eclipse_swt_graphics_ImageLoaderEvent.java
deleted file mode 100644
index 2d559555eb..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/Test_org_eclipse_swt_graphics_ImageLoaderEvent.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit.performance;
-
-
-import junit.framework.*;
-import junit.textui.*;
-
-import org.eclipse.swt.graphics.*;
-import org.eclipse.test.performance.PerformanceMeter;
-
-/**
- * Automated Performance Test Suite for class org.eclipse.swt.graphics.ImageLoaderEvent
- *
- * @see org.eclipse.swt.graphics.ImageLoaderEvent
- */
-public class Test_org_eclipse_swt_graphics_ImageLoaderEvent extends SwtPerformanceTestCase {
- static final int COUNT = 1000;
-
-public Test_org_eclipse_swt_graphics_ImageLoaderEvent(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-public void test_ConstructorLorg_eclipse_swt_graphics_ImageLoaderLorg_eclipse_swt_graphics_ImageDataIZ() {
- ImageLoader loader = new ImageLoader();
-
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- new ImageLoaderEvent(loader, null, 0, true);
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_graphics_ImageLoaderEvent((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_graphics_ImageLoaderLorg_eclipse_swt_graphics_ImageDataIZ");
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorLorg_eclipse_swt_graphics_ImageLoaderLorg_eclipse_swt_graphics_ImageDataIZ")) test_ConstructorLorg_eclipse_swt_graphics_ImageLoaderLorg_eclipse_swt_graphics_ImageDataIZ();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/Test_org_eclipse_swt_graphics_PaletteData.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/Test_org_eclipse_swt_graphics_PaletteData.java
deleted file mode 100644
index fb52e3cc29..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/Test_org_eclipse_swt_graphics_PaletteData.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit.performance;
-
-
-import org.eclipse.swt.graphics.*;
-import org.eclipse.test.performance.PerformanceMeter;
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Performance Test Suite for class org.eclipse.swt.graphics.PaletteData
- *
- * @see org.eclipse.swt.graphics.PaletteData
- */
-public class Test_org_eclipse_swt_graphics_PaletteData extends SwtPerformanceTestCase {
- static final int COUNT = 1000;
-
-public Test_org_eclipse_swt_graphics_PaletteData(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-public void test_Constructor$Lorg_eclipse_swt_graphics_RGB() {
- RGB[] rgb = new RGB[] {new RGB(0, 0, 0), new RGB(255, 255, 255)};
-
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- new PaletteData(rgb);
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_ConstructorIII() {
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- new PaletteData(0xff0000, 0x00ff00, 0x0000ff);
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_getPixelLorg_eclipse_swt_graphics_RGB() {
- RGB rgb = new RGB(0x32, 0x64, 0x96);
- PaletteData data = new PaletteData(0xff0000, 0x00ff00, 0x0000ff);
-
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- data.getPixel(rgb);
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_getRGBI() {
- RGB rgb = new RGB(0x32, 0x64, 0x96);
- PaletteData data = new PaletteData(0xff0000, 0x00ff00, 0x0000ff);
-
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- data.getRGB(0x326496);
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_getRGBs() {
- RGB rgb = new RGB(0x32, 0x64, 0x96);
- PaletteData data = new PaletteData(0xff0000, 0x00ff00, 0x0000ff);
-
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- data.getRGBs();
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_graphics_PaletteData((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_Constructor$Lorg_eclipse_swt_graphics_RGB");
- methodNames.addElement("test_ConstructorIII");
- methodNames.addElement("test_getPixelLorg_eclipse_swt_graphics_RGB");
- methodNames.addElement("test_getRGBI");
- methodNames.addElement("test_getRGBs");
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_Constructor$Lorg_eclipse_swt_graphics_RGB")) test_Constructor$Lorg_eclipse_swt_graphics_RGB();
- else if (getName().equals("test_ConstructorIII")) test_ConstructorIII();
- else if (getName().equals("test_getPixelLorg_eclipse_swt_graphics_RGB")) test_getPixelLorg_eclipse_swt_graphics_RGB();
- else if (getName().equals("test_getRGBI")) test_getRGBI();
- else if (getName().equals("test_getRGBs")) test_getRGBs();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/Test_org_eclipse_swt_graphics_Point.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/Test_org_eclipse_swt_graphics_Point.java
deleted file mode 100644
index 5554ed5686..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/Test_org_eclipse_swt_graphics_Point.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit.performance;
-
-
-import org.eclipse.swt.graphics.*;
-import org.eclipse.test.performance.PerformanceMeter;
-
-import junit.framework.*;
-import junit.textui.*;
-
-/**
- * Automated Performance Test Suite for class org.eclipse.swt.graphics.Point
- *
- * @see org.eclipse.swt.graphics.Point
- */
-public class Test_org_eclipse_swt_graphics_Point extends SwtPerformanceTestCase {
- static final int COUNT = 10000;
-
-public Test_org_eclipse_swt_graphics_Point(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-public void test_ConstructorII() {
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- new Point(500000, 700000);
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_equalsLjava_lang_Object() {
- Point p1 = new Point (5, 3);
- Point p2 = new Point (5, 3);
- Point p3 = new Point (4, 6);
-
- PerformanceMeter meter = createMeter("equal");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- p1.equals(p2); // equal
- }
- meter.stop();
-
- disposeMeter(meter);
-
- meter = createMeter("not equal");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- p1.equals(p3); // not equal
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_hashCode() {
- Point point = new Point(5, 5);
-
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- point.hashCode();
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_graphics_Point((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorII");
- methodNames.addElement("test_equalsLjava_lang_Object");
- methodNames.addElement("test_hashCode");
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorII")) test_ConstructorII();
- else if (getName().equals("test_equalsLjava_lang_Object")) test_equalsLjava_lang_Object();
- else if (getName().equals("test_hashCode")) test_hashCode();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/Test_org_eclipse_swt_graphics_RGB.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/Test_org_eclipse_swt_graphics_RGB.java
deleted file mode 100644
index fea7cc211d..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/Test_org_eclipse_swt_graphics_RGB.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit.performance;
-
-import junit.framework.*;
-import junit.textui.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.test.performance.PerformanceMeter;
-
-/**
- * Automated Performance Test Suite for class org.eclipse.swt.graphics.RGB
- *
- * @see org.eclipse.swt.graphics.RGB
- */
-public class Test_org_eclipse_swt_graphics_RGB extends SwtPerformanceTestCase {
- static final int COUNT = 10000;
-
-public Test_org_eclipse_swt_graphics_RGB(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-public void test_ConstructorIII() {
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- new RGB(50,150,250);
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_equalsLjava_lang_Object() {
- RGB rgb1 = new RGB (0, 128, 255);
- RGB rgb2 = new RGB (0, 128, 255);
-
- PerformanceMeter meter = createMeter("equal");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- rgb1.equals(rgb2); // same
- }
- meter.stop();
-
- disposeMeter(meter);
-
- rgb2 = new RGB (128, 255, 0);
-
- meter = createMeter("not equal");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- rgb1.equals(rgb2); // different
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_hashCode() {
- RGB rgb = new RGB (0, 128, 255);
-
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- rgb.hashCode();
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_graphics_RGB((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorIII");
- methodNames.addElement("test_equalsLjava_lang_Object");
- methodNames.addElement("test_hashCode");
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorIII")) test_ConstructorIII();
- else if (getName().equals("test_equalsLjava_lang_Object")) test_equalsLjava_lang_Object();
- else if (getName().equals("test_hashCode")) test_hashCode();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/Test_org_eclipse_swt_graphics_Rectangle.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/Test_org_eclipse_swt_graphics_Rectangle.java
deleted file mode 100644
index 04e8177929..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/Test_org_eclipse_swt_graphics_Rectangle.java
+++ /dev/null
@@ -1,349 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit.performance;
-
-import junit.framework.*;
-import junit.textui.*;
-
-import org.eclipse.swt.graphics.*;
-import org.eclipse.test.performance.PerformanceMeter;
-
-/**
- * Automated Performance Test Suite for class org.eclipse.swt.graphics.Rectangle
- *
- * @see org.eclipse.swt.graphics.Rectangle
- */
-public class Test_org_eclipse_swt_graphics_Rectangle extends SwtPerformanceTestCase {
- static final int COUNT = 10000;
-
-public Test_org_eclipse_swt_graphics_Rectangle(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-public void test_ConstructorIIII() {
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- new Rectangle(500000, 700000, 200000, 100000);
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-/**
- * Destructively replaces the x, y, width and height values
- * in the receiver with ones which represent the union of the
- * rectangles specified by the receiver and the given rectangle.
- *
- * @exception IllegalArgumentException <ul>
- * <li>ERROR_NULL_ARGUMENT - if the argument is null</li>
- * </ul>
- */
-public void test_addLorg_eclipse_swt_graphics_Rectangle() {
- Rectangle r1 = new Rectangle(1, 2, 3, 4);
- Rectangle r2 = new Rectangle(3, 3, 2, 2);
-
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- r1.add(r2);
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-/**
- * Returns <code>true</code> if the point specified by the
- * arguments is inside the area specified by the receiver.
- */
-public void test_containsII() {
- Rectangle r = new Rectangle(1, 2, 3, 4);
-
- PerformanceMeter meter = createMeter("contains");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- r.contains(2, 3); // does contain
- }
- meter.stop();
-
- disposeMeter(meter);
-
- meter = createMeter("disjoint");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- r.contains(9, 12); // does not contain
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-/**
- * Returns <code>true</code> if the given point is inside the
- * area specified by the receiver.
- *
- * @exception IllegalArgumentException <ul>
- * <li>ERROR_NULL_ARGUMENT - if the argument is null</li>
- * </ul>
- */
-public void test_containsLorg_eclipse_swt_graphics_Point() {
- Rectangle rect = new Rectangle(1, 2, 3, 4);
- Point p1 = new Point(2, 3);
- Point p2 = new Point(9, 10);
-
- PerformanceMeter meter = createMeter("contains");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- rect.contains(p1); // does contain
- }
- meter.stop();
-
- disposeMeter(meter);
-
- meter = createMeter("disjoint");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- rect.contains(p2); // does not contain
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_equalsLjava_lang_Object() {
- Rectangle r1 = new Rectangle(5, 4, 3, 2);
- Rectangle r2 = new Rectangle(5, 4, 3, 2);
-
- PerformanceMeter meter = createMeter("equal");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- r1.equals(r2); // equal
- }
- meter.stop();
-
- disposeMeter(meter);
-
- r2 = new Rectangle (2, 3, 4, 5);
-
- meter = createMeter("not equal");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- r1.equals(r2); // not equal
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_hashCode() {
- Rectangle rect = new Rectangle(5, 4, 3, 2);
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- rect.hashCode();
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_intersectLorg_eclipse_swt_graphics_Rectangle() {
- Rectangle r1 = new Rectangle(10, 10, 50, 50);
- Rectangle r2 = new Rectangle(20, 20, 20, 20);
-
- PerformanceMeter meter = createMeter("intersect");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- r1.intersect(r2); // intersect
- }
- meter.stop();
-
- disposeMeter(meter);
-
- r2 = new Rectangle(0, 0, 5, 5);
-
- meter = createMeter("disjoint");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- r1.intersect(r2); // disjoint
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_intersectionLorg_eclipse_swt_graphics_Rectangle() {
- Rectangle r1 = new Rectangle(10, 10, 50, 50);
- Rectangle r2 = new Rectangle(20, 20, 20, 20);
-
- PerformanceMeter meter = createMeter("intersect");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- r1.intersection(r2); // intersect
- }
- meter.stop();
-
- disposeMeter(meter);
-
- r2 = new Rectangle(0, 0, 5, 5);
-
- meter = createMeter("disjoint");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- r1.intersection(r2); // disjoint
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_intersectsIIII() {
- Rectangle rect = new Rectangle(10, 10, 50, 50);
-
- PerformanceMeter meter = createMeter("intersect");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- rect.intersects(20, 20, 20, 20); // intersect
- }
- meter.stop();
-
- disposeMeter(meter);
-
- meter = createMeter("disjoint");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- rect.intersects(0, 0, 5, 5); // disjoint
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_intersectsLorg_eclipse_swt_graphics_Rectangle() {
- Rectangle r1 = new Rectangle(10, 10, 50, 50);
- Rectangle r2 = new Rectangle(20, 20, 20, 20);
-
- PerformanceMeter meter = createMeter("intersect");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- r1.intersects(r2); // intersect
- }
- meter.stop();
-
- disposeMeter(meter);
-
- r2 = new Rectangle(0, 0, 5, 5);
-
- meter = createMeter("disjoint");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- r1.intersects(r2); // disjoint
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_isEmpty() {
- Rectangle rect = new Rectangle (10, 10, 0, 0);
-
- PerformanceMeter meter = createMeter("empty");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- rect.isEmpty(); // empty
- }
- meter.stop();
-
- disposeMeter(meter);
-
- rect = new Rectangle (10, 10, 10, 10);
-
- meter = createMeter("not empty");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- rect.isEmpty(); // not empty
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_unionLorg_eclipse_swt_graphics_Rectangle() {
- Rectangle r1 = new Rectangle(10, 10, 50, 50);
- Rectangle r2 = new Rectangle(20, 20, 20, 20);
-
- PerformanceMeter meter = createMeter("intersect");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- r1.union(r2);
- }
- meter.stop();
-
- disposeMeter(meter);
-
- r2 = new Rectangle(0, 0, 5, 5);
-
- meter = createMeter("disjoint");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- r1.union(r2); // disjoint
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_graphics_Rectangle((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_ConstructorIIII");
- methodNames.addElement("test_addLorg_eclipse_swt_graphics_Rectangle");
- methodNames.addElement("test_containsII");
- methodNames.addElement("test_containsLorg_eclipse_swt_graphics_Point");
- methodNames.addElement("test_equalsLjava_lang_Object");
- methodNames.addElement("test_hashCode");
- methodNames.addElement("test_intersectLorg_eclipse_swt_graphics_Rectangle");
- methodNames.addElement("test_intersectionLorg_eclipse_swt_graphics_Rectangle");
- methodNames.addElement("test_intersectsIIII");
- methodNames.addElement("test_intersectsLorg_eclipse_swt_graphics_Rectangle");
- methodNames.addElement("test_isEmpty");
- methodNames.addElement("test_unionLorg_eclipse_swt_graphics_Rectangle");
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_ConstructorIIII")) test_ConstructorIIII();
- else if (getName().equals("test_addLorg_eclipse_swt_graphics_Rectangle")) test_addLorg_eclipse_swt_graphics_Rectangle();
- else if (getName().equals("test_containsII")) test_containsII();
- else if (getName().equals("test_containsLorg_eclipse_swt_graphics_Point")) test_containsLorg_eclipse_swt_graphics_Point();
- else if (getName().equals("test_equalsLjava_lang_Object")) test_equalsLjava_lang_Object();
- else if (getName().equals("test_hashCode")) test_hashCode();
- else if (getName().equals("test_intersectLorg_eclipse_swt_graphics_Rectangle")) test_intersectLorg_eclipse_swt_graphics_Rectangle();
- else if (getName().equals("test_intersectionLorg_eclipse_swt_graphics_Rectangle")) test_intersectionLorg_eclipse_swt_graphics_Rectangle();
- else if (getName().equals("test_intersectsIIII")) test_intersectsIIII();
- else if (getName().equals("test_intersectsLorg_eclipse_swt_graphics_Rectangle")) test_intersectsLorg_eclipse_swt_graphics_Rectangle();
- else if (getName().equals("test_isEmpty")) test_isEmpty();
- else if (getName().equals("test_unionLorg_eclipse_swt_graphics_Rectangle")) test_unionLorg_eclipse_swt_graphics_Rectangle();
-}
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/Test_org_eclipse_swt_graphics_Region.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/Test_org_eclipse_swt_graphics_Region.java
deleted file mode 100644
index aec66577a8..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/Test_org_eclipse_swt_graphics_Region.java
+++ /dev/null
@@ -1,602 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.tests.junit.performance;
-
-import junit.framework.*;
-import junit.textui.*;
-
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.test.performance.PerformanceMeter;
-
-/**
- * Automated Performance Test Suite for class org.eclipse.swt.graphics.Region
- *
- * @see org.eclipse.swt.graphics.Region
- */
-public class Test_org_eclipse_swt_graphics_Region extends SwtPerformanceTestCase {
- static final int COUNT = 1000;
-
-public Test_org_eclipse_swt_graphics_Region(String name) {
- super(name);
-}
-
-public static void main(String[] args) {
- TestRunner.run(suite());
-}
-
-protected void setUp() throws Exception {
- super.setUp();
- display = Display.getDefault();
-}
-
-public void test_Constructor() {
- Region[] regions = new Region [COUNT];
-
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- regions[i] = new Region ();
- }
- meter.stop();
-
- for (int i = 0; i < COUNT; i++) {
- regions[i].dispose();
- }
-
- disposeMeter(meter);
-}
-
-public void test_ConstructorLorg_eclipse_swt_graphics_Device() {
- Region[] regions = new Region [COUNT];
-
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- regions[i] = new Region (display);
- }
- meter.stop();
-
- for (int i = 0; i < COUNT; i++) {
- regions[i].dispose();
- }
-
- disposeMeter(meter);
-}
-
-public void test_add$I() {
- Region region = new Region(display);
- int[][] toAdd = new int[COUNT][];
- for (int i = 0; i < COUNT; i++) {
- toAdd[i] = new int[] {i,i, i,i, i+1,i+1, i+1,i+1};
- }
-
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- region.add(toAdd[i]);
- }
- meter.stop();
-
- region.dispose();
-
- disposeMeter(meter);
-}
-
-public void test_addLorg_eclipse_swt_graphics_Rectangle() {
- Region region = new Region(display);
- Rectangle[] toAdd = new Rectangle[COUNT];
- for (int i = 0; i < COUNT; i++) {
- toAdd[i] = new Rectangle (i, i, i+1, i+1);
- }
-
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- region.add(toAdd[i]);
- }
- meter.stop();
-
- region.dispose();
-
- disposeMeter(meter);
-}
-
-public void test_addLorg_eclipse_swt_graphics_Region() {
- Region region = new Region(display);
- Region[] regions = new Region[COUNT];
- for (int i = 0; i < COUNT; i++) {
- Region newRegion = new Region (display);
- newRegion.add(new Rectangle (i, i, i+1, i+1));
- regions[i] = newRegion;
- }
-
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- region.add(regions[i]);
- }
- meter.stop();
-
- region.dispose();
- for (int i = 0; i < COUNT; i++) {
- regions[i].dispose();
- }
-
- disposeMeter(meter);
-}
-
-public void test_containsII() {
- Region region = new Region (display);
- region.add(new Rectangle (30,30,30,30));
-
- PerformanceMeter meter = createMeter("contained");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- region.contains(50, 50); // contained
- }
- meter.stop();
-
- region.dispose();
-
- disposeMeter(meter);
-
- region = new Region (display);
- region.add(new Rectangle (30,30,30,30));
-
- meter = createMeter("disjoint");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- region.contains(20, 20); // not contained
- }
- meter.stop();
-
- region.dispose();
-
- disposeMeter(meter);
-}
-
-public void test_containsLorg_eclipse_swt_graphics_Point() {
- Region region = new Region (display);
- Point point = new Point (20,20);
- region.add(new Rectangle (30,30,30,30));
-
- PerformanceMeter meter = createMeter("contained");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- region.contains(point); // contained
- }
- meter.stop();
-
- region.dispose();
-
- disposeMeter(meter);
-
- region = new Region (display);
- region.add(new Rectangle (30,30,30,30));
-
- meter = createMeter("disjoint");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- region.contains(point); // not contained
- }
- meter.stop();
-
- region.dispose();
-
- disposeMeter(meter);
-}
-
-public void test_dispose() {
- Region[] regions = new Region [COUNT];
- for (int i = 0; i < COUNT; i++) {
- regions[i] = new Region(display);
- regions[i].add(new Rectangle(i, i, i+5, i+5));
- }
-
- PerformanceMeter meter = createMeter("not disposed");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- regions[i].dispose(); // dispose
- }
- meter.stop();
-
- disposeMeter(meter);
-
- meter = createMeter("disposed");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- regions[i].dispose(); // dispose disposed
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_equalsLjava_lang_Object() {
- // Currently, Regions are only "equal" if they have the same handle.
- // This is so that identical objects are properly hashed.
- // We are considering adding a new method that will compare Regions for the same area.
-
- Rectangle rect = new Rectangle(25, 100, 200, 780);
- Region region1 = new Region(display);
- region1.add(rect);
-
- PerformanceMeter meter = createMeter("equal");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- region1.equals(region1); // identical
- }
- meter.stop();
-
- region1.dispose();
-
- disposeMeter(meter);
-
- region1 = new Region(display);
- region1.add(rect);
- Region region2 = new Region(display);
- region2.add(rect);
-
- meter = createMeter("not equal");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- region1.equals(region2); // unique
- }
- meter.stop();
-
- region1.dispose();
- region2.dispose();
-
- disposeMeter(meter);
-}
-
-public void test_getBounds() {
- Region region = new Region(display);
- region.add(new Rectangle(10,10,20,20));
-
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- region.getBounds();
- }
- meter.stop();
-
- region.dispose();
-
- disposeMeter(meter);
-}
-
-public void test_hashCode() {
- Region region = new Region(display);
- region.add(new Rectangle(10,10,20,20));
-
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- region.hashCode();
- }
- meter.stop();
-
- region.dispose();
-
- disposeMeter(meter);
-}
-
-public void test_intersectLorg_eclipse_swt_graphics_Rectangle() {
- Region region = new Region(display);
- region.add(new Rectangle(10,10,20,20));
- Rectangle rect = new Rectangle(0,0,5,5);
-
- PerformanceMeter meter = createMeter("disjoint");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- region.intersect(rect); // disjoint
- }
- meter.stop();
-
- region.dispose();
-
- disposeMeter(meter);
-
- region = new Region(display);
- region.add(new Rectangle(10,10,20,20));
- rect = new Rectangle(20,20,5,5);
-
- meter = createMeter("intersect");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- region.intersect(rect); // intersects
- }
- meter.stop();
-
- region.dispose();
-
- disposeMeter(meter);
-}
-
-public void test_intersectLorg_eclipse_swt_graphics_Region() {
- Region region1 = new Region(display);
- region1.add(new Rectangle(10,10,20,20));
- Region region2 = new Region(display);
- region2.add(new Rectangle(0,0,5,5));
-
- PerformanceMeter meter = createMeter("disjoint");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- region1.intersect(region2); // disjoint
- }
- meter.stop();
-
- region1.dispose();
- region2.dispose();
-
- disposeMeter(meter);
-
- region1 = new Region(display);
- region1.add(new Rectangle(10,10,20,20));
- region2 = new Region(display);
- region2.add(new Rectangle(20,20,5,5));
-
- meter = createMeter("intersect");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- region1.intersect(region2); // intersects
- }
- meter.stop();
-
- region1.dispose();
-
- disposeMeter(meter);
-}
-
-public void test_intersectsIIII() {
- Region region = new Region(display);
- region.add(new Rectangle(10,10,20,20));
-
- PerformanceMeter meter = createMeter("disjoint");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- region.intersects(0,0,5,5); // disjoint
- }
- meter.stop();
-
- region.dispose();
-
- disposeMeter(meter);
-
- region = new Region(display);
- region.add(new Rectangle(10,10,20,20));
-
- meter = createMeter("intersect");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- region.intersects(20,20,5,5); // intersects
- }
- meter.stop();
-
- region.dispose();
-
- disposeMeter(meter);
-}
-
-public void test_intersectsLorg_eclipse_swt_graphics_Rectangle() {
- Region region = new Region(display);
- region.add(new Rectangle(10,10,20,20));
- Rectangle rect = new Rectangle (0,0,5,5);
-
- PerformanceMeter meter = createMeter("disjoint");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- region.intersects(rect); // disjoint
- }
- meter.stop();
-
- region.dispose();
-
- disposeMeter(meter);
-
- region = new Region(display);
- region.add(new Rectangle(10,10,20,20));
- rect = new Rectangle (20,20,5,5);
-
- meter = createMeter("intersect");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- region.intersects(rect); // intersects
- }
- meter.stop();
-
- region.dispose();
-
- disposeMeter(meter);
-}
-
-public void test_isDisposed() {
- Region region = new Region(display);
- region.add(new Rectangle(10,10,10,10));
-
- PerformanceMeter meter = createMeter("not disposed");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- region.isDisposed(); // not disposed
- }
- meter.stop();
-
- region.dispose();
-
- disposeMeter(meter);
-
- meter = createMeter("disposed");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- region.isDisposed(); // disposed
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_isEmpty() {
- Region region = new Region (display);
-
- PerformanceMeter meter = createMeter("empty");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- region.isEmpty(); // empty
- }
- meter.stop();
-
- disposeMeter(meter);
-
- region.dispose();
- region = new Region (display);
- region.add(new Rectangle(10,10,10,10));
-
- meter = createMeter("not empty");
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- region.isEmpty(); // not empty
- }
- meter.stop();
-
- disposeMeter(meter);
-}
-
-public void test_subtract$I() {
- Region region = new Region(display);
- region.add(new Rectangle(0,0,COUNT * 2, COUNT * 2));
- int[][] toSubtract = new int[COUNT][];
- for (int i = 0; i < COUNT; i++) {
- toSubtract[i] = new int[] {i,i, i,i, i+1,i+1, i+1,i+1};
- }
-
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- region.subtract(toSubtract[i]);
- }
- meter.stop();
-
- region.dispose();
-
- disposeMeter(meter);
-}
-
-public void test_subtractLorg_eclipse_swt_graphics_Rectangle() {
- Region region = new Region(display);
- region.add(new Rectangle(0,0,COUNT * 2, COUNT * 2));
- Rectangle[] toSubtract = new Rectangle[COUNT];
- for (int i = 0; i < COUNT; i++) {
- toSubtract[i] = new Rectangle (i, i, i+1, i+1);
- }
-
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- region.subtract(toSubtract[i]);
- }
- meter.stop();
-
- region.dispose();
-
- disposeMeter(meter);
-}
-
-public void test_subtractLorg_eclipse_swt_graphics_Region() {
- Region region = new Region(display);
- region.add(new Rectangle(0, 0, COUNT*2, COUNT*2));
- Region[] regions = new Region[COUNT];
- for (int i = 0; i < COUNT; i++) {
- Region newRegion = new Region (display);
- newRegion.add(new Rectangle (i, i, i+1, i+1));
- regions[i] = newRegion;
- }
-
- PerformanceMeter meter = createMeter();
- meter.start();
- for (int i = 0; i < COUNT; i++) {
- region.subtract(regions[i]);
- }
- meter.stop();
-
- region.dispose();
- for (int i = 0; i < COUNT; i++) {
- regions[i].dispose();
- }
-
- disposeMeter(meter);
-}
-
-public void test_win32_newLorg_eclipse_swt_graphics_DeviceI() {
-}
-
-public static Test suite() {
- TestSuite suite = new TestSuite();
- java.util.Vector methodNames = methodNames();
- java.util.Enumeration e = methodNames.elements();
- while (e.hasMoreElements()) {
- suite.addTest(new Test_org_eclipse_swt_graphics_Region((String)e.nextElement()));
- }
- return suite;
-}
-public static java.util.Vector methodNames() {
- java.util.Vector methodNames = new java.util.Vector();
- methodNames.addElement("test_Constructor");
- methodNames.addElement("test_ConstructorLorg_eclipse_swt_graphics_Device");
- methodNames.addElement("test_add$I");
- methodNames.addElement("test_addLorg_eclipse_swt_graphics_Rectangle");
- methodNames.addElement("test_addLorg_eclipse_swt_graphics_Region");
- methodNames.addElement("test_containsII");
- methodNames.addElement("test_containsLorg_eclipse_swt_graphics_Point");
- methodNames.addElement("test_dispose");
- methodNames.addElement("test_equalsLjava_lang_Object");
- methodNames.addElement("test_getBounds");
- methodNames.addElement("test_hashCode");
- methodNames.addElement("test_intersectLorg_eclipse_swt_graphics_Rectangle");
- methodNames.addElement("test_intersectLorg_eclipse_swt_graphics_Region");
- methodNames.addElement("test_intersectsIIII");
- methodNames.addElement("test_intersectsLorg_eclipse_swt_graphics_Rectangle");
- methodNames.addElement("test_isDisposed");
- methodNames.addElement("test_isEmpty");
- methodNames.addElement("test_subtract$I");
- methodNames.addElement("test_subtractLorg_eclipse_swt_graphics_Rectangle");
- methodNames.addElement("test_subtractLorg_eclipse_swt_graphics_Region");
- methodNames.addElement("test_win32_newLorg_eclipse_swt_graphics_DeviceI");
- return methodNames;
-}
-protected void runTest() throws Throwable {
- if (getName().equals("test_Constructor")) test_Constructor();
- else if (getName().equals("test_ConstructorLorg_eclipse_swt_graphics_Device")) test_ConstructorLorg_eclipse_swt_graphics_Device();
- else if (getName().equals("test_add$I")) test_add$I();
- else if (getName().equals("test_addLorg_eclipse_swt_graphics_Rectangle")) test_addLorg_eclipse_swt_graphics_Rectangle();
- else if (getName().equals("test_addLorg_eclipse_swt_graphics_Region")) test_addLorg_eclipse_swt_graphics_Region();
- else if (getName().equals("test_containsII")) test_containsII();
- else if (getName().equals("test_containsLorg_eclipse_swt_graphics_Point")) test_containsLorg_eclipse_swt_graphics_Point();
- else if (getName().equals("test_dispose")) test_dispose();
- else if (getName().equals("test_equalsLjava_lang_Object")) test_equalsLjava_lang_Object();
- else if (getName().equals("test_getBounds")) test_getBounds();
- else if (getName().equals("test_hashCode")) test_hashCode();
- else if (getName().equals("test_intersectLorg_eclipse_swt_graphics_Rectangle")) test_intersectLorg_eclipse_swt_graphics_Rectangle();
- else if (getName().equals("test_intersectLorg_eclipse_swt_graphics_Region")) test_intersectLorg_eclipse_swt_graphics_Region();
- else if (getName().equals("test_intersectsIIII")) test_intersectsIIII();
- else if (getName().equals("test_intersectsLorg_eclipse_swt_graphics_Rectangle")) test_intersectsLorg_eclipse_swt_graphics_Rectangle();
- else if (getName().equals("test_isDisposed")) test_isDisposed();
- else if (getName().equals("test_isEmpty")) test_isEmpty();
- else if (getName().equals("test_subtract$I")) test_subtract$I();
- else if (getName().equals("test_subtractLorg_eclipse_swt_graphics_Rectangle")) test_subtractLorg_eclipse_swt_graphics_Rectangle();
- else if (getName().equals("test_subtractLorg_eclipse_swt_graphics_Region")) test_subtractLorg_eclipse_swt_graphics_Region();
- else if (getName().equals("test_win32_newLorg_eclipse_swt_graphics_DeviceI")) test_win32_newLorg_eclipse_swt_graphics_DeviceI();
-}
-
-/* custom */
- Display display;
-}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/target.bmp b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/target.bmp
deleted file mode 100644
index ec7d509e74..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/target.bmp
+++ /dev/null
Binary files differ
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/target.gif b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/target.gif
deleted file mode 100644
index 4ee8b5a4a6..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/target.gif
+++ /dev/null
Binary files differ
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/target.jpg b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/target.jpg
deleted file mode 100644
index 173ea1bf55..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/target.jpg
+++ /dev/null
Binary files differ
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/target.png b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/target.png
deleted file mode 100644
index bb5d7eb843..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/target.png
+++ /dev/null
Binary files differ
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/transparent.png b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/transparent.png
deleted file mode 100644
index 0625f14923..0000000000
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/transparent.png
+++ /dev/null
Binary files differ
diff --git a/tests/org.eclipse.swt.tests/about.html b/tests/org.eclipse.swt.tests/about.html
deleted file mode 100644
index 9db411aab9..0000000000
--- a/tests/org.eclipse.swt.tests/about.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<title>About</title>
-<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>20th June, 2002</p>
-<h3>License</h3>
-<p>Eclipse.org makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise indicated below, the Content is provided to you under the terms and conditions of the
-Common Public License Version 1.0 (&quot;CPL&quot;). A copy of the CPL is available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>.
-For purposes of the CPL, &quot;Program&quot; will mean the Content.</p>
-
-<h3>Contributions</h3>
-
-<p>If this Content is licensed to you under the terms and conditions of the CPL, any Contributions, as defined in the CPL, uploaded, submitted, or otherwise
-made available to Eclipse.org, members of Eclipse.org and/or the host of Eclipse.org web site, by you that relate to such
-Content are provided under the terms and conditions of the CPL and can be made available to others under the terms of the CPL.</p>
-
-<p>If this Content is licensed to you under license terms and conditions other than the CPL (&quot;Other License&quot;), any modifications, enhancements and/or
-other code and/or documentation (&quot;Modifications&quot;) uploaded, submitted, or otherwise made available to Eclipse.org, members of Eclipse.org and/or the
-host of Eclipse.org, by you that relate to such Content are provided under terms and conditions of the Other License and can be made available
-to others under the terms of the Other License. In addition, with regard to Modifications for which you are the copyright holder, you are also
-providing the Modifications under the terms and conditions of the CPL and such Modifications can be made available to others under the terms of
-the CPL.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/tests/org.eclipse.swt.tests/build.properties b/tests/org.eclipse.swt.tests/build.properties
deleted file mode 100644
index 3ea73a8282..0000000000
--- a/tests/org.eclipse.swt.tests/build.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2003 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Common Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/cpl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-source.swttests.jar=JUnit Tests/
-
-bin.includes=*.jar,plugin.xml,test.xml,about.html,plugin.properties,data/ \ No newline at end of file
diff --git a/tests/org.eclipse.swt.tests/data/browser3.html b/tests/org.eclipse.swt.tests/data/browser3.html
deleted file mode 100644
index 01ea43ea8a..0000000000
--- a/tests/org.eclipse.swt.tests/data/browser3.html
+++ /dev/null
@@ -1,6 +0,0 @@
-<html>
-<script type="text/javascript">window.open("http://www.eclipse.org", "Dialog")</script>
-<body>
-This test uses javascript to open a new window.
-</body>
-</html>
diff --git a/tests/org.eclipse.swt.tests/data/browser4.html b/tests/org.eclipse.swt.tests/data/browser4.html
deleted file mode 100644
index 77e4bf506a..0000000000
--- a/tests/org.eclipse.swt.tests/data/browser4.html
+++ /dev/null
@@ -1,10 +0,0 @@
-<html>
-<script type="text/javascript">
- w = window.open("browser4a.html", "Dialog");
- setTimeout("w.close()", 5000);
-</script>
-<body>
-<p>This test uses javascript.
-<p>It opens a new window. Sets a timer. Then close the new window when the timer expires.
-</body>
-</html>
diff --git a/tests/org.eclipse.swt.tests/data/browser4a.html b/tests/org.eclipse.swt.tests/data/browser4a.html
deleted file mode 100644
index 7e3585827c..0000000000
--- a/tests/org.eclipse.swt.tests/data/browser4a.html
+++ /dev/null
@@ -1,14 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
- <meta http-equiv="content-type"
- content="text/html; charset=ISO-8859-1">
- <title>simple page</title>
-</head>
-<body style="background-color: rgb(255, 204, 0); color: rgb(0, 0, 0);"
- link="#0000ee" alink="#0000ee" vlink="#551a8b">
-<div style="text-align: center;"><big><big><big><big><big><big><span
- style="font-weight: bold;">This is a simple page</span></big></big></big></big></big></big><br>
-</div>
-</body>
-</html>
diff --git a/tests/org.eclipse.swt.tests/data/browser5.html b/tests/org.eclipse.swt.tests/data/browser5.html
deleted file mode 100644
index dc5bfce7fd..0000000000
--- a/tests/org.eclipse.swt.tests/data/browser5.html
+++ /dev/null
@@ -1,48 +0,0 @@
-<html>
-<script type="text/javascript">
- var win;
- function testOpen() {
- win = window.open('javascript:"<h1>Simple New Window</h2>"', "", "left=10,top=200,height=100,width=300");
- }
- function testResizeTo() {
- win.resizeTo(600,800);
- }
- function testMoveTo() {
- win.moveTo(200,100);
- }
- function testMoveBy() {
- win.moveBy(2,2);
- }
- function testScrollBy() {
- win.scrollBy(1,20);
- }
- function testResizeBy() {
- win.resizeBy(2,3);
- }
- function testClose() {
- win.close();
- }
-
- win1 = window.open('javascript:"<h1>Simple New Window 1</h2><p>bounds: left=10,top=200,height=100,width=300<p>"', "", "left=10,top=200,height=100,width=300");
- win2 = window.open('javascript:"<h1>Simple New Window 2</h2><p>bounds: left=10,top=200<p>"', "", "left=10,top=200");
- win3 = window.open('javascript:"<h1>Simple New Window 3</h2><p>bounds: height=100,width=300<p>"', "", "height=100,width=300");
- win4 = window.open('javascript:"<h1>Simple New Window 4</h2><p>bounds: not specified<p>"', "", "");
-
- setTimeout("win1.close();win2.close();win3.close();win4.close()", 5000);
-
-</script>
-
-<form>
- <input type="button" VALUE="window.open" onClick="testOpen()">
- <input type="button" VALUE="resizeTo" onClick="testResizeTo()">
- <input type="button" VALUE="moveTo" onClick="testMoveTo()">
- <input type="button" VALUE="moveBy" onClick="testMoveBy()">
- <input type="button" VALUE="scrollBy" onClick="testScrollBy()">
- <input type="button" VALUE="resizeBy" onClick="testResizeBy()">
- <input type="button" VALUE="close" onClick="testClose()">
-</FORM>
-<body>
-<p>This test uses javascript.
-<p>It opens a new window. Sets a timer. Then close the new window when the timer expires.
-</body>
-</html>
diff --git a/tests/org.eclipse.swt.tests/data/browser6.html b/tests/org.eclipse.swt.tests/data/browser6.html
deleted file mode 100644
index 83275034fd..0000000000
--- a/tests/org.eclipse.swt.tests/data/browser6.html
+++ /dev/null
@@ -1,6 +0,0 @@
-<html>
-<title>This is a test title that must be carefully checked when that page is loaded</title>
-<body>
-This test is used to automatically check the content of the title tag.
-</body>
-</html> \ No newline at end of file
diff --git a/tests/org.eclipse.swt.tests/data/browser7.html b/tests/org.eclipse.swt.tests/data/browser7.html
deleted file mode 100644
index c357d5363e..0000000000
--- a/tests/org.eclipse.swt.tests/data/browser7.html
+++ /dev/null
@@ -1,18 +0,0 @@
-<html>
-<script type="text/javascript">
-win1 = window.open('javascript:"<h1>TEST window.open</h2><p>left=0,top=0,height=100,width=200</p>"', "", "left=0,top=0,height=200,width=300");
-win2 = window.open('javascript:"<h1>TEST window.open</h2><p>menubar=no,status=no,location=no,toolbar=no,resizable=no,left=301,top=0,height=600,width=200</p>"', "", "menubar=no,status=no,location=no,toolbar=no,resizable=no,left=301,top=0,height=600,width=200");
-win3 = window.open('javascript:"<h1>TEST window.open</h2><p>status=no,location=no,toolbar=yes,resizable=yes,left=0,top=201,height=400,width=300</p>"', "", "status=no,location=no,toolbar=yes,resizable=yes,left=0,top=201,height=400,width=300");
-win4 = window.open('javascript:"<h1>TEST window.open</h2><p>menubar=yes,status=yes,location=no,toolbar=no,resizable=no,left=0,top=601,height=200,width=500</p>"', "", "menubar=yes,status=yes,location=no,toolbar=no,resizable=no,left=0,top=601,height=200,width=500");
-</script>
-<body>
-<p>This test uses javascript.
-<p>It opens a series of windows with different attributes.
-<p>The buttons below can be used for manually testing various types of javascript windows.
-<form>
-<input type="button" value="bring alert(message)" onClick="alert('message')">
-<input type="button" value="window.print" onClick="window.print()">
-<input type="button" value="confirm" onClick="if (confirm('Press Ok or Cancel to confirm')) {alert('You pressed OK');} else {alert('You pressed Cancel');}">
-</form>
-</body>
-</html> \ No newline at end of file
diff --git a/tests/org.eclipse.swt.tests/data/corrupt.bmp b/tests/org.eclipse.swt.tests/data/corrupt.bmp
deleted file mode 100644
index 7d1d3ab890..0000000000
--- a/tests/org.eclipse.swt.tests/data/corrupt.bmp
+++ /dev/null
Binary files differ
diff --git a/tests/org.eclipse.swt.tests/data/corrupt.gif b/tests/org.eclipse.swt.tests/data/corrupt.gif
deleted file mode 100644
index 1b4369bce5..0000000000
--- a/tests/org.eclipse.swt.tests/data/corrupt.gif
+++ /dev/null
Binary files differ
diff --git a/tests/org.eclipse.swt.tests/data/corrupt.jpg b/tests/org.eclipse.swt.tests/data/corrupt.jpg
deleted file mode 100644
index f728fba6c9..0000000000
--- a/tests/org.eclipse.swt.tests/data/corrupt.jpg
+++ /dev/null
Binary files differ
diff --git a/tests/org.eclipse.swt.tests/data/corrupt.png b/tests/org.eclipse.swt.tests/data/corrupt.png
deleted file mode 100644
index aecbc78845..0000000000
--- a/tests/org.eclipse.swt.tests/data/corrupt.png
+++ /dev/null
Binary files differ
diff --git a/tests/org.eclipse.swt.tests/data/corruptBadBitDepth.png b/tests/org.eclipse.swt.tests/data/corruptBadBitDepth.png
deleted file mode 100644
index b43cb915f8..0000000000
--- a/tests/org.eclipse.swt.tests/data/corruptBadBitDepth.png
+++ /dev/null
Binary files differ
diff --git a/tests/org.eclipse.swt.tests/data/empty.txt b/tests/org.eclipse.swt.tests/data/empty.txt
deleted file mode 100644
index e69de29bb2..0000000000
--- a/tests/org.eclipse.swt.tests/data/empty.txt
+++ /dev/null
diff --git a/tests/org.eclipse.swt.tests/data/folder.bmp b/tests/org.eclipse.swt.tests/data/folder.bmp
deleted file mode 100644
index 574351fbd4..0000000000
--- a/tests/org.eclipse.swt.tests/data/folder.bmp
+++ /dev/null
Binary files differ
diff --git a/tests/org.eclipse.swt.tests/data/folder.gif b/tests/org.eclipse.swt.tests/data/folder.gif
deleted file mode 100644
index 4e17c75cc2..0000000000
--- a/tests/org.eclipse.swt.tests/data/folder.gif
+++ /dev/null
Binary files differ
diff --git a/tests/org.eclipse.swt.tests/data/folder.jpg b/tests/org.eclipse.swt.tests/data/folder.jpg
deleted file mode 100644
index 3870170878..0000000000
--- a/tests/org.eclipse.swt.tests/data/folder.jpg
+++ /dev/null
Binary files differ
diff --git a/tests/org.eclipse.swt.tests/data/folder.png b/tests/org.eclipse.swt.tests/data/folder.png
deleted file mode 100644
index 9ef2dc09d2..0000000000
--- a/tests/org.eclipse.swt.tests/data/folder.png
+++ /dev/null
Binary files differ
diff --git a/tests/org.eclipse.swt.tests/data/folderOpen.bmp b/tests/org.eclipse.swt.tests/data/folderOpen.bmp
deleted file mode 100644
index 6ba1214663..0000000000
--- a/tests/org.eclipse.swt.tests/data/folderOpen.bmp
+++ /dev/null
Binary files differ
diff --git a/tests/org.eclipse.swt.tests/data/folderOpen.gif b/tests/org.eclipse.swt.tests/data/folderOpen.gif
deleted file mode 100644
index 64886bbbfd..0000000000
--- a/tests/org.eclipse.swt.tests/data/folderOpen.gif
+++ /dev/null
Binary files differ
diff --git a/tests/org.eclipse.swt.tests/data/folderOpen.jpg b/tests/org.eclipse.swt.tests/data/folderOpen.jpg
deleted file mode 100644
index faf88826b1..0000000000
--- a/tests/org.eclipse.swt.tests/data/folderOpen.jpg
+++ /dev/null
Binary files differ
diff --git a/tests/org.eclipse.swt.tests/data/folderOpen.png b/tests/org.eclipse.swt.tests/data/folderOpen.png
deleted file mode 100644
index 9b36d62b38..0000000000
--- a/tests/org.eclipse.swt.tests/data/folderOpen.png
+++ /dev/null
Binary files differ
diff --git a/tests/org.eclipse.swt.tests/data/target.bmp b/tests/org.eclipse.swt.tests/data/target.bmp
deleted file mode 100644
index ec7d509e74..0000000000
--- a/tests/org.eclipse.swt.tests/data/target.bmp
+++ /dev/null
Binary files differ
diff --git a/tests/org.eclipse.swt.tests/data/target.gif b/tests/org.eclipse.swt.tests/data/target.gif
deleted file mode 100644
index 4ee8b5a4a6..0000000000
--- a/tests/org.eclipse.swt.tests/data/target.gif
+++ /dev/null
Binary files differ
diff --git a/tests/org.eclipse.swt.tests/data/target.jpg b/tests/org.eclipse.swt.tests/data/target.jpg
deleted file mode 100644
index 173ea1bf55..0000000000
--- a/tests/org.eclipse.swt.tests/data/target.jpg
+++ /dev/null
Binary files differ
diff --git a/tests/org.eclipse.swt.tests/data/target.png b/tests/org.eclipse.swt.tests/data/target.png
deleted file mode 100644
index bb5d7eb843..0000000000
--- a/tests/org.eclipse.swt.tests/data/target.png
+++ /dev/null
Binary files differ
diff --git a/tests/org.eclipse.swt.tests/data/transparent.png b/tests/org.eclipse.swt.tests/data/transparent.png
deleted file mode 100644
index 0625f14923..0000000000
--- a/tests/org.eclipse.swt.tests/data/transparent.png
+++ /dev/null
Binary files differ
diff --git a/tests/org.eclipse.swt.tests/plugin.properties b/tests/org.eclipse.swt.tests/plugin.properties
deleted file mode 100644
index dc0ac13ba5..0000000000
--- a/tests/org.eclipse.swt.tests/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2003 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Common Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/cpl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-pluginName = Tests
-providerName = Eclipse.org \ No newline at end of file
diff --git a/tests/org.eclipse.swt.tests/plugin.xml b/tests/org.eclipse.swt.tests/plugin.xml
deleted file mode 100644
index 9d72db86c5..0000000000
--- a/tests/org.eclipse.swt.tests/plugin.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<!-- File written by PDE 1.0 -->
-<plugin
- id="org.eclipse.swt.tests"
- name="%pluginName"
- provider-name="%providerName"
- version="3.1.0">
-
-<requires>
- <import plugin="org.junit"/>
- <import plugin="org.eclipse.swt"/>
- <import plugin="org.eclipse.test.performance"/>
-</requires>
-
-<runtime>
- <library name="swttests.jar">
- <export name="*"/>
- <packages prefixes="org.eclipse.swt.tests"/>
- </library>
- </runtime>
-</plugin>
diff --git a/tests/org.eclipse.swt.tests/test.xml b/tests/org.eclipse.swt.tests/test.xml
deleted file mode 100644
index 241827c182..0000000000
--- a/tests/org.eclipse.swt.tests/test.xml
+++ /dev/null
@@ -1,75 +0,0 @@
-<?xml version="1.0"?>
-
-<project name="testsuite" default="run" basedir=".">
- <!-- This file is intended to be more tightly coupled with the -->
- <!-- org.eclipse.ui plugin, for testing. -->
-
- <!-- The property ${eclipse-home} should be passed into this script -->
-
- <!-- sets the properties eclipse-home, and library-file -->
- <property name="eclipse-home" value="${basedir}/../.."/>
- <property name="plugin-name" value="org.eclipse.swt.tests"/>
- <property name="plugin-path" value="${eclipse-home}/plugins/${org.eclipse.swt.tests}"/>
- <property name="library-file" value="${eclipse-home}/plugins/org.eclipse.test/library.xml"/>
-
- <!-- This target holds all initialization code that needs to be done for -->
- <!-- all tests that are to be run. Initialization for individual tests -->
- <!-- should be done within the body of the suite target. -->
- <target name="init">
- <tstamp/>
- <delete>
- <fileset dir="${eclipse-home}" includes="org*.xml"/>
- </delete>
- </target>
-
- <!-- This target defines the tests that need to be run. -->
- <target name="suite" unless="performance">
- <property name="data" value="${eclipse-home}/swt_sniff_folder"/>
- <delete dir="${location1}" quiet="true"/>
- <!-- Run all SWT tests on Windows. Run only Browser tests otherwise. -->
- <condition property="class-tests" value="org.eclipse.swt.tests.junit.AllBrowserTests">
- <os family="unix"/>
- </condition>
- <condition property="class-tests" value="org.eclipse.swt.tests.junit.AllTests">
- <os family="windows"/>
- </condition>
- <ant target="core-test" antfile="${library-file}" dir="${eclipse-home}">
- <property name="data-dir" value="${data}"/>
- <property name="plugin-name" value="${plugin-name}"/>
- <property name="classname" value="${class-tests}"/>
- </ant>
- </target>
-
- <!-- This target holds code to cleanup the testing environment after the tests -->
- <!-- have been run. You can use this to delete temporary files that are created. -->
- <target name="cleanup">
- </target>
-
- <!-- This target defines the performance tests that need to be run. -->
- <target name="performance-suite">
- <property name="swt-performance-folder" value="${eclipse-home}/swt_performance_folder" />
- <delete dir="${swt-performance-folder}" quiet="true" />
- <ant target="ui-test" antfile="${library-file}" dir="${eclipse-home}">
- <property name="data-dir" value="${swt-performance-folder}" />
- <property name="plugin-name" value="${plugin-name}" />
- <property name="classname" value="org.eclipse.swt.tests.junit.performance.PerformanceTests" />
- </ant>
- </target>
-
- <target name="performance" depends="init,performance-suite,cleanup">
- <ant target="collect" antfile="${library-file}" dir="${eclipse-home}">
- <property name="includes" value="org*.xml" />
- <property name="output-file" value="${plugin-name}.xml" />
- </ant>
- </target>
-
- <!-- This target runs the test suite. Any actions that need to happen after all -->
- <!-- the tests have been run should go here. -->
- <target name="run" depends="init,suite,cleanup">
- <ant target="collect" antfile="${library-file}" dir="${eclipse-home}">
- <property name="includes" value="org*.xml"/>
- <property name="output-file" value="${plugin-name}.xml"/>
- </ant>
- </target>
-
-</project>

Back to the top