From 183264fc8c45e7b48b5b87ae4cb083147c586499 Mon Sep 17 00:00:00 2001
From: cvs2svn
Date: Fri, 22 Feb 2008 20:03:24 +0000
Subject: This commit was manufactured by cvs2svn to create tag 'v3430'.
Sprout from master 2008-02-22 19:27:20 UTC Bogdan Gheorghe 'v3430 for I20080222'
Cherrypick from master 2008-02-22 20:03:23 UTC Bogdan Gheorghe 'v3430 for I20080222':
bundles/org.eclipse.swt/buildnotes_swt.html
Delete:
bundles/org.eclipse.swt.opengl/.classpath_carbon
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/carbon/library/agl.c
bundles/org.eclipse.swt.opengl/carbon/library/agl.h
bundles/org.eclipse.swt.opengl/carbon/library/agl_stats.c
bundles/org.eclipse.swt.opengl/carbon/library/agl_stats.h
bundles/org.eclipse.swt.opengl/carbon/library/agl_structs.h
bundles/org.eclipse.swt.opengl/carbon/org/eclipse/swt/internal/opengl/carbon/AGL.java
bundles/org.eclipse.swt.opengl/carbon/org/eclipse/swt/opengl/GLCanvas.java
bundles/org.eclipse.swt.opengl/common/library/gl.c
bundles/org.eclipse.swt.opengl/common/library/gl.h
bundles/org.eclipse.swt.opengl/common/library/gl_stats.c
bundles/org.eclipse.swt.opengl/common/library/gl_stats.h
bundles/org.eclipse.swt.opengl/common/library/gl_structs.c
bundles/org.eclipse.swt.opengl/common/library/gl_structs.h
bundles/org.eclipse.swt.opengl/common/library/glu.c
bundles/org.eclipse.swt.opengl/common/library/glu.h
bundles/org.eclipse.swt.opengl/common/library/glu_stats.c
bundles/org.eclipse.swt.opengl/common/library/glu_stats.h
bundles/org.eclipse.swt.opengl/common/library/glu_structs.c
bundles/org.eclipse.swt.opengl/common/library/glu_structs.h
bundles/org.eclipse.swt.opengl/common/library/swt.c
bundles/org.eclipse.swt.opengl/common/library/swt.h
bundles/org.eclipse.swt.opengl/common/org/eclipse/opengl/GL.java
bundles/org.eclipse.swt.opengl/common/org/eclipse/opengl/GLU.java
bundles/org.eclipse.swt.opengl/common/org/eclipse/swt/opengl/GLData.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/glx.h
bundles/org.eclipse.swt.opengl/gtk/library/glx_stats.c
bundles/org.eclipse.swt.opengl/gtk/library/glx_stats.h
bundles/org.eclipse.swt.opengl/gtk/library/glx_structs.c
bundles/org.eclipse.swt.opengl/gtk/library/glx_structs.h
bundles/org.eclipse.swt.opengl/gtk/library/make_linux.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/org/eclipse/swt/internal/opengl/gtk/GLX.java
bundles/org.eclipse.swt.opengl/gtk/org/eclipse/swt/internal/opengl/gtk/XVisualInfo.java
bundles/org.eclipse.swt.opengl/gtk/org/eclipse/swt/opengl/GLCanvas.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/GLCanvas.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/WGL.java
examples/org.eclipse.swt.examples.browser.demos/.classpath
examples/org.eclipse.swt.examples.browser.demos/.project
examples/org.eclipse.swt.examples.browser.demos/.settings/org.eclipse.jdt.core.prefs
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/Back640x440.gif
examples/org.eclipse.swt.examples.browser.demos/css2/black_chip.gif
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/texture_cells.gif
examples/org.eclipse.swt.examples.browser.demos/css2/wall_chip.gif
examples/org.eclipse.swt.examples.browser.demos/css2/welcome.html
examples/org.eclipse.swt.examples.browser.demos/css2/white_chip.gif
examples/org.eclipse.swt.examples.browser.demos/css3/Back640x440.gif
examples/org.eclipse.swt.examples.browser.demos/css3/black_pawn.gif
examples/org.eclipse.swt.examples.browser.demos/css3/line1.gif
examples/org.eclipse.swt.examples.browser.demos/css3/style.css
examples/org.eclipse.swt.examples.browser.demos/css3/texture_cells.gif
examples/org.eclipse.swt.examples.browser.demos/css3/wall_pawn.gif
examples/org.eclipse.swt.examples.browser.demos/css3/welcome.html
examples/org.eclipse.swt.examples.browser.demos/css3/white_pawn.gif
examples/org.eclipse.swt.examples.browser.demos/css4/Back640x440.gif
examples/org.eclipse.swt.examples.browser.demos/css4/blue_people.gif
examples/org.eclipse.swt.examples.browser.demos/css4/gold_people.gif
examples/org.eclipse.swt.examples.browser.demos/css4/line1.gif
examples/org.eclipse.swt.examples.browser.demos/css4/style.css
examples/org.eclipse.swt.examples.browser.demos/css4/texture_cells.gif
examples/org.eclipse.swt.examples.browser.demos/css4/wall_people.gif
examples/org.eclipse.swt.examples.browser.demos/css4/welcome.html
examples/org.eclipse.swt.examples.browser.demos/doc-html/swt_browser_demos_ex.html
examples/org.eclipse.swt.examples.browser.demos/icons/pawn.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.demos/src/org/eclipse/swt/examples/browser/demos/views/EditorTab.java
examples/org.eclipse.swt.examples.browser.demos/src/org/eclipse/swt/examples/browser/demos/views/PawnTab.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/.settings/org.eclipse.jdt.core.prefs
examples/org.eclipse.swt.examples.browser/about.html
examples/org.eclipse.swt.examples.browser/build.properties
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/.settings/org.eclipse.jdt.core.prefs
examples/org.eclipse.swt.examples.controls/about.html
examples/org.eclipse.swt.examples.controls/build.properties
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/.settings/org.eclipse.jdt.core.prefs
examples/org.eclipse.swt.examples.launcher/about.html
examples/org.eclipse.swt.examples.launcher/build.properties
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/.settings/org.eclipse.jdt.core.prefs
examples/org.eclipse.swt.examples.layouts/about.html
examples/org.eclipse.swt.examples.layouts/build.properties
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/.settings/org.eclipse.jdt.core.prefs
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/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/OLEExample.java
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/.settings/org.eclipse.jdt.core.prefs
examples/org.eclipse.swt.examples.paint/about.html
examples/org.eclipse.swt.examples.paint/build.properties
examples/org.eclipse.swt.examples.paint/doc-html/swt_paint_ex.html
examples/org.eclipse.swt.examples.paint/icons/paint_example.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/PaintPlugin.java
examples/org.eclipse.swt.examples.paint/src/org/eclipse/swt/examples/paint/PaintView.java
examples/org.eclipse.swt.examples/.classpath
examples/org.eclipse.swt.examples/.cvsignore
examples/org.eclipse.swt.examples/.project
examples/org.eclipse.swt.examples/.settings/org.eclipse.jdt.core.prefs
examples/org.eclipse.swt.examples/.settings/org.eclipse.pde.prefs
examples/org.eclipse.swt.examples/about.html
examples/org.eclipse.swt.examples/build.properties
examples/org.eclipse.swt.examples/doc-html/swt_addressbook_ex.html
examples/org.eclipse.swt.examples/doc-html/swt_browser_ex.html
examples/org.eclipse.swt.examples/doc-html/swt_clipboard_ex.html
examples/org.eclipse.swt.examples/doc-html/swt_controls_ex.html
examples/org.eclipse.swt.examples/doc-html/swt_customcontrols_ex.html
examples/org.eclipse.swt.examples/doc-html/swt_dnd_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_launcher_ex.html
examples/org.eclipse.swt.examples/doc-html/swt_layout_ex.html
examples/org.eclipse.swt.examples/doc-html/swt_manual_setup.html
examples/org.eclipse.swt.examples/doc-html/swt_paint_ex.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_graphics.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_paint.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/BrowserTab.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/DateTimeTab.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/ExpandBarTab.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/LinkTab.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/MenuTab.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/ScaleTab.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/SpinnerTab.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/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/ToolTipTab.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/backgroundImage.png
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/browser-content.html
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/parentBackgroundImage.png
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/strikeout.bmp
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/strikeout_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/underline.bmp
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/underline_mask.bmp
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/graphics/AdvancedGraphics.java
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/AlphaTab.java
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/AnimatedGraphicsTab.java
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/BallTab.java
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/BlackHoleTab.java
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/CardsTab.java
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/ColorListener.java
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/ColorMenu.java
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/CountDownTab.java
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/CurvesSWTTab.java
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/CurvesTab.java
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/CustomAlphaTab.java
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/CustomFontTab.java
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/FontBounceTab.java
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/GradientDialog.java
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/GradientTab.java
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/GraphicAntialiasTab.java
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/GraphicsBackground.java
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/GraphicsExample.java
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/GraphicsTab.java
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/ImageFlipTab.java
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/ImageScaleTab.java
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/ImageTransformTab.java
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/InterpolationTab.java
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/IntroTab.java
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/LineCapTab.java
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/LineJoinTab.java
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/LineStyleTab.java
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/LineTab.java
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/MazeTab.java
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/PathClippingAnimTab.java
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/PathClippingTab.java
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/PathTab.java
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/RGBTab.java
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/RegionClippingTab.java
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/ShapesTab.java
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/SpiralTab.java
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/StarPolyTab.java
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/TextAntialiasTab.java
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/ace_club.jpg
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/ace_diamond.jpg
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/ace_hearts.jpg
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/ace_spade.jpg
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/alpha_img1.png
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/alpha_img2.png
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/back.gif
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/cube.png
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/db.gif
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/font.gif
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/help.gif
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/home_nav.gif
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/houses.png
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/irmaos.jpg
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/maze.bmp
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/next.gif
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/ovals.png
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/pattern1.jpg
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/pattern2.jpg
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/pattern3.jpg
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/pause.gif
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/play.gif
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/swap.gif
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/swt.png
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/task.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/StackLayoutTab.java
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/layoutexample/Tab.java
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/AirbrushTool.java
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/BasicPaintSession.java
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/ContainerFigure.java
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/ContinuousPaintSession.java
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/DragPaintSession.java
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/EllipseFigure.java
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/EllipseTool.java
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/Figure.java
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/FigureDrawContext.java
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/LineFigure.java
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/LineTool.java
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/PaintExample.java
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/PaintSession.java
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/PaintSurface.java
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/PaintTool.java
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/PencilTool.java
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/PointFigure.java
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/PolyLineTool.java
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/RectangleFigure.java
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/RectangleTool.java
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/RoundedRectangleFigure.java
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/RoundedRectangleTool.java
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/SegmentedPaintSession.java
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/SolidEllipseFigure.java
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/SolidPolygonFigure.java
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/SolidRectangleFigure.java
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/SolidRoundedRectangleFigure.java
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/TextFigure.java
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/TextTool.java
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/Tool.java
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/ToolSettings.java
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/fill_none.gif
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/fill_outline.gif
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/fill_solid.gif
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/linestyle_dash.gif
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/linestyle_dashdot.gif
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/linestyle_dot.gif
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/linestyle_solid.gif
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/options_font.gif
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/tool_airbrush.gif
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/tool_ellipse.gif
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/tool_line.gif
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/tool_pencil.gif
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/tool_polyline.gif
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/tool_rectangle.gif
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/tool_roundedrectangle.gif
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/tool_text.gif
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/italic.bmp
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/italic_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.examples/src/org/eclipse/swt/examples/texteditor/strikeout.bmp
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/strikeout_mask.bmp
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/underline.bmp
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/underline_mask.bmp
examples/org.eclipse.swt.opengl.examples/.classpath
examples/org.eclipse.swt.opengl.examples/.cvsignore
examples/org.eclipse.swt.opengl.examples/.project
examples/org.eclipse.swt.opengl.examples/about.html
examples/org.eclipse.swt.opengl.examples/build.properties
examples/org.eclipse.swt.opengl.examples/plugin.properties
examples/org.eclipse.swt.opengl.examples/plugin.xml
examples/org.eclipse.swt.opengl.examples/src/examples_opengl.properties
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/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/ImageDataUtil.java
examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/LWJGLExample.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/ReflectionTab.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/Snippet157.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet158.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet159.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet16.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet160.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet161.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet162.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet163.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet164.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet165.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet166.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet167.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet168.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet169.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet17.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet170.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet171.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet172.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet173.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet174.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet175.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet176.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet177.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet178.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet179.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet18.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet180.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet181.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet182.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet183.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet184.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet185.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet186.html
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet186.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet187.html
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet187.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet188.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet189.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet19.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet190.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet191.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet192.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet193.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet194.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet195.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet196.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet197.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet198.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet199.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/Snippet200.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet201.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet202.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet203.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet204.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet205.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet206.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet207.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet208.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet209.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet21.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet210.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet211.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet212.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet213.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet214.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet215.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet216.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet217.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet218.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet219.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet22.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet220.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet221.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet222.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet223.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet224.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet225.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet226.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet227.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet228.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet229.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet23.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet230.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet231.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet232.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet233.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet234.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet235.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet236.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet237.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet238.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet239.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet24.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet240.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet241.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet242.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet243.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet244.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet245.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet246.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet247.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet248.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet249.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet25.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet250.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet251.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet252.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet253.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet256.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet257.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet258.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet259.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet26.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet260.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet261.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet262.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet263.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet264.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet265.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet266.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet267.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet268.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet269.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet27.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet270.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet271.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet272.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet273.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet274.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet275.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet276.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet277.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet278.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet279.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet28.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet280.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet281.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet282.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet283.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet284.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet285.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet286.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet287.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet288.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet289.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet29.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet290.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet291.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet292.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet293.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet294.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet295.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet296.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet297.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
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/SnippetLauncher.java
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/cancel.gif
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/eclipse.png
---
.../src/examples_addressbook.properties | 69 -
.../src/examples_browser.properties | 20 -
.../src/examples_control.properties | 255 ---
.../src/examples_fileviewer.properties | 69 -
.../src/examples_graphics.properties | 166 --
.../src/examples_helloworld.properties | 11 -
.../src/examples_hoverhelp.properties | 26 -
.../src/examples_images.properties | 114 -
.../src/examples_javaviewer.properties | 17 -
.../src/examples_layout.properties | 52 -
.../src/examples_paint.properties | 115 -
.../src/examples_texteditor.properties | 22 -
.../org.eclipse.swt.examples/src/import.properties | 26 -
.../swt/examples/addressbook/AddressBook.java | 881 -------
.../swt/examples/addressbook/DataEntryDialog.java | 163 --
.../swt/examples/addressbook/FindListener.java | 18 -
.../swt/examples/addressbook/SearchDialog.java | 202 --
.../examples/browserexample/BrowserExample.java | 372 ---
.../swt/examples/browserexample/document.gif | Bin 380 -> 0 bytes
.../swt/examples/browserexample/eclipse01.bmp | Bin 6966 -> 0 bytes
.../swt/examples/browserexample/eclipse02.bmp | Bin 6966 -> 0 bytes
.../swt/examples/browserexample/eclipse03.bmp | Bin 6966 -> 0 bytes
.../swt/examples/browserexample/eclipse04.bmp | Bin 6966 -> 0 bytes
.../swt/examples/browserexample/eclipse05.bmp | Bin 6966 -> 0 bytes
.../swt/examples/browserexample/eclipse06.bmp | Bin 6966 -> 0 bytes
.../swt/examples/browserexample/eclipse07.bmp | Bin 6966 -> 0 bytes
.../swt/examples/browserexample/eclipse08.bmp | Bin 6966 -> 0 bytes
.../swt/examples/browserexample/eclipse09.bmp | Bin 6966 -> 0 bytes
.../swt/examples/browserexample/eclipse10.bmp | Bin 6966 -> 0 bytes
.../swt/examples/browserexample/eclipse11.bmp | Bin 6966 -> 0 bytes
.../swt/examples/browserexample/eclipse12.bmp | Bin 6966 -> 0 bytes
.../swt/examples/clipboard/ClipboardExample.java | 611 -----
.../org/eclipse/swt/examples/clipboard/MyType.java | 16 -
.../swt/examples/clipboard/MyTypeTransfer.java | 103 -
.../swt/examples/controlexample/AlignableTab.java | 89 -
.../swt/examples/controlexample/BrowserTab.java | 306 ---
.../swt/examples/controlexample/ButtonTab.java | 233 --
.../swt/examples/controlexample/CComboTab.java | 123 -
.../swt/examples/controlexample/CLabelTab.java | 135 --
.../swt/examples/controlexample/CTabFolderTab.java | 446 ----
.../swt/examples/controlexample/CanvasTab.java | 312 ---
.../swt/examples/controlexample/ComboTab.java | 148 --
.../examples/controlexample/ControlExample.java | 244 --
.../swt/examples/controlexample/CoolBarTab.java | 490 ----
.../controlexample/CustomControlExample.java | 58 -
.../swt/examples/controlexample/DateTimeTab.java | 125 -
.../swt/examples/controlexample/DialogTab.java | 488 ----
.../swt/examples/controlexample/ExpandBarTab.java | 145 --
.../swt/examples/controlexample/GroupTab.java | 154 --
.../swt/examples/controlexample/LabelTab.java | 184 --
.../swt/examples/controlexample/LinkTab.java | 98 -
.../swt/examples/controlexample/ListTab.java | 93 -
.../swt/examples/controlexample/MenuTab.java | 309 ---
.../examples/controlexample/ProgressBarTab.java | 178 --
.../swt/examples/controlexample/RangeTab.java | 197 --
.../swt/examples/controlexample/SashFormTab.java | 122 -
.../swt/examples/controlexample/SashTab.java | 241 --
.../swt/examples/controlexample/ScaleTab.java | 230 --
.../swt/examples/controlexample/ScrollableTab.java | 63 -
.../swt/examples/controlexample/ShellTab.java | 294 ---
.../swt/examples/controlexample/SliderTab.java | 273 ---
.../swt/examples/controlexample/SpinnerTab.java | 317 ---
.../swt/examples/controlexample/StyledTextTab.java | 413 ----
.../eclipse/swt/examples/controlexample/Tab.java | 1480 ------------
.../swt/examples/controlexample/TabFolderTab.java | 166 --
.../swt/examples/controlexample/TableTab.java | 680 ------
.../swt/examples/controlexample/TextTab.java | 181 --
.../swt/examples/controlexample/ToolBarTab.java | 356 ---
.../swt/examples/controlexample/ToolTipTab.java | 249 --
.../swt/examples/controlexample/TreeTab.java | 780 -------
.../examples/controlexample/backgroundImage.png | Bin 572 -> 0 bytes
.../eclipse/swt/examples/controlexample/bold.bmp | Bin 110 -> 0 bytes
.../swt/examples/controlexample/bold_mask.bmp | Bin 110 -> 0 bytes
.../examples/controlexample/browser-content.html | 33 -
.../swt/examples/controlexample/closedFolder.gif | Bin 906 -> 0 bytes
.../eclipse/swt/examples/controlexample/italic.bmp | Bin 110 -> 0 bytes
.../swt/examples/controlexample/italic_mask.bmp | Bin 110 -> 0 bytes
.../swt/examples/controlexample/openFolder.gif | Bin 184 -> 0 bytes
.../controlexample/parentBackgroundImage.png | Bin 558 -> 0 bytes
.../eclipse/swt/examples/controlexample/red.bmp | Bin 214 -> 0 bytes
.../swt/examples/controlexample/red_mask.bmp | Bin 110 -> 0 bytes
.../swt/examples/controlexample/strikeout.bmp | Bin 630 -> 0 bytes
.../swt/examples/controlexample/strikeout_mask.bmp | Bin 630 -> 0 bytes
.../eclipse/swt/examples/controlexample/target.gif | Bin 917 -> 0 bytes
.../swt/examples/controlexample/underline.bmp | Bin 630 -> 0 bytes
.../swt/examples/controlexample/underline_mask.bmp | Bin 630 -> 0 bytes
.../eclipse/swt/examples/controlexample/yellow.bmp | Bin 214 -> 0 bytes
.../swt/examples/controlexample/yellow_mask.bmp | Bin 110 -> 0 bytes
.../org/eclipse/swt/examples/dnd/DNDExample.java | 1429 ------------
.../eclipse/swt/examples/dnd/ImageTransfer.java | 82 -
.../swt/examples/fileviewer/FileViewer.java | 1716 --------------
.../eclipse/swt/examples/fileviewer/IconCache.java | 161 --
.../eclipse/swt/examples/fileviewer/cmd_Copy.gif | Bin 167 -> 0 bytes
.../eclipse/swt/examples/fileviewer/cmd_Cut.gif | Bin 152 -> 0 bytes
.../eclipse/swt/examples/fileviewer/cmd_Delete.gif | Bin 143 -> 0 bytes
.../eclipse/swt/examples/fileviewer/cmd_Parent.gif | Bin 132 -> 0 bytes
.../eclipse/swt/examples/fileviewer/cmd_Paste.gif | Bin 245 -> 0 bytes
.../eclipse/swt/examples/fileviewer/cmd_Print.gif | Bin 227 -> 0 bytes
.../swt/examples/fileviewer/cmd_Refresh.gif | Bin 182 -> 0 bytes
.../eclipse/swt/examples/fileviewer/cmd_Rename.gif | Bin 163 -> 0 bytes
.../eclipse/swt/examples/fileviewer/cmd_Search.gif | Bin 153 -> 0 bytes
.../swt/examples/fileviewer/generic_example.gif | Bin 158 -> 0 bytes
.../swt/examples/fileviewer/icon_ClosedDrive.gif | Bin 217 -> 0 bytes
.../swt/examples/fileviewer/icon_ClosedFolder.gif | Bin 160 -> 0 bytes
.../eclipse/swt/examples/fileviewer/icon_File.gif | Bin 152 -> 0 bytes
.../swt/examples/fileviewer/icon_OpenDrive.gif | Bin 231 -> 0 bytes
.../swt/examples/fileviewer/icon_OpenFolder.gif | Bin 152 -> 0 bytes
.../swt/examples/graphics/AdvancedGraphics.java | 104 -
.../eclipse/swt/examples/graphics/AlphaTab.java | 234 --
.../swt/examples/graphics/AnimatedGraphicsTab.java | 156 --
.../org/eclipse/swt/examples/graphics/BallTab.java | 159 --
.../swt/examples/graphics/BlackHoleTab.java | 42 -
.../eclipse/swt/examples/graphics/CardsTab.java | 179 --
.../swt/examples/graphics/ColorListener.java | 24 -
.../eclipse/swt/examples/graphics/ColorMenu.java | 372 ---
.../swt/examples/graphics/CountDownTab.java | 262 ---
.../swt/examples/graphics/CurvesSWTTab.java | 389 ----
.../eclipse/swt/examples/graphics/CurvesTab.java | 300 ---
.../swt/examples/graphics/CustomAlphaTab.java | 159 --
.../swt/examples/graphics/CustomFontTab.java | 202 --
.../swt/examples/graphics/FontBounceTab.java | 146 --
.../swt/examples/graphics/GradientDialog.java | 277 ---
.../eclipse/swt/examples/graphics/GradientTab.java | 210 --
.../swt/examples/graphics/GraphicAntialiasTab.java | 131 --
.../swt/examples/graphics/GraphicsBackground.java | 65 -
.../swt/examples/graphics/GraphicsExample.java | 648 ------
.../eclipse/swt/examples/graphics/GraphicsTab.java | 73 -
.../swt/examples/graphics/ImageFlipTab.java | 111 -
.../swt/examples/graphics/ImageScaleTab.java | 48 -
.../swt/examples/graphics/ImageTransformTab.java | 153 --
.../swt/examples/graphics/InterpolationTab.java | 196 --
.../eclipse/swt/examples/graphics/IntroTab.java | 97 -
.../eclipse/swt/examples/graphics/LineCapTab.java | 151 --
.../eclipse/swt/examples/graphics/LineJoinTab.java | 147 --
.../swt/examples/graphics/LineStyleTab.java | 172 --
.../org/eclipse/swt/examples/graphics/LineTab.java | 37 -
.../org/eclipse/swt/examples/graphics/MazeTab.java | 328 ---
.../swt/examples/graphics/PathClippingAnimTab.java | 207 --
.../swt/examples/graphics/PathClippingTab.java | 244 --
.../org/eclipse/swt/examples/graphics/PathTab.java | 178 --
.../org/eclipse/swt/examples/graphics/RGBTab.java | 153 --
.../swt/examples/graphics/RegionClippingTab.java | 210 --
.../eclipse/swt/examples/graphics/ShapesTab.java | 199 --
.../eclipse/swt/examples/graphics/SpiralTab.java | 164 --
.../eclipse/swt/examples/graphics/StarPolyTab.java | 68 -
.../swt/examples/graphics/TextAntialiasTab.java | 192 --
.../org/eclipse/swt/examples/graphics/ace_club.jpg | Bin 7695 -> 0 bytes
.../eclipse/swt/examples/graphics/ace_diamond.jpg | Bin 7348 -> 0 bytes
.../eclipse/swt/examples/graphics/ace_hearts.jpg | Bin 7312 -> 0 bytes
.../eclipse/swt/examples/graphics/ace_spade.jpg | Bin 7125 -> 0 bytes
.../eclipse/swt/examples/graphics/alpha_img1.png | Bin 7124 -> 0 bytes
.../eclipse/swt/examples/graphics/alpha_img2.png | Bin 6602 -> 0 bytes
.../src/org/eclipse/swt/examples/graphics/back.gif | Bin 327 -> 0 bytes
.../src/org/eclipse/swt/examples/graphics/cube.png | Bin 2212 -> 0 bytes
.../src/org/eclipse/swt/examples/graphics/db.gif | Bin 206 -> 0 bytes
.../src/org/eclipse/swt/examples/graphics/font.gif | Bin 112 -> 0 bytes
.../src/org/eclipse/swt/examples/graphics/help.gif | Bin 259 -> 0 bytes
.../org/eclipse/swt/examples/graphics/home_nav.gif | Bin 582 -> 0 bytes
.../org/eclipse/swt/examples/graphics/houses.png | Bin 1826 -> 0 bytes
.../org/eclipse/swt/examples/graphics/irmaos.jpg | Bin 82313 -> 0 bytes
.../src/org/eclipse/swt/examples/graphics/maze.bmp | Bin 864666 -> 0 bytes
.../src/org/eclipse/swt/examples/graphics/next.gif | Bin 327 -> 0 bytes
.../org/eclipse/swt/examples/graphics/ovals.png | Bin 2078 -> 0 bytes
.../org/eclipse/swt/examples/graphics/pattern1.jpg | Bin 792 -> 0 bytes
.../org/eclipse/swt/examples/graphics/pattern2.jpg | Bin 698 -> 0 bytes
.../org/eclipse/swt/examples/graphics/pattern3.jpg | Bin 746 -> 0 bytes
.../org/eclipse/swt/examples/graphics/pause.gif | Bin 338 -> 0 bytes
.../src/org/eclipse/swt/examples/graphics/play.gif | Bin 337 -> 0 bytes
.../src/org/eclipse/swt/examples/graphics/swap.gif | Bin 160 -> 0 bytes
.../src/org/eclipse/swt/examples/graphics/swt.png | Bin 4808 -> 0 bytes
.../src/org/eclipse/swt/examples/graphics/task.gif | Bin 376 -> 0 bytes
.../swt/examples/helloworld/HelloWorld1.java | 36 -
.../swt/examples/helloworld/HelloWorld2.java | 42 -
.../swt/examples/helloworld/HelloWorld3.java | 49 -
.../swt/examples/helloworld/HelloWorld4.java | 45 -
.../swt/examples/helloworld/HelloWorld5.java | 56 -
.../eclipse/swt/examples/hoverhelp/HoverHelp.java | 355 ---
.../eclipse/swt/examples/hoverhelp/information.gif | Bin 92 -> 0 bytes
.../org/eclipse/swt/examples/hoverhelp/warning.gif | Bin 152 -> 0 bytes
.../swt/examples/imageanalyzer/ImageAnalyzer.java | 2392 --------------------
.../swt/examples/javaviewer/JavaLineStyler.java | 377 ---
.../swt/examples/javaviewer/JavaViewer.java | 184 --
.../swt/examples/layoutexample/FillLayoutTab.java | 222 --
.../swt/examples/layoutexample/FormLayoutTab.java | 774 -------
.../swt/examples/layoutexample/GridLayoutTab.java | 672 ------
.../swt/examples/layoutexample/LayoutExample.java | 115 -
.../swt/examples/layoutexample/RowLayoutTab.java | 413 ----
.../swt/examples/layoutexample/StackLayoutTab.java | 247 --
.../eclipse/swt/examples/layoutexample/Tab.java | 748 ------
.../eclipse/swt/examples/paint/AirbrushTool.java | 79 -
.../swt/examples/paint/BasicPaintSession.java | 37 -
.../swt/examples/paint/ContainerFigure.java | 93 -
.../swt/examples/paint/ContinuousPaintSession.java | 234 --
.../swt/examples/paint/DragPaintSession.java | 136 --
.../eclipse/swt/examples/paint/EllipseFigure.java | 52 -
.../eclipse/swt/examples/paint/EllipseTool.java | 63 -
.../src/org/eclipse/swt/examples/paint/Figure.java | 38 -
.../swt/examples/paint/FigureDrawContext.java | 40 -
.../org/eclipse/swt/examples/paint/LineFigure.java | 52 -
.../org/eclipse/swt/examples/paint/LineTool.java | 58 -
.../eclipse/swt/examples/paint/PaintExample.java | 584 -----
.../eclipse/swt/examples/paint/PaintSession.java | 58 -
.../eclipse/swt/examples/paint/PaintSurface.java | 521 -----
.../org/eclipse/swt/examples/paint/PaintTool.java | 20 -
.../org/eclipse/swt/examples/paint/PencilTool.java | 58 -
.../eclipse/swt/examples/paint/PointFigure.java | 40 -
.../eclipse/swt/examples/paint/PolyLineTool.java | 75 -
.../swt/examples/paint/RectangleFigure.java | 51 -
.../eclipse/swt/examples/paint/RectangleTool.java | 71 -
.../swt/examples/paint/RoundedRectangleFigure.java | 53 -
.../swt/examples/paint/RoundedRectangleTool.java | 64 -
.../swt/examples/paint/SegmentedPaintSession.java | 157 --
.../swt/examples/paint/SolidEllipseFigure.java | 44 -
.../swt/examples/paint/SolidPolygonFigure.java | 59 -
.../swt/examples/paint/SolidRectangleFigure.java | 43 -
.../paint/SolidRoundedRectangleFigure.java | 45 -
.../org/eclipse/swt/examples/paint/TextFigure.java | 49 -
.../org/eclipse/swt/examples/paint/TextTool.java | 160 --
.../src/org/eclipse/swt/examples/paint/Tool.java | 36 -
.../eclipse/swt/examples/paint/ToolSettings.java | 62 -
.../org/eclipse/swt/examples/paint/fill_none.gif | Bin 865 -> 0 bytes
.../eclipse/swt/examples/paint/fill_outline.gif | Bin 872 -> 0 bytes
.../org/eclipse/swt/examples/paint/fill_solid.gif | Bin 861 -> 0 bytes
.../eclipse/swt/examples/paint/linestyle_dash.gif | Bin 880 -> 0 bytes
.../swt/examples/paint/linestyle_dashdot.gif | Bin 880 -> 0 bytes
.../eclipse/swt/examples/paint/linestyle_dot.gif | Bin 879 -> 0 bytes
.../eclipse/swt/examples/paint/linestyle_solid.gif | Bin 871 -> 0 bytes
.../eclipse/swt/examples/paint/options_font.gif | Bin 868 -> 0 bytes
.../eclipse/swt/examples/paint/tool_airbrush.gif | Bin 890 -> 0 bytes
.../eclipse/swt/examples/paint/tool_ellipse.gif | Bin 872 -> 0 bytes
.../org/eclipse/swt/examples/paint/tool_line.gif | Bin 860 -> 0 bytes
.../org/eclipse/swt/examples/paint/tool_pencil.gif | Bin 874 -> 0 bytes
.../eclipse/swt/examples/paint/tool_polyline.gif | Bin 879 -> 0 bytes
.../eclipse/swt/examples/paint/tool_rectangle.gif | Bin 865 -> 0 bytes
.../swt/examples/paint/tool_roundedrectangle.gif | Bin 871 -> 0 bytes
.../org/eclipse/swt/examples/paint/tool_text.gif | Bin 875 -> 0 bytes
.../eclipse/swt/examples/texteditor/Images.java | 77 -
.../swt/examples/texteditor/TextEditor.java | 358 ---
.../org/eclipse/swt/examples/texteditor/blue.bmp | Bin 334 -> 0 bytes
.../eclipse/swt/examples/texteditor/blue_mask.bmp | Bin 134 -> 0 bytes
.../org/eclipse/swt/examples/texteditor/bold.bmp | Bin 134 -> 0 bytes
.../eclipse/swt/examples/texteditor/bold_mask.bmp | Bin 134 -> 0 bytes
.../org/eclipse/swt/examples/texteditor/erase.bmp | Bin 334 -> 0 bytes
.../eclipse/swt/examples/texteditor/erase_mask.bmp | Bin 134 -> 0 bytes
.../org/eclipse/swt/examples/texteditor/green.bmp | Bin 334 -> 0 bytes
.../eclipse/swt/examples/texteditor/green_mask.bmp | Bin 134 -> 0 bytes
.../org/eclipse/swt/examples/texteditor/italic.bmp | Bin 1350 -> 0 bytes
.../swt/examples/texteditor/italic_mask.bmp | Bin 1350 -> 0 bytes
.../org/eclipse/swt/examples/texteditor/red.bmp | Bin 334 -> 0 bytes
.../eclipse/swt/examples/texteditor/red_mask.bmp | Bin 134 -> 0 bytes
.../eclipse/swt/examples/texteditor/strikeout.bmp | Bin 1350 -> 0 bytes
.../swt/examples/texteditor/strikeout_mask.bmp | Bin 1350 -> 0 bytes
.../eclipse/swt/examples/texteditor/underline.bmp | Bin 1350 -> 0 bytes
.../swt/examples/texteditor/underline_mask.bmp | Bin 1350 -> 0 bytes
254 files changed, 34630 deletions(-)
delete mode 100644 examples/org.eclipse.swt.examples/src/examples_addressbook.properties
delete mode 100644 examples/org.eclipse.swt.examples/src/examples_browser.properties
delete mode 100644 examples/org.eclipse.swt.examples/src/examples_control.properties
delete mode 100644 examples/org.eclipse.swt.examples/src/examples_fileviewer.properties
delete mode 100644 examples/org.eclipse.swt.examples/src/examples_graphics.properties
delete mode 100644 examples/org.eclipse.swt.examples/src/examples_helloworld.properties
delete mode 100644 examples/org.eclipse.swt.examples/src/examples_hoverhelp.properties
delete mode 100644 examples/org.eclipse.swt.examples/src/examples_images.properties
delete mode 100644 examples/org.eclipse.swt.examples/src/examples_javaviewer.properties
delete mode 100644 examples/org.eclipse.swt.examples/src/examples_layout.properties
delete mode 100644 examples/org.eclipse.swt.examples/src/examples_paint.properties
delete mode 100644 examples/org.eclipse.swt.examples/src/examples_texteditor.properties
delete mode 100644 examples/org.eclipse.swt.examples/src/import.properties
delete mode 100755 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/addressbook/AddressBook.java
delete mode 100755 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/addressbook/DataEntryDialog.java
delete mode 100755 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/addressbook/FindListener.java
delete mode 100755 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/addressbook/SearchDialog.java
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/browserexample/BrowserExample.java
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/browserexample/document.gif
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/browserexample/eclipse01.bmp
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/browserexample/eclipse02.bmp
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/browserexample/eclipse03.bmp
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/browserexample/eclipse04.bmp
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/browserexample/eclipse05.bmp
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/browserexample/eclipse06.bmp
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/browserexample/eclipse07.bmp
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/browserexample/eclipse08.bmp
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/browserexample/eclipse09.bmp
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/browserexample/eclipse10.bmp
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/browserexample/eclipse11.bmp
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/browserexample/eclipse12.bmp
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/clipboard/ClipboardExample.java
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/clipboard/MyType.java
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/clipboard/MyTypeTransfer.java
delete mode 100755 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/AlignableTab.java
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/BrowserTab.java
delete mode 100755 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/ButtonTab.java
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/CComboTab.java
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/CLabelTab.java
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/CTabFolderTab.java
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/CanvasTab.java
delete mode 100755 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/ComboTab.java
delete mode 100755 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/ControlExample.java
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/CoolBarTab.java
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/CustomControlExample.java
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/DateTimeTab.java
delete mode 100755 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/DialogTab.java
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/ExpandBarTab.java
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/GroupTab.java
delete mode 100755 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/LabelTab.java
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/LinkTab.java
delete mode 100755 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/ListTab.java
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/MenuTab.java
delete mode 100755 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/ProgressBarTab.java
delete mode 100755 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/RangeTab.java
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/SashFormTab.java
delete mode 100755 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/SashTab.java
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/ScaleTab.java
delete mode 100755 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/ScrollableTab.java
delete mode 100755 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/ShellTab.java
delete mode 100755 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/SliderTab.java
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/SpinnerTab.java
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/StyledTextTab.java
delete mode 100755 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/Tab.java
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/TabFolderTab.java
delete mode 100755 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/TableTab.java
delete mode 100755 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/TextTab.java
delete mode 100755 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/ToolBarTab.java
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/ToolTipTab.java
delete mode 100755 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/TreeTab.java
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/backgroundImage.png
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/bold.bmp
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/bold_mask.bmp
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/browser-content.html
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/closedFolder.gif
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/italic.bmp
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/italic_mask.bmp
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/openFolder.gif
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/parentBackgroundImage.png
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/red.bmp
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/red_mask.bmp
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/strikeout.bmp
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/strikeout_mask.bmp
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/target.gif
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/underline.bmp
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/underline_mask.bmp
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/yellow.bmp
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/yellow_mask.bmp
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/dnd/DNDExample.java
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/dnd/ImageTransfer.java
delete mode 100755 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/FileViewer.java
delete mode 100755 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/IconCache.java
delete mode 100755 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/cmd_Copy.gif
delete mode 100755 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/cmd_Cut.gif
delete mode 100755 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/cmd_Delete.gif
delete mode 100755 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/cmd_Parent.gif
delete mode 100755 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/cmd_Paste.gif
delete mode 100755 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/cmd_Print.gif
delete mode 100755 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/cmd_Refresh.gif
delete mode 100755 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/cmd_Rename.gif
delete mode 100755 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/cmd_Search.gif
delete mode 100755 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/generic_example.gif
delete mode 100755 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/icon_ClosedDrive.gif
delete mode 100755 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/icon_ClosedFolder.gif
delete mode 100755 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/icon_File.gif
delete mode 100755 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/icon_OpenDrive.gif
delete mode 100755 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/icon_OpenFolder.gif
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/AdvancedGraphics.java
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/AlphaTab.java
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/AnimatedGraphicsTab.java
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/BallTab.java
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/BlackHoleTab.java
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/CardsTab.java
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/ColorListener.java
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/ColorMenu.java
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/CountDownTab.java
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/CurvesSWTTab.java
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/CurvesTab.java
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/CustomAlphaTab.java
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/CustomFontTab.java
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/FontBounceTab.java
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/GradientDialog.java
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/GradientTab.java
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/GraphicAntialiasTab.java
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/GraphicsBackground.java
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/GraphicsExample.java
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/GraphicsTab.java
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/ImageFlipTab.java
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/ImageScaleTab.java
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/ImageTransformTab.java
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/InterpolationTab.java
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/IntroTab.java
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/LineCapTab.java
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/LineJoinTab.java
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/LineStyleTab.java
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/LineTab.java
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/MazeTab.java
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/PathClippingAnimTab.java
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/PathClippingTab.java
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/PathTab.java
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/RGBTab.java
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/RegionClippingTab.java
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/ShapesTab.java
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/SpiralTab.java
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/StarPolyTab.java
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/TextAntialiasTab.java
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/ace_club.jpg
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/ace_diamond.jpg
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/ace_hearts.jpg
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/ace_spade.jpg
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/alpha_img1.png
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/alpha_img2.png
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/back.gif
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/cube.png
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/db.gif
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/font.gif
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/help.gif
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/home_nav.gif
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/houses.png
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/irmaos.jpg
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/maze.bmp
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/next.gif
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/ovals.png
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/pattern1.jpg
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/pattern2.jpg
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/pattern3.jpg
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/pause.gif
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/play.gif
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/swap.gif
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/swt.png
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/task.gif
delete mode 100755 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/helloworld/HelloWorld1.java
delete mode 100755 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/helloworld/HelloWorld2.java
delete mode 100755 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/helloworld/HelloWorld3.java
delete mode 100755 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/helloworld/HelloWorld4.java
delete mode 100755 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/helloworld/HelloWorld5.java
delete mode 100755 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/hoverhelp/HoverHelp.java
delete mode 100755 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/hoverhelp/information.gif
delete mode 100755 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/hoverhelp/warning.gif
delete mode 100755 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/imageanalyzer/ImageAnalyzer.java
delete mode 100755 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/javaviewer/JavaLineStyler.java
delete mode 100755 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/javaviewer/JavaViewer.java
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/layoutexample/FillLayoutTab.java
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/layoutexample/FormLayoutTab.java
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/layoutexample/GridLayoutTab.java
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/layoutexample/LayoutExample.java
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/layoutexample/RowLayoutTab.java
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/layoutexample/StackLayoutTab.java
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/layoutexample/Tab.java
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/AirbrushTool.java
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/BasicPaintSession.java
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/ContainerFigure.java
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/ContinuousPaintSession.java
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/DragPaintSession.java
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/EllipseFigure.java
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/EllipseTool.java
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/Figure.java
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/FigureDrawContext.java
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/LineFigure.java
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/LineTool.java
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/PaintExample.java
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/PaintSession.java
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/PaintSurface.java
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/PaintTool.java
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/PencilTool.java
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/PointFigure.java
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/PolyLineTool.java
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/RectangleFigure.java
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/RectangleTool.java
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/RoundedRectangleFigure.java
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/RoundedRectangleTool.java
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/SegmentedPaintSession.java
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/SolidEllipseFigure.java
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/SolidPolygonFigure.java
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/SolidRectangleFigure.java
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/SolidRoundedRectangleFigure.java
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/TextFigure.java
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/TextTool.java
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/Tool.java
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/ToolSettings.java
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/fill_none.gif
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/fill_outline.gif
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/fill_solid.gif
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/linestyle_dash.gif
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/linestyle_dashdot.gif
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/linestyle_dot.gif
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/linestyle_solid.gif
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/options_font.gif
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/tool_airbrush.gif
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/tool_ellipse.gif
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/tool_line.gif
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/tool_pencil.gif
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/tool_polyline.gif
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/tool_rectangle.gif
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/tool_roundedrectangle.gif
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/tool_text.gif
delete mode 100755 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/Images.java
delete mode 100755 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/TextEditor.java
delete mode 100755 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/blue.bmp
delete mode 100755 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/blue_mask.bmp
delete mode 100755 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/bold.bmp
delete mode 100755 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/bold_mask.bmp
delete mode 100755 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/erase.bmp
delete mode 100755 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/erase_mask.bmp
delete mode 100755 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/green.bmp
delete mode 100755 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/green_mask.bmp
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/italic.bmp
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/italic_mask.bmp
delete mode 100755 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/red.bmp
delete mode 100755 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/red_mask.bmp
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/strikeout.bmp
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/strikeout_mask.bmp
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/underline.bmp
delete mode 100644 examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/underline_mask.bmp
(limited to 'examples/org.eclipse.swt.examples/src')
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 29252e1fd6..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 Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-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 e9779907e8..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 Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-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 e38feaea49..0000000000
--- a/examples/org.eclipse.swt.examples/src/examples_control.properties
+++ /dev/null
@@ -1,255 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2007 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-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
-Image_Text_Buttons = Image and Text Buttons
-Control_Example = Control Example
-Parameters = Parameters
-Other = Other
-Enabled = Enabled
-Visible = Visible
-BackgroundColor = Background Color
-BackgroundImage = Background Image
-PopupMenu = Popup Menu
-Preferred = Preferred
-Styles = Styles
-Menu_Styles = Menu Styles
-MenuItem_Styles = MenuItem Styles
-Background_Mode = Background Mode on Parent
-Listeners = Listeners
-Select_Listeners = Select Listeners
-Listen = Listen
-Clear = Clear
-Set_Get = Set/Get API
-Parameter_Info = {0} e.g. {1}
-Info_int = 4
-Info_intA = 0,1,2
-Info_long = 4
-Info_longA = 0,1,2
-Info_char = c
-Info_charA = a,b,c
-Info_boolean = true
-Info_booleanA = true,true,false
-Info_String = hello
-Info_StringA = hello,there
-Info_Point = 0,0
-Info_TabItem = Tab 0
-Info_TabItemA = Tab 0,Tab 2
-Info_TableItem = Index:2
-Info_TableItemA = Index:2,Index:4
-Info_TreeItem = Node 1
-Info_TreeItemA = Node 1,Node 3
-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
-ImageText_ToolBar = Image and Text ToolBar
-Maximum = Maximum
-Minimum = Minimum
-Selection = Selection
-Increment = Increment
-Page_Increment = Page Increment
-Thumb = Thumb
-Digits = Digits
-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
-Sort_Indicator = Sort Indicator
-Header_Images = Header Images
-Sub_Images = Sub Images
-Lines_Visible = Lines Visible
-Moveable_Columns = Moveable Columns
-Resizable_Columns = Resizable Columns
-Multiple_Columns = Multiple Columns
-Locked = Locked
-Combo_child = Combo Child
-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
-Cascade = Cascade
-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
-FilterName_3 = All Files
-TableTitle_0 = Name
-TableTitle_1 = Type
-TableTitle_2 = Size
-TableTitle_3 = Modified
-TableLine0_0 =
-TableLine0_1 = classes
-TableLine0_2 = 0
-TableLine0_3 = today
-TableLine1_0 =
-TableLine1_1 = databases
-TableLine1_2 = 2556
-TableLine1_3 = tomorrow
-TableLine2_0 =
-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
-Change = &Change...
-Defaults = &Defaults
-Foreground_Color = Foreground Color
-Background_Color = Background Color
-Font = Font
-Item_Foreground_Color = Item 0 Foreground Color
-Item_Background_Color = Item 0 Background Color
-Item_Font = Item 0 Font
-Cell_Foreground_Color = Item 0 Col 1 Foreground Color
-Cell_Background_Color = Item 0 Col 1 Background Color
-Cell_Font = Item 0 Col 1 Font
-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
-Background_Style = Background
-StyledText_Styles = Text Styles
-StyledText_Style_Instructions = Select text, then style.
-Bold = Bold
-Italic = Italic
-Underline = Underline
-Strikeout = Strikeout
-Fill_X = Horizontal Fill
-Fill_Y = Vertical Fill
-Pack_Columns = Pack Columns
-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_Single_Tabs = Single Tab
-Set_Min_Visible = Minimize
-Set_Max_Visible = Maximize
-Set_Unselected_Close_Visible = Close on Unselected Tabs
-Set_Unselected_Image_Visible = Image on Unselected Tabs
-Selection_Foreground_Color = Selection Foreground Color
-Selection_Background_Color = Selection Background Color
-Set_Image = Set 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)
-Images = Images
-Accelerators = Accelerators
-Mnemonics = Mnemonics
-SubMenu = Sub-Menu
-SubSubMenu = Sub-Sub-Menu
-1Radio = Radio1
-2Radio = Radio2
-1RadioWithMnemonic = Radio&1
-2RadioWithMnemonic = Radio&2
-PushWithMnemonic = &Push
-RadioWithMnemonic = &Radio
-CheckWithMnemonic = &Check
-CascadeWithMnemonic = C&ascade
-PopupMenuHere = Popup Menu Here
-LinkText=Visit the Eclipse.org project and the SWT homepage.
-Tooltip = Tooltip: {0}
-Item1_Text = What is your favorite button?
-Item2_Text = What is your favorite icon?
-ToolTip_Title = Foxes vs. Dogs
-No_Icon = No Icon
-Show_In_Tray = Show In Tray
-BrowserNotFound = Browser not found: {0}
-MozillaNotFound = Cannot use SWT.MOZILLA style: {0}\nSee http://www.eclipse.org/swt/faq.php#howusemozilla for more information.
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 c0cddcf483..0000000000
--- a/examples/org.eclipse.swt.examples/src/examples_fileviewer.properties
+++ /dev/null
@@ -1,69 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2007 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-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 occurred while trying to copy "{0}" to "{1}".
-
-dialog.FailedDelete.title = Delete Files Error
-dialog.FailedDelete.description = An error occurred 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_graphics.properties b/examples/org.eclipse.swt.examples/src/examples_graphics.properties
deleted file mode 100644
index 5f65b32301..0000000000
--- a/examples/org.eclipse.swt.examples/src/examples_graphics.properties
+++ /dev/null
@@ -1,166 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2007 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-GraphicsExample=Graphics Example
-SWTGraphics=SWT Graphics
-Warning=Warning
-LibNotFound=Advanced graphics library not found. Some examples will not display.
-Settings=Settings
-Play=Play
-Pause=Pause
-Background=Background
-DoubleBuffer=Double Buffer
-White=White
-Black=Black
-Red=Red
-Green=Green
-Blue=Blue
-Cyan=Cyan
-Yellow=Yellow
-CustomColor=Custom Color
-CustomPattern=Custom Pattern
-Pattern1=Pink Losange
-Pattern2=Purple Checkers
-Pattern3=Blue Pentagon
-Animation=Animation
-StarPolygon=Star Polygon
-Line=Line
-BlackHole=Black Hole
-FillRule=Fill Rule:
-Polygons=Polygons
-Introduction=Introduction
-SWT=SWT
-Bounce=Bounce
-Font=Font
-Misc=Misc
-Countdown=Countdown
-LineWidth=Line Width
-Antialiasing=Antialiasing
-LineCap=Line Cap
-Spiral=Spiral
-Petals=Petals
-Gradient=Gradient
-GradImage=Gradient Image
-SwapColors=Swap Colors
-Curves=Curves
-Cubic=Cubic
-Quadratic=Quadratic
-Lines=Lines
-Flat=Flat
-Square=Square
-Round=Round
-LineStyles=Line Styles
-GradientDlgMsg=Please select two colors:
-GradientDlgButton1=Color 1
-GradientDlgButton2=Color 2
-GradientTabItem1=Color 1
-GradientTabItem2=Color 2
-Alpha=Alpha
-CustomFont=Custom Font
-Regular=Regular
-Italic=Italic
-Bold=Bold
-BoldItalic=Bold Italic
-FontFace=Face
-FontStyle=Style
-FontSize=Size
-Color=Color
-Clipping=Clipping
-PathClipping=Path Clipping
-Circles=Circles
-Rectangle=Rectangle
-Oval=Oval
-Word=Word
-Star=Star
-Triangles=Triangles
-Default=Default
-RegionClipping=Region Clipping
-Region1=Region 1
-Region2=Region 2
-Add=Add
-Sub=Subtract
-Inter=Intersect
-Interpolation=Interpolation
-Image=Image
-OriginalImg=Original Image
-House=House
-Question=Question
-Task=Task
-Cube=Cube
-Ovals=Ovals
-None=None
-Low=Low
-Default=Default
-High=High
-Transform=Transform
-Cards=Cards
-Solid=Solid
-Dash=Dash
-Dot=Dot
-DashDot=Dash Dot
-DashDotDot=Dash Dot Dot
-LineJoin=Line Join
-bevel=BEVEL
-miter=MITER
-round=ROUND
-Ball=Ball
-CustomAlpha=Custom Alpha
-Maze=Maze
-rgb=RGB
-Graphics=Graphics
-Flip=Flip
-Scale=Scale
-Rotate=Rotate
-xscale=X-Scale
-yscale=Y-Scale
-Invert=Invert
-Path=Path
-PathOper=Path Operations
-DrawPath=Draw Path
-FillPath=Fill Path
-ClosePath=Close Path
-FillColor=Fill Color
-Text=Text
-Shapes=Shapes
-Next=Next
-Back=Back
-AnimPathClipping=Animated Path Clipping
-##### ------------------ Tab Descriptions ------------------ #####
-AlphaDescription=This tab demonstrates alpha blending. It draws various shapes and images as alpha values change.
-BallDescription=This tab uses alpha blending to simulate \"ghosting\" of a ball in movement.
-BlackHoleDescription=This is a miscellaneous demonstration that makes use of the fillOval() operation to simulate a black hole.
-CardsDescription=This tab demonstrates various transformations, such as scaling, rotation, and translation.
-CountdownDescription=This miscellaneous tab presents a count down from 5 to 1, then displays SWT.
-CurvesSWTDescription=This tab presents cubic and quadratic curves that can be drawn. As a demonstration, cubic and quadratic curves are used to spell out \"SWT\". The user may reposition the cubic and quadratic handles.
-CurvesDescription=This tab presents cubic and quadratic curves that can be drawn. The user may reposition the cubic and quadratic handles
-CustomAlphaDescription=This tab demonstrates the use of alpha blending. It allows a user to specify a custom alpha value.
-CustomFontDescription=This tab demonstrates various text fonts. It allows the user to specify font parameters such as face, style and size.
-FontBounceDescription=This tab is an animated graphic. It presents the word SWT in different fonts as it bounces around the screen.
-GradientImageDescription=This tab is an animated graphic. It presents the word SWT in different fonts as it bounces around the screen.
-AntialiasingGraphicsDesc=This tab demonstrates antialiasing for graphics. Antialiasing is used for smoothing jagged edges in graphics. This tab allows the user to see the effects of different antialiasing values.
-FlipDescription=This tab demonstrates how an image can be flipped in various fashions.
-ScaleDescription=This tab demonstrates how an image can be scaled. Resize the shell, and the image will scale with it.
-TransformImgDescription=This tab demonstrates transformations, such as scaling, rotation, and invert. It allows the user to specify values for scaling and rotation.
-ImageInterpolationDesc=This tab shows the effects of applying various interpolation algorithms to images that have been stretched or shrunk.
-IntroductionDescription=This is the introduction tab. This demonstration makes use of a path clipping.
-LineCapDescription=This tab demonstrates various line caps applicable to a line.
-LineJoinDescription=This tab demonstrates various line joins. It allows a user to choose from bevel, miter and round.
-LineStylesDescription=This tab demonstrates line styles applicable to a line. It shows the use of the setLineStyle() method.
-LineDescription=This tab draws two lines.
-MazeDescription=This is a miscellaneous demonstration. Three objects move through the maze, each following a different path. Only one of the three follows the correct path.
-AnimPathClippingDesc=This tab demonstrates the use of path clipping. A clipping is the area onto which a drawing is made visible. The default clipping is the entire canvas (all the space in the right panel). However, one can set the clipping to be something different. In this tab, the clipping is the set of triangles, rectangles and the circle. When the blue rectangle is drawn, only the portions of the blue rectangle appearing in the clipping are visible.
-PathClippingDesc=This tab demonstrates the use of path clipping. A clipping is the area onto which a drawing is made visible. The default clipping is the entire canvas (all the space in the right panel). However, one can set the clipping to be something different.
-PathOperDescription=This tab demonstrates the use of paths. It allows the user to see the differences between filling, drawing and closing paths.
-rgbDescription=Miscellaneous tab that demonstrates emerging colors from layering other colors.
-RegionClippingDescription=This tab demonstrates how to apply a region clipping and the effects of applying one. It also demonstrates the operations that can be applied between two regions.
-ShapesDescription=This tab draws 3D shapes (in 2D) using various line styles.
-SpiralDescription=Miscellaneous tab that presents a spiral consisting of the number of petals specified.
-StarPolygonDescription=This tab draws a polygon and shows the effects of setting different fill rules: SWT.FILL_WINDING or SWT.FILL_EVEN_ODD
-AntialiasingTextDesc=This tab demonstrates antialiasing for text. Antialiasing is used for smoothing jagged edges in graphics. This tab allows the user to see the effects of different antialiasing values.
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 f440a18ebc..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 Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-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 85ca63de0c..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 Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-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 268989cab1..0000000000
--- a/examples/org.eclipse.swt.examples/src/examples_images.properties
+++ /dev/null
@@ -1,114 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2007 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-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}
-Max_length_string = Transparent pixel: -1 (none)
-Pixel_data_initial = Pixel data:
-Pixel_data_value = Pixel data: Bytes per line: {0,number,integer} \
- Scanline pad: {1,number,integer} {2} {3}
-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}
-Scroll_for_alpha = (Scroll down to see alpha data)
-File = &File
-OpenFile = &Open File...\tCtrl+O
-OpenURL = Open &URL...\tCtrl+U
-Reopen = &Reopen
-LoadFile = &Load File...\tCtrl+L
-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, jfif, jpeg, jpg, png, tif, tiff):
-All_images = All Image Files
-Loading_lc = loading
-Saving_lc = saving
-Unknown_extension = Unknown file extension: {0}\nPlease use bmp, gif, ico, jfif, jpeg, jpg, png, tif, or tiff.
-Overwrite = Overwrite {0}?
-Save_all = Save all {0} images into a multi-image file?
-Analyzer_on = Image Analyzer on: {0}
-Reloading_lc = reloading
-Color_at = Image color at ({0,number,integer}, {1,number,integer}) \
- - pixel {2,number,integer} [0x{3}] - is {4} [0x{5}] {6}
-RGB = RGB '{'{0}, {1}, {2}'}'
-RGBA = RGBA '{'{0}, {1}, {2}, {3}'}'
-Color_at_transparent = (transparent)
-Creating_image = Creating image # {0,number,integer} from
-OK = OK
-Cancel = Cancel
-Stop = &Stop
-Creating_from = Creating image read from
-Bytes_per_line = Bytes per line:
-Scanline_pad = Scanline pad:
-Printing_error = Printing error:
-Error = Error {0} file\n{1}\n\n
-Unsupported_lc = unsupported
-None_lc = none
-Background_lc = background
-Previous_lc = previous
-Unspecified_lc = unspecified
-Unknown_ac = UNKNOWN
-Forever_lc = forever
-Save_as_type = Save As BMP Type...
-Save_as_type_label = Select the type of BMP to save as:
-Save_as_type_no_compress = No Compression
-Save_as_type_rle_compress = RLE Compression
-Save_as_type_os2 = OS/2 BMP
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 47afc732c2..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 Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-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 921b32e78f..0000000000
--- a/examples/org.eclipse.swt.examples/src/examples_layout.properties
+++ /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 Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-window.title = SWT Layouts
-
-Add = &Add
-Delete = &Delete
-Clear = &Clear
-Children = Children
-Type = Type
-Top_Control = Top Control
-Layout = Layout
-Preferred_Size = Preferred Size
-Generate_Code = &Generate Code
-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_paint.properties b/examples/org.eclipse.swt.examples/src/examples_paint.properties
deleted file mode 100644
index b2ecec5a13..0000000000
--- a/examples/org.eclipse.swt.examples/src/examples_paint.properties
+++ /dev/null
@@ -1,115 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2005 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-error.CouldNotLoadResources = Unable to load resources
-window.title = Paint
-
-menu.Tools.label = Tools
-menu.Options.label = Options
-
-tool.Pencil.label = Pencil
-tool.Pencil.tooltip = Pencil tool
-tool.Pencil.image = tool_pencil.gif
-tool.Pencil.description = Selects the Pencil tool.
-
-tool.Airbrush.label = Airbrush
-tool.Airbrush.tooltip = Airbrush tool
-tool.Airbrush.image = tool_airbrush.gif
-tool.Airbrush.description = Selects the Airbrush tool.
-
-tool.Line.label = Line
-tool.Line.tooltip = Line tool
-tool.Line.image = tool_line.gif
-tool.Line.description = Selects the Line tool.
-
-tool.PolyLine.label = Polygon
-tool.PolyLine.tooltip = Polygon tool
-tool.PolyLine.image = tool_polyline.gif
-tool.PolyLine.description = Selects the PolyLine tool.
-
-tool.Rectangle.label = Rectangle
-tool.Rectangle.tooltip = Rectangle tool
-tool.Rectangle.image = tool_rectangle.gif
-tool.Rectangle.description = Selects the Rectangle tool.
-
-tool.Ellipse.label = Ellipse
-tool.Ellipse.tooltip = Ellipse tool
-tool.Ellipse.image = tool_ellipse.gif
-tool.Ellipse.description = Selects the Ellipse tool.
-
-tool.RoundedRectangle.label = Rounded Rectangle
-tool.RoundedRectangle.tooltip = Rounded Rectangle tool
-tool.RoundedRectangle.image = tool_roundedrectangle.gif
-tool.RoundedRectangle.description = Selects the Rounded Rectangle tool.
-
-tool.Text.label = Text
-tool.Text.tooltip = Text tool
-tool.Text.image = 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 =
-
-fill.None.label = No Fill
-fill.None.tooltip = No fill mode
-fill.None.image = fill_none.gif
-fill.None.description = Selects No Fill mode.
-
-fill.Outline.label = Outline Fill
-fill.Outline.tooltip = Outline fill mode
-fill.Outline.image = fill_outline.gif
-fill.Outline.description = Selects Outline Fill mode.
-
-fill.Solid.label = Solid Fill
-fill.Solid.tooltip = Solid fill mode
-fill.Solid.image = fill_solid.gif
-fill.Solid.description = Selects Solid Fill mode.
-
-linestyle.Solid.label = Solid Line
-linestyle.Solid.tooltip = Solid line style
-linestyle.Solid.image = linestyle_solid.gif
-linestyle.Solid.description = Select Solid Line style.
-
-linestyle.Dot.label = Dotted Line
-linestyle.Dot.tooltip = Dotted line style
-linestyle.Dot.image = linestyle_dot.gif
-linestyle.Dot.description = Select Dotted Line style.
-
-linestyle.Dash.label = Dashed Line
-linestyle.Dash.tooltip = Dashed line style
-linestyle.Dash.image = 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 = 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 = 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/src/examples_texteditor.properties b/examples/org.eclipse.swt.examples/src/examples_texteditor.properties
deleted file mode 100644
index 1c55fe63ff..0000000000
--- a/examples/org.eclipse.swt.examples/src/examples_texteditor.properties
+++ /dev/null
@@ -1,22 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2005 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-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
-Bold=Bold
-Italic=Italic
-Underline=Underline
-Strikeout=Strikeout
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 1f7937eab8..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 Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-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 = <>
-vmargs.org/eclipse/swt/examples/addressbook/AddressBook.java%AddressBook = "-Djava.library.path=<>"
-vmargs.org/eclipse/swt/examples/controlexample/ControlExample.java%ControlExample = "-Djava.library.path=<>"
-vmargs.org/eclipse/swt/examples/fileviewer/FileViewer.java%FileViewer = "-Djava.library.path=<>"
-vmargs.org/eclipse/swt/examples/helloworld/HelloWorld1.java%HelloWorld1 = "-Djava.library.path=<>"
-vmargs.org/eclipse/swt/examples/helloworld/HelloWorld2.java%HelloWorld2 = "-Djava.library.path=<>"
-vmargs.org/eclipse/swt/examples/helloworld/HelloWorld3.java%HelloWorld3 = "-Djava.library.path=<>"
-vmargs.org/eclipse/swt/examples/helloworld/HelloWorld4.java%HelloWorld4 = "-Djava.library.path=<>"
-vmargs.org/eclipse/swt/examples/helloworld/HelloWorld5.java%HelloWorld5 = "-Djava.library.path=<>"
-vmargs.org/eclipse/swt/examples/hoverhelp/HoverHelp.java%HoverHelp = "-Djava.library.path=<>"
-vmargs.org/eclipse/swt/examples/imageanalyzer/ImageAnalyzer.java%ImageAnalyzer = "-Djava.library.path=<>"
-vmargs.org/eclipse/swt/examples/javaviewer/JavaViewer.java%JavaViewer = "-Djava.library.path=<>"
-vmargs.org/eclipse/swt/examples/texteditor/TextEditor.java%TextEditor = "-Djava.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 d16cdfec09..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/addressbook/AddressBook.java
+++ /dev/null
@@ -1,881 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-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 org.eclipse.swt
- * 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 Menu
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 String
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);
- 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) {
- table.setSortColumn(table.getColumn(column));
- table.setSortDirection(SWT.DOWN);
- 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
- table.setSortDirection(SWT.UP);
- 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 Menu
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.NONE);
- 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.NONE);
- 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.NONE);
- 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.NONE);
- 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.NONE);
- 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.NONE);
- 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.NONE);
- 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 Menu
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.PUSH);
- 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.NONE);
- 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.NONE);
- 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.NONE);
- 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.NONE);
- 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 Menu
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.NONE);
- 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.NONE);
- 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.PUSH);
- 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.PUSH);
- 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.PUSH);
- 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.PUSH);
- 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.PUSH);
- 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.PUSH);
- 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 Menu
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.NONE);
- 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 3a51431b43..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/addressbook/DataEntryDialog.java
+++ /dev/null
@@ -1,163 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-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 org.eclipse.swt
- * libraries to implement a dialog that accepts basic personal information that
- * is added to a Table
widget or edits a TableItem
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.NONE);
- 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.NONE);
- 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 Text
widgets in the dialog in a
- * String
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 Text
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 Text
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 1732505df3..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 Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-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 24b66e2e85..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 Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-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 org.eclipse.swt
- * 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 824e58763f..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/browserexample/BrowserExample.java
+++ /dev/null
@@ -1,372 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-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.io.*;
-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) {
- InputStream sourceStream = clazz.getResourceAsStream(imageLocations[i]);
- ImageData source = new ImageData(sourceStream);
- ImageData mask = source.getTransparencyMask();
- images[i] = new Image(null, source, mask);
- try {
- sourceStream.close();
- } catch (IOException e) {
- e.printStackTrace ();
- }
- }
- }
- 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"));
- InputStream stream = BrowserExample.class.getResourceAsStream(iconLocation);
- Image icon = new Image(display, stream);
- shell.setImage(icon);
- try {
- stream.close();
- } catch (IOException e) {
- e.printStackTrace();
- }
- 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
Binary files a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/browserexample/document.gif and /dev/null 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
Binary files a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/browserexample/eclipse01.bmp and /dev/null 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
Binary files a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/browserexample/eclipse02.bmp and /dev/null 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
Binary files a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/browserexample/eclipse03.bmp and /dev/null 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
Binary files a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/browserexample/eclipse04.bmp and /dev/null 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
Binary files a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/browserexample/eclipse05.bmp and /dev/null 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
Binary files a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/browserexample/eclipse06.bmp and /dev/null 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
Binary files a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/browserexample/eclipse07.bmp and /dev/null 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
Binary files a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/browserexample/eclipse08.bmp and /dev/null 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
Binary files a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/browserexample/eclipse09.bmp and /dev/null 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
Binary files a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/browserexample/eclipse10.bmp and /dev/null 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
Binary files a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/browserexample/eclipse11.bmp and /dev/null 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
Binary files a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/browserexample/eclipse12.bmp and /dev/null 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 c2097c4b1c..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/clipboard/ClipboardExample.java
+++ /dev/null
@@ -1,611 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-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.graphics.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-
-public class ClipboardExample {
-
- Clipboard clipboard;
- Shell shell;
- 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 FillLayout());
-
- ScrolledComposite sc = new ScrolledComposite(shell, SWT.H_SCROLL | SWT.V_SCROLL);
- Composite parent = new Composite(sc, SWT.NONE);
- sc.setContent(parent);
- parent.setLayout(new GridLayout(2, true));
-
- Group copyGroup = new Group(parent, 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(parent, 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(parent, 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(parent, 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(parent, SWT.BORDER);
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan = 2;
- data.heightHint = 60;
- status.setLayoutData(data);
-
- createTextTransfer(copyGroup, pasteGroup);
- createRTFTransfer(copyGroup, pasteGroup);
- createHTMLTransfer(copyGroup, pasteGroup);
- createFileTransfer(copyGroup, pasteGroup);
- createImageTransfer(copyGroup, pasteGroup);
- createMyTransfer(copyGroup, pasteGroup);
- createControlTransfer(controlGroup);
- createAvailableTypes(typesGroup);
-
- sc.setMinSize(parent.computeSize(SWT.DEFAULT, SWT.DEFAULT));
- sc.setExpandHorizontal(true);
- sc.setExpandVertical(true);
-
- Point size = shell.computeSize(SWT.DEFAULT, SWT.DEFAULT);
- Rectangle monitorArea = shell.getMonitor().getClientArea();
- shell.setSize(Math.min(size.x, monitorArea.width - 20), Math.min(size.y, monitorArea.height - 20));
- 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$
- final Text 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$
- final Text 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+" 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$
- final Text 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+"Hello World");
- GridData data = new GridData(GridData.FILL_HORIZONTAL);
- data.heightHint = data.widthHint = SIZE;
- copyHtmlText.setLayoutData(data);
- Button b = new Button(copyParent, SWT.PUSH);
- b.setText("Copy");
- b.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- String data = copyHtmlText.getText();
- if (data.length() > 0) {
- status.setText("");
- clipboard.setContents(new Object[] {data}, new Transfer[] {HTMLTransfer.getInstance()});
- } else {
- status.setText("nothing to copy");
- }
- }
- });
-
- l = new Label(pasteParent, SWT.NONE);
- l.setText("HTMLTransfer:"); //$NON-NLS-1$
- final Text pasteHtmlText = 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;
- pasteHtmlText.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(HTMLTransfer.getInstance());
- if (data != null && data.length() > 0) {
- status.setText("");
- pasteHtmlText.setText("start paste>"+data+" 0){
- 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$
- final Table 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 createImageTransfer(Composite copyParent, Composite pasteParent){
- final Image[] copyImage = new Image[] {null};
- Label l = new Label(copyParent, SWT.NONE);
- l.setText("ImageTransfer:"); //$NON-NLS-1$
-
- Composite c = new Composite(copyParent, SWT.NONE);
- c.setLayout(new GridLayout(1, false));
- GridData data = new GridData(GridData.FILL_HORIZONTAL);
- c.setLayoutData(data);
-
- final Canvas copyImageCanvas = new Canvas(c, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.heightHint = data.widthHint = SIZE;
- copyImageCanvas.setLayoutData(data);
-
- final Point copyOrigin = new Point(0, 0);
- final ScrollBar copyHBar = copyImageCanvas.getHorizontalBar();
- copyHBar.setEnabled(false);
- copyHBar.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- if (copyImage[0] != null) {
- int hSelection = copyHBar.getSelection();
- int destX = -hSelection - copyOrigin.x;
- Rectangle rect = copyImage[0].getBounds();
- copyImageCanvas.scroll(destX, 0, 0, 0, rect.width, rect.height, false);
- copyOrigin.x = -hSelection;
- }
- }
- });
- final ScrollBar copyVBar = copyImageCanvas.getVerticalBar();
- copyVBar.setEnabled(false);
- copyVBar.addListener(SWT.Selection, new Listener() {
- public void handleEvent (Event e) {
- if (copyImage[0] != null) {
- int vSelection = copyVBar.getSelection();
- int destY = -vSelection - copyOrigin.y;
- Rectangle rect = copyImage[0].getBounds();
- copyImageCanvas.scroll(0, destY, 0, 0, rect.width, rect.height, false);
- copyOrigin.y = -vSelection;
- }
- }
- });
- copyImageCanvas.addListener(SWT.Paint, new Listener() {
- public void handleEvent(Event e) {
- if(copyImage[0] != null) {
- GC gc = e.gc;
- gc.drawImage(copyImage[0], copyOrigin.x, copyOrigin.y);
- Rectangle rect = copyImage[0].getBounds();
- Rectangle client = copyImageCanvas.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);
- }
- gc.dispose();
- }
- }
- });
- Button openButton = new Button(c, SWT.PUSH);
- openButton.setText("Open Image");
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalAlignment = SWT.CENTER;
- openButton.setLayoutData(data);
- openButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- FileDialog dialog = new FileDialog (shell, SWT.OPEN);
- dialog.setText("Open an image file or cancel");
- String string = dialog.open ();
- if (string != null) {
- if (copyImage[0] != null) {
- System.out.println("CopyImage");
- copyImage[0].dispose();
- }
- copyImage[0] = new Image(e.display, string);
- copyVBar.setEnabled(true);
- copyHBar.setEnabled(true);
- copyOrigin.x = 0; copyOrigin.y = 0;
- Rectangle rect = copyImage[0].getBounds();
- Rectangle client = copyImageCanvas.getClientArea();
- copyHBar.setMaximum(rect.width);
- copyVBar.setMaximum(rect.height);
- copyHBar.setThumb(Math.min(rect.width, client.width));
- copyVBar.setThumb(Math.min(rect.height, client.height));
- copyImageCanvas.scroll(0, 0, 0, 0, rect.width, rect.height, true);
- copyVBar.setSelection(0);
- copyHBar.setSelection(0);
- copyImageCanvas.redraw();
- }
- }
- });
- Button b = new Button(copyParent, SWT.PUSH);
- b.setText("Copy");
- b.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- if (copyImage[0] != null) {
- status.setText("");
- clipboard.setContents(new Object[] {copyImage[0].getImageData()}, new Transfer[] {ImageTransfer.getInstance()});
- } else {
- status.setText("nothing to copy");
- }
- }
- });
-
- final Image[] pasteImage = new Image[] {null};
- l = new Label(pasteParent, SWT.NONE);
- l.setText("ImageTransfer:");
- final Canvas pasteImageCanvas = new Canvas(pasteParent, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);
- data = new GridData(GridData.FILL_HORIZONTAL | GridData.FILL_VERTICAL);
- data.heightHint = data.widthHint = SIZE;
- pasteImageCanvas.setLayoutData(data);
- final Point pasteOrigin = new Point(0, 0);
- final ScrollBar pasteHBar = pasteImageCanvas.getHorizontalBar();
- pasteHBar.setEnabled(false);
- pasteHBar.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- if (pasteImage[0] != null) {
- int hSelection = pasteHBar.getSelection();
- int destX = -hSelection - pasteOrigin.x;
- Rectangle rect = pasteImage[0].getBounds();
- pasteImageCanvas.scroll(destX, 0, 0, 0, rect.width, rect.height, false);
- pasteOrigin.x = -hSelection;
- }
- }
- });
- final ScrollBar pasteVBar = pasteImageCanvas.getVerticalBar();
- pasteVBar.setEnabled(false);
- pasteVBar.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event e) {
- if (pasteImage[0] != null) {
- int vSelection = pasteVBar.getSelection();
- int destY = -vSelection - pasteOrigin.y;
- Rectangle rect = pasteImage[0].getBounds();
- pasteImageCanvas.scroll(0, destY, 0, 0, rect.width, rect.height, false);
- pasteOrigin.y = -vSelection;
- }
- }
- });
- pasteImageCanvas.addListener(SWT.Paint, new Listener() {
- public void handleEvent(Event e) {
- if(pasteImage[0] != null) {
- GC gc = e.gc;
- gc.drawImage(pasteImage[0], pasteOrigin.x, pasteOrigin.y);
- Rectangle rect = pasteImage[0].getBounds();
- Rectangle client = pasteImageCanvas.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);
- }
- gc.dispose();
- }
- }
- });
- b = new Button(pasteParent, SWT.PUSH);
- b.setText("Paste");
- b.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- ImageData data =(ImageData)clipboard.getContents(ImageTransfer.getInstance());
- if (data != null) {
- if (pasteImage[0] != null) {
- System.out.println("PasteImage");
- pasteImage[0].dispose();
- }
- status.setText("");
- pasteImage[0] = new Image(e.display, data);
- pasteVBar.setEnabled(true);
- pasteHBar.setEnabled(true);
- pasteOrigin.x = 0; pasteOrigin.y = 0;
- Rectangle rect = pasteImage[0].getBounds();
- Rectangle client = pasteImageCanvas.getClientArea();
- pasteHBar.setMaximum(rect.width);
- pasteVBar.setMaximum(rect.height);
- pasteHBar.setThumb(Math.min(rect.width, client.width));
- pasteVBar.setThumb(Math.min(rect.height, client.height));
- pasteImageCanvas.scroll(0, 0, 0, 0, rect.width, rect.height, true);
- pasteVBar.setSelection(0);
- pasteHBar.setSelection(0);
- pasteImageCanvas.redraw();
- } 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 94cdfcd786..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 Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-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 4d09e3f901..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/clipboard/MyTypeTransfer.java
+++ /dev/null
@@ -1,103 +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 Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-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 (!checkMyType(object) || !isSupportedType(transferData)) {
- DND.error(DND.ERROR_INVALID_DATA);
- }
- 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};
-}
-boolean checkMyType(Object object) {
- if (object == null || !(object instanceof MyType[]) || ((MyType[])object).length == 0) return false;
- MyType[] myTypes = (MyType[])object;
- for (int i = 0; i < myTypes.length; i++) {
- if (myTypes[i] == null ||
- myTypes[i].firstName == null ||
- myTypes[i].firstName.length() == 0 ||
- myTypes[i].lastName == null ||
- myTypes[i].lastName.length() == 0) return false;
- }
- return true;
-}
-protected boolean validate(Object object) {
- return checkMyType(object);
-}
-}
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 075ee21e96..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/AlignableTab.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-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.*;
-
-/**
- * AlignableTab
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 "Other" group.
- */
- void createOtherGroup () {
- super.createOtherGroup ();
-
- /* Create the group */
- alignmentGroup = new Group (otherGroup, 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 ();
- Widget [] widgets = getExampleWidgets ();
- if (widgets.length != 0) {
- leftButton.setSelection ((widgets [0].getStyle () & SWT.LEFT) != 0);
- centerButton.setSelection ((widgets [0].getStyle () & SWT.CENTER) != 0);
- rightButton.setSelection ((widgets [0].getStyle () & SWT.RIGHT) != 0);
- }
- }
-}
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/BrowserTab.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/BrowserTab.java
deleted file mode 100644
index 2e6a377681..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/BrowserTab.java
+++ /dev/null
@@ -1,306 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.controlexample;
-
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.browser.*;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-
-class BrowserTab extends Tab {
-
- /* Example widgets and groups that contain them */
- Browser browser;
- Group browserGroup;
-
- /* Style widgets added to the "Style" group */
- Button mozillaButton;
-
- String errorMessage;
-
- /**
- * Creates the Tab within a given instance of ControlExample.
- */
- BrowserTab(ControlExample instance) {
- super(instance);
- }
-
- void createBackgroundModeGroup () {
- // Browser does not need a background mode group.
- }
-
- void createColorAndFontGroup () {
- // Browser does not need a color and font group.
- }
-
- /**
- * Creates the "Example" group.
- */
- void createExampleGroup () {
- super.createExampleGroup ();
-
- /* Create a group for the browser */
- browserGroup = new Group (exampleGroup, SWT.NONE);
- browserGroup.setLayout (new GridLayout ());
- browserGroup.setLayoutData (new GridData (SWT.FILL, SWT.FILL, true, true));
- browserGroup.setText ("Browser");
- }
-
- /**
- * Creates the "Example" widgets.
- */
- void createExampleWidgets () {
-
- /* Compute the widget style */
- int style = getDefaultStyle();
- if (borderButton.getSelection ()) style |= SWT.BORDER;
- if (mozillaButton.getSelection ()) style |= SWT.MOZILLA;
-
- /* Create the example widgets */
- try {
- browser = new Browser (browserGroup, style);
- } catch (SWTError e) { //XPCOM error
- try {
- browser = new Browser (browserGroup, style &~ SWT.MOZILLA);
- } catch (SWTError e2) { // Unsupported platform
- errorMessage = e.getMessage();
- return;
- }
- MessageBox dialog = new MessageBox(shell, SWT.ICON_WARNING | SWT.OK);
- dialog.setMessage(ControlExample.getResourceString("MozillaNotFound", new String [] {e.getMessage()}));
- dialog.open();
- }
-
- InputStream htmlStream= ControlExample.class.getResourceAsStream("browser-content.html");
- BufferedReader br= new BufferedReader(new InputStreamReader(htmlStream));
- StringBuffer sb= new StringBuffer(300);
- try {
- int read= 0;
- while ((read= br.read()) != -1)
- sb.append((char) read);
- } catch (IOException e) {
- log(e.getMessage());
- } finally {
- try {
- br.close();
- } catch (IOException e) {
- log(e.getMessage());
- }
- }
- String text= sb.toString();
- browser.setText(text);
- }
-
- /**
- * Creates the "Other" group. This is typically
- * a child of the "Control" group.
- */
- void createOtherGroup () {
- super.createOtherGroup ();
- backgroundImageButton.dispose ();
- }
-
- /**
- * Creates the "Size" group. The "Size" group contains
- * controls that allow the user to change the size of
- * the example widgets.
- */
- void createSizeGroup () {
- super.createSizeGroup ();
-
- /* Set the default state for Browser to fill horizontally & vertically. */
- fillHButton.setSelection (true);
- fillVButton.setSelection (true);
- }
-
- /**
- * Creates the "Style" group.
- */
- void createStyleGroup () {
- super.createStyleGroup ();
-
- /* Create the extra widgets */
- mozillaButton = new Button (styleGroup, SWT.CHECK);
- mozillaButton.setText ("SWT.MOZILLA");
- borderButton = new Button (styleGroup, SWT.CHECK);
- borderButton.setText ("SWT.BORDER");
- }
-
- /**
- * Creates the tab folder page.
- *
- * @param tabFolder org.eclipse.swt.widgets.TabFolder
- * @return the new page for the tab folder
- */
- Composite createTabFolderPage (final 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 ();
- }
- });
-
- /*
- * Add a selection listener to the tabFolder to bring up a
- * dialog if this platform does not support the Browser.
- */
- tabFolder.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- if (errorMessage != null && tabFolder.getSelection()[0].getText().equals(getTabText())) {
- MessageBox dialog = new MessageBox(shell, SWT.ICON_WARNING | SWT.OK);
- dialog.setMessage(ControlExample.getResourceString("BrowserNotFound", new String [] {errorMessage}));
- dialog.open();
- }
- }
- });
-
- return tabFolderPage;
- }
-
- public static String getContents(InputStream in) throws IOException {
- BufferedReader br= new BufferedReader(new InputStreamReader(in));
-
- StringBuffer sb= new StringBuffer(300);
- try {
- int read= 0;
- while ((read= br.read()) != -1)
- sb.append((char) read);
- } finally {
- br.close();
- }
- return sb.toString();
- }
-
- /**
- * Gets the list of custom event names.
- *
- * @return an array containing custom event names
- */
- String [] getCustomEventNames () {
- return new String [] {"CloseWindowListener", "LocationListener", "OpenWindowListener",
- "ProgressListener", "StatusTextListener", "TitleListener", "VisibilityWindowListener"};
- }
-
- /**
- * Gets the "Example" widget children.
- */
- Widget [] getExampleWidgets () {
- if (browser != null) return new Widget [] {browser};
- return super.getExampleWidgets();
- }
-
- /**
- * Returns a list of set/get API method names (without the set/get prefix)
- * that can be used to set/get values in the example control(s).
- */
- String[] getMethodNames() {
- return new String[] {"Text", "Url", "ToolTipText"};
- }
-
- /**
- * Gets the text for the tab folder item.
- */
- String getTabText () {
- return "Browser";
- }
-
- /**
- * Hooks the custom listener specified by eventName.
- */
- void hookCustomListener (final String eventName) {
- if (browser == null) return;
- if (eventName == "CloseWindowListener") {
- browser.addCloseWindowListener (new CloseWindowListener () {
- public void close(WindowEvent event) {
- log (eventName, event);
- }
- });
- }
- if (eventName == "LocationListener") {
- browser.addLocationListener (new LocationListener () {
- public void changed(LocationEvent event) {
- log (eventName + ".changed", event);
- }
- public void changing(LocationEvent event) {
- log (eventName + ".changing", event);
- }
- });
- }
- if (eventName == "OpenWindowListener") {
- browser.addOpenWindowListener (new OpenWindowListener () {
- public void open(WindowEvent event) {
- log (eventName, event);
- }
- });
- }
- if (eventName == "ProgressListener") {
- browser.addProgressListener (new ProgressListener () {
- public void changed(ProgressEvent event) {
- log (eventName + ".changed", event);
- }
- public void completed(ProgressEvent event) {
- log (eventName + ".completed", event);
- }
- });
- }
- if (eventName == "StatusTextListener") {
- browser.addStatusTextListener (new StatusTextListener () {
- public void changed(StatusTextEvent event) {
- log (eventName, event);
- }
- });
- }
- if (eventName == "TitleListener") {
- browser.addTitleListener (new TitleListener () {
- public void changed(TitleEvent event) {
- log (eventName, event);
- }
- });
- }
- if (eventName == "VisibilityWindowListener") {
- browser.addVisibilityWindowListener (new VisibilityWindowListener () {
- public void hide(WindowEvent event) {
- log (eventName + ".hide", event);
- }
- public void show(WindowEvent event) {
- log (eventName + ".show", event);
- }
- });
- }
- }
-
- boolean rtlSupport() {
- return false;
- }
-
- /**
- * Sets the state of the "Example" widgets.
- */
- void setExampleWidgetState () {
- super.setExampleWidgetState ();
- mozillaButton.setSelection (browser == null ? false : (browser.getStyle () & SWT.MOZILLA) != 0);
- borderButton.setSelection ((browser.getStyle () & SWT.BORDER) != 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 8dabaa947e..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/ButtonTab.java
+++ /dev/null
@@ -1,233 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-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.*;
-
-/**
- * ButtonTab
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, button7, button8, button9;
- Group textButtonGroup, imageButtonGroup, imagetextButtonGroup;
-
- /* 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 (SWT.FILL, SWT.FILL, true, true));
- 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 (SWT.FILL, SWT.FILL, true, true));
- imageButtonGroup.setText (ControlExample.getResourceString("Image_Buttons"));
-
- /* Create a group for the image and text buttons */
- imagetextButtonGroup = new Group(exampleGroup, SWT.NONE);
- gridLayout = new GridLayout();
- imagetextButtonGroup.setLayout(gridLayout);
- gridLayout.numColumns = 3;
- imagetextButtonGroup.setLayoutData (new GridData (SWT.FILL, SWT.FILL, true, true));
- imagetextButtonGroup.setText (ControlExample.getResourceString("Image_Text_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]);
- button7 = new Button(imagetextButtonGroup, style);
- button7.setText(ControlExample.getResourceString("One"));
- button7.setImage(instance.images[ControlExample.ciClosedFolder]);
- button8 = new Button(imagetextButtonGroup, style);
- button8.setText(ControlExample.getResourceString("Two"));
- button8.setImage(instance.images[ControlExample.ciOpenFolder]);
- button9 = new Button(imagetextButtonGroup, style);
- button9.setText(ControlExample.getResourceString("Three"));
- button9.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.
- */
- Widget [] getExampleWidgets () {
- return new Widget [] {button1, button2, button3, button4, button5, button6, button7, button8, button9};
- }
-
- /**
- * Returns a list of set/get API method names (without the set/get prefix)
- * that can be used to set/get values in the example control(s).
- */
- String[] getMethodNames() {
- return new String[] {"Selection", "Text", "ToolTipText"};
- }
-
- /**
- * 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);
- button7.setAlignment (alignment);
- button8.setAlignment (alignment);
- button9.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 38bbbf8d0f..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/CComboTab.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-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("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.
- */
- 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 (SWT.FILL, SWT.FILL, true, true));
- 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.
- */
- Widget [] getExampleWidgets () {
- return new Widget [] {combo1};
- }
-
- /**
- * Returns a list of set/get API method names (without the set/get prefix)
- * that can be used to set/get values in the example control(s).
- */
- String[] getMethodNames() {
- return new String[] {"Editable", "Items", "Selection", "Text", "TextLimit", "ToolTipText", "VisibleItemCount"};
- }
-
- /**
- * 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 6a68c58b6b..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/CLabelTab.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-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 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 (SWT.FILL, SWT.FILL, true, true));
- 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") + "\n" + ControlExample.getResourceString("One_Two_Three"));
- }
-
- /**
- * 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");
- }
-
- /**
- * Gets the "Example" widget children.
- */
- Widget [] getExampleWidgets () {
- return new Widget [] {label1, label2, label3};
- }
-
- /**
- * Returns a list of set/get API method names (without the set/get prefix)
- * that can be used to set/get values in the example control(s).
- */
- String[] getMethodNames() {
- return new String[] {"Text", "ToolTipText"};
- }
-
- /**
- * 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 6061125660..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/CTabFolderTab.java
+++ /dev/null
@@ -1,446 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-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 */
- static final int SELECTION_FOREGROUND_COLOR = 3;
- static final int SELECTION_BACKGROUND_COLOR = 4;
- static final int ITEM_FONT = 5;
- Color selectionForegroundColor, selectionBackgroundColor;
- Font itemFont;
-
- /* Other widgets added to the "Other" group */
- Button simpleTabButton, singleTabButton, imageButton, showMinButton, showMaxButton, unselectedCloseButton, unselectedImageButton;
-
- /**
- * Creates the Tab within a given instance of ControlExample.
- */
- CTabFolderTab(ControlExample instance) {
- super(instance);
- }
-
- /**
- * Creates the "Colors and Fonts" group.
- */
- void createColorAndFontGroup () {
- super.createColorAndFontGroup();
-
- TableItem item = new TableItem(colorAndFontTable, SWT.None);
- item.setText(ControlExample.getResourceString ("Selection_Foreground_Color"));
- item = new TableItem(colorAndFontTable, SWT.None);
- item.setText(ControlExample.getResourceString ("Selection_Background_Color"));
- item = new TableItem(colorAndFontTable, SWT.None);
- item.setText(ControlExample.getResourceString ("Item_Font"));
-
- shell.addDisposeListener(new DisposeListener() {
- public void widgetDisposed(DisposeEvent event) {
- if (selectionBackgroundColor != null) selectionBackgroundColor.dispose();
- if (selectionForegroundColor != null) selectionForegroundColor.dispose();
- if (itemFont != null) itemFont.dispose();
- selectionBackgroundColor = null;
- selectionForegroundColor = null;
- itemFont = null;
- }
- });
- }
-
- void changeFontOrColor(int index) {
- switch (index) {
- case SELECTION_FOREGROUND_COLOR: {
- Color oldColor = selectionForegroundColor;
- if (oldColor == null) oldColor = tabFolder1.getSelectionForeground();
- colorDialog.setRGB(oldColor.getRGB());
- RGB rgb = colorDialog.open();
- if (rgb == null) return;
- oldColor = selectionForegroundColor;
- selectionForegroundColor = new Color (display, rgb);
- setSelectionForeground ();
- if (oldColor != null) oldColor.dispose ();
- }
- break;
- case SELECTION_BACKGROUND_COLOR: {
- Color oldColor = selectionBackgroundColor;
- if (oldColor == null) oldColor = tabFolder1.getSelectionBackground();
- colorDialog.setRGB(oldColor.getRGB());
- RGB rgb = colorDialog.open();
- if (rgb == null) return;
- oldColor = selectionBackgroundColor;
- selectionBackgroundColor = new Color (display, rgb);
- setSelectionBackground ();
- if (oldColor != null) oldColor.dispose ();
- }
- break;
- case ITEM_FONT: {
- 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 (display, fontData);
- setItemFont ();
- setExampleWidgetSize ();
- if (oldFont != null) oldFont.dispose ();
- }
- break;
- default:
- super.changeFontOrColor(index);
- }
- }
-
- /**
- * Creates the "Other" group.
- */
- void createOtherGroup () {
- super.createOtherGroup ();
-
- /* Create display controls specific to this example */
- simpleTabButton = new Button (otherGroup, SWT.CHECK);
- simpleTabButton.setText (ControlExample.getResourceString("Set_Simple_Tabs"));
- simpleTabButton.setSelection(true);
- simpleTabButton.addSelectionListener (new SelectionAdapter () {
- public void widgetSelected (SelectionEvent event) {
- setSimpleTabs();
- }
- });
-
- singleTabButton = new Button (otherGroup, SWT.CHECK);
- singleTabButton.setText (ControlExample.getResourceString("Set_Single_Tabs"));
- singleTabButton.setSelection(false);
- singleTabButton.addSelectionListener (new SelectionAdapter () {
- public void widgetSelected (SelectionEvent event) {
- setSingleTabs();
- }
- });
-
- showMinButton = new Button (otherGroup, SWT.CHECK);
- showMinButton.setText (ControlExample.getResourceString("Set_Min_Visible"));
- showMinButton.setSelection(false);
- showMinButton.addSelectionListener (new SelectionAdapter () {
- public void widgetSelected (SelectionEvent event) {
- setMinimizeVisible();
- }
- });
-
- showMaxButton = new Button (otherGroup, SWT.CHECK);
- showMaxButton.setText (ControlExample.getResourceString("Set_Max_Visible"));
- showMaxButton.setSelection(false);
- showMaxButton.addSelectionListener (new SelectionAdapter () {
- public void widgetSelected (SelectionEvent event) {
- setMaximizeVisible();
- }
- });
-
- imageButton = new Button (otherGroup, SWT.CHECK);
- imageButton.setText (ControlExample.getResourceString("Set_Image"));
- imageButton.addSelectionListener (new SelectionAdapter () {
- public void widgetSelected (SelectionEvent event) {
- setImages();
- }
- });
-
- unselectedImageButton = new Button (otherGroup, SWT.CHECK);
- unselectedImageButton.setText (ControlExample.getResourceString("Set_Unselected_Image_Visible"));
- unselectedImageButton.setSelection(true);
- unselectedImageButton.addSelectionListener (new SelectionAdapter () {
- public void widgetSelected (SelectionEvent event) {
- setUnselectedImageVisible();
- }
- });
- unselectedCloseButton = new Button (otherGroup, SWT.CHECK);
- unselectedCloseButton.setText (ControlExample.getResourceString("Set_Unselected_Close_Visible"));
- unselectedCloseButton.setSelection(true);
- unselectedCloseButton.addSelectionListener (new SelectionAdapter () {
- public void widgetSelected (SelectionEvent event) {
- setUnselectedCloseVisible();
- }
- });
- }
-
- /**
- * 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 (SWT.FILL, SWT.FILL, true, true));
- 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.READ_ONLY);
- 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");
- closeButton = new Button (styleGroup, SWT.CHECK);
- closeButton.setText ("SWT.CLOSE");
- }
-
- /**
- * 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.
- */
- Widget [] getExampleWidgets () {
- return new Widget [] {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 close (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 ();
- Color oldColor = selectionForegroundColor;
- selectionForegroundColor = null;
- setSelectionForeground ();
- if (oldColor != null) oldColor.dispose();
- oldColor = selectionBackgroundColor;
- selectionBackgroundColor = null;
- setSelectionBackground ();
- if (oldColor != null) oldColor.dispose();
- Font oldFont = itemFont;
- itemFont = null;
- setItemFont ();
- if (oldFont != null) oldFont.dispose();
- }
-
- /**
- * Sets the state of the "Example" widgets.
- */
- void setExampleWidgetState () {
- super.setExampleWidgetState();
- setSimpleTabs();
- setSingleTabs();
- setImages();
- setMinimizeVisible();
- setMaximizeVisible();
- setUnselectedCloseVisible();
- setUnselectedImageVisible();
- setSelectionBackground ();
- setSelectionForeground ();
- setItemFont ();
- setExampleWidgetSize();
- }
-
- /**
- * Sets the shape that the CTabFolder will use to render itself.
- */
- void setSimpleTabs () {
- tabFolder1.setSimple (simpleTabButton.getSelection ());
- setExampleWidgetSize();
- }
-
- /**
- * Sets the number of tabs that the CTabFolder should display.
- */
- void setSingleTabs () {
- tabFolder1.setSingle (singleTabButton.getSelection ());
- setExampleWidgetSize();
- }
- /**
- * Sets an image into each item of the "Example" widgets.
- */
- void setImages () {
- boolean setImage = imageButton.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 visibility of the minimize button
- */
- void setMinimizeVisible () {
- tabFolder1.setMinimizeVisible(showMinButton.getSelection ());
- setExampleWidgetSize();
- }
- /**
- * Sets the visibility of the maximize button
- */
- void setMaximizeVisible () {
- tabFolder1.setMaximizeVisible(showMaxButton.getSelection ());
- setExampleWidgetSize();
- }
- /**
- * Sets the visibility of the close button on unselected tabs
- */
- void setUnselectedCloseVisible () {
- tabFolder1.setUnselectedCloseVisible(unselectedCloseButton.getSelection ());
- setExampleWidgetSize();
- }
- /**
- * Sets the visibility of the image on unselected tabs
- */
- void setUnselectedImageVisible () {
- tabFolder1.setUnselectedImageVisible(unselectedImageButton.getSelection ());
- setExampleWidgetSize();
- }
- /**
- * Sets the background color of CTabItem 0.
- */
- void setSelectionBackground () {
- if (!instance.startup) {
- tabFolder1.setSelectionBackground(selectionBackgroundColor);
- }
- // Set the selection background item's image to match the background color of the selection.
- Color color = selectionBackgroundColor;
- if (color == null) color = tabFolder1.getSelectionBackground ();
- TableItem item = colorAndFontTable.getItem(SELECTION_BACKGROUND_COLOR);
- Image oldImage = item.getImage();
- if (oldImage != null) oldImage.dispose();
- item.setImage (colorImage(color));
- }
-
- /**
- * Sets the foreground color of CTabItem 0.
- */
- void setSelectionForeground () {
- if (!instance.startup) {
- tabFolder1.setSelectionForeground(selectionForegroundColor);
- }
- // Set the selection foreground item's image to match the foreground color of the selection.
- Color color = selectionForegroundColor;
- if (color == null) color = tabFolder1.getSelectionForeground ();
- TableItem item = colorAndFontTable.getItem(SELECTION_FOREGROUND_COLOR);
- Image oldImage = item.getImage();
- if (oldImage != null) oldImage.dispose();
- item.setImage (colorImage(color));
- }
-
- /**
- * Sets the font of CTabItem 0.
- */
- void setItemFont () {
- if (!instance.startup) {
- tabFolder1.getItem (0).setFont (itemFont);
- setExampleWidgetSize();
- }
- /* Set the font item's image to match the font of the item. */
- Font ft = itemFont;
- if (ft == null) ft = tabFolder1.getItem (0).getFont ();
- TableItem item = colorAndFontTable.getItem(ITEM_FONT);
- Image oldImage = item.getImage();
- if (oldImage != null) oldImage.dispose();
- item.setImage (fontImage(ft));
- item.setFont(ft);
- colorAndFontTable.layout ();
- }
-}
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 b9bfc0ddde..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/CanvasTab.java
+++ /dev/null
@@ -1,312 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-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 final 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
- };
- static final String canvasString = "Canvas"; //$NON-NLS-1$
-
- /* 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, doubleBufferedButton;
-
- /* 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 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 (SWT.FILL, SWT.FILL, true, true));
- 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;
- if (doubleBufferedButton.getSelection ()) style |= SWT.DOUBLE_BUFFERED;
-
- /* 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);
- Point extent = gc.textExtent(canvasString);
- gc.drawString(canvasString, cx + (size.x - extent.x) / 2, cy - extent.y + (size.y - 10) / 2, true);
- }
- });
- 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) {
- hookListeners (bar);
- bar.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent event) {
- scrollHorizontal ((ScrollBar)event.widget);
- }
- });
- }
- bar = canvas.getVerticalBar();
- if (bar != null) {
- hookListeners (bar);
- bar.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent event) {
- scrollVertical ((ScrollBar)event.widget);
- }
- });
- }
- }
-
- /**
- * 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");
- doubleBufferedButton = new Button (styleGroup, SWT.CHECK);
- doubleBufferedButton.setText ("SWT.DOUBLE_BUFFERED");
- }
-
- /**
- * 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.
- */
- Widget [] getExampleWidgets () {
- return new Widget [] {canvas};
- }
-
- /**
- * Returns a list of set/get API method names (without the set/get prefix)
- * that can be used to set/get values in the example control(s).
- */
- String[] getMethodNames() {
- return new String[] {"ToolTipText"};
- }
-
- /**
- * 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);
- doubleBufferedButton.setSelection ((canvas.getStyle () & SWT.DOUBLE_BUFFERED) != 0);
- if (!instance.startup) 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 6ca3776dd3..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/ComboTab.java
+++ /dev/null
@@ -1,148 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-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 (SWT.FILL, SWT.FILL, true, true));
- 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.
- */
- Widget [] getExampleWidgets () {
- return new Widget [] {combo1};
- }
-
- /**
- * Returns a list of set/get API method names (without the set/get prefix)
- * that can be used to set/get values in the example control(s).
- */
- String[] getMethodNames() {
- return new String[] {"Items", "Orientation", "Selection", "Text", "TextLimit", "ToolTipText", "VisibleItemCount"};
- }
-
- /**
- * 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 e56b6824b1..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/ControlExample.java
+++ /dev/null
@@ -1,244 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-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.io.*;
-import java.text.*;
-import java.util.*;
-
-public class ControlExample {
- private static ResourceBundle resourceBundle =
- ResourceBundle.getBundle("examples_control"); //$NON-NLS-1$
- private ShellTab shellTab;
- private TabFolder tabFolder;
- private Tab [] tabs;
- Image images[];
-
- static final int ciClosedFolder = 0, ciOpenFolder = 1, ciTarget = 2, ciBackground = 3, ciParentBackground = 4;
- static final String[] imageLocations = {
- "closedFolder.gif", //$NON-NLS-1$
- "openFolder.gif", //$NON-NLS-1$
- "target.gif", //$NON-NLS-1$
- "backgroundImage.png", //$NON-NLS-1$
- "parentBackgroundImage.png"}; //$NON-NLS-1$
- static final int[] imageTypes = {
- SWT.ICON,
- SWT.ICON,
- SWT.ICON,
- SWT.BITMAP,
- SWT.BITMAP};
-
- 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);
- tabs = createTabs();
- for (int i=0; i monitorArea.width && SWT.getPlatform().equals("carbon")) {
- TabItem [] tabItems = instance.tabFolder.getItems();
- for (int i=0; i 0) {
- if (vertical) {
- size.y = bar.getItem(0).getBounds().height;
- } else {
- size.x = bar.getItem(0).getWidth();
- }
- }
- }
- coolItem.setMinimumSize(size);
- coolItem.setPreferredSize(coolSize);
- coolItem.setSize(coolSize);
- }
-
- /* If we have saved state, restore it */
- if (order != null && order.length == coolBar.getItemCount()) {
- coolBar.setItemLayout(order, wrapIndices, sizes);
- } 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 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");
- 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");
- }
-
- /**
- * 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.
- */
- Widget [] getExampleWidgets () {
- return new Widget [] {coolBar};
- }
-
- /**
- * Returns a list of set/get API method names (without the set/get prefix)
- * that can be used to set/get values in the example control(s).
- */
- String[] getMethodNames() {
- return new String[] {"ToolTipText"};
- }
-
- /**
- * Gets the short text for the tab folder item.
- */
- String getShortTabText() {
- return "CB";
- }
-
- /**
- * Gets the text for the tab folder item.
- */
- String getTabText () {
- return "CoolBar";
- }
-
- /**
- * Sets the state of the "Example" widgets.
- */
- void setExampleWidgetState () {
- super.setExampleWidgetState ();
- horizontalButton.setSelection ((coolBar.getStyle () & SWT.HORIZONTAL) != 0);
- verticalButton.setSelection ((coolBar.getStyle () & SWT.VERTICAL) != 0);
- borderButton.setSelection ((coolBar.getStyle () & SWT.BORDER) != 0);
- flatButton.setSelection ((coolBar.getStyle () & SWT.FLAT) != 0);
- dropDownButton.setSelection ((coolBar.getItem(0).getStyle () & SWT.DROP_DOWN) != 0);
- lockedButton.setSelection(coolBar.getLocked());
- if (!instance.startup) 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.
- 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);
- String text = tool.getToolTipText();
- if (text != null) menuItem.setText(text);
- Menu m = new Menu(menu);
- menuItem.setMenu(m);
- for (int k = 0; k < 9; ++k) {
- 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);
- String text = tool.getToolTipText();
- if (text != null) menuItem.setText(text);
- }
- /* 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);
- 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 e9645f3420..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/CustomControlExample.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-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),
- };
- }
-
- /**
- * 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(instance, 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/DateTimeTab.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/DateTimeTab.java
deleted file mode 100644
index 3b5cb365ed..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/DateTimeTab.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-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 DateTimeTab extends Tab {
- /* Example widgets and groups that contain them */
- DateTime dateTime1;
- Group dateTimeGroup;
-
- /* Style widgets added to the "Style" group */
- Button dateButton, timeButton, calendarButton, shortButton, mediumButton, longButton;
-
- /**
- * Creates the Tab within a given instance of ControlExample.
- */
- DateTimeTab(ControlExample instance) {
- super(instance);
- }
-
- /**
- * Creates the "Example" group.
- */
- void createExampleGroup () {
- super.createExampleGroup ();
-
- /* Create a group for the list */
- dateTimeGroup = new Group (exampleGroup, SWT.NONE);
- dateTimeGroup.setLayout (new GridLayout ());
- dateTimeGroup.setLayoutData (new GridData (SWT.FILL, SWT.FILL, true, true));
- dateTimeGroup.setText ("DateTime");
- }
-
- /**
- * Creates the "Example" widgets.
- */
- void createExampleWidgets () {
-
- /* Compute the widget style */
- int style = getDefaultStyle();
- if (dateButton.getSelection ()) style |= SWT.DATE;
- if (timeButton.getSelection ()) style |= SWT.TIME;
- if (calendarButton.getSelection ()) style |= SWT.CALENDAR;
- if (shortButton.getSelection ()) style |= SWT.SHORT;
- if (mediumButton.getSelection ()) style |= SWT.MEDIUM;
- if (longButton.getSelection ()) style |= SWT.LONG;
- if (borderButton.getSelection ()) style |= SWT.BORDER;
-
- /* Create the example widgets */
- dateTime1 = new DateTime (dateTimeGroup, style);
- }
-
- /**
- * Creates the "Style" group.
- */
- void createStyleGroup() {
- super.createStyleGroup ();
-
- /* Create the extra widgets */
- dateButton = new Button(styleGroup, SWT.RADIO);
- dateButton.setText("SWT.DATE");
- timeButton = new Button(styleGroup, SWT.RADIO);
- timeButton.setText("SWT.TIME");
- calendarButton = new Button(styleGroup, SWT.RADIO);
- calendarButton.setText("SWT.CALENDAR");
- Group formatGroup = new Group(styleGroup, SWT.NONE);
- formatGroup.setLayout(new GridLayout());
- shortButton = new Button(formatGroup, SWT.RADIO);
- shortButton.setText("SWT.SHORT");
- mediumButton = new Button(formatGroup, SWT.RADIO);
- mediumButton.setText("SWT.MEDIUM");
- longButton = new Button(formatGroup, SWT.RADIO);
- longButton.setText("SWT.LONG");
- borderButton = new Button(styleGroup, SWT.CHECK);
- borderButton.setText("SWT.BORDER");
- }
-
- /**
- * Gets the "Example" widget children.
- */
- Widget [] getExampleWidgets () {
- return new Widget [] {dateTime1};
- }
-
- /**
- * Returns a list of set/get API method names (without the set/get prefix)
- * that can be used to set/get values in the example control(s).
- */
- String[] getMethodNames() {
- return new String[] {"Day", "Hours", "Minutes", "Month", "Seconds", "Year"};
- }
-
- /**
- * Gets the text for the tab folder item.
- */
- String getTabText () {
- return "DateTime";
- }
-
- /**
- * Sets the state of the "Example" widgets.
- */
- void setExampleWidgetState () {
- super.setExampleWidgetState ();
- dateButton.setSelection ((dateTime1.getStyle () & SWT.DATE) != 0);
- timeButton.setSelection ((dateTime1.getStyle () & SWT.TIME) != 0);
- calendarButton.setSelection ((dateTime1.getStyle () & SWT.CALENDAR) != 0);
- shortButton.setSelection ((dateTime1.getStyle () & SWT.SHORT) != 0);
- mediumButton.setSelection ((dateTime1.getStyle () & SWT.MEDIUM) != 0);
- longButton.setSelection ((dateTime1.getStyle () & SWT.LONG) != 0);
- borderButton.setSelection ((dateTime1.getStyle () & SWT.BORDER) != 0);
- }
-}
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 79b83db903..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/DialogTab.java
+++ /dev/null
@@ -1,488 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-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 createButton;
- Button okButton, cancelButton;
- Button yesButton, noButton;
- Button retryButton;
- Button abortButton, ignoreButton;
- Button iconErrorButton, iconInformationButton, iconQuestionButton;
- Button iconWarningButton, iconWorkingButton, noIconButton;
- Button 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"),
- ControlExample.getResourceString("FilterName_3")};
-
- /**
- * 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.
- */
- boolean ok = okButton.getSelection ();
- boolean cancel = cancelButton.getSelection ();
- boolean yes = yesButton.getSelection ();
- boolean no = noButton.getSelection ();
- boolean abort = abortButton.getSelection ();
- boolean retry = retryButton.getSelection ();
- boolean ignore = ignoreButton.getSelection ();
-
- okButton.setEnabled (!(yes || no || retry || abort || ignore));
- cancelButton.setEnabled (!(abort || ignore || (yes != no)));
- yesButton.setEnabled (!(ok || retry || abort || ignore || (cancel && !yes && !no)));
- noButton.setEnabled (!(ok || retry || abort || ignore || (cancel && !yes && !no)));
- retryButton.setEnabled (!(ok || yes || no));
- abortButton.setEnabled (!(ok || cancel || yes || no));
- ignoreButton.setEnabled (!(ok || cancel || yes || no));
-
- createButton.setEnabled (
- !(ok || cancel || yes || no || retry || abort || ignore) ||
- ok ||
- (ok && cancel) ||
- (yes && no) ||
- (yes && no && cancel) ||
- (retry && cancel) ||
- (abort && retry && ignore));
-
-
- }
-
- /**
- * 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 ();
-
- 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);
- if ((dialog.getStyle () & SWT.MULTI) != 0) {
- String [] files = dialog.getFileNames ();
- for (int i=0; i= shells.length) {
- Shell [] newShells = new Shell [shells.length + 4];
- System.arraycopy (shells, 0, newShells, 0, shells.length);
- shells = newShells;
- }
-
- int orientation = 0;
- if (leftToRightButton.getSelection()) orientation |= SWT.LEFT_TO_RIGHT;
- if (rightToLeftButton.getSelection()) orientation |= SWT.RIGHT_TO_LEFT;
- int radioBehavior = 0;
- if (noRadioGroupButton.getSelection()) radioBehavior |= SWT.NO_RADIO_GROUP;
-
- /* Create the shell and menu(s) */
- Shell shell = new Shell (SWT.SHELL_TRIM | orientation);
- shells [shellCount] = shell;
- if (barButton.getSelection ()) {
- /* Create menu bar. */
- Menu menuBar = new Menu(shell, SWT.BAR | radioBehavior);
- shell.setMenuBar(menuBar);
- hookListeners(menuBar);
-
- if (dropDownButton.getSelection() && cascadeButton.getSelection()) {
- /* Create cascade button and drop-down menu in menu bar. */
- MenuItem item = new MenuItem(menuBar, SWT.CASCADE);
- item.setText(getMenuItemText("Cascade"));
- if (imagesButton.getSelection()) item.setImage(instance.images[ControlExample.ciOpenFolder]);
- hookListeners(item);
- Menu dropDownMenu = new Menu(shell, SWT.DROP_DOWN | radioBehavior);
- item.setMenu(dropDownMenu);
- hookListeners(dropDownMenu);
-
- /* Create various menu items, depending on selections. */
- createMenuItems(dropDownMenu, subMenuButton.getSelection(), subSubMenuButton.getSelection());
- }
- }
-
- if (popUpButton.getSelection()) {
- /* Create pop-up menu. */
- Menu popUpMenu = new Menu(shell, SWT.POP_UP | radioBehavior);
- shell.setMenu(popUpMenu);
- hookListeners(popUpMenu);
-
- /* Create various menu items, depending on selections. */
- createMenuItems(popUpMenu, subMenuButton.getSelection(), subSubMenuButton.getSelection());
- }
-
- /* Set the size, title and open the shell. */
- shell.setSize (300, 100);
- shell.setText (ControlExample.getResourceString("Title") + shellCount);
- shell.addPaintListener(new PaintListener() {
- public void paintControl(PaintEvent e) {
- e.gc.drawString(ControlExample.getResourceString("PopupMenuHere"), 20, 20);
- }
- });
- shell.open ();
- shellCount++;
- }
-
- /**
- * Creates the "Control" group.
- */
- void createControlGroup () {
- /*
- * Create the "Control" group. This is the group on the
- * right half of each example tab. For MenuTab, it consists of
- * the Menu style group, the MenuItem style group and the 'other' 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 a group for the menu style controls */
- 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("Menu_Styles"));
-
- /* Create a group for the menu item style controls */
- menuItemStyleGroup = new Group (controlGroup, SWT.NONE);
- menuItemStyleGroup.setLayout (new GridLayout ());
- menuItemStyleGroup.setLayoutData (new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL));
- menuItemStyleGroup.setText (ControlExample.getResourceString("MenuItem_Styles"));
-
- /* Create a group for the 'other' controls */
- 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"));
- }
-
- /**
- * Creates the "Control" widget children.
- */
- void createControlWidgets () {
-
- /* Create the menu style buttons */
- barButton = new Button (styleGroup, SWT.CHECK);
- barButton.setText ("SWT.BAR");
- dropDownButton = new Button (styleGroup, SWT.CHECK);
- dropDownButton.setText ("SWT.DROP_DOWN");
- popUpButton = new Button (styleGroup, SWT.CHECK);
- popUpButton.setText ("SWT.POP_UP");
- noRadioGroupButton = new Button (styleGroup, SWT.CHECK);
- noRadioGroupButton.setText ("SWT.NO_RADIO_GROUP");
- leftToRightButton = new Button (styleGroup, SWT.RADIO);
- leftToRightButton.setText ("SWT.LEFT_TO_RIGHT");
- leftToRightButton.setSelection(true);
- rightToLeftButton = new Button (styleGroup, SWT.RADIO);
- rightToLeftButton.setText ("SWT.RIGHT_TO_LEFT");
-
- /* Create the menu item style buttons */
- cascadeButton = new Button (menuItemStyleGroup, SWT.CHECK);
- cascadeButton.setText ("SWT.CASCADE");
- checkButton = new Button (menuItemStyleGroup, SWT.CHECK);
- checkButton.setText ("SWT.CHECK");
- pushButton = new Button (menuItemStyleGroup, SWT.CHECK);
- pushButton.setText ("SWT.PUSH");
- radioButton = new Button (menuItemStyleGroup, SWT.CHECK);
- radioButton.setText ("SWT.RADIO");
- separatorButton = new Button (menuItemStyleGroup, SWT.CHECK);
- separatorButton.setText ("SWT.SEPARATOR");
-
- /* Create the 'other' buttons */
- imagesButton = new Button (otherGroup, SWT.CHECK);
- imagesButton.setText (ControlExample.getResourceString("Images"));
- acceleratorsButton = new Button (otherGroup, SWT.CHECK);
- acceleratorsButton.setText (ControlExample.getResourceString("Accelerators"));
- mnemonicsButton = new Button (otherGroup, SWT.CHECK);
- mnemonicsButton.setText (ControlExample.getResourceString("Mnemonics"));
- subMenuButton = new Button (otherGroup, SWT.CHECK);
- subMenuButton.setText (ControlExample.getResourceString("SubMenu"));
- subSubMenuButton = new Button (otherGroup, SWT.CHECK);
- subSubMenuButton.setText (ControlExample.getResourceString("SubSubMenu"));
-
- /* Create the "create" and "closeAll" buttons (and a 'filler' label to place them) */
- new Label(controlGroup, SWT.NONE);
- createButton = new Button (controlGroup, SWT.NONE);
- createButton.setLayoutData (new GridData (GridData.HORIZONTAL_ALIGN_END));
- createButton.setText (ControlExample.getResourceString("Create_Shell"));
- closeAllButton = new Button (controlGroup, SWT.NONE);
- closeAllButton.setLayoutData (new GridData (GridData.HORIZONTAL_ALIGN_BEGINNING));
- closeAllButton.setText (ControlExample.getResourceString("Close_All_Shells"));
-
- /* Add the listeners */
- createButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- createButtonSelected(e);
- }
- });
- closeAllButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- closeAllShells ();
- }
- });
- subMenuButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- subSubMenuButton.setEnabled (subMenuButton.getSelection ());
- }
- });
-
- /* Set the default state */
- barButton.setSelection (true);
- dropDownButton.setSelection (true);
- popUpButton.setSelection (true);
- cascadeButton.setSelection (true);
- checkButton.setSelection (true);
- pushButton.setSelection (true);
- radioButton.setSelection (true);
- separatorButton.setSelection (true);
- subSubMenuButton.setEnabled (subMenuButton.getSelection ());
- }
-
- /* Create various menu items, depending on selections. */
- void createMenuItems(Menu menu, boolean createSubMenu, boolean createSubSubMenu) {
- MenuItem item;
- if (pushButton.getSelection()) {
- item = new MenuItem(menu, SWT.PUSH);
- item.setText(getMenuItemText("Push"));
- if (acceleratorsButton.getSelection()) item.setAccelerator(SWT.MOD1 + SWT.MOD2 + 'P');
- if (imagesButton.getSelection()) item.setImage(instance.images[ControlExample.ciClosedFolder]);
- hookListeners(item);
- }
-
- if (separatorButton.getSelection()) {
- new MenuItem(menu, SWT.SEPARATOR);
- }
-
- if (checkButton.getSelection()) {
- item = new MenuItem(menu, SWT.CHECK);
- item.setText(getMenuItemText("Check"));
- if (acceleratorsButton.getSelection()) item.setAccelerator(SWT.MOD1 + SWT.MOD2 + 'C');
- if (imagesButton.getSelection()) item.setImage(instance.images[ControlExample.ciOpenFolder]);
- hookListeners(item);
- }
-
- if (radioButton.getSelection()) {
- item = new MenuItem(menu, SWT.RADIO);
- item.setText(getMenuItemText("1Radio"));
- if (acceleratorsButton.getSelection()) item.setAccelerator(SWT.MOD1 + SWT.MOD2 + '1');
- if (imagesButton.getSelection()) item.setImage(instance.images[ControlExample.ciTarget]);
- item.setSelection(true);
- hookListeners(item);
-
- item = new MenuItem(menu, SWT.RADIO);
- item.setText(getMenuItemText("2Radio"));
- if (acceleratorsButton.getSelection()) item.setAccelerator(SWT.MOD1 + SWT.MOD2 + '2');
- if (imagesButton.getSelection()) item.setImage(instance.images[ControlExample.ciTarget]);
- hookListeners(item);
- }
-
- if (createSubMenu && cascadeButton.getSelection()) {
- /* Create cascade button and drop-down menu for the sub-menu. */
- item = new MenuItem(menu, SWT.CASCADE);
- item.setText(getMenuItemText("Cascade"));
- if (imagesButton.getSelection()) item.setImage(instance.images[ControlExample.ciOpenFolder]);
- hookListeners(item);
- Menu subMenu = new Menu(menu.getShell(), SWT.DROP_DOWN);
- item.setMenu(subMenu);
- hookListeners(subMenu);
-
- createMenuItems(subMenu, createSubSubMenu, false);
- }
- }
-
- String getMenuItemText(String item) {
- boolean cascade = item.equals("Cascade");
- boolean mnemonic = mnemonicsButton.getSelection();
- boolean accelerator = acceleratorsButton.getSelection();
- char acceleratorKey = item.charAt(0);
- if (mnemonic && accelerator && !cascade) {
- return ControlExample.getResourceString(item + "WithMnemonic") + "\tCtrl+Shift+" + acceleratorKey;
- }
- if (accelerator && !cascade) {
- return ControlExample.getResourceString(item) + "\tCtrl+Shift+" + acceleratorKey;
- }
- if (mnemonic) {
- return ControlExample.getResourceString(item + "WithMnemonic");
- }
- return ControlExample.getResourceString(item);
- }
-
- /**
- * Gets the text for the tab folder item.
- */
- String getTabText () {
- return "Menu";
- }
-}
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 8e8cb51f1a..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/ProgressBarTab.java
+++ /dev/null
@@ -1,178 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-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 (SWT.FILL, SWT.FILL, true, true));
- 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);
- }
-
- /**
- * 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.
- */
- Widget [] getExampleWidgets () {
- return new Widget [] {progressBar1};
- }
-
- /**
- * Returns a list of set/get API method names (without the set/get prefix)
- * that can be used to set/get values in the example control(s).
- */
- String[] getMethodNames() {
- return new String[] {"Selection", "ToolTipText"};
- }
-
- /**
- * Gets the short text for the tab folder item.
- */
- String getShortTabText() {
- return "PB";
- }
-
- /**
- * 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 ()) {
- selectionSpinner.setEnabled (false);
- minimumSpinner.setEnabled (false);
- maximumSpinner.setEnabled (false);
- } else {
- selectionSpinner.setEnabled (true);
- minimumSpinner.setEnabled (true);
- maximumSpinner.setEnabled (true);
- }
- smoothButton.setSelection ((progressBar1.getStyle () & SWT.SMOOTH) != 0);
- indeterminateButton.setSelection ((progressBar1.getStyle () & SWT.INDETERMINATE) != 0);
- }
-
- /**
- * Gets the default maximum of the "Example" widgets.
- */
- int getDefaultMaximum () {
- return progressBar1.getMaximum();
- }
-
- /**
- * Gets the default minimim of the "Example" widgets.
- */
- int getDefaultMinimum () {
- return progressBar1.getMinimum();
- }
-
- /**
- * Gets the default selection of the "Example" widgets.
- */
- int getDefaultSelection () {
- return progressBar1.getSelection();
- }
-
- /**
- * Sets the maximum of the "Example" widgets.
- */
- void setWidgetMaximum () {
- progressBar1.setMaximum (maximumSpinner.getSelection ());
- updateSpinners ();
- }
-
- /**
- * Sets the minimim of the "Example" widgets.
- */
- void setWidgetMinimum () {
- progressBar1.setMinimum (minimumSpinner.getSelection ());
- updateSpinners ();
- }
-
- /**
- * Sets the selection of the "Example" widgets.
- */
- void setWidgetSelection () {
- progressBar1.setSelection (selectionSpinner.getSelection ());
- updateSpinners ();
- }
-
- /**
- * Update the Spinner widgets to reflect the actual value set
- * on the "Example" widget.
- */
- void updateSpinners () {
- minimumSpinner.setSelection (progressBar1.getMinimum ());
- selectionSpinner.setSelection (progressBar1.getSelection ());
- maximumSpinner.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 2b292a6c10..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/RangeTab.java
+++ /dev/null
@@ -1,197 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-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;
- boolean orientationButtons = true;
-
- /* Scale widgets added to the "Control" group */
- Spinner minimumSpinner, selectionSpinner, maximumSpinner;
-
- /**
- * 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 Spinner widget */
- maximumSpinner = new Spinner (maximumGroup, SWT.BORDER);
- maximumSpinner.setMaximum (100000);
- maximumSpinner.setSelection (getDefaultMaximum());
- maximumSpinner.setPageIncrement (100);
- maximumSpinner.setIncrement (1);
- maximumSpinner.setLayoutData (new GridData (SWT.FILL, SWT.CENTER, true, false));
-
- /* Add the listeners */
- maximumSpinner.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 Spinner widget */
- minimumSpinner = new Spinner (minimumGroup, SWT.BORDER);
- minimumSpinner.setMaximum (100000);
- minimumSpinner.setSelection(getDefaultMinimum());
- minimumSpinner.setPageIncrement (100);
- minimumSpinner.setIncrement (1);
- minimumSpinner.setLayoutData (new GridData (SWT.FILL, SWT.CENTER, true, false));
-
- /* Add the listeners */
- minimumSpinner.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(SWT.FILL, SWT.BEGINNING, false, false);
- selectionGroup.setLayoutData(gridData);
- selectionGroup.setText(ControlExample.getResourceString("Selection"));
-
- /* Create a Spinner widget */
- selectionSpinner = new Spinner (selectionGroup, SWT.BORDER);
- selectionSpinner.setMaximum (100000);
- selectionSpinner.setSelection (getDefaultSelection());
- selectionSpinner.setPageIncrement (100);
- selectionSpinner.setIncrement (1);
- selectionSpinner.setLayoutData (new GridData (SWT.FILL, SWT.CENTER, true, false));
-
- /* Add the listeners */
- selectionSpinner.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent event) {
- setWidgetSelection ();
- }
- });
-
- }
-
- /**
- * Creates the "Style" group.
- */
- void createStyleGroup () {
- super.createStyleGroup ();
-
- /* Create the extra widgets */
- if (orientationButtons) {
- 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 ();
- if (!instance.startup) {
- setWidgetMinimum ();
- setWidgetMaximum ();
- setWidgetSelection ();
- }
- Widget [] widgets = getExampleWidgets ();
- if (widgets.length != 0) {
- if (orientationButtons) {
- horizontalButton.setSelection ((widgets [0].getStyle () & SWT.HORIZONTAL) != 0);
- verticalButton.setSelection ((widgets [0].getStyle () & SWT.VERTICAL) != 0);
- }
- borderButton.setSelection ((widgets [0].getStyle () & SWT.BORDER) != 0);
- }
- }
-
- /**
- * Gets the default maximum of the "Example" widgets.
- */
- abstract int getDefaultMaximum ();
-
- /**
- * Gets the default minimim of the "Example" widgets.
- */
- abstract int getDefaultMinimum ();
-
- /**
- * Gets the default selection of the "Example" widgets.
- */
- abstract int getDefaultSelection ();
-
- /**
- * 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 fe4247e32f..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/SashFormTab.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-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 */
- Group sashFormGroup;
- SashForm form;
- List list1, list2;
- Text text;
-
- /* Style widgets added to the "Style" group */
- Button horizontalButton, verticalButton, smoothButton;
-
- static String [] ListData0 = {ControlExample.getResourceString("ListData0_0"), //$NON-NLS-1$
- ControlExample.getResourceString("ListData0_1"), //$NON-NLS-1$
- ControlExample.getResourceString("ListData0_2"), //$NON-NLS-1$
- ControlExample.getResourceString("ListData0_3"), //$NON-NLS-1$
- ControlExample.getResourceString("ListData0_4"), //$NON-NLS-1$
- ControlExample.getResourceString("ListData0_5"), //$NON-NLS-1$
- ControlExample.getResourceString("ListData0_6"), //$NON-NLS-1$
- ControlExample.getResourceString("ListData0_7")}; //$NON-NLS-1$
-
- static String [] ListData1 = {ControlExample.getResourceString("ListData1_0"), //$NON-NLS-1$
- ControlExample.getResourceString("ListData1_1"), //$NON-NLS-1$
- ControlExample.getResourceString("ListData1_2"), //$NON-NLS-1$
- ControlExample.getResourceString("ListData1_3"), //$NON-NLS-1$
- ControlExample.getResourceString("ListData1_4"), //$NON-NLS-1$
- ControlExample.getResourceString("ListData1_5"), //$NON-NLS-1$
- ControlExample.getResourceString("ListData1_6"), //$NON-NLS-1$
- ControlExample.getResourceString("ListData1_7")}; //$NON-NLS-1$
-
-
- /**
- * Creates the Tab within a given instance of ControlExample.
- */
- SashFormTab(ControlExample instance) {
- super(instance);
- }
- void createExampleGroup () {
- super.createExampleGroup ();
-
- /* Create a group for the sashform widget */
- sashFormGroup = new Group (exampleGroup, SWT.NONE);
- sashFormGroup.setLayout (new GridLayout ());
- sashFormGroup.setLayoutData (new GridData (SWT.FILL, SWT.FILL, true, true));
- sashFormGroup.setText ("SashForm");
- }
- void createExampleWidgets () {
-
- /* Compute the widget style */
- int style = getDefaultStyle();
- if (horizontalButton.getSelection ()) style |= SWT.H_SCROLL;
- if (verticalButton.getSelection ()) style |= SWT.V_SCROLL;
- if (smoothButton.getSelection ()) style |= SWT.SMOOTH;
-
- /* Create the example widgets */
- form = new SashForm (sashFormGroup, style);
- list1 = new List (form, SWT.V_SCROLL | SWT.H_SCROLL | SWT.BORDER);
- list1.setItems (ListData0);
- list2 = new List (form, SWT.V_SCROLL | SWT.H_SCROLL | SWT.BORDER);
- list2.setItems (ListData1);
- text = new Text (form, SWT.MULTI | SWT.BORDER);
- text.setText (ControlExample.getResourceString("Multi_line")); //$NON-NLS-1$
- form.setWeights(new int[] {1, 1, 1});
- }
- /**
- * Creates the "Style" group.
- */
- void createStyleGroup() {
- super.createStyleGroup();
-
- /* Create the extra widgets */
- horizontalButton = new Button (styleGroup, SWT.RADIO);
- horizontalButton.setText ("SWT.HORIZONTAL");
- horizontalButton.setSelection(true);
- verticalButton = new Button (styleGroup, SWT.RADIO);
- verticalButton.setText ("SWT.VERTICAL");
- verticalButton.setSelection(false);
- smoothButton = new Button (styleGroup, SWT.CHECK);
- smoothButton.setText ("SWT.SMOOTH");
- smoothButton.setSelection(false);
- }
-
- /**
- * Gets the "Example" widget children.
- */
- Widget [] getExampleWidgets () {
- return new Widget [] {form};
- }
-
- /**
- * Gets the text for the tab folder item.
- */
- String getTabText () {
- return "SashForm"; //$NON-NLS-1$
- }
-
- /**
- * Sets the state of the "Example" widgets.
- */
- void setExampleWidgetState () {
- super.setExampleWidgetState ();
- horizontalButton.setSelection ((form.getStyle () & SWT.H_SCROLL) != 0);
- verticalButton.setSelection ((form.getStyle () & SWT.V_SCROLL) != 0);
- smoothButton.setSelection ((form.getStyle () & SWT.SMOOTH) != 0);
- }
-}
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 e55aa8fc23..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/SashTab.java
+++ /dev/null
@@ -1,241 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-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 org.eclipse.swt.events.*;
-
-class SashTab extends Tab {
- /* Example widgets and groups that contain them */
- Sash hSash, vSash;
- Composite sashComp;
- Group sashGroup;
- List list1, list2, list3;
- Text text;
- Button smoothButton;
-
- 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;
- static final int SASH_LIMIT = 20;
-
- /**
- * Creates the Tab within a given instance of ControlExample.
- */
- SashTab(ControlExample instance) {
- super(instance);
- }
-
- /**
- * Creates the "Example" group.
- */
- void createExampleGroup () {
- super.createExampleGroup ();
- exampleGroup.setLayoutData (new GridData (SWT.FILL, SWT.FILL, true, true));
- exampleGroup.setLayout(new FillLayout());
-
- /* Create a group for the sash widgets */
- sashGroup = new Group (exampleGroup, SWT.NONE);
- FillLayout layout = new FillLayout();
- layout.marginHeight = layout.marginWidth = 5;
- sashGroup.setLayout(layout);
- sashGroup.setText ("Sash");
- }
-
- /**
- * Creates the "Example" widgets.
- */
- void createExampleWidgets () {
- /*
- * Create the page. This example does not use layouts.
- */
- sashComp = new Composite(sashGroup, SWT.BORDER);
-
- /* Create the list and text widgets */
- list1 = new List (sashComp, SWT.V_SCROLL | SWT.H_SCROLL | SWT.BORDER);
- list1.setItems (ListData0);
- list2 = new List (sashComp, SWT.V_SCROLL | SWT.H_SCROLL | SWT.BORDER);
- list2.setItems (ListData1);
- text = new Text (sashComp, SWT.MULTI | SWT.BORDER);
- text.setText (ControlExample.getResourceString("Multi_line"));
-
- /* Create the sashes */
- int style = getDefaultStyle();
- if (smoothButton.getSelection()) style |= SWT.SMOOTH;
- vSash = new Sash (sashComp, SWT.VERTICAL | style);
- hSash = new Sash (sashComp, SWT.HORIZONTAL | style);
-
- /* Add the listeners */
- hSash.addSelectionListener (new SelectionAdapter () {
- public void widgetSelected (SelectionEvent event) {
- Rectangle rect = vSash.getParent().getClientArea();
- event.y = Math.min (Math.max (event.y, SASH_LIMIT), rect.height - SASH_LIMIT);
- 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) {
- Rectangle rect = vSash.getParent().getClientArea();
- event.x = Math.min (Math.max (event.x, SASH_LIMIT), rect.width - SASH_LIMIT);
- if (event.detail != SWT.DRAG) {
- vSash.setBounds (event.x, event.y, event.width, event.height);
- layout ();
- }
- }
- });
- sashComp.addControlListener (new ControlAdapter () {
- public void controlResized (ControlEvent event) {
- resized ();
- }
- });
- }
-
- /**
- * Creates the "Size" group. The "Size" group contains
- * controls that allow the user to change the size of
- * the example widgets.
- */
- void createSizeGroup () {
- }
-
- /**
- * Creates the "Style" group.
- */
- void createStyleGroup() {
- super.createStyleGroup ();
-
- /* Create the extra widgets */
- smoothButton = new Button (styleGroup, SWT.CHECK);
- smoothButton.setText("SWT.SMOOTH");
- }
-
- void disposeExampleWidgets () {
- sashComp.dispose();
- sashComp = null;
- }
-
- /**
- * Gets the "Example" widget children.
- */
- Widget [] getExampleWidgets () {
- return new Widget [] {hSash, vSash};
- }
-
- /**
- * Returns a list of set/get API method names (without the set/get prefix)
- * that can be used to set/get values in the example control(s).
- */
- String[] getMethodNames() {
- return new String[] {"ToolTipText"};
- }
-
- /**
- * 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 clientArea = sashComp.getClientArea ();
- Rectangle hSashBounds = hSash.getBounds ();
- Rectangle vSashBounds = vSash.getBounds ();
-
- list1.setBounds (0, 0, vSashBounds.x, hSashBounds.y);
- list2.setBounds (vSashBounds.x + vSashBounds.width, 0, clientArea.width - (vSashBounds.x + vSashBounds.width), hSashBounds.y);
- text.setBounds (0, hSashBounds.y + hSashBounds.height, clientArea.width, clientArea.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);
- }
- /**
- * Sets the size of the "Example" widgets.
- */
- void setExampleWidgetSize () {
- sashGroup.layout (true);
- }
-
- /**
- * Sets the state of the "Example" widgets.
- */
- void setExampleWidgetState () {
- super.setExampleWidgetState ();
- smoothButton.setSelection ((hSash.getStyle () & SWT.SMOOTH) != 0);
- }
-
- /**
- * Handle the shell resized event.
- */
- void resized () {
-
- /* Get the client area for the shell */
- Rectangle clientArea = sashComp.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, (clientArea.width - SASH_WIDTH) / 2, (clientArea.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, clientArea.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, clientArea.width, clientArea.height - (list1Bounds.height + SASH_WIDTH));
-
- /* Position the sashes */
- vSash.setBounds (list1Bounds.width, 0, SASH_WIDTH, list1Bounds.height);
- hSash.setBounds (0, list1Bounds.height, clientArea.width, SASH_WIDTH);
- }
-}
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/ScaleTab.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/ScaleTab.java
deleted file mode 100644
index 1ab2e0af08..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/ScaleTab.java
+++ /dev/null
@@ -1,230 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-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 ScaleTab extends RangeTab {
- /* Example widgets and groups that contain them */
- Scale scale1;
- Group scaleGroup;
-
- /* Spinner widgets added to the "Control" group */
- Spinner incrementSpinner, pageIncrementSpinner;
-
- /**
- * Creates the Tab within a given instance of ControlExample.
- */
- ScaleTab(ControlExample instance) {
- super(instance);
- }
-
- /**
- * Creates the "Control" widget children.
- */
- void createControlWidgets () {
- super.createControlWidgets ();
- createIncrementGroup ();
- createPageIncrementGroup ();
- }
-
- /**
- * Creates the "Example" group.
- */
- void createExampleGroup () {
- super.createExampleGroup ();
-
- /* Create a group for the scale */
- scaleGroup = new Group (exampleGroup, SWT.NONE);
- scaleGroup.setLayout (new GridLayout ());
- scaleGroup.setLayoutData (new GridData (SWT.FILL, SWT.FILL, true, true));
- 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);
- }
-
- /**
- * 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 Spinner widget */
- incrementSpinner = new Spinner (incrementGroup, SWT.BORDER);
- incrementSpinner.setMaximum (100000);
- incrementSpinner.setSelection (getDefaultIncrement());
- incrementSpinner.setPageIncrement (100);
- incrementSpinner.setIncrement (1);
- incrementSpinner.setLayoutData (new GridData (SWT.FILL, SWT.CENTER, true, false));
-
- /* Add the listeners */
- incrementSpinner.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 Spinner widget */
- pageIncrementSpinner = new Spinner (pageIncrementGroup, SWT.BORDER);
- pageIncrementSpinner.setMaximum (100000);
- pageIncrementSpinner.setSelection (getDefaultPageIncrement());
- pageIncrementSpinner.setPageIncrement (100);
- pageIncrementSpinner.setIncrement (1);
- pageIncrementSpinner.setLayoutData (new GridData (SWT.FILL, SWT.CENTER, true, false));
-
- /* Add the listeners */
- pageIncrementSpinner.addSelectionListener (new SelectionAdapter () {
- public void widgetSelected (SelectionEvent event) {
- setWidgetPageIncrement ();
- }
- });
- }
-
- /**
- * Gets the "Example" widget children.
- */
- Widget [] getExampleWidgets () {
- return new Widget [] {scale1};
- }
-
- /**
- * Returns a list of set/get API method names (without the set/get prefix)
- * that can be used to set/get values in the example control(s).
- */
- String[] getMethodNames() {
- return new String[] {"Selection", "ToolTipText"};
- }
-
- /**
- * Gets the text for the tab folder item.
- */
- String getTabText () {
- return "Scale";
- }
-
- /**
- * Sets the state of the "Example" widgets.
- */
- void setExampleWidgetState () {
- super.setExampleWidgetState ();
- if (!instance.startup) {
- setWidgetIncrement ();
- setWidgetPageIncrement ();
- }
- }
-
- /**
- * Gets the default maximum of the "Example" widgets.
- */
- int getDefaultMaximum () {
- return scale1.getMaximum();
- }
-
- /**
- * Gets the default minimim of the "Example" widgets.
- */
- int getDefaultMinimum () {
- return scale1.getMinimum();
- }
-
- /**
- * Gets the default selection of the "Example" widgets.
- */
- int getDefaultSelection () {
- return scale1.getSelection();
- }
-
- /**
- * Gets the default increment of the "Example" widgets.
- */
- int getDefaultIncrement () {
- return scale1.getIncrement();
- }
-
- /**
- * Gets the default page increment of the "Example" widgets.
- */
- int getDefaultPageIncrement () {
- return scale1.getPageIncrement();
- }
-
- /**
- * Sets the increment of the "Example" widgets.
- */
- void setWidgetIncrement () {
- scale1.setIncrement (incrementSpinner.getSelection ());
- }
-
- /**
- * Sets the minimim of the "Example" widgets.
- */
- void setWidgetMaximum () {
- scale1.setMaximum (maximumSpinner.getSelection ());
- }
-
- /**
- * Sets the minimim of the "Example" widgets.
- */
- void setWidgetMinimum () {
- scale1.setMinimum (minimumSpinner.getSelection ());
- }
-
- /**
- * Sets the page increment of the "Example" widgets.
- */
- void setWidgetPageIncrement () {
- scale1.setPageIncrement (pageIncrementSpinner.getSelection ());
- }
-
- /**
- * Sets the selection of the "Example" widgets.
- */
- void setWidgetSelection () {
- scale1.setSelection (selectionSpinner.getSelection ());
- }
-}
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 8a8708c3e4..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/ScrollableTab.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-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;
-
- /**
- * 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 ();
- Widget [] widgets = getExampleWidgets ();
- if (widgets.length != 0){
- singleButton.setSelection ((widgets [0].getStyle () & SWT.SINGLE) != 0);
- multiButton.setSelection ((widgets [0].getStyle () & SWT.MULTI) != 0);
- horizontalButton.setSelection ((widgets [0].getStyle () & SWT.H_SCROLL) != 0);
- verticalButton.setSelection ((widgets [0].getStyle () & SWT.V_SCROLL) != 0);
- borderButton.setSelection ((widgets [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 b8398c6c82..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/ShellTab.java
+++ /dev/null
@@ -1,294 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-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" groups, and "Other" group */
- Button noParentButton, parentButton;
- Button noTrimButton, closeButton, titleButton, minButton, maxButton, borderButton, resizeButton, onTopButton, toolButton;
- Button createButton, closeAllButton;
- Button modelessButton, primaryModalButton, applicationModalButton, systemModalButton;
- Button imageButton;
- 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= 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 {
- 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 close = new Button(currentShell, SWT.PUSH);
- close.setBounds(160, 20, 120, 30);
- close.setText(ControlExample.getResourceString("Close"));
- close.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event event) {
- currentShell.dispose();
- }
- });
-
- /* Set the size, title, and image, and open the shell */
- currentShell.setSize (300, 100);
- currentShell.setText (ControlExample.getResourceString("Title") + shellCount);
- if (imageButton.getSelection()) currentShell.setImage(instance.images[ControlExample.ciTarget]);
- if (backgroundImageButton.getSelection()) currentShell.setBackgroundImage(instance.images[ControlExample.ciBackground]);
- 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);
- controlGroup.setLayout (new GridLayout (2, true));
- controlGroup.setLayoutData (new GridData (GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL));
- controlGroup.setText (ControlExample.getResourceString("Parameters"));
-
- /* Create a group for the decoration style controls */
- styleGroup = new Group (controlGroup, SWT.NONE);
- styleGroup.setLayout (new GridLayout ());
- styleGroup.setLayoutData (new GridData (SWT.FILL, SWT.FILL, false, false, 1, 3));
- styleGroup.setText (ControlExample.getResourceString("Decoration_Styles"));
-
- /* Create a group for the modal style controls */
- 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 a group for the 'other' controls */
- otherGroup = new Group (controlGroup, SWT.NONE);
- otherGroup.setLayout (new GridLayout ());
- otherGroup.setLayoutData (new GridData(SWT.FILL, SWT.FILL, false, false));
- otherGroup.setText (ControlExample.getResourceString("Other"));
-
- /* Create a group for the parent style controls */
- parentStyleGroup = new Group (controlGroup, 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 the decoration style buttons */
- noTrimButton = new Button (styleGroup, SWT.CHECK);
- noTrimButton.setText ("SWT.NO_TRIM");
- closeButton = new Button (styleGroup, SWT.CHECK);
- closeButton.setText ("SWT.CLOSE");
- titleButton = new Button (styleGroup, SWT.CHECK);
- titleButton.setText ("SWT.TITLE");
- minButton = new Button (styleGroup, SWT.CHECK);
- minButton.setText ("SWT.MIN");
- maxButton = new Button (styleGroup, SWT.CHECK);
- maxButton.setText ("SWT.MAX");
- borderButton = new Button (styleGroup, SWT.CHECK);
- borderButton.setText ("SWT.BORDER");
- resizeButton = new Button (styleGroup, SWT.CHECK);
- resizeButton.setText ("SWT.RESIZE");
- onTopButton = new Button (styleGroup, SWT.CHECK);
- onTopButton.setText ("SWT.ON_TOP");
- toolButton = new Button (styleGroup, SWT.CHECK);
- toolButton.setText ("SWT.TOOL");
-
- /* 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 'other' buttons */
- imageButton = new Button (otherGroup, SWT.CHECK);
- imageButton.setText (ControlExample.getResourceString("Image"));
- backgroundImageButton = new Button(otherGroup, SWT.CHECK);
- backgroundImageButton.setText(ControlExample.getResourceString("BackgroundImage"));
-
- /* Create the "create" and "closeAll" buttons */
- createButton = new Button (controlGroup, SWT.NONE);
- GridData gridData = new GridData (GridData.HORIZONTAL_ALIGN_END);
- createButton.setLayoutData (gridData);
- createButton.setText (ControlExample.getResourceString("Create_Shell"));
- closeAllButton = new Button (controlGroup, 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);
- backgroundImageButton.setSelection(false);
- }
-
- /**
- * 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 1bb8390ddf..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/SliderTab.java
+++ /dev/null
@@ -1,273 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-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 */
- Slider slider1;
- Group sliderGroup;
-
- /* Spinner widgets added to the "Control" group */
- Spinner incrementSpinner, pageIncrementSpinner, thumbSpinner;
-
- /**
- * 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 (SWT.FILL, SWT.FILL, true, true));
- sliderGroup.setText ("Slider");
- }
-
- /**
- * 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 */
- slider1 = new Slider(sliderGroup, style);
- }
-
- /**
- * 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 Spinner widget */
- incrementSpinner = new Spinner (incrementGroup, SWT.BORDER);
- incrementSpinner.setMaximum (100000);
- incrementSpinner.setSelection (getDefaultIncrement());
- incrementSpinner.setPageIncrement (100);
- incrementSpinner.setIncrement (1);
- incrementSpinner.setLayoutData (new GridData (SWT.FILL, SWT.CENTER, true, false));
-
- /* Add the listeners */
- incrementSpinner.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 Spinner widget */
- pageIncrementSpinner = new Spinner (pageIncrementGroup, SWT.BORDER);
- pageIncrementSpinner.setMaximum (100000);
- pageIncrementSpinner.setSelection (getDefaultPageIncrement());
- pageIncrementSpinner.setPageIncrement (100);
- pageIncrementSpinner.setIncrement (1);
- pageIncrementSpinner.setLayoutData (new GridData (SWT.FILL, SWT.CENTER, true, false));
-
- /* Add the listeners */
- pageIncrementSpinner.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 Spinner widget */
- thumbSpinner = new Spinner (thumbGroup, SWT.BORDER);
- thumbSpinner.setMaximum (100000);
- thumbSpinner.setSelection (getDefaultThumb());
- thumbSpinner.setPageIncrement (100);
- thumbSpinner.setIncrement (1);
- thumbSpinner.setLayoutData (new GridData (SWT.FILL, SWT.CENTER, true, false));
-
- /* Add the listeners */
- thumbSpinner.addSelectionListener (new SelectionAdapter () {
- public void widgetSelected (SelectionEvent event) {
- setWidgetThumb ();
- }
- });
- }
-
- /**
- * Gets the "Example" widget children.
- */
- Widget [] getExampleWidgets () {
- return new Widget [] {slider1};
- }
-
- /**
- * Returns a list of set/get API method names (without the set/get prefix)
- * that can be used to set/get values in the example control(s).
- */
- String[] getMethodNames() {
- return new String[] {"Selection", "ToolTipText"};
- }
-
- /**
- * Gets the text for the tab folder item.
- */
- String getTabText () {
- return "Slider";
- }
-
- /**
- * Sets the state of the "Example" widgets.
- */
- void setExampleWidgetState () {
- super.setExampleWidgetState ();
- if (!instance.startup) {
- setWidgetIncrement ();
- setWidgetPageIncrement ();
- setWidgetThumb ();
- }
- }
-
- /**
- * Gets the default maximum of the "Example" widgets.
- */
- int getDefaultMaximum () {
- return slider1.getMaximum();
- }
-
- /**
- * Gets the default minimim of the "Example" widgets.
- */
- int getDefaultMinimum () {
- return slider1.getMinimum();
- }
-
- /**
- * Gets the default selection of the "Example" widgets.
- */
- int getDefaultSelection () {
- return slider1.getSelection();
- }
-
- /**
- * Gets the default increment of the "Example" widgets.
- */
- int getDefaultIncrement () {
- return slider1.getIncrement();
- }
-
- /**
- * Gets the default page increment of the "Example" widgets.
- */
- int getDefaultPageIncrement () {
- return slider1.getPageIncrement();
- }
-
- /**
- * Gets the default thumb of the "Example" widgets.
- */
- int getDefaultThumb () {
- return slider1.getThumb();
- }
-
- /**
- * Sets the increment of the "Example" widgets.
- */
- void setWidgetIncrement () {
- slider1.setIncrement (incrementSpinner.getSelection ());
- }
-
- /**
- * Sets the minimim of the "Example" widgets.
- */
- void setWidgetMaximum () {
- slider1.setMaximum (maximumSpinner.getSelection ());
- }
-
- /**
- * Sets the minimim of the "Example" widgets.
- */
- void setWidgetMinimum () {
- slider1.setMinimum (minimumSpinner.getSelection ());
- }
-
- /**
- * Sets the page increment of the "Example" widgets.
- */
- void setWidgetPageIncrement () {
- slider1.setPageIncrement (pageIncrementSpinner.getSelection ());
- }
-
- /**
- * Sets the selection of the "Example" widgets.
- */
- void setWidgetSelection () {
- slider1.setSelection (selectionSpinner.getSelection ());
- }
-
- /**
- * Sets the thumb of the "Example" widgets.
- */
- void setWidgetThumb () {
- slider1.setThumb (thumbSpinner.getSelection ());
- }
-}
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/SpinnerTab.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/SpinnerTab.java
deleted file mode 100644
index 8208d5bbbc..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/SpinnerTab.java
+++ /dev/null
@@ -1,317 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-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 SpinnerTab extends RangeTab {
-
- /* Example widgets and groups that contain them */
- Spinner spinner1;
- Group spinnerGroup;
-
- /* Style widgets added to the "Style" group */
- Button readOnlyButton, wrapButton;
-
- /* Spinner widgets added to the "Control" group */
- Spinner incrementSpinner, pageIncrementSpinner, digitsSpinner;
-
- /**
- * Creates the Tab within a given instance of ControlExample.
- */
- SpinnerTab(ControlExample instance) {
- super(instance);
- }
-
- /**
- * Creates the "Control" widget children.
- */
- void createControlWidgets () {
- super.createControlWidgets ();
- createIncrementGroup ();
- createPageIncrementGroup ();
- createDigitsGroup ();
- }
-
- /**
- * Creates the "Example" group.
- */
- void createExampleGroup () {
- super.createExampleGroup ();
-
- /* Create a group for the spinner */
- spinnerGroup = new Group (exampleGroup, SWT.NONE);
- spinnerGroup.setLayout (new GridLayout ());
- spinnerGroup.setLayoutData (new GridData (SWT.FILL, SWT.FILL, true, true));
- spinnerGroup.setText ("Spinner");
- }
-
- /**
- * Creates the "Example" widgets.
- */
- void createExampleWidgets () {
-
- /* Compute the widget style */
- int style = getDefaultStyle();
- if (readOnlyButton.getSelection ()) style |= SWT.READ_ONLY;
- if (borderButton.getSelection ()) style |= SWT.BORDER;
- if (wrapButton.getSelection ()) style |= SWT.WRAP;
-
- /* Create the example widgets */
- spinner1 = new Spinner (spinnerGroup, style);
- }
-
- /**
- * 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 Spinner widget */
- incrementSpinner = new Spinner (incrementGroup, SWT.BORDER);
- incrementSpinner.setMaximum (100000);
- incrementSpinner.setSelection (getDefaultIncrement());
- incrementSpinner.setPageIncrement (100);
- incrementSpinner.setIncrement (1);
- incrementSpinner.setLayoutData (new GridData (SWT.FILL, SWT.CENTER, true, false));
-
- /* Add the listeners */
- incrementSpinner.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 Spinner widget */
- pageIncrementSpinner = new Spinner (pageIncrementGroup, SWT.BORDER);
- pageIncrementSpinner.setMaximum (100000);
- pageIncrementSpinner.setSelection (getDefaultPageIncrement());
- pageIncrementSpinner.setPageIncrement (100);
- pageIncrementSpinner.setIncrement (1);
- pageIncrementSpinner.setLayoutData (new GridData (SWT.FILL, SWT.CENTER, true, false));
-
- /* Add the listeners */
- pageIncrementSpinner.addSelectionListener (new SelectionAdapter () {
- public void widgetSelected (SelectionEvent event) {
- setWidgetPageIncrement ();
- }
- });
- }
-
- /**
- * Create a group of widgets to control the digits
- * attribute of the example widget.
- */
- void createDigitsGroup() {
-
- /* Create the group */
- Group digitsGroup = new Group (controlGroup, SWT.NONE);
- digitsGroup.setLayout (new GridLayout ());
- digitsGroup.setText (ControlExample.getResourceString("Digits"));
- digitsGroup.setLayoutData (new GridData (GridData.FILL_HORIZONTAL));
-
- /* Create the Spinner widget */
- digitsSpinner = new Spinner (digitsGroup, SWT.BORDER);
- digitsSpinner.setMaximum (100000);
- digitsSpinner.setSelection (getDefaultDigits());
- digitsSpinner.setPageIncrement (100);
- digitsSpinner.setIncrement (1);
- digitsSpinner.setLayoutData (new GridData (SWT.FILL, SWT.CENTER, true, false));
-
- /* Add the listeners */
- digitsSpinner.addSelectionListener (new SelectionAdapter () {
- public void widgetSelected (SelectionEvent e) {
- setWidgetDigits ();
- }
- });
- }
-
- /**
- * 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 () {
- orientationButtons = false;
- super.createStyleGroup ();
-
- /* Create the extra widgets */
- readOnlyButton = new Button (styleGroup, SWT.CHECK);
- readOnlyButton.setText ("SWT.READ_ONLY");
- wrapButton = new Button (styleGroup, SWT.CHECK);
- wrapButton.setText ("SWT.WRAP");
- }
-
- /**
- * Gets the "Example" widget children.
- */
- Widget [] getExampleWidgets () {
- return new Widget [] {spinner1};
- }
-
- /**
- * Returns a list of set/get API method names (without the set/get prefix)
- * that can be used to set/get values in the example control(s).
- */
- String[] getMethodNames() {
- return new String[] {"Selection", "ToolTipText"};
- }
-
- /**
- * Gets the text for the tab folder item.
- */
- String getTabText () {
- return "Spinner";
- }
-
- /**
- * Sets the state of the "Example" widgets.
- */
- void setExampleWidgetState () {
- super.setExampleWidgetState ();
- readOnlyButton.setSelection ((spinner1.getStyle () & SWT.READ_ONLY) != 0);
- wrapButton.setSelection ((spinner1.getStyle () & SWT.WRAP) != 0);
- if (!instance.startup) {
- setWidgetIncrement ();
- setWidgetPageIncrement ();
- setWidgetDigits ();
- }
- }
-
- /**
- * Gets the default maximum of the "Example" widgets.
- */
- int getDefaultMaximum () {
- return spinner1.getMaximum();
- }
-
- /**
- * Gets the default minimim of the "Example" widgets.
- */
- int getDefaultMinimum () {
- return spinner1.getMinimum();
- }
-
- /**
- * Gets the default selection of the "Example" widgets.
- */
- int getDefaultSelection () {
- return spinner1.getSelection();
- }
-
- /**
- * Gets the default increment of the "Example" widgets.
- */
- int getDefaultIncrement () {
- return spinner1.getIncrement();
- }
-
- /**
- * Gets the default page increment of the "Example" widgets.
- */
- int getDefaultPageIncrement () {
- return spinner1.getPageIncrement();
- }
-
- /**
- * Gets the default digits of the "Example" widgets.
- */
- int getDefaultDigits () {
- return spinner1.getDigits();
- }
-
- /**
- * Sets the increment of the "Example" widgets.
- */
- void setWidgetIncrement () {
- spinner1.setIncrement (incrementSpinner.getSelection ());
- }
-
- /**
- * Sets the minimim of the "Example" widgets.
- */
- void setWidgetMaximum () {
- spinner1.setMaximum (maximumSpinner.getSelection ());
- }
-
- /**
- * Sets the minimim of the "Example" widgets.
- */
- void setWidgetMinimum () {
- spinner1.setMinimum (minimumSpinner.getSelection ());
- }
-
- /**
- * Sets the page increment of the "Example" widgets.
- */
- void setWidgetPageIncrement () {
- spinner1.setPageIncrement (pageIncrementSpinner.getSelection ());
- }
-
- /**
- * Sets the digits of the "Example" widgets.
- */
- void setWidgetDigits () {
- spinner1.setDigits (digitsSpinner.getSelection ());
- }
-
- /**
- * Sets the selection of the "Example" widgets.
- */
- void setWidgetSelection () {
- spinner1.setSelection (selectionSpinner.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 ab22a52f18..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/StyledTextTab.java
+++ /dev/null
@@ -1,413 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.examples.controlexample;
-
-
-import java.io.*;
-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, underlineButton, strikeoutButton;
- Image boldImage, italicImage, redImage, yellowImage, underlineImage, strikeoutImage;
-
- /* Variables for saving state. */
- String text;
- 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) {
- InputStream sourceStream = ControlExample.class.getResourceAsStream (name + ".bmp");
- InputStream maskStream = ControlExample.class.getResourceAsStream (name + "_mask.bmp");
- ImageData source = new ImageData (sourceStream);
- ImageData mask = new ImageData (maskStream);
- Image result = new Image (display, source, mask);
- try {
- sourceStream.close ();
- maskStream.close ();
- } catch (IOException e) {
- e.printStackTrace ();
- }
- return result;
- }
-
- /**
- * 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 (SWT.FILL, SWT.FILL, true, true));
- 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 (text != null) {
- styledText.setText(text);
- text = null;
- }
- 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 () {
- styledTextStyleGroup = new Group (controlGroup, SWT.NONE);
- styledTextStyleGroup.setText (ControlExample.getResourceString ("StyledText_Styles"));
- styledTextStyleGroup.setLayout (new GridLayout(6, 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");
- underlineImage = createBitmapImage (display, "underline");
- strikeoutImage = createBitmapImage (display, "strikeout");
-
- /* Create controls to modify the StyledText */
- Label label = new Label (styledTextStyleGroup, SWT.NONE);
- label.setText (ControlExample.getResourceString ("StyledText_Style_Instructions"));
- label.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 6, 1));
- label = new Label (styledTextStyleGroup, SWT.NONE);
- label.setText (ControlExample.getResourceString ("Bold"));
- label.setLayoutData(new GridData(SWT.END, SWT.CENTER, true, false));
- boldButton = new Button (styledTextStyleGroup, SWT.PUSH);
- boldButton.setImage (boldImage);
- label = new Label (styledTextStyleGroup, SWT.NONE);
- label.setText (ControlExample.getResourceString ("Underline"));
- label.setLayoutData(new GridData(SWT.END, SWT.CENTER, true, false));
- underlineButton = new Button (styledTextStyleGroup, SWT.PUSH);
- underlineButton.setImage (underlineImage);
- label = new Label (styledTextStyleGroup, SWT.NONE);
- label.setText (ControlExample.getResourceString ("Foreground_Style"));
- label.setLayoutData(new GridData(SWT.END, SWT.CENTER, true, false));
- redButton = new Button (styledTextStyleGroup, SWT.PUSH);
- redButton.setImage (redImage);
- label = new Label (styledTextStyleGroup, SWT.NONE);
- label.setText (ControlExample.getResourceString ("Italic"));
- label.setLayoutData(new GridData(SWT.END, SWT.CENTER, true, false));
- italicButton = new Button (styledTextStyleGroup, SWT.PUSH);
- italicButton.setImage (italicImage);
- label = new Label (styledTextStyleGroup, SWT.NONE);
- label.setText (ControlExample.getResourceString ("Strikeout"));
- label.setLayoutData(new GridData(SWT.END, SWT.CENTER, true, false));
- strikeoutButton = new Button (styledTextStyleGroup, SWT.PUSH);
- strikeoutButton.setImage (strikeoutImage);
- label = new Label (styledTextStyleGroup, SWT.NONE);
- label.setText (ControlExample.getResourceString ("Background_Style"));
- label.setLayoutData(new GridData(SWT.END, SWT.CENTER, true, false));
- yellowButton = new Button (styledTextStyleGroup, SWT.PUSH);
- yellowButton.setImage (yellowImage);
- SelectionListener styleListener = 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; iTab 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 {
- Shell shell;
- Display display;
-
- /* Common control buttons */
- Button borderButton, enabledButton, visibleButton, backgroundImageButton, popupMenuButton;
- Button preferredButton, tooSmallButton, smallButton, largeButton, fillHButton, fillVButton;
-
- /* Common groups and composites */
- Composite tabFolderPage;
- Group exampleGroup, controlGroup, listenersGroup, otherGroup, sizeGroup, styleGroup, colorGroup, backgroundModeGroup;
-
- /* 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 = "win32".equals(SWT.getPlatform()) || "gtk".equals(SWT.getPlatform());
- Group orientationGroup;
- Button rtlButton, ltrButton, defaultOrietationButton;
-
- /* Controls and resources for the "Colors & Fonts" group */
- static final int IMAGE_SIZE = 12;
- static final int FOREGROUND_COLOR = 0;
- static final int BACKGROUND_COLOR = 1;
- static final int FONT = 2;
- Table colorAndFontTable;
- ColorDialog colorDialog;
- FontDialog fontDialog;
- Color foregroundColor, backgroundColor;
- Font font;
-
- /* Controls and resources for the "Background Mode" group */
- Combo backgroundModeCombo;
- Button backgroundModeImageButton, backgroundModeColorButton;
-
- /* Event logging variables and controls */
- Text eventConsole;
- boolean logging = false;
- boolean [] eventsFilter;
-
- /* Set/Get API controls */
- Combo nameCombo;
- Label returnTypeLabel;
- Button getButton, setButton;
- Text setText, getText;
-
- static final Object [][] EVENT_NAMES = {
- {"Activate", new Integer(SWT.Activate)},
- {"Arm", new Integer(SWT.Arm)},
- {"Close", new Integer(SWT.Close)},
- {"Collapse", new Integer(SWT.Collapse)},
- {"Deactivate", new Integer(SWT.Deactivate)},
- {"DefaultSelection", new Integer(SWT.DefaultSelection)},
- {"Deiconify", new Integer(SWT.Deiconify)},
- {"Dispose", new Integer(SWT.Dispose)},
- {"DragDetect", new Integer(SWT.DragDetect)},
- {"EraseItem", new Integer(SWT.EraseItem)},
- {"Expand", new Integer(SWT.Expand)},
- {"FocusIn", new Integer(SWT.FocusIn)},
- {"FocusOut", new Integer(SWT.FocusOut)},
- {"HardKeyDown", new Integer(SWT.HardKeyDown)},
- {"HardKeyUp", new Integer(SWT.HardKeyUp)},
- {"Help", new Integer(SWT.Help)},
- {"Hide", new Integer(SWT.Hide)},
- {"Iconify", new Integer(SWT.Iconify)},
- {"KeyDown", new Integer(SWT.KeyDown)},
- {"KeyUp", new Integer(SWT.KeyUp)},
- {"MeasureItem", new Integer(SWT.MeasureItem)},
- {"MenuDetect", new Integer(SWT.MenuDetect)},
- {"Modify", new Integer(SWT.Modify)},
- {"MouseDoubleClick", new Integer(SWT.MouseDoubleClick)},
- {"MouseDown", new Integer(SWT.MouseDown)},
- {"MouseEnter", new Integer(SWT.MouseEnter)},
- {"MouseExit", new Integer(SWT.MouseExit)},
- {"MouseHover", new Integer(SWT.MouseHover)},
- {"MouseMove", new Integer(SWT.MouseMove)},
- {"MouseUp", new Integer(SWT.MouseUp)},
- {"MouseWheel", new Integer(SWT.MouseWheel)},
- {"Move", new Integer(SWT.Move)},
- {"Paint", new Integer(SWT.Paint)},
- {"PaintItem", new Integer(SWT.PaintItem)},
- {"Resize", new Integer(SWT.Resize)},
- {"Selection", new Integer(SWT.Selection)},
- {"SetData", new Integer(SWT.SetData)},
-// {"Settings", new Integer(SWT.Settings)}, // note: this event only goes to Display
- {"Show", new Integer(SWT.Show)},
- {"Traverse", new Integer(SWT.Traverse)},
- {"Verify", new Integer(SWT.Verify)},
- };
-
- boolean samplePopup = false;
-
- /**
- * 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(SWT.FILL, SWT.FILL, false, false));
- controlGroup.setText (ControlExample.getResourceString("Parameters"));
-
- /* Create individual groups inside the "Control" group */
- createStyleGroup ();
- createOtherGroup ();
- createSetGetGroup();
- createSizeGroup ();
- createColorAndFontGroup ();
- if (rtlSupport()) {
- 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 0) createSetGetDialog(pt.x, pt.y, methodNames);
- }
- });
- }
- }
-
- /**
- * 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 and Fonts" group. This is typically
- * a child of the "Control" group. Subclasses override
- * this method to customize color and font settings.
- */
- void createColorAndFontGroup () {
- /* Create the group. */
- colorGroup = new Group(controlGroup, SWT.NONE);
- colorGroup.setLayout (new GridLayout (2, true));
- colorGroup.setLayoutData (new GridData (SWT.FILL, SWT.FILL, false, false));
- colorGroup.setText (ControlExample.getResourceString ("Colors"));
- colorAndFontTable = new Table(colorGroup, SWT.BORDER | SWT.V_SCROLL);
- colorAndFontTable.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false, 2, 1));
- TableItem item = new TableItem(colorAndFontTable, SWT.None);
- item.setText(ControlExample.getResourceString ("Foreground_Color"));
- colorAndFontTable.setSelection(0);
- item = new TableItem(colorAndFontTable, SWT.None);
- item.setText(ControlExample.getResourceString ("Background_Color"));
- item = new TableItem(colorAndFontTable, SWT.None);
- item.setText(ControlExample.getResourceString ("Font"));
- Button changeButton = new Button (colorGroup, SWT.PUSH);
- changeButton.setText(ControlExample.getResourceString("Change"));
- changeButton.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false));
- Button defaultsButton = new Button (colorGroup, SWT.PUSH);
- defaultsButton.setText(ControlExample.getResourceString("Defaults"));
- defaultsButton.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false));
-
- /* Add listeners to set/reset colors and fonts. */
- colorDialog = new ColorDialog (shell);
- fontDialog = new FontDialog (shell);
- colorAndFontTable.addSelectionListener(new SelectionAdapter() {
- public void widgetDefaultSelected(SelectionEvent event) {
- changeFontOrColor (colorAndFontTable.getSelectionIndex());
- }
- });
- changeButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent event) {
- changeFontOrColor (colorAndFontTable.getSelectionIndex());
- }
- });
- defaultsButton.addSelectionListener(new SelectionAdapter () {
- public void widgetSelected (SelectionEvent e) {
- resetColorsAndFonts ();
- }
- });
- shell.addDisposeListener(new DisposeListener() {
- public void widgetDisposed(DisposeEvent event) {
- if (foregroundColor != null) foregroundColor.dispose();
- if (backgroundColor != null) backgroundColor.dispose();
- if (font != null) font.dispose();
- foregroundColor = null;
- backgroundColor = null;
- font = null;
- if (colorAndFontTable != null && !colorAndFontTable.isDisposed()) {
- TableItem [] items = colorAndFontTable.getItems();
- for (int i = 0; i < items.length; i++) {
- Image image = items[i].getImage();
- if (image != null) image.dispose();
- }
- }
- }
- });
- }
-
- void changeFontOrColor(int index) {
- switch (index) {
- case FOREGROUND_COLOR: {
- Color oldColor = foregroundColor;
- if (oldColor == null) {
- Control [] controls = getExampleControls ();
- if (controls.length > 0) oldColor = controls [0].getForeground ();
- }
- if (oldColor != null) colorDialog.setRGB(oldColor.getRGB()); // seed dialog with current color
- RGB rgb = colorDialog.open();
- if (rgb == null) return;
- oldColor = foregroundColor; // save old foreground color to dispose when done
- foregroundColor = new Color (display, rgb);
- setExampleWidgetForeground ();
- if (oldColor != null) oldColor.dispose ();
- }
- break;
- case BACKGROUND_COLOR: {
- Color oldColor = backgroundColor;
- if (oldColor == null) {
- Control [] controls = getExampleControls ();
- if (controls.length > 0) oldColor = controls [0].getBackground (); // seed dialog with current color
- }
- if (oldColor != null) colorDialog.setRGB(oldColor.getRGB());
- RGB rgb = colorDialog.open();
- if (rgb == null) return;
- oldColor = backgroundColor; // save old background color to dispose when done
- backgroundColor = new Color (display, rgb);
- setExampleWidgetBackground ();
- if (oldColor != null) oldColor.dispose ();
- }
- break;
- case FONT: {
- Font oldFont = font;
- if (oldFont == null) {
- Control [] controls = getExampleControls ();
- 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 (display, fontData);
- setExampleWidgetFont ();
- setExampleWidgetSize ();
- if (oldFont != null) oldFont.dispose ();
- }
- break;
- }
- }
-
- /**
- * 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 (SWT.FILL, SWT.FILL, false, false));
- 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"));
- backgroundImageButton = new Button(otherGroup, SWT.CHECK);
- backgroundImageButton.setText(ControlExample.getResourceString("BackgroundImage"));
- popupMenuButton = new Button(otherGroup, SWT.CHECK);
- popupMenuButton.setText(ControlExample.getResourceString("PopupMenu"));
-
- /* Add the listeners */
- enabledButton.addSelectionListener (new SelectionAdapter () {
- public void widgetSelected (SelectionEvent event) {
- setExampleWidgetEnabled ();
- }
- });
- visibleButton.addSelectionListener (new SelectionAdapter () {
- public void widgetSelected (SelectionEvent event) {
- setExampleWidgetVisibility ();
- }
- });
- backgroundImageButton.addSelectionListener (new SelectionAdapter () {
- public void widgetSelected (SelectionEvent event) {
- setExampleWidgetBackgroundImage ();
- }
- });
- popupMenuButton.addSelectionListener (new SelectionAdapter () {
- public void widgetSelected (SelectionEvent event) {
- setExampleWidgetPopupMenu ();
- }
- });
-
- /* Set the default state */
- enabledButton.setSelection(true);
- visibleButton.setSelection(true);
- backgroundImageButton.setSelection(false);
- popupMenuButton.setSelection(false);
- }
-
- /**
- * Creates the "Background Mode" group.
- */
- void createBackgroundModeGroup () {
- // note that this method must be called after createExampleWidgets
- if (getExampleControls ().length == 0) return;
-
- /* Create the group */
- backgroundModeGroup = new Group (controlGroup, SWT.NONE);
- backgroundModeGroup.setLayout (new GridLayout ());
- backgroundModeGroup.setLayoutData (new GridData (SWT.FILL, SWT.FILL, false, false));
- backgroundModeGroup.setText (ControlExample.getResourceString("Background_Mode"));
-
- /* Create the controls */
- backgroundModeCombo = new Combo(backgroundModeGroup, SWT.READ_ONLY);
- backgroundModeCombo.setItems(new String[] {"SWT.INHERIT_NONE", "SWT.INHERIT_DEFAULT", "SWT.INHERIT_FORCE"});
- backgroundModeImageButton = new Button(backgroundModeGroup, SWT.CHECK);
- backgroundModeImageButton.setText(ControlExample.getResourceString("BackgroundImage"));
- backgroundModeColorButton = new Button(backgroundModeGroup, SWT.CHECK);
- backgroundModeColorButton.setText(ControlExample.getResourceString("BackgroundColor"));
-
- /* Add the listeners */
- backgroundModeCombo.addSelectionListener (new SelectionAdapter () {
- public void widgetSelected (SelectionEvent event) {
- setExampleGroupBackgroundMode ();
- }
- });
- backgroundModeImageButton.addSelectionListener (new SelectionAdapter () {
- public void widgetSelected (SelectionEvent event) {
- setExampleGroupBackgroundImage ();
- }
- });
- backgroundModeColorButton.addSelectionListener (new SelectionAdapter () {
- public void widgetSelected (SelectionEvent event) {
- setExampleGroupBackgroundColor ();
- }
- });
-
- /* Set the default state */
- backgroundModeCombo.setText(backgroundModeCombo.getItem(0));
- backgroundModeImageButton.setSelection(false);
- backgroundModeColorButton.setSelection(false);
- }
-
- /**
- * Create the event console popup menu.
- */
- void createEventConsolePopup () {
- Menu popup = new Menu (shell, 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);
- exampleGroup.setLayout (new GridLayout ());
- exampleGroup.setLayoutData (new GridData (SWT.FILL, SWT.FILL, true, true));
- }
-
- /**
- * 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 (shell, SWT.DIALOG_TRIM | SWT.RESIZE | 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 ((String)EVENT_NAMES[i][0]);
- 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);
- }
- }
- });
- new Label(dialog, SWT.NONE); /* Filler */
- 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 ();
- /*
- * If the preferred size of the dialog is too tall for the screen,
- * then reduce the height, so that the vertical scrollbar will appear.
- */
- Point size = dialog.getSize();
- Rectangle bounds = display.getBounds();
- if (size.y > bounds.height) {
- dialog.setSize(size.x, bounds.height);
- }
- dialog.open ();
- while (! dialog.isDisposed()) {
- if (! display.readAndDispatch()) display.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));
- listenersGroup.setLayoutData (new GridData (SWT.FILL, SWT.FILL, true, true, 2, 1));
- 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;
- }
- }
- });
- }
-
- /**
- * Returns a list of set/get API method names (without the set/get prefix)
- * that can be used to set/get values in the example control(s).
- */
- String[] getMethodNames() {
- return null;
- }
-
- void createSetGetDialog(int x, int y, String[] methodNames) {
- final Shell dialog = new Shell(shell, SWT.DIALOG_TRIM | SWT.RESIZE | SWT.MODELESS);
- dialog.setLayout(new GridLayout(2, false));
- dialog.setText(getTabText() + " " + ControlExample.getResourceString ("Set_Get"));
- nameCombo = new Combo(dialog, SWT.READ_ONLY);
- nameCombo.setItems(methodNames);
- nameCombo.setText(methodNames[0]);
- nameCombo.setVisibleItemCount(methodNames.length);
- nameCombo.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false));
- nameCombo.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- resetLabels();
- }
- });
- returnTypeLabel = new Label(dialog, SWT.NONE);
- returnTypeLabel.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, false, false));
- setButton = new Button(dialog, SWT.PUSH);
- setButton.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, false, false));
- setButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- setValue();
- setText.selectAll();
- setText.setFocus();
- }
- });
- setText = new Text(dialog, SWT.SINGLE | SWT.BORDER);
- setText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false));
- getButton = new Button(dialog, SWT.PUSH);
- getButton.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, false, false));
- getButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- getValue();
- }
- });
- getText = new Text(dialog, SWT.MULTI | SWT.BORDER | SWT.READ_ONLY | SWT.H_SCROLL | SWT.V_SCROLL);
- GridData data = new GridData(SWT.FILL, SWT.FILL, true, true);
- data.widthHint = 240;
- data.heightHint = 200;
- getText.setLayoutData(data);
- resetLabels();
- dialog.setDefaultButton(setButton);
- dialog.pack();
- dialog.setLocation(x, y);
- dialog.open();
- }
-
- void resetLabels() {
- String methodRoot = nameCombo.getText();
- returnTypeLabel.setText(parameterInfo(methodRoot));
- setButton.setText(setMethodName(methodRoot));
- getButton.setText("get" + methodRoot);
- setText.setText("");
- getText.setText("");
- getValue();
- setText.setFocus();
- }
-
- String setMethodName(String methodRoot) {
- return "set" + methodRoot;
- }
-
- String parameterInfo(String methodRoot) {
- String typeName = null;
- Class returnType = getReturnType(methodRoot);
- boolean isArray = returnType.isArray();
- if (isArray) {
- typeName = returnType.getComponentType().getName();
- } else {
- typeName = returnType.getName();
- }
- String typeNameString = typeName;
- int index = typeName.lastIndexOf('.');
- if (index != -1 && index+1 < typeName.length()) typeNameString = typeName.substring(index+1);
- String info = ControlExample.getResourceString("Info_" + typeNameString + (isArray ? "A" : ""));
- if (isArray) {
- typeNameString += "[]";
- }
- return ControlExample.getResourceString("Parameter_Info", new Object[] {typeNameString, info});
- }
-
- void getValue() {
- String methodName = "get" + nameCombo.getText();
- getText.setText("");
- Widget[] widgets = getExampleWidgets();
- for (int i = 0; i < widgets.length; i++) {
- try {
- java.lang.reflect.Method method = widgets[i].getClass().getMethod(methodName, null);
- Object result = method.invoke(widgets[i], null);
- if (result == null) {
- getText.append("null");
- } else if (result.getClass().isArray()) {
- int length = java.lang.reflect.Array.getLength(result);
- if (length == 0) {
- getText.append(result.getClass().getComponentType() + "[0]");
- }
- for (int j = 0; j < length; j++) {
- getText.append(java.lang.reflect.Array.get(result,j).toString() + "\n");
- }
- } else {
- getText.append(result.toString());
- }
- } catch (Exception e) {
- getText.append(e.toString());
- }
- if (i + 1 < widgets.length) {
- getText.append("\n\n");
- }
- }
- }
-
- Class getReturnType(String methodRoot) {
- Class returnType = null;
- String methodName = "get" + methodRoot;
- Widget[] widgets = getExampleWidgets();
- try {
- java.lang.reflect.Method method = widgets[0].getClass().getMethod(methodName, null);
- returnType = method.getReturnType();
- } catch (Exception e) {
- }
- return returnType;
- }
-
- void setValue() {
- /* The parameter type must be the same as the get method's return type */
- String methodRoot = nameCombo.getText();
- Class returnType = getReturnType(methodRoot);
- String methodName = setMethodName(methodRoot);
- String value = setText.getText();
- Widget[] widgets = getExampleWidgets();
- for (int i = 0; i < widgets.length; i++) {
- try {
- java.lang.reflect.Method method = widgets[i].getClass().getMethod(methodName, new Class[] {returnType});
- String typeName = returnType.getName();
- Object[] parameter = null;
- if (value.equals("null")) {
- parameter = new Object[] {null};
- } else if (typeName.equals("int")) {
- parameter = new Object[] {new Integer(value)};
- } else if (typeName.equals("long")) {
- parameter = new Object[] {new Long(value)};
- } else if (typeName.equals("char")) {
- parameter = new Object[] {value.length() == 1 ? new Character(value.charAt(0)) : new Character('\0')};
- } else if (typeName.equals("boolean")) {
- parameter = new Object[] {new Boolean(value)};
- } else if (typeName.equals("java.lang.String")) {
- parameter = new Object[] {value};
- } else if (typeName.equals("org.eclipse.swt.graphics.Point")) {
- String xy[] = split(value, ',');
- parameter = new Object[] {new Point(new Integer(xy[0]).intValue(),new Integer(xy[1]).intValue())};
- } else if (typeName.equals("[I")) {
- String strings[] = split(value, ',');
- int[] ints = new int[strings.length];
- for (int j = 0; j < strings.length; j++) {
- ints[j] = new Integer(strings[j]).intValue();
- }
- parameter = new Object[] {ints};
- } else if (typeName.equals("[Ljava.lang.String;")) {
- parameter = new Object[] {split(value, ',')};
- } else {
- parameter = parameterForType(typeName, value, widgets[i]);
- }
- method.invoke(widgets[i], parameter);
- } catch (Exception e) {
- Throwable cause = e.getCause();
- String message = e.getMessage();
- getText.setText(e.toString());
- if (cause != null) getText.append(", cause=\n" + cause.toString());
- if (message != null) getText.append(", message=\n" + message);
- }
- }
- }
-
- Object[] parameterForType(String typeName, String value, Widget widget) {
- return new Object[] {value};
- }
-
- void createOrientationGroup () {
- /* Create Orientation group*/
- orientationGroup = new Group (controlGroup, SWT.NONE);
- orientationGroup.setLayout (new GridLayout());
- orientationGroup.setLayoutData (new GridData (SWT.FILL, SWT.FILL, false, false));
- 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 (SWT.FILL, SWT.FILL, false, false));
- 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);
- fillHButton = new Button (sizeGroup, SWT.CHECK);
- fillHButton.setText (ControlExample.getResourceString("Fill_X"));
- fillVButton = new Button (sizeGroup, SWT.CHECK);
- fillVButton.setText (ControlExample.getResourceString("Fill_Y"));
-
- /* Add the listeners */
- SelectionAdapter selectionListener = new SelectionAdapter () {
- public void widgetSelected (SelectionEvent event) {
- setExampleWidgetSize ();
- }
- };
- preferredButton.addSelectionListener(selectionListener);
- tooSmallButton.addSelectionListener(selectionListener);
- smallButton.addSelectionListener(selectionListener);
- largeButton.addSelectionListener(selectionListener);
- fillHButton.addSelectionListener(selectionListener);
- fillVButton.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 (SWT.FILL, SWT.FILL, false, false));
- 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) {
- /* Cache the shell and display. */
- shell = tabFolder.getShell ();
- display = shell.getDisplay ();
-
- /* 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 ();
- createBackgroundModeGroup ();
- setExampleWidgetState ();
-
- return tabFolderPage;
- }
-
- void setExampleWidgetPopupMenu() {
- Control[] controls = getExampleControls();
- for (int i = 0; i < controls.length; i++) {
- final Control control = controls [i];
- control.addListener(SWT.MenuDetect, new Listener() {
- public void handleEvent(Event event) {
- Menu menu = control.getMenu();
- if (menu != null && samplePopup) {
- menu.dispose();
- menu = null;
- }
- if (menu == null && popupMenuButton.getSelection()) {
- menu = new Menu(shell, SWT.POP_UP);
- MenuItem item = new MenuItem(menu, SWT.PUSH);
- item.setText("Sample popup menu item");
- specialPopupMenuItems(menu, event);
- control.setMenu(menu);
- samplePopup = true;
- }
- }
- });
- }
- }
-
- protected void specialPopupMenuItems(final Menu menu, final Event event) {
- }
-
- /**
- * Disposes the "Example" widgets.
- */
- void disposeExampleWidgets () {
- Widget [] widgets = getExampleWidgets ();
- for (int i=0; i up -> none. */
- switch (table1.getSortDirection ()) {
- case SWT.DOWN: sortDirection = SWT.UP; break;
- case SWT.UP: sortDirection = SWT.NONE; break;
- }
- } else {
- table1.setSortColumn((TableColumn)e.widget);
- }
- table1.setSortDirection (sortDirection);
- }
- };
- column.addSelectionListener(listener);
- column.setData("SortListener", listener); //$NON-NLS-1$
- }
- } else {
- table1.setSortDirection (SWT.NONE);
- for (int j = 0; j < columns.length; j++) {
- SelectionListener listener = (SelectionListener)columns[j].getData("SortListener"); //$NON-NLS-1$
- if (listener != null) columns[j].removeSelectionListener(listener);
- }
- }
- }
-
- /**
- * Sets the lines visible state of the "Example" widgets.
- */
- void setWidgetLinesVisible () {
- table1.setLinesVisible (linesVisibleButton.getSelection ());
- }
-
- protected void specialPopupMenuItems(Menu menu, Event event) {
- MenuItem item = new MenuItem(menu, SWT.PUSH);
- item.setText("getItem(Point) on mouse coordinates");
- menuMouseCoords = table1.toControl(new Point(event.x, event.y));
- item.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- eventConsole.append ("getItem(Point(" + menuMouseCoords + ")) returned: " + table1.getItem(menuMouseCoords));
- eventConsole.append ("\n");
- };
- });
- }
-}
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 dd49c1b3fe..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/TextTab.java
+++ /dev/null
@@ -1,181 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-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 TextTab extends ScrollableTab {
- /* Example widgets and groups that contain them */
- Text text;
- Group textGroup;
-
- /* Style widgets added to the "Style" group */
- Button wrapButton, readOnlyButton, passwordButton, searchButton, cancelButton;
- Button leftButton, centerButton, rightButton;
-
- /**
- * Creates the Tab within a given instance of ControlExample.
- */
- TextTab(ControlExample instance) {
- super(instance);
- }
-
- /**
- * 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 (SWT.FILL, SWT.FILL, true, true));
- 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 (passwordButton.getSelection ()) style |= SWT.PASSWORD;
- if (searchButton.getSelection ()) style |= SWT.SEARCH;
- if (cancelButton.getSelection ()) style |= SWT.CANCEL;
- 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 */
- 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");
- passwordButton = new Button (styleGroup, SWT.CHECK);
- passwordButton.setText ("SWT.PASSWORD");
- searchButton = new Button (styleGroup, SWT.CHECK);
- searchButton.setText ("SWT.SEARCH");
- cancelButton = new Button (styleGroup, SWT.CHECK);
- cancelButton.setText ("SWT.CANCEL");
-
- Composite alignmentGroup = new Composite (styleGroup, SWT.NONE);
- GridLayout layout = new GridLayout ();
- layout.marginWidth = layout.marginHeight = 0;
- alignmentGroup.setLayout (layout);
- alignmentGroup.setLayoutData (new GridData (GridData.FILL_BOTH));
- leftButton = new Button (alignmentGroup, SWT.RADIO);
- leftButton.setText ("SWT.LEFT");
- centerButton = new Button (alignmentGroup, SWT.RADIO);
- centerButton.setText ("SWT.CENTER");
- rightButton = new Button (alignmentGroup, SWT.RADIO);
- rightButton.setText ("SWT.RIGHT");
- }
-
- /**
- * 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.
- */
- Widget [] getExampleWidgets () {
- return new Widget [] {text};
- }
-
- /**
- * Returns a list of set/get API method names (without the set/get prefix)
- * that can be used to set/get values in the example control(s).
- */
- String[] getMethodNames() {
- return new String[] {"DoubleClickEnabled", "EchoChar", "Editable", "Orientation", "Selection", "Tabs", "Text", "TextLimit", "ToolTipText", "TopIndex"};
- }
-
- /**
- * 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);
- passwordButton.setSelection ((text.getStyle () & SWT.PASSWORD) != 0);
- searchButton.setSelection ((text.getStyle () & SWT.SEARCH) != 0);
- leftButton.setSelection ((text.getStyle () & SWT.LEFT) != 0);
- centerButton.setSelection ((text.getStyle () & SWT.CENTER) != 0);
- rightButton.setSelection ((text.getStyle () & SWT.RIGHT) != 0);
-
- /* Special case: CANCEL and H_SCROLL have the same value,
- * so to avoid confusion, only set CANCEL if SEARCH is set. */
- if ((text.getStyle () & SWT.SEARCH) != 0) {
- cancelButton.setSelection ((text.getStyle () & SWT.CANCEL) != 0);
- horizontalButton.setSelection (false);
- } else {
- cancelButton.setSelection (false);
- horizontalButton.setSelection ((text.getStyle () & SWT.H_SCROLL) != 0);
- }
-
- passwordButton.setEnabled ((text.getStyle () & SWT.SINGLE) != 0);
- searchButton.setEnabled ((text.getStyle () & SWT.SINGLE) != 0);
- cancelButton.setEnabled ((text.getStyle () & SWT.SEARCH) != 0);
- wrapButton.setEnabled ((text.getStyle () & SWT.MULTI) != 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 143d126b56..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/ToolBarTab.java
+++ /dev/null
@@ -1,356 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-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, imageTextToolBar;
- Group imageToolBarGroup, textToolBarGroup, imageTextToolBarGroup;
-
- /* Style widgets added to the "Style" group */
- Button horizontalButton, verticalButton, flatButton, shadowOutButton, wrapButton, rightButton;
-
- /* Other widgets added to the "Other" group */
- Button comboChildButton;
-
- /**
- * 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 (SWT.FILL, SWT.FILL, true, true));
- 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 (SWT.FILL, SWT.FILL, true, true));
- textToolBarGroup.setText (ControlExample.getResourceString("Text_ToolBar"));
-
- /* Create a group for the image and text tool bar */
- imageTextToolBarGroup = new Group (exampleGroup, SWT.NONE);
- imageTextToolBarGroup.setLayout (new GridLayout ());
- imageTextToolBarGroup.setLayoutData (new GridData (SWT.FILL, SWT.FILL, true, true));
- imageTextToolBarGroup.setText (ControlExample.getResourceString("ImageText_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");
- if (comboChildButton.getSelection ()) {
- Combo combo = new Combo (imageToolBar, SWT.NONE);
- combo.setItems (new String [] {"250", "500", "750"});
- combo.setText (combo.getItem (0));
- combo.pack ();
- item.setWidth (combo.getSize ().x);
- item.setControl (combo);
- }
- 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");
- if (comboChildButton.getSelection ()) {
- Combo combo = new Combo (textToolBar, SWT.NONE);
- combo.setItems (new String [] {"250", "500", "750"});
- combo.setText (combo.getItem (0));
- combo.pack ();
- item.setWidth (combo.getSize ().x);
- item.setControl (combo);
- }
- item = new ToolItem (textToolBar, SWT.DROP_DOWN);
- item.setText (ControlExample.getResourceString("Drop_Down"));
- item.setToolTipText("SWT.DROP_DOWN");
- item.addSelectionListener(new DropDownSelectionListener());
-
- /* Create the image and text tool bar */
- imageTextToolBar = new ToolBar (imageTextToolBarGroup, style);
- item = new ToolItem (imageTextToolBar, SWT.PUSH);
- item.setImage (instance.images[ControlExample.ciClosedFolder]);
- item.setText (ControlExample.getResourceString("Push"));
- item.setToolTipText("SWT.PUSH");
- item = new ToolItem (imageTextToolBar, SWT.PUSH);
- item.setImage (instance.images[ControlExample.ciClosedFolder]);
- item.setText (ControlExample.getResourceString("Push"));
- item.setToolTipText("SWT.PUSH");
- item = new ToolItem (imageTextToolBar, SWT.RADIO);
- item.setImage (instance.images[ControlExample.ciOpenFolder]);
- item.setText (ControlExample.getResourceString("Radio"));
- item.setToolTipText("SWT.RADIO");
- item = new ToolItem (imageTextToolBar, SWT.RADIO);
- item.setImage (instance.images[ControlExample.ciOpenFolder]);
- item.setText (ControlExample.getResourceString("Radio"));
- item.setToolTipText("SWT.RADIO");
- item = new ToolItem (imageTextToolBar, SWT.CHECK);
- item.setImage (instance.images[ControlExample.ciTarget]);
- item.setText (ControlExample.getResourceString("Check"));
- item.setToolTipText("SWT.CHECK");
- item = new ToolItem (imageTextToolBar, SWT.RADIO);
- item.setImage (instance.images[ControlExample.ciClosedFolder]);
- item.setText (ControlExample.getResourceString("Radio"));
- item.setToolTipText("SWT.RADIO");
- item = new ToolItem (imageTextToolBar, SWT.RADIO);
- item.setImage (instance.images[ControlExample.ciClosedFolder]);
- item.setText (ControlExample.getResourceString("Radio"));
- item.setToolTipText("SWT.RADIO");
- item = new ToolItem (imageTextToolBar, SWT.SEPARATOR);
- item.setToolTipText("SWT.SEPARATOR");
- if (comboChildButton.getSelection ()) {
- Combo combo = new Combo (imageTextToolBar, SWT.NONE);
- combo.setItems (new String [] {"250", "500", "750"});
- combo.setText (combo.getItem (0));
- combo.pack ();
- item.setWidth (combo.getSize ().x);
- item.setControl (combo);
- }
- item = new ToolItem (imageTextToolBar, SWT.DROP_DOWN);
- item.setImage (instance.images[ControlExample.ciTarget]);
- 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 "Other" group.
- */
- void createOtherGroup () {
- super.createOtherGroup ();
-
- /* Create display controls specific to this example */
- comboChildButton = new Button (otherGroup, SWT.CHECK);
- comboChildButton.setText (ControlExample.getResourceString("Combo_child"));
-
- /* Add the listeners */
- comboChildButton.addSelectionListener (new SelectionAdapter () {
- public void widgetSelected (SelectionEvent event) {
- recreateExampleWidgets ();
- }
- });
- }
-
- /**
- * 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 [] imageTextToolBarItems = imageTextToolBar.getItems();
- Item [] allItems = new Item [imageToolBarItems.length + textToolBarItems.length + imageTextToolBarItems.length];
- System.arraycopy(imageToolBarItems, 0, allItems, 0, imageToolBarItems.length);
- System.arraycopy(textToolBarItems, 0, allItems, imageToolBarItems.length, textToolBarItems.length);
- System.arraycopy(imageTextToolBarItems, 0, allItems, imageToolBarItems.length + textToolBarItems.length, imageTextToolBarItems.length);
- return allItems;
- }
-
- /**
- * Gets the "Example" widget children.
- */
- Widget [] getExampleWidgets () {
- return new Widget [] {imageToolBar, textToolBar, imageTextToolBar};
- }
-
- /**
- * Gets the short text for the tab folder item.
- */
- String getShortTabText() {
- return "TB";
- }
-
- /**
- * 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;
-
- public void widgetSelected(SelectionEvent event) {
- // Create the menu if it has not already been created
- if (menu == null) {
- // Lazy create the menu.
- ToolBar toolbar = ((ToolItem) event.widget).getParent();
- int style = toolbar.getStyle() & (SWT.RIGHT_TO_LEFT | SWT.LEFT_TO_RIGHT);
- menu = new Menu(shell, style | SWT.POP_UP);
- 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);
- } 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.
- */
- // 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();
-
- Point point = toolBar.toDisplay(new Point(event.x, event.y));
- menu.setLocation(point.x, point.y);
- menu.setVisible(true);
- }
- }
- }
-}
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/ToolTipTab.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/ToolTipTab.java
deleted file mode 100644
index 6a02a828e2..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/ToolTipTab.java
+++ /dev/null
@@ -1,249 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-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 ToolTipTab extends Tab {
-
- /* Example widgets and groups that contain them */
- ToolTip toolTip1;
- Group toolTipGroup;
-
- /* Style widgets added to the "Style" group */
- Button balloonButton, iconErrorButton, iconInformationButton, iconWarningButton, noIconButton;
-
- /* Other widgets added to the "Other" group */
- Button autoHideButton, showInTrayButton;
-
- Tray tray;
- TrayItem trayItem;
-
- /**
- * Creates the Tab within a given instance of ControlExample.
- */
- ToolTipTab(ControlExample instance) {
- super(instance);
- }
-
- /**
- * Creates the "Example" group.
- */
- void createExampleGroup () {
- super.createExampleGroup ();
-
- /* Create a group for the tooltip visibility check box */
- toolTipGroup = new Group (exampleGroup, SWT.NONE);
- toolTipGroup.setLayout (new GridLayout ());
- toolTipGroup.setLayoutData (new GridData (SWT.FILL, SWT.FILL, true, true));
- toolTipGroup.setText ("ToolTip");
- visibleButton = new Button(toolTipGroup, SWT.CHECK);
- visibleButton.setText(ControlExample.getResourceString("Visible"));
- visibleButton.addSelectionListener (new SelectionAdapter () {
- public void widgetSelected (SelectionEvent event) {
- setExampleWidgetVisibility ();
- }
- });
- }
-
- /**
- * Creates the "Example" widgets.
- */
- void createExampleWidgets () {
-
- /* Compute the widget style */
- int style = getDefaultStyle();
- if (balloonButton.getSelection ()) style |= SWT.BALLOON;
- if (iconErrorButton.getSelection ()) style |= SWT.ICON_ERROR;
- if (iconInformationButton.getSelection ()) style |= SWT.ICON_INFORMATION;
- if (iconWarningButton.getSelection ()) style |= SWT.ICON_WARNING;
-
- /* Create the example widgets */
- toolTip1 = new ToolTip (shell, style);
- toolTip1.setText(ControlExample.getResourceString("ToolTip_Title"));
- toolTip1.setMessage(ControlExample.getResourceString("Example_string"));
- }
-
- /**
- * 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 */
- balloonButton = new Button (styleGroup, SWT.CHECK);
- balloonButton.setText ("SWT.BALLOON");
- iconErrorButton = new Button (styleGroup, SWT.RADIO);
- iconErrorButton.setText("SWT.ICON_ERROR");
- iconInformationButton = new Button (styleGroup, SWT.RADIO);
- iconInformationButton.setText("SWT.ICON_INFORMATION");
- iconWarningButton = new Button (styleGroup, SWT.RADIO);
- iconWarningButton.setText("SWT.ICON_WARNING");
- noIconButton = new Button (styleGroup, SWT.RADIO);
- noIconButton.setText(ControlExample.getResourceString("No_Icon"));
- }
-
- void createColorAndFontGroup () {
- // ToolTip does not need a color and font group.
- }
-
- void createOtherGroup () {
- /* Create the group */
- otherGroup = new Group (controlGroup, SWT.NONE);
- otherGroup.setLayout (new GridLayout ());
- otherGroup.setLayoutData (new GridData (SWT.FILL, SWT.FILL, false, false));
- otherGroup.setText (ControlExample.getResourceString("Other"));
-
- /* Create the controls */
- autoHideButton = new Button(otherGroup, SWT.CHECK);
- autoHideButton.setText(ControlExample.getResourceString("AutoHide"));
- showInTrayButton = new Button(otherGroup, SWT.CHECK);
- showInTrayButton.setText(ControlExample.getResourceString("Show_In_Tray"));
- tray = display.getSystemTray();
- showInTrayButton.setEnabled(tray != null);
-
- /* Add the listeners */
- autoHideButton.addSelectionListener (new SelectionAdapter () {
- public void widgetSelected (SelectionEvent event) {
- setExampleWidgetAutoHide ();
- }
- });
- showInTrayButton.addSelectionListener (new SelectionAdapter () {
- public void widgetSelected (SelectionEvent event) {
- showExampleWidgetInTray ();
- }
- });
- shell.addDisposeListener(new DisposeListener() {
- public void widgetDisposed(DisposeEvent event) {
- disposeTrayItem();
- }
- });
-
- /* Set the default state */
- autoHideButton.setSelection(true);
- }
-
- void createSizeGroup () {
- // ToolTip does not need a size group.
- }
-
- /**
- * Disposes the "Example" widgets.
- */
- void disposeExampleWidgets () {
- disposeTrayItem();
- super.disposeExampleWidgets();
- }
-
- /**
- * Gets the "Example" widget children.
- */
- // Tab uses this for many things - widgets would only get set/get, listeners, and dispose.
- Widget[] getExampleWidgets () {
- return new Widget [] {toolTip1};
- }
-
- /**
- * Returns a list of set/get API method names (without the set/get prefix)
- * that can be used to set/get values in the example control(s).
- */
- String[] getMethodNames() {
- return new String[] {"Message", "Text"};
- }
-
- /**
- * Gets the text for the tab folder item.
- */
- String getTabText () {
- return "ToolTip";
- }
-
- /**
- * Sets the state of the "Example" widgets.
- */
- void setExampleWidgetState () {
- showExampleWidgetInTray ();
- setExampleWidgetAutoHide ();
- super.setExampleWidgetState ();
- balloonButton.setSelection ((toolTip1.getStyle () & SWT.BALLOON) != 0);
- iconErrorButton.setSelection ((toolTip1.getStyle () & SWT.ICON_ERROR) != 0);
- iconInformationButton.setSelection ((toolTip1.getStyle () & SWT.ICON_INFORMATION) != 0);
- iconWarningButton.setSelection ((toolTip1.getStyle () & SWT.ICON_WARNING) != 0);
- noIconButton.setSelection ((toolTip1.getStyle () & (SWT.ICON_ERROR | SWT.ICON_INFORMATION | SWT.ICON_WARNING)) == 0);
- autoHideButton.setSelection(toolTip1.getAutoHide());
- }
-
- /**
- * Sets the visibility of the "Example" widgets.
- */
- void setExampleWidgetVisibility () {
- toolTip1.setVisible (visibleButton.getSelection ());
- }
-
- /**
- * Sets the autoHide state of the "Example" widgets.
- */
- void setExampleWidgetAutoHide () {
- toolTip1.setAutoHide(autoHideButton.getSelection ());
- }
-
- void showExampleWidgetInTray () {
- if (showInTrayButton.getSelection ()) {
- createTrayItem();
- trayItem.setToolTip(toolTip1);
- } else {
- disposeTrayItem();
- }
- }
-
- void createTrayItem() {
- if (trayItem == null) {
- trayItem = new TrayItem(tray, SWT.NONE);
- trayItem.setImage(instance.images[ControlExample.ciTarget]);
- }
- }
-
- void disposeTrayItem() {
- if (trayItem != null) {
- trayItem.setToolTip(null);
- trayItem.dispose();
- trayItem = null;
- }
- }
-}
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 b413782cb4..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/TreeTab.java
+++ /dev/null
@@ -1,780 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-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;
-
- /* Size widgets added to the "Size" group */
- Button packColumnsButton;
-
- /* Style widgets added to the "Style" group */
- Button checkButton, fullSelectionButton;
-
- /* Other widgets added to the "Other" group */
- Button multipleColumns, moveableColumns, resizableColumns, headerVisibleButton, sortIndicatorButton, headerImagesButton, subImagesButton, linesVisibleButton;
-
- /* Controls and resources added to the "Colors and Fonts" group */
- static final int ITEM_FOREGROUND_COLOR = 3;
- static final int ITEM_BACKGROUND_COLOR = 4;
- static final int ITEM_FONT = 5;
- static final int CELL_FOREGROUND_COLOR = 6;
- static final int CELL_BACKGROUND_COLOR = 7;
- static final int CELL_FONT = 8;
- Color itemForegroundColor, itemBackgroundColor, cellForegroundColor, cellBackgroundColor;
- Font itemFont, cellFont;
-
- static String [] columnTitles = {ControlExample.getResourceString("TableTitle_0"),
- ControlExample.getResourceString("TableTitle_1"),
- ControlExample.getResourceString("TableTitle_2"),
- ControlExample.getResourceString("TableTitle_3")};
-
- static String[][] tableData = {
- { ControlExample.getResourceString("TableLine0_0"),
- ControlExample.getResourceString("TableLine0_1"),
- ControlExample.getResourceString("TableLine0_2"),
- ControlExample.getResourceString("TableLine0_3") },
- { ControlExample.getResourceString("TableLine1_0"),
- ControlExample.getResourceString("TableLine1_1"),
- ControlExample.getResourceString("TableLine1_2"),
- ControlExample.getResourceString("TableLine1_3") },
- { ControlExample.getResourceString("TableLine2_0"),
- ControlExample.getResourceString("TableLine2_1"),
- ControlExample.getResourceString("TableLine2_2"),
- ControlExample.getResourceString("TableLine2_3") } };
-
- Point menuMouseCoords;
-
- /**
- * Creates the Tab within a given instance of ControlExample.
- */
- TreeTab(ControlExample instance) {
- super(instance);
- }
-
- /**
- * Creates the "Colors and Fonts" group.
- */
- void createColorAndFontGroup () {
- super.createColorAndFontGroup();
-
- TableItem item = new TableItem(colorAndFontTable, SWT.None);
- item.setText(ControlExample.getResourceString ("Item_Foreground_Color"));
- item = new TableItem(colorAndFontTable, SWT.None);
- item.setText(ControlExample.getResourceString ("Item_Background_Color"));
- item = new TableItem(colorAndFontTable, SWT.None);
- item.setText(ControlExample.getResourceString ("Item_Font"));
- item = new TableItem(colorAndFontTable, SWT.None);
- item.setText(ControlExample.getResourceString ("Cell_Foreground_Color"));
- item = new TableItem(colorAndFontTable, SWT.None);
- item.setText(ControlExample.getResourceString ("Cell_Background_Color"));
- item = new TableItem(colorAndFontTable, SWT.None);
- item.setText(ControlExample.getResourceString ("Cell_Font"));
-
- shell.addDisposeListener(new DisposeListener() {
- public void widgetDisposed(DisposeEvent event) {
- if (itemBackgroundColor != null) itemBackgroundColor.dispose();
- if (itemForegroundColor != null) itemForegroundColor.dispose();
- if (itemFont != null) itemFont.dispose();
- if (cellBackgroundColor != null) cellBackgroundColor.dispose();
- if (cellForegroundColor != null) cellForegroundColor.dispose();
- if (cellFont != null) cellFont.dispose();
- itemBackgroundColor = null;
- itemForegroundColor = null;
- itemFont = null;
- cellBackgroundColor = null;
- cellForegroundColor = null;
- cellFont = null;
- }
- });
- }
-
- void changeFontOrColor(int index) {
- switch (index) {
- case ITEM_FOREGROUND_COLOR: {
- Color oldColor = itemForegroundColor;
- if (oldColor == null) oldColor = textNode1.getForeground ();
- colorDialog.setRGB(oldColor.getRGB());
- RGB rgb = colorDialog.open();
- if (rgb == null) return;
- oldColor = itemForegroundColor;
- itemForegroundColor = new Color (display, rgb);
- setItemForeground ();
- if (oldColor != null) oldColor.dispose ();
- }
- break;
- case ITEM_BACKGROUND_COLOR: {
- Color oldColor = itemBackgroundColor;
- if (oldColor == null) oldColor = textNode1.getBackground ();
- colorDialog.setRGB(oldColor.getRGB());
- RGB rgb = colorDialog.open();
- if (rgb == null) return;
- oldColor = itemBackgroundColor;
- itemBackgroundColor = new Color (display, rgb);
- setItemBackground ();
- if (oldColor != null) oldColor.dispose ();
- }
- break;
- case ITEM_FONT: {
- 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 (display, fontData);
- setItemFont ();
- setExampleWidgetSize ();
- if (oldFont != null) oldFont.dispose ();
- }
- break;
- case CELL_FOREGROUND_COLOR: {
- Color oldColor = cellForegroundColor;
- if (oldColor == null) oldColor = textNode1.getForeground (1);
- colorDialog.setRGB(oldColor.getRGB());
- RGB rgb = colorDialog.open();
- if (rgb == null) return;
- oldColor = cellForegroundColor;
- cellForegroundColor = new Color (display, rgb);
- setCellForeground ();
- if (oldColor != null) oldColor.dispose ();
- }
- break;
- case CELL_BACKGROUND_COLOR: {
- Color oldColor = cellBackgroundColor;
- if (oldColor == null) oldColor = textNode1.getBackground (1);
- colorDialog.setRGB(oldColor.getRGB());
- RGB rgb = colorDialog.open();
- if (rgb == null) return;
- oldColor = cellBackgroundColor;
- cellBackgroundColor = new Color (display, rgb);
- setCellBackground ();
- if (oldColor != null) oldColor.dispose ();
- }
- break;
- case CELL_FONT: {
- Font oldFont = cellFont;
- if (oldFont == null) oldFont = textNode1.getFont (1);
- fontDialog.setFontList(oldFont.getFontData());
- FontData fontData = fontDialog.open ();
- if (fontData == null) return;
- oldFont = cellFont;
- cellFont = new Font (display, fontData);
- setCellFont ();
- setExampleWidgetSize ();
- if (oldFont != null) oldFont.dispose ();
- }
- break;
- default:
- super.changeFontOrColor(index);
- }
- }
-
- /**
- * Creates the "Other" group.
- */
- void createOtherGroup () {
- super.createOtherGroup ();
-
- /* Create display controls specific to this example */
- linesVisibleButton = new Button (otherGroup, SWT.CHECK);
- linesVisibleButton.setText (ControlExample.getResourceString("Lines_Visible"));
- multipleColumns = new Button (otherGroup, SWT.CHECK);
- multipleColumns.setText (ControlExample.getResourceString("Multiple_Columns"));
- headerVisibleButton = new Button (otherGroup, SWT.CHECK);
- headerVisibleButton.setText (ControlExample.getResourceString("Header_Visible"));
- sortIndicatorButton = new Button (otherGroup, SWT.CHECK);
- sortIndicatorButton.setText (ControlExample.getResourceString("Sort_Indicator"));
- moveableColumns = new Button (otherGroup, SWT.CHECK);
- moveableColumns.setText (ControlExample.getResourceString("Moveable_Columns"));
- resizableColumns = new Button (otherGroup, SWT.CHECK);
- resizableColumns.setText (ControlExample.getResourceString("Resizable_Columns"));
- headerImagesButton = new Button (otherGroup, SWT.CHECK);
- headerImagesButton.setText (ControlExample.getResourceString("Header_Images"));
- subImagesButton = new Button (otherGroup, SWT.CHECK);
- subImagesButton.setText (ControlExample.getResourceString("Sub_Images"));
-
- /* Add the listeners */
- linesVisibleButton.addSelectionListener (new SelectionAdapter () {
- public void widgetSelected (SelectionEvent event) {
- setWidgetLinesVisible ();
- }
- });
- multipleColumns.addSelectionListener (new SelectionAdapter () {
- public void widgetSelected (SelectionEvent event) {
- recreateExampleWidgets ();
- }
- });
- headerVisibleButton.addSelectionListener (new SelectionAdapter () {
- public void widgetSelected (SelectionEvent event) {
- setWidgetHeaderVisible ();
- }
- });
- sortIndicatorButton.addSelectionListener (new SelectionAdapter () {
- public void widgetSelected (SelectionEvent event) {
- setWidgetSortIndicator ();
- }
- });
- moveableColumns.addSelectionListener (new SelectionAdapter () {
- public void widgetSelected (SelectionEvent event) {
- setColumnsMoveable ();
- }
- });
- resizableColumns.addSelectionListener (new SelectionAdapter () {
- public void widgetSelected (SelectionEvent event) {
- setColumnsResizable ();
- }
- });
- headerImagesButton.addSelectionListener (new SelectionAdapter () {
- public void widgetSelected (SelectionEvent event) {
- recreateExampleWidgets ();
- }
- });
- subImagesButton.addSelectionListener (new SelectionAdapter () {
- public void widgetSelected (SelectionEvent event) {
- recreateExampleWidgets ();
- }
- });
- }
-
- /**
- * 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 (SWT.FILL, SWT.FILL, true, true));
- treeGroup.setText ("Tree");
-
- /* Create a group for the image tree */
- imageTreeGroup = new Group (exampleGroup, SWT.NONE);
- imageTreeGroup.setLayout (new GridLayout ());
- imageTreeGroup.setLayoutData (new GridData (SWT.FILL, SWT.FILL, true, true));
- 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 (horizontalButton.getSelection ()) style |= SWT.H_SCROLL;
- if (verticalButton.getSelection ()) style |= SWT.V_SCROLL;
- if (checkButton.getSelection()) style |= SWT.CHECK;
- if (fullSelectionButton.getSelection ()) style |= SWT.FULL_SELECTION;
- if (borderButton.getSelection()) style |= SWT.BORDER;
-
- /* Create the text tree */
- tree1 = new Tree (treeGroup, style);
- boolean multiColumn = multipleColumns.getSelection();
- if (multiColumn) {
- for (int i = 0; i < columnTitles.length; i++) {
- TreeColumn treeColumn = new TreeColumn(tree1, SWT.NONE);
- treeColumn.setText(columnTitles[i]);
- treeColumn.setToolTipText(ControlExample.getResourceString("Tooltip", new String [] {columnTitles[i]}));
- }
- tree1.setSortColumn(tree1.getColumn(0));
- }
- for (int i = 0; i < 4; i++) {
- TreeItem item = new TreeItem (tree1, SWT.NONE);
- setItemText(item, i, ControlExample.getResourceString("Node_" + (i + 1)));
- if (i < 3) {
- TreeItem subitem = new TreeItem (item, SWT.NONE);
- setItemText(subitem, i, ControlExample.getResourceString("Node_" + (i + 1) + "_1"));
- }
- }
- TreeItem treeRoots[] = tree1.getItems ();
- TreeItem item = new TreeItem (treeRoots[1], SWT.NONE);
- setItemText(item, 1, ControlExample.getResourceString("Node_2_2"));
- item = new TreeItem (item, SWT.NONE);
- setItemText(item, 1, ControlExample.getResourceString("Node_2_2_1"));
- textNode1 = treeRoots[0];
- packColumns(tree1);
- try {
- TreeColumn column = tree1.getColumn(0);
- resizableColumns.setSelection (column.getResizable());
- } catch (IllegalArgumentException ex) {}
-
- /* Create the image tree */
- tree2 = new Tree (imageTreeGroup, style);
- Image image = instance.images[ControlExample.ciClosedFolder];
- if (multiColumn) {
- for (int i = 0; i < columnTitles.length; i++) {
- TreeColumn treeColumn = new TreeColumn(tree2, SWT.NONE);
- treeColumn.setText(columnTitles[i]);
- treeColumn.setToolTipText(ControlExample.getResourceString("Tooltip", new String [] {columnTitles[i]}));
- if (headerImagesButton.getSelection()) treeColumn.setImage(instance.images [i % 3]);
- }
- }
- for (int i = 0; i < 4; i++) {
- item = new TreeItem (tree2, SWT.NONE);
- setItemText(item, i, ControlExample.getResourceString("Node_" + (i + 1)));
- if (multiColumn && subImagesButton.getSelection()) {
- for (int j = 0; j < columnTitles.length; j++) {
- item.setImage(j, image);
- }
- } else {
- item.setImage(image);
- }
- if (i < 3) {
- TreeItem subitem = new TreeItem (item, SWT.NONE);
- setItemText(subitem, i, ControlExample.getResourceString("Node_" + (i + 1) + "_1"));
- if (multiColumn && subImagesButton.getSelection()) {
- for (int j = 0; j < columnTitles.length; j++) {
- subitem.setImage(j, image);
- }
- } else {
- subitem.setImage(image);
- }
- }
- }
- treeRoots = tree2.getItems ();
- item = new TreeItem (treeRoots[1], SWT.NONE);
- setItemText(item, 1, ControlExample.getResourceString("Node_2_2"));
- if (multiColumn && subImagesButton.getSelection()) {
- for (int j = 0; j < columnTitles.length; j++) {
- item.setImage(j, image);
- }
- } else {
- item.setImage(image);
- }
- item = new TreeItem (item, SWT.NONE);
- setItemText(item, 1, ControlExample.getResourceString("Node_2_2_1"));
- if (multiColumn && subImagesButton.getSelection()) {
- for (int j = 0; j < columnTitles.length; j++) {
- item.setImage(j, image);
- }
- } else {
- item.setImage(image);
- }
- imageNode1 = treeRoots[0];
- packColumns(tree2);
- }
-
- void setItemText(TreeItem item, int i, String node) {
- int index = i % 3;
- if (multipleColumns.getSelection()) {
- tableData [index][0] = node;
- item.setText (tableData [index]);
- } else {
- item.setText (node);
- }
- }
-
- /**
- * Creates the "Size" group. The "Size" group contains
- * controls that allow the user to change the size of
- * the example widgets.
- */
- void createSizeGroup () {
- super.createSizeGroup();
-
- packColumnsButton = new Button (sizeGroup, SWT.PUSH);
- packColumnsButton.setText (ControlExample.getResourceString("Pack_Columns"));
- packColumnsButton.addSelectionListener(new SelectionAdapter () {
- public void widgetSelected (SelectionEvent event) {
- packColumns (tree1);
- packColumns (tree2);
- setExampleWidgetSize ();
- }
- });
- }
-
- /**
- * 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");
- }
-
- /**
- * Gets the "Example" widget children's items, if any.
- *
- * @return an array containing the example widget children's items
- */
- Item [] getExampleWidgetItems () {
- /* Note: We do not bother collecting the tree items
- * because tree items don't have any events. If events
- * are ever added to TreeItem, then this needs to change.
- */
- Item [] columns1 = tree1.getColumns();
- Item [] columns2 = tree2.getColumns();
- Item [] allItems = new Item [columns1.length + columns2.length];
- System.arraycopy(columns1, 0, allItems, 0, columns1.length);
- System.arraycopy(columns2, 0, allItems, columns1.length, columns2.length);
- return allItems;
- }
-
- /**
- * Gets the "Example" widget children.
- */
- Widget [] getExampleWidgets () {
- return new Widget [] {tree1, tree2};
- }
-
- /**
- * Returns a list of set/get API method names (without the set/get prefix)
- * that can be used to set/get values in the example control(s).
- */
- String[] getMethodNames() {
- return new String[] {"ColumnOrder", "Selection", "ToolTipText", "TopItem"};
- }
-
- Object[] parameterForType(String typeName, String value, Widget widget) {
- if (typeName.equals("org.eclipse.swt.widgets.TreeItem")) {
- TreeItem item = findItem(value, ((Tree) widget).getItems());
- if (item != null) return new Object[] {item};
- }
- if (typeName.equals("[Lorg.eclipse.swt.widgets.TreeItem;")) {
- String[] values = split(value, ',');
- TreeItem[] items = new TreeItem[values.length];
- for (int i = 0; i < values.length; i++) {
- TreeItem item = findItem(values[i], ((Tree) widget).getItems());
- if (item == null) break;
- items[i] = item;
- }
- return new Object[] {items};
- }
- return super.parameterForType(typeName, value, widget);
- }
-
- TreeItem findItem(String value, TreeItem[] items) {
- for (int i = 0; i < items.length; i++) {
- TreeItem item = items[i];
- if (item.getText().equals(value)) return item;
- item = findItem(value, item.getItems());
- if (item != null) return item;
- }
- return null;
- }
-
- /**
- * Gets the text for the tab folder item.
- */
- String getTabText () {
- return "Tree";
- }
-
- void packColumns (Tree tree) {
- if (multipleColumns.getSelection()) {
- int columnCount = tree.getColumnCount();
- for (int i = 0; i < columnCount; i++) {
- TreeColumn treeColumn = tree.getColumn(i);
- treeColumn.pack();
- }
- }
- }
-
- /**
- * Sets the moveable columns state of the "Example" widgets.
- */
- void setColumnsMoveable () {
- boolean selection = moveableColumns.getSelection();
- TreeColumn[] columns1 = tree1.getColumns();
- for (int i = 0; i < columns1.length; i++) {
- columns1[i].setMoveable(selection);
- }
- TreeColumn[] columns2 = tree2.getColumns();
- for (int i = 0; i < columns2.length; i++) {
- columns2[i].setMoveable(selection);
- }
- }
-
- /**
- * Sets the resizable columns state of the "Example" widgets.
- */
- void setColumnsResizable () {
- boolean selection = resizableColumns.getSelection();
- TreeColumn[] columns1 = tree1.getColumns();
- for (int i = 0; i < columns1.length; i++) {
- columns1[i].setResizable(selection);
- }
- TreeColumn[] columns2 = tree2.getColumns();
- for (int i = 0; i < columns2.length; i++) {
- columns2[i].setResizable(selection);
- }
- }
-
- /**
- * 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 ();
- if (oldFont != null) oldFont.dispose();
- oldColor = cellForegroundColor;
- cellForegroundColor = null;
- setCellForeground ();
- if (oldColor != null) oldColor.dispose();
- oldColor = cellBackgroundColor;
- cellBackgroundColor = null;
- setCellBackground ();
- if (oldColor != null) oldColor.dispose();
- oldFont = font;
- cellFont = null;
- setCellFont ();
- if (oldFont != null) oldFont.dispose();
- }
-
- /**
- * Sets the state of the "Example" widgets.
- */
- void setExampleWidgetState () {
- setItemBackground ();
- setItemForeground ();
- setItemFont ();
- setCellBackground ();
- setCellForeground ();
- setCellFont ();
- if (!instance.startup) {
- setColumnsMoveable ();
- setColumnsResizable ();
- setWidgetHeaderVisible ();
- setWidgetSortIndicator ();
- setWidgetLinesVisible ();
- }
- super.setExampleWidgetState ();
- checkButton.setSelection ((tree1.getStyle () & SWT.CHECK) != 0);
- checkButton.setSelection ((tree2.getStyle () & SWT.CHECK) != 0);
- fullSelectionButton.setSelection ((tree1.getStyle () & SWT.FULL_SELECTION) != 0);
- fullSelectionButton.setSelection ((tree2.getStyle () & SWT.FULL_SELECTION) != 0);
- try {
- TreeColumn column = tree1.getColumn(0);
- moveableColumns.setSelection (column.getMoveable());
- resizableColumns.setSelection (column.getResizable());
- } catch (IllegalArgumentException ex) {}
- headerVisibleButton.setSelection (tree1.getHeaderVisible());
- linesVisibleButton.setSelection (tree1.getLinesVisible());
- }
-
- /**
- * Sets the background color of the Node 1 TreeItems in column 1.
- */
- void setCellBackground () {
- if (!instance.startup) {
- textNode1.setBackground (1, cellBackgroundColor);
- imageNode1.setBackground (1, cellBackgroundColor);
- }
- /* Set the background color item's image to match the background color of the cell. */
- Color color = cellBackgroundColor;
- if (color == null) color = textNode1.getBackground (1);
- TableItem item = colorAndFontTable.getItem(CELL_BACKGROUND_COLOR);
- Image oldImage = item.getImage();
- if (oldImage != null) oldImage.dispose();
- item.setImage (colorImage(color));
- }
-
- /**
- * Sets the foreground color of the Node 1 TreeItems in column 1.
- */
- void setCellForeground () {
- if (!instance.startup) {
- textNode1.setForeground (1, cellForegroundColor);
- imageNode1.setForeground (1, cellForegroundColor);
- }
- /* Set the foreground color item's image to match the foreground color of the cell. */
- Color color = cellForegroundColor;
- if (color == null) color = textNode1.getForeground (1);
- TableItem item = colorAndFontTable.getItem(CELL_FOREGROUND_COLOR);
- Image oldImage = item.getImage();
- if (oldImage != null) oldImage.dispose();
- item.setImage (colorImage(color));
- }
-
- /**
- * Sets the font of the Node 1 TreeItems in column 1.
- */
- void setCellFont () {
- if (!instance.startup) {
- textNode1.setFont (1, cellFont);
- imageNode1.setFont (1, cellFont);
- }
- /* Set the font item's image to match the font of the item. */
- Font ft = cellFont;
- if (ft == null) ft = textNode1.getFont (1);
- TableItem item = colorAndFontTable.getItem(CELL_FONT);
- Image oldImage = item.getImage();
- if (oldImage != null) oldImage.dispose();
- item.setImage (fontImage(ft));
- item.setFont(ft);
- colorAndFontTable.layout ();
- }
-
- /**
- * Sets the background color of the Node 1 TreeItems.
- */
- void setItemBackground () {
- if (!instance.startup) {
- textNode1.setBackground (itemBackgroundColor);
- imageNode1.setBackground (itemBackgroundColor);
- }
- /* Set the background button's color to match the background color of the item. */
- Color color = itemBackgroundColor;
- if (color == null) color = textNode1.getBackground ();
- TableItem item = colorAndFontTable.getItem(ITEM_BACKGROUND_COLOR);
- Image oldImage = item.getImage();
- if (oldImage != null) oldImage.dispose();
- item.setImage (colorImage(color));
- }
-
- /**
- * Sets the foreground color of the Node 1 TreeItems.
- */
- void setItemForeground () {
- if (!instance.startup) {
- textNode1.setForeground (itemForegroundColor);
- imageNode1.setForeground (itemForegroundColor);
- }
- /* Set the foreground button's color to match the foreground color of the item. */
- Color color = itemForegroundColor;
- if (color == null) color = textNode1.getForeground ();
- TableItem item = colorAndFontTable.getItem(ITEM_FOREGROUND_COLOR);
- Image oldImage = item.getImage();
- if (oldImage != null) oldImage.dispose();
- item.setImage (colorImage(color));
- }
-
- /**
- * Sets the font of the Node 1 TreeItems.
- */
- void setItemFont () {
- if (!instance.startup) {
- textNode1.setFont (itemFont);
- imageNode1.setFont (itemFont);
- }
- /* Set the font item's image to match the font of the item. */
- Font ft = itemFont;
- if (ft == null) ft = textNode1.getFont ();
- TableItem item = colorAndFontTable.getItem(ITEM_FONT);
- Image oldImage = item.getImage();
- if (oldImage != null) oldImage.dispose();
- item.setImage (fontImage(ft));
- item.setFont(ft);
- colorAndFontTable.layout ();
- }
-
- /**
- * Sets the header visible state of the "Example" widgets.
- */
- void setWidgetHeaderVisible () {
- tree1.setHeaderVisible (headerVisibleButton.getSelection ());
- tree2.setHeaderVisible (headerVisibleButton.getSelection ());
- }
-
- /**
- * Sets the sort indicator state of the "Example" widgets.
- */
- void setWidgetSortIndicator () {
- if (sortIndicatorButton.getSelection ()) {
- initializeSortState (tree1);
- initializeSortState (tree2);
- } else {
- resetSortState (tree1);
- resetSortState (tree2);
- }
- }
-
- /**
- * Sets the initial sort indicator state and adds a listener
- * to cycle through sort states and columns.
- */
- void initializeSortState (final Tree tree) {
- /* Reset to known state: 'down' on column 0. */
- tree.setSortDirection (SWT.DOWN);
- TreeColumn [] columns = tree.getColumns();
- for (int i = 0; i < columns.length; i++) {
- TreeColumn column = columns[i];
- if (i == 0) tree.setSortColumn(column);
- SelectionListener listener = new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- int sortDirection = SWT.DOWN;
- if (e.widget == tree.getSortColumn()) {
- /* If the sort column hasn't changed, cycle down -> up -> none. */
- switch (tree.getSortDirection ()) {
- case SWT.DOWN: sortDirection = SWT.UP; break;
- case SWT.UP: sortDirection = SWT.NONE; break;
- }
- } else {
- tree.setSortColumn((TreeColumn)e.widget);
- }
- tree.setSortDirection (sortDirection);
- }
- };
- column.addSelectionListener(listener);
- column.setData("SortListener", listener); //$NON-NLS-1$
- }
- }
-
- void resetSortState (final Tree tree) {
- tree.setSortDirection (SWT.NONE);
- TreeColumn [] columns = tree.getColumns();
- for (int i = 0; i < columns.length; i++) {
- SelectionListener listener = (SelectionListener)columns[i].getData("SortListener"); //$NON-NLS-1$
- if (listener != null) columns[i].removeSelectionListener(listener);
- }
- }
-
- /**
- * Sets the lines visible state of the "Example" widgets.
- */
- void setWidgetLinesVisible () {
- tree1.setLinesVisible (linesVisibleButton.getSelection ());
- tree2.setLinesVisible (linesVisibleButton.getSelection ());
- }
-
- protected void specialPopupMenuItems(Menu menu, Event event) {
- MenuItem item = new MenuItem(menu, SWT.PUSH);
- item.setText("getItem(Point) on mouse coordinates");
- final Tree t = (Tree) event.widget;
- menuMouseCoords = t.toControl(new Point(event.x, event.y));
- item.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- eventConsole.append ("getItem(Point(" + menuMouseCoords + ")) returned: " + t.getItem(menuMouseCoords));
- eventConsole.append ("\n");
- };
- });
- }
-}
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/backgroundImage.png b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/backgroundImage.png
deleted file mode 100644
index 0632ad89b0..0000000000
Binary files a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/backgroundImage.png and /dev/null differ
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
Binary files a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/bold.bmp and /dev/null 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
Binary files a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/bold_mask.bmp and /dev/null differ
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/browser-content.html b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/browser-content.html
deleted file mode 100644
index 248b93ee1c..0000000000
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/browser-content.html
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-SWT Browser
-
-
-About SWT Browser
-You are looking at HTML content in a Browser widget.
-
-
-About SWT
-For more information on SWT, including the Widget Gallery, Snippets, Examples, FAQ, Tools, Documentation
-and more, check out http://www.eclipse.org/swt.
-
-Eclipse Downloads Page
-To download the latest Integration Build of eclipse, go to:
-http://download.eclipse.org/eclipse/downloads.
-
-Bug Reports and Feature Requests
-To report an SWT bug or request an SWT feature, go to:
-https://bugs.eclipse.org/bugs
-and select Component: SWT.
-
-
-