Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Pazderski2019-05-18 13:05:03 -0400
committerPaul Pazderski2019-06-14 18:34:53 -0400
commit7051049221c9d3b99ff179f167fa09a6e02138ee (patch)
tree21704e08b4c470f16f4fece637154f86fce96cc8
parenta1b9b9e1accf9dfece07675d7919a6f4e6561891 (diff)
downloadeclipse.platform.swt-7051049221c9d3b99ff179f167fa09a6e02138ee.tar.gz
eclipse.platform.swt-7051049221c9d3b99ff179f167fa09a6e02138ee.tar.xz
eclipse.platform.swt-7051049221c9d3b99ff179f167fa09a6e02138ee.zip
Bug 547304 - [cleanup] Fix wrong space/tab indentation
This change fixes space or mixed tab/space indentations in all Java files. This also includes two or three space indentations and even fix most stray single spaces in indentations. The change includes only whitespace formatting and no code changes. Change-Id: Ib7b260691acee06845cc580dd8cb859de0da8bf1
-rw-r--r--bundles/org.eclipse.swt.tools/Icon Exe/org/eclipse/swt/tools/internal/IconExe.java26
-rw-r--r--bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/CleanupClass.java4
-rw-r--r--bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/CleanupConstants.java2
-rw-r--r--bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/LockGenerator.java4
-rw-r--r--bundles/org.eclipse.swt.tools/Mac Generation/org/eclipse/swt/tools/internal/MacGenerator.java4
-rw-r--r--bundles/org.eclipse.swt.tools/Mac Generation/org/eclipse/swt/tools/internal/MacGeneratorUI.java78
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Accessibility/cocoa/org/eclipse/swt/accessibility/Accessible.java16
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Accessibility/gtk/org/eclipse/swt/accessibility/Accessible.java16
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Accessibility/win32/org/eclipse/swt/accessibility/Accessible.java26
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Browser/win32/org/eclipse/swt/browser/WebSite.java54
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CBanner.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CCombo.java26
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CLabel.java112
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolder.java48
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolderEvent.java14
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolderRenderer.java92
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabItem.java16
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/ControlEditor.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StackLayout.java28
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java38
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/TableCursor.java38
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/ViewForm.java12
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/ViewFormLayout.java12
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/DropTarget.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/common/org/eclipse/swt/dnd/DragSourceEvent.java50
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/DropTarget.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/ImageTransfer.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TransferData.java12
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/ByteArrayTransfer.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/DragSource.java16
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/DropTarget.java8
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TransferData.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OLE.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleClientSite.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/Variant.java114
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT OpenGL/win32/org/eclipse/swt/internal/opengl/win32/LAYERPLANEDESCRIPTOR.java48
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT OpenGL/win32/org/eclipse/swt/internal/opengl/win32/PIXELFORMATDESCRIPTOR.java52
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cairo/org/eclipse/swt/internal/cairo/Cairo.java30
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/OS.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/common/org/eclipse/swt/internal/Library.java10
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GDK.java34
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GTK.java226
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEventKey.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java26
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/com/win32/FileDialogVtbl.java54
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/com/win32/ShellItemVtbl.java16
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/GUID.java8
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IOleInPlaceActiveObject.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IStorage.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/CERT_PUBLIC_KEY_INFO.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/DROPFILES.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/GESTURECONFIG.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/GESTUREINFO.java30
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/MEASUREITEMSTRUCT.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/NMTVDISPINFO.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/OUTLINETEXTMETRIC.java68
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/TVINSERTSTRUCT.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/TVITEM.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Printing/common/org/eclipse/swt/printing/PrinterData.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Printing/gtk/org/eclipse/swt/printing/Printer.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Program/cocoa/org/eclipse/swt/program/Program.java26
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Program/win32/org/eclipse/swt/program/Program.java10
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT WebKit/cocoa/org/eclipse/swt/browser/WebKit.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/browser/WebKit.java156
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/internal/webkit/JSClassDefinition.java66
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/browser/WebDownloadDelegate.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/browser/WebFrameLoadDelegate.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/browser/WebKit.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/browser/WebPolicyDelegate.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/browser/WebResourceLoadDelegate.java12
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/JSClassDefinition.java68
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/GC.java58
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/TextLayout.java12
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Button.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Canvas.java114
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Combo.java8
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Control.java28
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Decorations.java8
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Display.java58
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/List.java8
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Menu.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/MenuItem.java12
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ProgressBar.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Scale.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ScrollBar.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Scrollable.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Shell.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Slider.java46
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Spinner.java70
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Table.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TableColumn.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Text.java12
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ToolBar.java18
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ToolItem.java42
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tracker.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tree.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TreeColumn.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/SWT.java48
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/SWTError.java8
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/events/KeyEvent.java14
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/events/PaintEvent.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/DPIUtil.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/GIFFileFormat.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/JPEGDecoder.java50
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/JPEGFileFormat.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/LEDataInputStream.java20
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/PngDeflater.java66
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/PngHuffmanTable.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/PngHuffmanTables.java24
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/WinBMPFileFormat.java10
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/FillLayout.java22
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/FormAttachment.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/FormData.java16
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/FormLayout.java28
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/GridData.java30
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/GridLayout.java52
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/RowLayout.java26
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Device.java18
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/GC.java92
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Image.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/TextLayout.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/internal/GDBus.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Button.java32
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Canvas.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ColorDialog.java30
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Combo.java32
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java66
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DateTime.java32
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Decorations.java16
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Link.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/List.java12
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Menu.java36
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MenuItem.java14
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TabFolder.java28
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java12
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Text.java30
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolBar.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolItem.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java8
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Cursor.java12
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/GC.java12
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Image.java32
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/internal/ImageList.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Combo.java10
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java14
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Decorations.java26
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/DirectoryDialog.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Display.java22
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ExpandBar.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/FileDialog.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/IME.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/List.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Menu.java24
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/MenuItem.java14
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Sash.java10
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Scale.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Scrollable.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Slider.java36
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Spinner.java36
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TabFolder.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Table.java88
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Text.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tracker.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tree.java16
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TreeItem.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Widget.java14
-rw-r--r--examples/org.eclipse.swt.examples.launcher/src/org/eclipse/swt/examples/launcher/LauncherPlugin.java16
-rw-r--r--examples/org.eclipse.swt.examples.ole.win32/src/org/eclipse/swt/examples/ole/win32/OLEExample.java14
-rw-r--r--examples/org.eclipse.swt.examples.ole.win32/src/org/eclipse/swt/examples/ole/win32/OleBrowserView.java6
-rw-r--r--examples/org.eclipse.swt.examples.ole.win32/src/org/eclipse/swt/examples/ole/win32/OlePlugin.java12
-rw-r--r--examples/org.eclipse.swt.examples.ole.win32/src/org/eclipse/swt/examples/ole/win32/OleWebBrowser.java6
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/accessibility/CTable.java6
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/accessibility/CTableColumn.java2
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/accessibility/CTableItem.java2
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/accessibility/ControlsWithAccessibleNamesExample.java24
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/ColorTab.java62
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/ControlExample.java6
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/CoolBarTab.java6
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/Tab.java8
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/TableTab.java8
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/TreeTab.java18
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/dnd/DNDExample.java12
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/FileViewer.java10
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/CardsTab.java68
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/CustomAlphaTab.java2
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/FontBounceTab.java74
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/GradientDialog.java20
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/GraphicAntialiasTab.java2
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/IntroTab.java38
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/PathClippingTab.java4
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/RegionClippingTab.java4
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/StarPolyTab.java22
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/imageanalyzer/ImageAnalyzer.java8
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/javaviewer/JavaLineStyler.java2
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/layoutexample/GridLayoutTab.java2
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/layoutexample/LayoutExample.java4
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/layoutexample/StackLayoutTab.java6
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/layoutexample/Tab.java44
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/ContinuousPaintSession.java2
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/DragPaintSession.java2
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/PaintSession.java4
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/SegmentedPaintSession.java2
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/TextTool.java2
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/TextEditor.java22
-rw-r--r--examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/FogTab.java2
-rw-r--r--examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/LWJGLExample.java38
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet150.java80
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet152.java114
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet153.java50
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet157.java12
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet174.java96
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet186.java40
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet2.java94
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet210.java18
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet228.java4
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet244.java38
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet257.java10
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet274.java106
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet282.java14
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet304.java96
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet333.java6
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet334.java2
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet336.java2
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet359.java18
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet363.java130
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet366.java4
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet5.java52
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet6.java52
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet81.java10
-rw-r--r--tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug119157_ShellWithoutFocus.java68
-rw-r--r--tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug123091_TableEditorRefresh.java74
-rw-r--r--tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug138265_SystemMemoryUsage.java2
-rw-r--r--tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug147320_ShellSetBounds.java24
-rw-r--r--tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug150921_TextCaretPosition.java66
-rw-r--r--tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug152916_ShellSetVisibleBounds.java26
-rw-r--r--tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug160691_SWTAWTShell.java34
-rw-r--r--tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug166720_TableEditorFlicker.java58
-rw-r--r--tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug185817_MouseListener.java132
-rw-r--r--tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug186268_TableItemSetTextBottom.java72
-rw-r--r--tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug191137_ActiveSelectionLost.java30
-rw-r--r--tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug197690_CVSWizard.java34
-rw-r--r--tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug197785_TextSelectionBehavior.java78
-rw-r--r--tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug205199_LabelSetImageNull.java4
-rw-r--r--tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug210915_InvisibleShellLocation.java82
-rw-r--r--tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug217324_ActivateEventDialog.java80
-rw-r--r--tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug221240_AWTJVMCrash.java174
-rw-r--r--tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug221955_BackgroundModeQT.java104
-rw-r--r--tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug221962_CTabFolderCorrupted.java6
-rw-r--r--tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug223864_ToolTipToolbarButton.java54
-rw-r--r--tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug225725_GCDrawing.java50
-rw-r--r--tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug230385_ControlSetGetSizeDiscrepancy.java38
-rw-r--r--tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug249689_MeasureEventWrongBounds.java40
-rw-r--r--tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug251354_TabItemToolTip.java94
-rw-r--r--tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug258196_VirtualTreeResizing.java54
-rw-r--r--tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug261288_TreeBGColor.java40
-rw-r--r--tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug262974_ModalBrowserDialog.java70
-rw-r--r--tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug278882_ToolBarBackgroundImageTest.java10
-rw-r--r--tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug286244_ShellActivateLoop.java66
-rw-r--r--tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug287038_TableKeyEvent.java72
-rw-r--r--tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug290650_FillLayoutComputeSize.java70
-rw-r--r--tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug291073_CrashWhenPrintingToConsole.java12
-rw-r--r--tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug292413_MissingSWTFocused.java58
-rw-r--r--tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug292459_ToolTipFlicker.java64
-rw-r--r--tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug293581_NO_REDRAW_RESIZE_noeffect.java40
-rw-r--r--tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug299045_TableLines.java140
-rw-r--r--tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug299492_LabelCenterWrap.java86
-rw-r--r--tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug302956_ControlFailedMouseEvent.java42
-rw-r--r--tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug302961_TableItemTrackerUpdating.java60
-rw-r--r--tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug303710_ForceActive.java52
-rw-r--r--tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug306490_SwingDisposeError.java2
-rw-r--r--tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug319612_getSizeResizeOnTop.java50
-rw-r--r--tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug323044_ReadAndDispatchTrue.java68
-rw-r--r--tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug326117_EmbeddedBrowser.java70
-rw-r--r--tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug336238_ShellBoundsTest.java30
-rw-r--r--tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug375385_ShellFullScreen.java100
-rw-r--r--tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug386271_setMenuBar.java52
-rw-r--r--tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug393723_checkForegroundBug.java42
-rw-r--r--tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug430538_JS_Set_Background.java10
-rw-r--r--tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug436085_TextEntryTabs.java22
-rw-r--r--tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug443185_ToolbarCroppingIssue.java64
-rw-r--r--tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug443185_ToolbarTestFillLayout.java66
-rw-r--r--tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug443185_ToolbarTestGridLayout.java68
-rw-r--r--tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug443185_ToolbarTestPlain.java58
-rw-r--r--tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug443185_ToolbarTestRowLayout.java68
-rw-r--r--tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug460017_ComboOverwrite.java40
-rw-r--r--tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug461354_ListTopIndexTest.java2
-rw-r--r--tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug465280_InvisibleControlAllocation.java26
-rw-r--r--tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug475784_TransparentComposite.java412
-rw-r--r--tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug477950_SystemColors.java36
-rw-r--r--tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug480926_CellEditorPosition.java78
-rw-r--r--tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug481485_ButtonLabelPaintListener.java30
-rw-r--r--tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug483112_TreeColumnsTest.java64
-rw-r--r--tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug483791_setBackgroundGC.java66
-rw-r--r--tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug486068_ExpandBarTest.java4
-rw-r--r--tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug496639_DialogFullScreenShell.java90
-rw-r--r--tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug500631_RHELIcons.java74
-rw-r--r--tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug500664_ToolTipWrongMonitor.java32
-rw-r--r--tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug500814_GLCanvasCrash.java36
-rw-r--r--tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug510803_TabFolder_editable_table_brokenGtk3.java22
-rw-r--r--tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug517633_SpinnerWrongText.java38
-rw-r--r--tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug519996_focusDisposeIssue.java10
-rw-r--r--tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug531667_CTabFolder_right_to_left_tabs_are_not_painted_nested.java2
-rw-r--r--tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug531667_Group_drawing_with_paint_listener_is_wrong.java4
-rw-r--r--tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug535124_TreeSelection.java36
-rw-r--r--tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug535978_TableEditorHeader.java82
-rw-r--r--tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug538114_ExpandBarEmptyAll.java44
-rw-r--r--tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug542475_DateTimeWrongIncrement.java30
-rw-r--r--tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug71990_SlowTablePack.java216
-rw-r--r--tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug74739_TableTopIndex.java8
-rw-r--r--tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug85131_ToolTipSetNull.java88
-rw-r--r--tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/manualJUnit/MJ_Table.java260
-rw-r--r--tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/manualJUnit/MJ_Tree.java168
-rw-r--r--tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/manualJUnit/MJ_root.java24
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/ConsistencyUtility.java698
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/StyledTextContentSpec.java2
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_browser_Browser.java42
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_CCombo.java38
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_CLabel.java4
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_CTabFolder.java44
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_ExtendedModifyListener.java2
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_StyledText.java48
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_custom_TextChangeListener.java4
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_GC.java2
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_Image.java4
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_RGB.java12
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_RGBA.java16
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_graphics_TextLayout.java36
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Button.java140
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Canvas.java4
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Combo.java38
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Control.java200
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_CoolBar.java90
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_DateTime.java92
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Decorations.java6
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_ExpandBar.java42
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Group.java4
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Label.java24
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_List.java32
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Menu.java6
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_ProgressBar.java4
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Sash.java24
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Scale.java14
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Shell.java116
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Slider.java26
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_TabFolder.java92
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Table.java44
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_TableItem.java78
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Text.java16
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_ToolBar.java46
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Tree.java66
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_TreeItem.java74
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Widget.java66
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/performance/Test_situational.java6
354 files changed, 6441 insertions, 6441 deletions
diff --git a/bundles/org.eclipse.swt.tools/Icon Exe/org/eclipse/swt/tools/internal/IconExe.java b/bundles/org.eclipse.swt.tools/Icon Exe/org/eclipse/swt/tools/internal/IconExe.java
index 547a8dc03e..27e488390b 100644
--- a/bundles/org.eclipse.swt.tools/Icon Exe/org/eclipse/swt/tools/internal/IconExe.java
+++ b/bundles/org.eclipse.swt.tools/Icon Exe/org/eclipse/swt/tools/internal/IconExe.java
@@ -28,11 +28,11 @@ import org.eclipse.swt.*;
*/
public class IconExe {
- /**
+ /**
* Replace the Desktop icons provided in the Windows executable program
* with matching icons provided by the user.
*
- * Takes 2 arguments
+ * Takes 2 arguments
* argument 0: the Windows executable e.g c:/eclipse/eclipse.exe
* argument 1: The .ico file to write to the given executable e.g. c:/myApp.ico
*
@@ -258,7 +258,7 @@ void dumpResourceDirectory(RandomAccessFile raf, int imageResourceDirectoryOffse
}
}
}
- }
+ }
}
static ImageData parseIcon(RandomAccessFile raf, int offset) throws IOException {
@@ -2616,13 +2616,13 @@ static class LEDataInputStream extends InputStream {
}
/**
- * Reads at most <code>length</code> bytes from this LEDataInputStream and
- * stores them in byte array <code>buffer</code> starting at <code>offset</code>.
- * <p>
- * Answer the number of bytes actually read or -1 if no bytes were read and
- * end of stream was encountered. This implementation reads bytes from
- * the pushback buffer first, then the target stream if more bytes are required
- * to satisfy <code>count</code>.
+ * Reads at most <code>length</code> bytes from this LEDataInputStream and
+ * stores them in byte array <code>buffer</code> starting at <code>offset</code>.
+ * <p>
+ * Answer the number of bytes actually read or -1 if no bytes were read and
+ * end of stream was encountered. This implementation reads bytes from
+ * the pushback buffer first, then the target stream if more bytes are required
+ * to satisfy <code>count</code>.
* </p>
* @param buffer the byte array in which to store the read bytes.
* @param offset the offset in <code>buffer</code> to store the read bytes.
@@ -2635,9 +2635,9 @@ static class LEDataInputStream extends InputStream {
private int readData(byte[] buffer, int offset, int length) throws IOException {
if (buf == null) throw new IOException();
if (offset < 0 || offset > buffer.length ||
- length < 0 || (length > buffer.length - offset)) {
- throw new ArrayIndexOutOfBoundsException();
- }
+ length < 0 || (length > buffer.length - offset)) {
+ throw new ArrayIndexOutOfBoundsException();
+ }
int cacheCopied = 0;
int newOffset = offset;
diff --git a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/CleanupClass.java b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/CleanupClass.java
index 43a9e7035e..d582f8f1b0 100644
--- a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/CleanupClass.java
+++ b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/CleanupClass.java
@@ -37,8 +37,8 @@ String[] getArgNames(JNIMethod method) {
int parantesesStart = classSource.indexOf("(", index);
if (classSource.substring(index + name.length(), parantesesStart).trim().length() == 0) {
int parantesesEnd = classSource.indexOf(")", parantesesStart);
- params = classSource.substring(parantesesStart + 1, parantesesEnd);
- break;
+ params = classSource.substring(parantesesStart + 1, parantesesEnd);
+ break;
}
}
String[] names = new String[n_args];
diff --git a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/CleanupConstants.java b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/CleanupConstants.java
index 19f1147190..d065dbd5e5 100644
--- a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/CleanupConstants.java
+++ b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/CleanupConstants.java
@@ -27,7 +27,7 @@ String getFieldValue(JNIField field) {
int equalsIndex = classSource.indexOf("=", index);
if (classSource.substring(index + name.length(), equalsIndex).trim().length() == 0) {
int semiIndex = classSource.indexOf(";", equalsIndex);
- return classSource.substring(equalsIndex + 1, semiIndex).trim();
+ return classSource.substring(equalsIndex + 1, semiIndex).trim();
}
}
}
diff --git a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/LockGenerator.java b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/LockGenerator.java
index e70a747a6f..c0157d9d08 100644
--- a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/LockGenerator.java
+++ b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/LockGenerator.java
@@ -35,8 +35,8 @@ String getParams(JNIMethod method) {
int parantesesStart = classSource.indexOf("(", index);
if (classSource.substring(index + name.length(), parantesesStart).trim().length() == 0) {
int parantesesEnd = classSource.indexOf(")", parantesesStart);
- params = classSource.substring(parantesesStart + 1, parantesesEnd);
- break;
+ params = classSource.substring(parantesesStart + 1, parantesesEnd);
+ break;
}
}
return params;
diff --git a/bundles/org.eclipse.swt.tools/Mac Generation/org/eclipse/swt/tools/internal/MacGenerator.java b/bundles/org.eclipse.swt.tools/Mac Generation/org/eclipse/swt/tools/internal/MacGenerator.java
index b027247330..9a20291627 100644
--- a/bundles/org.eclipse.swt.tools/Mac Generation/org/eclipse/swt/tools/internal/MacGenerator.java
+++ b/bundles/org.eclipse.swt.tools/Mac Generation/org/eclipse/swt/tools/internal/MacGenerator.java
@@ -200,8 +200,8 @@ String getParamName(Node param, int i) {
if (swtName != null) {
paramName = swtName.getNodeValue();
} else {
- Node node = paramAttributes.getNamedItem("name");
- if (node != null) paramName = node.getNodeValue();
+ Node node = paramAttributes.getNamedItem("name");
+ if (node != null) paramName = node.getNodeValue();
}
if (paramName.length() == 0) {
Node node = paramAttributes.getNamedItem("index");
diff --git a/bundles/org.eclipse.swt.tools/Mac Generation/org/eclipse/swt/tools/internal/MacGeneratorUI.java b/bundles/org.eclipse.swt.tools/Mac Generation/org/eclipse/swt/tools/internal/MacGeneratorUI.java
index 918d05bb35..f371d127fc 100644
--- a/bundles/org.eclipse.swt.tools/Mac Generation/org/eclipse/swt/tools/internal/MacGeneratorUI.java
+++ b/bundles/org.eclipse.swt.tools/Mac Generation/org/eclipse/swt/tools/internal/MacGeneratorUI.java
@@ -68,25 +68,25 @@ public class MacGeneratorUI {
}
void checkPath(TreeItem item, boolean checked, boolean grayed) {
- if (item == null) return;
- if (grayed) {
- checked = true;
- } else {
- int index = 0;
- TreeItem[] items = item.getItems();
- while (index < items.length) {
- TreeItem child = items[index];
- if (child.getGrayed() || checked != child.getChecked()) {
- checked = grayed = true;
- break;
- }
- index++;
- }
- }
- item.setChecked(checked);
- item.setGrayed(grayed);
- updateGenAttribute(item);
- checkPath(item.getParentItem(), checked, grayed);
+ if (item == null) return;
+ if (grayed) {
+ checked = true;
+ } else {
+ int index = 0;
+ TreeItem[] items = item.getItems();
+ while (index < items.length) {
+ TreeItem child = items[index];
+ if (child.getGrayed() || checked != child.getChecked()) {
+ checked = grayed = true;
+ break;
+ }
+ index++;
+ }
+ }
+ item.setChecked(checked);
+ item.setGrayed(grayed);
+ updateGenAttribute(item);
+ checkPath(item.getParentItem(), checked, grayed);
}
void checkItem(Node node, TreeItem item) {
@@ -139,22 +139,22 @@ public class MacGeneratorUI {
}
void checkItems(TreeItem item, boolean checked) {
- item.setGrayed(false);
- item.setChecked(checked);
- updateGenAttribute(item);
- TreeItem[] items = item.getItems();
- if (items.length == 1 && items[0].getData() == null) {
- /* Update model only if view is not created */
+ item.setGrayed(false);
+ item.setChecked(checked);
+ updateGenAttribute(item);
+ TreeItem[] items = item.getItems();
+ if (items.length == 1 && items[0].getData() == null) {
+ /* Update model only if view is not created */
Node node = (Node)item.getData();
NodeList childNodes = node.getChildNodes();
for (int i = 0, length = childNodes.getLength(); i < length; i++) {
checkNodes(childNodes.item(i), checked);
}
- } else {
- for (int i = 0; i < items.length; i++) {
- checkItems(items[i], checked);
- }
- }
+ } else {
+ for (int i = 0; i < items.length; i++) {
+ checkItems(items[i], checked);
+ }
+ }
}
void checkNodes(Node node, boolean checked) {
@@ -209,9 +209,9 @@ public class MacGeneratorUI {
}
boolean checked = item.getChecked();
item.getParent().setRedraw(false);
- checkItems(item, checked);
- checkPath(item.getParentItem(), checked, false);
- item.getParent().setRedraw(true);
+ checkItems(item, checked);
+ checkPath(item.getParentItem(), checked, false);
+ item.getParent().setRedraw(true);
});
nodesTree.addListener(SWT.Expand, event -> checkChildren((TreeItem)event.item));
@@ -403,8 +403,8 @@ public class MacGeneratorUI {
}
Document[] documents = gen.getDocuments();
if (node == null && documents.length > 0) {
- int index = 0;
- while (index < documents.length && (node = documents[index]) == null) index++;
+ int index = 0;
+ while (index < documents.length && (node = documents[index]) == null) index++;
}
if (flatNodes == null) {
flatNodes = new ArrayList<>();
@@ -564,10 +564,10 @@ public class MacGeneratorUI {
gen.setXmls(null);
flatNodes = null;
nodesTree.getDisplay().asyncExec(() -> {
- if (nodesTree == null || nodesTree.isDisposed()) return;
- nodesTree.removeAll();
- attribTable.removeAll();
- updateNodes();
+ if (nodesTree == null || nodesTree.isDisposed()) return;
+ nodesTree.removeAll();
+ attribTable.removeAll();
+ updateNodes();
});
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Accessibility/cocoa/org/eclipse/swt/accessibility/Accessible.java b/bundles/org.eclipse.swt/Eclipse SWT Accessibility/cocoa/org/eclipse/swt/accessibility/Accessible.java
index 9be3649131..24785ba85d 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Accessibility/cocoa/org/eclipse/swt/accessibility/Accessible.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Accessibility/cocoa/org/eclipse/swt/accessibility/Accessible.java
@@ -298,10 +298,10 @@ public class Accessible {
* @since 3.7
*/
public void addAccessibleEditableTextListener(AccessibleEditableTextListener listener) {
- checkWidget();
- if (listener == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
+ checkWidget();
+ if (listener == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
if (accessibleEditableTextListeners == null) accessibleEditableTextListeners = new ArrayList<>();
- accessibleEditableTextListeners.add(listener);
+ accessibleEditableTextListeners.add(listener);
}
/**
@@ -449,7 +449,7 @@ public class Accessible {
long cgColor = OS.CGColorCreate(cgColorSpace, comps);
OS.CGColorSpaceRelease(cgColorSpace);
inAttribString.addAttribute(inAttribute, new id(cgColor), inRange);
- OS.CGColorRelease(cgColor);
+ OS.CGColorRelease(cgColor);
}
/**
@@ -1991,12 +1991,12 @@ public class Accessible {
}
if (ace.childID >= ACC.CHILDID_SELF) {
if (role == ACC.ROLE_TABITEM) {
- returnValue = NSNumber.numberWithBool(ace.childID == childID);
+ returnValue = NSNumber.numberWithBool(ace.childID == childID);
} else {
returnValue = new id(OS.NSAccessibilityUnignoredAncestor(childIDToOs(ace.childID).id));
}
} else {
- returnValue = NSNumber.numberWithBool(false);
+ returnValue = NSNumber.numberWithBool(false);
}
break;
case ACC.ROLE_COMBOBOX: // text of the currently selected item
@@ -2924,8 +2924,8 @@ public class Accessible {
* @since 3.7
*/
public void removeAccessibleEditableTextListener(AccessibleEditableTextListener listener) {
- checkWidget();
- if (listener == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
+ checkWidget();
+ if (listener == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
if (accessibleEditableTextListeners != null) {
accessibleEditableTextListeners.remove(listener);
if (accessibleEditableTextListeners.isEmpty()) accessibleEditableTextListeners = null;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Accessibility/gtk/org/eclipse/swt/accessibility/Accessible.java b/bundles/org.eclipse.swt/Eclipse SWT Accessibility/gtk/org/eclipse/swt/accessibility/Accessible.java
index 283dc2bb8b..078404b5d1 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Accessibility/gtk/org/eclipse/swt/accessibility/Accessible.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Accessibility/gtk/org/eclipse/swt/accessibility/Accessible.java
@@ -264,10 +264,10 @@ public class Accessible {
* @since 3.7
*/
public void addAccessibleEditableTextListener(AccessibleEditableTextListener listener) {
- checkWidget();
- if (listener == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
+ checkWidget();
+ if (listener == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
if (accessibleEditableTextListeners == null) accessibleEditableTextListeners = new ArrayList<>();
- accessibleEditableTextListeners.add(listener);
+ accessibleEditableTextListeners.add(listener);
}
/**
@@ -710,12 +710,12 @@ public class Accessible {
* @since 3.7
*/
public void removeAccessibleEditableTextListener(AccessibleEditableTextListener listener) {
- checkWidget();
- if (listener == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
- if (accessibleEditableTextListeners != null) {
- accessibleEditableTextListeners.remove(listener);
+ checkWidget();
+ if (listener == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
+ if (accessibleEditableTextListeners != null) {
+ accessibleEditableTextListeners.remove(listener);
if (accessibleEditableTextListeners.isEmpty()) accessibleEditableTextListeners = null;
- }
+ }
}
/**
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Accessibility/win32/org/eclipse/swt/accessibility/Accessible.java b/bundles/org.eclipse.swt/Eclipse SWT Accessibility/win32/org/eclipse/swt/accessibility/Accessible.java
index 8e87fab0c9..208f955494 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Accessibility/win32/org/eclipse/swt/accessibility/Accessible.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Accessibility/win32/org/eclipse/swt/accessibility/Accessible.java
@@ -558,13 +558,13 @@ public class Accessible {
void createIServiceProvider() {
objIServiceProvider = new COMObject(new int[] {2,0,0,3}) {
- @Override
+ @Override
public long /*int*/ method0(long /*int*/[] args) {return QueryInterface(args[0], args[1]);}
- @Override
+ @Override
public long /*int*/ method1(long /*int*/[] args) {return AddRef();}
- @Override
+ @Override
public long /*int*/ method2(long /*int*/[] args) {return Release();}
- @Override
+ @Override
public long /*int*/ method3(long /*int*/[] args) {return QueryService(args[0], args[1], args[2]);}
};
}
@@ -730,10 +730,10 @@ public class Accessible {
* @since 3.7
*/
public void addAccessibleEditableTextListener(AccessibleEditableTextListener listener) {
- checkWidget();
- if (listener == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
+ checkWidget();
+ if (listener == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
if (accessibleEditableTextListeners == null) accessibleEditableTextListeners = new ArrayList<>();
- accessibleEditableTextListeners.add(listener);
+ accessibleEditableTextListeners.add(listener);
}
/**
@@ -1127,12 +1127,12 @@ public class Accessible {
* @since 3.7
*/
public void removeAccessibleEditableTextListener(AccessibleEditableTextListener listener) {
- checkWidget();
- if (listener == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
- if (accessibleEditableTextListeners != null) {
- accessibleEditableTextListeners.remove(listener);
- if (accessibleEditableTextListeners.isEmpty()) accessibleEditableTextListeners = null;
- }
+ checkWidget();
+ if (listener == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
+ if (accessibleEditableTextListeners != null) {
+ accessibleEditableTextListeners.remove(listener);
+ if (accessibleEditableTextListeners.isEmpty()) accessibleEditableTextListeners = null;
+ }
}
/**
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Browser/win32/org/eclipse/swt/browser/WebSite.java b/bundles/org.eclipse.swt/Eclipse SWT Browser/win32/org/eclipse/swt/browser/WebSite.java
index a519c655f2..70fac66537 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Browser/win32/org/eclipse/swt/browser/WebSite.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Browser/win32/org/eclipse/swt/browser/WebSite.java
@@ -250,11 +250,11 @@ protected int QueryInterface(long /*int*/ riid, long /*int*/ ppvObject) {
AddRef();
return COM.S_OK;
}
- if (COM.IsEqualGUID(guid, COM.IIDIInternetSecurityManager)) {
- OS.MoveMemory(ppvObject, new long /*int*/[] {iInternetSecurityManager.getAddress()}, C.PTR_SIZEOF);
- AddRef();
- return COM.S_OK;
- }
+ if (COM.IsEqualGUID(guid, COM.IIDIInternetSecurityManager)) {
+ OS.MoveMemory(ppvObject, new long /*int*/[] {iInternetSecurityManager.getAddress()}, C.PTR_SIZEOF);
+ AddRef();
+ return COM.S_OK;
+ }
if (COM.IsEqualGUID(guid, COM.IIDIOleCommandTarget)) {
OS.MoveMemory(ppvObject, new long /*int*/[] {iOleCommandTarget.getAddress()}, C.PTR_SIZEOF);
AddRef();
@@ -579,11 +579,11 @@ int ProcessUrlAction(long /*int*/ pwszUrl, int dwAction, long /*int*/ pPolicy, i
* override default zone elevation settings to allow the action.
*/
if (dwAction == IE.URLACTION_FEATURE_ZONE_ELEVATION) {
- IE ie = (IE)((Browser)getParent().getParent()).webBrowser;
- if (ie.auto != null && ie._getUrl().startsWith(IE.ABOUT_BLANK) && !ie.untrustedText) {
+ IE ie = (IE)((Browser)getParent().getParent()).webBrowser;
+ if (ie.auto != null && ie._getUrl().startsWith(IE.ABOUT_BLANK) && !ie.untrustedText) {
if (cbPolicy >= 4) OS.MoveMemory(pPolicy, new int[] {IE.URLPOLICY_ALLOW}, 4);
return COM.S_OK;
- }
+ }
}
int policy = IE.INET_E_DEFAULT_ACTION;
@@ -741,25 +741,25 @@ int GetTypeInfo (int iTInfo, int lcid, long /*int*/ ppTInfo) {
}
int GetIDsOfNames (int riid, long /*int*/ rgszNames, int cNames, int lcid, long /*int*/ rgDispId) {
- long /*int*/[] ptr = new long /*int*/[1];
- OS.MoveMemory (ptr, rgszNames, C.PTR_SIZEOF);
- int length = OS.wcslen (ptr[0]);
- char[] buffer = new char[length];
- OS.MoveMemory (buffer, ptr[0], length * 2);
- String functionName = String.valueOf (buffer);
- int result = COM.S_OK;
- int[] ids = new int[cNames]; /* DISPIDs */
- if (functionName.equals ("callJava")) { //$NON-NLS-1$
- for (int i = 0; i < cNames; i++) {
- ids[i] = i + 1;
- }
- } else {
- result = COM.DISP_E_UNKNOWNNAME;
- for (int i = 0; i < cNames; i++) {
- ids[i] = COM.DISPID_UNKNOWN;
- }
- }
- OS.MoveMemory (rgDispId, ids, cNames * 4);
+ long /*int*/[] ptr = new long /*int*/[1];
+ OS.MoveMemory (ptr, rgszNames, C.PTR_SIZEOF);
+ int length = OS.wcslen (ptr[0]);
+ char[] buffer = new char[length];
+ OS.MoveMemory (buffer, ptr[0], length * 2);
+ String functionName = String.valueOf (buffer);
+ int result = COM.S_OK;
+ int[] ids = new int[cNames]; /* DISPIDs */
+ if (functionName.equals ("callJava")) { //$NON-NLS-1$
+ for (int i = 0; i < cNames; i++) {
+ ids[i] = i + 1;
+ }
+ } else {
+ result = COM.DISP_E_UNKNOWNNAME;
+ for (int i = 0; i < cNames; i++) {
+ ids[i] = COM.DISPID_UNKNOWN;
+ }
+ }
+ OS.MoveMemory (rgDispId, ids, cNames * 4);
return result;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CBanner.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CBanner.java
index 953f4fe284..a975ccf0e6 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CBanner.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CBanner.java
@@ -550,11 +550,11 @@ void updateCurve(int height) {
int h = height - BORDER_STRIPE;
if (simple) {
curve = new int[] {0,h, 1,h, 2,h-1, 3,h-2,
- 3,2, 4,1, 5,0,};
+ 3,2, 4,1, 5,0,};
} else {
curve = bezier(0, h+1, BEZIER_LEFT, h+1,
- curve_width-BEZIER_RIGHT, 0, curve_width, 0,
- curve_width);
+ curve_width-BEZIER_RIGHT, 0, curve_width, 0,
+ curve_width);
}
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CCombo.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CCombo.java
index f21d7cb3ce..b87b045a5e 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CCombo.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CCombo.java
@@ -640,7 +640,7 @@ char _findMnemonic (String string) {
if (string.charAt (index) != '&') return Character.toLowerCase (string.charAt (index));
index++;
} while (index < length);
- return '\0';
+ return '\0';
}
/*
* Return the Label immediately preceding the receiver in the z-order,
@@ -1098,7 +1098,7 @@ public boolean isFocusControl () {
checkWidget();
Predicate<Control> checkFocusControl = (control) -> (control != null && !control.isDisposed() && control.isFocusControl ());
if (checkFocusControl.test(text) || checkFocusControl.test(arrow) ||
- checkFocusControl.test(list) || checkFocusControl.test(popup)) {
+ checkFocusControl.test(list) || checkFocusControl.test(popup)) {
return true;
}
return super.isFocusControl ();
@@ -1732,7 +1732,7 @@ String stripMnemonic (String string) {
}
index++;
} while (index < length);
- return string;
+ return string;
}
void textEvent (Event event) {
switch (event.type) {
@@ -1939,15 +1939,15 @@ void textEvent (Event event) {
}
@Override
public boolean traverse(int event){
- /*
- * When the traverse event is sent to the CCombo, it will create a list of
- * controls to tab to next. Since the CCombo is a composite, the next control is
- * the Text field which is a child of the CCombo. It will set focus to the text
- * field which really is itself. So, call the traverse next events directly on the text.
- */
- if (event == SWT.TRAVERSE_ARROW_NEXT || event == SWT.TRAVERSE_TAB_NEXT) {
- return text.traverse(event);
- }
- return super.traverse(event);
+ /*
+ * When the traverse event is sent to the CCombo, it will create a list of
+ * controls to tab to next. Since the CCombo is a composite, the next control is
+ * the Text field which is a child of the CCombo. It will set focus to the text
+ * field which really is itself. So, call the traverse next events directly on the text.
+ */
+ if (event == SWT.TRAVERSE_ARROW_NEXT || event == SWT.TRAVERSE_TAB_NEXT) {
+ return text.traverse(event);
+ }
+ return super.traverse(event);
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CLabel.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CLabel.java
index 6e441eccb9..832db17164 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CLabel.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CLabel.java
@@ -184,7 +184,7 @@ char _findMnemonic (String string) {
if (string.charAt (index) != '&') return Character.toLowerCase (string.charAt (index));
index++;
} while (index < length);
- return '\0';
+ return '\0';
}
/**
* Returns the horizontal alignment.
@@ -443,15 +443,15 @@ void onPaint(PaintEvent event) {
// shorten the text
if (shortenText) {
extent.x = 0;
- for(int i = 0; i < lines.length; i++) {
- Point e = gc.textExtent(lines[i], DRAW_FLAGS);
- if (e.x > availableWidth) {
- lines[i] = shortenText(gc, lines[i], availableWidth);
- extent.x = Math.max(extent.x, getTotalSize(null, lines[i]).x);
- } else {
- extent.x = Math.max(extent.x, e.x);
- }
- }
+ for(int i = 0; i < lines.length; i++) {
+ Point e = gc.textExtent(lines[i], DRAW_FLAGS);
+ if (e.x > availableWidth) {
+ lines[i] = shortenText(gc, lines[i], availableWidth);
+ extent.x = Math.max(extent.x, getTotalSize(null, lines[i]).x);
+ } else {
+ extent.x = Math.max(extent.x, e.x);
+ }
+ }
if (appToolTipText == null) {
super.setToolTipText(text);
}
@@ -550,32 +550,32 @@ void onPaint(PaintEvent event) {
int lineHeight = 0, textHeight = 0, imageHeight = 0;
if (img != null) {
- imageRect = img.getBounds();
- imageHeight = imageRect.height;
+ imageRect = img.getBounds();
+ imageHeight = imageRect.height;
}
if (lines != null) {
- lineHeight = gc.getFontMetrics().getHeight();
- textHeight = lines.length * lineHeight;
+ lineHeight = gc.getFontMetrics().getHeight();
+ textHeight = lines.length * lineHeight;
}
int imageY = 0, midPoint = 0, lineY = 0;
if (imageHeight > textHeight ) {
- if (topMargin == DEFAULT_MARGIN && bottomMargin == DEFAULT_MARGIN) imageY = rect.y + (rect.height - imageHeight) / 2;
- else imageY = topMargin;
- midPoint = imageY + imageHeight/2;
- lineY = midPoint - textHeight / 2;
+ if (topMargin == DEFAULT_MARGIN && bottomMargin == DEFAULT_MARGIN) imageY = rect.y + (rect.height - imageHeight) / 2;
+ else imageY = topMargin;
+ midPoint = imageY + imageHeight/2;
+ lineY = midPoint - textHeight / 2;
}
else {
- if (topMargin == DEFAULT_MARGIN && bottomMargin == DEFAULT_MARGIN) lineY = rect.y + (rect.height - textHeight) / 2;
- else lineY = topMargin;
- midPoint = lineY + textHeight/2;
- imageY = midPoint - imageHeight / 2;
+ if (topMargin == DEFAULT_MARGIN && bottomMargin == DEFAULT_MARGIN) lineY = rect.y + (rect.height - textHeight) / 2;
+ else lineY = topMargin;
+ midPoint = lineY + textHeight/2;
+ imageY = midPoint - imageHeight / 2;
}
// draw the image
if (img != null) {
gc.drawImage(img, 0, 0, imageRect.width, imageHeight,
- x, imageY, imageRect.width, imageHeight);
+ x, imageY, imageRect.width, imageHeight);
x += imageRect.width + GAP;
extent.x -= imageRect.width + GAP;
}
@@ -820,10 +820,10 @@ public void setBackground(Image image) {
* @since 3.6
*/
public void setBottomMargin(int bottomMargin) {
- checkWidget();
- if (this.bottomMargin == bottomMargin || bottomMargin < 0) return;
- this.bottomMargin = bottomMargin;
- redraw();
+ checkWidget();
+ if (this.bottomMargin == bottomMargin || bottomMargin < 0) return;
+ this.bottomMargin = bottomMargin;
+ redraw();
}
@Override
public void setFont(Font font) {
@@ -861,10 +861,10 @@ public void setImage(Image image) {
* @since 3.6
*/
public void setLeftMargin(int leftMargin) {
- checkWidget();
- if (this.leftMargin == leftMargin || leftMargin < 0) return;
- this.leftMargin = leftMargin;
- redraw();
+ checkWidget();
+ if (this.leftMargin == leftMargin || leftMargin < 0) return;
+ this.leftMargin = leftMargin;
+ redraw();
}
/**
* Set the label's margins, in points.
@@ -901,10 +901,10 @@ public void setMargins (int leftMargin, int topMargin, int rightMargin, int bott
* @since 3.6
*/
public void setRightMargin(int rightMargin) {
- checkWidget();
- if (this.rightMargin == rightMargin || rightMargin < 0) return;
- this.rightMargin = rightMargin;
- redraw();
+ checkWidget();
+ if (this.rightMargin == rightMargin || rightMargin < 0) return;
+ this.rightMargin = rightMargin;
+ redraw();
}
/**
* Set the label's text.
@@ -956,10 +956,10 @@ public void setToolTipText (String string) {
* @since 3.6
*/
public void setTopMargin(int topMargin) {
- checkWidget();
- if (this.topMargin == topMargin || topMargin < 0) return;
- this.topMargin = topMargin;
- redraw();
+ checkWidget();
+ if (this.topMargin == topMargin || topMargin < 0) return;
+ this.topMargin = topMargin;
+ redraw();
}
/**
* Shorten the given text <code>t</code> so that its length doesn't exceed
@@ -1001,7 +1001,7 @@ protected String shortenText(GC gc, String t, int width) {
}
String result = mid == 0 ? t : t.substring(0, mid) + ELLIPSIS + t.substring(validateOffset(layout, l-mid), l);
layout.dispose();
- return result;
+ return result;
}
int validateOffset(TextLayout layout, int offset) {
int nextOffset = layout.getNextOffset(offset, SWT.MOVEMENT_CLUSTER);
@@ -1009,21 +1009,21 @@ int validateOffset(TextLayout layout, int offset) {
return offset;
}
private String[] splitString(String text) {
- String[] lines = new String[1];
- int start = 0, pos;
- do {
- pos = text.indexOf('\n', start);
- if (pos == -1) {
- lines[lines.length - 1] = text.substring(start);
- } else {
- boolean crlf = (pos > 0) && (text.charAt(pos - 1) == '\r');
- lines[lines.length - 1] = text.substring(start, pos - (crlf ? 1 : 0));
- start = pos + 1;
- String[] newLines = new String[lines.length+1];
- System.arraycopy(lines, 0, newLines, 0, lines.length);
- lines = newLines;
- }
- } while (pos != -1);
- return lines;
+ String[] lines = new String[1];
+ int start = 0, pos;
+ do {
+ pos = text.indexOf('\n', start);
+ if (pos == -1) {
+ lines[lines.length - 1] = text.substring(start);
+ } else {
+ boolean crlf = (pos > 0) && (text.charAt(pos - 1) == '\r');
+ lines[lines.length - 1] = text.substring(start, pos - (crlf ? 1 : 0));
+ start = pos + 1;
+ String[] newLines = new String[lines.length+1];
+ System.arraycopy(lines, 0, newLines, 0, lines.length);
+ lines = newLines;
+ }
+ } while (pos != -1);
+ return lines;
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolder.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolder.java
index ac44a29a6b..b9ef1e6233 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolder.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolder.java
@@ -62,16 +62,16 @@ public class CTabFolder extends Composite {
*
* The default value is 0.
*/
- public int marginWidth = 0;
+ public int marginWidth = 0;
/**
* marginHeight specifies the number of points of vertical margin
* that will be placed along the top and bottom edges of the form.
*
* The default value is 0.
*/
- public int marginHeight = 0;
+ public int marginHeight = 0;
- /**
+ /**
* A multiple of the tab height that specifies the minimum width to which a tab
* will be compressed before scrolling arrows are used to navigate the tabs.
*
@@ -611,7 +611,7 @@ Rectangle[] computeControlBounds (Point size, boolean[][] position) {
for (int i = 0; i < controls.length; i++) {
int alignment = controlAlignments[i];
if ((alignment & SWT.TRAIL) != 0 && (alignment & SWT.FILL) != 0 && !overflow[i]) {
- fillCount++;
+ fillCount++;
}
}
if (fillCount != 0) {
@@ -996,7 +996,7 @@ char _findMnemonic (String string) {
if (string.charAt (index) != '&') return Character.toLowerCase (string.charAt (index));
index++;
} while (index < length);
- return '\0';
+ return '\0';
}
String stripMnemonic (String string) {
int index = 0;
@@ -1009,7 +1009,7 @@ String stripMnemonic (String string) {
}
index++;
} while (index < length);
- return string;
+ return string;
}
/**
* Returns <code>true</code> if the receiver is minimized.
@@ -1742,8 +1742,8 @@ boolean onMnemonic (Event event, boolean doit) {
if (mnemonic != '\0') {
if (Character.toLowerCase (key) == mnemonic) {
if (doit) {
- setSelection(i, true);
- forceFocus();
+ setSelection(i, true);
+ forceFocus();
}
return true;
}
@@ -1872,12 +1872,12 @@ void onMouse(Event event) {
}
int index = indexOf(item);
if (item.showing){
- int oldSelectedIndex = selectedIndex;
- setSelection(index, true);
- if (oldSelectedIndex == selectedIndex) {
- /* If the click is on the selected tabitem, then set focus to the tabfolder */
- forceFocus();
- }
+ int oldSelectedIndex = selectedIndex;
+ setSelection(index, true);
+ if (oldSelectedIndex == selectedIndex) {
+ /* If the click is on the selected tabitem, then set focus to the tabfolder */
+ forceFocus();
+ }
}
return;
}
@@ -2436,18 +2436,18 @@ public void setBackground(Color[] colors, int[] percents, boolean vertical) {
(gradientColors.length == colors.length)) {
boolean same = false;
for (int i = 0; i < gradientColors.length; i++) {
- if (gradientColors[i] == null) {
+ if (gradientColors[i] == null) {
same = colors[i] == null;
- } else {
+ } else {
same = gradientColors[i].equals(colors[i]);
- }
- if (!same) break;
+ }
+ if (!same) break;
}
if (same) {
- for (int i = 0; i < gradientPercents.length; i++) {
+ for (int i = 0; i < gradientPercents.length; i++) {
same = gradientPercents[i] == percents[i];
if (!same) break;
- }
+ }
}
if (same && this.gradientVertical == vertical) return;
}
@@ -2475,9 +2475,9 @@ public void setBackground(Color[] colors, int[] percents, boolean vertical) {
}
@Override
public void setBackgroundImage(Image image) {
- super.setBackgroundImage(image);
- renderer.createAntialiasColors(); //TODO: need better caching strategy
- redraw();
+ super.setBackgroundImage(image);
+ renderer.createAntialiasColors(); //TODO: need better caching strategy
+ redraw();
}
/**
* Toggle the visibility of the border
@@ -2567,7 +2567,7 @@ void setButtonBounds(GC gc) {
chevronImage = createButtonImage(display, CTabFolderRenderer.PART_CHEVRON_BUTTON);
chevronItem.setImage(chevronImage);
}
- }
+ }
boolean[][] overflow = new boolean[1][0];
Rectangle[] rects = computeControlBounds(size, overflow);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolderEvent.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolderEvent.java
index f8a0ef3b7b..8bc5afa16e 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolderEvent.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolderEvent.java
@@ -26,24 +26,24 @@ public class CTabFolderEvent extends TypedEvent {
/**
* The tab item for the operation.
*/
- public Widget item;
+ public Widget item;
- /**
+ /**
* A flag indicating whether the operation should be allowed.
* Setting this field to <code>false</code> will cancel the operation.
* Applies to the close and showList events.
*/
- public boolean doit;
+ public boolean doit;
/**
* The widget-relative, x coordinate of the chevron button
* at the time of the event. Applies to the showList event.
*
- * @since 3.0
+ * @since 3.0
*/
- public int x;
- /**
- * The widget-relative, y coordinate of the chevron button
+ public int x;
+ /**
+ * The widget-relative, y coordinate of the chevron button
* at the time of the event. Applies to the showList event.
*
* @since 3.0
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolderRenderer.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolderRenderer.java
index 6be28cddda..fdb509b943 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolderRenderer.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolderRenderer.java
@@ -459,45 +459,45 @@ public class CTabFolderRenderer {
}
void createAntialiasColors() {
- disposeAntialiasColors();
- lastBorderColor = parent.getDisplay().getSystemColor(BORDER1_COLOR);
- RGB lineRGB = lastBorderColor.getRGB();
- /* compute the selected color */
- RGB innerRGB = parent.selectionBackground.getRGB();
- if (parent.selectionBgImage != null ||
- (parent.selectionGradientColors != null && parent.selectionGradientColors.length > 1)) {
- innerRGB = null;
- }
- RGB outerRGB = parent.getBackground().getRGB();
- if (parent.gradientColors != null && parent.gradientColors.length > 1) {
- outerRGB = null;
- }
- if (outerRGB != null) {
+ disposeAntialiasColors();
+ lastBorderColor = parent.getDisplay().getSystemColor(BORDER1_COLOR);
+ RGB lineRGB = lastBorderColor.getRGB();
+ /* compute the selected color */
+ RGB innerRGB = parent.selectionBackground.getRGB();
+ if (parent.selectionBgImage != null ||
+ (parent.selectionGradientColors != null && parent.selectionGradientColors.length > 1)) {
+ innerRGB = null;
+ }
+ RGB outerRGB = parent.getBackground().getRGB();
+ if (parent.gradientColors != null && parent.gradientColors.length > 1) {
+ outerRGB = null;
+ }
+ if (outerRGB != null) {
RGB from = lineRGB;
RGB to = outerRGB;
int red = from.red + 2*(to.red - from.red)/3;
int green = from.green + 2*(to.green - from.green)/3;
int blue = from.blue + 2*(to.blue - from.blue)/3;
selectedOuterColor = new Color(parent.getDisplay(), red, green, blue);
- }
- if (innerRGB != null) {
+ }
+ if (innerRGB != null) {
RGB from = lineRGB;
RGB to = innerRGB;
int red = from.red + 2*(to.red - from.red)/3;
int green = from.green + 2*(to.green - from.green)/3;
int blue = from.blue + 2*(to.blue - from.blue)/3;
selectedInnerColor = new Color(parent.getDisplay(), red, green, blue);
- }
- /* compute the tabArea color */
- outerRGB = parent.getParent().getBackground().getRGB();
- if (outerRGB != null) {
+ }
+ /* compute the tabArea color */
+ outerRGB = parent.getParent().getBackground().getRGB();
+ if (outerRGB != null) {
RGB from = lineRGB;
RGB to = outerRGB;
int red = from.red + 2*(to.red - from.red)/3;
int green = from.green + 2*(to.green - from.green)/3;
int blue = from.blue + 2*(to.blue - from.blue)/3;
tabAreaColor = new Color(parent.getDisplay(), red, green, blue);
- }
+ }
}
/*
@@ -543,8 +543,8 @@ public class CTabFolderRenderer {
disposeAntialiasColors();
disposeSelectionHighlightGradientColors();
if (fillColor != null) {
- fillColor.dispose();
- fillColor = null;
+ fillColor.dispose();
+ fillColor = null;
}
if (chevronFont != null) {
chevronFont.dispose();
@@ -557,10 +557,10 @@ public class CTabFolderRenderer {
}
void disposeAntialiasColors() {
- if (tabAreaColor != null) tabAreaColor.dispose();
- if (selectedInnerColor != null) selectedInnerColor.dispose();
- if (selectedOuterColor != null) selectedOuterColor.dispose();
- tabAreaColor = selectedInnerColor = selectedOuterColor = null;
+ if (tabAreaColor != null) tabAreaColor.dispose();
+ if (selectedInnerColor != null) selectedInnerColor.dispose();
+ if (selectedOuterColor != null) selectedOuterColor.dispose();
+ tabAreaColor = selectedInnerColor = selectedOuterColor = null;
}
void disposeSelectionHighlightGradientColors() {
@@ -812,7 +812,7 @@ public class CTabFolderRenderer {
int x2 = size.x - borderRight;
int y2 = size.y - borderBottom - tabHeight - highlight_header;
shape = new int[] {x1,y1, x2,y1, x2,y2, x2-highlight_margin,y2,
- x2-highlight_margin, y1+highlight_margin, x1+highlight_margin,y1+highlight_margin,
+ x2-highlight_margin, y1+highlight_margin, x1+highlight_margin,y1+highlight_margin,
x1+highlight_margin,y2, x1,y2};
} else {
int x1 = borderLeft;
@@ -820,7 +820,7 @@ public class CTabFolderRenderer {
int x2 = size.x - borderRight;
int y2 = size.y - borderBottom;
shape = new int[] {x1,y1, x1+highlight_margin,y1, x1+highlight_margin,y2-highlight_margin,
- x2-highlight_margin,y2-highlight_margin, x2-highlight_margin,y1,
+ x2-highlight_margin,y2-highlight_margin, x2-highlight_margin,y1,
x2,y1, x2,y2, x1,y2};
}
// If horizontal gradient, show gradient across the whole area
@@ -886,9 +886,9 @@ public class CTabFolderRenderer {
switch (closeImageState & (SWT.HOT | SWT.SELECTED | SWT.BACKGROUND)) {
case SWT.NONE: {
int[] shape = new int[] {x,y, x+2,y, x+4,y+2, x+5,y+2, x+7,y, x+9,y,
- x+9,y+2, x+7,y+4, x+7,y+5, x+9,y+7, x+9,y+9,
- x+7,y+9, x+5,y+7, x+4,y+7, x+2,y+9, x,y+9,
- x,y+7, x+2,y+5, x+2,y+4, x,y+2};
+ x+9,y+2, x+7,y+4, x+7,y+5, x+9,y+7, x+9,y+9,
+ x+7,y+9, x+5,y+7, x+4,y+7, x+2,y+9, x,y+9,
+ x,y+7, x+2,y+5, x+2,y+4, x,y+2};
gc.setBackground(display.getSystemColor(BUTTON_FILL));
gc.fillPolygon(shape);
gc.setForeground(closeBorder);
@@ -897,9 +897,9 @@ public class CTabFolderRenderer {
}
case SWT.HOT: {
int[] shape = new int[] {x,y, x+2,y, x+4,y+2, x+5,y+2, x+7,y, x+9,y,
- x+9,y+2, x+7,y+4, x+7,y+5, x+9,y+7, x+9,y+9,
- x+7,y+9, x+5,y+7, x+4,y+7, x+2,y+9, x,y+9,
- x,y+7, x+2,y+5, x+2,y+4, x,y+2};
+ x+9,y+2, x+7,y+4, x+7,y+5, x+9,y+7, x+9,y+9,
+ x+7,y+9, x+5,y+7, x+4,y+7, x+2,y+9, x,y+9,
+ x,y+7, x+2,y+5, x+2,y+4, x,y+2};
gc.setBackground(getFillColor());
gc.fillPolygon(shape);
gc.setForeground(closeBorder);
@@ -908,9 +908,9 @@ public class CTabFolderRenderer {
}
case SWT.SELECTED: {
int[] shape = new int[] {x+1,y+1, x+3,y+1, x+5,y+3, x+6,y+3, x+8,y+1, x+10,y+1,
- x+10,y+3, x+8,y+5, x+8,y+6, x+10,y+8, x+10,y+10,
- x+8,y+10, x+6,y+8, x+5,y+8, x+3,y+10, x+1,y+10,
- x+1,y+8, x+3,y+6, x+3,y+5, x+1,y+3};
+ x+10,y+3, x+8,y+5, x+8,y+6, x+10,y+8, x+10,y+10,
+ x+8,y+10, x+6,y+8, x+5,y+8, x+3,y+10, x+1,y+10,
+ x+1,y+8, x+3,y+6, x+3,y+5, x+1,y+3};
gc.setBackground(getFillColor());
gc.fillPolygon(shape);
gc.setForeground(closeBorder);
@@ -1617,8 +1617,8 @@ public class CTabFolderRenderer {
// Draw border line
if (borderLeft > 0) {
- if (! borderColor.equals(lastBorderColor)) createAntialiasColors();
- antialias(shape, null, tabAreaColor, gc);
+ if (! borderColor.equals(lastBorderColor)) createAntialiasColors();
+ antialias(shape, null, tabAreaColor, gc);
gc.setForeground(borderColor);
gc.drawPolyline(shape);
}
@@ -1664,8 +1664,8 @@ public class CTabFolderRenderer {
imageY += parent.onBottom ? -1 : 1;
int imageWidth = imageBounds.width * imageHeight / imageBounds.height;
gc.drawImage(image,
- imageBounds.x, imageBounds.y, imageBounds.width, imageBounds.height,
- imageX, imageY, imageWidth, imageHeight);
+ imageBounds.x, imageBounds.y, imageBounds.width, imageBounds.height,
+ imageX, imageY, imageWidth, imageHeight);
xDraw += imageWidth + INTERNAL_SPACING;
}
}
@@ -1809,15 +1809,15 @@ public class CTabFolderRenderer {
if (parent.onBottom) {
int d = tabHeight - 12;
curve = new int[]{0,13+d, 0,12+d, 2,12+d, 3,11+d, 5,11+d, 6,10+d, 7,10+d, 9,8+d, 10,8+d,
- 11,7+d, 11+d,7,
- 12+d,6, 13+d,6, 15+d,4, 16+d,4, 17+d,3, 19+d,3, 20+d,2, 22+d,2, 23+d,1};
+ 11,7+d, 11+d,7,
+ 12+d,6, 13+d,6, 15+d,4, 16+d,4, 17+d,3, 19+d,3, 20+d,2, 22+d,2, 23+d,1};
curveWidth = 26+d;
curveIndent = curveWidth/3;
} else {
int d = tabHeight - 12;
curve = new int[]{0,0, 0,1, 2,1, 3,2, 5,2, 6,3, 7,3, 9,5, 10,5,
- 11,6, 11+d,6+d,
- 12+d,7+d, 13+d,7+d, 15+d,9+d, 16+d,9+d, 17+d,10+d, 19+d,10+d, 20+d,11+d, 22+d,11+d, 23+d,12+d};
+ 11,6, 11+d,6+d,
+ 12+d,7+d, 13+d,7+d, 15+d,9+d, 16+d,9+d, 17+d,10+d, 19+d,10+d, 20+d,11+d, 22+d,11+d, 23+d,12+d};
curveWidth = 26+d;
curveIndent = curveWidth/3;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabItem.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabItem.java
index 4437324e43..eee6a7ab26 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabItem.java
@@ -307,14 +307,14 @@ public void setControl (Control control) {
this.control.setBounds(parent.getClientArea ());
this.control.setVisible(true);
} else {
- int selectedIndex = parent.getSelectionIndex();
- Control selectedControl = null;
- if (selectedIndex != -1) {
- selectedControl = parent.getItem(selectedIndex).control;
- }
- if (this.control != selectedControl) {
- this.control.setVisible(false);
- }
+ int selectedIndex = parent.getSelectionIndex();
+ Control selectedControl = null;
+ if (selectedIndex != -1) {
+ selectedControl = parent.getItem(selectedIndex).control;
+ }
+ if (this.control != selectedControl) {
+ this.control.setVisible(false);
+ }
}
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/ControlEditor.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/ControlEditor.java
index d9a552224d..7ac70ed8a9 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/ControlEditor.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/ControlEditor.java
@@ -213,8 +213,8 @@ public void layout () {
if (editor.getVisible ()) {
hadFocus = editor.isFocusControl();
} // this doesn't work because
- // resizing the column takes the focus away
- // before we get here
+ // resizing the column takes the focus away
+ // before we get here
editor.setBounds (computeBounds ());
if (hadFocus) {
if (editor == null || editor.isDisposed()) return;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StackLayout.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StackLayout.java
index 9b23d0c343..cf3c5f2c5e 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StackLayout.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StackLayout.java
@@ -71,13 +71,13 @@ import org.eclipse.swt.widgets.*;
public class StackLayout extends Layout {
- /**
+ /**
* marginWidth specifies the number of points of horizontal margin
* that will be placed along the left and right edges of the layout.
*
* The default value is 0.
*/
- public int marginWidth = 0;
+ public int marginWidth = 0;
/**
* marginHeight specifies the number of points of vertical margin
* that will be placed along the top and bottom edges of the layout.
@@ -86,11 +86,11 @@ public class StackLayout extends Layout {
*/
public int marginHeight = 0;
- /**
- * topControl the Control that is displayed at the top of the stack.
- * All other controls that are children of the parent composite will not be visible.
- */
- public Control topControl;
+ /**
+ * topControl the Control that is displayed at the top of the stack.
+ * All other controls that are children of the parent composite will not be visible.
+ */
+ public Control topControl;
@Override
protected Point computeSize(Composite composite, int wHint, int hHint, boolean flushCache) {
@@ -143,12 +143,12 @@ String getName () {
*/
@Override
public String toString () {
- String string = getName ()+" {";
- if (marginWidth != 0) string += "marginWidth="+marginWidth+" ";
- if (marginHeight != 0) string += "marginHeight="+marginHeight+" ";
- if (topControl != null) string += "topControl="+topControl+" ";
- string = string.trim();
- string += "}";
- return string;
+ String string = getName ()+" {";
+ if (marginWidth != 0) string += "marginWidth="+marginWidth+" ";
+ if (marginHeight != 0) string += "marginHeight="+marginHeight+" ";
+ if (topControl != null) string += "topControl="+topControl+" ";
+ string = string.trim();
+ string += "}";
+ return string;
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java
index 487e18bfaf..676bc7ff1d 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java
@@ -2890,7 +2890,7 @@ int doMouseWordSelect(int x, int newCaretOffset, int line) {
// base double click. Always do this here (and don't rely on doAutoScroll)
// because auto scroll only does not cover all possible mouse selections
// (e.g., mouse x < 0 && mouse y > caret line y)
- if (newCaretOffset < selectionAnchor && selectionAnchor == selection.x) {
+ if (newCaretOffset < selectionAnchor && selectionAnchor == selection.x) {
selectionAnchor = doubleClickSelection.y;
} else if (newCaretOffset > selectionAnchor && selectionAnchor == selection.y) {
selectionAnchor = doubleClickSelection.x;
@@ -5407,7 +5407,7 @@ int getVisualLineIndex(TextLayout layout, int offsetInLine) {
int caretY = caret.getLocation().y - getLinePixel(getCaretLine());
if (lineY > caretY) lineIndex--;
caretAlignment = OFFSET_LEADING;
- }
+ }
return lineIndex;
}
int getCaretDirection() {
@@ -6062,8 +6062,8 @@ void handleKey(Event event) {
// -ignore anything below SPACE except for line delimiter keys and tab.
// -ignore DEL
if (!ignore && event.character > 31 && event.character != SWT.DEL ||
- event.character == SWT.CR || event.character == SWT.LF ||
- event.character == TAB) {
+ event.character == SWT.CR || event.character == SWT.LF ||
+ event.character == TAB) {
doContent(event.character);
update();
}
@@ -6872,28 +6872,28 @@ void initializeAccessible() {
public void replaceText(AccessibleEditableTextEvent e) {
StyledText st = StyledText.this;
st.replaceTextRange(e.start, e.end - e.start, e.string);
- e.result = ACC.OK;
+ e.result = ACC.OK;
}
@Override
public void pasteText(AccessibleEditableTextEvent e) {
StyledText st = StyledText.this;
st.setSelection(e.start);
- st.paste();
- e.result = ACC.OK;
+ st.paste();
+ e.result = ACC.OK;
}
@Override
public void cutText(AccessibleEditableTextEvent e) {
StyledText st = StyledText.this;
st.setSelection(e.start, e.end);
- st.cut();
- e.result = ACC.OK;
+ st.cut();
+ e.result = ACC.OK;
}
@Override
public void copyText(AccessibleEditableTextEvent e) {
StyledText st = StyledText.this;
st.setSelection(e.start, e.end);
- st.copy();
- e.result = ACC.OK;
+ st.copy();
+ e.result = ACC.OK;
}
};
acc.addAccessibleEditableTextListener(accEditableTextListener);
@@ -7059,7 +7059,7 @@ String stripMnemonic (String string) {
}
index++;
} while (index < length);
- return string;
+ return string;
}
/*
* Return the lowercase of the first non-'&' character following
@@ -7076,7 +7076,7 @@ char _findMnemonic (String string) {
if (string.charAt (index) != '&') return Character.toLowerCase (string.charAt (index));
index++;
} while (index < length);
- return '\0';
+ return '\0';
}
/**
* Executes the action.
@@ -7996,8 +7996,8 @@ public void removeWordMovementListener(MovementListener listener) {
public void replaceStyleRanges(int start, int length, StyleRange[] ranges) {
checkWidget();
if (isListening(ST.LineGetStyle)) return;
- if (ranges == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
- setStyleRanges(start, length, null, ranges, false);
+ if (ranges == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
+ setStyleRanges(start, length, null, ranges, false);
}
/**
* Replaces the given text range with new text.
@@ -9142,20 +9142,20 @@ public void setKeyBinding(int key, int action) {
if (action == SWT.NULL) {
keyActionMap.remove(newKey);
} else {
- keyActionMap.put(newKey, action);
+ keyActionMap.put(newKey, action);
}
ch = Character.toLowerCase(keyChar);
newKey = ch | modifierValue;
if (action == SWT.NULL) {
keyActionMap.remove(newKey);
} else {
- keyActionMap.put(newKey, action);
+ keyActionMap.put(newKey, action);
}
} else {
if (action == SWT.NULL) {
keyActionMap.remove(key);
} else {
- keyActionMap.put(key, action);
+ keyActionMap.put(key, action);
}
}
}
@@ -10410,7 +10410,7 @@ private int endRangeOffset(int[] ranges, int styleIndex) {
public void setStyleRanges(StyleRange[] ranges) {
checkWidget();
if (isListening(ST.LineGetStyle)) return;
- if (ranges == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
+ if (ranges == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
setStyleRanges(0, 0, null, ranges, true);
}
/**
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/TableCursor.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/TableCursor.java
index fac86edaab..48dead764b 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/TableCursor.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/TableCursor.java
@@ -240,26 +240,26 @@ void keyDown(Event event) {
case SWT.ARROW_DOWN :
setRowColumn(Math.min(rowIndex + 1, table.getItemCount() - 1), columnIndex, true);
break;
- case SWT.ARROW_LEFT :
- case SWT.ARROW_RIGHT :
- {
- int columnCount = table.getColumnCount();
- if (columnCount == 0) break;
- int[] order = table.getColumnOrder();
- int index = 0;
- while (index < order.length) {
- if (order[index] == columnIndex) break;
- index++;
+ case SWT.ARROW_LEFT :
+ case SWT.ARROW_RIGHT :
+ {
+ int columnCount = table.getColumnCount();
+ if (columnCount == 0) break;
+ int[] order = table.getColumnOrder();
+ int index = 0;
+ while (index < order.length) {
+ if (order[index] == columnIndex) break;
+ index++;
}
if (index == order.length) index = 0;
- int leadKey = (getStyle() & SWT.RIGHT_TO_LEFT) != 0 ? SWT.ARROW_RIGHT : SWT.ARROW_LEFT;
- if (event.keyCode == leadKey) {
- setRowColumn(rowIndex, order[Math.max(0, index - 1)], true);
- } else {
- setRowColumn(rowIndex, order[Math.min(columnCount - 1, index + 1)], true);
- }
- break;
- }
+ int leadKey = (getStyle() & SWT.RIGHT_TO_LEFT) != 0 ? SWT.ARROW_RIGHT : SWT.ARROW_LEFT;
+ if (event.keyCode == leadKey) {
+ setRowColumn(rowIndex, order[Math.max(0, index - 1)], true);
+ } else {
+ setRowColumn(rowIndex, order[Math.min(columnCount - 1, index + 1)], true);
+ }
+ break;
+ }
case SWT.HOME :
setRowColumn(0, columnIndex, true);
break;
@@ -633,7 +633,7 @@ public void setSelection(int row, int column) {
int columnCount = table.getColumnCount();
int maxColumnIndex = columnCount == 0 ? 0 : columnCount - 1;
if (row < 0
- || row >= table.getItemCount()
+ || row >= table.getItemCount()
|| column < 0
|| column > maxColumnIndex)
SWT.error(SWT.ERROR_INVALID_ARGUMENT);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/ViewForm.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/ViewForm.java
index cb5615c579..af2dde8b89 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/ViewForm.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/ViewForm.java
@@ -49,29 +49,29 @@ public class ViewForm extends Composite {
*
* The default value is 0.
*/
- public int marginWidth = 0;
+ public int marginWidth = 0;
/**
* marginHeight specifies the number of points of vertical margin
* that will be placed along the top and bottom edges of the form.
*
* The default value is 0.
*/
- public int marginHeight = 0;
- /**
+ public int marginHeight = 0;
+ /**
* horizontalSpacing specifies the number of points between the right
* edge of one cell and the left edge of its neighbouring cell to
* the right.
*
* The default value is 1.
*/
- public int horizontalSpacing = 1;
+ public int horizontalSpacing = 1;
/**
* verticalSpacing specifies the number of points between the bottom
* edge of one cell and the top edge of its neighbouring cell underneath.
*
* The default value is 1.
*/
- public int verticalSpacing = 1;
+ public int verticalSpacing = 1;
/**
* Color of innermost line of drop shadow border.
@@ -288,7 +288,7 @@ void onPaint(GC gc) {
int x2 = size.x - 1;
int y2 = size.y - 1;
int[] shape = new int[] {x1,y1, x2,y1, x2,y2, x1,y2, x1,y1+highlight,
- x1+highlight,y1+highlight, x1+highlight,y2-highlight,
+ x1+highlight,y1+highlight, x1+highlight,y2-highlight,
x2-highlight,y2-highlight, x2-highlight,y1+highlight, x1,y1+highlight};
Color highlightColor = getDisplay().getSystemColor(SWT.COLOR_LIST_SELECTION);
gc.setBackground(highlightColor);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/ViewFormLayout.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/ViewFormLayout.java
index b029028d9f..c9245b49b2 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/ViewFormLayout.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/ViewFormLayout.java
@@ -38,16 +38,16 @@ protected Point computeSize(Composite composite, int wHint, int hHint, boolean f
}
Point centerSize = new Point(0, 0);
if (center != null) {
- centerSize = computeChildSize(center, SWT.DEFAULT, SWT.DEFAULT, flushCache);
+ centerSize = computeChildSize(center, SWT.DEFAULT, SWT.DEFAULT, flushCache);
}
Point rightSize = new Point(0, 0);
if (right != null) {
- rightSize = computeChildSize(right, SWT.DEFAULT, SWT.DEFAULT, flushCache);
+ rightSize = computeChildSize(right, SWT.DEFAULT, SWT.DEFAULT, flushCache);
}
Point size = new Point(0, 0);
// calculate width of title bar
if (form.separateTopCenter ||
- (wHint != SWT.DEFAULT && leftSize.x + centerSize.x + rightSize.x > wHint)) {
+ (wHint != SWT.DEFAULT && leftSize.x + centerSize.x + rightSize.x > wHint)) {
size.x = leftSize.x + rightSize.x;
if (leftSize.x > 0 && rightSize.x > 0) size.x += form.horizontalSpacing;
size.x = Math.max(centerSize.x, size.x);
@@ -124,11 +124,11 @@ protected void layout(Composite composite, boolean flushCache) {
}
Point centerSize = new Point(0, 0);
if (center != null && !center.isDisposed()) {
- centerSize = computeChildSize(center, SWT.DEFAULT, SWT.DEFAULT, flushCache);
+ centerSize = computeChildSize(center, SWT.DEFAULT, SWT.DEFAULT, flushCache);
}
Point rightSize = new Point(0, 0);
if (right != null && !right.isDisposed()) {
- rightSize = computeChildSize(right, SWT.DEFAULT, SWT.DEFAULT, flushCache);
+ rightSize = computeChildSize(right, SWT.DEFAULT, SWT.DEFAULT, flushCache);
}
int minTopWidth = leftSize.x + centerSize.x + rightSize.x + 2*form.marginWidth + 2*form.highlight;
@@ -200,7 +200,7 @@ protected void layout(Composite composite, boolean flushCache) {
form.separator = y;
y++;
}
- content.setBounds(rect.x + form.marginWidth + form.highlight, y, rect.width - 2 * form.marginWidth - 2*form.highlight, rect.y + rect.height - y - form.marginHeight - form.highlight);
+ content.setBounds(rect.x + form.marginWidth + form.highlight, y, rect.width - 2 * form.marginWidth - 2*form.highlight, rect.y + rect.height - y - form.marginHeight - form.highlight);
}
if (oldSeperator != form.separator) {
int t, b;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/DropTarget.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/DropTarget.java
index 11c0fc8239..486f942017 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/DropTarget.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/DropTarget.java
@@ -833,9 +833,9 @@ boolean setEventData(NSObject draggingState, DNDEvent event) {
int operation = getOperationFromKeyState();
keyOperation = operation;
if (operation == DND.DROP_DEFAULT) {
- if ((style & DND.DROP_DEFAULT) == 0) {
+ if ((style & DND.DROP_DEFAULT) == 0) {
operation = (operations & DND.DROP_MOVE) != 0 ? DND.DROP_MOVE : DND.DROP_NONE;
- }
+ }
} else {
if ((operation & operations) == 0) operation = DND.DROP_NONE;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/common/org/eclipse/swt/dnd/DragSourceEvent.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/common/org/eclipse/swt/dnd/DragSourceEvent.java
index fc328e1df0..3b287c5b09 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/common/org/eclipse/swt/dnd/DragSourceEvent.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/common/org/eclipse/swt/dnd/DragSourceEvent.java
@@ -31,25 +31,25 @@ public class DragSourceEvent extends TypedEvent {
* @see DND#DROP_LINK
* @see DND#DROP_TARGET_MOVE
*/
- public int detail;
+ public int detail;
- /**
- * In dragStart, the doit field determines if the drag and drop operation
- * should proceed; in dragFinished, the doit field indicates whether
- * the operation was performed successfully.
- * <p>
- * In dragStart:</p>
- * <p>Flag to determine if the drag and drop operation should proceed.
- * The application can set this value to false to prevent the drag from starting.
- * Set to true by default.</p>
- * <p>In dragSetData:</p>
- * <p>This will be set to true when the call to dragSetData is made. Set it to
- * false to cancel the drag.</p>
- * <p>In dragFinished:</p>
- * <p>Flag to indicate if the operation was performed successfully.
- * True if the operation was performed successfully.</p>
- */
- public boolean doit;
+ /**
+ * In dragStart, the doit field determines if the drag and drop operation
+ * should proceed; in dragFinished, the doit field indicates whether
+ * the operation was performed successfully.
+ * <p>
+ * In dragStart:</p>
+ * <p>Flag to determine if the drag and drop operation should proceed.
+ * The application can set this value to false to prevent the drag from starting.
+ * Set to true by default.</p>
+ * <p>In dragSetData:</p>
+ * <p>This will be set to true when the call to dragSetData is made. Set it to
+ * false to cancel the drag.</p>
+ * <p>In dragFinished:</p>
+ * <p>Flag to indicate if the operation was performed successfully.
+ * True if the operation was performed successfully.</p>
+ */
+ public boolean doit;
/**
* In dragStart, the x coordinate (relative to the control) of the
@@ -57,19 +57,19 @@ public class DragSourceEvent extends TypedEvent {
*
* @since 3.2
*/
- public int x;
- /**
+ public int x;
+ /**
* In dragStart, the y coordinate (relative to the control) of the
* position the mouse went down to start the drag.
*
* @since 3.2
*/
- public int y;
+ public int y;
- /**
+ /**
* The type of data requested.
* Data provided in the data field must be of the same type.
- */
+ */
public TransferData dataType;
/**
@@ -86,13 +86,13 @@ public class DragSourceEvent extends TypedEvent {
*
* @since 3.5
*/
- public int offsetX;
+ public int offsetX;
/**
* In dragStart, the y offset (relative to the image) where the drag source image will be displayed.
*
* @since 3.5
*/
- public int offsetY;
+ public int offsetY;
static final long serialVersionUID = 3257002142513770808L;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/DropTarget.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/DropTarget.java
index 35e0c4e9f1..7daca526bd 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/DropTarget.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/DropTarget.java
@@ -109,7 +109,7 @@ public class DropTarget extends Widget {
static Callback Drag_Data_Received;
static Callback Drag_Drop;
- static {
+ static {
Drag_Motion = new Callback(DropTarget.class, "Drag_Motion", 5); //$NON-NLS-1$
if (Drag_Motion.getAddress() == 0) SWT.error(SWT.ERROR_NO_MORE_CALLBACKS);
Drag_Leave = new Callback(DropTarget.class, "Drag_Leave", 3); //$NON-NLS-1$
@@ -155,7 +155,7 @@ public DropTarget(Control control, int style) {
super(control, checkStyle(style));
this.control = control;
if (Drag_Motion == null || Drag_Leave == null || Drag_Data_Received == null || Drag_Drop == null) {
- DND.error(DND.ERROR_CANNOT_INIT_DROP);
+ DND.error(DND.ERROR_CANNOT_INIT_DROP);
}
if (control.getData(DND.DROP_TARGET_KEY) != null) {
DND.error(DND.ERROR_CANNOT_INIT_DROP);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/ImageTransfer.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/ImageTransfer.java
index 34fa8fee05..f092e5d2fd 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/ImageTransfer.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/ImageTransfer.java
@@ -91,7 +91,7 @@ public void javaToNative(Object object, TransferData transferData) {
ImageData imgData = (ImageData)object;
if (imgData == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
Image image = new Image(Display.getCurrent(), imgData);
- long pixbuf = ImageList.createPixbuf(image);
+ long pixbuf = ImageList.createPixbuf(image);
if (pixbuf != 0) {
String typeStr = "";
if (transferData.type == JPEG_ID) typeStr = "jpeg";
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TransferData.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TransferData.java
index b718c66a99..3ff822475e 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TransferData.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TransferData.java
@@ -63,17 +63,17 @@ public class TransferData {
/**
* Specifies the size in bits of a single unit in pValue.
- * (Warning: This field is platform dependent)
+ * (Warning: This field is platform dependent)
* <p>
* <b>IMPORTANT:</b> This field is <em>not</em> part of the SWT
* public API. It is marked public only so that it can be shared
* within the packages provided by SWT. It is not available on all
* platforms and should never be accessed from application code.
* </p>
- *
- * This is most commonly 8 bits.
- *
- * @noreference This field is not intended to be referenced by clients.
+ *
+ * This is most commonly 8 bits.
+ *
+ * @noreference This field is not intended to be referenced by clients.
*/
public int format;
@@ -101,7 +101,7 @@ public class TransferData {
* within the packages provided by SWT. It is not available on all
* platforms and should never be accessed from application code.
* </p>
- * <p>The value of result is 1 if the conversion was successful.
+ * <p>The value of result is 1 if the conversion was successful.
* The value of result is 0 if the conversion failed.</p>
*
* @noreference This field is not intended to be referenced by clients.
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/ByteArrayTransfer.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/ByteArrayTransfer.java
index da236b440b..a0c13fb230 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/ByteArrayTransfer.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/ByteArrayTransfer.java
@@ -146,9 +146,9 @@ public boolean isSupportedType(TransferData transferData){
for (int i = 0; i < types.length; i++) {
FORMATETC format = transferData.formatetc;
if (format.cfFormat == types[i] &&
- (format.dwAspect & COM.DVASPECT_CONTENT) == COM.DVASPECT_CONTENT &&
- (format.tymed & COM.TYMED_HGLOBAL) == COM.TYMED_HGLOBAL )
- return true;
+ (format.dwAspect & COM.DVASPECT_CONTENT) == COM.DVASPECT_CONTENT &&
+ (format.tymed & COM.TYMED_HGLOBAL) == COM.TYMED_HGLOBAL )
+ return true;
}
return false;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/DragSource.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/DragSource.java
index b5bbd27b87..544fbac79b 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/DragSource.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/DragSource.java
@@ -347,14 +347,14 @@ private void drag(Event dragEvent) {
OS.ShowWindow (hwndDrag, OS.SW_SHOW);
}
OS.ImageList_BeginDrag(imagelist.getHandle(), 0, offsetX, event.offsetY);
- /*
- * Feature in Windows. When ImageList_DragEnter() is called,
- * it takes a snapshot of the screen If a drag is started
- * when another window is in front, then the snapshot will
- * contain part of the other window, causing pixel corruption.
- * The fix is to force all paints to be delivered before
- * calling ImageList_DragEnter().
- */
+ /*
+ * Feature in Windows. When ImageList_DragEnter() is called,
+ * it takes a snapshot of the screen If a drag is started
+ * when another window is in front, then the snapshot will
+ * contain part of the other window, causing pixel corruption.
+ * The fix is to force all paints to be delivered before
+ * calling ImageList_DragEnter().
+ */
int flags = OS.RDW_UPDATENOW | OS.RDW_ALLCHILDREN;
OS.RedrawWindow (topControl.handle, null, 0, flags);
POINT pt = new POINT ();
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/DropTarget.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/DropTarget.java
index 58c13a8f35..c97521a27c 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/DropTarget.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/DropTarget.java
@@ -626,12 +626,12 @@ int QueryInterface(long /*int*/ riid, long /*int*/ ppvObject) {
GUID guid = new GUID();
COM.MoveMemory(guid, riid, GUID.sizeof);
if (COM.IsEqualGUID(guid, COM.IIDIUnknown) || COM.IsEqualGUID(guid, COM.IIDIDropTarget)) {
- OS.MoveMemory(ppvObject, new long /*int*/[] {iDropTarget.getAddress()}, C.PTR_SIZEOF);
+ OS.MoveMemory(ppvObject, new long /*int*/[] {iDropTarget.getAddress()}, C.PTR_SIZEOF);
AddRef();
return COM.S_OK;
}
- OS.MoveMemory(ppvObject, new long /*int*/[] {0}, C.PTR_SIZEOF);
+ OS.MoveMemory(ppvObject, new long /*int*/[] {0}, C.PTR_SIZEOF);
return COM.E_NOINTERFACE;
}
@@ -726,14 +726,14 @@ boolean setEventData(DNDEvent event, long /*int*/ pDataObject, int grfKeyState,
IDataObject dataObject = new IDataObject(pDataObject);
dataObject.AddRef();
try {
- long /*int*/[] address = new long /*int*/[1];
+ long /*int*/[] address = new long /*int*/[1];
if (dataObject.EnumFormatEtc(COM.DATADIR_GET, address) != COM.S_OK) {
return false;
}
IEnumFORMATETC enumFormatetc = new IEnumFORMATETC(address[0]);
try {
// Loop over enumerator and save any types that match what we are looking for
- long /*int*/ rgelt = OS.GlobalAlloc(OS.GMEM_FIXED | OS.GMEM_ZEROINIT, FORMATETC.sizeof);
+ long /*int*/ rgelt = OS.GlobalAlloc(OS.GMEM_FIXED | OS.GMEM_ZEROINIT, FORMATETC.sizeof);
try {
int[] pceltFetched = new int[1];
enumFormatetc.Reset();
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TransferData.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TransferData.java
index 82a96b7b1e..672b026229 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TransferData.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TransferData.java
@@ -87,7 +87,7 @@ public class TransferData {
* within the packages provided by SWT. It is not available on all
* platforms and should never be accessed from application code.
* </p>
- * <p>The value of result is 1 if the conversion was successful.
+ * <p>The value of result is 1 if the conversion was successful.
* The value of result is 0 if the conversion failed.</p>
*
* @noreference This field is not intended to be referenced by clients.
@@ -114,8 +114,8 @@ public class TransferData {
if (data1 == null || data2 == null) return false;
return (data1.type == data2.type &&
data1.formatetc.cfFormat == data2.formatetc.cfFormat &&
- data1.formatetc.dwAspect == data2.formatetc.dwAspect &&
- data1.formatetc.tymed == data2.formatetc.tymed);
+ data1.formatetc.dwAspect == data2.formatetc.dwAspect &&
+ data1.formatetc.tymed == data2.formatetc.tymed);
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OLE.java b/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OLE.java
index cc7b0137ef..4c91f187ca 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OLE.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OLE.java
@@ -246,7 +246,7 @@ public class OLE extends SWT {
public static final short FUNCFLAG_FREQUESTEDIT = 0x8;
public static final short FUNCFLAG_FDISPLAYBIND = 0x10;
public static final short FUNCFLAG_FDEFAULTBIND = 0x20;
- public static final short FUNCFLAG_FHIDDEN = 0x40;
+ public static final short FUNCFLAG_FHIDDEN = 0x40;
public static final short FUNCFLAG_FUSESGETLASTERROR = 0x80;
public static final short FUNCFLAG_FDEFAULTCOLLELEM = 0x100;
public static final short FUNCFLAG_FUIDEFAULT = 0x200;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleClientSite.java b/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleClientSite.java
index abcf1bd234..fa933fd48f 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleClientSite.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/OleClientSite.java
@@ -1391,7 +1391,7 @@ void setBorderSpace(RECT newBorderwidth) {
void setBounds() {
Rectangle area = DPIUtil.autoScaleUp(frame.getClientArea()); // To Pixels
setBounds(DPIUtil.autoScaleDown(borderWidths.left),
- DPIUtil.autoScaleDown(borderWidths.top),
+ DPIUtil.autoScaleDown(borderWidths.top),
DPIUtil.autoScaleDown(area.width - borderWidths.left - borderWidths.right),
DPIUtil.autoScaleDown(area.height - borderWidths.top - borderWidths.bottom));
setObjectRects();
@@ -1408,7 +1408,7 @@ private void setExtent(int width, int height){
newExtent.cx = width; newExtent.cy = height;
newExtent = xFormPixelsToHimetric(newExtent);
- // Get the server running first, then do a SetExtent, then show it
+ // Get the server running first, then do a SetExtent, then show it
boolean alreadyRunning = COM.OleIsRunning(objIOleObject.getAddress());
if (!alreadyRunning)
COM.OleRun(objIOleObject.getAddress());
diff --git a/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/Variant.java b/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/Variant.java
index dd4f0d6a2e..4d3dd97fef 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/Variant.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/Variant.java
@@ -496,7 +496,7 @@ void getData(long /*int*/ pData){
switch (type) {
case COM.VT_EMPTY :
case COM.VT_NULL :
- OS.MoveMemory(pData, new short[] {type}, 2);
+ OS.MoveMemory(pData, new short[] {type}, 2);
break;
case COM.VT_BOOL :
OS.MoveMemory(pData, new short[] {type}, 2);
@@ -566,30 +566,30 @@ void getData(long /*int*/ pData){
* @since 3.2
*/
public double getDouble() {
- if (type == COM.VT_EMPTY) {
- OLE.error(OLE.ERROR_CANNOT_CHANGE_VARIANT_TYPE, -1);
- }
- if (type == COM.VT_R8) {
- return doubleData;
- }
+ if (type == COM.VT_EMPTY) {
+ OLE.error(OLE.ERROR_CANNOT_CHANGE_VARIANT_TYPE, -1);
+ }
+ if (type == COM.VT_R8) {
+ return doubleData;
+ }
- // try to coerce the value to the desired type
- long /*int*/ oldPtr = OS.GlobalAlloc(COM.GMEM_FIXED | COM.GMEM_ZEROINIT, sizeof);
- long /*int*/ newPtr = OS.GlobalAlloc(COM.GMEM_FIXED | COM.GMEM_ZEROINIT, sizeof);
- try {
- getData(oldPtr);
- int result = COM.VariantChangeType(newPtr, oldPtr, (short) 0, COM.VT_R8);
- if (result != COM.S_OK)
- OLE.error(OLE.ERROR_CANNOT_CHANGE_VARIANT_TYPE, result);
- Variant doubleVar = new Variant();
- doubleVar.setData(newPtr);
- return doubleVar.getDouble();
- } finally {
- COM.VariantClear(oldPtr);
- OS.GlobalFree(oldPtr);
- COM.VariantClear(newPtr);
- OS.GlobalFree(newPtr);
- }
+ // try to coerce the value to the desired type
+ long /*int*/ oldPtr = OS.GlobalAlloc(COM.GMEM_FIXED | COM.GMEM_ZEROINIT, sizeof);
+ long /*int*/ newPtr = OS.GlobalAlloc(COM.GMEM_FIXED | COM.GMEM_ZEROINIT, sizeof);
+ try {
+ getData(oldPtr);
+ int result = COM.VariantChangeType(newPtr, oldPtr, (short) 0, COM.VT_R8);
+ if (result != COM.S_OK)
+ OLE.error(OLE.ERROR_CANNOT_CHANGE_VARIANT_TYPE, result);
+ Variant doubleVar = new Variant();
+ doubleVar.setData(newPtr);
+ return doubleVar.getDouble();
+ } finally {
+ COM.VariantClear(oldPtr);
+ OS.GlobalFree(oldPtr);
+ COM.VariantClear(newPtr);
+ OS.GlobalFree(newPtr);
+ }
}
/**
@@ -972,7 +972,7 @@ void setData(long /*int*/ pData){
case COM.VT_R8 :
double[] newDoubleData = new double[1];
OS.MoveMemory(newDoubleData, pData + 8, 8);
- doubleData = newDoubleData[0];
+ doubleData = newDoubleData[0];
break;
case COM.VT_DISPATCH : {
long /*int*/[] ppvObject = new long /*int*/[1];
@@ -1040,37 +1040,37 @@ void setData(long /*int*/ pData){
*/
@Override
public String toString () {
- switch (type) {
- case COM.VT_BOOL :
- return "VT_BOOL{"+booleanData+"}";
- case COM.VT_I1 :
- return "VT_I1{"+byteData+"}";
- case COM.VT_I2 :
- return "VT_I2{"+shortData+"}";
- case COM.VT_UI2 :
- return "VT_UI2{"+charData+"}";
- case COM.VT_I4 :
- return "VT_I4{"+intData+"}";
- case COM.VT_I8 :
- return "VT_I8{"+longData+"}";
- case COM.VT_R4 :
- return "VT_R4{"+floatData+"}";
- case COM.VT_R8 :
- return "VT_R8{"+doubleData+"}";
- case COM.VT_BSTR :
- return "VT_BSTR{"+stringData+"}";
- case COM.VT_DISPATCH :
- return "VT_DISPATCH{"+(dispatchData == null ? 0 : dispatchData.getAddress())+"}";
- case COM.VT_UNKNOWN :
- return "VT_UNKNOWN{"+(unknownData == null ? 0 : unknownData.getAddress())+"}";
- case COM.VT_EMPTY :
- return "VT_EMPTY";
- case COM.VT_NULL :
- return "VT_NULL";
- }
- if ((type & COM.VT_BYREF) != 0) {
- return "VT_BYREF|"+(type & ~COM.VT_BYREF)+"{"+byRefPtr+"}";
- }
- return "Unsupported Type "+type;
+ switch (type) {
+ case COM.VT_BOOL :
+ return "VT_BOOL{"+booleanData+"}";
+ case COM.VT_I1 :
+ return "VT_I1{"+byteData+"}";
+ case COM.VT_I2 :
+ return "VT_I2{"+shortData+"}";
+ case COM.VT_UI2 :
+ return "VT_UI2{"+charData+"}";
+ case COM.VT_I4 :
+ return "VT_I4{"+intData+"}";
+ case COM.VT_I8 :
+ return "VT_I8{"+longData+"}";
+ case COM.VT_R4 :
+ return "VT_R4{"+floatData+"}";
+ case COM.VT_R8 :
+ return "VT_R8{"+doubleData+"}";
+ case COM.VT_BSTR :
+ return "VT_BSTR{"+stringData+"}";
+ case COM.VT_DISPATCH :
+ return "VT_DISPATCH{"+(dispatchData == null ? 0 : dispatchData.getAddress())+"}";
+ case COM.VT_UNKNOWN :
+ return "VT_UNKNOWN{"+(unknownData == null ? 0 : unknownData.getAddress())+"}";
+ case COM.VT_EMPTY :
+ return "VT_EMPTY";
+ case COM.VT_NULL :
+ return "VT_NULL";
+ }
+ if ((type & COM.VT_BYREF) != 0) {
+ return "VT_BYREF|"+(type & ~COM.VT_BYREF)+"{"+byRefPtr+"}";
+ }
+ return "Unsupported Type "+type;
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT OpenGL/win32/org/eclipse/swt/internal/opengl/win32/LAYERPLANEDESCRIPTOR.java b/bundles/org.eclipse.swt/Eclipse SWT OpenGL/win32/org/eclipse/swt/internal/opengl/win32/LAYERPLANEDESCRIPTOR.java
index 499a5440d1..0cf59147c3 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT OpenGL/win32/org/eclipse/swt/internal/opengl/win32/LAYERPLANEDESCRIPTOR.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT OpenGL/win32/org/eclipse/swt/internal/opengl/win32/LAYERPLANEDESCRIPTOR.java
@@ -15,29 +15,29 @@ package org.eclipse.swt.internal.opengl.win32;
public class LAYERPLANEDESCRIPTOR {
- public short nSize;
- public short nVersion;
- public int dwFlags;
- public byte iPixelType;
- public byte cColorBits;
- public byte cRedBits;
- public byte cRedShift;
- public byte cGreenBits;
- public byte cGreenShift;
- public byte cBlueBits;
- public byte cBlueShift;
- public byte cAlphaBits;
- public byte cAlphaShift;
- public byte cAccumBits;
- public byte cAccumRedBits;
- public byte cAccumGreenBits;
- public byte cAccumBlueBits;
- public byte cAccumAlphaBits;
- public byte cDepthBits;
- public byte cStencilBits;
- public byte cAuxBuffers;
- public byte iLayerPlane;
- public byte bReserved;
- public int crTransparent;
+ public short nSize;
+ public short nVersion;
+ public int dwFlags;
+ public byte iPixelType;
+ public byte cColorBits;
+ public byte cRedBits;
+ public byte cRedShift;
+ public byte cGreenBits;
+ public byte cGreenShift;
+ public byte cBlueBits;
+ public byte cBlueShift;
+ public byte cAlphaBits;
+ public byte cAlphaShift;
+ public byte cAccumBits;
+ public byte cAccumRedBits;
+ public byte cAccumGreenBits;
+ public byte cAccumBlueBits;
+ public byte cAccumAlphaBits;
+ public byte cDepthBits;
+ public byte cStencilBits;
+ public byte cAuxBuffers;
+ public byte iLayerPlane;
+ public byte bReserved;
+ public int crTransparent;
public static final int sizeof = 36;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT OpenGL/win32/org/eclipse/swt/internal/opengl/win32/PIXELFORMATDESCRIPTOR.java b/bundles/org.eclipse.swt/Eclipse SWT OpenGL/win32/org/eclipse/swt/internal/opengl/win32/PIXELFORMATDESCRIPTOR.java
index 01a3c169c7..5cf0d11f15 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT OpenGL/win32/org/eclipse/swt/internal/opengl/win32/PIXELFORMATDESCRIPTOR.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT OpenGL/win32/org/eclipse/swt/internal/opengl/win32/PIXELFORMATDESCRIPTOR.java
@@ -15,31 +15,31 @@ package org.eclipse.swt.internal.opengl.win32;
public class PIXELFORMATDESCRIPTOR {
- public short nSize;
- public short nVersion;
- public int dwFlags;
- public byte iPixelType;
- public byte cColorBits;
- public byte cRedBits;
- public byte cRedShift;
- public byte cGreenBits;
- public byte cGreenShift;
- public byte cBlueBits;
- public byte cBlueShift;
- public byte cAlphaBits;
- public byte cAlphaShift;
- public byte cAccumBits;
- public byte cAccumRedBits;
- public byte cAccumGreenBits;
- public byte cAccumBlueBits;
- public byte cAccumAlphaBits;
- public byte cDepthBits;
- public byte cStencilBits;
- public byte cAuxBuffers;
- public byte iLayerType;
- public byte bReserved;
- public int dwLayerMask;
- public int dwVisibleMask;
- public int dwDamageMask;
+ public short nSize;
+ public short nVersion;
+ public int dwFlags;
+ public byte iPixelType;
+ public byte cColorBits;
+ public byte cRedBits;
+ public byte cRedShift;
+ public byte cGreenBits;
+ public byte cGreenShift;
+ public byte cBlueBits;
+ public byte cBlueShift;
+ public byte cAlphaBits;
+ public byte cAlphaShift;
+ public byte cAccumBits;
+ public byte cAccumRedBits;
+ public byte cAccumGreenBits;
+ public byte cAccumBlueBits;
+ public byte cAccumAlphaBits;
+ public byte cDepthBits;
+ public byte cStencilBits;
+ public byte cAuxBuffers;
+ public byte iLayerType;
+ public byte bReserved;
+ public int dwLayerMask;
+ public int dwVisibleMask;
+ public int dwDamageMask;
public static final int sizeof = 40;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cairo/org/eclipse/swt/internal/cairo/Cairo.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cairo/org/eclipse/swt/internal/cairo/Cairo.java
index 86a280dfaa..c656c6d69c 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cairo/org/eclipse/swt/internal/cairo/Cairo.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cairo/org/eclipse/swt/internal/cairo/Cairo.java
@@ -66,18 +66,18 @@ public class Cairo extends Platform {
public static final int CAIRO_STATUS_NULL_POINTER =7;
public static final int CAIRO_SURFACE_TYPE_IMAGE = 0;
public static final int CAIRO_SURFACE_TYPE_PDF = 1;
- public static final int CAIRO_SURFACE_TYPE_PS = 2;
- public static final int CAIRO_SURFACE_TYPE_XLIB = 3;
- public static final int CAIRO_SURFACE_TYPE_XCB = 4;
- public static final int CAIRO_SURFACE_TYPE_GLITZ = 5;
- public static final int CAIRO_SURFACE_TYPE_QUARTZ = 6;
- public static final int CAIRO_SURFACE_TYPE_WIN32 = 7;
- public static final int CAIRO_SURFACE_TYPE_BEOS = 8;
- public static final int CAIRO_SURFACE_TYPE_DIRECTFB = 9;
- public static final int CAIRO_SURFACE_TYPE_SVG = 10;
- public static final int CAIRO_REGION_OVERLAP_IN = 0;
- public static final int CAIRO_REGION_OVERLAP_OUT = 1;
- public static final int CAIRO_REGION_OVERLAP_PART = 2;
+ public static final int CAIRO_SURFACE_TYPE_PS = 2;
+ public static final int CAIRO_SURFACE_TYPE_XLIB = 3;
+ public static final int CAIRO_SURFACE_TYPE_XCB = 4;
+ public static final int CAIRO_SURFACE_TYPE_GLITZ = 5;
+ public static final int CAIRO_SURFACE_TYPE_QUARTZ = 6;
+ public static final int CAIRO_SURFACE_TYPE_WIN32 = 7;
+ public static final int CAIRO_SURFACE_TYPE_BEOS = 8;
+ public static final int CAIRO_SURFACE_TYPE_DIRECTFB = 9;
+ public static final int CAIRO_SURFACE_TYPE_SVG = 10;
+ public static final int CAIRO_REGION_OVERLAP_IN = 0;
+ public static final int CAIRO_REGION_OVERLAP_OUT = 1;
+ public static final int CAIRO_REGION_OVERLAP_PART = 2;
public static final int CAIRO_FILTER_FAST = 0;
public static final int CAIRO_FILTER_GOOD = 1;
public static final int CAIRO_FILTER_BEST = 2;
@@ -1285,7 +1285,7 @@ public static final native long _cairo_region_copy(long region);
public static final long cairo_region_copy(long region) {
lock.lock();
try {
- return _cairo_region_copy(region);
+ return _cairo_region_copy(region);
} finally {
lock.unlock();
}
@@ -1356,7 +1356,7 @@ public static final native void _cairo_region_get_rectangle(long region, int nth
public static final void cairo_region_get_rectangle(long region, int nth, long rectangle) {
lock.lock();
try {
- _cairo_region_get_rectangle(region, nth, rectangle);
+ _cairo_region_get_rectangle(region, nth, rectangle);
} finally {
lock.unlock();
}
@@ -1406,7 +1406,7 @@ public static final native void _cairo_region_translate(long region, int dx, int
public static final void cairo_region_translate(long region, int dx, int dy) {
lock.lock();
try {
- _cairo_region_translate(region,dx,dy);
+ _cairo_region_translate(region,dx,dy);
} finally {
lock.unlock();
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/OS.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/OS.java
index e053462734..ef08209ae4 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/OS.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/OS.java
@@ -256,13 +256,13 @@ public static final native int GetDblTime();
@param outIconRef cast=(IconRef *) */
public static final native int GetIconRefFromTypeInfo(int inCreator, int inType, long inExtension, long inMIMEType, int inUsageFlags, long outIconRef[]);
/** @method flags=dynamic
- @param context cast=(CGContextRef) */
+ @param context cast=(CGContextRef) */
public static final native long CGContextCopyPath(long context);
/** @method flags=dynamic */
public static final native long TISCopyCurrentKeyboardInputSource();
/** @method flags=dynamic
- @param inputSource cast=(TISInputSourceRef)
- @param propertyKey cast=(CFStringRef) */
+ @param inputSource cast=(TISInputSourceRef)
+ @param propertyKey cast=(CFStringRef) */
public static final native long TISGetInputSourceProperty (long inputSource, long propertyKey);
/** @method flags=no_gen */
public static final native long kTISPropertyUnicodeKeyLayoutData();
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/common/org/eclipse/swt/internal/Library.java b/bundles/org.eclipse.swt/Eclipse SWT PI/common/org/eclipse/swt/internal/Library.java
index b09de9a528..50e91651eb 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/common/org/eclipse/swt/internal/Library.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/common/org/eclipse/swt/internal/Library.java
@@ -27,12 +27,12 @@ public class Library {
/**
* SWT Major version number (must be >= 0)
*/
- static int MAJOR_VERSION = 4;
+ static int MAJOR_VERSION = 4;
/**
* SWT Minor version number (must be in the range 0..999)
*/
- static int MINOR_VERSION = 928;
+ static int MINOR_VERSION = 928;
/**
* SWT revision number (must be >= 0)
@@ -168,14 +168,14 @@ static boolean extract (String extractToFilePath, String mappedName) {
tempFile = File.createTempFile (file.getName(), ".tmp", file.getParentFile()); //$NON-NLS-1$
} catch (Throwable e) {
return false;
- }
+ }
// Extract resource
String resourceName = "/" + mappedName; //$NON-NLS-1$
if (!extractResource (resourceName, tempFile)) {
tempFile.delete();
return false;
- }
+ }
// Make it executable
chmod ("755", tempFile.getPath()); //$NON-NLS-1$
@@ -459,7 +459,7 @@ public static File findResource(String subDir, String resourceName, boolean mapR
// Create temp directory if it doesn't exist
File tempDir = new File (USER_HOME, SWT_LIB_DIR + maybeSubDirPathWithPrefix);
if ((!tempDir.exists () || tempDir.isDirectory ())) {
- tempDir.mkdirs ();
+ tempDir.mkdirs ();
}
if (extract(file.getPath(), maybeSubDirPath + finalResourceName)) {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GDK.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GDK.java
index e8072b71f8..16e7f629f0 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GDK.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GDK.java
@@ -649,13 +649,13 @@ public class GDK extends OS {
*/
public static final native void _gdk_cairo_set_source_pixbuf(long cairo, long pixbuf, double pixbuf_x, double pixbuf_y);
public static final void gdk_cairo_set_source_pixbuf(long cairo, long pixbuf, double pixbuf_x, double pixbuf_y) {
- lock.lock();
- try {
- _gdk_cairo_set_source_pixbuf(cairo,pixbuf,pixbuf_x,pixbuf_y);
- }
- finally {
- lock.unlock();
- }
+ lock.lock();
+ try {
+ _gdk_cairo_set_source_pixbuf(cairo,pixbuf,pixbuf_x,pixbuf_y);
+ }
+ finally {
+ lock.unlock();
+ }
}
/**
* @param cairo cast=(cairo_t *)
@@ -666,13 +666,13 @@ public class GDK extends OS {
public static final native void _gdk_cairo_set_source_window(long cairo, long window, int x, int y);
/** [GTK3 only, if-def'd in os.h] */
public static final void gdk_cairo_set_source_window(long cairo, long window, int x, int y) {
- lock.lock();
- try {
- _gdk_cairo_set_source_window(cairo, window, x, y);
- }
- finally {
- lock.unlock();
- }
+ lock.lock();
+ try {
+ _gdk_cairo_set_source_window(cairo, window, x, y);
+ }
+ finally {
+ lock.unlock();
+ }
}
/** @param display cast=(GdkDisplay *)
* @param cursor_type cast=(GdkCursorType)
@@ -1411,9 +1411,9 @@ public class GDK extends OS {
lock.lock();
try {
return _gdk_keymap_get_entries_for_keyval(keymap, keyval, keys, n_keys);
- } finally {
- lock.unlock();
- }
+ } finally {
+ lock.unlock();
+ }
}
public static final native long _gdk_keyval_to_lower(long keyval);
public static final long gdk_keyval_to_lower(long keyval) {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GTK.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GTK.java
index fc15134ac6..179be70ba4 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GTK.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GTK.java
@@ -1350,7 +1350,7 @@ public class GTK extends OS {
public static final void gtk_color_chooser_set_use_alpha (long chooser, boolean use_alpha) {
lock.lock();
try {
- _gtk_color_chooser_set_use_alpha (chooser, use_alpha);
+ _gtk_color_chooser_set_use_alpha (chooser, use_alpha);
} finally {
lock.unlock();
}
@@ -1362,7 +1362,7 @@ public class GTK extends OS {
public static final boolean gtk_color_chooser_get_use_alpha (long chooser) {
lock.lock();
try {
- return _gtk_color_chooser_get_use_alpha (chooser);
+ return _gtk_color_chooser_get_use_alpha (chooser);
} finally {
lock.unlock();
}
@@ -1375,7 +1375,7 @@ public class GTK extends OS {
public static final void gtk_color_chooser_get_rgba(long chooser, GdkRGBA color) {
lock.lock();
try {
- _gtk_color_chooser_get_rgba(chooser, color);
+ _gtk_color_chooser_get_rgba(chooser, color);
} finally {
lock.unlock();
}
@@ -1388,7 +1388,7 @@ public class GTK extends OS {
public static final void gtk_color_chooser_set_rgba(long chooser, GdkRGBA color) {
lock.lock();
try {
- _gtk_color_chooser_set_rgba(chooser, color);
+ _gtk_color_chooser_set_rgba(chooser, color);
} finally {
lock.unlock();
}
@@ -2505,42 +2505,42 @@ public class GTK extends OS {
public static final native long _gtk_gesture_multi_press_new();
/** [GTK4 only, if-def'd in os.h] */
public static final long gtk_gesture_multi_press_new() {
- lock.lock();
- try {
- return _gtk_gesture_multi_press_new();
- } finally {
- lock.unlock();
- }
+ lock.lock();
+ try {
+ return _gtk_gesture_multi_press_new();
+ } finally {
+ lock.unlock();
+ }
}
public static final native long _gtk_event_controller_key_new();
/** [GTK4 only, if-def'd in os.h] */
public static final long gtk_event_controller_key_new() {
- lock.lock();
- try {
- return _gtk_event_controller_key_new();
- } finally {
- lock.unlock();
- }
+ lock.lock();
+ try {
+ return _gtk_event_controller_key_new();
+ } finally {
+ lock.unlock();
+ }
}
public static final native long _gtk_event_controller_motion_new();
/** [GTK4 only, if-def'd in os.h] */
public static final long gtk_event_controller_motion_new() {
- lock.lock();
- try {
- return _gtk_event_controller_motion_new();
- } finally {
- lock.unlock();
- }
+ lock.lock();
+ try {
+ return _gtk_event_controller_motion_new();
+ } finally {
+ lock.unlock();
+ }
}
public static final native long _gtk_event_controller_scroll_new(int flag);
/** [GTK4 only, if-def'd in os.h] */
public static final long gtk_event_controller_scroll_new(int flag) {
- lock.lock();
- try {
- return _gtk_event_controller_scroll_new(flag);
- } finally {
- lock.unlock();
- }
+ lock.lock();
+ try {
+ return _gtk_event_controller_scroll_new(flag);
+ } finally {
+ lock.unlock();
+ }
}
/**
* @param widget cast=(GtkWidget *)
@@ -2549,24 +2549,24 @@ public class GTK extends OS {
public static final native void _gtk_widget_add_controller(long widget, long controller);
/** [GTK4 only, if-def'd in os.h] */
public static final void gtk_widget_add_controller(long widget, long controller) {
- lock.lock();
- try {
- _gtk_widget_add_controller(widget, controller);
- } finally {
- lock.unlock();
- }
+ lock.lock();
+ try {
+ _gtk_widget_add_controller(widget, controller);
+ } finally {
+ lock.unlock();
+ }
}
/**
* @method flags=dynamic
*/
public static final native void _gtk_event_controller_set_propagation_phase(long controller, int phase);
public static final void gtk_event_controller_set_propagation_phase(long controller, int phase) {
- lock.lock();
- try {
- _gtk_event_controller_set_propagation_phase(controller, phase);
- } finally {
- lock.unlock();
- }
+ lock.lock();
+ try {
+ _gtk_event_controller_set_propagation_phase(controller, phase);
+ } finally {
+ lock.unlock();
+ }
}
/**
* @method flags=dynamic
@@ -2589,24 +2589,24 @@ public class GTK extends OS {
*/
public static final native void _gtk_event_controller_handle_event(long gesture, long event);
public static final void gtk_event_controller_handle_event(long gesture, long event) {
- lock.lock();
- try {
- _gtk_event_controller_handle_event(gesture, event);
- } finally {
- lock.unlock();
- }
+ lock.lock();
+ try {
+ _gtk_event_controller_handle_event(gesture, event);
+ } finally {
+ lock.unlock();
+ }
}
/**
* @method flags=dynamic
*/
public static final native long _gtk_event_controller_get_widget(long controller);
public static final long gtk_event_controller_get_widget(long controller) {
- lock.lock();
- try {
- return _gtk_event_controller_get_widget(controller);
- } finally {
- lock.unlock();
- }
+ lock.lock();
+ try {
+ return _gtk_event_controller_get_widget(controller);
+ } finally {
+ lock.unlock();
+ }
}
/**
* @param filter cast=(GtkFileFilter *)
@@ -2683,12 +2683,12 @@ public class GTK extends OS {
*/
public static final native long _gtk_gesture_drag_new(long widget);
public static final long gtk_gesture_drag_new(long widget) {
- lock.lock();
- try {
- return _gtk_gesture_drag_new(widget);
- } finally {
- lock.unlock();
- }
+ lock.lock();
+ try {
+ return _gtk_gesture_drag_new(widget);
+ } finally {
+ lock.unlock();
+ }
}
/**
* @method flags=dynamic
@@ -2743,12 +2743,12 @@ public class GTK extends OS {
*/
public static final native void _gtk_gesture_group (long group_gesture, long gesture);
public static final void gtk_gesture_group (long group_gesture, long gesture) {
- lock.lock();
- try {
- _gtk_gesture_group(group_gesture, gesture);
- } finally {
- lock.unlock();
- }
+ lock.lock();
+ try {
+ _gtk_gesture_group(group_gesture, gesture);
+ } finally {
+ lock.unlock();
+ }
}
/**
* @method flags=dynamic
@@ -2757,7 +2757,7 @@ public class GTK extends OS {
public static final void gtk_gesture_pan_set_orientation(long orientation) {
lock.lock();
try {
- _gtk_gesture_pan_set_orientation(orientation);
+ _gtk_gesture_pan_set_orientation(orientation);
} finally {
lock.unlock();
}
@@ -2791,12 +2791,12 @@ public class GTK extends OS {
*/
public static final native void _gtk_gesture_single_set_button(long gesture, int button);
public static final void gtk_gesture_single_set_button(long gesture, int button) {
- lock.lock();
- try {
- _gtk_gesture_single_set_button(gesture, button);
- } finally {
- lock.unlock();
- }
+ lock.lock();
+ try {
+ _gtk_gesture_single_set_button(gesture, button);
+ } finally {
+ lock.unlock();
+ }
}
/**
* @method flags=dynamic
@@ -2827,12 +2827,12 @@ public class GTK extends OS {
*/
public static final native void _gtk_gesture_drag_get_offset(long gesture, double[] x, double[] y);
public static final void gtk_gesture_drag_get_offset(long gesture, double[] x, double[] y) {
- lock.lock();
- try {
- _gtk_gesture_drag_get_offset(gesture, x, y);
- } finally {
- lock.unlock();
- }
+ lock.lock();
+ try {
+ _gtk_gesture_drag_get_offset(gesture, x, y);
+ } finally {
+ lock.unlock();
+ }
}
/**
* @method flags=dynamic
@@ -2853,36 +2853,36 @@ public class GTK extends OS {
public static final native long _gtk_gesture_rotate_new(long widget);
public static final long gtk_gesture_rotate_new(long widget) {
- lock.lock();
- try {
- return _gtk_gesture_rotate_new(widget);
- } finally {
- lock.unlock();
- }
+ lock.lock();
+ try {
+ return _gtk_gesture_rotate_new(widget);
+ } finally {
+ lock.unlock();
+ }
}
/**
* @method flags=dynamic
*/
public static final native long _gtk_gesture_zoom_new(long widget);
public static final long gtk_gesture_zoom_new(long widget) {
- lock.lock();
- try {
- return _gtk_gesture_zoom_new(widget);
- } finally {
- lock.unlock();
- }
+ lock.lock();
+ try {
+ return _gtk_gesture_zoom_new(widget);
+ } finally {
+ lock.unlock();
+ }
}
/**
* @method flags=dynamic
*/
public static final native double _gtk_gesture_zoom_get_scale_delta (long gesture);
public static final double gtk_gesture_zoom_get_scale_delta (long gesture) {
- lock.lock();
- try {
- return _gtk_gesture_zoom_get_scale_delta(gesture);
- } finally {
- lock.unlock();
- }
+ lock.lock();
+ try {
+ return _gtk_gesture_zoom_get_scale_delta(gesture);
+ } finally {
+ lock.unlock();
+ }
}
/**
* @method flags=dynamic
@@ -3031,7 +3031,7 @@ public class GTK extends OS {
public static final void gtk_widget_set_margin_start (long widget, int margin) {
lock.lock();
try {
- _gtk_widget_set_margin_start(widget, margin);
+ _gtk_widget_set_margin_start(widget, margin);
} finally {
lock.unlock();
}
@@ -3045,7 +3045,7 @@ public class GTK extends OS {
public static final void gtk_widget_set_margin_end (long widget, int margin) {
lock.lock();
try {
- _gtk_widget_set_margin_end(widget, margin);
+ _gtk_widget_set_margin_end(widget, margin);
} finally {
lock.unlock();
}
@@ -3059,7 +3059,7 @@ public class GTK extends OS {
public static final void gtk_widget_set_margin_top (long widget, int margin) {
lock.lock();
try {
- _gtk_widget_set_margin_top(widget, margin);
+ _gtk_widget_set_margin_top(widget, margin);
} finally {
lock.unlock();
}
@@ -3073,7 +3073,7 @@ public class GTK extends OS {
public static final void gtk_widget_set_margin_bottom (long widget, int margin) {
lock.lock();
try {
- _gtk_widget_set_margin_bottom(widget, margin);
+ _gtk_widget_set_margin_bottom(widget, margin);
} finally {
lock.unlock();
}
@@ -5494,12 +5494,12 @@ public class GTK extends OS {
*/
public static final native void _gtk_range_get_slider_range(long range, int[] slider_start, int[] slider_end);
public static final void gtk_range_get_slider_range(long range, int[] slider_start, int[] slider_end) {
- lock.lock();
- try {
- _gtk_range_get_slider_range(range, slider_start, slider_end);
- } finally {
- lock.unlock();
- }
+ lock.lock();
+ try {
+ _gtk_range_get_slider_range(range, slider_start, slider_end);
+ } finally {
+ lock.unlock();
+ }
}
/**
* @param scale cast=(GtkScale *)
@@ -5930,7 +5930,7 @@ public class GTK extends OS {
public static final long gtk_snapshot_append_cairo(long snapshot, long rect) {
lock.lock();
try {
- return _gtk_snapshot_append_cairo(snapshot, rect);
+ return _gtk_snapshot_append_cairo(snapshot, rect);
} finally {
lock.unlock();
}
@@ -7269,7 +7269,7 @@ public class GTK extends OS {
public static final long gtk_tree_path_compare(long a, long b) {
lock.lock();
try {
- return _gtk_tree_path_compare(a, b);
+ return _gtk_tree_path_compare(a, b);
} finally {
lock.unlock();
}
@@ -8790,12 +8790,12 @@ public class GTK extends OS {
/** @param widget cast=(GtkWidget *) */
public static final native boolean _gtk_widget_has_focus(long widget);
public static final boolean gtk_widget_has_focus(long widget) {
- lock.lock();
- try {
- return _gtk_widget_has_focus(widget);
- } finally {
- lock.unlock();
- }
+ lock.lock();
+ try {
+ return _gtk_widget_has_focus(widget);
+ } finally {
+ lock.unlock();
+ }
}
/** @param widget cast=(GtkWidget *) */
public static final native void _gtk_widget_hide(long widget);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEventKey.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEventKey.java
index 0e9767477c..085ac39d9a 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEventKey.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEventKey.java
@@ -32,9 +32,9 @@ public class GdkEventKey extends GdkEvent {
public long string;
/** @field cast=(guint16) */
public short hardware_keycode;
- /** @field cast=(guint8) */
+ /** @field cast=(guint8) */
public byte group;
/** @field cast=(guint) */
public int is_modifier;
- public static final int sizeof = GDK.GdkEventKey_sizeof();
+ public static final int sizeof = GDK.GdkEventKey_sizeof();
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java
index ba04f401e8..166b509743 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java
@@ -1496,7 +1496,7 @@ public static final native void _g_signal_remove_emission_hook(int signal_id, lo
public static final void g_signal_remove_emission_hook(int signal_id, long hook_id) {
lock.lock();
try {
- _g_signal_remove_emission_hook (signal_id, hook_id);
+ _g_signal_remove_emission_hook (signal_id, hook_id);
} finally {
lock.unlock();
}
@@ -4190,12 +4190,12 @@ public static final native long _g_dbus_proxy_new_for_bus_sync (int bus_type, in
long cancellable, long [] error);
public static final long g_dbus_proxy_new_for_bus_sync (int bus_type, int flags, long info, byte [] name, byte [] object_path, byte [] interface_name,
long cancellable, long [] error) {
- lock.lock();
- try {
- return _g_dbus_proxy_new_for_bus_sync (bus_type, flags, info, name, object_path, interface_name, cancellable, error);
- } finally {
- lock.unlock();
- }
+ lock.lock();
+ try {
+ return _g_dbus_proxy_new_for_bus_sync (bus_type, flags, info, name, object_path, interface_name, cancellable, error);
+ } finally {
+ lock.unlock();
+ }
}
/**
@@ -4259,12 +4259,12 @@ public static final long g_dbus_proxy_call_finish (long proxy, long res, long []
public static final native long _g_dbus_node_info_new_for_xml (byte[] xml_data, long [] error);
/** @category gdbus */
public static final long g_dbus_node_info_new_for_xml (byte[] xml_data, long [] error) {
- lock.lock();
- try {
- return _g_dbus_node_info_new_for_xml (xml_data, error);
- } finally {
- lock.unlock();
- }
+ lock.lock();
+ try {
+ return _g_dbus_node_info_new_for_xml (xml_data, error);
+ } finally {
+ lock.unlock();
+ }
}
/**
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/com/win32/FileDialogVtbl.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/com/win32/FileDialogVtbl.java
index bc69d3574d..9ee7198fc5 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/com/win32/FileDialogVtbl.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/com/win32/FileDialogVtbl.java
@@ -17,31 +17,31 @@ package org.eclipse.swt.internal.com.win32;
* Function number constants for IFileDialog COM interface
*/
public class FileDialogVtbl{
- public static final int QUERY_INTERFACE = 0;
- public static final int ADD_REF = 1;
- public static final int RELEASE = 2;
- public static final int SHOW = 3;
- public static final int SET_FILE_TYPES = 4;
- public static final int SET_FILE_TYPE_INDEX = 5;
- public static final int GET_FILE_TYPE_INDEX = 6;
- public static final int ADVISE = 7;
- public static final int UNADVISE = 8;
- public static final int SET_OPTIONS = 9;
- public static final int GET_OPTIONS = 10;
- public static final int SET_DEFAULT_FOLDER = 11;
- public static final int SET_FOLDER = 12;
- public static final int GET_FOLDER = 13;
- public static final int GET_CURRENT_SELECTION = 14;
- public static final int SET_FILE_NAME = 15;
- public static final int GET_FILE_NAME = 16;
- public static final int SET_TITLE = 17;
- public static final int SET_OK_BUTTON_LABEL = 18;
- public static final int SET_FILE_NAME_LABEL = 19;
- public static final int GET_RESULT = 20;
- public static final int ADD_PLACE = 21;
- public static final int SET_DEFAULT_EXTENSION = 22;
- public static final int CLOSE = 23;
- public static final int SET_CLIENT_GUID = 24;
- public static final int CLEAR_CLIENT_DATA = 25;
- public static final int SET_FILTER = 26;
+ public static final int QUERY_INTERFACE = 0;
+ public static final int ADD_REF = 1;
+ public static final int RELEASE = 2;
+ public static final int SHOW = 3;
+ public static final int SET_FILE_TYPES = 4;
+ public static final int SET_FILE_TYPE_INDEX = 5;
+ public static final int GET_FILE_TYPE_INDEX = 6;
+ public static final int ADVISE = 7;
+ public static final int UNADVISE = 8;
+ public static final int SET_OPTIONS = 9;
+ public static final int GET_OPTIONS = 10;
+ public static final int SET_DEFAULT_FOLDER = 11;
+ public static final int SET_FOLDER = 12;
+ public static final int GET_FOLDER = 13;
+ public static final int GET_CURRENT_SELECTION = 14;
+ public static final int SET_FILE_NAME = 15;
+ public static final int GET_FILE_NAME = 16;
+ public static final int SET_TITLE = 17;
+ public static final int SET_OK_BUTTON_LABEL = 18;
+ public static final int SET_FILE_NAME_LABEL = 19;
+ public static final int GET_RESULT = 20;
+ public static final int ADD_PLACE = 21;
+ public static final int SET_DEFAULT_EXTENSION = 22;
+ public static final int CLOSE = 23;
+ public static final int SET_CLIENT_GUID = 24;
+ public static final int CLEAR_CLIENT_DATA = 25;
+ public static final int SET_FILTER = 26;
} \ No newline at end of file
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/com/win32/ShellItemVtbl.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/com/win32/ShellItemVtbl.java
index 44d16a2605..f9f7fadf1b 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/com/win32/ShellItemVtbl.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/com/win32/ShellItemVtbl.java
@@ -17,12 +17,12 @@ package org.eclipse.swt.internal.com.win32;
* Function number constants for IShellItem COM interface
*/
public class ShellItemVtbl{
- public static final int QUERY_INTERFACE = 0;
- public static final int ADD_REF = 1;
- public static final int RELEASE = 2;
- public static final int BIND_TO_HANDLER = 3;
- public static final int GET_PARENT = 4;
- public static final int GET_DISPLAY_NAME = 5;
- public static final int GET_ATTRIBUTES = 6;
- public static final int COMPARE = 7;
+ public static final int QUERY_INTERFACE = 0;
+ public static final int ADD_REF = 1;
+ public static final int RELEASE = 2;
+ public static final int BIND_TO_HANDLER = 3;
+ public static final int GET_PARENT = 4;
+ public static final int GET_DISPLAY_NAME = 5;
+ public static final int GET_ATTRIBUTES = 6;
+ public static final int COMPARE = 7;
} \ No newline at end of file
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/GUID.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/GUID.java
index 293692e149..ee1a6b8715 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/GUID.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/GUID.java
@@ -34,10 +34,10 @@ static String toHex (int v, int length) {
@Override
public String toString () {
return '{' + toHex (Data1, 8) + '-' +
- toHex (Data2, 4) + '-' +
- toHex (Data3, 4) + '-' +
- toHex (Data4[0], 2) + toHex (Data4[1], 2) + '-' +
- toHex (Data4[2], 2) + toHex (Data4[3], 2) + toHex (Data4[4], 2) + toHex (Data4[5], 2) + toHex (Data4[6], 2) + toHex (Data4[7], 2) + '}';
+ toHex (Data2, 4) + '-' +
+ toHex (Data3, 4) + '-' +
+ toHex (Data4[0], 2) + toHex (Data4[1], 2) + '-' +
+ toHex (Data4[2], 2) + toHex (Data4[3], 2) + toHex (Data4[4], 2) + toHex (Data4[5], 2) + toHex (Data4[6], 2) + toHex (Data4[7], 2) + '}';
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IOleInPlaceActiveObject.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IOleInPlaceActiveObject.java
index 9a04980528..eadda7a037 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IOleInPlaceActiveObject.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IOleInPlaceActiveObject.java
@@ -21,8 +21,8 @@ public IOleInPlaceActiveObject(long /*int*/ address) {
super(address);
}
public int TranslateAccelerator(MSG lpmsg) {
- //lpmsg - Pointer to message that may need translating
- return COM.VtblCall(5, address, lpmsg);
+ //lpmsg - Pointer to message that may need translating
+ return COM.VtblCall(5, address, lpmsg);
}
public void OnFrameWindowActivate(boolean fActivate) {
COM.VtblCall(6, getAddress(), fActivate);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IStorage.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IStorage.java
index 075411a3dc..799bad9fb1 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IStorage.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/IStorage.java
@@ -25,10 +25,10 @@ public int Commit(int grfCommitFlag) {
}
public int CopyTo(
int ciidExclude, //Number of elements in rgiidExclude
- GUID rgiidExclude, //Array of interface identifiers (IIDs)
- String[] snbExclude, //Points to a block of stream names in the storage object
+ GUID rgiidExclude, //Array of interface identifiers (IIDs)
+ String[] snbExclude, //Points to a block of stream names in the storage object
long /*int*/ pstgDest //Points to destination storage object
- ){
+ ){
// we only support snbExclude = null
if (snbExclude != null) {
return COM.E_INVALIDARG;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/CERT_PUBLIC_KEY_INFO.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/CERT_PUBLIC_KEY_INFO.java
index dc29608fbc..64557cde33 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/CERT_PUBLIC_KEY_INFO.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/CERT_PUBLIC_KEY_INFO.java
@@ -15,8 +15,8 @@ package org.eclipse.swt.internal.win32;
public class CERT_PUBLIC_KEY_INFO {
- public CRYPT_ALGORITHM_IDENTIFIER Algorithm = new CRYPT_ALGORITHM_IDENTIFIER ();
- public CRYPT_BIT_BLOB PublicKey = new CRYPT_BIT_BLOB ();
+ public CRYPT_ALGORITHM_IDENTIFIER Algorithm = new CRYPT_ALGORITHM_IDENTIFIER ();
+ public CRYPT_BIT_BLOB PublicKey = new CRYPT_BIT_BLOB ();
- static final public int sizeof = OS.CERT_PUBLIC_KEY_INFO_sizeof ();
+ static final public int sizeof = OS.CERT_PUBLIC_KEY_INFO_sizeof ();
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/DROPFILES.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/DROPFILES.java
index 1cd93e3105..a618b72b57 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/DROPFILES.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/DROPFILES.java
@@ -21,10 +21,10 @@ public class DROPFILES {
/** @field accessor=pt.y */
public int pt_y;
public int fNC; // Nonclient area flag. If this member is TRUE, pt specifies the screen
- // coordinates of a point in a window's nonclient area. If it is FALSE,
- // pt specifies the client coordinates of a point in the client area.
+ // coordinates of a point in a window's nonclient area. If it is FALSE,
+ // pt specifies the client coordinates of a point in the client area.
public int fWide; // Value that indicates whether the file contains ANSI or Unicode
// characters. If it is zero, it contains ANSI characters. Otherwise, it
- // contains Unicode characters.
+ // contains Unicode characters.
public static final int sizeof = OS.DROPFILES_sizeof ();
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/GESTURECONFIG.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/GESTURECONFIG.java
index 258b1f6e6d..c6ecf6eeeb 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/GESTURECONFIG.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/GESTURECONFIG.java
@@ -15,7 +15,7 @@ package org.eclipse.swt.internal.win32;
public class GESTURECONFIG {
public int dwID; // gesture ID
- public int dwWant; // settings related to gesture ID that are to be turned on
- public int dwBlock; // settings related to gesture ID that are to be turned off
- public static final int sizeof = OS.GESTURECONFIG_sizeof ();
+ public int dwWant; // settings related to gesture ID that are to be turned on
+ public int dwBlock; // settings related to gesture ID that are to be turned off
+ public static final int sizeof = OS.GESTURECONFIG_sizeof ();
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/GESTUREINFO.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/GESTUREINFO.java
index 1bbd3ebfe1..54e1748a8c 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/GESTUREINFO.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/GESTUREINFO.java
@@ -14,19 +14,19 @@
package org.eclipse.swt.internal.win32;
public class GESTUREINFO {
- public int cbSize;
- public int dwFlags;
- public int dwID;
- /** @field cast=(HWND) */
- public long /*int*/ hwndTarget;
- // POINTS ptsLocation
- /** @field accessor=ptsLocation.x */
- public short x;
- /** @field accessor=ptsLocation.y */
- public short y;
- public int dwInstanceID;
- public int dwSequenceID;
- public long ullArguments;
- public int cbExtraArgs;
- public static final int sizeof = OS.GESTUREINFO_sizeof ();
+ public int cbSize;
+ public int dwFlags;
+ public int dwID;
+ /** @field cast=(HWND) */
+ public long /*int*/ hwndTarget;
+ // POINTS ptsLocation
+ /** @field accessor=ptsLocation.x */
+ public short x;
+ /** @field accessor=ptsLocation.y */
+ public short y;
+ public int dwInstanceID;
+ public int dwSequenceID;
+ public long ullArguments;
+ public int cbExtraArgs;
+ public static final int sizeof = OS.GESTUREINFO_sizeof ();
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/MEASUREITEMSTRUCT.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/MEASUREITEMSTRUCT.java
index f32dd68020..890d1a6dfc 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/MEASUREITEMSTRUCT.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/MEASUREITEMSTRUCT.java
@@ -16,7 +16,7 @@ package org.eclipse.swt.internal.win32;
public class MEASUREITEMSTRUCT {
public int CtlType;
public int CtlID;
- public int itemID;
+ public int itemID;
public int itemWidth;
public int itemHeight;
public long /*int*/ itemData;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/NMTVDISPINFO.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/NMTVDISPINFO.java
index 9aa4612de1..c90e7e3ab0 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/NMTVDISPINFO.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/NMTVDISPINFO.java
@@ -25,11 +25,11 @@ public class NMTVDISPINFO extends NMHDR {
public int stateMask;
/** @field accessor=item.pszText,cast=(LPTSTR) */
public long /*int*/ pszText;
- /** @field accessor=item.cchTextMax */
+ /** @field accessor=item.cchTextMax */
public int cchTextMax;
- /** @field accessor=item.iImage */
+ /** @field accessor=item.iImage */
public int iImage;
- /** @field accessor=item.iSelectedImage */
+ /** @field accessor=item.iSelectedImage */
public int iSelectedImage;
/** @field accessor=item.cChildren */
public int cChildren;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/OUTLINETEXTMETRIC.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/OUTLINETEXTMETRIC.java
index 0b80d30201..0d31133269 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/OUTLINETEXTMETRIC.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/OUTLINETEXTMETRIC.java
@@ -16,58 +16,58 @@ package org.eclipse.swt.internal.win32;
public class OUTLINETEXTMETRIC {
public int otmSize;
public TEXTMETRIC otmTextMetrics = new TEXTMETRIC ();
- public byte otmFiller;
- /** @field accessor=otmPanoseNumber.bFamilyType */
+ public byte otmFiller;
+ /** @field accessor=otmPanoseNumber.bFamilyType */
public byte otmPanoseNumber_bFamilyType;
- /** @field accessor=otmPanoseNumber.bSerifStyle */
+ /** @field accessor=otmPanoseNumber.bSerifStyle */
public byte otmPanoseNumber_bSerifStyle;
- /** @field accessor=otmPanoseNumber.bWeight */
+ /** @field accessor=otmPanoseNumber.bWeight */
public byte otmPanoseNumber_bWeight;
- /** @field accessor=otmPanoseNumber.bProportion */
+ /** @field accessor=otmPanoseNumber.bProportion */
public byte otmPanoseNumber_bProportion;
- /** @field accessor=otmPanoseNumber.bContrast */
+ /** @field accessor=otmPanoseNumber.bContrast */
public byte otmPanoseNumber_bContrast;
- /** @field accessor=otmPanoseNumber.bStrokeVariation */
+ /** @field accessor=otmPanoseNumber.bStrokeVariation */
public byte otmPanoseNumber_bStrokeVariation;
- /** @field accessor=otmPanoseNumber.bArmStyle */
+ /** @field accessor=otmPanoseNumber.bArmStyle */
public byte otmPanoseNumber_bArmStyle;
- /** @field accessor=otmPanoseNumber.bLetterform */
+ /** @field accessor=otmPanoseNumber.bLetterform */
public byte otmPanoseNumber_bLetterform;
- /** @field accessor=otmPanoseNumber.bMidline */
+ /** @field accessor=otmPanoseNumber.bMidline */
public byte otmPanoseNumber_bMidline;
- /** @field accessor=otmPanoseNumber.bXHeight */
+ /** @field accessor=otmPanoseNumber.bXHeight */
public byte otmPanoseNumber_bXHeight;
- public int otmfsSelection;
- public int otmfsType;
- public int otmsCharSlopeRise;
- public int otmsCharSlopeRun;
- public int otmItalicAngle;
- public int otmEMSquare;
- public int otmAscent;
- public int otmDescent;
- public int otmLineGap;
- public int otmsCapEmHeight;
- public int otmsXHeight;
+ public int otmfsSelection;
+ public int otmfsType;
+ public int otmsCharSlopeRise;
+ public int otmsCharSlopeRun;
+ public int otmItalicAngle;
+ public int otmEMSquare;
+ public int otmAscent;
+ public int otmDescent;
+ public int otmLineGap;
+ public int otmsCapEmHeight;
+ public int otmsXHeight;
public RECT otmrcFontBox = new RECT();
- public int otmMacAscent;
- public int otmMacDescent;
- public int otmMacLineGap;
- public int otmusMinimumPPEM;
+ public int otmMacAscent;
+ public int otmMacDescent;
+ public int otmMacLineGap;
+ public int otmusMinimumPPEM;
public POINT otmptSubscriptSize = new POINT();
public POINT otmptSubscriptOffset = new POINT();
public POINT otmptSuperscriptSize = new POINT();
public POINT otmptSuperscriptOffset = new POINT();
- public int otmsStrikeoutSize;
- public int otmsStrikeoutPosition;
- public int otmsUnderscoreSize;
- public int otmsUnderscorePosition;
- /** @field cast=(PSTR) */
+ public int otmsStrikeoutSize;
+ public int otmsStrikeoutPosition;
+ public int otmsUnderscoreSize;
+ public int otmsUnderscorePosition;
+ /** @field cast=(PSTR) */
public long /*int*/ otmpFamilyName;
- /** @field cast=(PSTR) */
+ /** @field cast=(PSTR) */
public long /*int*/ otmpFaceName;
- /** @field cast=(PSTR) */
+ /** @field cast=(PSTR) */
public long /*int*/ otmpStyleName;
- /** @field cast=(PSTR) */
+ /** @field cast=(PSTR) */
public long /*int*/ otmpFullName;
public static final int sizeof = OS.OUTLINETEXTMETRIC_sizeof ();
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/TVINSERTSTRUCT.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/TVINSERTSTRUCT.java
index e79561172f..92e1875b7d 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/TVINSERTSTRUCT.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/TVINSERTSTRUCT.java
@@ -29,11 +29,11 @@ public class TVINSERTSTRUCT {
public int stateMask;
/** @field accessor=item.pszText,cast=(LPTSTR) */
public long /*int*/ pszText;
- /** @field accessor=item.cchTextMax */
+ /** @field accessor=item.cchTextMax */
public int cchTextMax;
- /** @field accessor=item.iImage */
+ /** @field accessor=item.iImage */
public int iImage;
- /** @field accessor=item.iSelectedImage */
+ /** @field accessor=item.iSelectedImage */
public int iSelectedImage;
/** @field accessor=item.cChildren */
public int cChildren;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/TVITEM.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/TVITEM.java
index 98a90ed790..4bb47a9ada 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/TVITEM.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/TVITEM.java
@@ -21,9 +21,9 @@ public class TVITEM {
public int stateMask;
/** @field cast=(LPTSTR) */
public long /*int*/ pszText;
- public int cchTextMax;
- public int iImage;
- public int iSelectedImage;
+ public int cchTextMax;
+ public int iImage;
+ public int iSelectedImage;
public int cChildren;
public long /*int*/ lParam;
public static final int sizeof = OS.TVITEM_sizeof ();
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Printing/common/org/eclipse/swt/printing/PrinterData.java b/bundles/org.eclipse.swt/Eclipse SWT Printing/common/org/eclipse/swt/printing/PrinterData.java
index 768619dc73..3f8ce5ff10 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Printing/common/org/eclipse/swt/printing/PrinterData.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Printing/common/org/eclipse/swt/printing/PrinterData.java
@@ -175,7 +175,7 @@ public final class PrinterData extends DeviceData {
*/
public static final int LANDSCAPE = 2;
- /**
+ /**
* <code>duplex</code> field value indicating
* single-sided printing.
* <p>
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Printing/gtk/org/eclipse/swt/printing/Printer.java b/bundles/org.eclipse.swt/Eclipse SWT Printing/gtk/org/eclipse/swt/printing/Printer.java
index a5c2a1d122..4062e2d0a6 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Printing/gtk/org/eclipse/swt/printing/Printer.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Printing/gtk/org/eclipse/swt/printing/Printer.java
@@ -112,9 +112,9 @@ static long GtkPrinterFunc_List (long printer, long user_data) {
* Bug in GTK. While performing a gtk_enumerate_printers(), GTK finds all of the
* available printers from each backend and can hang. If a backend requires more
* time to gather printer info, GTK will start an event loop waiting for a done
- * signal before continuing. For the Lpr backend, GTK does not send a done signal
- * which means the event loop never ends. The fix is to check to see if the driver
- * is of type Lpr, and stop the enumeration, which exits the event loop.
+ * signal before continuing. For the Lpr backend, GTK does not send a done signal
+ * which means the event loop never ends. The fix is to check to see if the driver
+ * is of type Lpr, and stop the enumeration, which exits the event loop.
*/
if (printerList[length].driver.equals (GTK_LPR_BACKEND)) return 1;
return 0;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Program/cocoa/org/eclipse/swt/program/Program.java b/bundles/org.eclipse.swt/Eclipse SWT Program/cocoa/org/eclipse/swt/program/Program.java
index 5a7b6bf79c..4fc59fecb8 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Program/cocoa/org/eclipse/swt/program/Program.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Program/cocoa/org/eclipse/swt/program/Program.java
@@ -159,19 +159,19 @@ static Program getProgram(NSBundle bundle) {
NSString fullPath = bundle.bundlePath();
NSString identifier = bundle.bundleIdentifier();
id bundleName = bundle.objectForInfoDictionaryKey(CFBundleDisplayName);
- if (bundleName == null) {
- bundleName = bundle.objectForInfoDictionaryKey(CFBundleName);
- }
- if (bundleName == null) {
- if (fullPath == null) return null;
- bundleName = fullPath.lastPathComponent().stringByDeletingPathExtension();
- }
- NSString name = new NSString(bundleName.id);
- Program program = new Program();
- program.name = name.getString();
- if (fullPath != null) program.fullPath = fullPath.getString();
- program.identifier = identifier != null ? identifier.getString() : "";
- return program;
+ if (bundleName == null) {
+ bundleName = bundle.objectForInfoDictionaryKey(CFBundleName);
+ }
+ if (bundleName == null) {
+ if (fullPath == null) return null;
+ bundleName = fullPath.lastPathComponent().stringByDeletingPathExtension();
+ }
+ NSString name = new NSString(bundleName.id);
+ Program program = new Program();
+ program.name = name.getString();
+ if (fullPath != null) program.fullPath = fullPath.getString();
+ program.identifier = identifier != null ? identifier.getString() : "";
+ return program;
}
/**
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Program/win32/org/eclipse/swt/program/Program.java b/bundles/org.eclipse.swt/Eclipse SWT Program/win32/org/eclipse/swt/program/Program.java
index f0ccac8d63..37e47bf541 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Program/win32/org/eclipse/swt/program/Program.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Program/win32/org/eclipse/swt/program/Program.java
@@ -252,7 +252,7 @@ public static Program [] getPrograms () {
* </ul>
*/
public static boolean launch (String fileName) {
- return launch(fileName, null);
+ return launch(fileName, null);
}
/**
@@ -286,10 +286,10 @@ public static boolean launch (String fileName, String workingDir) {
long /*int*/ lpDirectory = 0;
if (workingDir != null && OS.PathIsExe(lpFile)) {
- TCHAR buffer1 = new TCHAR (0, workingDir, true);
- byteCount = buffer1.length () * TCHAR.sizeof;
- lpDirectory = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
- OS.MoveMemory (lpDirectory, buffer1, byteCount);
+ TCHAR buffer1 = new TCHAR (0, workingDir, true);
+ byteCount = buffer1.length () * TCHAR.sizeof;
+ lpDirectory = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
+ OS.MoveMemory (lpDirectory, buffer1, byteCount);
}
SHELLEXECUTEINFO info = new SHELLEXECUTEINFO ();
diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/cocoa/org/eclipse/swt/browser/WebKit.java b/bundles/org.eclipse.swt/Eclipse SWT WebKit/cocoa/org/eclipse/swt/browser/WebKit.java
index 0c4c7019df..245880ae99 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/cocoa/org/eclipse/swt/browser/WebKit.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT WebKit/cocoa/org/eclipse/swt/browser/WebKit.java
@@ -189,7 +189,7 @@ public void create (Composite parent, int style) {
OS.class_addMethod(delegateClass, OS.sel_createPanelDidEnd, proc5, "@:@@@"); //$NON-NLS-1$
OS.objc_registerClassPair(delegateClass);
- long metaClass = OS.objc_getMetaClass (className);
+ long metaClass = OS.objc_getMetaClass (className);
OS.class_addMethod(metaClass, OS.sel_isSelectorExcludedFromWebScript_, proc3, "@:@"); //$NON-NLS-1$
OS.class_addMethod(metaClass, OS.sel_webScriptNameForSelector_, proc3, "@:@"); //$NON-NLS-1$
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/browser/WebKit.java b/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/browser/WebKit.java
index 84ffab7f63..2c7fc9fd1f 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/browser/WebKit.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/browser/WebKit.java
@@ -309,7 +309,7 @@ class WebKit extends WebBrowser {
if (WEBKIT2) {
if (WebKitGTK.webkit_get_minor_version() >= 16) {
// TODO: webkit_website_data_manager_clear currently does not
- // support more fine grained removals. (I.e, session vs all cookies)
+ // support more fine grained removals. (I.e, session vs all cookies)
long context = WebKitGTK.webkit_web_context_get_default();
long manager = WebKitGTK.webkit_web_context_get_website_data_manager (context);
WebKitGTK.webkit_website_data_manager_clear(manager, WebKitGTK.WEBKIT_WEBSITE_DATA_COOKIES, 0, 0, 0, 0);
@@ -899,7 +899,7 @@ static long Proc (long handle, long arg0, long user_data) {
return 0;
}
- if (WEBKIT2 && user_data == DECIDE_DESTINATION) {
+ if (WEBKIT2 && user_data == DECIDE_DESTINATION) {
// This callback comes from WebKitDownload, so handle is WebKitDownload not webview.
// gboolean user_function (WebKitDownload *download, gchar *suggested_filename, gpointer user_data)
long webKitDownload = handle;
@@ -911,7 +911,7 @@ static long Proc (long handle, long arg0, long user_data) {
// void user_function (WebKitDownload *download, GError *error, gpointer user_data)
long webKitDownload = handle;
return webkit_download_failed(webKitDownload);
- }
+ }
}
{ // Callbacks connected with a WebView.
@@ -1621,11 +1621,11 @@ private boolean webkit_extension_modify_function (long pageId, String function,
@Override
public boolean execute (String script) {
if (WEBKIT2){
- if (!isJavascriptEnabled()) {
- System.err.println("SWT Webkit Warning: Attempting to execute javascript when javascript is dissabled."
- + "Execution has no effect. Script:\n" + script);
- return false;
- }
+ if (!isJavascriptEnabled()) {
+ System.err.println("SWT Webkit Warning: Attempting to execute javascript when javascript is dissabled."
+ + "Execution has no effect. Script:\n" + script);
+ return false;
+ }
try {
Webkit2AsyncToSync.runjavascript(script, this.browser, webView);
} catch (SWTException e) {
@@ -1925,9 +1925,9 @@ public Object evaluate (String script) throws SWTException {
return null; // A litte optimization. Sometimes evaluate() is called with a generated script, where the generated script is sometimes empty.
}
if (WEBKIT2){
- if (!isJavascriptEnabled()) {
- return null;
- }
+ if (!isJavascriptEnabled()) {
+ return null;
+ }
return Webkit2AsyncToSync.evaluate(script, this.browser, webView);
} else {
return super.evaluate(script);
@@ -3015,8 +3015,8 @@ long webkit_close_web_view (long web_view) {
browser.dispose ();
};
if (WEBKIT2) {
- // There is a subtle difference in Webkit1 vs Webkit2, in that on webkit2 this signal doesn't expect a return value.
- // As such, we can safley execute the SWT listeners later to avoid deadlocks. See bug 512001
+ // There is a subtle difference in Webkit1 vs Webkit2, in that on webkit2 this signal doesn't expect a return value.
+ // As such, we can safley execute the SWT listeners later to avoid deadlocks. See bug 512001
browser.getDisplay().asyncExec(fireCloseWindowListeners);
} else {
fireCloseWindowListeners.run();
@@ -3289,71 +3289,71 @@ long webkit_navigation_policy_decision_requested (long web_view, long frame, lon
long webkit_decide_policy (long web_view, long decision, int decision_type, long user_data) {
assert WEBKIT2 : WebKitGTK.Webkit2AssertMsg;
switch (decision_type) {
- case WebKitGTK.WEBKIT_POLICY_DECISION_TYPE_NAVIGATION_ACTION:
- long request = WebKitGTK. webkit_navigation_policy_decision_get_request(decision);
- if (request == 0){
- return 0;
- }
- long uri = WebKitGTK.webkit_uri_request_get_uri (request);
- String url = getString(uri);
- /*
- * If the URI indicates that the page is being rendered from memory
- * (via setText()) then set it to about:blank to be consistent with IE.
- */
- if (url.equals (URI_FILEROOT)) {
- url = ABOUT_BLANK;
- } else {
- int length = URI_FILEROOT.length ();
- if (url.startsWith (URI_FILEROOT) && url.charAt (length) == '#') {
- url = ABOUT_BLANK + url.substring (length);
- }
- }
-
- LocationEvent newEvent = new LocationEvent (browser);
- newEvent.display = browser.getDisplay ();
- newEvent.widget = browser;
- newEvent.location = url;
- newEvent.doit = true;
-
- try {
- nonBlockingEvaluate++;
- if (locationListeners != null) {
- for (int i = 0; i < locationListeners.length; i++) {
- locationListeners[i].changing (newEvent);
- }
- }
- } catch (Exception e) {
- throw e;
- } finally {
- nonBlockingEvaluate--;
- }
-
- if (newEvent.doit && !browser.isDisposed ()) {
- if (jsEnabled != jsEnabledOnNextPage) {
- jsEnabled = jsEnabledOnNextPage;
- webkit_settings_set(WebKitGTK.enable_javascript, jsEnabled ? 1 : 0);
- }
- }
- if(!newEvent.doit){
- WebKitGTK.webkit_policy_decision_ignore (decision);
- }
- break;
- case WebKitGTK.WEBKIT_POLICY_DECISION_TYPE_NEW_WINDOW_ACTION:
- break;
- case WebKitGTK.WEBKIT_POLICY_DECISION_TYPE_RESPONSE:
- long response = WebKitGTK.webkit_response_policy_decision_get_response(decision);
- long mime_type = WebKitGTK.webkit_uri_response_get_mime_type(response);
- boolean canShow = WebKitGTK.webkit_web_view_can_show_mime_type (webView, mime_type) != 0;
- if (!canShow) {
- WebKitGTK.webkit_policy_decision_download (decision);
- return 1;
- }
- break;
- default:
- /* Making no decision results in webkit_policy_decision_use(). */
- return 0;
- }
- return 0;
+ case WebKitGTK.WEBKIT_POLICY_DECISION_TYPE_NAVIGATION_ACTION:
+ long request = WebKitGTK. webkit_navigation_policy_decision_get_request(decision);
+ if (request == 0){
+ return 0;
+ }
+ long uri = WebKitGTK.webkit_uri_request_get_uri (request);
+ String url = getString(uri);
+ /*
+ * If the URI indicates that the page is being rendered from memory
+ * (via setText()) then set it to about:blank to be consistent with IE.
+ */
+ if (url.equals (URI_FILEROOT)) {
+ url = ABOUT_BLANK;
+ } else {
+ int length = URI_FILEROOT.length ();
+ if (url.startsWith (URI_FILEROOT) && url.charAt (length) == '#') {
+ url = ABOUT_BLANK + url.substring (length);
+ }
+ }
+
+ LocationEvent newEvent = new LocationEvent (browser);
+ newEvent.display = browser.getDisplay ();
+ newEvent.widget = browser;
+ newEvent.location = url;
+ newEvent.doit = true;
+
+ try {
+ nonBlockingEvaluate++;
+ if (locationListeners != null) {
+ for (int i = 0; i < locationListeners.length; i++) {
+ locationListeners[i].changing (newEvent);
+ }
+ }
+ } catch (Exception e) {
+ throw e;
+ } finally {
+ nonBlockingEvaluate--;
+ }
+
+ if (newEvent.doit && !browser.isDisposed ()) {
+ if (jsEnabled != jsEnabledOnNextPage) {
+ jsEnabled = jsEnabledOnNextPage;
+ webkit_settings_set(WebKitGTK.enable_javascript, jsEnabled ? 1 : 0);
+ }
+ }
+ if(!newEvent.doit){
+ WebKitGTK.webkit_policy_decision_ignore (decision);
+ }
+ break;
+ case WebKitGTK.WEBKIT_POLICY_DECISION_TYPE_NEW_WINDOW_ACTION:
+ break;
+ case WebKitGTK.WEBKIT_POLICY_DECISION_TYPE_RESPONSE:
+ long response = WebKitGTK.webkit_response_policy_decision_get_response(decision);
+ long mime_type = WebKitGTK.webkit_uri_response_get_mime_type(response);
+ boolean canShow = WebKitGTK.webkit_web_view_can_show_mime_type (webView, mime_type) != 0;
+ if (!canShow) {
+ WebKitGTK.webkit_policy_decision_download (decision);
+ return 1;
+ }
+ break;
+ default:
+ /* Making no decision results in webkit_policy_decision_use(). */
+ return 0;
+ }
+ return 0;
}
long webkit_notify_load_status (long web_view, long pspec) {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/internal/webkit/JSClassDefinition.java b/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/internal/webkit/JSClassDefinition.java
index a138b8eb5b..7d56ec5e64 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/internal/webkit/JSClassDefinition.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/internal/webkit/JSClassDefinition.java
@@ -16,38 +16,38 @@ package org.eclipse.swt.internal.webkit;
public class JSClassDefinition {
- public int version;
- public int attributes;
- /** @field cast=(const char*) */
- public long className;
- /** @field cast=(void*) */
- public long parentClass;
- /** @field cast=(const void*) */
- public long staticValues;
- /** @field cast=(const void*) */
- public long staticFunctions;
- /** @field cast=(void*) */
- public long initialize;
- /** @field cast=(void*) */
- public long finalize;
- /** @field cast=(void*) */
- public long hasProperty;
- /** @field cast=(void*) */
- public long getProperty;
- /** @field cast=(void*) */
- public long setProperty;
- /** @field cast=(void*) */
- public long deleteProperty;
- /** @field cast=(void*) */
- public long getPropertyNames;
- /** @field cast=(void*) */
- public long callAsFunction;
- /** @field cast=(void*) */
- public long callAsConstructor;
- /** @field cast=(void*) */
- public long hasInstance;
- /** @field cast=(void*) */
- public long convertToType;
+ public int version;
+ public int attributes;
+ /** @field cast=(const char*) */
+ public long className;
+ /** @field cast=(void*) */
+ public long parentClass;
+ /** @field cast=(const void*) */
+ public long staticValues;
+ /** @field cast=(const void*) */
+ public long staticFunctions;
+ /** @field cast=(void*) */
+ public long initialize;
+ /** @field cast=(void*) */
+ public long finalize;
+ /** @field cast=(void*) */
+ public long hasProperty;
+ /** @field cast=(void*) */
+ public long getProperty;
+ /** @field cast=(void*) */
+ public long setProperty;
+ /** @field cast=(void*) */
+ public long deleteProperty;
+ /** @field cast=(void*) */
+ public long getPropertyNames;
+ /** @field cast=(void*) */
+ public long callAsFunction;
+ /** @field cast=(void*) */
+ public long callAsConstructor;
+ /** @field cast=(void*) */
+ public long hasInstance;
+ /** @field cast=(void*) */
+ public long convertToType;
- public static final int sizeof = WebKitGTK.JSClassDefinition_sizeof();
+ public static final int sizeof = WebKitGTK.JSClassDefinition_sizeof();
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/browser/WebDownloadDelegate.java b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/browser/WebDownloadDelegate.java
index e7799807bc..822938173a 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/browser/WebDownloadDelegate.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/browser/WebDownloadDelegate.java
@@ -130,8 +130,8 @@ int didFinish (long /*int*/ download) {
}
int didReceiveDataOfLength (long /*int*/ download, int length) {
- size += length;
- return COM.S_OK;
+ size += length;
+ return COM.S_OK;
}
int didReceiveResponse (long /*int*/ download, long /*int*/ response) {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/browser/WebFrameLoadDelegate.java b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/browser/WebFrameLoadDelegate.java
index 26ac077c77..f15cfa6e31 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/browser/WebFrameLoadDelegate.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/browser/WebFrameLoadDelegate.java
@@ -229,7 +229,7 @@ int didCommitLoadForFrame (long /*int*/ webview, long /*int*/ frame) {
int hr = iWebFrame.dataSource (result);
if (hr != COM.S_OK || result[0] == 0) {
return COM.S_OK;
- }
+ }
IWebDataSource dataSource = new IWebDataSource (result[0]);
result[0] = 0;
hr = dataSource.request (result);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/browser/WebKit.java b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/browser/WebKit.java
index 4220949516..829f49f037 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/browser/WebKit.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/browser/WebKit.java
@@ -348,8 +348,8 @@ static String readInstallDir (String keyString) {
}
}
OS.RegCloseKey (phkResult[0]);
- }
- return null;
+ }
+ return null;
}
static String stringFromCFString (long /*int*/ cfString) {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/browser/WebPolicyDelegate.java b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/browser/WebPolicyDelegate.java
index f824bd7ac8..d09a8fd892 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/browser/WebPolicyDelegate.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/browser/WebPolicyDelegate.java
@@ -201,8 +201,8 @@ int unableToImplementPolicyWithError (long /*int*/ webView, long /*int*/ error,
result[0] = 0;
hr = iweberror.localizedDescription (result);
if (hr != COM.S_OK || result[0] == 0) {
- return COM.S_OK;
- }
+ return COM.S_OK;
+ }
String description = WebKit.extractBSTR (result[0]);
COM.SysFreeString (result[0]);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/browser/WebResourceLoadDelegate.java b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/browser/WebResourceLoadDelegate.java
index 47a2e4779a..3fccfff2c2 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/browser/WebResourceLoadDelegate.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/browser/WebResourceLoadDelegate.java
@@ -145,7 +145,7 @@ int didReceiveAuthenticationChallenge (long /*int*/ webView, long /*int*/ identi
hr = authenticationChallenge.protectionSpace (result);
if (hr != COM.S_OK || result[0] == 0) {
return COM.S_OK;
- }
+ }
IWebURLProtectionSpace space = new IWebURLProtectionSpace (result[0]);
String host = null, realm = null;
result[0] = 0;
@@ -162,7 +162,7 @@ int didReceiveAuthenticationChallenge (long /*int*/ webView, long /*int*/ identi
if (hr == COM.S_OK && result[0] != 0) {
realm = WebKit.extractBSTR (result[0]);
COM.SysFreeString (result[0]);
- }
+ }
}
}
space.Release ();
@@ -212,15 +212,15 @@ int identifierForInitialRequest (long /*int*/ webView, long /*int*/ request, lon
long /*int*/[] frame = new long /*int*/[1];
int hr = source.webFrame (frame);
if (hr != COM.S_OK || frame[0] == 0) {
- return COM.S_OK;
- }
+ return COM.S_OK;
+ }
new IWebFrame (frame[0]).Release ();
long /*int*/[] mainFrame = new long /*int*/[1];
IWebView iWebView = new IWebView (webView);
hr = iWebView.mainFrame (mainFrame);
if (hr != COM.S_OK || mainFrame[0] == 0) {
- return COM.S_OK;
- }
+ return COM.S_OK;
+ }
new IWebFrame (mainFrame[0]).Release ();
if (frame[0] == mainFrame[0]) {
long /*int*/ ptr = C.malloc (8);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/JSClassDefinition.java b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/JSClassDefinition.java
index 057e9af2f1..dbfea019ee 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/JSClassDefinition.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/JSClassDefinition.java
@@ -16,39 +16,39 @@ package org.eclipse.swt.internal.webkit;
/** @jniclass flags=cpp */
public class JSClassDefinition {
- public int version;
- /** @field cast=(JSClassAttributes) */
- public int attributes;
- /** @field cast=(const char*) */
- public long /*int*/ className;
- /** @field cast=(JSClassRef) */
- public long /*int*/ parentClass;
- /** @field cast=(const JSStaticValue*) */
- public long /*int*/ staticValues;
- /** @field cast=(const JSStaticFunction*) */
- public long /*int*/ staticFunctions;
- /** @field cast=(JSObjectInitializeCallback) */
- public long /*int*/ initialize;
- /** @field cast=(JSObjectFinalizeCallback) */
- public long /*int*/ finalize;
- /** @field cast=(JSObjectHasPropertyCallback) */
- public long /*int*/ hasProperty;
- /** @field cast=(JSObjectGetPropertyCallback) */
- public long /*int*/ getProperty;
- /** @field cast=(JSObjectSetPropertyCallback) */
- public long /*int*/ setProperty;
- /** @field cast=(JSObjectDeletePropertyCallback) */
- public long /*int*/ deleteProperty;
- /** @field cast=(JSObjectGetPropertyNamesCallback) */
- public long /*int*/ getPropertyNames;
- /** @field cast=(JSObjectCallAsFunctionCallback) */
- public long /*int*/ callAsFunction;
- /** @field cast=(JSObjectCallAsConstructorCallback) */
- public long /*int*/ callAsConstructor;
- /** @field cast=(JSObjectHasInstanceCallback) */
- public long /*int*/ hasInstance;
- /** @field cast=(JSObjectConvertToTypeCallback) */
- public long /*int*/ convertToType;
+ public int version;
+ /** @field cast=(JSClassAttributes) */
+ public int attributes;
+ /** @field cast=(const char*) */
+ public long /*int*/ className;
+ /** @field cast=(JSClassRef) */
+ public long /*int*/ parentClass;
+ /** @field cast=(const JSStaticValue*) */
+ public long /*int*/ staticValues;
+ /** @field cast=(const JSStaticFunction*) */
+ public long /*int*/ staticFunctions;
+ /** @field cast=(JSObjectInitializeCallback) */
+ public long /*int*/ initialize;
+ /** @field cast=(JSObjectFinalizeCallback) */
+ public long /*int*/ finalize;
+ /** @field cast=(JSObjectHasPropertyCallback) */
+ public long /*int*/ hasProperty;
+ /** @field cast=(JSObjectGetPropertyCallback) */
+ public long /*int*/ getProperty;
+ /** @field cast=(JSObjectSetPropertyCallback) */
+ public long /*int*/ setProperty;
+ /** @field cast=(JSObjectDeletePropertyCallback) */
+ public long /*int*/ deleteProperty;
+ /** @field cast=(JSObjectGetPropertyNamesCallback) */
+ public long /*int*/ getPropertyNames;
+ /** @field cast=(JSObjectCallAsFunctionCallback) */
+ public long /*int*/ callAsFunction;
+ /** @field cast=(JSObjectCallAsConstructorCallback) */
+ public long /*int*/ callAsConstructor;
+ /** @field cast=(JSObjectHasInstanceCallback) */
+ public long /*int*/ hasInstance;
+ /** @field cast=(JSObjectConvertToTypeCallback) */
+ public long /*int*/ convertToType;
- public static final int sizeof = WebKit_win32.JSClassDefinition_sizeof();
+ public static final int sizeof = WebKit_win32.JSClassDefinition_sizeof();
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/GC.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/GC.java
index f5587787fc..cd4a279669 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/GC.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/GC.java
@@ -532,7 +532,7 @@ public void copyArea(Image image, int x, int y) {
destRect.width = destWidth;
destRect.height = destHeight;
data.image.handle.drawInRect(destRect, srcRect, OS.NSCompositeCopy, 1);
- NSGraphicsContext.static_restoreGraphicsState();
+ NSGraphicsContext.static_restoreGraphicsState();
return;
}
if (data.view != null) {
@@ -631,10 +631,10 @@ void copyArea (Image image, int x, int y, long srcImage) {
long context = OS.CGBitmapContextCreate(data, width, height, bpc, bpr, colorspace, alphaInfo);
OS.CGColorSpaceRelease(colorspace);
if (context != 0) {
- CGRect rect = new CGRect();
- rect.origin.x = -x;
- rect.origin.y = y;
- rect.size.width = OS.CGImageGetWidth(srcImage);
+ CGRect rect = new CGRect();
+ rect.origin.x = -x;
+ rect.origin.y = y;
+ rect.size.width = OS.CGImageGetWidth(srcImage);
rect.size.height = OS.CGImageGetHeight(srcImage);
OS.CGContextTranslateCTM(context, 0, -(rect.size.height - height));
OS.CGContextDrawImage(context, rect, srcImage);
@@ -689,7 +689,7 @@ public void copyArea(int srcX, int srcY, int width, int height, int destX, int d
if (image != null) {
NSImage imageHandle = image.handle;
NSSize size = imageHandle.size();
- int imgHeight = (int)size.height;
+ int imgHeight = (int)size.height;
handle.saveGraphicsState();
NSAffineTransform transform = NSAffineTransform.transform();
transform.scaleXBy(1, -1);
@@ -707,7 +707,7 @@ public void copyArea(int srcX, int srcY, int width, int height, int destX, int d
destRect.height = height;
imageHandle.drawInRect(destRect, srcRect, OS.NSCompositeCopy, 1);
handle.restoreGraphicsState();
- return;
+ return;
}
if (data.view != null) {
NSView view = data.view;
@@ -813,16 +813,16 @@ static long createCGPathRef(NSBezierPath nsPath) {
OS.CGPathMoveToPoint(cgPath, 0, pt[0], pt[1]);
break;
case OS.NSLineToBezierPathElement:
- C.memmove(pt, points, NSPoint.sizeof);
- OS.CGPathAddLineToPoint(cgPath, 0, pt[0], pt[1]);
+ C.memmove(pt, points, NSPoint.sizeof);
+ OS.CGPathAddLineToPoint(cgPath, 0, pt[0], pt[1]);
+ break;
+ case OS.NSCurveToBezierPathElement:
+ C.memmove(pt, points, NSPoint.sizeof * 3);
+ OS.CGPathAddCurveToPoint(cgPath, 0, pt[0], pt[1], pt[2], pt[3], pt[4], pt[5]);
+ break;
+ case OS.NSClosePathBezierPathElement:
+ OS.CGPathCloseSubpath(cgPath);
break;
- case OS.NSCurveToBezierPathElement:
- C.memmove(pt, points, NSPoint.sizeof * 3);
- OS.CGPathAddCurveToPoint(cgPath, 0, pt[0], pt[1], pt[2], pt[3], pt[4], pt[5]);
- break;
- case OS.NSClosePathBezierPathElement:
- OS.CGPathCloseSubpath(cgPath);
- break;
}
}
C.free(points);
@@ -1186,19 +1186,19 @@ public void drawImage(Image image, int srcX, int srcY, int srcWidth, int srcHeig
void drawImage(Image srcImage, int srcX, int srcY, int srcWidth, int srcHeight, int destX, int destY, int destWidth, int destHeight, boolean simple) {
NSImage imageHandle = srcImage.handle;
NSSize size = imageHandle.size();
- int imgWidth = (int)size.width;
- int imgHeight = (int)size.height;
- if (simple) {
- srcWidth = destWidth = imgWidth;
- srcHeight = destHeight = imgHeight;
- } else {
- simple = srcX == 0 && srcY == 0 &&
- srcWidth == destWidth && destWidth == imgWidth &&
- srcHeight == destHeight && destHeight == imgHeight;
+ int imgWidth = (int)size.width;
+ int imgHeight = (int)size.height;
+ if (simple) {
+ srcWidth = destWidth = imgWidth;
+ srcHeight = destHeight = imgHeight;
+ } else {
+ simple = srcX == 0 && srcY == 0 &&
+ srcWidth == destWidth && destWidth == imgWidth &&
+ srcHeight == destHeight && destHeight == imgHeight;
if (srcX + srcWidth > imgWidth || srcY + srcHeight > imgHeight) {
SWT.error(SWT.ERROR_INVALID_ARGUMENT);
}
- }
+ }
NSAutoreleasePool pool = checkGC(CLIPPING | TRANSFORM);
try {
if (srcImage.memGC != null) {
@@ -1596,7 +1596,7 @@ public void drawRoundRectangle(int x, int y, int width, int height, int arcWidth
if (handle == null) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
if (arcWidth == 0 || arcHeight == 0) {
drawRectangle(x, y, width, height);
- return;
+ return;
}
NSAutoreleasePool pool = checkGC(DRAW);
try {
@@ -2288,7 +2288,7 @@ public void fillRoundRectangle(int x, int y, int width, int height, int arcWidth
if (handle == null) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
if (arcWidth == 0 || arcHeight == 0) {
fillRectangle(x, y, width, height);
- return;
+ return;
}
NSAutoreleasePool pool = checkGC(FILL);
try {
@@ -3142,7 +3142,7 @@ public boolean isDisposed() {
boolean isIdentity(float[] transform) {
return transform[0] == 1 && transform[1] == 0 && transform[2] == 0
- && transform[3] == 1 && transform[4] == 0 && transform[5] == 0;
+ && transform[3] == 1 && transform[4] == 0 && transform[5] == 0;
}
/**
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/TextLayout.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/TextLayout.java
index 63ca42bfda..4f8f4f7140 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/TextLayout.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/TextLayout.java
@@ -335,9 +335,9 @@ void computeRuns() {
long rangePtr = C.malloc(NSRange.sizeof);
NSRange lineRange = new NSRange();
for (numberOfLines = 0, index = 0; index < numberOfGlyphs; numberOfLines++){
- layoutManager.lineFragmentUsedRectForGlyphAtIndex(index, rangePtr, true);
- OS.memmove(lineRange, rangePtr, NSRange.sizeof);
- index = lineRange.location + lineRange.length;
+ layoutManager.lineFragmentUsedRectForGlyphAtIndex(index, rangePtr, true);
+ OS.memmove(lineRange, rangePtr, NSRange.sizeof);
+ index = lineRange.location + lineRange.length;
}
if (numberOfLines == 0) numberOfLines++;
int[] offsets = new int[numberOfLines + 1];
@@ -345,9 +345,9 @@ void computeRuns() {
for (numberOfLines = 0, index = 0; index < numberOfGlyphs; numberOfLines++){
bounds[numberOfLines] = layoutManager.lineFragmentUsedRectForGlyphAtIndex(index, rangePtr, true);
if (numberOfLines < bounds.length - 1) bounds[numberOfLines].height -= spacing;
- OS.memmove(lineRange, rangePtr, NSRange.sizeof);
- offsets[numberOfLines] = (int)lineRange.location;
- index = lineRange.location + lineRange.length;
+ OS.memmove(lineRange, rangePtr, NSRange.sizeof);
+ offsets[numberOfLines] = (int)lineRange.location;
+ index = lineRange.location + lineRange.length;
}
if (numberOfLines == 0) {
Font font = this.font != null ? this.font : device.systemFont;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Button.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Button.java
index 92217d86ef..61e1db5cb2 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Button.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Button.java
@@ -644,7 +644,7 @@ public boolean getSelection () {
checkWidget ();
if ((style & (SWT.CHECK | SWT.RADIO | SWT.TOGGLE)) == 0) return false;
if ((style & SWT.CHECK) != 0 && grayed) return ((NSButton)view).state() == OS.NSMixedState;
- return ((NSButton)view).state() == OS.NSOnState;
+ return ((NSButton)view).state() == OS.NSOnState;
}
/**
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Canvas.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Canvas.java
index 851ff6b125..db015eb915 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Canvas.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Canvas.java
@@ -182,7 +182,7 @@ void drawWidget (long id, NSGraphicsContext context, NSRect rect) {
Image image = caret.image;
if (image != null) {
NSImage imageHandle = image.handle;
- NSSize size = imageHandle.size();
+ NSSize size = imageHandle.size();
NSImageRep imageRep = ImageUtil.createImageRep(image, size);
if (!imageRep.isKindOfClass(OS.class_NSBitmapImageRep)) return;
NSBitmapImageRep rep = new NSBitmapImageRep(imageRep);
@@ -191,25 +191,25 @@ void drawWidget (long id, NSGraphicsContext context, NSRect rect) {
destRect.origin.y = caret.y;
destRect.size.width = size.width;
destRect.size.height = size.height;
- long data = rep.bitmapData();
+ long data = rep.bitmapData();
long format = rep.bitmapFormat();
- long bpr = rep.bytesPerRow();
+ long bpr = rep.bytesPerRow();
int alphaInfo;
if (rep.hasAlpha()) {
alphaInfo = (format & OS.NSAlphaFirstBitmapFormat) != 0 ? OS.kCGImageAlphaFirst : OS.kCGImageAlphaLast;
} else {
alphaInfo = (format & OS.NSAlphaFirstBitmapFormat) != 0 ? OS.kCGImageAlphaNoneSkipFirst : OS.kCGImageAlphaNoneSkipLast;
}
- long provider = OS.CGDataProviderCreateWithData(0, data, bpr * (int)size.height, 0);
+ long provider = OS.CGDataProviderCreateWithData(0, data, bpr * (int)size.height, 0);
long colorspace = OS.CGColorSpaceCreateDeviceRGB();
long cgImage = OS.CGImageCreate((int)size.width, (int)size.height, rep.bitsPerSample(), rep.bitsPerPixel(), bpr, colorspace, alphaInfo, provider, 0, true, 0);
OS.CGColorSpaceRelease(colorspace);
OS.CGDataProviderRelease(provider);
- OS.CGContextScaleCTM (ctx, 1, -1);
- OS.CGContextTranslateCTM (ctx, 0, -(size.height + 2 * destRect.origin.y));
+ OS.CGContextScaleCTM (ctx, 1, -1);
+ OS.CGContextTranslateCTM (ctx, 0, -(size.height + 2 * destRect.origin.y));
OS.CGContextSetBlendMode (ctx, OS.kCGBlendModeDifference);
OS.CGContextDrawImage (ctx, destRect, cgImage);
- OS.CGImageRelease(cgImage);
+ OS.CGImageRelease(cgImage);
} else {
CGRect drawRect = new CGRect();
drawRect.origin.x = caret.x;
@@ -252,7 +252,7 @@ NSRect firstRectForCharacterRange (long id, long sel, long range) {
*/
public Caret getCaret () {
checkWidget();
- return caret;
+ return caret;
}
/**
@@ -269,7 +269,7 @@ public Caret getCaret () {
*/
public IME getIME () {
checkWidget();
- return ime;
+ return ime;
}
@Override
@@ -305,38 +305,38 @@ NSRange markedRange (long id, long sel) {
@Override
boolean readSelectionFromPasteboard(long id, long sel, long pasteboard) {
- boolean result = false;
- NSPasteboard pboard = new NSPasteboard(pasteboard);
- NSArray availableTypes = pboard.types();
- NSString type;
-
- for (long i = 0; i < supportedPboardTypes.count(); i++) {
- if (result) break;
- type = new NSString(supportedPboardTypes.objectAtIndex(i));
- if (availableTypes.containsObject(type)) {
- result = readSelectionFromPasteboard(pboard, type);
- }
- }
- return result;
+ boolean result = false;
+ NSPasteboard pboard = new NSPasteboard(pasteboard);
+ NSArray availableTypes = pboard.types();
+ NSString type;
+
+ for (long i = 0; i < supportedPboardTypes.count(); i++) {
+ if (result) break;
+ type = new NSString(supportedPboardTypes.objectAtIndex(i));
+ if (availableTypes.containsObject(type)) {
+ result = readSelectionFromPasteboard(pboard, type);
+ }
+ }
+ return result;
}
boolean readSelectionFromPasteboard(NSPasteboard pboard, NSString type) {
- boolean result = false;
- NSString newSelection = null;
- if (type.isEqualToString(OS.NSPasteboardTypeString)) {
- NSString string = pboard.stringForType(OS.NSPasteboardTypeString);
- if (string != null && string.length() > 0) {
- newSelection = string;
- }
- }
+ boolean result = false;
+ NSString newSelection = null;
+ if (type.isEqualToString(OS.NSPasteboardTypeString)) {
+ NSString string = pboard.stringForType(OS.NSPasteboardTypeString);
+ if (string != null && string.length() > 0) {
+ newSelection = string;
+ }
+ }
- if (newSelection != null) {
- Accessible acc = getAccessible();
- acc.internal_accessibilitySetValue_forAttribute(newSelection, OS.NSAccessibilitySelectedTextAttribute, ACC.CHILDID_SELF);
- result = true;
- }
+ if (newSelection != null) {
+ Accessible acc = getAccessible();
+ acc.internal_accessibilitySetValue_forAttribute(newSelection, OS.NSAccessibilitySelectedTextAttribute, ACC.CHILDID_SELF);
+ result = true;
+ }
- return result;
+ return result;
}
@Override
@@ -496,7 +496,7 @@ public void scroll (int destX, int destY, int x, int y, int width, int height, b
}
}
- if (all) {
+ if (all) {
Control [] children = _getChildren ();
for (int i=0; i<children.length; i++) {
Control child = children [i];
@@ -659,26 +659,26 @@ void viewWillMoveToWindow(long id, long sel, long arg0) {
@Override
boolean writeSelectionToPasteboard(long id, long sel, long pasteboardObj, long typesObj) {
- boolean result = false;
- NSPasteboard pboard = new NSPasteboard(pasteboardObj);
- NSArray types = new NSArray(typesObj);
- NSMutableArray typesToDeclare = NSMutableArray.arrayWithCapacity(2);
- NSString type;
-
- for (long i = 0; i < supportedPboardTypes.count(); i++) {
- type = new NSString(supportedPboardTypes.objectAtIndex(i));
- if (types.containsObject(type)) typesToDeclare.addObject(type);
- }
-
- if (typesToDeclare.count() > 0) {
- pboard.declareTypes(typesToDeclare, view);
- for (long i = 0; i < typesToDeclare.count(); i++) {
- type = new NSString(typesToDeclare.objectAtIndex(i));
- if (writeSelectionToPasteboard(pboard, type)) result = true;
- }
- }
-
- return result;
+ boolean result = false;
+ NSPasteboard pboard = new NSPasteboard(pasteboardObj);
+ NSArray types = new NSArray(typesObj);
+ NSMutableArray typesToDeclare = NSMutableArray.arrayWithCapacity(2);
+ NSString type;
+
+ for (long i = 0; i < supportedPboardTypes.count(); i++) {
+ type = new NSString(supportedPboardTypes.objectAtIndex(i));
+ if (types.containsObject(type)) typesToDeclare.addObject(type);
+ }
+
+ if (typesToDeclare.count() > 0) {
+ pboard.declareTypes(typesToDeclare, view);
+ for (long i = 0; i < typesToDeclare.count(); i++) {
+ type = new NSString(typesToDeclare.objectAtIndex(i));
+ if (writeSelectionToPasteboard(pboard, type)) result = true;
+ }
+ }
+
+ return result;
}
boolean writeSelectionToPasteboard(NSPasteboard pboard, NSString type) {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Combo.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Combo.java
index c04bb46b4c..078226bedf 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Combo.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Combo.java
@@ -598,7 +598,7 @@ public void cut () {
@Override
Color defaultBackground () {
- return display.getWidgetColor (SWT.COLOR_LIST_BACKGROUND);
+ return display.getWidgetColor (SWT.COLOR_LIST_BACKGROUND);
}
@Override
@@ -609,7 +609,7 @@ NSFont defaultNSFont() {
@Override
Color defaultForeground () {
- return display.getWidgetColor (SWT.COLOR_LIST_FOREGROUND);
+ return display.getWidgetColor (SWT.COLOR_LIST_FOREGROUND);
}
@Override
@@ -888,7 +888,7 @@ public boolean getListVisible () {
@Override
String getNameText () {
- return getText ();
+ return getText ();
}
@Override
@@ -1042,7 +1042,7 @@ public int getTextHeight () {
*/
public int getTextLimit () {
checkWidget();
- return textLimit;
+ return textLimit;
}
/**
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Control.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Control.java
index cb72b33086..446d378862 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Control.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Control.java
@@ -1257,7 +1257,7 @@ boolean drawGripper (GC gc, int x, int y, int width, int height, boolean vertica
}
boolean drawsBackground() {
- return true;
+ return true;
}
@Override
@@ -1387,8 +1387,8 @@ void fixFocus (Control focusControl) {
shell.setSavedFocus (focusControl);
NSWindow window = view.window();
if (!window.makeFirstResponder(null)) {
- // Force first responder to resign.
- window.endEditingFor(null);
+ // Force first responder to resign.
+ window.endEditingFor(null);
}
}
@@ -1627,7 +1627,7 @@ public Image getBackgroundImage () {
*/
public int getBorderWidth () {
checkWidget();
- return 0;
+ return 0;
}
/**
@@ -3538,10 +3538,10 @@ Touch touchStateFromNSTouch(NSTouch touch) {
display.touchCounter++;
boolean primary = false;
NSPoint normalizedPos = touch.normalizedPosition();
- double normalizedX = normalizedPos.x;
- double normalizedY = 1 - normalizedPos.y;
- if (display.currentTouches().count() == 1) display.primaryIdentifier = identity;
- if (display.primaryIdentifier == identity) primary = true;
+ double normalizedX = normalizedPos.x;
+ double normalizedY = 1 - normalizedPos.y;
+ if (display.currentTouches().count() == 1) display.primaryIdentifier = identity;
+ if (display.primaryIdentifier == identity) primary = true;
NSSize deviceSize = touch.deviceSize();
int deviceX = (int) (normalizedX * deviceSize.width);
int deviceY = (int) (normalizedY * deviceSize.height);
@@ -4538,13 +4538,13 @@ void sort (int [] items) {
for (int gap=length/2; gap>0; gap/=2) {
for (int i=gap; i<length; i++) {
for (int j=i-gap; j>=0; j-=gap) {
- if (items [j] <= items [j + gap]) {
+ if (items [j] <= items [j + gap]) {
int swap = items [j];
items [j] = items [j + gap];
items [j + gap] = swap;
- }
- }
- }
+ }
+ }
+ }
}
}
@@ -4588,7 +4588,7 @@ String tooltipText () {
*/
public Point toControl (int x, int y) {
checkWidget();
- return display.map (null, this, x, y);
+ return display.map (null, this, x, y);
}
/**
@@ -4614,7 +4614,7 @@ public Point toControl (int x, int y) {
public Point toControl (Point point) {
checkWidget();
if (point == null) error (SWT.ERROR_NULL_ARGUMENT);
- return toControl (point.x, point.y);
+ return toControl (point.x, point.y);
}
/**
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Decorations.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Decorations.java
index d889e35811..09220725b2 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Decorations.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Decorations.java
@@ -688,16 +688,16 @@ void sort (Image [] images) {
for (int gap=length/2; gap>0; gap/=2) {
for (int i=gap; i<length; i++) {
for (int j=i-gap; j>=0; j-=gap) {
- if (compare (datas [j], datas [j + gap]) >= 0) {
+ if (compare (datas [j], datas [j + gap]) >= 0) {
Image swap = images [j];
images [j] = images [j + gap];
images [j + gap] = swap;
ImageData swapData = datas [j];
datas [j] = datas [j + gap];
datas [j + gap] = swapData;
- }
- }
- }
+ }
+ }
+ }
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Display.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Display.java
index 5dbf3cf255..cc443d2368 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Display.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Display.java
@@ -3352,35 +3352,35 @@ public boolean post(Event event) {
mouseCursorPosition.y = event.y;
eventRef = OS.CGEventCreateMouseEvent(eventSource, OS.kCGEventMouseMoved, mouseCursorPosition, 0);
} else {
- NSPoint nsCursorPosition = NSEvent.mouseLocation();
- NSRect primaryFrame = getPrimaryFrame();
- mouseCursorPosition.x = nsCursorPosition.x;
- mouseCursorPosition.y = (int) (primaryFrame.height - nsCursorPosition.y);
- int eventType = 0;
- // SWT buttons are 1-based: 1,2,3,4,5; CG buttons are 0 based: 0,2,1,3,4
- int cgButton;
- switch (event.button) {
- case 1:
- eventType = (event.type == SWT.MouseDown ? OS.kCGEventLeftMouseDown : OS.kCGEventLeftMouseUp);
- cgButton = 0;
- break;
- case 2:
- eventType = (event.type == SWT.MouseDown ? OS.kCGEventOtherMouseDown : OS.kCGEventOtherMouseUp);
- cgButton = 2;
- break;
- case 3:
- eventType = (event.type == SWT.MouseDown ? OS.kCGEventRightMouseDown : OS.kCGEventRightMouseUp);
- cgButton = 1;
- break;
- default:
- eventType = (event.type == SWT.MouseDown ? OS.kCGEventOtherMouseDown : OS.kCGEventOtherMouseUp);
- cgButton = event.button - 1;
- break;
- }
-
- if (cgButton >= 0) {
- eventRef = OS.CGEventCreateMouseEvent(eventSource, eventType, mouseCursorPosition, cgButton);
- }
+ NSPoint nsCursorPosition = NSEvent.mouseLocation();
+ NSRect primaryFrame = getPrimaryFrame();
+ mouseCursorPosition.x = nsCursorPosition.x;
+ mouseCursorPosition.y = (int) (primaryFrame.height - nsCursorPosition.y);
+ int eventType = 0;
+ // SWT buttons are 1-based: 1,2,3,4,5; CG buttons are 0 based: 0,2,1,3,4
+ int cgButton;
+ switch (event.button) {
+ case 1:
+ eventType = (event.type == SWT.MouseDown ? OS.kCGEventLeftMouseDown : OS.kCGEventLeftMouseUp);
+ cgButton = 0;
+ break;
+ case 2:
+ eventType = (event.type == SWT.MouseDown ? OS.kCGEventOtherMouseDown : OS.kCGEventOtherMouseUp);
+ cgButton = 2;
+ break;
+ case 3:
+ eventType = (event.type == SWT.MouseDown ? OS.kCGEventRightMouseDown : OS.kCGEventRightMouseUp);
+ cgButton = 1;
+ break;
+ default:
+ eventType = (event.type == SWT.MouseDown ? OS.kCGEventOtherMouseDown : OS.kCGEventOtherMouseUp);
+ cgButton = event.button - 1;
+ break;
+ }
+
+ if (cgButton >= 0) {
+ eventRef = OS.CGEventCreateMouseEvent(eventSource, eventType, mouseCursorPosition, cgButton);
+ }
}
break;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/List.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/List.java
index d5c387e2f1..17a127f42a 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/List.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/List.java
@@ -533,7 +533,7 @@ public int getItemHeight () {
*/
public String [] getItems () {
checkWidget();
- String [] result = new String [itemCount];
+ String [] result = new String [itemCount];
System.arraycopy (items, 0, result, 0, itemCount);
return result;
}
@@ -662,9 +662,9 @@ public int getTopIndex () {
NSPoint point = new NSPoint();
point.x = rect.x;
point.y = rect.y;
- int result = (int)((NSTableView)view).rowAtPoint(point);
- if (result == -1) result = 0;
- return result;
+ int result = (int)((NSTableView)view).rowAtPoint(point);
+ if (result == -1) result = 0;
+ return result;
}
/**
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Menu.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Menu.java
index fe5781d32d..1b13ad200e 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Menu.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Menu.java
@@ -1116,7 +1116,7 @@ public void setLocation (Point location) {
* @since 3.7
*/
public void setOrientation (int orientation) {
- checkWidget ();
+ checkWidget ();
}
/**
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/MenuItem.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/MenuItem.java
index f1cc69ec6a..2e80ce17df 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/MenuItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/MenuItem.java
@@ -366,7 +366,7 @@ public Menu getParent () {
public boolean getSelection () {
checkWidget ();
if ((style & (SWT.CHECK | SWT.RADIO)) == 0) return false;
- return nsItem.state() == OS.NSOnState;
+ return nsItem.state() == OS.NSOnState;
}
/**
@@ -894,12 +894,12 @@ public void setToolTipText (String toolTip) {
}
if (toolTip == null || toolTip.trim().length() == 0 || toolTip.equals(toolTipText)) return;
- toolTipText = toolTip;
+ toolTipText = toolTip;
- char[] chars = new char [toolTipText.length ()];
- toolTipText.getChars (0, chars.length, chars, 0);
- int length = fixMnemonic (chars);
- nsItem.setToolTip (NSString.stringWithCharacters (chars, length));
+ char[] chars = new char [toolTipText.length ()];
+ toolTipText.getChars (0, chars.length, chars, 0);
+ int length = fixMnemonic (chars);
+ nsItem.setToolTip (NSString.stringWithCharacters (chars, length));
}
void updateText () {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ProgressBar.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ProgressBar.java
index 14cb1b77c0..39b6836c02 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ProgressBar.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ProgressBar.java
@@ -188,7 +188,7 @@ public int getMinimum () {
*/
public int getSelection () {
checkWidget();
- return (int)((NSProgressIndicator)view).doubleValue();
+ return (int)((NSProgressIndicator)view).doubleValue();
}
/**
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Scale.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Scale.java
index 67776cf140..7e5d6cef36 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Scale.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Scale.java
@@ -216,7 +216,7 @@ public int getMinimum () {
*/
public int getPageIncrement () {
checkWidget();
- return pageIncrement;
+ return pageIncrement;
}
/**
@@ -231,7 +231,7 @@ public int getPageIncrement () {
*/
public int getSelection () {
checkWidget();
- return (int)((NSSlider)view).doubleValue();
+ return (int)((NSSlider)view).doubleValue();
}
@Override
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ScrollBar.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ScrollBar.java
index 05ad18ed1c..ebb4437e14 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ScrollBar.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ScrollBar.java
@@ -188,7 +188,7 @@ public boolean getEnabled () {
*/
public int getIncrement () {
checkWidget();
- return increment;
+ return increment;
}
/**
@@ -235,7 +235,7 @@ public int getMinimum () {
*/
public int getPageIncrement () {
checkWidget();
- return pageIncrement;
+ return pageIncrement;
}
/**
@@ -267,7 +267,7 @@ public int getSelection () {
checkWidget();
NSScroller widget = (NSScroller)view;
double value = widget.doubleValue();
- return (int)(0.5f + ((maximum - thumb - minimum) * value + minimum));
+ return (int)(0.5f + ((maximum - thumb - minimum) * value + minimum));
}
/**
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Scrollable.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Scrollable.java
index e220de04fc..35acca13c6 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Scrollable.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Scrollable.java
@@ -36,7 +36,7 @@ import org.eclipse.swt.internal.cocoa.*;
* @noextend This class is not intended to be subclassed by clients.
*/
public abstract class Scrollable extends Control {
- NSScrollView scrollView;
+ NSScrollView scrollView;
ScrollBar horizontalBar, verticalBar;
Scrollable () {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Shell.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Shell.java
index 1b0caf89bf..f0aabd4002 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Shell.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Shell.java
@@ -668,9 +668,9 @@ void createHandle () {
} else {
styleMask |= OS.NSUtilityWindowMask | OS.NSNonactivatingPanelMask;
}
- } else {
- window = (NSWindow) new SWTWindow().alloc ();
- }
+ } else {
+ window = (NSWindow) new SWTWindow().alloc ();
+ }
if ((style & SWT.NO_TRIM) == 0) {
if ((style & SWT.TITLE) != 0) styleMask |= OS.NSTitledWindowMask;
if ((style & SWT.CLOSE) != 0) styleMask |= OS.NSClosableWindowMask;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Slider.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Slider.java
index e1014978cb..fda67becd0 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Slider.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Slider.java
@@ -225,7 +225,7 @@ void enableWidget(boolean enabled) {
*/
public int getIncrement () {
checkWidget();
- return increment;
+ return increment;
}
/**
@@ -255,7 +255,7 @@ public int getMaximum () {
*/
public int getMinimum () {
checkWidget();
- return minimum;
+ return minimum;
}
/**
@@ -272,7 +272,7 @@ public int getMinimum () {
*/
public int getPageIncrement () {
checkWidget();
- return pageIncrement;
+ return pageIncrement;
}
/**
@@ -289,7 +289,7 @@ public int getSelection () {
checkWidget();
NSScroller widget = (NSScroller)view;
double value = widget.doubleValue();
- return (int)(0.5f + ((maximum - thumb - minimum) * value + minimum));
+ return (int)(0.5f + ((maximum - thumb - minimum) * value + minimum));
}
/**
@@ -304,7 +304,7 @@ public int getSelection () {
*/
public int getThumb () {
checkWidget();
- return thumb;
+ return thumb;
}
/**
@@ -338,25 +338,25 @@ void sendSelection () {
int hitPart = (int)((NSScroller)view).hitPart();
int value = getSelection ();
switch (hitPart) {
- case OS.NSScrollerDecrementLine:
- event.detail = SWT.ARROW_UP;
- value -= increment;
- break;
- case OS.NSScrollerDecrementPage:
- value -= pageIncrement;
- event.detail = SWT.PAGE_UP;
- break;
- case OS.NSScrollerIncrementLine:
- value += increment;
- event.detail = SWT.ARROW_DOWN;
- break;
- case OS.NSScrollerIncrementPage:
- value += pageIncrement;
- event.detail = SWT.PAGE_DOWN;
- break;
- case OS.NSScrollerKnob:
+ case OS.NSScrollerDecrementLine:
+ event.detail = SWT.ARROW_UP;
+ value -= increment;
+ break;
+ case OS.NSScrollerDecrementPage:
+ value -= pageIncrement;
+ event.detail = SWT.PAGE_UP;
+ break;
+ case OS.NSScrollerIncrementLine:
+ value += increment;
+ event.detail = SWT.ARROW_DOWN;
+ break;
+ case OS.NSScrollerIncrementPage:
+ value += pageIncrement;
+ event.detail = SWT.PAGE_DOWN;
+ break;
+ case OS.NSScrollerKnob:
event.detail = SWT.DRAG;
- break;
+ break;
}
if (event.detail != SWT.DRAG) {
setSelection(value);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Spinner.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Spinner.java
index b5ed9d4f6d..23d1b70abf 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Spinner.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Spinner.java
@@ -364,7 +364,7 @@ void drawInteriorWithFrame_inView(long id, long sel, NSRect cellFrame, long view
Image image = control.backgroundImage;
if (image != null && !image.isDisposed()) {
NSGraphicsContext context = NSGraphicsContext.currentContext();
- control.fillBackground (view, context, cellFrame, -1);
+ control.fillBackground (view, context, cellFrame, -1);
}
super.drawInteriorWithFrame_inView(id, sel, cellFrame, viewid);
}
@@ -551,7 +551,7 @@ public String getText () {
*/
public int getTextLimit () {
checkWidget();
- return textLimit;
+ return textLimit;
}
@Override
@@ -725,39 +725,39 @@ boolean sendKeyEvent (NSEvent nsEvent, int type) {
return true;
}
- case 116: delta = pageIncrement; break; /* Page Up */
- case 121: delta = -pageIncrement; break; /* Page Down */
- case 125: delta = -getIncrement(); break; /* Down arrow */
- case 126: delta = getIncrement(); break; /* Up arrow */
- }
-
- if (delta != 0) {
- boolean [] parseFail = new boolean [1];
- int value = getSelectionText (parseFail);
- if (parseFail [0]) {
- value = (int)buttonView.doubleValue();
- }
- int newValue = value + delta;
- int max = (int)buttonView.maxValue();
- int min = (int)buttonView.minValue();
- if ((style & SWT.WRAP) != 0) {
- if (newValue > max) newValue = min;
- if (newValue < min) newValue = max;
- }
- newValue = Math.min (Math.max (min, newValue), max);
- if (value != newValue) setSelection (newValue, true, true, true);
- // Prevent the arrow or page up/down from being handled by the text field.
- result = false;
- } else {
- boolean [] parseFail = new boolean [1];
- int value = getSelectionText (parseFail);
- if (!parseFail [0]) {
- int pos = (int)buttonView.doubleValue();
- if (pos != value) setSelection (value, true, false, true);
- }
- }
-
- return result;
+ case 116: delta = pageIncrement; break; /* Page Up */
+ case 121: delta = -pageIncrement; break; /* Page Down */
+ case 125: delta = -getIncrement(); break; /* Down arrow */
+ case 126: delta = getIncrement(); break; /* Up arrow */
+ }
+
+ if (delta != 0) {
+ boolean [] parseFail = new boolean [1];
+ int value = getSelectionText (parseFail);
+ if (parseFail [0]) {
+ value = (int)buttonView.doubleValue();
+ }
+ int newValue = value + delta;
+ int max = (int)buttonView.maxValue();
+ int min = (int)buttonView.minValue();
+ if ((style & SWT.WRAP) != 0) {
+ if (newValue > max) newValue = min;
+ if (newValue < min) newValue = max;
+ }
+ newValue = Math.min (Math.max (min, newValue), max);
+ if (value != newValue) setSelection (newValue, true, true, true);
+ // Prevent the arrow or page up/down from being handled by the text field.
+ result = false;
+ } else {
+ boolean [] parseFail = new boolean [1];
+ int value = getSelectionText (parseFail);
+ if (!parseFail [0]) {
+ int pos = (int)buttonView.doubleValue();
+ if (pos != value) setSelection (value, true, false, true);
+ }
+ }
+
+ return result;
}
@Override
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Table.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Table.java
index fc32bd96be..a59833a48d 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Table.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Table.java
@@ -2084,7 +2084,7 @@ void mouseDownSuper(long id, long sel, long theEvent) {
NSRect checkRect = cell.imageRectForBounds(widget.frameOfCellAtColumn(column, row));
if (OS.NSPointInRect(pt, checkRect)) {
check = preventSelect = true;
- }
+ }
}
}
if (!check && row != -1 && (nsEvent.modifierFlags() & OS.NSDeviceIndependentModifierFlagsMask) == 0 && nsEvent.clickCount() == 1) {
@@ -2796,7 +2796,7 @@ public void setRedraw (boolean redraw) {
checkWidget ();
super.setRedraw (redraw);
if (redraw && drawCount == 0) {
- /* Resize the item array to match the item count */
+ /* Resize the item array to match the item count */
if (items.length > 4 && items.length - itemCount > 3) {
int length = Math.max (4, (itemCount + 3) / 4 * 4);
TableItem [] newItems = new TableItem [length];
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TableColumn.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TableColumn.java
index 4f67ed287f..e2b84453f9 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TableColumn.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TableColumn.java
@@ -368,9 +368,9 @@ void drawInteriorWithFrame_inView (long id, long sel, NSRect cellRect, long view
if (isFlipped) {
context.saveGraphicsState ();
NSAffineTransform transform = NSAffineTransform.transform ();
- transform.scaleXBy (1, -1);
- transform.translateXBy (0, -(destRect.height + 2 * destRect.y));
- transform.concat ();
+ transform.scaleXBy (1, -1);
+ transform.translateXBy (0, -(destRect.height + 2 * destRect.y));
+ transform.concat ();
}
NSRect sourceRect = new NSRect ();
sourceRect.width = destRect.width;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Text.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Text.java
index 3e092ac31b..7014f7114b 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Text.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Text.java
@@ -720,7 +720,7 @@ void drawInteriorWithFrame_inView (long id, long sel, NSRect cellFrame, long vie
if (image != null && !image.isDisposed()) {
NSGraphicsContext context = NSGraphicsContext.currentContext();
- control.fillBackground (view, context, cellFrame, -1);
+ control.fillBackground (view, context, cellFrame, -1);
} else if ((style & SWT.SEARCH) != 0) {
// If no background image is set, call custom paint code for search field
drawInteriorWithFrame_inView_searchfield(id, sel, cellFrame, viewid);
@@ -836,7 +836,7 @@ Cursor findCursor () {
public int getCaretLineNumber () {
checkWidget ();
if ((style & SWT.SINGLE) != 0) return 0;
- return (getTopPixel () + getCaretLocation ().y) / getLineHeight ();
+ return (getTopPixel () + getCaretLocation ().y) / getLineHeight ();
}
@Override
@@ -936,7 +936,7 @@ public int getCharCount () {
*/
public boolean getDoubleClickEnabled () {
checkWidget ();
- return doubleClick;
+ return doubleClick;
}
/**
@@ -1375,7 +1375,7 @@ public char[] getTextChars () {
*/
public int getTextLimit () {
checkWidget ();
- return textLimit;
+ return textLimit;
}
/**
@@ -1395,7 +1395,7 @@ public int getTextLimit () {
public int getTopIndex () {
checkWidget ();
if ((style & SWT.SINGLE) != 0) return 0;
- return getTopPixel () / getLineHeight ();
+ return getTopPixel () / getLineHeight ();
}
/**
@@ -2380,7 +2380,7 @@ boolean shouldChangeTextInRange_replacementString(long id, long sel, long affect
}
if ((style & SWT.SINGLE) != 0) {
if (text != newText || echoCharacter != '\0') {
- //handle backspace and delete
+ //handle backspace and delete
if (range.length == 1) {
NSText editor = new NSText(id);
editor.setSelectedRange (range);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ToolBar.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ToolBar.java
index 70cd65b720..699a0d64e2 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ToolBar.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ToolBar.java
@@ -278,13 +278,13 @@ void createItem (ToolItem item, int index) {
System.arraycopy (items, 0, newItems, 0, items.length);
items = newItems;
}
- item.createWidget();
+ item.createWidget();
System.arraycopy (items, index, items, index + 1, itemCount++ - index);
items [index] = item;
if (nsToolbar != null) {
- nsToolbar.insertItemWithItemIdentifier(item.getItemID(), index);
+ nsToolbar.insertItemWithItemIdentifier(item.getItemID(), index);
} else {
- view.addSubview(item.view);
+ view.addSubview(item.view);
}
relayout ();
}
@@ -671,11 +671,11 @@ void releaseChildren (boolean destroy) {
@Override
void releaseHandle () {
- super.releaseHandle ();
+ super.releaseHandle ();
- if (nsToolbar != null) {
- nsToolbar.release();
- nsToolbar = null;
+ if (nsToolbar != null) {
+ nsToolbar.release();
+ nsToolbar = null;
}
if (accessibilityAttributes != null) accessibilityAttributes.release();
@@ -768,8 +768,8 @@ public void setRedraw (boolean redraw) {
@Override
public void setVisible(boolean visible) {
- if (nsToolbar != null) nsToolbar.setVisible(visible);
- super.setVisible(visible);
+ if (nsToolbar != null) nsToolbar.setVisible(visible);
+ super.setVisible(visible);
}
@Override
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ToolItem.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ToolItem.java
index ab80291ad7..b5df4a903b 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ToolItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ToolItem.java
@@ -459,11 +459,11 @@ void drawImageWithFrameInView (long id, long sel, long image, NSRect rect, long
@Override
NSRect drawTitleWithFrameInView (long id, long sel, long title, NSRect titleRect, long view) {
- boolean hiliteShadow = new NSButtonCell(id).isHighlighted() && text.length() > 0 && image == null;
+ boolean hiliteShadow = new NSButtonCell(id).isHighlighted() && text.length() > 0 && image == null;
- // An unbordered cell doesn't draw any highlighting when pushed or selected, so we have to do it here.
- if (hiliteShadow) {
- NSColor transWhiteColor = NSColor.colorWithDeviceRed(1.0f, 1.0f, 1.0f, .8f);
+ // An unbordered cell doesn't draw any highlighting when pushed or selected, so we have to do it here.
+ if (hiliteShadow) {
+ NSColor transWhiteColor = NSColor.colorWithDeviceRed(1.0f, 1.0f, 1.0f, .8f);
NSAttributedString attribStr = new NSAttributedString(title);
NSMutableAttributedString tmpString = new NSMutableAttributedString(attribStr.mutableCopy());
NSRange range = new NSRange();
@@ -472,7 +472,7 @@ NSRect drawTitleWithFrameInView (long id, long sel, long title, NSRect titleRect
tmpString.addAttribute(OS.NSForegroundColorAttributeName, transWhiteColor, range);
tmpString.autorelease();
title = tmpString.id;
- }
+ }
return super.drawTitleWithFrameInView(id, sel, title, titleRect, view);
}
@@ -873,12 +873,12 @@ void releaseHandle () {
if (button != null) button.release ();
view = button = null;
if (nsItem != null) {
- nsItem.release();
- nsItem = null;
+ nsItem.release();
+ nsItem = null;
}
if (id != null) {
- id.release();
- id = null;
+ id.release();
+ id = null;
}
if (nsMenuRep != null) {
nsMenuRep.release();
@@ -976,12 +976,12 @@ public void setControl (Control control) {
if (this.control == control) return;
if (parent.nsToolbar == null) {
- NSBox widget = (NSBox)view;
- if (control == null) {
- widget.setBoxType(OS.NSBoxSeparator);
- } else {
- widget.setBoxType(OS.NSBoxCustom);
- }
+ NSBox widget = (NSBox)view;
+ if (control == null) {
+ widget.setBoxType(OS.NSBoxSeparator);
+ } else {
+ widget.setBoxType(OS.NSBoxCustom);
+ }
} else {
nsItem.setMenuFormRepresentation(control == null ? nsMenuRep : NSMenuItem.separatorItem());
}
@@ -1211,14 +1211,14 @@ public void setToolTipText (String string) {
checkWidget();
if (string == null && toolTipText == null) return;
if (string != null && string.equals (toolTipText)) return;
- toolTipText = string;
+ toolTipText = string;
if (parent.nsToolbar != null) {
- char[] chars = new char [toolTipText.length ()];
- string.getChars (0, chars.length, chars, 0);
- int length = fixMnemonic (chars);
- nsItem.setToolTip(NSString.stringWithCharacters (chars, length));
+ char[] chars = new char [toolTipText.length ()];
+ string.getChars (0, chars.length, chars, 0);
+ int length = fixMnemonic (chars);
+ nsItem.setToolTip(NSString.stringWithCharacters (chars, length));
} else {
- parent.checkToolTip (this);
+ parent.checkToolTip (this);
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tracker.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tracker.java
index 5ea6a223c2..a4cd7ebf01 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tracker.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tracker.java
@@ -202,7 +202,7 @@ Point adjustMoveCursor () {
int newY = bounds.y;
/*
* Convert to screen coordinates if needed
- */
+ */
if (parent != null) {
Point pt = parent.toDisplay (newX, newY);
newX = pt.x;
@@ -234,7 +234,7 @@ Point adjustResizeCursor (boolean movePointer) {
/*
* Convert to screen coordinates if needed
- */
+ */
if (parent != null) {
Point pt = parent.toDisplay (newX, newY);
newX = pt.x;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tree.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tree.java
index 3462e4e97b..b5d5988b80 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tree.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tree.java
@@ -2133,7 +2133,7 @@ void mouseDownSuper(long id, long sel, long theEvent) {
NSRect checkRect = cell.imageRectForBounds(widget.frameOfCellAtColumn(column, row));
if (OS.NSPointInRect(pt, checkRect)) {
check = preventSelect = true;
- }
+ }
}
}
if (!check && row != -1 && (nsEvent.modifierFlags() & OS.NSDeviceIndependentModifierFlagsMask) == 0 && nsEvent.clickCount() == 1) {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TreeColumn.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TreeColumn.java
index a8f2cfd3db..b3848ac431 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TreeColumn.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TreeColumn.java
@@ -370,9 +370,9 @@ void drawInteriorWithFrame_inView (long id, long sel, NSRect cellRect, long view
if (isFlipped) {
context.saveGraphicsState ();
NSAffineTransform transform = NSAffineTransform.transform ();
- transform.scaleXBy (1, -1);
- transform.translateXBy (0, -(destRect.height + 2 * destRect.y));
- transform.concat ();
+ transform.scaleXBy (1, -1);
+ transform.translateXBy (0, -(destRect.height + 2 * destRect.y));
+ transform.concat ();
}
NSRect sourceRect = new NSRect ();
sourceRect.width = destRect.width;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/SWT.java b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/SWT.java
index 9e0ee05530..1e57d1b62b 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/SWT.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/SWT.java
@@ -718,10 +718,10 @@ public class SWT {
* should be opened.
* </p>
*
- * @see org.eclipse.swt.widgets.Display#addListener
- * @see org.eclipse.swt.widgets.Event
- *
- * @since 3.6
+ * @see org.eclipse.swt.widgets.Display#addListener
+ * @see org.eclipse.swt.widgets.Event
+ *
+ * @since 3.6
*/
public static final int OpenDocument = 46;
@@ -733,10 +733,10 @@ public class SWT {
* on a touch-based input source.
* </p>
*
- * @see org.eclipse.swt.widgets.Display#addListener
- * @see org.eclipse.swt.widgets.Event
- *
- * @since 3.7
+ * @see org.eclipse.swt.widgets.Display#addListener
+ * @see org.eclipse.swt.widgets.Event
+ *
+ * @since 3.7
*/
public static final int Touch = 47;
@@ -747,14 +747,14 @@ public class SWT {
* This event is sent when a gesture has been performed.
* </p>
*
- * @see org.eclipse.swt.widgets.Display#addListener
- * @see org.eclipse.swt.widgets.Event
- * @see SWT#GESTURE_MAGNIFY
- * @see SWT#GESTURE_PAN
- * @see SWT#GESTURE_ROTATE
- * @see SWT#GESTURE_SWIPE
- *
- * @since 3.7
+ * @see org.eclipse.swt.widgets.Display#addListener
+ * @see org.eclipse.swt.widgets.Event
+ * @see SWT#GESTURE_MAGNIFY
+ * @see SWT#GESTURE_PAN
+ * @see SWT#GESTURE_ROTATE
+ * @see SWT#GESTURE_SWIPE
+ *
+ * @since 3.7
*/
public static final int Gesture = 48;
@@ -771,8 +771,8 @@ public class SWT {
*
* @see org.eclipse.swt.widgets.Text#addSegmentListener
* @see org.eclipse.swt.events.SegmentEvent
- *
- * @since 3.8
+ *
+ * @since 3.8
*/
public static final int Segments = 49;
@@ -1271,16 +1271,16 @@ public class SWT {
*/
public static final int SEPARATOR = 1 << 1;
- /**
- * Constant representing a flexible space separator in a ToolBar.
+ /**
+ * Constant representing a flexible space separator in a ToolBar.
* <p><b>Used By:</b></p>
* <ul>
* <li><code>ToolItem.setWidth()</code></li>
* </ul>
*
* @since 3.7
- */
- public static final int SEPARATOR_FILL = -2;
+ */
+ public static final int SEPARATOR_FILL = -2;
/**
* Style constant for toggle button behavior (value is 1&lt;&lt;1).
@@ -2536,7 +2536,7 @@ public class SWT {
* any modifier is pressed and will continue to work as new modifier
* masks are added.
*
- * <code>(stateMask &amp; SWT.MODIFIER_MASK) != 0</code>.
+ * <code>(stateMask &amp; SWT.MODIFIER_MASK) != 0</code>.
*
* @since 2.1
*/
@@ -2586,7 +2586,7 @@ public class SWT {
* any button is pressed and will continue to work as new button
* masks are added.
*
- * <code>(stateMask &amp; SWT.BUTTON_MASK) != 0</code>.
+ * <code>(stateMask &amp; SWT.BUTTON_MASK) != 0</code>.
*
* @since 2.1
*/
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/SWTError.java b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/SWTError.java
index 2bd0f59eb8..03fc353428 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/SWTError.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/SWTError.java
@@ -41,9 +41,9 @@ package org.eclipse.swt;
*/
public class SWTError extends Error {
- /**
- * The SWT error code, one of SWT.ERROR_*.
- */
+ /**
+ * The SWT error code, one of SWT.ERROR_*.
+ */
public int code;
/**
@@ -52,7 +52,7 @@ public class SWTError extends Error {
*/
public Throwable throwable;
- static final long serialVersionUID = 3833467327105808433L;
+ static final long serialVersionUID = 3833467327105808433L;
/**
* Constructs a new instance of this class with its
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/events/KeyEvent.java b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/events/KeyEvent.java
index 4b8a378dc0..10700e53b3 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/events/KeyEvent.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/events/KeyEvent.java
@@ -39,14 +39,14 @@ import org.eclipse.swt.widgets.Event;
public class KeyEvent extends TypedEvent {
- /**
- * the character represented by the key that was typed.
+ /**
+ * the character represented by the key that was typed.
* This is the final character that results after all modifiers have been
- * applied. For example, when the user types Ctrl+A, the character value
- * is 0x01. It is important that applications do not attempt to modify the
- * character value based on a stateMask (such as SWT.CTRL) or the resulting
- * character will not be correct.
- */
+ * applied. For example, when the user types Ctrl+A, the character value
+ * is 0x01. It is important that applications do not attempt to modify the
+ * character value based on a stateMask (such as SWT.CTRL) or the resulting
+ * character will not be correct.
+ */
public char character;
/**
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/events/PaintEvent.java b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/events/PaintEvent.java
index af08b195eb..ca80848811 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/events/PaintEvent.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/events/PaintEvent.java
@@ -61,7 +61,7 @@ public final class PaintEvent extends TypedEvent {
/**
* the number of following paint events which
- * are pending which may always be zero on
+ * are pending which may always be zero on
* some platforms
*/
public int count;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/DPIUtil.java b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/DPIUtil.java
index 354a2f8668..cbfa1c5ccc 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/DPIUtil.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/DPIUtil.java
@@ -453,7 +453,7 @@ public static boolean useCairoAutoScale() {
public static int getZoomForAutoscaleProperty (int nativeDeviceZoom) {
int zoom = 0;
- if (autoScaleValue != null) {
+ if (autoScaleValue != null) {
if ("false".equalsIgnoreCase (autoScaleValue)) {
zoom = 100;
} else if ("quarter".equalsIgnoreCase (autoScaleValue)) {
@@ -469,7 +469,7 @@ public static int getZoomForAutoscaleProperty (int nativeDeviceZoom) {
}
}
}
- if (zoom == 0) { // || "integer".equalsIgnoreCase (value) || "integer200".equalsIgnoreCase (value)
+ if (zoom == 0) { // || "integer".equalsIgnoreCase (value) || "integer200".equalsIgnoreCase (value)
zoom = Math.max ((nativeDeviceZoom + 25) / 100 * 100, 100);
if (!"integer".equalsIgnoreCase(autoScaleValue)) {
// integer200, or default
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/GIFFileFormat.java b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/GIFFileFormat.java
index 6aaa403a8c..09050a39bd 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/GIFFileFormat.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/GIFFileFormat.java
@@ -412,7 +412,7 @@ public final class GIFFileFormat extends FileFormat {
@Override
void unloadIntoByteStream(ImageLoader loader) {
- /* Step 1: Acquire GIF parameters. */
+ /* Step 1: Acquire GIF parameters. */
ImageData[] data = loader.data;
int frameCount = data.length;
boolean multi = frameCount > 1;
@@ -454,7 +454,7 @@ public final class GIFFileFormat extends FileFormat {
}
try {
- /* Step 3: Write the GIF89a Header and Logical Screen Descriptor. */
+ /* Step 3: Write the GIF89a Header and Logical Screen Descriptor. */
outputStream.write(GIF89a);
int bitField = globalTable*128 + (depth-1)*16 + depth-1;
outputStream.writeShort((short)logicalScreenWidth);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/JPEGDecoder.java b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/JPEGDecoder.java
index ef0d9004a1..40d5c98721 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/JPEGDecoder.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/JPEGDecoder.java
@@ -137,7 +137,7 @@ public class JPEGDecoder {
static final int M_APP13 = 0xed;
static final int M_APP14 = 0xee;
static final int M_APP15 = 0xef;
- static final int M_JPG0 = 0xf0;
+ static final int M_JPG0 = 0xf0;
static final int M_JPG13 = 0xfd;
static final int M_COM = 0xfe;
static final int M_TEM = 0x01;
@@ -832,7 +832,7 @@ public class JPEGDecoder {
{
if (bits_left < (1)) {
if (!jpeg_fill_bit_buffer(br_state,get_buffer,bits_left,1)) {
- return false;
+ return false;
}
get_buffer = (br_state).get_buffer; bits_left = (br_state).bits_left;
}
@@ -1716,7 +1716,7 @@ public class JPEGDecoder {
// JMETHOD(void, start_pass, (j_decompress_ptr cinfo, J_BUF_MODE pass_mode));
int process_data;
- /* Pointer to allocated workspace (M or M+2 row groups). */
+ /* Pointer to allocated workspace (M or M+2 row groups). */
byte[][][] buffer = new byte[MAX_COMPONENTS][][];
int[] buffer_offset = new int[MAX_COMPONENTS];
@@ -2325,8 +2325,8 @@ static void jinit_d_coef_controller (jpeg_decompress_struct cinfo, boolean need_
coef.whole_image[ci] =
new short
[(int)jround_up( compptr.height_in_blocks, compptr.v_samp_factor)]
- [(int)jround_up( compptr.width_in_blocks, compptr.h_samp_factor)]
- [DCTSIZE2];
+ [(int)jround_up( compptr.width_in_blocks, compptr.h_samp_factor)]
+ [DCTSIZE2];
}
// coef.consume_data = consume_data;
coef.decompress_data = DECOMPRESS_DATA;
@@ -3400,18 +3400,18 @@ jcopy_sample_rows (byte[][] input_array, int source_row,
* The source and destination arrays must be at least as wide as num_cols.
*/
{
- byte[] inptr, outptr;
- int count = num_cols;
- int row;
-
- int input_array_offset = source_row;
- int output_array_offset = dest_row;
-
- for (row = num_rows; row > 0; row--) {
- inptr = input_array[input_array_offset++];
- outptr = output_array[output_array_offset++];
- System.arraycopy(inptr, 0, outptr, 0, count);
- }
+ byte[] inptr, outptr;
+ int count = num_cols;
+ int row;
+
+ int input_array_offset = source_row;
+ int output_array_offset = dest_row;
+
+ for (row = num_rows; row > 0; row--) {
+ inptr = input_array[input_array_offset++];
+ outptr = output_array[output_array_offset++];
+ System.arraycopy(inptr, 0, outptr, 0, count);
+ }
}
static boolean jpeg_start_decompress (jpeg_decompress_struct cinfo) {
@@ -4418,8 +4418,8 @@ static boolean get_dht (jpeg_decompress_struct cinfo)
// ERREXIT(cinfo, JERR_BAD_HUFF_TABLE);
for (i = 0; i < count; i++) {
- if (cinfo.bytes_offset == cinfo.bytes_in_buffer) fill_input_buffer(cinfo);
- huffval[i] = cinfo.buffer[cinfo.bytes_offset++];
+ if (cinfo.bytes_offset == cinfo.bytes_in_buffer) fill_input_buffer(cinfo);
+ huffval[i] = cinfo.buffer[cinfo.bytes_offset++];
}
length -= count;
@@ -5012,8 +5012,8 @@ static void grayscale_convert (jpeg_decompress_struct cinfo,
byte[][][] input_buf, int[] input_buf_offset, int input_row,
byte[][] output_buf, int output_buf_offset, int num_rows)
{
- jcopy_sample_rows(input_buf[0], input_row+input_buf_offset[0], output_buf, output_buf_offset,
- num_rows, cinfo.output_width);
+ jcopy_sample_rows(input_buf[0], input_row+input_buf_offset[0], output_buf, output_buf_offset,
+ num_rows, cinfo.output_width);
}
static void gray_rgb_convert (jpeg_decompress_struct cinfo,
@@ -5535,12 +5535,12 @@ static int consume_data (jpeg_decompress_struct cinfo) {
static int consume_input (jpeg_decompress_struct cinfo) {
switch (cinfo.inputctl.consume_input) {
case COEF_CONSUME_INPUT:
- switch (cinfo.coef.consume_data) {
+ switch (cinfo.coef.consume_data) {
case CONSUME_DATA: return consume_data(cinfo);
case DUMMY_CONSUME_DATA: return dummy_consume_data(cinfo);
default: error();
- }
- break;
+ }
+ break;
case INPUT_CONSUME_INPUT:
return consume_markers(cinfo);
default:
@@ -5617,7 +5617,7 @@ static boolean next_marker (jpeg_decompress_struct cinfo) {
* data source's input buffer.
*/
do {
- if (cinfo.bytes_offset == cinfo.bytes_in_buffer) fill_input_buffer(cinfo);
+ if (cinfo.bytes_offset == cinfo.bytes_in_buffer) fill_input_buffer(cinfo);
c = cinfo.buffer[cinfo.bytes_offset++] & 0xFF;
} while (c == 0xFF);
if (c != 0)
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/JPEGFileFormat.java b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/JPEGFileFormat.java
index db721d53ba..0f5c6f82ca 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/JPEGFileFormat.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/JPEGFileFormat.java
@@ -1025,7 +1025,7 @@ void forwardDCT(int[] dataUnit) {
dataUnit[rIndex + 2] = n >> 11;
if ((n < 0) && ((n & 0x07FF) != 0)) dataUnit[rIndex + 2]--;
n = z1 + (tmp12 * (0 - FIX_1_847759065)) + 1024;
- dataUnit[rIndex + 6] = n >> 11;
+ dataUnit[rIndex + 6] = n >> 11;
if ((n < 0) && ((n & 0x07FF) != 0)) dataUnit[rIndex + 6]--;
/**
@@ -1277,7 +1277,7 @@ void inverseDCT(int[] dataUnit) {
dataUnit[rIndex + 5] = (tmp12 - tmp1 + 1024) >> 11;
dataUnit[rIndex + 3] = (tmp13 + tmp0 + 1024) >> 11;
dataUnit[rIndex + 4] = (tmp13 - tmp0 + 1024) >> 11;
- }
+ }
}
/**
* Pass 2: process columns.
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/LEDataInputStream.java b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/LEDataInputStream.java
index 75e53a6f61..54e5bbdfe8 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/LEDataInputStream.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/LEDataInputStream.java
@@ -103,13 +103,13 @@ final class LEDataInputStream extends InputStream {
}
/**
- * Reads at most <code>length</code> bytes from this LEDataInputStream and
- * stores them in byte array <code>buffer</code> starting at <code>offset</code>.
- * <p>
- * Answer the number of bytes actually read or -1 if no bytes were read and
- * end of stream was encountered. This implementation reads bytes from
- * the pushback buffer first, then the target stream if more bytes are required
- * to satisfy <code>count</code>.
+ * Reads at most <code>length</code> bytes from this LEDataInputStream and
+ * stores them in byte array <code>buffer</code> starting at <code>offset</code>.
+ * <p>
+ * Answer the number of bytes actually read or -1 if no bytes were read and
+ * end of stream was encountered. This implementation reads bytes from
+ * the pushback buffer first, then the target stream if more bytes are required
+ * to satisfy <code>count</code>.
* </p>
* @param buffer the byte array in which to store the read bytes.
* @param offset the offset in <code>buffer</code> to store the read bytes.
@@ -122,9 +122,9 @@ final class LEDataInputStream extends InputStream {
private int readData(byte[] buffer, int offset, int length) throws IOException {
if (buf == null) throw new IOException();
if (offset < 0 || offset > buffer.length ||
- length < 0 || (length > buffer.length - offset)) {
- throw new ArrayIndexOutOfBoundsException();
- }
+ length < 0 || (length > buffer.length - offset)) {
+ throw new ArrayIndexOutOfBoundsException();
+ }
int cacheCopied = 0;
int newOffset = offset;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/PngDeflater.java b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/PngDeflater.java
index 2683d0801c..695c68367c 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/PngDeflater.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/PngDeflater.java
@@ -67,38 +67,38 @@ static class Match {
static final short mirrorBytes[] = {
- 0x00, 0x80, 0x40, 0xc0, 0x20, 0xa0, 0x60, 0xe0,
- 0x10, 0x90, 0x50, 0xd0, 0x30, 0xb0, 0x70, 0xf0,
- 0x08, 0x88, 0x48, 0xc8, 0x28, 0xa8, 0x68, 0xe8,
- 0x18, 0x98, 0x58, 0xd8, 0x38, 0xb8, 0x78, 0xf8,
- 0x04, 0x84, 0x44, 0xc4, 0x24, 0xa4, 0x64, 0xe4,
- 0x14, 0x94, 0x54, 0xd4, 0x34, 0xb4, 0x74, 0xf4,
- 0x0c, 0x8c, 0x4c, 0xcc, 0x2c, 0xac, 0x6c, 0xec,
- 0x1c, 0x9c, 0x5c, 0xdc, 0x3c, 0xbc, 0x7c, 0xfc,
- 0x02, 0x82, 0x42, 0xc2, 0x22, 0xa2, 0x62, 0xe2,
- 0x12, 0x92, 0x52, 0xd2, 0x32, 0xb2, 0x72, 0xf2,
- 0x0a, 0x8a, 0x4a, 0xca, 0x2a, 0xaa, 0x6a, 0xea,
- 0x1a, 0x9a, 0x5a, 0xda, 0x3a, 0xba, 0x7a, 0xfa,
- 0x06, 0x86, 0x46, 0xc6, 0x26, 0xa6, 0x66, 0xe6,
- 0x16, 0x96, 0x56, 0xd6, 0x36, 0xb6, 0x76, 0xf6,
- 0x0e, 0x8e, 0x4e, 0xce, 0x2e, 0xae, 0x6e, 0xee,
- 0x1e, 0x9e, 0x5e, 0xde, 0x3e, 0xbe, 0x7e, 0xfe,
- 0x01, 0x81, 0x41, 0xc1, 0x21, 0xa1, 0x61, 0xe1,
- 0x11, 0x91, 0x51, 0xd1, 0x31, 0xb1, 0x71, 0xf1,
- 0x09, 0x89, 0x49, 0xc9, 0x29, 0xa9, 0x69, 0xe9,
- 0x19, 0x99, 0x59, 0xd9, 0x39, 0xb9, 0x79, 0xf9,
- 0x05, 0x85, 0x45, 0xc5, 0x25, 0xa5, 0x65, 0xe5,
- 0x15, 0x95, 0x55, 0xd5, 0x35, 0xb5, 0x75, 0xf5,
- 0x0d, 0x8d, 0x4d, 0xcd, 0x2d, 0xad, 0x6d, 0xed,
- 0x1d, 0x9d, 0x5d, 0xdd, 0x3d, 0xbd, 0x7d, 0xfd,
- 0x03, 0x83, 0x43, 0xc3, 0x23, 0xa3, 0x63, 0xe3,
- 0x13, 0x93, 0x53, 0xd3, 0x33, 0xb3, 0x73, 0xf3,
- 0x0b, 0x8b, 0x4b, 0xcb, 0x2b, 0xab, 0x6b, 0xeb,
- 0x1b, 0x9b, 0x5b, 0xdb, 0x3b, 0xbb, 0x7b, 0xfb,
- 0x07, 0x87, 0x47, 0xc7, 0x27, 0xa7, 0x67, 0xe7,
- 0x17, 0x97, 0x57, 0xd7, 0x37, 0xb7, 0x77, 0xf7,
- 0x0f, 0x8f, 0x4f, 0xcf, 0x2f, 0xaf, 0x6f, 0xef,
- 0x1f, 0x9f, 0x5f, 0xdf, 0x3f, 0xbf, 0x7f, 0xff,
+ 0x00, 0x80, 0x40, 0xc0, 0x20, 0xa0, 0x60, 0xe0,
+ 0x10, 0x90, 0x50, 0xd0, 0x30, 0xb0, 0x70, 0xf0,
+ 0x08, 0x88, 0x48, 0xc8, 0x28, 0xa8, 0x68, 0xe8,
+ 0x18, 0x98, 0x58, 0xd8, 0x38, 0xb8, 0x78, 0xf8,
+ 0x04, 0x84, 0x44, 0xc4, 0x24, 0xa4, 0x64, 0xe4,
+ 0x14, 0x94, 0x54, 0xd4, 0x34, 0xb4, 0x74, 0xf4,
+ 0x0c, 0x8c, 0x4c, 0xcc, 0x2c, 0xac, 0x6c, 0xec,
+ 0x1c, 0x9c, 0x5c, 0xdc, 0x3c, 0xbc, 0x7c, 0xfc,
+ 0x02, 0x82, 0x42, 0xc2, 0x22, 0xa2, 0x62, 0xe2,
+ 0x12, 0x92, 0x52, 0xd2, 0x32, 0xb2, 0x72, 0xf2,
+ 0x0a, 0x8a, 0x4a, 0xca, 0x2a, 0xaa, 0x6a, 0xea,
+ 0x1a, 0x9a, 0x5a, 0xda, 0x3a, 0xba, 0x7a, 0xfa,
+ 0x06, 0x86, 0x46, 0xc6, 0x26, 0xa6, 0x66, 0xe6,
+ 0x16, 0x96, 0x56, 0xd6, 0x36, 0xb6, 0x76, 0xf6,
+ 0x0e, 0x8e, 0x4e, 0xce, 0x2e, 0xae, 0x6e, 0xee,
+ 0x1e, 0x9e, 0x5e, 0xde, 0x3e, 0xbe, 0x7e, 0xfe,
+ 0x01, 0x81, 0x41, 0xc1, 0x21, 0xa1, 0x61, 0xe1,
+ 0x11, 0x91, 0x51, 0xd1, 0x31, 0xb1, 0x71, 0xf1,
+ 0x09, 0x89, 0x49, 0xc9, 0x29, 0xa9, 0x69, 0xe9,
+ 0x19, 0x99, 0x59, 0xd9, 0x39, 0xb9, 0x79, 0xf9,
+ 0x05, 0x85, 0x45, 0xc5, 0x25, 0xa5, 0x65, 0xe5,
+ 0x15, 0x95, 0x55, 0xd5, 0x35, 0xb5, 0x75, 0xf5,
+ 0x0d, 0x8d, 0x4d, 0xcd, 0x2d, 0xad, 0x6d, 0xed,
+ 0x1d, 0x9d, 0x5d, 0xdd, 0x3d, 0xbd, 0x7d, 0xfd,
+ 0x03, 0x83, 0x43, 0xc3, 0x23, 0xa3, 0x63, 0xe3,
+ 0x13, 0x93, 0x53, 0xd3, 0x33, 0xb3, 0x73, 0xf3,
+ 0x0b, 0x8b, 0x4b, 0xcb, 0x2b, 0xab, 0x6b, 0xeb,
+ 0x1b, 0x9b, 0x5b, 0xdb, 0x3b, 0xbb, 0x7b, 0xfb,
+ 0x07, 0x87, 0x47, 0xc7, 0x27, 0xa7, 0x67, 0xe7,
+ 0x17, 0x97, 0x57, 0xd7, 0x37, 0xb7, 0x77, 0xf7,
+ 0x0f, 0x8f, 0x4f, 0xcf, 0x2f, 0xaf, 0x6f, 0xef,
+ 0x1f, 0x9f, 0x5f, 0xdf, 0x3f, 0xbf, 0x7f, 0xff,
};
@@ -113,7 +113,7 @@ static class Code {
this.min = min;
this.max = max;
- }
+ }
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/PngHuffmanTable.java b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/PngHuffmanTable.java
index c25cf0157f..ca7aef4890 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/PngHuffmanTable.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/PngHuffmanTable.java
@@ -102,7 +102,7 @@ int getNextValue(PngDecodingDataStream stream) throws IOException {
// a prefix to the longer codeValues.
while (codelength < MAX_CODE_LENGTH && code > codeLengthInfo[codelength].max) {
code = ((code << 1) | stream.getNextIdatBit());
- codelength++;
+ codelength++;
}
if (codelength >= MAX_CODE_LENGTH) stream.error();
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/PngHuffmanTables.java b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/PngHuffmanTables.java
index cb78f2581f..9f60c6c12b 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/PngHuffmanTables.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/PngHuffmanTables.java
@@ -24,18 +24,18 @@ public class PngHuffmanTables {
static final int LiteralTableSize = 288;
static final int[] FixedLiteralLengths = {
- 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
- 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
- 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
- 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
- 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
- 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 7, 7, 7, 7, 7, 7, 7, 7,
+ 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8,
};
static final int DistanceTableSize = 32;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/WinBMPFileFormat.java b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/WinBMPFileFormat.java
index 120722dbdc..a20b88340b 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/WinBMPFileFormat.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/image/WinBMPFileFormat.java
@@ -424,14 +424,14 @@ boolean isFileFormat(LEDataInputStream stream) {
boolean isPaletteBMP(PaletteData pal, int depth) {
switch(depth) {
case 32:
- if ((pal.redMask == 0xFF00) && (pal.greenMask == 0xFF0000) && (pal.blueMask == 0xFF000000)) return true;
- return false;
+ if ((pal.redMask == 0xFF00) && (pal.greenMask == 0xFF0000) && (pal.blueMask == 0xFF000000)) return true;
+ return false;
case 24:
if ((pal.redMask == 0xFF) && (pal.greenMask == 0xFF00) && (pal.blueMask == 0xFF0000)) return true;
return false;
case 16:
- if ((pal.redMask == 0x7C00) && (pal.greenMask == 0x3E0) && (pal.blueMask == 0x1F)) return true;
- return false;
+ if ((pal.redMask == 0x7C00) && (pal.greenMask == 0x3E0) && (pal.blueMask == 0x1F)) return true;
+ return false;
default:
return true;
}
@@ -735,7 +735,7 @@ void unloadIntoByteStream(ImageLoader loader) {
// If the pixels are not in the expected BMP format, convert them.
if (pal.isDirect && !isPaletteBMP(pal, image.depth)) {
// array to store the converted pixels
- iData = new byte[image.data.length];
+ iData = new byte[image.data.length];
convertPixelsToBGR(image, iData);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/FillLayout.java b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/FillLayout.java
index 0bc3d8c3ca..f66f280bc8 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/FillLayout.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/FillLayout.java
@@ -68,7 +68,7 @@ public final class FillLayout extends Layout {
*
* @since 3.0
*/
- public int marginWidth = 0;
+ public int marginWidth = 0;
/**
* marginHeight specifies the number of points of vertical margin
@@ -78,9 +78,9 @@ public final class FillLayout extends Layout {
*
* @since 3.0
*/
- public int marginHeight = 0;
+ public int marginHeight = 0;
- /**
+ /**
* spacing specifies the number of points between the edge of one cell
* and the edge of its neighbouring cell.
*
@@ -233,13 +233,13 @@ protected void layout (Composite composite, boolean flushCache) {
*/
@Override
public String toString () {
- String string = getName ()+" {";
- string += "type="+((type == SWT.VERTICAL) ? "SWT.VERTICAL" : "SWT.HORIZONTAL")+" ";
- if (marginWidth != 0) string += "marginWidth="+marginWidth+" ";
- if (marginHeight != 0) string += "marginHeight="+marginHeight+" ";
- if (spacing != 0) string += "spacing="+spacing+" ";
- string = string.trim();
- string += "}";
- return string;
+ String string = getName ()+" {";
+ string += "type="+((type == SWT.VERTICAL) ? "SWT.VERTICAL" : "SWT.HORIZONTAL")+" ";
+ if (marginWidth != 0) string += "marginWidth="+marginWidth+" ";
+ if (marginHeight != 0) string += "marginHeight="+marginHeight+" ";
+ if (spacing != 0) string += "spacing="+spacing+" ";
+ string = string.trim();
+ string += "}";
+ return string;
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/FormAttachment.java b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/FormAttachment.java
index 0afc130fb9..c7bc0ef918 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/FormAttachment.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/FormAttachment.java
@@ -313,7 +313,7 @@ int solveY (int value) {
*/
@Override
public String toString () {
- String string = control != null ? control.toString () : numerator + "/" + denominator;
+ String string = control != null ? control.toString () : numerator + "/" + denominator;
return "{y = (" + string + (offset >= 0 ? ")x + " + offset: ")x - " + (-offset))+"}";
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/FormData.java b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/FormData.java
index 3159c799a0..56100f88c2 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/FormData.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/FormData.java
@@ -333,15 +333,15 @@ FormAttachment getTopAttachment (Control control, int spacing, boolean flushCach
*/
@Override
public String toString () {
- String string = getName()+" {";
- if (width != SWT.DEFAULT) string += "width="+width+" ";
+ String string = getName()+" {";
+ if (width != SWT.DEFAULT) string += "width="+width+" ";
if (height != SWT.DEFAULT) string += "height="+height+" ";
- if (left != null) string += "left="+left+" ";
- if (right != null) string += "right="+right+" ";
- if (top != null) string += "top="+top+" ";
- if (bottom != null) string += "bottom="+bottom+" ";
- string = string.trim();
- string += "}";
+ if (left != null) string += "left="+left+" ";
+ if (right != null) string += "right="+right+" ";
+ if (top != null) string += "top="+top+" ";
+ if (bottom != null) string += "bottom="+bottom+" ";
+ string = string.trim();
+ string += "}";
return string;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/FormLayout.java b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/FormLayout.java
index 52096c84c2..92272b0551 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/FormLayout.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/FormLayout.java
@@ -97,7 +97,7 @@ public final class FormLayout extends Layout {
*
* The default value is 0.
*/
- public int marginWidth = 0;
+ public int marginWidth = 0;
/**
* marginHeight specifies the number of points of vertical margin
@@ -105,10 +105,10 @@ public final class FormLayout extends Layout {
*
* The default value is 0.
*/
- public int marginHeight = 0;
+ public int marginHeight = 0;
- /**
+ /**
* marginLeft specifies the number of points of horizontal margin
* that will be placed along the left edge of the layout.
*
@@ -377,16 +377,16 @@ Point layout (Composite composite, boolean move, int x, int y, int width, int he
*/
@Override
public String toString () {
- String string = getName ()+" {";
- if (marginWidth != 0) string += "marginWidth="+marginWidth+" ";
- if (marginHeight != 0) string += "marginHeight="+marginHeight+" ";
- if (marginLeft != 0) string += "marginLeft="+marginLeft+" ";
- if (marginRight != 0) string += "marginRight="+marginRight+" ";
- if (marginTop != 0) string += "marginTop="+marginTop+" ";
- if (marginBottom != 0) string += "marginBottom="+marginBottom+" ";
- if (spacing != 0) string += "spacing="+spacing+" ";
- string = string.trim();
- string += "}";
- return string;
+ String string = getName ()+" {";
+ if (marginWidth != 0) string += "marginWidth="+marginWidth+" ";
+ if (marginHeight != 0) string += "marginHeight="+marginHeight+" ";
+ if (marginLeft != 0) string += "marginLeft="+marginLeft+" ";
+ if (marginRight != 0) string += "marginRight="+marginRight+" ";
+ if (marginTop != 0) string += "marginTop="+marginTop+" ";
+ if (marginBottom != 0) string += "marginBottom="+marginBottom+" ";
+ if (spacing != 0) string += "spacing="+spacing+" ";
+ string = string.trim();
+ string += "}";
+ return string;
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/GridData.java b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/GridData.java
index dcfed49551..6d5da5c766 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/GridData.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/GridData.java
@@ -556,22 +556,22 @@ public String toString () {
case CENTER: vAlign = "GridData.CENTER"; break;
default: vAlign = "Undefined "+verticalAlignment; break;
}
- String string = getName()+" {";
- string += "horizontalAlignment="+hAlign+" ";
- if (horizontalIndent != 0) string += "horizontalIndent="+horizontalIndent+" ";
- if (horizontalSpan != 1) string += "horizontalSpan="+horizontalSpan+" ";
- if (grabExcessHorizontalSpace) string += "grabExcessHorizontalSpace="+grabExcessHorizontalSpace+" ";
- if (widthHint != SWT.DEFAULT) string += "widthHint="+widthHint+" ";
- if (minimumWidth != 0) string += "minimumWidth="+minimumWidth+" ";
- string += "verticalAlignment="+vAlign+" ";
- if (verticalIndent != 0) string += "verticalIndent="+verticalIndent+" ";
+ String string = getName()+" {";
+ string += "horizontalAlignment="+hAlign+" ";
+ if (horizontalIndent != 0) string += "horizontalIndent="+horizontalIndent+" ";
+ if (horizontalSpan != 1) string += "horizontalSpan="+horizontalSpan+" ";
+ if (grabExcessHorizontalSpace) string += "grabExcessHorizontalSpace="+grabExcessHorizontalSpace+" ";
+ if (widthHint != SWT.DEFAULT) string += "widthHint="+widthHint+" ";
+ if (minimumWidth != 0) string += "minimumWidth="+minimumWidth+" ";
+ string += "verticalAlignment="+vAlign+" ";
+ if (verticalIndent != 0) string += "verticalIndent="+verticalIndent+" ";
if (verticalSpan != 1) string += "verticalSpan="+verticalSpan+" ";
- if (grabExcessVerticalSpace) string += "grabExcessVerticalSpace="+grabExcessVerticalSpace+" ";
- if (heightHint != SWT.DEFAULT) string += "heightHint="+heightHint+" ";
- if (minimumHeight != 0) string += "minimumHeight="+minimumHeight+" ";
- if (exclude) string += "exclude="+exclude+" ";
- string = string.trim();
- string += "}";
+ if (grabExcessVerticalSpace) string += "grabExcessVerticalSpace="+grabExcessVerticalSpace+" ";
+ if (heightHint != SWT.DEFAULT) string += "heightHint="+heightHint+" ";
+ if (minimumHeight != 0) string += "minimumHeight="+minimumHeight+" ";
+ if (exclude) string += "exclude="+exclude+" ";
+ string = string.trim();
+ string += "}";
return string;
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/GridLayout.java b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/GridLayout.java
index d82e9ce63b..d0bb2c6f42 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/GridLayout.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/GridLayout.java
@@ -50,13 +50,13 @@ import org.eclipse.swt.widgets.*;
*/
public final class GridLayout extends Layout {
- /**
- * numColumns specifies the number of cell columns in the layout.
- * If numColumns has a value less than 1, the layout will not
- * set the size and position of any controls.
- *
- * The default value is 1.
- */
+ /**
+ * numColumns specifies the number of cell columns in the layout.
+ * If numColumns has a value less than 1, the layout will not
+ * set the size and position of any controls.
+ *
+ * The default value is 1.
+ */
public int numColumns = 1;
/**
@@ -73,7 +73,7 @@ public final class GridLayout extends Layout {
*
* The default value is 5.
*/
- public int marginWidth = 5;
+ public int marginWidth = 5;
/**
* marginHeight specifies the number of points of vertical margin
@@ -81,9 +81,9 @@ public final class GridLayout extends Layout {
*
* The default value is 5.
*/
- public int marginHeight = 5;
+ public int marginHeight = 5;
- /**
+ /**
* marginLeft specifies the number of points of horizontal margin
* that will be placed along the left edge of the layout.
*
@@ -130,7 +130,7 @@ public final class GridLayout extends Layout {
*
* The default value is 5.
*/
- public int horizontalSpacing = 5;
+ public int horizontalSpacing = 5;
/**
* verticalSpacing specifies the number of points between the bottom
@@ -138,7 +138,7 @@ public final class GridLayout extends Layout {
*
* The default value is 5.
*/
- public int verticalSpacing = 5;
+ public int verticalSpacing = 5;
/**
* Constructs a new instance of this class
@@ -736,19 +736,19 @@ String getName () {
*/
@Override
public String toString () {
- String string = getName ()+" {";
- if (numColumns != 1) string += "numColumns="+numColumns+" ";
- if (makeColumnsEqualWidth) string += "makeColumnsEqualWidth="+makeColumnsEqualWidth+" ";
- if (marginWidth != 0) string += "marginWidth="+marginWidth+" ";
- if (marginHeight != 0) string += "marginHeight="+marginHeight+" ";
- if (marginLeft != 0) string += "marginLeft="+marginLeft+" ";
- if (marginRight != 0) string += "marginRight="+marginRight+" ";
- if (marginTop != 0) string += "marginTop="+marginTop+" ";
- if (marginBottom != 0) string += "marginBottom="+marginBottom+" ";
- if (horizontalSpacing != 0) string += "horizontalSpacing="+horizontalSpacing+" ";
- if (verticalSpacing != 0) string += "verticalSpacing="+verticalSpacing+" ";
- string = string.trim();
- string += "}";
- return string;
+ String string = getName ()+" {";
+ if (numColumns != 1) string += "numColumns="+numColumns+" ";
+ if (makeColumnsEqualWidth) string += "makeColumnsEqualWidth="+makeColumnsEqualWidth+" ";
+ if (marginWidth != 0) string += "marginWidth="+marginWidth+" ";
+ if (marginHeight != 0) string += "marginHeight="+marginHeight+" ";
+ if (marginLeft != 0) string += "marginLeft="+marginLeft+" ";
+ if (marginRight != 0) string += "marginRight="+marginRight+" ";
+ if (marginTop != 0) string += "marginTop="+marginTop+" ";
+ if (marginBottom != 0) string += "marginBottom="+marginBottom+" ";
+ if (horizontalSpacing != 0) string += "horizontalSpacing="+horizontalSpacing+" ";
+ if (verticalSpacing != 0) string += "verticalSpacing="+verticalSpacing+" ";
+ string = string.trim();
+ string += "}";
+ return string;
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/RowLayout.java b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/RowLayout.java
index ceb4a8edeb..cb21fcd139 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/RowLayout.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/RowLayout.java
@@ -82,7 +82,7 @@ public final class RowLayout extends Layout {
*
* @since 3.0
*/
- public int marginWidth = 0;
+ public int marginWidth = 0;
/**
* marginHeight specifies the number of points of vertical margin
@@ -92,7 +92,7 @@ public final class RowLayout extends Layout {
*
* @since 3.0
*/
- public int marginHeight = 0;
+ public int marginHeight = 0;
/**
* spacing specifies the number of points between the edge of one cell
@@ -502,21 +502,21 @@ Point layoutVertical (Composite composite, boolean move, boolean wrap, int heigh
*/
@Override
public String toString () {
- String string = getName ()+" {";
- string += "type="+((type != SWT.HORIZONTAL) ? "SWT.VERTICAL" : "SWT.HORIZONTAL")+" ";
- if (marginWidth != 0) string += "marginWidth="+marginWidth+" ";
- if (marginHeight != 0) string += "marginHeight="+marginHeight+" ";
- if (marginLeft != 0) string += "marginLeft="+marginLeft+" ";
- if (marginTop != 0) string += "marginTop="+marginTop+" ";
- if (marginRight != 0) string += "marginRight="+marginRight+" ";
- if (marginBottom != 0) string += "marginBottom="+marginBottom+" ";
- if (spacing != 0) string += "spacing="+spacing+" ";
- string += "wrap="+wrap+" ";
+ String string = getName ()+" {";
+ string += "type="+((type != SWT.HORIZONTAL) ? "SWT.VERTICAL" : "SWT.HORIZONTAL")+" ";
+ if (marginWidth != 0) string += "marginWidth="+marginWidth+" ";
+ if (marginHeight != 0) string += "marginHeight="+marginHeight+" ";
+ if (marginLeft != 0) string += "marginLeft="+marginLeft+" ";
+ if (marginTop != 0) string += "marginTop="+marginTop+" ";
+ if (marginRight != 0) string += "marginRight="+marginRight+" ";
+ if (marginBottom != 0) string += "marginBottom="+marginBottom+" ";
+ if (spacing != 0) string += "spacing="+spacing+" ";
+ string += "wrap="+wrap+" ";
string += "pack="+pack+" ";
string += "fill="+fill+" ";
string += "justify="+justify+" ";
string = string.trim();
string += "}";
- return string;
+ return string;
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Device.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Device.java
index 223b5060c6..58a8649530 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Device.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Device.java
@@ -446,12 +446,12 @@ public FontData[] getFontList (String faceName, boolean scalable) {
match = faceName.equalsIgnoreCase(name);
}
if (match) {
- OS.pango_font_family_list_faces(family[0], faces, n_faces);
- for (int j=0; j<n_faces[0]; j++) {
- C.memmove(face, faces[0] + j * C.PTR_SIZEOF, C.PTR_SIZEOF);
- long fontDesc = OS.pango_font_face_describe(face[0]);
- Font font = Font.gtk_new(this, fontDesc);
- FontData data = font.getFontData()[0];
+ OS.pango_font_family_list_faces(family[0], faces, n_faces);
+ for (int j=0; j<n_faces[0]; j++) {
+ C.memmove(face, faces[0] + j * C.PTR_SIZEOF, C.PTR_SIZEOF);
+ long fontDesc = OS.pango_font_face_describe(face[0]);
+ Font font = Font.gtk_new(this, fontDesc);
+ FontData data = font.getFontData()[0];
if (nFds == fds.length) {
FontData[] newFds = new FontData[fds.length + n_families[0]];
System.arraycopy(fds, 0, newFds, 0, nFds);
@@ -459,9 +459,9 @@ public FontData[] getFontList (String faceName, boolean scalable) {
}
fds[nFds++] = data;
OS.pango_font_description_free(fontDesc);
- }
- OS.g_free(faces[0]);
- if (faceName != null) break;
+ }
+ OS.g_free(faces[0]);
+ if (faceName != null) break;
}
}
OS.g_free(families[0]);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/GC.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/GC.java
index a841d7e07a..0a9c534a1f 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/GC.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/GC.java
@@ -721,20 +721,20 @@ void drawArcInPixels(int x, int y, int width, int height, int startAngle, int ar
long cairo = data.cairo;
double xOffset = data.cairoXoffset, yOffset = data.cairoYoffset;
if (width == height) {
- if (arcAngle >= 0) {
- Cairo.cairo_arc_negative(cairo, x + xOffset + width / 2f, y + yOffset + height / 2f, width / 2f, -startAngle * (float)Math.PI / 180, -(startAngle + arcAngle) * (float)Math.PI / 180);
- } else {
- Cairo.cairo_arc(cairo, x + xOffset + width / 2f, y + yOffset + height / 2f, width / 2f, -startAngle * (float)Math.PI / 180, -(startAngle + arcAngle) * (float)Math.PI / 180);
- }
+ if (arcAngle >= 0) {
+ Cairo.cairo_arc_negative(cairo, x + xOffset + width / 2f, y + yOffset + height / 2f, width / 2f, -startAngle * (float)Math.PI / 180, -(startAngle + arcAngle) * (float)Math.PI / 180);
+ } else {
+ Cairo.cairo_arc(cairo, x + xOffset + width / 2f, y + yOffset + height / 2f, width / 2f, -startAngle * (float)Math.PI / 180, -(startAngle + arcAngle) * (float)Math.PI / 180);
+ }
} else {
Cairo.cairo_save(cairo);
Cairo.cairo_translate(cairo, x + xOffset + width / 2f, y + yOffset + height / 2f);
Cairo.cairo_scale(cairo, width / 2f, height / 2f);
- if (arcAngle >= 0) {
- Cairo.cairo_arc_negative(cairo, 0, 0, 1, -startAngle * (float)Math.PI / 180, -(startAngle + arcAngle) * (float)Math.PI / 180);
- } else {
- Cairo.cairo_arc(cairo, 0, 0, 1, -startAngle * (float)Math.PI / 180, -(startAngle + arcAngle) * (float)Math.PI / 180);
- }
+ if (arcAngle >= 0) {
+ Cairo.cairo_arc_negative(cairo, 0, 0, 1, -startAngle * (float)Math.PI / 180, -(startAngle + arcAngle) * (float)Math.PI / 180);
+ } else {
+ Cairo.cairo_arc(cairo, 0, 0, 1, -startAngle * (float)Math.PI / 180, -(startAngle + arcAngle) * (float)Math.PI / 180);
+ }
Cairo.cairo_restore(cairo);
}
Cairo.cairo_stroke(cairo);
@@ -849,17 +849,17 @@ void drawImage(Image srcImage, int srcX, int srcY, int srcWidth, int srcHeight,
int imgWidth = srcImage.width;
int imgHeight = srcImage.height;
- if (simple) {
- srcWidth = destWidth = imgWidth;
- srcHeight = destHeight = imgHeight;
- } else {
- simple = srcX == 0 && srcY == 0 &&
- srcWidth == destWidth && destWidth == imgWidth &&
- srcHeight == destHeight && destHeight == imgHeight;
+ if (simple) {
+ srcWidth = destWidth = imgWidth;
+ srcHeight = destHeight = imgHeight;
+ } else {
+ simple = srcX == 0 && srcY == 0 &&
+ srcWidth == destWidth && destWidth == imgWidth &&
+ srcHeight == destHeight && destHeight == imgHeight;
if (srcX + srcWidth > imgWidth + 1 || srcY + srcHeight > imgHeight + 1) { //rounding error correction for hidpi
SWT.error(SWT.ERROR_INVALID_ARGUMENT);
}
- }
+ }
long cairo = data.cairo;
if (data.alpha != 0) {
srcImage.createSurface();
@@ -1240,10 +1240,10 @@ void drawRoundRectangleInPixels(int x, int y, int width, int height, int arcWidt
Cairo.cairo_translate(cairo, nx + xOffset, ny + yOffset);
Cairo.cairo_scale(cairo, naw2, nah2);
Cairo.cairo_move_to(cairo, fw - 1, 0);
- Cairo.cairo_arc(cairo, fw - 1, 1, 1, Math.PI + Math.PI/2.0, Math.PI*2.0);
- Cairo.cairo_arc(cairo, fw - 1, fh - 1, 1, 0, Math.PI/2.0);
- Cairo.cairo_arc(cairo, 1, fh - 1, 1, Math.PI/2, Math.PI);
- Cairo.cairo_arc(cairo, 1, 1, 1, Math.PI, 270.0*Math.PI/180.0);
+ Cairo.cairo_arc(cairo, fw - 1, 1, 1, Math.PI + Math.PI/2.0, Math.PI*2.0);
+ Cairo.cairo_arc(cairo, fw - 1, fh - 1, 1, 0, Math.PI/2.0);
+ Cairo.cairo_arc(cairo, 1, fh - 1, 1, Math.PI/2, Math.PI);
+ Cairo.cairo_arc(cairo, 1, 1, 1, Math.PI, 270.0*Math.PI/180.0);
Cairo.cairo_close_path(cairo);
Cairo.cairo_restore(cairo);
}
@@ -1500,11 +1500,11 @@ void fillArcInPixels(int x, int y, int width, int height, int startAngle, int ar
if (width == 0 || height == 0 || arcAngle == 0) return;
long cairo = data.cairo;
if (width == height) {
- if (arcAngle >= 0) {
- Cairo.cairo_arc_negative(cairo, x + width / 2f, y + height / 2f, width / 2f, -startAngle * (float)Math.PI / 180, -(startAngle + arcAngle) * (float)Math.PI / 180);
- } else {
- Cairo.cairo_arc(cairo, x + width / 2f, y + height / 2f, width / 2f, -startAngle * (float)Math.PI / 180, -(startAngle + arcAngle) * (float)Math.PI / 180);
- }
+ if (arcAngle >= 0) {
+ Cairo.cairo_arc_negative(cairo, x + width / 2f, y + height / 2f, width / 2f, -startAngle * (float)Math.PI / 180, -(startAngle + arcAngle) * (float)Math.PI / 180);
+ } else {
+ Cairo.cairo_arc(cairo, x + width / 2f, y + height / 2f, width / 2f, -startAngle * (float)Math.PI / 180, -(startAngle + arcAngle) * (float)Math.PI / 180);
+ }
Cairo.cairo_line_to(cairo, x + width / 2f, y + height / 2f);
} else {
Cairo.cairo_save(cairo);
@@ -1839,10 +1839,10 @@ void fillRoundRectangleInPixels(int x, int y, int width, int height, int arcWidt
Cairo.cairo_translate(cairo, nx, ny);
Cairo.cairo_scale(cairo, naw2, nah2);
Cairo.cairo_move_to(cairo, fw - 1, 0);
- Cairo.cairo_arc(cairo, fw - 1, 1, 1, Math.PI + Math.PI/2.0, Math.PI*2.0);
- Cairo.cairo_arc(cairo, fw - 1, fh - 1, 1, 0, Math.PI/2.0);
- Cairo.cairo_arc(cairo, 1, fh - 1, 1, Math.PI/2, Math.PI);
- Cairo.cairo_arc(cairo, 1, 1, 1, Math.PI, 270.0*Math.PI/180.0);
+ Cairo.cairo_arc(cairo, fw - 1, 1, 1, Math.PI + Math.PI/2.0, Math.PI*2.0);
+ Cairo.cairo_arc(cairo, fw - 1, fh - 1, 1, 0, Math.PI/2.0);
+ Cairo.cairo_arc(cairo, 1, fh - 1, 1, Math.PI/2, Math.PI);
+ Cairo.cairo_arc(cairo, 1, 1, 1, Math.PI, 270.0*Math.PI/180.0);
Cairo.cairo_close_path(cairo);
Cairo.cairo_restore(cairo);
}
@@ -1950,8 +1950,8 @@ public int getAlpha() {
*/
public int getAntialias() {
if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
- if (data.cairo == 0) return SWT.DEFAULT;
- int antialias = Cairo.cairo_get_antialias(data.cairo);
+ if (data.cairo == 0) return SWT.DEFAULT;
+ int antialias = Cairo.cairo_get_antialias(data.cairo);
switch (antialias) {
case Cairo.CAIRO_ANTIALIAS_DEFAULT: return SWT.DEFAULT;
case Cairo.CAIRO_ANTIALIAS_NONE: return SWT.OFF;
@@ -2515,9 +2515,9 @@ void getSize(int[] width, int[] height) {
* @since 3.1
*/
public int getTextAntialias() {
- if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
- if (data.cairo == 0) return SWT.DEFAULT;
- int antialias = Cairo.CAIRO_ANTIALIAS_DEFAULT;
+ if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
+ if (data.cairo == 0) return SWT.DEFAULT;
+ int antialias = Cairo.CAIRO_ANTIALIAS_DEFAULT;
if (data.context != 0) {
long options = OS.pango_cairo_context_get_font_options(data.context);
if (options != 0) antialias = Cairo.cairo_font_options_get_antialias(options);
@@ -2855,13 +2855,13 @@ public void setAntialias(int antialias) {
case SWT.DEFAULT: mode = Cairo.CAIRO_ANTIALIAS_DEFAULT; break;
case SWT.OFF: mode = Cairo.CAIRO_ANTIALIAS_NONE; break;
case SWT.ON: mode = Cairo.CAIRO_ANTIALIAS_GRAY;
- break;
+ break;
default:
SWT.error(SWT.ERROR_INVALID_ARGUMENT);
}
- initCairo();
- long cairo = data.cairo;
- Cairo.cairo_set_antialias(cairo, mode);
+ initCairo();
+ long cairo = data.cairo;
+ Cairo.cairo_set_antialias(cairo, mode);
}
/**
@@ -3761,23 +3761,23 @@ void setString(String string, int flags) {
* @since 3.1
*/
public void setTextAntialias(int antialias) {
- if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
+ if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
if (data.cairo == 0 && antialias == SWT.DEFAULT) return;
int mode = 0;
switch (antialias) {
case SWT.DEFAULT: mode = Cairo.CAIRO_ANTIALIAS_DEFAULT; break;
case SWT.OFF: mode = Cairo.CAIRO_ANTIALIAS_NONE; break;
case SWT.ON: mode = Cairo.CAIRO_ANTIALIAS_GRAY;
- break;
+ break;
default:
SWT.error(SWT.ERROR_INVALID_ARGUMENT);
}
- initCairo();
- long options = Cairo.cairo_font_options_create();
- Cairo.cairo_font_options_set_antialias(options, mode);
+ initCairo();
+ long options = Cairo.cairo_font_options_create();
+ Cairo.cairo_font_options_set_antialias(options, mode);
if (data.context == 0) createLayout();
OS.pango_cairo_context_set_font_options(data.context, options);
- Cairo.cairo_font_options_destroy(options);
+ Cairo.cairo_font_options_destroy(options);
}
/**
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Image.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Image.java
index 961d0fdd04..da7ed3aad7 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Image.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Image.java
@@ -1236,7 +1236,7 @@ public int hashCode () {
if (imageDataProvider != null) {
return imageDataProvider.hashCode();
} else if (imageFileNameProvider != null) {
- return imageFileNameProvider.hashCode();
+ return imageFileNameProvider.hashCode();
} else {
return (int)surface;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/TextLayout.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/TextLayout.java
index a1c0692119..fabec60987 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/TextLayout.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/TextLayout.java
@@ -539,7 +539,7 @@ void drawInPixels(GC gc, int x, int y, int selectionStart, int selectionEnd, Col
OS.pango_cairo_show_layout(cairo, layout);
drawBorder(gc, x, y, null);
if ((data.style & SWT.MIRRORED) != 0) {
- Cairo.cairo_restore(cairo);
+ Cairo.cairo_restore(cairo);
}
} else {
selectionStart = Math.min(Math.max(0, selectionStart), length - 1);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/internal/GDBus.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/internal/GDBus.java
index 6c118f8d35..b2a8da2bb4 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/internal/GDBus.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/internal/GDBus.java
@@ -67,7 +67,7 @@ public class GDBus {
* // From command line, it can be called like this:
* // gdbus call --session --dest org.eclipse.swt --object-path /org/eclipse/swt --method org.eclipse.swt.typeTest true "world" 1234
* // The call will return a tuple (struct) like: (true, 'world', 5678)
- * GDBusMethod typeTest = new GDBusMethod(
+ * GDBusMethod typeTest = new GDBusMethod(
* "typeTest",
* new String [][] {{OS.DBUS_TYPE_BOOLEAN, "boolean Test Val"}, {OS.DBUS_TYPE_STRING, "string Test Val"}, {OS.DBUS_TYPE_INT32, "int Test Val"}},
* new String [][] {{OS.DBUS_TYPE_BOOLEAN, "boolean Response"}, {OS.DBUS_TYPE_STRING, "string Test Response"}, {OS.DBUS_TYPE_INT32, "int Test Response"}},
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Button.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Button.java
index b842510a02..32c59c5e4b 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Button.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Button.java
@@ -116,26 +116,26 @@ static int checkStyle (int style) {
}
GtkBorder getBorder (byte[] border, long handle, int defaultBorder) {
- GtkBorder gtkBorder = new GtkBorder();
- long [] borderPtr = new long [1];
- if (GTK.GTK4) {
+ GtkBorder gtkBorder = new GtkBorder();
+ long [] borderPtr = new long [1];
+ if (GTK.GTK4) {
long context = GTK.gtk_widget_get_style_context (handle);
int stateFlag = GTK.gtk_widget_get_state_flags(handle);
gtk_style_context_get_border(context, stateFlag, gtkBorder);
return gtkBorder;
- } else {
- GTK.gtk_widget_style_get (handle, border, borderPtr,0);
- if (borderPtr[0] != 0) {
- OS.memmove (gtkBorder, borderPtr[0], GtkBorder.sizeof);
- GTK.gtk_border_free(borderPtr[0]);
- return gtkBorder;
- }
- }
- gtkBorder.left = defaultBorder;
- gtkBorder.top = defaultBorder;
- gtkBorder.right = defaultBorder;
- gtkBorder.bottom = defaultBorder;
- return gtkBorder;
+ } else {
+ GTK.gtk_widget_style_get (handle, border, borderPtr,0);
+ if (borderPtr[0] != 0) {
+ OS.memmove (gtkBorder, borderPtr[0], GtkBorder.sizeof);
+ GTK.gtk_border_free(borderPtr[0]);
+ return gtkBorder;
+ }
+ }
+ gtkBorder.left = defaultBorder;
+ gtkBorder.top = defaultBorder;
+ gtkBorder.right = defaultBorder;
+ gtkBorder.bottom = defaultBorder;
+ return gtkBorder;
}
@Override
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Canvas.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Canvas.java
index 81e68c30d5..e5a3478986 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Canvas.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Canvas.java
@@ -175,7 +175,7 @@ long gtk_draw (long widget, long cairo) {
if ( GTK.GTK_VERSION < OS.VERSION(3, 22, 0)) {
boolean isFocus = caret != null && caret.isFocusCaret ();
if (isFocus) caret.killFocus ();
- result = super.gtk_draw (widget, cairo);
+ result = super.gtk_draw (widget, cairo);
if (isFocus) caret.setFocus ();
} else {
result = super.gtk_draw (widget, cairo);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ColorDialog.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ColorDialog.java
index cea49d7de2..510bf686c9 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ColorDialog.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ColorDialog.java
@@ -239,21 +239,21 @@ public void setRGBs(RGB[] rgbs) {
this.rgbs = rgbs;
}
static String[] splitString(String text, char ch) {
- String[] substrings = new String[1];
- int start = 0, pos = 0;
- while (pos != -1) {
- pos = text.indexOf(ch, start);
- if (pos == -1) {
- substrings[substrings.length - 1] = text.substring(start);
- } else {
- substrings[substrings.length - 1] = text.substring(start, pos);
- start = pos + 1;
- String[] newSubstrings = new String[substrings.length+1];
- System.arraycopy(substrings, 0, newSubstrings, 0, substrings.length);
- substrings = newSubstrings;
- }
- }
- return substrings;
+ String[] substrings = new String[1];
+ int start = 0, pos = 0;
+ while (pos != -1) {
+ pos = text.indexOf(ch, start);
+ if (pos == -1) {
+ substrings[substrings.length - 1] = text.substring(start);
+ } else {
+ substrings[substrings.length - 1] = text.substring(start, pos);
+ start = pos + 1;
+ String[] newSubstrings = new String[substrings.length+1];
+ System.arraycopy(substrings, 0, newSubstrings, 0, substrings.length);
+ substrings = newSubstrings;
+ }
+ }
+ return substrings;
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Combo.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Combo.java
index 48e7fa637f..410757b993 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Combo.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Combo.java
@@ -764,7 +764,7 @@ long findMenuHandle() {
long result = 0;
GTK.gtk_container_forall (popupHandle, display.allChildrenProc, 0);
if (display.allChildren != 0) {
- long list = display.allChildren;
+ long list = display.allChildren;
while (list != 0) {
long widget = OS.g_list_data (list);
if (OS.G_OBJECT_TYPE (widget) == GTK.GTK_TYPE_MENU ()) {
@@ -773,8 +773,8 @@ long findMenuHandle() {
}
list = OS.g_list_next (list);
}
- OS.g_list_free (display.allChildren);
- display.allChildren = 0;
+ OS.g_list_free (display.allChildren);
+ display.allChildren = 0;
}
return result;
}
@@ -1662,9 +1662,9 @@ long gtk_insert_text (long widget, long new_text, long new_text_length, long pos
long gtk_key_press_event (long widget, long event) {
long result = super.gtk_key_press_event (widget, event);
if (result != 0) {
- gdkEventKey = 0;
- fixIM ();
- return result;
+ gdkEventKey = 0;
+ fixIM ();
+ return result;
}
if (gdkEventKey == -1) result = 1;
gdkEventKey = 0;
@@ -1676,10 +1676,10 @@ long gtk_key_press_event (long widget, long event) {
switch (eventKeyval[0]) {
case GDK.GDK_Down:
case GDK.GDK_KP_Down:
- if (oldIndex != (items.length - 1)) {
+ if (oldIndex != (items.length - 1)) {
newIndex = oldIndex + 1;
- }
- break;
+ }
+ break;
case GDK.GDK_Up:
case GDK.GDK_KP_Up:
if (oldIndex != -1 && oldIndex != 0) {
@@ -1693,13 +1693,13 @@ long gtk_key_press_event (long widget, long event) {
* gtk_combo_box_entry.
*/
case GDK.GDK_Page_Up:
- case GDK.GDK_KP_Page_Up:
- newIndex = 0;
- break;
- case GDK.GDK_Page_Down:
- case GDK.GDK_KP_Page_Down:
- newIndex = items.length - 1;
- break;
+ case GDK.GDK_KP_Page_Up:
+ newIndex = 0;
+ break;
+ case GDK.GDK_Page_Down:
+ case GDK.GDK_KP_Page_Down:
+ newIndex = items.length - 1;
+ break;
}
if (newIndex != oldIndex) {
GTK.gtk_combo_box_set_active (handle, newIndex);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java
index cd3b5b32a6..a5316e97f3 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java
@@ -2710,7 +2710,7 @@ boolean dragDetect (int x, int y, boolean filter, boolean dragOnTimeout, boolean
* See Bug 503431.
*/
if (!OS.isX11()) { // Wayland
- double [] offsetX = new double[1];
+ double [] offsetX = new double[1];
double [] offsetY = new double [1];
double [] startX = new double[1];
double [] startY = new double [1];
@@ -4679,7 +4679,7 @@ void releaseWidget () {
* should be raised or lowered
*/
void restackWindow (long window, long sibling, boolean above) {
- GDK.gdk_window_restack (window, sibling, above);
+ GDK.gdk_window_restack (window, sibling, above);
}
/**
@@ -4690,7 +4690,7 @@ void restackWindow (long window, long sibling, boolean above) {
* should be raised or lowered
*/
void restackSurface (long surface, long sibling, boolean above) {
- GDK.gdk_surface_restack (surface, sibling, above);
+ GDK.gdk_surface_restack (surface, sibling, above);
}
boolean sendDragEvent (int button, int stateMask, int x, int y, boolean isStateMask) {
@@ -4738,7 +4738,7 @@ void sendFocusEvent (int type) {
}
boolean sendGestureEvent (int stateMask, int detail, int x, int y, double delta) {
- if (containedInRegion(x, y)) return false;
+ if (containedInRegion(x, y)) return false;
switch (detail) {
case SWT.GESTURE_ROTATE: {
return sendGestureEvent(stateMask, detail, x, y, delta, 0, 0, 0);
@@ -5032,23 +5032,23 @@ private void _setBackground (Color color) {
void setBackgroundGdkRGBA (long context, long handle, GdkRGBA rgba) {
GdkRGBA selectedBackground = display.getSystemColor(SWT.COLOR_LIST_SELECTION).handle;
- if (GTK.GTK_VERSION >= OS.VERSION(3, 14, 0)) {
- // Form background string
- String name = GTK.GTK_VERSION >= OS.VERSION(3, 20, 0) ? display.gtk_widget_class_get_css_name(handle)
- : display.gtk_widget_get_name(handle);
- String css = name + " {background-color: " + display.gtk_rgba_to_css_string(rgba) + ";}\n"
- + name + ":selected" + " {background-color: " + display.gtk_rgba_to_css_string(selectedBackground) + ";}";
+ if (GTK.GTK_VERSION >= OS.VERSION(3, 14, 0)) {
+ // Form background string
+ String name = GTK.GTK_VERSION >= OS.VERSION(3, 20, 0) ? display.gtk_widget_class_get_css_name(handle)
+ : display.gtk_widget_get_name(handle);
+ String css = name + " {background-color: " + display.gtk_rgba_to_css_string(rgba) + ";}\n"
+ + name + ":selected" + " {background-color: " + display.gtk_rgba_to_css_string(selectedBackground) + ";}";
- // Cache background
- cssBackground = css;
+ // Cache background
+ cssBackground = css;
- // Apply background color and any cached foreground color
- String finalCss = display.gtk_css_create_css_color_string (cssBackground, cssForeground, SWT.BACKGROUND);
- gtk_css_provider_load_from_css (context, finalCss);
- } else {
- GTK.gtk_widget_override_background_color (handle, GTK.GTK_STATE_FLAG_NORMAL, rgba);
- GTK.gtk_widget_override_background_color(handle, GTK.GTK_STATE_FLAG_SELECTED, selectedBackground);
- }
+ // Apply background color and any cached foreground color
+ String finalCss = display.gtk_css_create_css_color_string (cssBackground, cssForeground, SWT.BACKGROUND);
+ gtk_css_provider_load_from_css (context, finalCss);
+ } else {
+ GTK.gtk_widget_override_background_color (handle, GTK.GTK_STATE_FLAG_NORMAL, rgba);
+ GTK.gtk_widget_override_background_color(handle, GTK.GTK_STATE_FLAG_SELECTED, selectedBackground);
+ }
}
void setBackgroundGradientGdkRGBA (long context, long handle, GdkRGBA rgba) {
@@ -5504,7 +5504,7 @@ void setForegroundGdkRGBA (long handle, GdkRGBA rgba) {
// Form foreground string
String color = display.gtk_rgba_to_css_string(toSet);
String name = GTK.GTK_VERSION >= OS.VERSION(3, 20, 0) ? display.gtk_widget_class_get_css_name(handle)
- : display.gtk_widget_get_name(handle);
+ : display.gtk_widget_get_name(handle);
GdkRGBA selectedForeground = display.COLOR_LIST_SELECTION_TEXT_RGBA;
String selection = GTK.GTK_VERSION >= OS.VERSION(3, 20, 0) &&
!name.contains("treeview") ? " selection" : ":selected";
@@ -5578,7 +5578,7 @@ boolean mustBeVisibleOnInitBounds() {
* TODO currently phase is set to BUBBLE = 2. Look into using groups perhaps.
*/
private void setDragGesture () {
- if (GTK.GTK_VERSION >= OS.VERSION(3, 14, 0)) {
+ if (GTK.GTK_VERSION >= OS.VERSION(3, 14, 0)) {
dragGesture = GTK.gtk_gesture_drag_new (handle);
GTK.gtk_event_controller_set_propagation_phase (dragGesture,
2);
@@ -5586,7 +5586,7 @@ private void setDragGesture () {
OS.g_signal_connect(dragGesture, OS.begin, gestureBegin.getAddress(), this.handle);
OS.g_signal_connect(dragGesture, OS.end, gestureEnd.getAddress(), this.handle);
return;
- }
+ }
}
//private void setPanGesture () {
@@ -5594,7 +5594,7 @@ private void setDragGesture () {
//}
private void setRotateGesture () {
- if (GTK.GTK_VERSION >= OS.VERSION(3, 14, 0)) {
+ if (GTK.GTK_VERSION >= OS.VERSION(3, 14, 0)) {
rotateGesture = GTK.gtk_gesture_rotate_new(handle);
GTK.gtk_event_controller_set_propagation_phase (rotateGesture,
2);
@@ -5602,11 +5602,11 @@ private void setRotateGesture () {
OS.g_signal_connect(rotateGesture, OS.begin, gestureBegin.getAddress(), this.handle);
OS.g_signal_connect(rotateGesture, OS.end, gestureEnd.getAddress(), this.handle);
return;
- }
+ }
}
private void setZoomGesture () {
- if (GTK.GTK_VERSION >= OS.VERSION(3, 14, 0)) {
+ if (GTK.GTK_VERSION >= OS.VERSION(3, 14, 0)) {
zoomGesture = GTK.gtk_gesture_zoom_new(handle);
GTK.gtk_event_controller_set_propagation_phase (zoomGesture,
2);
@@ -5614,7 +5614,7 @@ private void setZoomGesture () {
OS.g_signal_connect(zoomGesture, OS.begin, gestureBegin.getAddress(), this.handle);
OS.g_signal_connect(zoomGesture, OS.end, gestureEnd.getAddress(), this.handle);
return;
- }
+ }
}
static Control getControl(long handle) {
@@ -6115,7 +6115,7 @@ public void setVisible (boolean visible) {
}
void setZOrder (Control sibling, boolean above, boolean fixRelations) {
- setZOrder (sibling, above, fixRelations, true);
+ setZOrder (sibling, above, fixRelations, true);
}
void setZOrder (Control sibling, boolean above, boolean fixRelations, boolean fixChildren) {
@@ -6180,7 +6180,7 @@ void setZOrder (Control sibling, boolean above, boolean fixRelations, boolean fi
if (redrawSurface != 0 && siblingSurface == 0) stack_mode = false;
restackSurface (surface, siblingS, stack_mode);
if (enableSurface != 0) {
- restackSurface (enableSurface, surface, true);
+ restackSurface (enableSurface, surface, true);
}
}
}
@@ -6211,7 +6211,7 @@ void setZOrder (Control sibling, boolean above, boolean fixRelations, boolean fi
if (redrawWindow != 0 && siblingWindow == 0) stack_mode = false;
restackWindow (window, siblingW, stack_mode);
if (enableWindow != 0) {
- restackWindow (enableWindow, window, true);
+ restackWindow (enableWindow, window, true);
}
}
}
@@ -6313,13 +6313,13 @@ void sort (int [] items) {
for (int gap=length/2; gap>0; gap/=2) {
for (int i=gap; i<length; i++) {
for (int j=i-gap; j>=0; j-=gap) {
- if (items [j] <= items [j + gap]) {
+ if (items [j] <= items [j + gap]) {
int swap = items [j];
items [j] = items [j + gap];
items [j + gap] = swap;
- }
- }
- }
+ }
+ }
+ }
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DateTime.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DateTime.java
index ba938b20c1..b4013d8871 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DateTime.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DateTime.java
@@ -919,7 +919,7 @@ long fontHandle () {
private long dateTimeHandle () {
if (isCalendar () && calendarHandle != 0) {
- return calendarHandle;
+ return calendarHandle;
} else if ((isDate () || isTime ())) {
if (GTK.GTK4) {
if (spinButtonHandle != 0) return spinButtonHandle;
@@ -1394,21 +1394,21 @@ void setBackgroundGdkRGBA (long context, long handle, GdkRGBA rgba) {
// We need to override here because DateTime widgets use "background" instead of
// "background-color" as their CSS property.
if (GTK.GTK_VERSION >= OS.VERSION(3, 14, 0)) {
- // Form background string
- String name = GTK.GTK_VERSION >= OS.VERSION(3, 20, 0) ? display.gtk_widget_class_get_css_name(handle)
- : display.gtk_widget_get_name(handle);
- String css = name + " {background: " + display.gtk_rgba_to_css_string (rgba) + ";}\n" +
- name + ":selected" + " {background: " + display.gtk_rgba_to_css_string(display.COLOR_LIST_SELECTION_RGBA) + ";}";
-
- // Cache background
- cssBackground = css;
-
- // Apply background color and any cached foreground color
- String finalCss = display.gtk_css_create_css_color_string (cssBackground, cssForeground, SWT.BACKGROUND);
- gtk_css_provider_load_from_css (context, finalCss);
- } else {
- super.setBackgroundGdkRGBA(context, handle, rgba);
- }
+ // Form background string
+ String name = GTK.GTK_VERSION >= OS.VERSION(3, 20, 0) ? display.gtk_widget_class_get_css_name(handle)
+ : display.gtk_widget_get_name(handle);
+ String css = name + " {background: " + display.gtk_rgba_to_css_string (rgba) + ";}\n" +
+ name + ":selected" + " {background: " + display.gtk_rgba_to_css_string(display.COLOR_LIST_SELECTION_RGBA) + ";}";
+
+ // Cache background
+ cssBackground = css;
+
+ // Apply background color and any cached foreground color
+ String finalCss = display.gtk_css_create_css_color_string (cssBackground, cssForeground, SWT.BACKGROUND);
+ gtk_css_provider_load_from_css (context, finalCss);
+ } else {
+ super.setBackgroundGdkRGBA(context, handle, rgba);
+ }
}
@Override
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Decorations.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Decorations.java
index 619035829b..31b825e3e2 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Decorations.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Decorations.java
@@ -720,10 +720,10 @@ public void setMinimized (boolean minimized) {
@Override
void setOrientation (boolean create) {
- super.setOrientation (create);
- if (!create) {
- if (menuBar != null) menuBar._setOrientation (style & (SWT.RIGHT_TO_LEFT | SWT.LEFT_TO_RIGHT));
- }
+ super.setOrientation (create);
+ if (!create) {
+ if (menuBar != null) menuBar._setOrientation (style & (SWT.RIGHT_TO_LEFT | SWT.LEFT_TO_RIGHT));
+ }
}
void setSavedFocus (Control control) {
@@ -767,16 +767,16 @@ void sort (Image [] images) {
for (int gap=length/2; gap>0; gap/=2) {
for (int i=gap; i<length; i++) {
for (int j=i-gap; j>=0; j-=gap) {
- if (compare (datas [j], datas [j + gap]) >= 0) {
+ if (compare (datas [j], datas [j + gap]) >= 0) {
Image swap = images [j];
images [j] = images [j + gap];
images [j + gap] = swap;
ImageData swapData = datas [j];
datas [j] = datas [j + gap];
datas [j + gap] = swapData;
- }
- }
- }
+ }
+ }
+ }
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java
index 757369b3a3..1896c3477c 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java
@@ -887,7 +887,7 @@ public void asyncExec (Runnable runnable) {
if (isDisposed ()) error (SWT.ERROR_DEVICE_DISPOSED);
synchronized (idleLock) {
if (idleNeeded && idleHandle == 0) {
- //NOTE: calling unlocked function in OS
+ //NOTE: calling unlocked function in OS
idleHandle = OS._g_idle_add (idleProc, 0);
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Link.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Link.java
index 3147f53bd8..74d35d9347 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Link.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Link.java
@@ -783,9 +783,9 @@ public void setLinkForeground (Color color) {
@Override
void setOrientation (boolean create) {
- super.setOrientation (create);
- layout.setOrientation (style & (SWT.LEFT_TO_RIGHT | SWT.RIGHT_TO_LEFT));
- if (!create) redraw (true);
+ super.setOrientation (create);
+ layout.setOrientation (style & (SWT.LEFT_TO_RIGHT | SWT.RIGHT_TO_LEFT));
+ if (!create) redraw (true);
}
/**
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/List.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/List.java
index 08433b8107..5c82b3f469 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/List.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/List.java
@@ -266,11 +266,11 @@ Point computeSizeInPixels (int wHint, int hHint, boolean changed) {
* So if the height is returned as zero calculate the table height
* based on the number of items in the table
*/
- if (size.y == 0 && hHint == SWT.DEFAULT) {
- size.y = getItemCount() * getItemHeightInPixels();
- }
+ if (size.y == 0 && hHint == SWT.DEFAULT) {
+ size.y = getItemCount() * getItemHeightInPixels();
+ }
- /*
+ /*
* In case the table doesn't contain any elements,
* getItemCount returns 0 and size.y will be 0
* so need to assign default height
@@ -950,8 +950,8 @@ long gtk_button_release_event (long widget, long event) {
if ((eventState[0] & (GDK.GDK_CONTROL_MASK|GDK.GDK_SHIFT_MASK)) == 0) {
GTK.gtk_tree_view_set_cursor(handle, path[0], 0, false);
}
- // Check to see if there has been a new tree item selected when holding Control in Path.
- // If not, deselect the item.
+ // Check to see if there has been a new tree item selected when holding Control in Path.
+ // If not, deselect the item.
if ((eventState[0] & GDK.GDK_CONTROL_MASK) != 0 && selectionCountOnRelease == selectionCountOnPress) {
GTK.gtk_tree_selection_unselect_path (selection,path[0]);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Menu.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Menu.java
index 190e45bb5e..4b992d3786 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Menu.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Menu.java
@@ -241,8 +241,8 @@ void _setVisible (boolean visible) {
*/
TrayItem item = display.currentTrayItem;
if (item != null && !item.isDisposed()) {
- data = item.handle;
- address = GTK.gtk_status_icon_position_menu_func ();
+ data = item.handle;
+ address = GTK.gtk_status_icon_position_menu_func ();
}
/*
* Bug in GTK. The timestamp passed into gtk_menu_popup is used
@@ -1170,29 +1170,29 @@ void setLocationInPixels (Point location) {
* @since 3.7
*/
public void setOrientation (int orientation) {
- checkWidget ();
- if ((style & (SWT.BAR | SWT.DROP_DOWN)) != 0) return;
- _setOrientation (orientation);
+ checkWidget ();
+ if ((style & (SWT.BAR | SWT.DROP_DOWN)) != 0) return;
+ _setOrientation (orientation);
}
void _setOrientation (int orientation) {
- int flags = SWT.RIGHT_TO_LEFT | SWT.LEFT_TO_RIGHT;
- if ((orientation & flags) == 0 || (orientation & flags) == flags) return;
- style &= ~flags;
- style |= orientation & flags;
- setOrientation (false);
+ int flags = SWT.RIGHT_TO_LEFT | SWT.LEFT_TO_RIGHT;
+ if ((orientation & flags) == 0 || (orientation & flags) == flags) return;
+ style &= ~flags;
+ style |= orientation & flags;
+ setOrientation (false);
}
@Override
void setOrientation (boolean create) {
- if ((style & SWT.RIGHT_TO_LEFT) != 0 || !create) {
- int dir = (style & SWT.RIGHT_TO_LEFT) != 0 ? GTK.GTK_TEXT_DIR_RTL : GTK.GTK_TEXT_DIR_LTR;
- if (handle != 0) GTK.gtk_widget_set_direction (handle, dir);
- MenuItem [] items = getItems ();
- for (int i = 0; i < items.length; i++) {
- items [i].setOrientation (create);
- }
- }
+ if ((style & SWT.RIGHT_TO_LEFT) != 0 || !create) {
+ int dir = (style & SWT.RIGHT_TO_LEFT) != 0 ? GTK.GTK_TEXT_DIR_RTL : GTK.GTK_TEXT_DIR_LTR;
+ if (handle != 0) GTK.gtk_widget_set_direction (handle, dir);
+ MenuItem [] items = getItems ();
+ for (int i = 0; i < items.length; i++) {
+ items [i].setOrientation (create);
+ }
+ }
}
/**
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MenuItem.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MenuItem.java
index 81196176f5..e95b49733d 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MenuItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MenuItem.java
@@ -954,13 +954,13 @@ public void setMenu (Menu menu) {
@Override
void setOrientation (boolean create) {
- super.setOrientation (create);
- if ((parent.style & SWT.RIGHT_TO_LEFT) != 0 || !create) {
- int dir = (parent.style & SWT.RIGHT_TO_LEFT) != 0 ? GTK.GTK_TEXT_DIR_RTL : GTK.GTK_TEXT_DIR_LTR;
- GTK.gtk_widget_set_direction (handle, dir);
- GTK.gtk_container_forall (handle, display.setDirectionProc, dir);
- if (menu != null) menu._setOrientation (parent.style & (SWT.RIGHT_TO_LEFT | SWT.LEFT_TO_RIGHT));
- }
+ super.setOrientation (create);
+ if ((parent.style & SWT.RIGHT_TO_LEFT) != 0 || !create) {
+ int dir = (parent.style & SWT.RIGHT_TO_LEFT) != 0 ? GTK.GTK_TEXT_DIR_RTL : GTK.GTK_TEXT_DIR_LTR;
+ GTK.gtk_widget_set_direction (handle, dir);
+ GTK.gtk_container_forall (handle, display.setDirectionProc, dir);
+ if (menu != null) menu._setOrientation (parent.style & (SWT.RIGHT_TO_LEFT | SWT.LEFT_TO_RIGHT));
+ }
}
boolean setRadioSelection (boolean value) {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TabFolder.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TabFolder.java
index fc20a5d2e0..21d0e260b2 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TabFolder.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TabFolder.java
@@ -729,20 +729,20 @@ void reskinChildren (int flags) {
@Override
void setBackgroundGdkRGBA (long context, long handle, GdkRGBA rgba) {
- if (GTK.GTK_VERSION >= OS.VERSION(3, 14, 0)) {
- // Form background string
- String name = GTK.GTK_VERSION >= OS.VERSION(3, 20, 0) ? "notebook header" : "GtkNotebook.header";
- String css = name + " {background-color: " + display.gtk_rgba_to_css_string (rgba) + ";}";
-
- // Cache background
- cssBackground = css;
-
- // Apply background color and any cached foreground color
- String finalCss = display.gtk_css_create_css_color_string (cssBackground, cssForeground, SWT.BACKGROUND);
- gtk_css_provider_load_from_css (context, finalCss);
- } else {
- GTK.gtk_widget_override_background_color (handle, GTK.GTK_STATE_FLAG_NORMAL, rgba);
- }
+ if (GTK.GTK_VERSION >= OS.VERSION(3, 14, 0)) {
+ // Form background string
+ String name = GTK.GTK_VERSION >= OS.VERSION(3, 20, 0) ? "notebook header" : "GtkNotebook.header";
+ String css = name + " {background-color: " + display.gtk_rgba_to_css_string (rgba) + ";}";
+
+ // Cache background
+ cssBackground = css;
+
+ // Apply background color and any cached foreground color
+ String finalCss = display.gtk_css_create_css_color_string (cssBackground, cssForeground, SWT.BACKGROUND);
+ gtk_css_provider_load_from_css (context, finalCss);
+ } else {
+ GTK.gtk_widget_override_background_color (handle, GTK.GTK_STATE_FLAG_NORMAL, rgba);
+ }
}
@Override
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java
index 2bb970c8b4..4a539aba02 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java
@@ -728,8 +728,8 @@ void createItem (TableColumn column, int index) {
/*
* Feature in GTK. The tree view does not resize immediately if a table
* column is created when the table is not visible. If the width of the
- * new column is queried, GTK returns an incorrect value. The fix is to
- * ensure that the columns are resized before any queries.
+ * new column is queried, GTK returns an incorrect value. The fix is to
+ * ensure that the columns are resized before any queries.
*/
if(!isVisible ()) {
forceResize();
@@ -1958,7 +1958,7 @@ long getTextRenderer (long column) {
long textRenderer = 0;
while (list != 0) {
long renderer = OS.g_list_data (list);
- if (GTK.GTK_IS_CELL_RENDERER_TEXT (renderer)) {
+ if (GTK.GTK_IS_CELL_RENDERER_TEXT (renderer)) {
textRenderer = renderer;
break;
}
@@ -2226,8 +2226,8 @@ long gtk_button_release_event (long widget, long event) {
if ((eventState[0] & (GDK.GDK_CONTROL_MASK|GDK.GDK_SHIFT_MASK)) == 0) {
GTK.gtk_tree_view_set_cursor(handle, path[0], 0, false);
}
- // Check to see if there has been a new tree item selected when holding Control in Path.
- // If not, deselect the item.
+ // Check to see if there has been a new tree item selected when holding Control in Path.
+ // If not, deselect the item.
if ((eventState[0] & GDK.GDK_CONTROL_MASK) != 0 && selectionCountOnRelease == selectionCountOnPress) {
GTK.gtk_tree_selection_unselect_path (selection,path[0]);
}
@@ -3398,7 +3398,7 @@ void setBackgroundGdkRGBA (long context, long handle, GdkRGBA rgba) {
if (GTK.GTK_VERSION >= OS.VERSION(3, 14, 0)) {
String name = GTK.GTK_VERSION >= OS.VERSION(3, 20, 0) ? "treeview" : "GtkTreeView";
String css = name + " {background-color: " + display.gtk_rgba_to_css_string(background) + ";}\n"
- + name + ":selected {background-color: " + display.gtk_rgba_to_css_string(selectedBackground) + ";}";
+ + name + ":selected {background-color: " + display.gtk_rgba_to_css_string(selectedBackground) + ";}";
// Cache background color
cssBackground = css;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Text.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Text.java
index 1b52111e33..40f22b9fef 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Text.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Text.java
@@ -834,7 +834,7 @@ int getBorderWidthInPixels () {
checkWidget();
if ((style & SWT.MULTI) != 0) return super.getBorderWidthInPixels ();
if ((this.style & SWT.BORDER) != 0) {
- return getThickness (handle).x;
+ return getThickness (handle).x;
}
return 0;
}
@@ -2275,20 +2275,20 @@ void setBackgroundGdkRGBA (long context, long handle, GdkRGBA rgba) {
String properties;
String name;
String selection = GTK.GTK_VERSION >= OS.VERSION(3, 20, 0) ? " selection" : ":selected";
- if ((style & SWT.SINGLE) != 0) {
- name = GTK.GTK_VERSION >= OS.VERSION(3, 20, 0) ? "entry" : "GtkEntry";
- properties = " {background: " + display.gtk_rgba_to_css_string(background) + ";}\n"
- + name + ":selected {background-color: " + display.gtk_rgba_to_css_string(selectedBackground) + ";}\n"
- + name + selection + " {color: " + display.gtk_rgba_to_css_string(selectedForeground) + ";}";
- } else {
- name = GTK.GTK_VERSION >= OS.VERSION(3, 20, 0) ? "textview text" : "GtkTextView";
- properties = " {background-color: " + display.gtk_rgba_to_css_string(background) + ";}\n"
- + name + ":selected {background-color: " + display.gtk_rgba_to_css_string(selectedBackground) + ";}\n"
- + name + selection + " {color: " + display.gtk_rgba_to_css_string(selectedForeground) + ";}";
- }
- css = name + properties;
-
- // Cache background color
+ if ((style & SWT.SINGLE) != 0) {
+ name = GTK.GTK_VERSION >= OS.VERSION(3, 20, 0) ? "entry" : "GtkEntry";
+ properties = " {background: " + display.gtk_rgba_to_css_string(background) + ";}\n"
+ + name + ":selected {background-color: " + display.gtk_rgba_to_css_string(selectedBackground) + ";}\n"
+ + name + selection + " {color: " + display.gtk_rgba_to_css_string(selectedForeground) + ";}";
+ } else {
+ name = GTK.GTK_VERSION >= OS.VERSION(3, 20, 0) ? "textview text" : "GtkTextView";
+ properties = " {background-color: " + display.gtk_rgba_to_css_string(background) + ";}\n"
+ + name + ":selected {background-color: " + display.gtk_rgba_to_css_string(selectedBackground) + ";}\n"
+ + name + selection + " {color: " + display.gtk_rgba_to_css_string(selectedForeground) + ";}";
+ }
+ css = name + properties;
+
+ // Cache background color
cssBackground = css;
// Apply background color and any foreground color
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolBar.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolBar.java
index 7376a23cc5..22c51802f6 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolBar.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolBar.java
@@ -387,7 +387,7 @@ ToolItem [] _getItems () {
*/
public int getRowCount () {
checkWidget();
- /* On GTK, toolbars cannot wrap */
+ /* On GTK, toolbars cannot wrap */
return 1;
}
@@ -626,7 +626,7 @@ void setForegroundGdkRGBA (long handle, GdkRGBA rgba) {
// Form foreground string
String color = display.gtk_rgba_to_css_string(toSet);
String name = GTK.GTK_VERSION >= OS.VERSION(3, 20, 0) ? display.gtk_widget_class_get_css_name(handle)
- : display.gtk_widget_get_name(handle);
+ : display.gtk_widget_get_name(handle);
GdkRGBA selectedForeground = display.COLOR_LIST_SELECTION_TEXT_RGBA;
String selection = GTK.GTK_VERSION >= OS.VERSION(3, 20, 0) ? " selection" : ":selected";
String css = "* {color: " + color + ";}\n"
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolItem.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolItem.java
index 4223d39f02..c4897b4c4f 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolItem.java
@@ -1015,7 +1015,7 @@ void setBackgroundRGBA (long handle, GdkRGBA rgba) {
// Form background string
long context = GTK.gtk_widget_get_style_context(handle);
String name = GTK.GTK_VERSION >= OS.VERSION(3, 20, 0) ? display.gtk_widget_class_get_css_name(handle)
- : display.gtk_widget_get_name(handle);
+ : display.gtk_widget_get_name(handle);
String css = name + " {background-color: " + display.gtk_rgba_to_css_string(rgba) + "}";
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java
index 374bc60e39..af67fbb6c6 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java
@@ -2060,7 +2060,7 @@ TreeItem _getCachedTopItem() {
long iter = OS.g_malloc (GTK.GtkTreeIter_sizeof ());
long data = OS.g_list_data (list);
if (GTK.gtk_tree_model_get_iter (modelHandle, iter, data)) {
- treeSelection = _getItem (iter);
+ treeSelection = _getItem (iter);
}
OS.g_free (iter);
GTK.gtk_tree_path_free (data);
@@ -2306,8 +2306,8 @@ long gtk_button_release_event (long widget, long event) {
if ((eventState[0] & (GDK.GDK_CONTROL_MASK|GDK.GDK_SHIFT_MASK)) == 0) {
GTK.gtk_tree_view_set_cursor(handle, path[0], 0, false);
}
- // Check to see if there has been a new tree item selected when holding Control in Path.
- // If not, deselect the item.
+ // Check to see if there has been a new tree item selected when holding Control in Path.
+ // If not, deselect the item.
if ((eventState[0] & GDK.GDK_CONTROL_MASK) != 0 && selectionCountOnRelease == selectionCountOnPress) {
GTK.gtk_tree_selection_unselect_path (selection,path[0]);
}
@@ -3485,7 +3485,7 @@ void setBackgroundGdkRGBA (long context, long handle, GdkRGBA rgba) {
if (GTK.GTK_VERSION >= OS.VERSION(3, 14, 0)) {
String name = GTK.GTK_VERSION >= OS.VERSION(3, 20, 0) ? "treeview" : "GtkTreeView";
String css = name + " {background-color: " + display.gtk_rgba_to_css_string(background) + ";}\n"
- + name + ":selected {background-color: " + display.gtk_rgba_to_css_string(selectedBackground) + ";}";
+ + name + ":selected {background-color: " + display.gtk_rgba_to_css_string(selectedBackground) + ";}";
// Cache background color
cssBackground = css;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Cursor.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Cursor.java
index 6e2946c31f..3c7149a8ec 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Cursor.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Cursor.java
@@ -340,12 +340,12 @@ void destroy () {
OS.DestroyIcon(handle);
} else {
/*
- * The MSDN states that one should not destroy a shared
- * cursor, that is, one obtained from LoadCursor.
- * However, it does not appear to do any harm, so rather
- * than keep track of how a cursor was created, we just
- * destroy them all. If this causes problems in the future,
- * put the flag back in.
+ * The MSDN states that one should not destroy a shared
+ * cursor, that is, one obtained from LoadCursor.
+ * However, it does not appear to do any harm, so rather
+ * than keep track of how a cursor was created, we just
+ * destroy them all. If this causes problems in the future,
+ * put the flag back in.
*/
OS.DestroyCursor(handle);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/GC.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/GC.java
index 3158b3d157..7bfc551f52 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/GC.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/GC.java
@@ -452,7 +452,7 @@ void copyAreaInPixels(Image image, int x, int y) {
if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
if (image == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
if (image.type != SWT.BITMAP || image.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
- /* Copy the bitmap area */
+ /* Copy the bitmap area */
Rectangle rect = image.getBoundsInPixels();
long /*int*/ memHdc = OS.CreateCompatibleDC(handle);
long /*int*/ hOldBitmap = OS.SelectObject(memHdc, image.handle);
@@ -1067,7 +1067,7 @@ void drawIcon(Image srcImage, int srcX, int srcY, int srcWidth, int srcHeight, i
OS.DrawIconEx(handle, destX - offsetX, destY - offsetY, srcImage.handle, 0, 0, 0, 0, flags);
if (offsetX != 0 || offsetY != 0) OS.SetWindowOrgEx(handle, offsetX, offsetY, null);
} else {
- /* Create the icon info and HDC's */
+ /* Create the icon info and HDC's */
ICONINFO newIconInfo = new ICONINFO();
newIconInfo.fIcon = true;
long /*int*/ srcHdc = OS.CreateCompatibleDC(handle);
@@ -1287,9 +1287,9 @@ void drawBitmapAlpha(Image srcImage, int srcX, int srcY, int srcWidth, int srcHe
byte[] destData = new byte[sizeInBytes];
OS.MoveMemory(destData, dibBM.bmBits, sizeInBytes);
- /* Get the foreground pixels */
- OS.BitBlt(memHdc, 0, 0, srcWidth, srcHeight, srcHdc, srcX, srcY, OS.SRCCOPY);
- byte[] srcData = new byte[sizeInBytes];
+ /* Get the foreground pixels */
+ OS.BitBlt(memHdc, 0, 0, srcWidth, srcHeight, srcHdc, srcX, srcY, OS.SRCCOPY);
+ byte[] srcData = new byte[sizeInBytes];
OS.MoveMemory(srcData, dibBM.bmBits, sizeInBytes);
/* Merge the alpha channel in place */
@@ -4830,7 +4830,7 @@ public void setTransform(Transform transform) {
initGdip();
long /*int*/ identity = identity();
if (transform != null) {
- Gdip.Matrix_Multiply(identity, transform.handle, Gdip.MatrixOrderPrepend);
+ Gdip.Matrix_Multiply(identity, transform.handle, Gdip.MatrixOrderPrepend);
}
Gdip.Graphics_SetTransform(data.gdipGraphics, identity);
Gdip.Matrix_delete(identity);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Image.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Image.java
index e8e2f61a12..25af16c849 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Image.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Image.java
@@ -940,16 +940,16 @@ void initNative(String filename) {
OS.MoveMemory(data, pixels, data.length);
switch (bitmapData.PixelFormat) {
case Gdip.PixelFormat16bppARGB1555:
- alphaData = new byte[width * height];
- for (int i = 1, j = 0; i < data.length; i += 2, j++) {
- alphaData[j] = (byte)((data[i] & 0x80) != 0 ? 255 : 0);
- }
+ alphaData = new byte[width * height];
+ for (int i = 1, j = 0; i < data.length; i += 2, j++) {
+ alphaData[j] = (byte)((data[i] & 0x80) != 0 ? 255 : 0);
+ }
break;
case Gdip.PixelFormat32bppARGB:
- alphaData = new byte[width * height];
- for (int i = 3, j = 0; i < data.length; i += 4, j++) {
- alphaData[j] = data[i];
- }
+ alphaData = new byte[width * height];
+ for (int i = 3, j = 0; i < data.length; i += 4, j++) {
+ alphaData[j] = data[i];
+ }
break;
}
ImageData img = new ImageData(width, height, depth, paletteData, scanlinePad, data);
@@ -957,7 +957,7 @@ void initNative(String filename) {
img.alphaData = alphaData;
init(img);
}
- Gdip.Bitmap_UnlockBits(bitmap, lockedBitmapData);
+ Gdip.Bitmap_UnlockBits(bitmap, lockedBitmapData);
} else {
error = SWT.ERROR_INVALID_IMAGE;
}
@@ -992,9 +992,9 @@ long /*int*/ [] createGdipImage() {
BITMAP dibBM = new BITMAP();
OS.GetObject(memDib, BITMAP.sizeof, dibBM);
int sizeInBytes = dibBM.bmWidthBytes * dibBM.bmHeight;
- OS.BitBlt(memHdc, 0, 0, imgWidth, imgHeight, srcHdc, 0, 0, OS.SRCCOPY);
- byte red = 0, green = 0, blue = 0;
- if (transparentPixel != -1) {
+ OS.BitBlt(memHdc, 0, 0, imgWidth, imgHeight, srcHdc, 0, 0, OS.SRCCOPY);
+ byte red = 0, green = 0, blue = 0;
+ if (transparentPixel != -1) {
if (bm.bmBitsPixel <= 8) {
byte[] color = new byte[4];
OS.GetDIBColorTable(srcHdc, transparentPixel, 1, color);
@@ -1029,12 +1029,12 @@ long /*int*/ [] createGdipImage() {
break;
}
}
- }
+ }
OS.SelectObject(srcHdc, oldSrcBitmap);
OS.SelectObject(memHdc, oldMemBitmap);
OS.DeleteObject(srcHdc);
OS.DeleteObject(memHdc);
- byte[] srcData = new byte[sizeInBytes];
+ byte[] srcData = new byte[sizeInBytes];
OS.MoveMemory(srcData, dibBM.bmBits, sizeInBytes);
OS.DeleteObject(memDib);
device.internal_dispose_GC(hDC, null);
@@ -1104,10 +1104,10 @@ long /*int*/ [] createGdipImage() {
long /*int*/ oldMemBitmap = OS.SelectObject(memHdc, memDib);
BITMAP dibBM = new BITMAP();
OS.GetObject(memDib, BITMAP.sizeof, dibBM);
- OS.BitBlt(memHdc, 0, 0, imgWidth, imgHeight, srcHdc, 0, hBitmap == iconInfo.hbmMask ? imgHeight : 0, OS.SRCCOPY);
+ OS.BitBlt(memHdc, 0, 0, imgWidth, imgHeight, srcHdc, 0, hBitmap == iconInfo.hbmMask ? imgHeight : 0, OS.SRCCOPY);
OS.SelectObject(memHdc, oldMemBitmap);
OS.DeleteObject(memHdc);
- byte[] srcData = new byte[dibBM.bmWidthBytes * dibBM.bmHeight];
+ byte[] srcData = new byte[dibBM.bmWidthBytes * dibBM.bmHeight];
OS.MoveMemory(srcData, dibBM.bmBits, srcData.length);
OS.DeleteObject(memDib);
OS.SelectObject(srcHdc, iconInfo.hbmMask);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/internal/ImageList.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/internal/ImageList.java
index 14ee7c26bc..3859a51c39 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/internal/ImageList.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/internal/ImageList.java
@@ -143,9 +143,9 @@ long /*int*/ copyWithAlpha (long /*int*/ hBitmap, int background, byte[] alphaDa
OS.GetObject (memDib, BITMAP.sizeof, dibBM);
int sizeInBytes = dibBM.bmWidthBytes * dibBM.bmHeight;
- /* Get the foreground pixels */
- OS.BitBlt (memHdc, 0, 0, srcWidth, srcHeight, srcHdc, 0, 0, OS.SRCCOPY);
- byte[] srcData = new byte [sizeInBytes];
+ /* Get the foreground pixels */
+ OS.BitBlt (memHdc, 0, 0, srcWidth, srcHeight, srcHdc, 0, 0, OS.SRCCOPY);
+ byte[] srcData = new byte [sizeInBytes];
OS.MoveMemory (srcData, dibBM.bmBits, sizeInBytes);
/* Merge the alpha channel in place */
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Combo.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Combo.java
index 66623517f1..cd4c2404e9 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Combo.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Combo.java
@@ -440,15 +440,15 @@ void applyListSegments () {
}
while (index-- > 0) {
buffer = null;
- if (add) {
+ if (add) {
int length = (int)/*64*/OS.SendMessage (handle, OS.CB_GETLBTEXTLEN, index, 0);
if (length == OS.CB_ERR) error (SWT.ERROR);
buffer = new TCHAR (cp, length + 1);
if (OS.SendMessage (handle, OS.CB_GETLBTEXT, index, buffer) == OS.CB_ERR) return;
items [index] = string = buffer.toString (0, length);
- } else {
- string = items [index];
- }
+ } else {
+ string = items [index];
+ }
if (OS.SendMessage (handle, OS.CB_DELETESTRING, index, 0) == OS.CB_ERR) return;
if (buffer == null) buffer = new TCHAR (cp, string, true);
if (OS.SendMessage (handle, OS.CB_INSERTSTRING, index, buffer) == OS.CB_ERR) return;
@@ -556,7 +556,7 @@ void clearSegments (boolean applyText) {
if (nSegments == 0) return;
long /*int*/ hwndText = OS.GetDlgItem (handle, CBID_EDIT);
int/*64*/ limit = (int/*64*/)OS.SendMessage (hwndText, OS.EM_GETLIMITTEXT, 0, 0) & 0x7fffffff;
- if (limit < LIMIT) {
+ if (limit < LIMIT) {
OS.SendMessage (hwndText, OS.EM_SETLIMITTEXT, Math.max (1, limit - nSegments), 0);
}
if (!applyText) {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java
index 61cacd758f..6f8f72bd84 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java
@@ -1046,7 +1046,7 @@ char findMnemonic (String string) {
if (string.charAt (index) != '&') return string.charAt (index);
index++;
} while (index < length);
- return '\0';
+ return '\0';
}
void fixChildren (Shell newShell, Shell oldShell, Decorations newDecorations, Decorations oldDecorations, Menu [] menus) {
@@ -3046,7 +3046,7 @@ boolean sendGestureEvent (GESTUREINFO gi) {
break;
}
- if (type == 0) return true;
+ if (type == 0) return true;
setInputState (event, type);
sendEvent (type, event);
return event.doit;
@@ -3968,13 +3968,13 @@ void sort (int [] items) {
for (int gap=length/2; gap>0; gap/=2) {
for (int i=gap; i<length; i++) {
for (int j=i-gap; j>=0; j-=gap) {
- if (items [j] <= items [j + gap]) {
+ if (items [j] <= items [j + gap]) {
int swap = items [j];
items [j] = items [j + gap];
items [j + gap] = swap;
- }
- }
- }
+ }
+ }
+ }
}
}
@@ -5394,7 +5394,7 @@ LRESULT WM_RBUTTONUP (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT WM_SETCURSOR (long /*int*/ wParam, long /*int*/ lParam) {
int hitTest = (short) OS.LOWORD (lParam);
- if (hitTest == OS.HTCLIENT) {
+ if (hitTest == OS.HTCLIENT) {
Control control = display.getControl (wParam);
if (control == null) return null;
Cursor cursor = control.findCursor ();
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Decorations.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Decorations.java
index 97e04a6c81..112577a494 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Decorations.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Decorations.java
@@ -1090,15 +1090,15 @@ public void setMinimized (boolean minimized) {
@Override
public void setOrientation (int orientation) {
- super.setOrientation (orientation);
- if (menus != null) {
- for (int i=0; i<menus.length; i++) {
- Menu menu = menus [i];
- if (menu != null && !menu.isDisposed () && (menu.getStyle () & SWT.POP_UP) != 0) {
- menu._setOrientation (menu.getOrientation ());
- }
- }
- }
+ super.setOrientation (orientation);
+ if (menus != null) {
+ for (int i=0; i<menus.length; i++) {
+ Menu menu = menus [i];
+ if (menu != null && !menu.isDisposed () && (menu.getStyle () & SWT.POP_UP) != 0) {
+ menu._setOrientation (menu.getOrientation ());
+ }
+ }
+ }
}
void setParent () {
@@ -1339,16 +1339,16 @@ void sort (Image [] images, ImageData [] datas, int width, int height, int depth
for (int gap=length/2; gap>0; gap/=2) {
for (int i=gap; i<length; i++) {
for (int j=i-gap; j>=0; j-=gap) {
- if (compare (datas [j], datas [j + gap], width, height, depth) >= 0) {
+ if (compare (datas [j], datas [j + gap], width, height, depth) >= 0) {
Image swap = images [j];
images [j] = images [j + gap];
images [j + gap] = swap;
ImageData swapData = datas [j];
datas [j] = datas [j + gap];
datas [j + gap] = swapData;
- }
- }
- }
+ }
+ }
+ }
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/DirectoryDialog.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/DirectoryDialog.java
index 4cf84ac2cb..50b3be4d3f 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/DirectoryDialog.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/DirectoryDialog.java
@@ -46,7 +46,7 @@ public class DirectoryDialog extends Dialog {
OS.IIDFromString("{DC1C5A9C-E88A-4dde-A5A1-60F82A20AEF7}\0".toCharArray(), CLSID_FileOpenDialog); //$NON-NLS-1$
OS.IIDFromString("{d57c7288-d4ad-4768-be02-9d969532d960}\0".toCharArray(), IID_IFileOpenDialog); //$NON-NLS-1$
OS.IIDFromString("{43826d1e-e718-42ee-bc55-a1e261c37bfe}\0".toCharArray(), IID_IShellItem); //$NON-NLS-1$
- }
+ }
String message = "", filterPath = ""; //$NON-NLS-1$//$NON-NLS-2$
String directoryPath;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Display.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Display.java
index 0aad7e5b74..1aa83e1836 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Display.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Display.java
@@ -865,9 +865,9 @@ static long /*int*/ create32bitDIB (Image image) {
BITMAP dibBM = new BITMAP ();
OS.GetObject (memDib, BITMAP.sizeof, dibBM);
int sizeInBytes = dibBM.bmWidthBytes * dibBM.bmHeight;
- OS.BitBlt (memHdc, 0, 0, imgWidth, imgHeight, srcHdc, 0, 0, OS.SRCCOPY);
- byte red = 0, green = 0, blue = 0;
- if (transparentPixel != -1) {
+ OS.BitBlt (memHdc, 0, 0, imgWidth, imgHeight, srcHdc, 0, 0, OS.SRCCOPY);
+ byte red = 0, green = 0, blue = 0;
+ if (transparentPixel != -1) {
if (bm.bmBitsPixel <= 8) {
byte [] color = new byte [4];
OS.GetDIBColorTable (srcHdc, transparentPixel, 1, color);
@@ -893,8 +893,8 @@ static long /*int*/ create32bitDIB (Image image) {
break;
}
}
- }
- byte [] srcData = new byte [sizeInBytes];
+ }
+ byte [] srcData = new byte [sizeInBytes];
OS.MoveMemory (srcData, pBits [0], sizeInBytes);
if (hMask != 0) {
OS.SelectObject(srcHdc, hMask);
@@ -995,9 +995,9 @@ static long /*int*/ create32bitDIB (long /*int*/ hBitmap, int alpha, byte [] alp
BITMAP dibBM = new BITMAP ();
OS.GetObject (memDib, BITMAP.sizeof, dibBM);
int sizeInBytes = dibBM.bmWidthBytes * dibBM.bmHeight;
- OS.BitBlt (memHdc, 0, 0, imgWidth, imgHeight, srcHdc, 0, 0, OS.SRCCOPY);
- byte red = 0, green = 0, blue = 0;
- if (transparentPixel != -1) {
+ OS.BitBlt (memHdc, 0, 0, imgWidth, imgHeight, srcHdc, 0, 0, OS.SRCCOPY);
+ byte red = 0, green = 0, blue = 0;
+ if (transparentPixel != -1) {
if (bm.bmBitsPixel <= 8) {
byte [] color = new byte [4];
OS.GetDIBColorTable (srcHdc, transparentPixel, 1, color);
@@ -1023,13 +1023,13 @@ static long /*int*/ create32bitDIB (long /*int*/ hBitmap, int alpha, byte [] alp
break;
}
}
- }
+ }
OS.SelectObject (srcHdc, oldSrcBitmap);
OS.SelectObject (memHdc, oldMemBitmap);
OS.DeleteObject (srcHdc);
OS.DeleteObject (memHdc);
OS.ReleaseDC (0, hDC);
- byte [] srcData = new byte [sizeInBytes];
+ byte [] srcData = new byte [sizeInBytes];
OS.MoveMemory (srcData, pBits [0], sizeInBytes);
if (alpha != -1) {
for (int y = 0, dp = 0; y < imgHeight; ++y) {
@@ -2738,7 +2738,7 @@ public void internal_dispose_GC (long /*int*/ hDC, GCData data) {
boolean isXMouseActive () {
/*
* NOTE: X-Mouse is active when bit 1 of the UserPreferencesMask is set.
- */
+ */
boolean xMouseActive = false;
TCHAR key = new TCHAR (0, "Control Panel\\Desktop", true); //$NON-NLS-1$
long /*int*/ [] phKey = new long /*int*/ [1];
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ExpandBar.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ExpandBar.java
index 053a20d1ab..8b85c43964 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ExpandBar.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ExpandBar.java
@@ -821,7 +821,7 @@ LRESULT WM_SETCURSOR (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_SETCURSOR (wParam, lParam);
if (result != null) return result;
int hitTest = (short) OS.LOWORD (lParam);
- if (hitTest == OS.HTCLIENT) {
+ if (hitTest == OS.HTCLIENT) {
for (int i = 0; i < itemCount; i++) {
ExpandItem item = items [i];
if (item.hover) {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/FileDialog.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/FileDialog.java
index 9c7e8fd3d8..a04c0608cc 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/FileDialog.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/FileDialog.java
@@ -218,9 +218,9 @@ long /*int*/ OFNHookProc (long /*int*/ hdlg, long /*int*/ uiMsg, long /*int*/ wP
OS.MoveMemory (ofn.lpOFN, lpofn, OPENFILENAME.sizeof);
}
}
- }
- }
- break;
+ }
+ }
+ break;
}
return 0;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/IME.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/IME.java
index 9e3e860ae6..8d1b099210 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/IME.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/IME.java
@@ -545,9 +545,9 @@ LRESULT WM_KEYDOWN (long /*int*/ wParam, long /*int*/ lParam) {
}
if (event.text != null && event.text.length() > 0) {
int length = event.text.length();
- if (length > 1) {
- event.end = event.start + 1;
- }
+ if (length > 1) {
+ event.end = event.start + 1;
+ }
long /*int*/ hwnd = parent.handle;
long /*int*/ hIMC = OS.ImmGetContext (hwnd);
TCHAR buffer = new TCHAR (0, event.text, true);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/List.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/List.java
index 0aa83f7cb3..e393f1abcd 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/List.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/List.java
@@ -253,7 +253,7 @@ static int checkStyle (int style) {
if (hHint == SWT.DEFAULT) {
int count = (int)/*64*/OS.SendMessage (handle, OS.LB_GETCOUNT, 0, 0);
int itemHeight = (int)/*64*/OS.SendMessage (handle, OS.LB_GETITEMHEIGHT, 0, 0);
- height = count * itemHeight;
+ height = count * itemHeight;
}
if (width == 0) width = DEFAULT_WIDTH;
if (height == 0) height = DEFAULT_HEIGHT;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Menu.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Menu.java
index 3a7bb7164b..3f4b7dcd23 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Menu.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Menu.java
@@ -1232,21 +1232,21 @@ public void setLocation (Point location) {
* @since 3.7
*/
public void setOrientation (int orientation) {
- checkWidget ();
- if ((style & (SWT.BAR | SWT.DROP_DOWN)) != 0) return;
- _setOrientation (orientation);
+ checkWidget ();
+ if ((style & (SWT.BAR | SWT.DROP_DOWN)) != 0) return;
+ _setOrientation (orientation);
}
void _setOrientation (int orientation) {
- int flags = SWT.RIGHT_TO_LEFT | SWT.LEFT_TO_RIGHT;
- if ((orientation & flags) == 0 || (orientation & flags) == flags) return;
- style &= ~flags;
- style |= orientation & flags;
- style &= ~SWT.FLIP_TEXT_DIRECTION;
- MenuItem [] itms = getItems ();
- for (int i=0; i<itms.length; i++) {
- itms [i].setOrientation (orientation);
- }
+ int flags = SWT.RIGHT_TO_LEFT | SWT.LEFT_TO_RIGHT;
+ if ((orientation & flags) == 0 || (orientation & flags) == flags) return;
+ style &= ~flags;
+ style |= orientation & flags;
+ style &= ~SWT.FLIP_TEXT_DIRECTION;
+ MenuItem [] itms = getItems ();
+ for (int i=0; i<itms.length; i++) {
+ itms [i].setOrientation (orientation);
+ }
}
/**
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/MenuItem.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/MenuItem.java
index 97138d6755..e29920f5dc 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/MenuItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/MenuItem.java
@@ -913,13 +913,13 @@ boolean setRadioSelection (boolean value) {
}
void setOrientation (int orientation) {
- long /*int*/ hMenu = parent.handle;
- MENUITEMINFO info = new MENUITEMINFO ();
- info.cbSize = MENUITEMINFO.sizeof;
- info.fMask = OS.MIIM_FTYPE;
- info.fType = widgetStyle ();
- OS.SetMenuItemInfo (hMenu, id, false, info);
- if (menu != null) menu._setOrientation (orientation);
+ long /*int*/ hMenu = parent.handle;
+ MENUITEMINFO info = new MENUITEMINFO ();
+ info.cbSize = MENUITEMINFO.sizeof;
+ info.fMask = OS.MIIM_FTYPE;
+ info.fType = widgetStyle ();
+ OS.SetMenuItemInfo (hMenu, id, false, info);
+ if (menu != null) menu._setOrientation (orientation);
}
/**
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Sash.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Sash.java
index 959fc05a01..886379ba00 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Sash.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Sash.java
@@ -397,13 +397,13 @@ LRESULT WM_SETCURSOR (long /*int*/ wParam, long /*int*/ lParam) {
LRESULT result = super.WM_SETCURSOR (wParam, lParam);
if (result != null) return result;
int hitTest = (short) OS.LOWORD (lParam);
- if (hitTest == OS.HTCLIENT) {
- long /*int*/ hCursor = 0;
- if ((style & SWT.HORIZONTAL) != 0) {
+ if (hitTest == OS.HTCLIENT) {
+ long /*int*/ hCursor = 0;
+ if ((style & SWT.HORIZONTAL) != 0) {
hCursor = OS.LoadCursor (0, OS.IDC_SIZENS);
- } else {
+ } else {
hCursor = OS.LoadCursor (0, OS.IDC_SIZEWE);
- }
+ }
OS.SetCursor (hCursor);
return LRESULT.ONE;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Scale.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Scale.java
index 2b78ffd3e4..b5119af1ff 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Scale.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Scale.java
@@ -475,7 +475,7 @@ LRESULT WM_KEYDOWN (long /*int*/ wParam, long /*int*/ lParam) {
* The fix is to replace VK_LEFT by VK_RIGHT and VK_RIGHT by VK_LEFT
* when the current orientation differs from the orientation used to
* create the control.
- */
+ */
boolean isRTL = (style & SWT.RIGHT_TO_LEFT) != 0;
if (isRTL != createdAsRTL) {
long /*int*/ code = callWindowProc (handle, OS.WM_KEYDOWN, wParam == OS.VK_RIGHT ? OS.VK_LEFT : OS.VK_RIGHT, lParam);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Scrollable.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Scrollable.java
index 81a335f82d..c82dc1f750 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Scrollable.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Scrollable.java
@@ -43,7 +43,7 @@ public abstract class Scrollable extends Control {
* The regular expression used to determine the string which should be deleted
* when Ctrl+Bs is hit.
*/
- static final java.util.regex.Pattern CTRL_BS_PATTERN =
+ static final java.util.regex.Pattern CTRL_BS_PATTERN =
java.util.regex.Pattern.compile ("\\r?\\n\\z|[\\p{Punct}]+[\\t ]*\\z|[^\\p{Punct}\\s\\n\\r]*[\\t ]*\\z");
/**
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Slider.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Slider.java
index a3e9d04da7..94b0c0f8e1 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Slider.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Slider.java
@@ -643,29 +643,29 @@ long /*int*/ windowProc () {
@Override
LRESULT WM_KEYDOWN (long /*int*/ wParam, long /*int*/ lParam) {
- LRESULT result = super.WM_KEYDOWN (wParam, lParam);
- if (result != null) return result;
- if ((style & SWT.VERTICAL) != 0) return result;
- /*
- * Bug in Windows. When a horizontal scroll bar is mirrored,
- * the native control does not correctly swap the arrow keys.
- * The fix is to swap them before calling the scroll bar window
- * proc.
- *
- * NOTE: This fix is not ideal. It breaks when the bug is fixed
- * in the operating system.
- */
+ LRESULT result = super.WM_KEYDOWN (wParam, lParam);
+ if (result != null) return result;
+ if ((style & SWT.VERTICAL) != 0) return result;
+ /*
+ * Bug in Windows. When a horizontal scroll bar is mirrored,
+ * the native control does not correctly swap the arrow keys.
+ * The fix is to swap them before calling the scroll bar window
+ * proc.
+ *
+ * NOTE: This fix is not ideal. It breaks when the bug is fixed
+ * in the operating system.
+ */
if ((style & SWT.MIRRORED) != 0) {
- switch ((int)/*64*/wParam) {
- case OS.VK_LEFT:
+ switch ((int)/*64*/wParam) {
+ case OS.VK_LEFT:
case OS.VK_RIGHT: {
int key = wParam == OS.VK_LEFT ? OS.VK_RIGHT : OS.VK_LEFT;
long /*int*/ code = callWindowProc (handle, OS.WM_KEYDOWN, key, lParam);
- return new LRESULT (code);
- }
- }
+ return new LRESULT (code);
+ }
+ }
}
- return result;
+ return result;
}
@Override
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Spinner.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Spinner.java
index 1c5c4cb0b0..5fff0cf3c2 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Spinner.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Spinner.java
@@ -153,15 +153,15 @@ void createHandle () {
if ((style & SWT.READ_ONLY) != 0) textStyle |= OS.ES_READONLY;
if ((style & SWT.RIGHT_TO_LEFT) != 0) textExStyle |= OS.WS_EX_LAYOUTRTL;
hwndText = OS.CreateWindowEx (
- textExStyle,
- EditClass,
- null,
- textStyle,
- 0, 0, 0, 0,
- handle,
- 0,
- hInstance,
- null);
+ textExStyle,
+ EditClass,
+ null,
+ textStyle,
+ 0, 0, 0, 0,
+ handle,
+ 0,
+ hInstance,
+ null);
if (hwndText == 0) error (SWT.ERROR_NO_HANDLES);
OS.SetWindowLongPtr (hwndText, OS.GWLP_ID, hwndText);
int upDownStyle = OS.WS_CHILD | OS.WS_VISIBLE | OS.UDS_AUTOBUDDY;
@@ -174,15 +174,15 @@ void createHandle () {
}
}
hwndUpDown = OS.CreateWindowEx (
- 0,
- UpDownClass,
- null,
- upDownStyle,
- 0, 0, 0, 0,
- handle,
- 0,
- hInstance,
- null);
+ 0,
+ UpDownClass,
+ null,
+ upDownStyle,
+ 0, 0, 0, 0,
+ handle,
+ 0,
+ hInstance,
+ null);
if (hwndUpDown == 0) error (SWT.ERROR_NO_HANDLES);
int flags = OS.SWP_NOSIZE | OS.SWP_NOMOVE | OS.SWP_NOACTIVATE;
OS.SetWindowPos (hwndText, hwndUpDown, 0, 0, 0, 0, flags);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TabFolder.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TabFolder.java
index ea336bef0c..adbae64c5e 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TabFolder.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TabFolder.java
@@ -922,7 +922,7 @@ LRESULT WM_KEYDOWN (long /*int*/ wParam, long /*int*/ lParam) {
* The fix is to replace VK_LEFT by VK_RIGHT and VK_RIGHT by VK_LEFT
* when the current orientation differs from the orientation used to
* create the control.
- */
+ */
boolean isRTL = (style & SWT.RIGHT_TO_LEFT) != 0;
if (isRTL != createdAsRTL) {
long /*int*/ code = callWindowProc (handle, OS.WM_KEYDOWN, wParam == OS.VK_RIGHT ? OS.VK_LEFT : OS.VK_RIGHT, lParam);
@@ -1022,7 +1022,7 @@ LRESULT WM_PARENTNOTIFY (long /*int*/ wParam, long /*int*/ lParam) {
switch (code) {
case OS.WM_CREATE: {
int id = OS.HIWORD (wParam);
- long /*int*/ hwnd = lParam;
+ long /*int*/ hwnd = lParam;
if (id == ID_UPDOWN) {
int bits = OS.GetWindowLong (hwnd, OS.GWL_EXSTYLE);
OS.SetWindowLong (hwnd, OS.GWL_EXSTYLE, bits | OS.WS_EX_LAYOUTRTL);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Table.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Table.java
index 90f908fd0b..4cf3fba318 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Table.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Table.java
@@ -288,26 +288,26 @@ TableItem _getItem (int index, boolean create, int count) {
if ((style & SWT.VIRTUAL) == 0 || !create) {
return keyIndex < 0 ? null : items [keyIndex];
}
- if (keyIndex < 0) {
- if (count == -1) {
- count = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
- }
- //TODO - _checkGrow() doesn't return a value, check keys == null instead
- if (_checkGrow (count)) {
- if (items [index] != null) return items [index];
- return items [index] = new TableItem (this, SWT.NONE, -1, false);
- }
- keyIndex = -keyIndex - 1;
- if (keyIndex < keyCount) {
- System.arraycopy(keys, keyIndex, keys, keyIndex + 1, keyCount - keyIndex);
- System.arraycopy(items, keyIndex, items, keyIndex + 1, keyCount - keyIndex);
- }
- keyCount++;
- keys [keyIndex] = index;
- } else {
- if (items [keyIndex] != null) return items [keyIndex];
- }
- return items [keyIndex] = new TableItem (this, SWT.NONE, -1, false);
+ if (keyIndex < 0) {
+ if (count == -1) {
+ count = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
+ }
+ //TODO - _checkGrow() doesn't return a value, check keys == null instead
+ if (_checkGrow (count)) {
+ if (items [index] != null) return items [index];
+ return items [index] = new TableItem (this, SWT.NONE, -1, false);
+ }
+ keyIndex = -keyIndex - 1;
+ if (keyIndex < keyCount) {
+ System.arraycopy(keys, keyIndex, keys, keyIndex + 1, keyCount - keyIndex);
+ System.arraycopy(items, keyIndex, items, keyIndex + 1, keyCount - keyIndex);
+ }
+ keyCount++;
+ keys [keyIndex] = index;
+ } else {
+ if (items [keyIndex] != null) return items [keyIndex];
+ }
+ return items [keyIndex] = new TableItem (this, SWT.NONE, -1, false);
}
}
@@ -344,13 +344,13 @@ void _insertItem (int index, TableItem item, int count) {
items [index] = item;
} else {
int keyIndex = binarySearch (keys, 0, keyCount, index);
- if (keyIndex < 0) keyIndex = -keyIndex - 1;
- System.arraycopy(keys, keyIndex, keys, keyIndex + 1, keyCount - keyIndex);
- keys [keyIndex] = index;
- System.arraycopy(items, keyIndex, items, keyIndex + 1, keyCount - keyIndex);
- items [keyIndex] = item;
- keyCount++;
- for (int i=keyIndex + 1; i<keyCount; i++) keys[i]++;
+ if (keyIndex < 0) keyIndex = -keyIndex - 1;
+ System.arraycopy(keys, keyIndex, keys, keyIndex + 1, keyCount - keyIndex);
+ keys [keyIndex] = index;
+ System.arraycopy(items, keyIndex, items, keyIndex + 1, keyCount - keyIndex);
+ items [keyIndex] = item;
+ keyCount++;
+ for (int i=keyIndex + 1; i<keyCount; i++) keys[i]++;
}
}
@@ -360,16 +360,16 @@ void _removeItem (int index, int count) {
items [count] = null;
} else {
int keyIndex = binarySearch (keys, 0, keyCount, index);
- if (keyIndex < 0) {
- keyIndex = -keyIndex - 1;
- } else {
- --keyCount;
- System.arraycopy (keys, keyIndex + 1, keys, keyIndex, keyCount - keyIndex);
- keys [keyCount] = 0;
- System.arraycopy (items, keyIndex + 1, items, keyIndex, keyCount - keyIndex);
- items [keyCount] = null;
- }
- for (int i=keyIndex; i<keyCount; i++) --keys[i];
+ if (keyIndex < 0) {
+ keyIndex = -keyIndex - 1;
+ } else {
+ --keyCount;
+ System.arraycopy (keys, keyIndex + 1, keys, keyIndex, keyCount - keyIndex);
+ keys [keyCount] = 0;
+ System.arraycopy (items, keyIndex + 1, items, keyIndex, keyCount - keyIndex);
+ items [keyCount] = null;
+ }
+ for (int i=keyIndex; i<keyCount; i++) --keys[i];
}
}
@@ -403,9 +403,9 @@ void _setItemCount (int count, int itemCount) {
} else {
int index = Math.min (count, itemCount);
keyCount = binarySearch (keys, 0, keyCount, index);
- if (keyCount < 0) keyCount = -keyCount - 1;
- int length = Math.max (4, (keyCount + 3) / 4 * 4);
- int [] newKeys = new int [length];
+ if (keyCount < 0) keyCount = -keyCount - 1;
+ int length = Math.max (4, (keyCount + 3) / 4 * 4);
+ int [] newKeys = new int [length];
System.arraycopy (keys, 0, newKeys, 0, keyCount);
keys = newKeys;
TableItem [] newItems = new TableItem [length];
@@ -3278,8 +3278,8 @@ public void select (int [] indices) {
for (int i=length-1; i>=0; --i) {
/*
* An index of -1 will apply the change to all
- * items. Ensure that indices are greater than -1.
- */
+ * items. Ensure that indices are greater than -1.
+ */
if (indices [i] >= 0) {
ignoreSelect = true;
OS.SendMessage (handle, OS.LVM_SETITEMSTATE, indices [i], lvItem);
@@ -5600,7 +5600,7 @@ void updateOrientation () {
imageList = display.getImageList (style & SWT.RIGHT_TO_LEFT, size.x, size.y);
int count = (int)/*64*/OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
for (int i = 0; i < count; i++) {
- TableItem item = _getItem (i, false);
+ TableItem item = _getItem (i, false);
if (item != null) {
Image image = item.image;
if (image != null) {
@@ -7070,7 +7070,7 @@ LRESULT wmNotifyHeader (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) {
OS.SendMessage (handle, OS.LVM_GETCOLUMNORDERARRAY, columnCount, order);
int index = 0;
while (index < order.length) {
- if (order [index] == phdn.iItem) break;
+ if (order [index] == phdn.iItem) break;
index++;
}
if (index == order.length) index = 0;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Text.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Text.java
index 336ded9566..68a1eff19a 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Text.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Text.java
@@ -2651,8 +2651,8 @@ LRESULT WM_CHAR (long /*int*/ wParam, long /*int*/ lParam) {
int x = selection.x;
int y = selection.y;
if (x == y) {
- String actText = getText (0, x - 1);
- java.util.regex.Matcher m = CTRL_BS_PATTERN.matcher (actText);
+ String actText = getText (0, x - 1);
+ java.util.regex.Matcher m = CTRL_BS_PATTERN.matcher (actText);
if (m.find ()) {
x = m.start ();
y = m.end ();
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tracker.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tracker.java
index 49d85ecd1d..1727a13bed 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tracker.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tracker.java
@@ -207,7 +207,7 @@ Point adjustMoveCursor () {
pt.x = newX; pt.y = newY;
/*
* Convert to screen coordinates iff needed
- */
+ */
if (parent != null) {
OS.ClientToScreen (parent.handle, pt);
}
@@ -1139,9 +1139,9 @@ LRESULT wmMouse (int message, long /*int*/ wParam, long /*int*/ lParam) {
event.setLocationInPixels(newX, newY);
if ((style & SWT.RESIZE) != 0) {
if (isMirrored) {
- resizeRectangles (oldX - newX, newY - oldY);
+ resizeRectangles (oldX - newX, newY - oldY);
} else {
- resizeRectangles (newX - oldX, newY - oldY);
+ resizeRectangles (newX - oldX, newY - oldY);
}
inEvent = true;
sendEvent (SWT.Resize, event);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tree.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tree.java
index 877edcd18d..a03c5bd9a8 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tree.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tree.java
@@ -6102,13 +6102,13 @@ LRESULT WM_KEYDOWN (long /*int*/ wParam, long /*int*/ lParam) {
* The fix is to replace VK_LEFT by VK_RIGHT and VK_RIGHT by VK_LEFT
* when the current orientation differs from the orientation used to
* create the control.
- */
- boolean isRTL = (style & SWT.RIGHT_TO_LEFT) != 0;
- if (isRTL != createdAsRTL) {
- long /*int*/ code = callWindowProc (handle, OS.WM_KEYDOWN, wParam == OS.VK_RIGHT ? OS.VK_LEFT : OS.VK_RIGHT, lParam);
- return new LRESULT (code);
- }
- break;
+ */
+ boolean isRTL = (style & SWT.RIGHT_TO_LEFT) != 0;
+ if (isRTL != createdAsRTL) {
+ long /*int*/ code = callWindowProc (handle, OS.WM_KEYDOWN, wParam == OS.VK_RIGHT ? OS.VK_LEFT : OS.VK_RIGHT, lParam);
+ return new LRESULT (code);
+ }
+ break;
case OS.VK_SPACE:
/*
* Ensure that the window proc does not process VK_SPACE
@@ -7816,7 +7816,7 @@ LRESULT wmNotifyHeader (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) {
OS.SendMessage (hwndHeader, OS.HDM_GETORDERARRAY, columnCount, order);
int index = 0;
while (index < order.length) {
- if (order [index] == phdn.iItem) break;
+ if (order [index] == phdn.iItem) break;
index++;
}
if (index == order.length) index = 0;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TreeItem.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TreeItem.java
index 1dd27b6dd0..54aaebb7b7 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TreeItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TreeItem.java
@@ -1235,7 +1235,7 @@ public void setExpanded (boolean expanded) {
RECT [] rects = null;
SCROLLINFO oldInfo = null;
int count = 0;
- long /*int*/ hBottomItem = 0;
+ long /*int*/ hBottomItem = 0;
boolean redraw = false, noScroll = true;
long /*int*/ hTopItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_FIRSTVISIBLE, 0);
if (noScroll && hTopItem != 0) {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Widget.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Widget.java
index d8b2584dcb..1b2e9c5195 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Widget.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Widget.java
@@ -1677,7 +1677,7 @@ LRESULT wmKeyDown (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam)
* upper case values in WM_KEYDOWN despite the fact that the
* Shift was not pressed.
*/
- display.lastKey = (int)/*64*/OS.CharLower ((short) mapKey);
+ display.lastKey = (int)/*64*/OS.CharLower ((short) mapKey);
/*
* Feature in Windows. The virtual key VK_CANCEL is treated
@@ -1732,12 +1732,12 @@ LRESULT wmKeyDown (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lParam)
* If the user types Ctrl+Shift+6, the value of LastAscii will
* depend on the international keyboard.
*/
- if (OS.GetKeyState (OS.VK_SHIFT) < 0) {
+ if (OS.GetKeyState (OS.VK_SHIFT) < 0) {
display.lastAscii = display.shiftedKey ((int)/*64*/wParam);
if (display.lastAscii == 0) display.lastAscii = mapKey;
- } else {
- display.lastAscii = (int)/*64*/OS.CharLower ((short) mapKey);
- }
+ } else {
+ display.lastAscii = (int)/*64*/OS.CharLower ((short) mapKey);
+ }
/* Note that Ctrl+'@' is ASCII NUL and is delivered in WM_CHAR */
if (display.lastAscii == '@') return null;
@@ -2318,7 +2318,7 @@ LRESULT wmSysKeyDown (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lPara
display.lastVirtual = mapKey == 0 || display.numpadKey ((int)/*64*/wParam) != 0;
if (display.lastVirtual) {
- display.lastKey = (int)/*64*/wParam;
+ display.lastKey = (int)/*64*/wParam;
/*
* Feature in Windows. The virtual key VK_DELETE is not
* treated as both a virtual key and an ASCII key by Windows.
@@ -2355,7 +2355,7 @@ LRESULT wmSysKeyDown (long /*int*/ hwnd, long /*int*/ wParam, long /*int*/ lPara
* upper case values in WM_SYSKEYDOWN despite the fact that the
* Shift was not pressed.
*/
- display.lastKey = (int)/*64*/OS.CharLower ((short) mapKey);
+ display.lastKey = (int)/*64*/OS.CharLower ((short) mapKey);
return null;
}
diff --git a/examples/org.eclipse.swt.examples.launcher/src/org/eclipse/swt/examples/launcher/LauncherPlugin.java b/examples/org.eclipse.swt.examples.launcher/src/org/eclipse/swt/examples/launcher/LauncherPlugin.java
index 579af02866..8d98dce347 100644
--- a/examples/org.eclipse.swt.examples.launcher/src/org/eclipse/swt/examples/launcher/LauncherPlugin.java
+++ b/examples/org.eclipse.swt.examples.launcher/src/org/eclipse/swt/examples/launcher/LauncherPlugin.java
@@ -79,12 +79,12 @@ public class LauncherPlugin extends AbstractUIPlugin {
plugin = this;
}
- @Override
+ @Override
public void start(BundleContext context) throws Exception {
- super.start(context);
- resourceBundle = Platform.getResourceBundle(getBundle());
- }
-
+ super.start(context);
+ resourceBundle = Platform.getResourceBundle(getBundle());
+ }
+
/**
* Clean up
*/
@@ -173,9 +173,9 @@ public class LauncherPlugin extends AbstractUIPlugin {
}
/**
- * Constructs a list of available programs from registered extensions.
- *
- * @return an ItemTreeNode representing the root of a tree of items (the root is not to be displayed)
+ * Constructs a list of available programs from registered extensions.
+ *
+ * @return an ItemTreeNode representing the root of a tree of items (the root is not to be displayed)
*/
public static ItemTreeNode getLaunchItemTree() {
ItemTreeNode categoryTree =
diff --git a/examples/org.eclipse.swt.examples.ole.win32/src/org/eclipse/swt/examples/ole/win32/OLEExample.java b/examples/org.eclipse.swt.examples.ole.win32/src/org/eclipse/swt/examples/ole/win32/OLEExample.java
index 409c43d3a5..0e7ea33c97 100644
--- a/examples/org.eclipse.swt.examples.ole.win32/src/org/eclipse/swt/examples/ole/win32/OLEExample.java
+++ b/examples/org.eclipse.swt.examples.ole.win32/src/org/eclipse/swt/examples/ole/win32/OLEExample.java
@@ -182,18 +182,18 @@ public class OLEExample {
try {
clientSite = createSite(oleFrame, "PDF.PdfCtrl.5");
clientSite.doVerb(OLE.OLEIVERB_INPLACEACTIVATE);
- OleAutomation pdf = new OleAutomation (clientSite);
- int loadFile[] = pdf.getIDsOfNames (new String [] {"LoadFile"});
- if (loadFile != null) {
- Variant result = pdf.invoke(loadFile[0], new Variant[] {new Variant(fileName)});
+ OleAutomation pdf = new OleAutomation (clientSite);
+ int loadFile[] = pdf.getIDsOfNames (new String [] {"LoadFile"});
+ if (loadFile != null) {
+ Variant result = pdf.invoke(loadFile[0], new Variant[] {new Variant(fileName)});
if (result == null)
disposeClient();
else
result.dispose();
- } else {
+ } else {
disposeClient();
- }
- pdf.dispose();
+ }
+ pdf.dispose();
} catch (SWTException error2) {
disposeClient();
}
diff --git a/examples/org.eclipse.swt.examples.ole.win32/src/org/eclipse/swt/examples/ole/win32/OleBrowserView.java b/examples/org.eclipse.swt.examples.ole.win32/src/org/eclipse/swt/examples/ole/win32/OleBrowserView.java
index afe7d9c6d4..da0828d52f 100644
--- a/examples/org.eclipse.swt.examples.ole.win32/src/org/eclipse/swt/examples/ole/win32/OleBrowserView.java
+++ b/examples/org.eclipse.swt.examples.ole.win32/src/org/eclipse/swt/examples/ole/win32/OleBrowserView.java
@@ -336,10 +336,10 @@ public class OleBrowserView extends ViewPart {
switch (commandID) {
case OleWebBrowser.CSC_NAVIGATEBACK:
- webCommandBackward.setEnabled(commandEnabled);
- break;
+ webCommandBackward.setEnabled(commandEnabled);
+ break;
case OleWebBrowser.CSC_NAVIGATEFORWARD:
- webCommandForward.setEnabled(commandEnabled);
+ webCommandForward.setEnabled(commandEnabled);
break;
}
});
diff --git a/examples/org.eclipse.swt.examples.ole.win32/src/org/eclipse/swt/examples/ole/win32/OlePlugin.java b/examples/org.eclipse.swt.examples.ole.win32/src/org/eclipse/swt/examples/ole/win32/OlePlugin.java
index a3cb1897c8..52f20cd99b 100644
--- a/examples/org.eclipse.swt.examples.ole.win32/src/org/eclipse/swt/examples/ole/win32/OlePlugin.java
+++ b/examples/org.eclipse.swt.examples.ole.win32/src/org/eclipse/swt/examples/ole/win32/OlePlugin.java
@@ -49,7 +49,7 @@ public class OlePlugin extends AbstractUIPlugin {
"icons/search_nav.gif" };
static Image images[];
static Font browserFont;
-
+
/**
* Constructs an OLE plugin.
*/
@@ -58,12 +58,12 @@ public class OlePlugin extends AbstractUIPlugin {
plugin = this;
}
- @Override
+ @Override
public void start(BundleContext context) throws Exception {
- super.start(context);
- resourceBundle = Platform.getResourceBundle(getBundle());
- }
-
+ super.start(context);
+ resourceBundle = Platform.getResourceBundle(getBundle());
+ }
+
/**
* Clean up
*/
diff --git a/examples/org.eclipse.swt.examples.ole.win32/src/org/eclipse/swt/examples/ole/win32/OleWebBrowser.java b/examples/org.eclipse.swt.examples.ole.win32/src/org/eclipse/swt/examples/ole/win32/OleWebBrowser.java
index a70797716c..52931b9d48 100644
--- a/examples/org.eclipse.swt.examples.ole.win32/src/org/eclipse/swt/examples/ole/win32/OleWebBrowser.java
+++ b/examples/org.eclipse.swt.examples.ole.win32/src/org/eclipse/swt/examples/ole/win32/OleWebBrowser.java
@@ -75,8 +75,8 @@ class OleWebBrowser {
* OleWebBrowser webBrowser = new OleWebBrowser(oleControlSite, oleAutomation);<br>
* </code>
*
- * @param oleAutomation the OleAutomation object for this control.
- * @param oleControlSite the OleControlSite object for this control.
+ * @param oleAutomation the OleAutomation object for this control.
+ * @param oleControlSite the OleControlSite object for this control.
*/
public OleWebBrowser(OleAutomation oleAutomation) {
this.oleAutomation = oleAutomation;
@@ -98,7 +98,7 @@ class OleWebBrowser {
* this is of course the fastest way, but you increase coupling
* to the control.
*/
-
+
/**
* Returns the current web page title.
*
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/accessibility/CTable.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/accessibility/CTable.java
index 1b5f23322e..56b64d1145 100644
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/accessibility/CTable.java
+++ b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/accessibility/CTable.java
@@ -889,9 +889,9 @@ public Control[] getChildren () {
/* remove the Header from the returned set of children */
int index = 0;
for (Control control : controls) {
- if (control != header) {
- result [index++] = control;
- }
+ if (control != header) {
+ result [index++] = control;
+ }
}
return result;
}
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/accessibility/CTableColumn.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/accessibility/CTableColumn.java
index 2f76f9a612..07af3a09c7 100644
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/accessibility/CTableColumn.java
+++ b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/accessibility/CTableColumn.java
@@ -852,7 +852,7 @@ Accessible getAccessible(final Accessible accessibleTable) {
}
@Override
public void getRowHeaders(AccessibleTableCellEvent e) {
- /* CTable does not support row headers. */
+ /* CTable does not support row headers. */
}
@Override
public void getRowIndex(AccessibleTableCellEvent e) {
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/accessibility/CTableItem.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/accessibility/CTableItem.java
index a2e43502aa..9d492249a5 100644
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/accessibility/CTableItem.java
+++ b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/accessibility/CTableItem.java
@@ -508,7 +508,7 @@ Accessible getAccessible(final Accessible accessibleTable, final int columnIndex
}
@Override
public void getRowHeaders(AccessibleTableCellEvent e) {
- /* CTable does not support row headers. */
+ /* CTable does not support row headers. */
}
@Override
public void getRowIndex(AccessibleTableCellEvent e) {
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/accessibility/ControlsWithAccessibleNamesExample.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/accessibility/ControlsWithAccessibleNamesExample.java
index ac1e79463f..56e3f9113c 100644
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/accessibility/ControlsWithAccessibleNamesExample.java
+++ b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/accessibility/ControlsWithAccessibleNamesExample.java
@@ -372,12 +372,12 @@ public class ControlsWithAccessibleNamesExample {
item.setToolTipText("ToolItem ToolTip" + i + j);
if (item.getWidth() > toolItemWidth) toolItemWidth = item.getWidth();
}
- coolItem.setControl(coolItemToolBar);
- Point size = coolItemToolBar.computeSize(SWT.DEFAULT, SWT.DEFAULT);
- Point coolSize = coolItem.computeSize (size.x, size.y);
- coolItem.setMinimumSize(toolItemWidth, coolSize.y);
- coolItem.setPreferredSize(coolSize);
- coolItem.setSize(coolSize);
+ coolItem.setControl(coolItemToolBar);
+ Point size = coolItemToolBar.computeSize(SWT.DEFAULT, SWT.DEFAULT);
+ Point coolSize = coolItem.computeSize (size.x, size.y);
+ coolItem.setMinimumSize(toolItemWidth, coolSize.y);
+ coolItem.setPreferredSize(coolSize);
+ coolItem.setSize(coolSize);
}
overrideCoolBar = new CoolBar(shell, SWT.FLAT);
@@ -391,12 +391,12 @@ public class ControlsWithAccessibleNamesExample {
item.setToolTipText("ToolItem ToolTip" + i + j);
if (item.getWidth() > toolItemWidth) toolItemWidth = item.getWidth();
}
- coolItem.setControl(coolItemToolBar);
- Point size = coolItemToolBar.computeSize(SWT.DEFAULT, SWT.DEFAULT);
- Point coolSize = coolItem.computeSize (size.x, size.y);
- coolItem.setMinimumSize(toolItemWidth, coolSize.y);
- coolItem.setPreferredSize(coolSize);
- coolItem.setSize(coolSize);
+ coolItem.setControl(coolItemToolBar);
+ Point size = coolItemToolBar.computeSize(SWT.DEFAULT, SWT.DEFAULT);
+ Point coolSize = coolItem.computeSize (size.x, size.y);
+ coolItem.setMinimumSize(toolItemWidth, coolSize.y);
+ coolItem.setPreferredSize(coolSize);
+ coolItem.setSize(coolSize);
}
overrideCoolBar.setData("name", "CoolBar");
overrideCoolBar.setData("child", "CoolBar Item");
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/ColorTab.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/ColorTab.java
index 187f5aa47d..0fa1c6ad30 100644
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/ColorTab.java
+++ b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/ColorTab.java
@@ -38,9 +38,9 @@ class ColorTab extends Tab {
HashMap <Integer, String> hmap = new HashMap <> ();
static final int namedColorEnd = 8;
static String [] columnTitles = {ControlExample.getResourceString("ColorTitle_0"),
- ControlExample.getResourceString("ColorTitle_1"),
- ControlExample.getResourceString("ColorTitle_2"),
- ControlExample.getResourceString("ColorTitle_3")};
+ ControlExample.getResourceString("ColorTitle_1"),
+ ControlExample.getResourceString("ColorTitle_2"),
+ ControlExample.getResourceString("ColorTitle_3")};
/* Size widgets added to the "Size" group */
Button packColumnsButton;
@@ -54,34 +54,34 @@ class ColorTab extends Tab {
}
void addTableElements () {
- hmap.put(SWT.COLOR_WHITE, "COLOR_WHITE");
- hmap.put(SWT.COLOR_BLACK, "COLOR_BLACK");
- hmap.put(SWT.COLOR_RED, "COLOR_RED");
- hmap.put(SWT.COLOR_DARK_RED, "COLOR_DARK_RED");
- hmap.put(SWT.COLOR_GREEN, "COLOR_GREEN");
- hmap.put(SWT.COLOR_DARK_GREEN, "COLOR_DARK_GREEN");
- hmap.put(SWT.COLOR_YELLOW, "COLOR_YELLOW");
- hmap.put(SWT.COLOR_DARK_YELLOW, "COLOR_DARK_YELLOW");
- hmap.put(SWT.COLOR_WIDGET_DARK_SHADOW, "COLOR_WIDGET_DARK_SHADOW");
- hmap.put(SWT.COLOR_WIDGET_NORMAL_SHADOW, "COLOR_WIDGET_NORMAL_SHADOW");
- hmap.put(SWT.COLOR_WIDGET_LIGHT_SHADOW, "COLOR_WIDGET_LIGHT_SHADOW");
- hmap.put(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW, "COLOR_WIDGET_HIGHLIGHT_SHADOW");
- hmap.put(SWT.COLOR_WIDGET_FOREGROUND, "COLOR_WIDGET_FOREGROUND");
- hmap.put(SWT.COLOR_WIDGET_BACKGROUND, "COLOR_WIDGET_BACKGROUND");
- hmap.put(SWT.COLOR_WIDGET_BORDER, "COLOR_WIDGET_BORDER");
- hmap.put(SWT.COLOR_LIST_FOREGROUND, "COLOR_LIST_FOREGROUND");
- hmap.put(SWT.COLOR_LIST_BACKGROUND, "COLOR_LIST_BACKGROUND");
- hmap.put(SWT.COLOR_LIST_SELECTION, "COLOR_LIST_SELECTION");
- hmap.put(SWT.COLOR_LIST_SELECTION_TEXT, "COLOR_LIST_SELECTION_TEXT");
- hmap.put(SWT.COLOR_INFO_FOREGROUND, "COLOR_INFO_FOREGROUND");
- hmap.put(SWT.COLOR_INFO_BACKGROUND, "COLOR_INFO_BACKGROUND");
- hmap.put(SWT.COLOR_TITLE_FOREGROUND, "COLOR_TITLE_FOREGROUND");
- hmap.put(SWT.COLOR_TITLE_BACKGROUND, "COLOR_TITLE_BACKGROUND");
- hmap.put(SWT.COLOR_TITLE_BACKGROUND_GRADIENT, "COLOR_TITLE_BACKGROUND_GRADIENT");
- hmap.put(SWT.COLOR_TITLE_INACTIVE_FOREGROUND, "COLOR_TITLE_INACTIVE_FOREGROUND");
- hmap.put(SWT.COLOR_TITLE_INACTIVE_BACKGROUND, "COLOR_TITLE_INACTIVE_BACKGROUND");
- hmap.put(SWT.COLOR_TITLE_INACTIVE_BACKGROUND_GRADIENT, "COLOR_TITLE_INACTIVE_BACKGROUND_GRADIENT");
- hmap.put(SWT.COLOR_LINK_FOREGROUND, "COLOR_LINK_FOREGROUND");
+ hmap.put(SWT.COLOR_WHITE, "COLOR_WHITE");
+ hmap.put(SWT.COLOR_BLACK, "COLOR_BLACK");
+ hmap.put(SWT.COLOR_RED, "COLOR_RED");
+ hmap.put(SWT.COLOR_DARK_RED, "COLOR_DARK_RED");
+ hmap.put(SWT.COLOR_GREEN, "COLOR_GREEN");
+ hmap.put(SWT.COLOR_DARK_GREEN, "COLOR_DARK_GREEN");
+ hmap.put(SWT.COLOR_YELLOW, "COLOR_YELLOW");
+ hmap.put(SWT.COLOR_DARK_YELLOW, "COLOR_DARK_YELLOW");
+ hmap.put(SWT.COLOR_WIDGET_DARK_SHADOW, "COLOR_WIDGET_DARK_SHADOW");
+ hmap.put(SWT.COLOR_WIDGET_NORMAL_SHADOW, "COLOR_WIDGET_NORMAL_SHADOW");
+ hmap.put(SWT.COLOR_WIDGET_LIGHT_SHADOW, "COLOR_WIDGET_LIGHT_SHADOW");
+ hmap.put(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW, "COLOR_WIDGET_HIGHLIGHT_SHADOW");
+ hmap.put(SWT.COLOR_WIDGET_FOREGROUND, "COLOR_WIDGET_FOREGROUND");
+ hmap.put(SWT.COLOR_WIDGET_BACKGROUND, "COLOR_WIDGET_BACKGROUND");
+ hmap.put(SWT.COLOR_WIDGET_BORDER, "COLOR_WIDGET_BORDER");
+ hmap.put(SWT.COLOR_LIST_FOREGROUND, "COLOR_LIST_FOREGROUND");
+ hmap.put(SWT.COLOR_LIST_BACKGROUND, "COLOR_LIST_BACKGROUND");
+ hmap.put(SWT.COLOR_LIST_SELECTION, "COLOR_LIST_SELECTION");
+ hmap.put(SWT.COLOR_LIST_SELECTION_TEXT, "COLOR_LIST_SELECTION_TEXT");
+ hmap.put(SWT.COLOR_INFO_FOREGROUND, "COLOR_INFO_FOREGROUND");
+ hmap.put(SWT.COLOR_INFO_BACKGROUND, "COLOR_INFO_BACKGROUND");
+ hmap.put(SWT.COLOR_TITLE_FOREGROUND, "COLOR_TITLE_FOREGROUND");
+ hmap.put(SWT.COLOR_TITLE_BACKGROUND, "COLOR_TITLE_BACKGROUND");
+ hmap.put(SWT.COLOR_TITLE_BACKGROUND_GRADIENT, "COLOR_TITLE_BACKGROUND_GRADIENT");
+ hmap.put(SWT.COLOR_TITLE_INACTIVE_FOREGROUND, "COLOR_TITLE_INACTIVE_FOREGROUND");
+ hmap.put(SWT.COLOR_TITLE_INACTIVE_BACKGROUND, "COLOR_TITLE_INACTIVE_BACKGROUND");
+ hmap.put(SWT.COLOR_TITLE_INACTIVE_BACKGROUND_GRADIENT, "COLOR_TITLE_INACTIVE_BACKGROUND_GRADIENT");
+ hmap.put(SWT.COLOR_LINK_FOREGROUND, "COLOR_LINK_FOREGROUND");
}
/**
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
index a200a54f58..9d7ae24bd9 100644
--- 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
@@ -67,9 +67,9 @@ public class ControlExample {
tabs = createTabs();
for (Tab tab : tabs) {
TabItem item = new TabItem (tabFolder, SWT.NONE);
- item.setText (tab.getTabText ());
- item.setControl (tab.createTabFolderPage (tabFolder));
- item.setData (tab);
+ item.setText (tab.getTabText ());
+ item.setControl (tab.createTabFolderPage (tabFolder));
+ item.setData (tab);
}
/* Workaround: if the tab folder is wider than the screen,
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/CoolBarTab.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/CoolBarTab.java
index b6c008a295..d9642c8008 100644
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/CoolBarTab.java
+++ b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/CoolBarTab.java
@@ -448,9 +448,9 @@ class CoolBarTab extends Tab {
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++;
+ Rectangle intersection = itemBounds.intersection (toolBounds);
+ if (!intersection.equals (toolBounds)) break;
+ i++;
}
/* Create a pop-up menu with items for each of the hidden buttons. */
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/Tab.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/Tab.java
index 0c0fa3f036..702c092a9f 100644
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/Tab.java
+++ b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/Tab.java
@@ -1280,10 +1280,10 @@ abstract class Tab {
}
if (menu == null && popupMenuButton.getSelection()) {
menu = new Menu(shell, SWT.POP_UP | (control.getStyle() & (SWT.RIGHT_TO_LEFT | SWT.LEFT_TO_RIGHT)));
- MenuItem item = new MenuItem(menu, SWT.PUSH);
- item.setText("Sample popup menu item");
- specialPopupMenuItems(menu, event);
- control.setMenu(menu);
+ MenuItem item = new MenuItem(menu, SWT.PUSH);
+ item.setText("Sample popup menu item");
+ specialPopupMenuItems(menu, event);
+ control.setMenu(menu);
samplePopup = true;
}
});
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/TableTab.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/TableTab.java
index 040721f61a..061c0bf250 100644
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/TableTab.java
+++ b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/TableTab.java
@@ -739,10 +739,10 @@ class TableTab extends ScrollableTab {
@Override
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(widgetSelectedAdapter(e -> {
+ 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(widgetSelectedAdapter(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/TreeTab.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/TreeTab.java
index 6536521f66..f8046568fa 100644
--- 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
@@ -66,9 +66,9 @@ class TreeTab extends ScrollableTab {
Font itemFont, cellFont;
static String [] columnTitles = {ControlExample.getResourceString("TableTitle_0"),
- ControlExample.getResourceString("TableTitle_1"),
- ControlExample.getResourceString("TableTitle_2"),
- ControlExample.getResourceString("TableTitle_3")};
+ ControlExample.getResourceString("TableTitle_1"),
+ ControlExample.getResourceString("TableTitle_2"),
+ ControlExample.getResourceString("TableTitle_3")};
static String[][] tableData = {
{ ControlExample.getResourceString("TableLine0_0"),
@@ -535,7 +535,7 @@ class TreeTab extends ScrollableTab {
}
/* Set the header background color item's image to match the header background color. */
Color color = headerBackgroundColor;
- if (color == null) color = tree1.getHeaderBackground();
+ if (color == null) color = tree1.getHeaderBackground();
TableItem item = colorAndFontTable.getItem(HEADER_BACKGROUND_COLOR);
Image oldImage1 = item.getImage();
if (oldImage1 != null) oldImage1.dispose();
@@ -840,11 +840,11 @@ class TreeTab extends ScrollableTab {
@Override
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(widgetSelectedAdapter(e -> {
+ 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(widgetSelectedAdapter(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/dnd/DNDExample.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/dnd/DNDExample.java
index 49abdeb549..d69916d205 100644
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/dnd/DNDExample.java
+++ b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/dnd/DNDExample.java
@@ -773,10 +773,10 @@ private void createDropTarget() {
printEvent(event);
String[] strings = null;
if (TextTransfer.getInstance().isSupportedType(event.currentDataType) ||
- RTFTransfer.getInstance().isSupportedType(event.currentDataType) ||
- HTMLTransfer.getInstance().isSupportedType(event.currentDataType) ||
- URLTransfer.getInstance().isSupportedType(event.currentDataType)) {
- strings = new String[] {(String)event.data};
+ RTFTransfer.getInstance().isSupportedType(event.currentDataType) ||
+ HTMLTransfer.getInstance().isSupportedType(event.currentDataType) ||
+ URLTransfer.getInstance().isSupportedType(event.currentDataType)) {
+ strings = new String[] {(String)event.data};
}
if (FileTransfer.getInstance().isSupportedType(event.currentDataType)) {
strings = (String[])event.data;
@@ -787,8 +787,8 @@ private void createDropTarget() {
}
if (strings.length == 1 && (dropControlType == TABLE ||
- dropControlType == TREE ||
- dropControlType == LIST)) {
+ dropControlType == TREE ||
+ dropControlType == LIST)) {
// convert string separated by "\n" into an array of strings
String string = strings[0];
int count = 0;
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/FileViewer.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/FileViewer.java
index 4a9a92f609..ef212e122f 100644
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/FileViewer.java
+++ b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer/FileViewer.java
@@ -73,7 +73,7 @@ import org.eclipse.swt.widgets.TreeItem;
* File Viewer example
*/
public class FileViewer {
- private static ResourceBundle resourceBundle = ResourceBundle.getBundle("examples_fileviewer");
+ private static ResourceBundle resourceBundle = ResourceBundle.getBundle("examples_fileviewer");
private final static String DRIVE_A = "a:" + File.separator;
private final static String DRIVE_B = "b:" + File.separator;
@@ -1428,11 +1428,11 @@ public class FileViewer {
for (int i = end; i > start; --i) {
for (int j = end; j > start; --j) {
if (compareFiles(files[j - 1], files[j]) > 0) {
- final File temp = files[j];
- files[j] = files[j-1];
- files[j-1] = temp;
+ final File temp = files[j];
+ files[j] = files[j-1];
+ files[j-1] = temp;
}
- }
+ }
}
return;
}
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/CardsTab.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/CardsTab.java
index 2d75192637..82501ae2e9 100644
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/CardsTab.java
+++ b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/CardsTab.java
@@ -91,40 +91,40 @@ public void next(int width, int height) {
scaleWidth = (float) ((movClubY/height)*0.35 + 0.15);
movClubY = 2*height/5 * (float)Math.sin(0.01*movClubX - 90) + 2*height/5;
- movDiamondY = 2*height/5 * (float)Math.cos(0.01*movDiamondX) + 2*height/5;
-
- if (movClubX + clubWidth*scaleWidth > width) {
- movClubX = width - clubWidth*scaleWidth;
- inc_club = -inc_club;
- }
- if (movClubX < 0) {
- movClubX = 0;
- inc_club = -inc_club;
- }
- if (movDiamondX + diamondWidth*scaleWidth > width) {
- movDiamondX = width - diamondWidth*scaleWidth;
- inc_diamond = -inc_diamond;
- }
- if (movDiamondX < 0) {
- movDiamondX = 0;
- inc_diamond = -inc_diamond;
- }
- if (movHeart + heartWidth*heartScale > width) {
- movHeart = width - heartWidth*heartScale;
- inc_hearts = -inc_hearts;
- }
- if (movHeart < 0) {
- movHeart = 0;
- inc_hearts = -inc_hearts;
- }
- if (movSpade + spadeHeight*spadeScale > height) {
- movSpade = height - spadeHeight*spadeScale;
- inc_spade = -inc_spade;
- }
- if (movSpade < 0) {
- movSpade = 0;
- inc_spade = -inc_spade;
- }
+ movDiamondY = 2*height/5 * (float)Math.cos(0.01*movDiamondX) + 2*height/5;
+
+ if (movClubX + clubWidth*scaleWidth > width) {
+ movClubX = width - clubWidth*scaleWidth;
+ inc_club = -inc_club;
+ }
+ if (movClubX < 0) {
+ movClubX = 0;
+ inc_club = -inc_club;
+ }
+ if (movDiamondX + diamondWidth*scaleWidth > width) {
+ movDiamondX = width - diamondWidth*scaleWidth;
+ inc_diamond = -inc_diamond;
+ }
+ if (movDiamondX < 0) {
+ movDiamondX = 0;
+ inc_diamond = -inc_diamond;
+ }
+ if (movHeart + heartWidth*heartScale > width) {
+ movHeart = width - heartWidth*heartScale;
+ inc_hearts = -inc_hearts;
+ }
+ if (movHeart < 0) {
+ movHeart = 0;
+ inc_hearts = -inc_hearts;
+ }
+ if (movSpade + spadeHeight*spadeScale > height) {
+ movSpade = height - spadeHeight*spadeScale;
+ inc_spade = -inc_spade;
+ }
+ if (movSpade < 0) {
+ movSpade = 0;
+ inc_spade = -inc_spade;
+ }
}
@Override
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/CustomAlphaTab.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/CustomAlphaTab.java
index 92fc6f634c..f81fd723ac 100644
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/CustomAlphaTab.java
+++ b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/CustomAlphaTab.java
@@ -166,6 +166,6 @@ public void paint(GC gc, int width, int height) {
gc.fillPath(path);
path.dispose();
- if (pattern != null) pattern.dispose();
+ if (pattern != null) pattern.dispose();
}
}
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/FontBounceTab.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/FontBounceTab.java
index c55c286d7b..27ba6c8c9e 100644
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/FontBounceTab.java
+++ b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/FontBounceTab.java
@@ -59,49 +59,49 @@ public String getDescription() {
@Override
public void next(int width, int height) {
x += incX;
- y += incY;
+ y += incY;
float random = (float)Math.random();
// collision with right side of screen
- if (x + textWidth > width) {
- x = width - textWidth;
- incX = random * -width / 16 - 1;
- fontFace = 0;
- fontSize = 125;
- fillColor = SWT.COLOR_DARK_BLUE;
- foreGrdColor = SWT.COLOR_YELLOW;
- fontStyle = SWT.ITALIC;
- }
+ if (x + textWidth > width) {
+ x = width - textWidth;
+ incX = random * -width / 16 - 1;
+ fontFace = 0;
+ fontSize = 125;
+ fillColor = SWT.COLOR_DARK_BLUE;
+ foreGrdColor = SWT.COLOR_YELLOW;
+ fontStyle = SWT.ITALIC;
+ }
// collision with left side of screen
- if (x < 0) {
- x = 0;
- incX = random * width / 16 + 1;
- fontFace = 1;
- fontSize = 80;
- fillColor = SWT.COLOR_DARK_MAGENTA;
- foreGrdColor = SWT.COLOR_CYAN;
- fontStyle = SWT.NONE;
- }
+ if (x < 0) {
+ x = 0;
+ incX = random * width / 16 + 1;
+ fontFace = 1;
+ fontSize = 80;
+ fillColor = SWT.COLOR_DARK_MAGENTA;
+ foreGrdColor = SWT.COLOR_CYAN;
+ fontStyle = SWT.NONE;
+ }
// collision with bottom side of screen
- if (y + textHeight > height) {
- y = (height - textHeight)- 2;
- incY = random * -height / 16 - 1;
- fontFace = 2;
- fontSize = 100;
- fillColor = SWT.COLOR_YELLOW;
- foreGrdColor = SWT.COLOR_BLACK;
- fontStyle = SWT.BOLD;
- }
+ if (y + textHeight > height) {
+ y = (height - textHeight)- 2;
+ incY = random * -height / 16 - 1;
+ fontFace = 2;
+ fontSize = 100;
+ fillColor = SWT.COLOR_YELLOW;
+ foreGrdColor = SWT.COLOR_BLACK;
+ fontStyle = SWT.BOLD;
+ }
// collision with top side of screen
- if (y < 0) {
- y = 0;
- incY = random * height / 16 + 1;
- fontFace = 3;
- fontSize = 120;
- fillColor = SWT.COLOR_GREEN;
- foreGrdColor = SWT.COLOR_GRAY;
- fontStyle = SWT.NONE;
- }
+ if (y < 0) {
+ y = 0;
+ incY = random * height / 16 + 1;
+ fontFace = 3;
+ fontSize = 120;
+ fillColor = SWT.COLOR_GREEN;
+ foreGrdColor = SWT.COLOR_GRAY;
+ fontStyle = SWT.NONE;
+ }
}
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/GradientDialog.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/GradientDialog.java
index a1c6d45a35..ea18fde7c7 100644
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/GradientDialog.java
+++ b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/GradientDialog.java
@@ -74,13 +74,13 @@ public class GradientDialog extends Dialog {
dialog.setText(GraphicsExample.getResourceString("Gradient")); //$NON-NLS-1$
GridLayout gridLayout = new GridLayout();
- gridLayout.numColumns = 2;
- gridLayout.marginHeight = 10;
- gridLayout.marginWidth = 10;
- dialog.setLayout(gridLayout);
+ gridLayout.numColumns = 2;
+ gridLayout.marginHeight = 10;
+ gridLayout.marginWidth = 10;
+ dialog.setLayout(gridLayout);
- // create the controls in the dialog
- createDialogControls(dialog);
+ // create the controls in the dialog
+ createDialogControls(dialog);
dialog.addListener(SWT.Close, event -> {
for (int i = 0; i < resources.size(); i++) {
@@ -169,7 +169,7 @@ public class GradientDialog extends Dialog {
// position composite
gridData = new GridData(GridData.VERTICAL_ALIGN_BEGINNING);
- colorButtonComp.setLayoutData(gridData);
+ colorButtonComp.setLayoutData(gridData);
ColorMenu colorMenu = new ColorMenu();
@@ -228,10 +228,10 @@ public class GradientDialog extends Dialog {
// position composite
gridData = new GridData(GridData.HORIZONTAL_ALIGN_END);
- gridData.horizontalSpan = 2;
- okCancelComp.setLayoutData(gridData);
+ gridData.horizontalSpan = 2;
+ okCancelComp.setLayoutData(gridData);
- // OK button
+ // OK button
okButton = new Button (okCancelComp, SWT.PUSH);
okButton.setText("&OK");
okButton.addListener(SWT.Selection, event -> {
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/GraphicAntialiasTab.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/GraphicAntialiasTab.java
index 7f08715970..4432dd71a0 100644
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/GraphicAntialiasTab.java
+++ b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/GraphicAntialiasTab.java
@@ -98,7 +98,7 @@ public void createControlPanel(Composite parent) {
comp = new Composite(parent, SWT.NONE);
comp.setLayout(new GridLayout());
- // initialize the background to the 5th item in the menu (blue)
+ // initialize the background to the 5th item in the menu (blue)
ovalColorGB = (GraphicsBackground)menu.getItem(4).getData();
// color button
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/IntroTab.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/IntroTab.java
index f061cccfb4..121b69ff7c 100644
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/IntroTab.java
+++ b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/IntroTab.java
@@ -24,7 +24,7 @@ public class IntroTab extends AnimatedGraphicsTab {
Image image;
Random random = new Random();
float x, y;
- float incX = 10.0f;
+ float incX = 10.0f;
float incY = 5.0f;
int textWidth, textHeight;
String text = GraphicsExample.getResourceString("SWT");
@@ -58,25 +58,25 @@ public String getDescription() {
@Override
public void next(int width, int height) {
- x += incX;
- y += incY;
+ x += incX;
+ y += incY;
float random = (float)Math.random();
- if (x + textWidth > width) {
- x = width - textWidth;
- incX = random * -width / 16 - 1;
- }
- if (x < 0) {
- x = 0;
- incX = random * width / 16 + 1;
- }
- if (y + textHeight > height) {
- y = (height - textHeight)- 2;
- incY = random * -height / 16 - 1;
- }
- if (y < 0) {
- y = 0;
- incY = random * height / 16 + 1;
- }
+ if (x + textWidth > width) {
+ x = width - textWidth;
+ incX = random * -width / 16 - 1;
+ }
+ if (x < 0) {
+ x = 0;
+ incX = random * width / 16 + 1;
+ }
+ if (y + textHeight > height) {
+ y = (height - textHeight)- 2;
+ incY = random * -height / 16 - 1;
+ }
+ if (y < 0) {
+ y = 0;
+ incY = random * height / 16 + 1;
+ }
}
@Override
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/PathClippingTab.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/PathClippingTab.java
index b66aa2dc10..60962f8b46 100644
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/PathClippingTab.java
+++ b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/PathClippingTab.java
@@ -249,7 +249,7 @@ public void paint(GC gc, int width, int height) {
pattern = new Pattern(device, background.getBgImage());
gc.setBackgroundPattern(pattern);
}
- gc.fillRectangle(0, 0, width, height);
- if (pattern != null) pattern.dispose();
+ gc.fillRectangle(0, 0, width, height);
+ if (pattern != null) pattern.dispose();
}
}
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/RegionClippingTab.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/RegionClippingTab.java
index b0d99a181f..c75ac01916 100644
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/RegionClippingTab.java
+++ b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/RegionClippingTab.java
@@ -206,10 +206,10 @@ public void paint(GC gc, int width, int height) {
gc.fillPolygon(polygon1);
gc.setBackground(colorGB2.getBgColor1());
- gc.fillPolygon(polygon2);
+ gc.fillPolygon(polygon2);
}
region1.dispose();
region2.dispose();
- }
+ }
}
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/StarPolyTab.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/StarPolyTab.java
index 9dc68324bc..c5b71711aa 100644
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/StarPolyTab.java
+++ b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/graphics/StarPolyTab.java
@@ -57,18 +57,18 @@ public String getDescription() {
@Override
public void paint(GC gc, int width, int height) {
- int centerX = width / 2;
- int centerY = height / 2;
- int pos = 0;
- for (int i = 0; i < POINTS; ++i) {
- double r = Math.PI*2 * pos/POINTS;
- radial[i*2] = (int)((1+Math.cos(r))*centerX);
- radial[i*2+1] = (int)((1+Math.sin(r))*centerY);
- pos = (pos + POINTS/2) % POINTS;
- }
+ int centerX = width / 2;
+ int centerY = height / 2;
+ int pos = 0;
+ for (int i = 0; i < POINTS; ++i) {
+ double r = Math.PI*2 * pos/POINTS;
+ radial[i*2] = (int)((1+Math.cos(r))*centerX);
+ radial[i*2+1] = (int)((1+Math.sin(r))*centerY);
+ pos = (pos + POINTS/2) % POINTS;
+ }
gc.setFillRule(fillRuleCb.getSelectionIndex() != 0 ? SWT.FILL_WINDING : SWT.FILL_EVEN_ODD);
gc.setBackground(gc.getDevice().getSystemColor(SWT.COLOR_YELLOW));
- gc.fillPolygon(radial);
- gc.drawPolygon(radial);
+ gc.fillPolygon(radial);
+ gc.drawPolygon(radial);
}
}
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/imageanalyzer/ImageAnalyzer.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/imageanalyzer/ImageAnalyzer.java
index 43355157c5..39b4c08b44 100644
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/imageanalyzer/ImageAnalyzer.java
+++ b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/imageanalyzer/ImageAnalyzer.java
@@ -1451,8 +1451,8 @@ public class ImageAnalyzer {
animateLoop();
} catch (final SWTException e) {
display.syncExec(() -> showErrorDialog(createMsg(bundle.getString("Creating_image"),
- Integer.valueOf(imageDataIndex+1)),
- currentName, e));
+ Integer.valueOf(imageDataIndex+1)),
+ currentName, e));
}
// Post animation widget reset.
@@ -1696,7 +1696,7 @@ public class ImageAnalyzer {
string = createMsg(bundle.getString("Size_value"),
new Object[] {Integer.valueOf(imageData.width),
- Integer.valueOf(imageData.height)});
+ Integer.valueOf(imageData.height)});
sizeLabel.setText(string);
string = createMsg(bundle.getString("Depth_value"),
@@ -1723,7 +1723,7 @@ public class ImageAnalyzer {
string = createMsg(bundle.getString("Disposal_value"),
new Object[] {Integer.valueOf(imageData.disposalMethod),
- disposalString(imageData.disposalMethod)});
+ disposalString(imageData.disposalMethod)});
disposalMethodLabel.setText(string);
int delay = imageData.delayTime * 10;
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/javaviewer/JavaLineStyler.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/javaviewer/JavaLineStyler.java
index 1a4e63ce82..cf982f3540 100644
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/javaviewer/JavaLineStyler.java
+++ b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/javaviewer/JavaLineStyler.java
@@ -377,7 +377,7 @@ public class JavaScanner {
protected void unread(int c) {
if (c != EOF)
- fPos--;
+ fPos--;
}
}
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/layoutexample/GridLayoutTab.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/layoutexample/GridLayoutTab.java
index 24c143e9cc..80d6ede38f 100644
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/layoutexample/GridLayoutTab.java
+++ b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/layoutexample/GridLayoutTab.java
@@ -277,7 +277,7 @@ class GridLayoutTab extends Tab {
*/
@Override
void createControlWidgets () {
- /* Controls the columns in the GridLayout */
+ /* Controls the columns in the GridLayout */
Group columnGroup = new Group (controlGroup, SWT.NONE);
columnGroup.setText (LayoutExample.getResourceString ("Columns"));
columnGroup.setLayout(new GridLayout(2, false));
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/layoutexample/LayoutExample.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/layoutexample/LayoutExample.java
index ca83839952..e76927ef80 100644
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/layoutexample/LayoutExample.java
+++ b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/layoutexample/LayoutExample.java
@@ -47,8 +47,8 @@ public class LayoutExample {
};
for (Tab tab : tabs) {
TabItem item = new TabItem (tabFolder, SWT.NONE);
- item.setText (tab.getTabText ());
- item.setControl (tab.createTabFolderPage (tabFolder));
+ item.setText (tab.getTabText ());
+ item.setControl (tab.createTabFolderPage (tabFolder));
}
}
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/layoutexample/StackLayoutTab.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/layoutexample/StackLayoutTab.java
index 9f7bd57a66..1f765541be 100644
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/layoutexample/StackLayoutTab.java
+++ b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/layoutexample/StackLayoutTab.java
@@ -92,14 +92,14 @@ class StackLayoutTab extends Tab {
*/
@Override
void createControlWidgets() {
- /* Controls the topControl in the StackLayout */
+ /* Controls the topControl in the StackLayout */
Group columnGroup = new Group (controlGroup, SWT.NONE);
columnGroup.setText ("topControl");//(LayoutExample.getResourceString ("Top_Control"));
columnGroup.setLayout(new GridLayout(3, false));
columnGroup.setLayoutData(new GridData (SWT.FILL, SWT.FILL, false, false));
backButton = new Button(columnGroup, SWT.PUSH);
- backButton.setText("<<");
- backButton.setEnabled(false);
+ backButton.setText("<<");
+ backButton.setEnabled(false);
backButton.setLayoutData(new GridData (SWT.END, SWT.CENTER, false, false));
backButton.addSelectionListener(SelectionListener.widgetSelectedAdapter( e ->setTopControl (currentLayer - 1)));
topControl = new Label (columnGroup, SWT.BORDER);
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/layoutexample/Tab.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/layoutexample/Tab.java
index 45b4890f0d..a18048ca0f 100644
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/layoutexample/Tab.java
+++ b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/layoutexample/Tab.java
@@ -305,11 +305,11 @@ abstract class Tab {
combo.addTraverseListener(e -> {
if (e.detail == SWT.TRAVERSE_TAB_NEXT || e.detail == SWT.TRAVERSE_RETURN) {
comboReset = true;
- resetEditors ();
- }
- if (e.detail == SWT.TRAVERSE_ESCAPE) {
- disposeEditors ();
- }
+ resetEditors ();
+ }
+ if (e.detail == SWT.TRAVERSE_ESCAPE) {
+ disposeEditors ();
+ }
});
}
@@ -429,11 +429,11 @@ abstract class Tab {
text.addTraverseListener(e -> {
if (e.detail == SWT.TRAVERSE_TAB_NEXT) {
- resetEditors (true);
- }
- if (e.detail == SWT.TRAVERSE_ESCAPE) {
- disposeEditors ();
- }
+ resetEditors (true);
+ }
+ if (e.detail == SWT.TRAVERSE_ESCAPE) {
+ disposeEditors ();
+ }
});
}
@@ -642,28 +642,28 @@ abstract class Tab {
} else if (control.equals ("Composite")) {
Composite composite = new Composite (layoutComposite, SWT.BORDER);
children [i] = composite;
- } else if (control.equals ("CoolBar")) {
- CoolBar coolBar = new CoolBar (layoutComposite, SWT.NONE);
- ToolBar toolBar = new ToolBar (coolBar, SWT.BORDER);
+ } else if (control.equals ("CoolBar")) {
+ CoolBar coolBar = new CoolBar (layoutComposite, SWT.NONE);
+ ToolBar toolBar = new ToolBar (coolBar, SWT.BORDER);
ToolItem item = new ToolItem (toolBar, 0);
item.setText (LayoutExample.getResourceString ("Item",new String [] {"1"}));
item = new ToolItem (toolBar, 0);
item.setText (LayoutExample.getResourceString ("Item",new String [] {"2"}));
- CoolItem coolItem1 = new CoolItem (coolBar, 0);
- coolItem1.setControl (toolBar);
+ CoolItem coolItem1 = new CoolItem (coolBar, 0);
+ coolItem1.setControl (toolBar);
toolBar = new ToolBar (coolBar, SWT.BORDER);
item = new ToolItem (toolBar, 0);
item.setText (LayoutExample.getResourceString ("Item",new String [] {"3"}));
item = new ToolItem (toolBar, 0);
item.setText (LayoutExample.getResourceString ("Item",new String [] {"4"}));
- CoolItem coolItem2 = new CoolItem (coolBar, 0);
- coolItem2.setControl (toolBar);
- Point size = toolBar.computeSize(SWT.DEFAULT, SWT.DEFAULT);
- coolItem1.setSize(coolItem1.computeSize (size.x, size.y));
- coolItem2.setSize(coolItem2.computeSize (size.x, size.y));
- coolBar.setSize(coolBar.computeSize(SWT.DEFAULT, SWT.DEFAULT));
+ CoolItem coolItem2 = new CoolItem (coolBar, 0);
+ coolItem2.setControl (toolBar);
+ Point size = toolBar.computeSize(SWT.DEFAULT, SWT.DEFAULT);
+ coolItem1.setSize(coolItem1.computeSize (size.x, size.y));
+ coolItem2.setSize(coolItem2.computeSize (size.x, size.y));
+ coolBar.setSize(coolBar.computeSize(SWT.DEFAULT, SWT.DEFAULT));
children [i] = coolBar;
- } else if (control.equals ("Group")) {
+ } else if (control.equals ("Group")) {
Group group = new Group (layoutComposite, SWT.NONE);
group.setText (controlName);
children [i] = group;
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/ContinuousPaintSession.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/ContinuousPaintSession.java
index 1a9c8a296b..b3225e70dc 100644
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/ContinuousPaintSession.java
+++ b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/ContinuousPaintSession.java
@@ -76,7 +76,7 @@ public abstract class ContinuousPaintSession extends BasicPaintSession {
/**
* Deactivates the tool.
- */
+ */
@Override
public void endSession() {
abortRetrigger();
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/DragPaintSession.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/DragPaintSession.java
index 199d3c9a23..de93ba76e8 100644
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/DragPaintSession.java
+++ b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/DragPaintSession.java
@@ -59,7 +59,7 @@ public abstract class DragPaintSession extends BasicPaintSession {
/**
* Deactivates the tool.
- */
+ */
@Override
public void endSession() {
}
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/PaintSession.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/PaintSession.java
index 50ba9498f7..bcfda6669e 100644
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/PaintSession.java
+++ b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/PaintSession.java
@@ -38,9 +38,9 @@ public interface PaintSession extends MouseListener, MouseMoveListener {
/**
* Deactivates the session.
- *
+ *
* Note: When overriding this method, call super.endSession() at method exit.
- */
+ */
public abstract void endSession();
/**
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/SegmentedPaintSession.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/SegmentedPaintSession.java
index 18278779f6..15bdc3e2e2 100644
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/SegmentedPaintSession.java
+++ b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/SegmentedPaintSession.java
@@ -63,7 +63,7 @@ public abstract class SegmentedPaintSession extends BasicPaintSession {
/**
* Deactivates the tool.
- */
+ */
@Override
public void endSession() {
getPaintSurface().clearRubberbandSelection();
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/TextTool.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/TextTool.java
index 1a510e0d60..45e2e0ab7a 100644
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/TextTool.java
+++ b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/paint/TextTool.java
@@ -76,7 +76,7 @@ public class TextTool extends BasicPaintSession implements PaintTool {
/**
* Deactivates the tool.
- */
+ */
@Override
public void endSession() {
getPaintSurface().clearRubberbandSelection();
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/TextEditor.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/TextEditor.java
index cf00d895c4..2177b48b88 100644
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/TextEditor.java
+++ b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/TextEditor.java
@@ -244,14 +244,14 @@ public class TextEditor {
FileDialog dialog = new FileDialog(shell, SWT.OPEN);
dialog.setFilterNames(new String [] {getResourceString("Text_Documents")}); //$NON-NLS-1$
dialog.setFilterExtensions (new String [] {"*.txt"}); //$NON-NLS-1$
- String name = dialog.open();
- if (name == null) return;
- fileName = name;
- try (FileInputStream file = new FileInputStream(name);){
- styledText.setText(openFile(file));
- } catch (IOException e) {
- showError(getResourceString("Error"), e.getMessage()); //$NON-NLS-1$
- }
+ String name = dialog.open();
+ if (name == null) return;
+ fileName = name;
+ try (FileInputStream file = new FileInputStream(name);){
+ styledText.setText(openFile(file));
+ } catch (IOException e) {
+ showError(getResourceString("Error"), e.getMessage()); //$NON-NLS-1$
+ }
}));
final MenuItem saveItem = new MenuItem(fileMenu, SWT.PUSH);
@@ -1251,10 +1251,10 @@ public class TextEditor {
void saveFile() {
if (fileName != null) {
try (FileWriter file = new FileWriter(fileName);) {
- file.write(styledText.getText());
+ file.write(styledText.getText());
} catch (IOException e) {
- showError(getResourceString("Error"), e.getMessage());
- }
+ showError(getResourceString("Error"), e.getMessage());
+ }
}
}
diff --git a/examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/FogTab.java b/examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/FogTab.java
index cc5a4cb7e3..051c5eedc6 100644
--- a/examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/FogTab.java
+++ b/examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/FogTab.java
@@ -121,7 +121,7 @@ class FogTab extends OpenGLTab {
/**
* Creates a cube at 0,0 in the viewport.
*/
- void createCube() {
+ void createCube() {
GL.glNewList(cubeListIndexBase, GL.GL_COMPILE);
GL.glBegin(GL.GL_QUADS);
// front
diff --git a/examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/LWJGLExample.java b/examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/LWJGLExample.java
index 0a966dc119..d2b0c7c68f 100644
--- a/examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/LWJGLExample.java
+++ b/examples/org.eclipse.swt.opengl.examples/src/org/eclipse/swt/opengl/examples/LWJGLExample.java
@@ -67,25 +67,25 @@ public class LWJGLExample {
canvas.setCurrent();
try {
- GLContext.useContext(canvas);
- } catch(LWJGLException e) { e.printStackTrace(); }
-
- canvas.addListener(SWT.Resize, new Listener() {
- public void handleEvent(Event event) {
- Rectangle bounds = canvas.getBounds();
- float fAspect = (float) bounds.width / (float) bounds.height;
+ GLContext.useContext(canvas);
+ } catch(LWJGLException e) { e.printStackTrace(); }
+
+ canvas.addListener(SWT.Resize, new Listener() {
+ public void handleEvent(Event event) {
+ Rectangle bounds = canvas.getBounds();
+ float fAspect = (float) bounds.width / (float) bounds.height;
canvas.setCurrent();
try {
GLContext.useContext(canvas);
- } catch(LWJGLException e) { e.printStackTrace(); }
- GL11.glViewport(0, 0, bounds.width, bounds.height);
- GL11.glMatrixMode(GL11.GL_PROJECTION);
- GL11.glLoadIdentity();
- GLU.gluPerspective(45.0f, fAspect, 0.5f, 400.0f);
- GL11.glMatrixMode(GL11.GL_MODELVIEW);
- GL11.glLoadIdentity();
- }
- });
+ } catch(LWJGLException e) { e.printStackTrace(); }
+ GL11.glViewport(0, 0, bounds.width, bounds.height);
+ GL11.glMatrixMode(GL11.GL_PROJECTION);
+ GL11.glLoadIdentity();
+ GLU.gluPerspective(45.0f, fAspect, 0.5f, 400.0f);
+ GL11.glMatrixMode(GL11.GL_MODELVIEW);
+ GL11.glLoadIdentity();
+ }
+ });
GL11.glClearColor(1.0f, 1.0f, 1.0f, 1.0f);
GL11.glColor3f(1.0f, 0.0f, 0.0f);
@@ -98,14 +98,14 @@ public class LWJGLExample {
shell.setSize(640, 480);
shell.open();
- display.asyncExec(new Runnable() {
- int rot = 0;
+ display.asyncExec(new Runnable() {
+ int rot = 0;
public void run() {
if (!canvas.isDisposed()) {
canvas.setCurrent();
try {
GLContext.useContext(canvas);
- } catch(LWJGLException e) { e.printStackTrace(); }
+ } catch(LWJGLException e) { e.printStackTrace(); }
GL11.glClear(GL11.GL_COLOR_BUFFER_BIT | GL11.GL_DEPTH_BUFFER_BIT);
GL11.glClearColor(.3f, .5f, .8f, 1.0f);
GL11.glLoadIdentity();
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet150.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet150.java
index ff5aec2417..c06f5eae8e 100644
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet150.java
+++ b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet150.java
@@ -30,49 +30,49 @@ public class Snippet150 {
static int itemCount;
static CoolItem createItem(CoolBar coolBar, int count) {
- ToolBar toolBar = new ToolBar(coolBar, SWT.FLAT);
- for (int i = 0; i < count; i++) {
- ToolItem item = new ToolItem(toolBar, SWT.PUSH);
- item.setText(itemCount++ +"");
- }
- toolBar.pack();
- Point size = toolBar.getSize();
- CoolItem item = new CoolItem(coolBar, SWT.NONE);
- item.setControl(toolBar);
- Point preferred = item.computeSize(size.x, size.y);
- item.setPreferredSize(preferred);
- return item;
+ ToolBar toolBar = new ToolBar(coolBar, SWT.FLAT);
+ for (int i = 0; i < count; i++) {
+ ToolItem item = new ToolItem(toolBar, SWT.PUSH);
+ item.setText(itemCount++ +"");
+ }
+ toolBar.pack();
+ Point size = toolBar.getSize();
+ CoolItem item = new CoolItem(coolBar, SWT.NONE);
+ item.setControl(toolBar);
+ Point preferred = item.computeSize(size.x, size.y);
+ item.setPreferredSize(preferred);
+ return item;
}
public static void main(String[] args) {
- Display display = new Display();
- final Shell shell = new Shell(display);
+ Display display = new Display();
+ final Shell shell = new Shell(display);
shell.setText("Snippet 150");
- CoolBar coolBar = new CoolBar(shell, SWT.NONE);
- createItem(coolBar, 3);
- createItem(coolBar, 2);
- createItem(coolBar, 3);
- createItem(coolBar, 4);
- int style = SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL;
- Text text = new Text(shell, style);
- FormLayout layout = new FormLayout();
- shell.setLayout(layout);
- FormData coolData = new FormData();
- coolData.left = new FormAttachment(0);
- coolData.right = new FormAttachment(100);
- coolData.top = new FormAttachment(0);
- coolBar.setLayoutData(coolData);
- coolBar.addListener(SWT.Resize, event -> shell.layout());
- FormData textData = new FormData();
- textData.left = new FormAttachment(0);
- textData.right = new FormAttachment(100);
- textData.top = new FormAttachment(coolBar);
- textData.bottom = new FormAttachment(100);
- text.setLayoutData(textData);
- shell.open();
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch()) display.sleep();
- }
- display.dispose();
+ CoolBar coolBar = new CoolBar(shell, SWT.NONE);
+ createItem(coolBar, 3);
+ createItem(coolBar, 2);
+ createItem(coolBar, 3);
+ createItem(coolBar, 4);
+ int style = SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL;
+ Text text = new Text(shell, style);
+ FormLayout layout = new FormLayout();
+ shell.setLayout(layout);
+ FormData coolData = new FormData();
+ coolData.left = new FormAttachment(0);
+ coolData.right = new FormAttachment(100);
+ coolData.top = new FormAttachment(0);
+ coolBar.setLayoutData(coolData);
+ coolBar.addListener(SWT.Resize, event -> shell.layout());
+ FormData textData = new FormData();
+ textData.left = new FormAttachment(0);
+ textData.right = new FormAttachment(100);
+ textData.top = new FormAttachment(coolBar);
+ textData.bottom = new FormAttachment(100);
+ text.setLayoutData(textData);
+ shell.open();
+ while (!shell.isDisposed()) {
+ if (!display.readAndDispatch()) display.sleep();
+ }
+ display.dispose();
}
}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet152.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet152.java
index 35b647c3af..8f4dac46cb 100644
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet152.java
+++ b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet152.java
@@ -29,67 +29,67 @@ import org.eclipse.swt.widgets.*;
public class Snippet152 {
public static void main(String[] args) {
- Display display = new Display();
- Shell shell = new Shell(display);
+ Display display = new Display();
+ Shell shell = new Shell(display);
shell.setText("Snippet 152");
- FormLayout layout = new FormLayout();
- shell.setLayout(layout);
- final Label label = new Label(shell, SWT.BORDER);
- Listener armListener = event -> {
- MenuItem item = (MenuItem) event.widget;
- label.setText(item.getText());
- label.update();
+ FormLayout layout = new FormLayout();
+ shell.setLayout(layout);
+ final Label label = new Label(shell, SWT.BORDER);
+ Listener armListener = event -> {
+ MenuItem item = (MenuItem) event.widget;
+ label.setText(item.getText());
+ label.update();
};
- Listener showListener = event -> {
- Menu menu = (Menu) event.widget;
- MenuItem item = menu.getParentItem();
- if (item != null) {
- label.setText(item.getText());
- label.update();
- }
+ Listener showListener = event -> {
+ Menu menu = (Menu) event.widget;
+ MenuItem item = menu.getParentItem();
+ if (item != null) {
+ label.setText(item.getText());
+ label.update();
+ }
};
- Listener hideListener = event -> {
- label.setText("");
- label.update();
+ Listener hideListener = event -> {
+ label.setText("");
+ label.update();
};
- FormData labelData = new FormData();
- labelData.left = new FormAttachment(0);
- labelData.right = new FormAttachment(100);
- labelData.bottom = new FormAttachment(100);
- label.setLayoutData(labelData);
- Menu menuBar = new Menu(shell, SWT.BAR);
- shell.setMenuBar(menuBar);
- MenuItem fileItem = new MenuItem(menuBar, SWT.CASCADE);
- fileItem.setText("File");
- fileItem.addListener(SWT.Arm, armListener);
- MenuItem editItem = new MenuItem(menuBar, SWT.CASCADE);
- editItem.setText("Edit");
- editItem.addListener(SWT.Arm, armListener);
- Menu fileMenu = new Menu(shell, SWT.DROP_DOWN);
- fileMenu.addListener(SWT.Hide, hideListener);
- fileMenu.addListener(SWT.Show, showListener);
- fileItem.setMenu(fileMenu);
- String[] fileStrings = { "New", "Close", "Exit" };
- for (int i = 0; i < fileStrings.length; i++) {
- MenuItem item = new MenuItem(fileMenu, SWT.PUSH);
- item.setText(fileStrings[i]);
- item.addListener(SWT.Arm, armListener);
- }
- Menu editMenu = new Menu(shell, SWT.DROP_DOWN);
- editMenu.addListener(SWT.Hide, hideListener);
- editMenu.addListener(SWT.Show, showListener);
- String[] editStrings = { "Cut", "Copy", "Paste" };
- editItem.setMenu(editMenu);
- for (int i = 0; i < editStrings.length; i++) {
- MenuItem item = new MenuItem(editMenu, SWT.PUSH);
- item.setText(editStrings[i]);
- item.addListener(SWT.Arm, armListener);
- }
- shell.open();
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch()) display.sleep();
- }
- display.dispose();
+ FormData labelData = new FormData();
+ labelData.left = new FormAttachment(0);
+ labelData.right = new FormAttachment(100);
+ labelData.bottom = new FormAttachment(100);
+ label.setLayoutData(labelData);
+ Menu menuBar = new Menu(shell, SWT.BAR);
+ shell.setMenuBar(menuBar);
+ MenuItem fileItem = new MenuItem(menuBar, SWT.CASCADE);
+ fileItem.setText("File");
+ fileItem.addListener(SWT.Arm, armListener);
+ MenuItem editItem = new MenuItem(menuBar, SWT.CASCADE);
+ editItem.setText("Edit");
+ editItem.addListener(SWT.Arm, armListener);
+ Menu fileMenu = new Menu(shell, SWT.DROP_DOWN);
+ fileMenu.addListener(SWT.Hide, hideListener);
+ fileMenu.addListener(SWT.Show, showListener);
+ fileItem.setMenu(fileMenu);
+ String[] fileStrings = { "New", "Close", "Exit" };
+ for (int i = 0; i < fileStrings.length; i++) {
+ MenuItem item = new MenuItem(fileMenu, SWT.PUSH);
+ item.setText(fileStrings[i]);
+ item.addListener(SWT.Arm, armListener);
+ }
+ Menu editMenu = new Menu(shell, SWT.DROP_DOWN);
+ editMenu.addListener(SWT.Hide, hideListener);
+ editMenu.addListener(SWT.Show, showListener);
+ String[] editStrings = { "Cut", "Copy", "Paste" };
+ editItem.setMenu(editMenu);
+ for (int i = 0; i < editStrings.length; i++) {
+ MenuItem item = new MenuItem(editMenu, SWT.PUSH);
+ item.setText(editStrings[i]);
+ item.addListener(SWT.Arm, armListener);
+ }
+ shell.open();
+ while (!shell.isDisposed()) {
+ if (!display.readAndDispatch()) display.sleep();
+ }
+ display.dispose();
}
}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet153.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet153.java
index 8e7f0a090f..af9c59720a 100644
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet153.java
+++ b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet153.java
@@ -27,33 +27,33 @@ public class Snippet153 {
static String statusText = "";
public static void main(String[] args) {
- final Display display = new Display();
- Shell shell = new Shell(display);
+ final Display display = new Display();
+ Shell shell = new Shell(display);
shell.setText("Snippet 153");
- shell.setBounds(10, 10, 200, 200);
- final ToolBar bar = new ToolBar(shell, SWT.BORDER);
- bar.setBounds(10, 10, 150, 50);
- final Label statusLine = new Label(shell, SWT.BORDER);
- statusLine.setBounds(10, 90, 150, 30);
- new ToolItem(bar, SWT.NONE).setText("item 1");
- new ToolItem(bar, SWT.NONE).setText("item 2");
- new ToolItem(bar, SWT.NONE).setText("item 3");
- bar.addMouseMoveListener(e -> {
- ToolItem item = bar.getItem(new Point(e.x, e.y));
- String name = "";
- if (item != null) {
- name = item.getText();
- }
- if (!statusText.equals(name)) {
- statusLine.setText(name);
- statusText = name;
- }
+ shell.setBounds(10, 10, 200, 200);
+ final ToolBar bar = new ToolBar(shell, SWT.BORDER);
+ bar.setBounds(10, 10, 150, 50);
+ final Label statusLine = new Label(shell, SWT.BORDER);
+ statusLine.setBounds(10, 90, 150, 30);
+ new ToolItem(bar, SWT.NONE).setText("item 1");
+ new ToolItem(bar, SWT.NONE).setText("item 2");
+ new ToolItem(bar, SWT.NONE).setText("item 3");
+ bar.addMouseMoveListener(e -> {
+ ToolItem item = bar.getItem(new Point(e.x, e.y));
+ String name = "";
+ if (item != null) {
+ name = item.getText();
+ }
+ if (!statusText.equals(name)) {
+ statusLine.setText(name);
+ statusText = name;
+ }
});
- shell.open();
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch()) display.sleep();
- }
- display.dispose();
+ shell.open();
+ while (!shell.isDisposed()) {
+ if (!display.readAndDispatch()) display.sleep();
+ }
+ display.dispose();
}
}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet157.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet157.java
index 7292affd9a..e1c48f8f0c 100644
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet157.java
+++ b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet157.java
@@ -23,7 +23,7 @@ package org.eclipse.swt.snippets;
*/
import java.applet.*;
-
+
public class Snippet157 extends Applet {
org.eclipse.swt.widgets.Display display;
@@ -63,15 +63,15 @@ public void init () {
}
@Override
public void stop (){
- if (display != null && !display.isDisposed ()){
- display.syncExec(() -> {
+ if (display != null && !display.isDisposed ()){
+ display.syncExec(() -> {
if (swtParent != null && !swtParent.isDisposed ()) swtParent.dispose ();
swtParent = null;
display.dispose ();
display = null;
});
- remove (awtParent);
- awtParent = null;
- }
+ remove (awtParent);
+ awtParent = null;
+ }
}
} \ No newline at end of file
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet174.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet174.java
index 9f526b0fbd..9777d7f4bb 100644
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet174.java
+++ b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet174.java
@@ -45,66 +45,66 @@ import org.eclipse.swt.widgets.*;
public class Snippet174 {
public static void main(String[] args) {
- Display display = new Display();
- Shell shell = new Shell(display);
- shell.setText("OpenGL in SWT");
- shell.setLayout(new FillLayout());
- GLData data = new GLData();
- data.doubleBuffer = true;
- final GLCanvas canvas = new GLCanvas(shell, SWT.NO_BACKGROUND, data);
+ Display display = new Display();
+ Shell shell = new Shell(display);
+ shell.setText("OpenGL in SWT");
+ shell.setLayout(new FillLayout());
+ GLData data = new GLData();
+ data.doubleBuffer = true;
+ final GLCanvas canvas = new GLCanvas(shell, SWT.NO_BACKGROUND, data);
canvas.addControlListener(ControlListener.controlResizedAdapter(e -> {
resize(canvas);
}));
- init(canvas);
- new Runnable() {
- @Override
+ init(canvas);
+ new Runnable() {
+ @Override
public void run() {
- if (canvas.isDisposed()) return;
- render();
- canvas.swapBuffers();
- canvas.getDisplay().timerExec(50, this);
- }
- }.run();
- shell.open();
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch()) display.sleep();
- }
- display.dispose();
+ if (canvas.isDisposed()) return;
+ render();
+ canvas.swapBuffers();
+ canvas.getDisplay().timerExec(50, this);
+ }
+ }.run();
+ shell.open();
+ while (!shell.isDisposed()) {
+ if (!display.readAndDispatch()) display.sleep();
+ }
+ display.dispose();
}
static void init(GLCanvas canvas) {
- canvas.setCurrent();
- resize(canvas);
- GL.glClearColor(1.0f, 1.0f, 1.0f, 1.0f);
- GL.glColor3f(0.0f, 0.0f, 0.0f);
- GL.glClearDepth(1.0f);
- GL.glEnable(GL.GL_DEPTH_TEST);
- GL.glHint(GL.GL_PERSPECTIVE_CORRECTION_HINT, GL.GL_NICEST);
+ canvas.setCurrent();
+ resize(canvas);
+ GL.glClearColor(1.0f, 1.0f, 1.0f, 1.0f);
+ GL.glColor3f(0.0f, 0.0f, 0.0f);
+ GL.glClearDepth(1.0f);
+ GL.glEnable(GL.GL_DEPTH_TEST);
+ GL.glHint(GL.GL_PERSPECTIVE_CORRECTION_HINT, GL.GL_NICEST);
}
static void render() {
- GL.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
- GL.glLoadIdentity();
- GL.glTranslatef(0.0f, 0.0f, -6.0f);
- GL.glBegin(GL.GL_QUADS);
- GL.glVertex3f(-1.0f, 1.0f, 0.0f);
- GL.glVertex3f(1.0f, 1.0f, 0.0f);
- GL.glVertex3f(1.0f, -1.0f, 0.0f);
- GL.glVertex3f(-1.0f, -1.0f, 0.0f);
- GL.glEnd();
+ GL.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
+ GL.glLoadIdentity();
+ GL.glTranslatef(0.0f, 0.0f, -6.0f);
+ GL.glBegin(GL.GL_QUADS);
+ GL.glVertex3f(-1.0f, 1.0f, 0.0f);
+ GL.glVertex3f(1.0f, 1.0f, 0.0f);
+ GL.glVertex3f(1.0f, -1.0f, 0.0f);
+ GL.glVertex3f(-1.0f, -1.0f, 0.0f);
+ GL.glEnd();
}
static void resize(GLCanvas canvas) {
- canvas.setCurrent();
- Rectangle rect = canvas.getClientArea();
- int width = rect.width;
- int height = Math.max(rect.height, 1);
- GL.glViewport(0, 0, width, height);
- GL.glMatrixMode(GL.GL_PROJECTION);
- GL.glLoadIdentity();
- float aspect = (float) width / (float) height;
- GLU.gluPerspective(45.0f, aspect, 0.5f, 400.0f);
- GL.glMatrixMode(GL.GL_MODELVIEW);
- GL.glLoadIdentity();
+ canvas.setCurrent();
+ Rectangle rect = canvas.getClientArea();
+ int width = rect.width;
+ int height = Math.max(rect.height, 1);
+ GL.glViewport(0, 0, width, height);
+ GL.glMatrixMode(GL.GL_PROJECTION);
+ GL.glLoadIdentity();
+ float aspect = (float) width / (float) height;
+ GLU.gluPerspective(45.0f, aspect, 0.5f, 400.0f);
+ GL.glMatrixMode(GL.GL_MODELVIEW);
+ GL.glLoadIdentity();
}
}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet186.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet186.java
index 7253cb7c56..c9af85c36a 100644
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet186.java
+++ b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet186.java
@@ -133,30 +133,30 @@ static String readSafeArray(Variant variantByRef) {
// Read a safearray that contains data of
// type VT_UI1 (unsigned shorts) which contains
// a text stream.
- long /*int*/ pPostData = variantByRef.getByRef();
- short[] vt_type = new short[1];
- OS.MoveMemory(vt_type, pPostData, 2);
- String result = null;
- if (vt_type[0] == (short)(OLE.VT_BYREF | OLE.VT_VARIANT)) {
- int[] pVariant = new int[1];
- OS.MoveMemory(pVariant, pPostData + 8, 4);
- vt_type = new short[1];
- OS.MoveMemory(vt_type, pVariant[0], 2);
- if (vt_type[0] == (short)(OLE.VT_ARRAY | OLE.VT_UI1)) {
- long /*int*/ [] pSafearray = new long /*int*/[1];
- OS.MoveMemory(pSafearray, pVariant[0] + 8, OS.PTR_SIZEOF);
- SAFEARRAY safeArray = new SAFEARRAY();
- OS.MoveMemory(safeArray, pSafearray[0], SAFEARRAY.sizeof);
- for (int i = 0; i < safeArray.cDims; i++) {
- int cchWideChar = OS.MultiByteToWideChar (CodePage, OS.MB_PRECOMPOSED, safeArray.pvData, -1, null, 0);
+ long /*int*/ pPostData = variantByRef.getByRef();
+ short[] vt_type = new short[1];
+ OS.MoveMemory(vt_type, pPostData, 2);
+ String result = null;
+ if (vt_type[0] == (short)(OLE.VT_BYREF | OLE.VT_VARIANT)) {
+ int[] pVariant = new int[1];
+ OS.MoveMemory(pVariant, pPostData + 8, 4);
+ vt_type = new short[1];
+ OS.MoveMemory(vt_type, pVariant[0], 2);
+ if (vt_type[0] == (short)(OLE.VT_ARRAY | OLE.VT_UI1)) {
+ long /*int*/ [] pSafearray = new long /*int*/[1];
+ OS.MoveMemory(pSafearray, pVariant[0] + 8, OS.PTR_SIZEOF);
+ SAFEARRAY safeArray = new SAFEARRAY();
+ OS.MoveMemory(safeArray, pSafearray[0], SAFEARRAY.sizeof);
+ for (int i = 0; i < safeArray.cDims; i++) {
+ int cchWideChar = OS.MultiByteToWideChar (CodePage, OS.MB_PRECOMPOSED, safeArray.pvData, -1, null, 0);
if (cchWideChar == 0) return null;
char[] lpWideCharStr = new char [cchWideChar - 1];
OS.MultiByteToWideChar (CodePage, OS.MB_PRECOMPOSED, safeArray.pvData, -1, lpWideCharStr, lpWideCharStr.length);
result = new String(lpWideCharStr);
- }
- }
- }
- return result;
+ }
+ }
+ }
+ return result;
}
static Variant writeSafeArray (String string) {
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet2.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet2.java
index 3b76456d49..300d8ffee4 100644
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet2.java
+++ b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet2.java
@@ -31,55 +31,55 @@ import org.eclipse.swt.widgets.*;
public class Snippet2 {
public static void main (String [] args) {
- Display display = new Display ();
- Shell shell = new Shell (display);
+ Display display = new Display ();
+ Shell shell = new Shell (display);
shell.setText("Snippet 2");
- shell.setLayout(new FillLayout());
- final Table table = new Table(shell, SWT.BORDER);
- table.setHeaderVisible(true);
- final TableColumn column1 = new TableColumn(table, SWT.NONE);
- column1.setText("Column 1");
- final TableColumn column2 = new TableColumn(table, SWT.NONE);
- column2.setText("Column 2");
- TableItem item = new TableItem(table, SWT.NONE);
- item.setText(new String[] {"a", "3"});
- item = new TableItem(table, SWT.NONE);
- item.setText(new String[] {"b", "2"});
- item = new TableItem(table, SWT.NONE);
- item.setText(new String[] {"c", "1"});
- column1.setWidth(100);
- column2.setWidth(100);
- Listener sortListener = e -> {
- TableItem[] items = table.getItems();
- Collator collator = Collator.getInstance(Locale.getDefault());
- TableColumn column = (TableColumn)e.widget;
- int index = column == column1 ? 0 : 1;
- for (int i = 1; i < items.length; i++) {
- String value1 = items[i].getText(index);
- for (int j = 0; j < i; j++){
- String value2 = items[j].getText(index);
- if (collator.compare(value1, value2) < 0) {
- String[] values = {items[i].getText(0), items[i].getText(1)};
- items[i].dispose();
- TableItem item1 = new TableItem(table, SWT.NONE, j);
- item1.setText(values);
- items = table.getItems();
- break;
- }
- }
- }
- table.setSortColumn(column);
+ shell.setLayout(new FillLayout());
+ final Table table = new Table(shell, SWT.BORDER);
+ table.setHeaderVisible(true);
+ final TableColumn column1 = new TableColumn(table, SWT.NONE);
+ column1.setText("Column 1");
+ final TableColumn column2 = new TableColumn(table, SWT.NONE);
+ column2.setText("Column 2");
+ TableItem item = new TableItem(table, SWT.NONE);
+ item.setText(new String[] {"a", "3"});
+ item = new TableItem(table, SWT.NONE);
+ item.setText(new String[] {"b", "2"});
+ item = new TableItem(table, SWT.NONE);
+ item.setText(new String[] {"c", "1"});
+ column1.setWidth(100);
+ column2.setWidth(100);
+ Listener sortListener = e -> {
+ TableItem[] items = table.getItems();
+ Collator collator = Collator.getInstance(Locale.getDefault());
+ TableColumn column = (TableColumn)e.widget;
+ int index = column == column1 ? 0 : 1;
+ for (int i = 1; i < items.length; i++) {
+ String value1 = items[i].getText(index);
+ for (int j = 0; j < i; j++){
+ String value2 = items[j].getText(index);
+ if (collator.compare(value1, value2) < 0) {
+ String[] values = {items[i].getText(0), items[i].getText(1)};
+ items[i].dispose();
+ TableItem item1 = new TableItem(table, SWT.NONE, j);
+ item1.setText(values);
+ items = table.getItems();
+ break;
+ }
+ }
+ }
+ table.setSortColumn(column);
};
- column1.addListener(SWT.Selection, sortListener);
- column2.addListener(SWT.Selection, sortListener);
- table.setSortColumn(column1);
- table.setSortDirection(SWT.UP);
- shell.setSize(shell.computeSize(SWT.DEFAULT, SWT.DEFAULT).x, 300);
- shell.open();
- while (!shell.isDisposed ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose ();
+ column1.addListener(SWT.Selection, sortListener);
+ column2.addListener(SWT.Selection, sortListener);
+ table.setSortColumn(column1);
+ table.setSortDirection(SWT.UP);
+ shell.setSize(shell.computeSize(SWT.DEFAULT, SWT.DEFAULT).x, 300);
+ shell.open();
+ while (!shell.isDisposed ()) {
+ if (!display.readAndDispatch ()) display.sleep ();
+ }
+ display.dispose ();
}
}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet210.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet210.java
index 8a0c277d0c..777a584b53 100644
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet210.java
+++ b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet210.java
@@ -30,17 +30,17 @@ import org.eclipse.swt.widgets.*;
public class Snippet210 {
static String string1 = "A drag source is the provider of data in a Drag and Drop data transfer as well as "+
- "the originator of the Drag and Drop operation. The data provided by the drag source "+
- "may be transferred to another location in the same widget, to a different widget "+
- "within the same application, or to a different application altogether. For example, "+
- "you can drag text from your application and drop it on an email application, or you "+
- "could drag an item in a tree and drop it below a different node in the same tree.";
+ "the originator of the Drag and Drop operation. The data provided by the drag source "+
+ "may be transferred to another location in the same widget, to a different widget "+
+ "within the same application, or to a different application altogether. For example, "+
+ "you can drag text from your application and drop it on an email application, or you "+
+ "could drag an item in a tree and drop it below a different node in the same tree.";
static String string2 = "A drop target receives data in a Drag and Drop operation. The data received by "+
- "the drop target may have come from the same widget, from a different widget within "+
- "the same application, or from a different application altogether. For example, you "+
- "can drag text from an email application and drop it on your application, or you could "+
- "drag an item in a tree and drop it below a different node in the same tree.";
+ "the drop target may have come from the same widget, from a different widget within "+
+ "the same application, or from a different application altogether. For example, you "+
+ "can drag text from an email application and drop it on your application, or you could "+
+ "drag an item in a tree and drop it below a different node in the same tree.";
public static void main (String [] args) {
final Display display = new Display ();
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet228.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet228.java
index 30ced9a4fd..afa9d91ffa 100644
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet228.java
+++ b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet228.java
@@ -48,8 +48,8 @@ public static void main(String [] args) {
column2.setWidth(200);
String[] labels = new String[]{"Resolved", "New", "Won't Fix", "Invalid"};
for (int i=0; i<labels.length; i++) {
- TableItem item = new TableItem(table, SWT.NONE);
- item.setText(labels[i]);
+ TableItem item = new TableItem(table, SWT.NONE);
+ item.setText(labels[i]);
}
/*
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet244.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet244.java
index 7f48a275c3..83bd297598 100644
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet244.java
+++ b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet244.java
@@ -26,28 +26,28 @@ import org.eclipse.swt.widgets.*;
public class Snippet244 {
static String SEARCH_STRING = "box";
- public static void main(String[] args) {
- final Display display = new Display();
- Shell shell = new Shell(display);
- shell.setText("Snippet 244");
- shell.setLayout(new FillLayout());
- final StyledText text = new StyledText(shell, SWT.NONE);
- StyleRange style = new StyleRange();
- style.borderColor = display.getSystemColor(SWT.COLOR_RED);
- style.borderStyle = SWT.BORDER_SOLID;
- StyleRange[] styles = {style};
- String contents = "This demonstrates drawing a box\naround every occurrence of the word\nbox in the StyledText";
- text.setText(contents);
+ public static void main(String[] args) {
+ final Display display = new Display();
+ Shell shell = new Shell(display);
+ shell.setText("Snippet 244");
+ shell.setLayout(new FillLayout());
+ final StyledText text = new StyledText(shell, SWT.NONE);
+ StyleRange style = new StyleRange();
+ style.borderColor = display.getSystemColor(SWT.COLOR_RED);
+ style.borderStyle = SWT.BORDER_SOLID;
+ StyleRange[] styles = {style};
+ String contents = "This demonstrates drawing a box\naround every occurrence of the word\nbox in the StyledText";
+ text.setText(contents);
int index = contents.indexOf(SEARCH_STRING);
while (index != -1) {
text.setStyleRanges(0, 0, new int[] {index, SEARCH_STRING.length()}, styles);
index = contents.indexOf(SEARCH_STRING, index + 1);
}
- shell.pack();
- shell.open();
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch()) display.sleep();
- }
- display.dispose();
- }
+ shell.pack();
+ shell.open();
+ while (!shell.isDisposed()) {
+ if (!display.readAndDispatch()) display.sleep();
+ }
+ display.dispose();
+ }
}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet257.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet257.java
index d4ea9e1a8a..e0a019c4f9 100644
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet257.java
+++ b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet257.java
@@ -31,11 +31,11 @@ import org.eclipse.swt.widgets.*;
public class Snippet257 {
static String string1 = "A drag source is the provider of data in a Drag and Drop data transfer as well as "+
- "the originator of the Drag and Drop operation. The data provided by the drag source "+
- "may be transferred to another location in the same widget, to a different widget "+
- "within the same application, or to a different application altogether. For example, "+
- "you can drag text from your application and drop it on an email application, or you "+
- "could drag an item in a tree and drop it below a different node in the same tree.";
+ "the originator of the Drag and Drop operation. The data provided by the drag source "+
+ "may be transferred to another location in the same widget, to a different widget "+
+ "within the same application, or to a different application altogether. For example, "+
+ "you can drag text from your application and drop it on an email application, or you "+
+ "could drag an item in a tree and drop it below a different node in the same tree.";
static String DRAG_START_DATA = "DRAG_START_DATA";
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet274.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet274.java
index 30ba24f3fc..3287361d27 100644
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet274.java
+++ b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet274.java
@@ -28,68 +28,68 @@ import org.eclipse.swt.widgets.*;
public class Snippet274 {
static void checkPath(TreeItem item, boolean checked, boolean grayed) {
- if (item == null) return;
- if (grayed) {
- checked = true;
- } else {
- int index = 0;
- TreeItem[] items = item.getItems();
- while (index < items.length) {
- TreeItem child = items[index];
- if (child.getGrayed() || checked != child.getChecked()) {
- checked = grayed = true;
- break;
- }
- index++;
- }
- }
- item.setChecked(checked);
- item.setGrayed(grayed);
- checkPath(item.getParentItem(), checked, grayed);
+ if (item == null) return;
+ if (grayed) {
+ checked = true;
+ } else {
+ int index = 0;
+ TreeItem[] items = item.getItems();
+ while (index < items.length) {
+ TreeItem child = items[index];
+ if (child.getGrayed() || checked != child.getChecked()) {
+ checked = grayed = true;
+ break;
+ }
+ index++;
+ }
+ }
+ item.setChecked(checked);
+ item.setGrayed(grayed);
+ checkPath(item.getParentItem(), checked, grayed);
}
static void checkItems(TreeItem item, boolean checked) {
- item.setGrayed(false);
- item.setChecked(checked);
- TreeItem[] items = item.getItems();
- for (int i = 0; i < items.length; i++) {
- checkItems(items[i], checked);
- }
+ item.setGrayed(false);
+ item.setChecked(checked);
+ TreeItem[] items = item.getItems();
+ for (int i = 0; i < items.length; i++) {
+ checkItems(items[i], checked);
+ }
}
public static void main(String[] args) {
- Display display = new Display();
- Shell shell = new Shell(display);
+ Display display = new Display();
+ Shell shell = new Shell(display);
shell.setText("Snippet 274");
- Tree tree = new Tree(shell, SWT.BORDER | SWT.CHECK);
- tree.addListener(SWT.Selection, event -> {
- if (event.detail == SWT.CHECK) {
- TreeItem item = (TreeItem) event.item;
- boolean checked = item.getChecked();
- checkItems(item, checked);
- checkPath(item.getParentItem(), checked, false);
- }
+ Tree tree = new Tree(shell, SWT.BORDER | SWT.CHECK);
+ tree.addListener(SWT.Selection, event -> {
+ if (event.detail == SWT.CHECK) {
+ TreeItem item = (TreeItem) event.item;
+ boolean checked = item.getChecked();
+ checkItems(item, checked);
+ checkPath(item.getParentItem(), checked, false);
+ }
});
- for (int i = 0; i < 4; i++) {
- TreeItem itemI = new TreeItem(tree, SWT.NONE);
- itemI.setText("Item " + i);
- for (int j = 0; j < 4; j++) {
- TreeItem itemJ = new TreeItem(itemI, SWT.NONE);
- itemJ.setText("Item " + i + " " + j);
- for (int k = 0; k < 4; k++) {
- TreeItem itemK = new TreeItem(itemJ, SWT.NONE);
- itemK.setText("Item " + i + " " + j + " " + k);
- }
- }
- }
+ for (int i = 0; i < 4; i++) {
+ TreeItem itemI = new TreeItem(tree, SWT.NONE);
+ itemI.setText("Item " + i);
+ for (int j = 0; j < 4; j++) {
+ TreeItem itemJ = new TreeItem(itemI, SWT.NONE);
+ itemJ.setText("Item " + i + " " + j);
+ for (int k = 0; k < 4; k++) {
+ TreeItem itemK = new TreeItem(itemJ, SWT.NONE);
+ itemK.setText("Item " + i + " " + j + " " + k);
+ }
+ }
+ }
Rectangle clientArea = shell.getClientArea();
- tree.setBounds(clientArea.x, clientArea.y, 200, 200);
- shell.pack();
- shell.open();
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch()) display.sleep();
- }
- display.dispose();
+ tree.setBounds(clientArea.x, clientArea.y, 200, 200);
+ shell.pack();
+ shell.open();
+ while (!shell.isDisposed()) {
+ if (!display.readAndDispatch()) display.sleep();
+ }
+ display.dispose();
}
}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet282.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet282.java
index 78d352bd4f..014eaaecba 100644
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet282.java
+++ b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet282.java
@@ -36,14 +36,14 @@ public class Snippet282 {
shell.setLayout(new GridLayout());
shell.setText("Clipboard ImageTransfer");
- final Button imageButton = new Button(shell, SWT.NONE );
- GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true);
- gd.minimumHeight = 400;
- gd.minimumWidth = 600;
- imageButton.setLayoutData(gd);
+ final Button imageButton = new Button(shell, SWT.NONE );
+ GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true);
+ gd.minimumHeight = 400;
+ gd.minimumWidth = 600;
+ imageButton.setLayoutData(gd);
- final Text imageText = new Text(shell, SWT.BORDER);
- imageText.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false));
+ final Text imageText = new Text(shell, SWT.BORDER);
+ imageText.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false));
Composite buttons = new Composite(shell, SWT.NONE);
buttons.setLayout(new GridLayout(4, true));
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet304.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet304.java
index 77713048d7..ed9ccc9568 100644
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet304.java
+++ b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet304.java
@@ -26,62 +26,62 @@ import org.eclipse.swt.layout.*;
import org.eclipse.swt.widgets.*;
public class Snippet304 {
- static Display display = null;
+ static Display display = null;
- public static void main(String[] args) {
- display = new Display();
- Shell shell = new Shell(display);
- shell.setText("Snippet 304");
+ public static void main(String[] args) {
+ display = new Display();
+ Shell shell = new Shell(display);
+ shell.setText("Snippet 304");
- shell.setLayout(new GridLayout());
- Text text = new Text(shell, SWT.MULTI | SWT.BORDER);
- text.setText("< cursor was there\na\nmulti\nline\ntext\nnow it's here >");
+ shell.setLayout(new GridLayout());
+ Text text = new Text(shell, SWT.MULTI | SWT.BORDER);
+ text.setText("< cursor was there\na\nmulti\nline\ntext\nnow it's here >");
- text.addKeyListener(new KeyListener() {
- @Override
+ text.addKeyListener(new KeyListener() {
+ @Override
public void keyPressed(KeyEvent e) {
- System.out.println("KeyDown " + e);
- }
- @Override
+ System.out.println("KeyDown " + e);
+ }
+ @Override
public void keyReleased(KeyEvent e) {
- System.out.println("KeyUp " + e);
- }
- });
+ System.out.println("KeyUp " + e);
+ }
+ });
- shell.pack();
- shell.open();
+ shell.pack();
+ shell.open();
- /*
- * Simulate the (platform specific) key sequence
- * to move the I-beam to the end of a text control.
- */
- new Thread(){
- @Override
+ /*
+ * Simulate the (platform specific) key sequence
+ * to move the I-beam to the end of a text control.
+ */
+ new Thread(){
+ @Override
public void run(){
- int key = SWT.END;
- String platform = SWT.getPlatform();
- if (platform.equals("cocoa") ) {
- key = SWT.ARROW_DOWN;
- }
- postEvent(SWT.MOD1, SWT.KeyDown);
- postEvent(key, SWT.KeyDown);
- postEvent(key, SWT.KeyUp);
- postEvent(SWT.MOD1, SWT.KeyUp);
- }
- }.start();
+ int key = SWT.END;
+ String platform = SWT.getPlatform();
+ if (platform.equals("cocoa") ) {
+ key = SWT.ARROW_DOWN;
+ }
+ postEvent(SWT.MOD1, SWT.KeyDown);
+ postEvent(key, SWT.KeyDown);
+ postEvent(key, SWT.KeyUp);
+ postEvent(SWT.MOD1, SWT.KeyUp);
+ }
+ }.start();
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch()) {
- display.sleep();
- }
- }
- display.dispose();
- }
+ while (!shell.isDisposed()) {
+ if (!display.readAndDispatch()) {
+ display.sleep();
+ }
+ }
+ display.dispose();
+ }
- public static void postEvent(int keyCode, int type) {
- Event event = new Event();
- event.type = type;
- event.keyCode = keyCode;
- display.post(event);
- }
+ public static void postEvent(int keyCode, int type) {
+ Event event = new Event();
+ event.type = type;
+ event.keyCode = keyCode;
+ display.post(event);
+ }
} \ No newline at end of file
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet333.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet333.java
index 95897df322..40006ba62a 100644
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet333.java
+++ b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet333.java
@@ -104,9 +104,9 @@ public class Snippet333 {
}
protected static void setBackground(Display display, Control control) {
- Random randomGenerator = new Random();
- int nextColor = randomGenerator.nextInt(100) + randomGenerator.nextInt(100);
- control.setBackground(display.getSystemColor(colors[nextColor % colors.length]));
+ Random randomGenerator = new Random();
+ int nextColor = randomGenerator.nextInt(100) + randomGenerator.nextInt(100);
+ control.setBackground(display.getSystemColor(colors[nextColor % colors.length]));
}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet334.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet334.java
index dc23b0dbf9..da1adae455 100644
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet334.java
+++ b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet334.java
@@ -156,7 +156,7 @@ public static void main(String[] arg) {
if (index != -1) index++;
}
e.count = e.count < 0 ? Math.max(e.count, -lineCount) : Math.min(e.count, lineCount);
- index = 0;
+ index = 0;
int lastIndex = 0;
String[] lines = new String[lineCount];
for (int i = 0; i < lines.length; i++) {
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet336.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet336.java
index 5bf180c552..0797b0acaa 100644
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet336.java
+++ b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet336.java
@@ -147,7 +147,7 @@ public static void main(String[] args) {
button.setText(images[i]);
button.addListener(SWT.Selection, listener3);
}
- shell.pack();
+ shell.pack();
shell.open();
while (!shell.isDisposed()) {
if (!display.readAndDispatch()) display.sleep();
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet359.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet359.java
index 32025fdeae..4d80707b19 100644
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet359.java
+++ b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet359.java
@@ -32,9 +32,9 @@ public class Snippet359 {
combo.addKeyListener(new KeyListener() {
@Override
public void keyReleased(KeyEvent e) {
- if (e.keyCode == SWT.CR) {
- combo.add(combo.getText());
- }
+ if (e.keyCode == SWT.CR) {
+ combo.add(combo.getText());
+ }
}
@Override
public void keyPressed(KeyEvent e) {
@@ -42,11 +42,11 @@ public class Snippet359 {
System.out.println("caret location: " + combo.getCaretLocation());
}
});
- shell.pack();
- shell.open ();
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose ();
+ shell.pack();
+ shell.open ();
+ while (!shell.isDisposed()) {
+ if (!display.readAndDispatch ()) display.sleep ();
+ }
+ display.dispose ();
}
}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet363.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet363.java
index ed14dc4436..23431a48cf 100644
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet363.java
+++ b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet363.java
@@ -28,86 +28,86 @@ import org.eclipse.swt.layout.*;
import org.eclipse.swt.widgets.*;
public class Snippet363 {
- static final String errorMessage = "Error: Number expected.";
- static Label icon;
- static Image errorIcon;
- static Text liveLabel;
+ static final String errorMessage = "Error: Number expected.";
+ static Label icon;
+ static Image errorIcon;
+ static Text liveLabel;
public static void main(String [] args) {
- Display display = new Display();
- errorIcon = display.getSystemImage(SWT.ICON_ERROR);
- Shell shell = new Shell(display);
+ Display display = new Display();
+ errorIcon = display.getSystemImage(SWT.ICON_ERROR);
+ Shell shell = new Shell(display);
shell.setText("Snippet 363");
- shell.setLayout(new GridLayout(2, false));
- shell.setText("LiveRegion Test");
+ shell.setLayout(new GridLayout(2, false));
+ shell.setText("LiveRegion Test");
- icon = new Label(shell, SWT.NONE);
- icon.setLayoutData(new GridData(32, 32));
+ icon = new Label(shell, SWT.NONE);
+ icon.setLayoutData(new GridData(32, 32));
- liveLabel = new Text(shell, SWT.READ_ONLY);
- GC gc = new GC(liveLabel);
- Point pt = gc.textExtent(errorMessage);
- GridData data = new GridData(SWT.FILL, SWT.CENTER, true, false);
- data.minimumWidth = (int) (pt.x + gc.getFontMetrics().getAverageCharacterWidth() * 2);
- gc.dispose();
- liveLabel.setLayoutData(data);
- liveLabel.setText("");
- liveLabel.getAccessible().addAccessibleAttributeListener(new AccessibleAttributeAdapter() {
- @Override
+ liveLabel = new Text(shell, SWT.READ_ONLY);
+ GC gc = new GC(liveLabel);
+ Point pt = gc.textExtent(errorMessage);
+ GridData data = new GridData(SWT.FILL, SWT.CENTER, true, false);
+ data.minimumWidth = (int) (pt.x + gc.getFontMetrics().getAverageCharacterWidth() * 2);
+ gc.dispose();
+ liveLabel.setLayoutData(data);
+ liveLabel.setText("");
+ liveLabel.getAccessible().addAccessibleAttributeListener(new AccessibleAttributeAdapter() {
+ @Override
public void getAttributes(AccessibleAttributeEvent e) {
- e.attributes = new String[] {
- "container-live", "polite",
- "live", "polite",
- "container-live-role", "status",
- };
- }
- });
+ e.attributes = new String[] {
+ "container-live", "polite",
+ "live", "polite",
+ "container-live-role", "status",
+ };
+ }
+ });
- final Label textFieldLabel = new Label(shell, SWT.NONE);
- textFieldLabel.setText("Type a number:");
- textFieldLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1));
+ final Label textFieldLabel = new Label(shell, SWT.NONE);
+ textFieldLabel.setText("Type a number:");
+ textFieldLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1));
- final Text textField = new Text(shell, SWT.SINGLE | SWT.BORDER);
- textField.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1));
+ final Text textField = new Text(shell, SWT.SINGLE | SWT.BORDER);
+ textField.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1));
- final Button okButton = new Button(shell, SWT.PUSH);
- okButton.setText("OK");
- okButton.setLayoutData(new GridData(SWT.END, SWT.CENTER, false, false, 2, 1));
- okButton.setEnabled(false);
+ final Button okButton = new Button(shell, SWT.PUSH);
+ okButton.setText("OK");
+ okButton.setLayoutData(new GridData(SWT.END, SWT.CENTER, false, false, 2, 1));
+ okButton.setEnabled(false);
- textField.addModifyListener(e -> {
- boolean isNumber = false;
- String textValue = textField.getText();
- try {
- Integer.parseInt(textValue);
- isNumber = true;
- setMessageText(false, "Thank-you");
- } catch (NumberFormatException ex) {
- if (textValue.isEmpty()) {
- setMessageText(false, "");
- } else {
- setMessageText(true, "Error: Number expected.");
- }
- }
- okButton.setEnabled(isNumber);
+ textField.addModifyListener(e -> {
+ boolean isNumber = false;
+ String textValue = textField.getText();
+ try {
+ Integer.parseInt(textValue);
+ isNumber = true;
+ setMessageText(false, "Thank-you");
+ } catch (NumberFormatException ex) {
+ if (textValue.isEmpty()) {
+ setMessageText(false, "");
+ } else {
+ setMessageText(true, "Error: Number expected.");
+ }
+ }
+ okButton.setEnabled(isNumber);
});
- textField.setFocus();
- shell.pack();
- shell.open();
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch()) display.sleep();
- }
- display.dispose();
+ textField.setFocus();
+ shell.pack();
+ shell.open();
+ while (!shell.isDisposed()) {
+ if (!display.readAndDispatch()) display.sleep();
+ }
+ display.dispose();
}
static void setMessageText(boolean error, String newMessage) {
- String oldMessage = liveLabel.getText();
- icon.setImage(error ? errorIcon : null);
- liveLabel.setText(newMessage);
- liveLabel.getAccessible().sendEvent(ACC.EVENT_ATTRIBUTE_CHANGED, null);
- liveLabel.getAccessible().sendEvent(ACC.EVENT_TEXT_CHANGED, new Object[] {ACC.TEXT_DELETE, 0, oldMessage.length(), oldMessage});
- liveLabel.getAccessible().sendEvent(ACC.EVENT_TEXT_CHANGED, new Object[] {ACC.TEXT_INSERT, 0, newMessage.length(), newMessage});
+ String oldMessage = liveLabel.getText();
+ icon.setImage(error ? errorIcon : null);
+ liveLabel.setText(newMessage);
+ liveLabel.getAccessible().sendEvent(ACC.EVENT_ATTRIBUTE_CHANGED, null);
+ liveLabel.getAccessible().sendEvent(ACC.EVENT_TEXT_CHANGED, new Object[] {ACC.TEXT_DELETE, 0, oldMessage.length(), oldMessage});
+ liveLabel.getAccessible().sendEvent(ACC.EVENT_TEXT_CHANGED, new Object[] {ACC.TEXT_INSERT, 0, newMessage.length(), newMessage});
}
}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet366.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet366.java
index becfd5c631..a4e0934a5d 100644
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet366.java
+++ b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet366.java
@@ -26,8 +26,8 @@ import org.eclipse.swt.widgets.*;
* http://www.eclipse.org/swt/snippets/
*/
public class Snippet366 {
- static Display display;
- static Shell shell;
+ static Display display;
+ static Shell shell;
public static void main (String [] args) {
display = new Display();
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet5.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet5.java
index 7bfa3bd333..675028db06 100644
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet5.java
+++ b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet5.java
@@ -28,36 +28,36 @@ public class Snippet5 {
public static void main (String [] args)
{
- Display display = new Display ();
- Shell shell = new Shell (display);
+ Display display = new Display ();
+ Shell shell = new Shell (display);
shell.setText("Snippet 5");
- shell.setLayout(new FillLayout());
+ shell.setLayout(new FillLayout());
- // this button is always 400 x 400. Scrollbars appear if the window is resized to be
- // too small to show part of the button
- ScrolledComposite c1 = new ScrolledComposite(shell, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
- Button b1 = new Button(c1, SWT.PUSH);
- b1.setText("fixed size button");
- b1.setSize(400, 400);
- c1.setContent(b1);
+ // this button is always 400 x 400. Scrollbars appear if the window is resized to be
+ // too small to show part of the button
+ ScrolledComposite c1 = new ScrolledComposite(shell, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
+ Button b1 = new Button(c1, SWT.PUSH);
+ b1.setText("fixed size button");
+ b1.setSize(400, 400);
+ c1.setContent(b1);
- // this button has a minimum size of 400 x 400. If the window is resized to be big
- // enough to show more than 400 x 400, the button will grow in size. If the window
- // is made too small to show 400 x 400, scrollbars will appear.
- ScrolledComposite c2 = new ScrolledComposite(shell, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
- Button b2 = new Button(c2, SWT.PUSH);
- b2.setText("expanding button");
- c2.setContent(b2);
- c2.setExpandHorizontal(true);
- c2.setExpandVertical(true);
- c2.setMinSize(400, 400);
+ // this button has a minimum size of 400 x 400. If the window is resized to be big
+ // enough to show more than 400 x 400, the button will grow in size. If the window
+ // is made too small to show 400 x 400, scrollbars will appear.
+ ScrolledComposite c2 = new ScrolledComposite(shell, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
+ Button b2 = new Button(c2, SWT.PUSH);
+ b2.setText("expanding button");
+ c2.setContent(b2);
+ c2.setExpandHorizontal(true);
+ c2.setExpandVertical(true);
+ c2.setMinSize(400, 400);
- shell.setSize(600, 300);
- shell.open ();
- while (!shell.isDisposed ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose ();
+ shell.setSize(600, 300);
+ shell.open ();
+ while (!shell.isDisposed ()) {
+ if (!display.readAndDispatch ()) display.sleep ();
+ }
+ display.dispose ();
}
}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet6.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet6.java
index 8bd72bad0a..96e13d8de4 100644
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet6.java
+++ b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet6.java
@@ -28,36 +28,36 @@ import org.eclipse.swt.widgets.*;
public class Snippet6 {
public static void main (String [] args) {
- Display display = new Display ();
- final Shell shell = new Shell (display);
+ Display display = new Display ();
+ final Shell shell = new Shell (display);
shell.setText("Snippet 6");
- shell.setLayout(new GridLayout());
- final Composite c = new Composite(shell, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.numColumns = 3;
- c.setLayout(layout);
- for (int i = 0; i < 10; i++) {
- Button b = new Button(c, SWT.PUSH);
- b.setText("Button "+i);
- }
+ shell.setLayout(new GridLayout());
+ final Composite c = new Composite(shell, SWT.NONE);
+ GridLayout layout = new GridLayout();
+ layout.numColumns = 3;
+ c.setLayout(layout);
+ for (int i = 0; i < 10; i++) {
+ Button b = new Button(c, SWT.PUSH);
+ b.setText("Button "+i);
+ }
- Button b = new Button(shell, SWT.PUSH);
- b.setText("add a new button at row 2 column 1");
- final int[] index = new int[1];
- b.addListener(SWT.Selection, e -> {
- Button s = new Button(c, SWT.PUSH);
- s.setText("Special "+index[0]);
- index[0]++;
- Control[] children = c.getChildren();
- s.moveAbove(children[3]);
- shell.layout(new Control[] {s});
+ Button b = new Button(shell, SWT.PUSH);
+ b.setText("add a new button at row 2 column 1");
+ final int[] index = new int[1];
+ b.addListener(SWT.Selection, e -> {
+ Button s = new Button(c, SWT.PUSH);
+ s.setText("Special "+index[0]);
+ index[0]++;
+ Control[] children = c.getChildren();
+ s.moveAbove(children[3]);
+ shell.layout(new Control[] {s});
});
- shell.open ();
- while (!shell.isDisposed ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose ();
+ shell.open ();
+ while (!shell.isDisposed ()) {
+ if (!display.readAndDispatch ()) display.sleep ();
+ }
+ display.dispose ();
}
}
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet81.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet81.java
index 5286557c8a..8f177d9008 100644
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet81.java
+++ b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet81.java
@@ -76,17 +76,17 @@ private static void printTypeInfo(OleAutomation auto) {
if ( j < data.args.length - 1) argList += ", ";
}
System.out.println(getInvokeKind(data.invokeKind)+" (id = "+data.id+") : "
- +"\n\tSignature : "+getTypeName(data.returnType)+" "+data.name+"("+argList+")"
- +"\n\tDescription : "+data.documentation
- +"\n\tHelp File : "+data.helpFile+"\n");
+ +"\n\tSignature : "+getTypeName(data.returnType)+" "+data.name+"("+argList+")"
+ +"\n\tDescription : "+data.documentation
+ +"\n\tHelp File : "+data.helpFile+"\n");
}
if (typeattr.cVars > 0) System.out.println("\n\nVariables :\n");
for (int i = 0; i < typeattr.cVars; i++) {
OlePropertyDescription data = auto.getPropertyDescription(i);
System.out.println("PROPERTY (id = "+data.id+") :"
- +"\n\tName : "+data.name
- +"\n\tType : "+getTypeName(data.type)+"\n");
+ +"\n\tName : "+data.name
+ +"\n\tType : "+getTypeName(data.type)+"\n");
}
}
}
diff --git a/tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug119157_ShellWithoutFocus.java b/tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug119157_ShellWithoutFocus.java
index b1603cbbca..01428899fe 100644
--- a/tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug119157_ShellWithoutFocus.java
+++ b/tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug119157_ShellWithoutFocus.java
@@ -30,41 +30,41 @@ import org.eclipse.swt.widgets.Text;
public class Bug119157_ShellWithoutFocus {
static Shell dialog = null;
public static void main(String[] args) {
- final Display display = new Display();
- final Shell main = new Shell(display);
- main.setLayout(new FillLayout());
- Button button = new Button(main, SWT.PUSH);
- button.setText("Press me");
- button.addListener(SWT.Selection, new Listener() {
- @Override
+ final Display display = new Display();
+ final Shell main = new Shell(display);
+ main.setLayout(new FillLayout());
+ Button button = new Button(main, SWT.PUSH);
+ button.setText("Press me");
+ button.addListener(SWT.Selection, new Listener() {
+ @Override
public void handleEvent(Event event) {
- if (dialog == null) {
- dialog = new Shell(main);
- dialog.setLayout(new FillLayout());
- Text text = new Text(dialog, SWT.MULTI);
- text.setText("No focus");
- List list = new List(dialog, SWT.MULTI);
- list.add("Multi-select will");
- list.add("not work");
- list.add("the second time.");
- Button button = new Button(dialog, SWT.PUSH);
- button.setText("OK");
- button.addListener(SWT.Selection, new Listener() {
- @Override
+ if (dialog == null) {
+ dialog = new Shell(main);
+ dialog.setLayout(new FillLayout());
+ Text text = new Text(dialog, SWT.MULTI);
+ text.setText("No focus");
+ List list = new List(dialog, SWT.MULTI);
+ list.add("Multi-select will");
+ list.add("not work");
+ list.add("the second time.");
+ Button button = new Button(dialog, SWT.PUSH);
+ button.setText("OK");
+ button.addListener(SWT.Selection, new Listener() {
+ @Override
public void handleEvent(Event event) {
- dialog.setVisible(false);
- }
- });
- dialog.setSize(400, 200);
- }
- dialog.setVisible(true);
- }
- });
- main.setSize(200, 200);
- main.open();
- while (!main.isDisposed()) {
- if (!display.readAndDispatch()) display.sleep();
- }
- display.dispose();
+ dialog.setVisible(false);
+ }
+ });
+ dialog.setSize(400, 200);
+ }
+ dialog.setVisible(true);
+ }
+ });
+ main.setSize(200, 200);
+ main.open();
+ while (!main.isDisposed()) {
+ if (!display.readAndDispatch()) display.sleep();
+ }
+ display.dispose();
}
}
diff --git a/tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug123091_TableEditorRefresh.java b/tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug123091_TableEditorRefresh.java
index 6bb93c36c4..fc6323c3f6 100644
--- a/tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug123091_TableEditorRefresh.java
+++ b/tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug123091_TableEditorRefresh.java
@@ -23,44 +23,44 @@ import org.eclipse.swt.widgets.*;
* Displays a widget.table
*/
public class Bug123091_TableEditorRefresh {
- public static void main(String[] args) {
- new Bug123091_TableEditorRefresh().run();
- }
+ public static void main(String[] args) {
+ new Bug123091_TableEditorRefresh().run();
+ }
- public void run() {
- Display display = new Display();
- Shell shell = new Shell(display);
- shell.setLayout(new FillLayout());
- Table table = new Table(shell, SWT.MULTI | SWT.FULL_SELECTION);
- table.setHeaderVisible(true);
- table.setLinesVisible(true);
- for (int i = 0; i < 6; i++) {
- TableColumn column = new TableColumn(table, SWT.NONE);
- column.setMoveable(true);
- column.setResizable(true);
- column.setWidth(100);
- }
+ public void run() {
+ Display display = new Display();
+ Shell shell = new Shell(display);
+ shell.setLayout(new FillLayout());
+ Table table = new Table(shell, SWT.MULTI | SWT.FULL_SELECTION);
+ table.setHeaderVisible(true);
+ table.setLinesVisible(true);
+ for (int i = 0; i < 6; i++) {
+ TableColumn column = new TableColumn(table, SWT.NONE);
+ column.setMoveable(true);
+ column.setResizable(true);
+ column.setWidth(100);
+ }
- for (int i = 0; i < 10; i++) {
- TableItem item = new TableItem(table, SWT.NONE);
- for (int j = 0; j < 5; j++) {
- item.setText(j, "Row " + i + ", Column " + j);
- }
- ProgressBar pbar = new ProgressBar(table, SWT.SMOOTH|SWT.RESIZE);
- pbar.setMinimum(0);
- pbar.setSelection(60);
- TableEditor editor = new TableEditor(table);
- editor.grabHorizontal = editor.grabVertical = true;
- editor.setEditor(pbar,item,5);
+ for (int i = 0; i < 10; i++) {
+ TableItem item = new TableItem(table, SWT.NONE);
+ for (int j = 0; j < 5; j++) {
+ item.setText(j, "Row " + i + ", Column " + j);
+ }
+ ProgressBar pbar = new ProgressBar(table, SWT.SMOOTH|SWT.RESIZE);
+ pbar.setMinimum(0);
+ pbar.setSelection(60);
+ TableEditor editor = new TableEditor(table);
+ editor.grabHorizontal = editor.grabVertical = true;
+ editor.setEditor(pbar,item,5);
- }
- shell.pack();
- shell.open();
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch()) {
- display.sleep();
- }
- }
- display.dispose();
- }
+ }
+ shell.pack();
+ shell.open();
+ while (!shell.isDisposed()) {
+ if (!display.readAndDispatch()) {
+ display.sleep();
+ }
+ }
+ display.dispose();
+ }
} \ No newline at end of file
diff --git a/tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug138265_SystemMemoryUsage.java b/tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug138265_SystemMemoryUsage.java
index 39532100a5..8d244b5d13 100644
--- a/tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug138265_SystemMemoryUsage.java
+++ b/tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug138265_SystemMemoryUsage.java
@@ -109,7 +109,7 @@ gridData.grabExcessVerticalSpace = true;
gridData.horizontalAlignment = SWT.FILL;
gridData.verticalAlignment = SWT.FILL;
return gridData;
- }
+ }
public static void main(String[] args) {
diff --git a/tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug147320_ShellSetBounds.java b/tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug147320_ShellSetBounds.java
index 9876912ed4..340fbe974e 100644
--- a/tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug147320_ShellSetBounds.java
+++ b/tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug147320_ShellSetBounds.java
@@ -32,12 +32,12 @@ public class Bug147320_ShellSetBounds {
new Rectangle (240, 212, 800, 600)};
static int counter = 0;
public static void main(String[] args) {
- Display display = new Display();
- final Shell shell = new Shell(display, SWT.NONE);
- Button button = new Button(shell, SWT.PUSH);
- button.setBounds(10,10,50,30);
- button.setText("Push");
- button.addListener(SWT.Selection, new Listener() {
+ Display display = new Display();
+ final Shell shell = new Shell(display, SWT.NONE);
+ Button button = new Button(shell, SWT.PUSH);
+ button.setBounds(10,10,50,30);
+ button.setText("Push");
+ button.addListener(SWT.Selection, new Listener() {
@Override
public void handleEvent(Event event) {
Rectangle bounds = DIMENSIONS[counter++];
@@ -46,11 +46,11 @@ public class Bug147320_ShellSetBounds {
shell.setBounds(bounds);
}
});
- shell.setBounds(DIMENSIONS[counter++]);
- shell.open();
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch()) display.sleep();
- }
- display.dispose();
+ shell.setBounds(DIMENSIONS[counter++]);
+ shell.open();
+ while (!shell.isDisposed()) {
+ if (!display.readAndDispatch()) display.sleep();
+ }
+ display.dispose();
}
}
diff --git a/tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug150921_TextCaretPosition.java b/tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug150921_TextCaretPosition.java
index d29085748b..977ed64ffa 100644
--- a/tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug150921_TextCaretPosition.java
+++ b/tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug150921_TextCaretPosition.java
@@ -24,40 +24,40 @@ import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
public class Bug150921_TextCaretPosition {
-
- public static void main(String [] args) {
-
- Display display = new Display();
- Shell shell = new Shell(display);
- shell.setLayout(new GridLayout());
- Text single = new Text(shell, SWT.SINGLE | SWT.BORDER);
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.heightHint = 20;
- gd.widthHint = 300;
- single.setLayoutData(gd);
- single.addModifyListener(new TestListener());
- Text multi = new Text(shell, SWT.MULTI | SWT.BORDER);
- gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.heightHint = 100;
- gd.widthHint = 300;
- multi.setLayoutData(gd);
- multi.addModifyListener(new TestListener());
- shell.open();
- while (!shell.isDisposed ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose ();
- }
-
- private static class TestListener implements ModifyListener {
+
+ public static void main(String [] args) {
+
+ Display display = new Display();
+ Shell shell = new Shell(display);
+ shell.setLayout(new GridLayout());
+ Text single = new Text(shell, SWT.SINGLE | SWT.BORDER);
+ GridData gd = new GridData(GridData.FILL_HORIZONTAL);
+ gd.heightHint = 20;
+ gd.widthHint = 300;
+ single.setLayoutData(gd);
+ single.addModifyListener(new TestListener());
+ Text multi = new Text(shell, SWT.MULTI | SWT.BORDER);
+ gd = new GridData(GridData.FILL_HORIZONTAL);
+ gd.heightHint = 100;
+ gd.widthHint = 300;
+ multi.setLayoutData(gd);
+ multi.addModifyListener(new TestListener());
+ shell.open();
+ while (!shell.isDisposed ()) {
+ if (!display.readAndDispatch ()) display.sleep ();
+ }
+ display.dispose ();
+ }
+
+ private static class TestListener implements ModifyListener {
- @Override
+ @Override
public void modifyText(ModifyEvent e) {
- Text text = (Text) e.widget;
- System.out.println("Text: \"" + text.getText() +"\"");
- System.out.println("Caret Position:" + text.getCaretPosition());
- }
-
- }
+ Text text = (Text) e.widget;
+ System.out.println("Text: \"" + text.getText() +"\"");
+ System.out.println("Caret Position:" + text.getCaretPosition());
+ }
+
+ }
} \ No newline at end of file
diff --git a/tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug152916_ShellSetVisibleBounds.java b/tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug152916_ShellSetVisibleBounds.java
index a653a988cb..f1676b517a 100644
--- a/tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug152916_ShellSetVisibleBounds.java
+++ b/tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug152916_ShellSetVisibleBounds.java
@@ -19,17 +19,17 @@ import org.eclipse.swt.widgets.Shell;
public class Bug152916_ShellSetVisibleBounds {
public static void main(String[] args) {
- Display display = new Display();
-
- Shell shell = new Shell(display);
- shell.open();
- shell.setBounds(200, 200, 200, 200);
- System.out.println("1=" + shell.getBounds());
- shell.setVisible(false);
- System.out.println("2=" + shell.getBounds());
- shell.setVisible(true);
- System.out.println("3=" + shell.getBounds());
-
- display.dispose();
- }
+ Display display = new Display();
+
+ Shell shell = new Shell(display);
+ shell.open();
+ shell.setBounds(200, 200, 200, 200);
+ System.out.println("1=" + shell.getBounds());
+ shell.setVisible(false);
+ System.out.println("2=" + shell.getBounds());
+ shell.setVisible(true);
+ System.out.println("3=" + shell.getBounds());
+
+ display.dispose();
+ }
}
diff --git a/tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug160691_SWTAWTShell.java b/tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug160691_SWTAWTShell.java
index 1dc4223169..d2c53ef4a4 100644
--- a/tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug160691_SWTAWTShell.java
+++ b/tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug160691_SWTAWTShell.java
@@ -31,26 +31,26 @@ import org.eclipse.swt.widgets.Shell;
public class Bug160691_SWTAWTShell {
public static void main(String[] args) {
- java.awt.Frame frame = new java.awt.Frame("AWT Frame");
- java.awt.Button button = new java.awt.Button("AWT Button");
- frame.add(button, java.awt.BorderLayout.NORTH);
- java.awt.Canvas canvas = new java.awt.Canvas();
- frame.add(canvas, java.awt.BorderLayout.CENTER);
+ java.awt.Frame frame = new java.awt.Frame("AWT Frame");
+ java.awt.Button button = new java.awt.Button("AWT Button");
+ frame.add(button, java.awt.BorderLayout.NORTH);
+ java.awt.Canvas canvas = new java.awt.Canvas();
+ frame.add(canvas, java.awt.BorderLayout.CENTER);
- frame.addNotify();
+ frame.addNotify();
- Display display = new Display();
- Shell shell = SWT_AWT.new_Shell(display, canvas);
- shell.setLayout(new FillLayout());
- Button swtButton = new Button(shell, SWT.PUSH);
- swtButton.setText("SWT Button");
+ Display display = new Display();
+ Shell shell = SWT_AWT.new_Shell(display, canvas);
+ shell.setLayout(new FillLayout());
+ Button swtButton = new Button(shell, SWT.PUSH);
+ swtButton.setText("SWT Button");
- frame.setBounds(20, 20, 300, 300);
- shell.layout();
- frame.setVisible(true);
+ frame.setBounds(20, 20, 300, 300);
+ shell.layout();
+ frame.setVisible(true);
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch()) display.sleep();
- }
+ while (!shell.isDisposed()) {
+ if (!display.readAndDispatch()) display.sleep();
+ }
}
}
diff --git a/tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug166720_TableEditorFlicker.java b/tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug166720_TableEditorFlicker.java
index 2b5eb1da57..ed39784b76 100644
--- a/tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug166720_TableEditorFlicker.java
+++ b/tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug166720_TableEditorFlicker.java
@@ -34,35 +34,35 @@ import org.eclipse.swt.widgets.Text;
*/
public class Bug166720_TableEditorFlicker {
public static void main(String[] args) {
- Display display = new Display ();
- Shell shell = new Shell (display);
- shell.setLayout (new GridLayout ());
- Table table = new Table (shell, SWT.BORDER | SWT.MULTI);
- GridData gd = new GridData(GridData.FILL_BOTH);
- gd.heightHint = 200;
- gd.widthHint = 200;
- table.setLayoutData(gd);
+ Display display = new Display ();
+ Shell shell = new Shell (display);
+ shell.setLayout (new GridLayout ());
+ Table table = new Table (shell, SWT.BORDER | SWT.MULTI);
+ GridData gd = new GridData(GridData.FILL_BOTH);
+ gd.heightHint = 200;
+ gd.widthHint = 200;
+ table.setLayoutData(gd);
- TableColumn column = new TableColumn(table, SWT.NONE);
- column.setWidth (100);
- for (int i=0; i<100; i++) {
- new TableItem (table, SWT.NONE);
- }
- TableItem [] items = table.getItems ();
- for (int i=0; i<items.length; i++) {
- TableEditor editor = new TableEditor (table);
- editor = new TableEditor (table);
- Text text = new Text (table, SWT.NONE);
- text.setText("Text" + i);
- editor.grabHorizontal = true;
- editor.setEditor(text, items[i], 0);
- editor = new TableEditor (table);
- }
- shell.pack ();
- shell.open ();
- while (!shell.isDisposed ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose ();
+ TableColumn column = new TableColumn(table, SWT.NONE);
+ column.setWidth (100);
+ for (int i=0; i<100; i++) {
+ new TableItem (table, SWT.NONE);
+ }
+ TableItem [] items = table.getItems ();
+ for (int i=0; i<items.length; i++) {
+ TableEditor editor = new TableEditor (table);
+ editor = new TableEditor (table);
+ Text text = new Text (table, SWT.NONE);
+ text.setText("Text" + i);
+ editor.grabHorizontal = true;
+ editor.setEditor(text, items[i], 0);
+ editor = new TableEditor (table);
+ }
+ shell.pack ();
+ shell.open ();
+ while (!shell.isDisposed ()) {
+ if (!display.readAndDispatch ()) display.sleep ();
+ }
+ display.dispose ();
}
} \ No newline at end of file
diff --git a/tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug185817_MouseListener.java b/tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug185817_MouseListener.java
index 6fbf199c5c..d082bcc924 100644
--- a/tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug185817_MouseListener.java
+++ b/tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug185817_MouseListener.java
@@ -40,31 +40,31 @@ import org.eclipse.swt.widgets.Text;
public class Bug185817_MouseListener {
public static void main(String[] args) {
- Display display = new Display();
- Shell shell = new Shell(display);
- shell.setLayout(new FillLayout());
- final Table table = new Table(shell, SWT.FULL_SELECTION | SWT.HIDE_SELECTION);
- TableColumn column1 = new TableColumn(table, SWT.NONE);
- TableColumn column2 = new TableColumn(table, SWT.NONE);
- for (int i = 0; i < 10; i++) {
- TableItem item = new TableItem(table, SWT.NONE);
- item.setText(new String[] {"item " + i, "edit this value"});
- }
- column1.pack();
- column2.pack();
-
- final TableEditor editor = new TableEditor(table);
- //The editor must have the same size as the cell and must
- //not be any smaller than 50 pixels.
- editor.horizontalAlignment = SWT.LEFT;
- editor.grabHorizontal = true;
- editor.minimumWidth = 50;
- // editing the second column
- final int EDITABLECOLUMN = 1;
-
- table.addMouseListener(new MouseListener() {
-
- @Override
+ Display display = new Display();
+ Shell shell = new Shell(display);
+ shell.setLayout(new FillLayout());
+ final Table table = new Table(shell, SWT.FULL_SELECTION | SWT.HIDE_SELECTION);
+ TableColumn column1 = new TableColumn(table, SWT.NONE);
+ TableColumn column2 = new TableColumn(table, SWT.NONE);
+ for (int i = 0; i < 10; i++) {
+ TableItem item = new TableItem(table, SWT.NONE);
+ item.setText(new String[] {"item " + i, "edit this value"});
+ }
+ column1.pack();
+ column2.pack();
+
+ final TableEditor editor = new TableEditor(table);
+ //The editor must have the same size as the cell and must
+ //not be any smaller than 50 pixels.
+ editor.horizontalAlignment = SWT.LEFT;
+ editor.grabHorizontal = true;
+ editor.minimumWidth = 50;
+ // editing the second column
+ final int EDITABLECOLUMN = 1;
+
+ table.addMouseListener(new MouseListener() {
+
+ @Override
public void mouseDoubleClick(MouseEvent e) {
// // Clean up any previous editor control
// Control oldEditor = editor.getEditor();
@@ -94,59 +94,59 @@ public static void main(String[] args) {
// }
//
// });
- }
+ }
- @Override
+ @Override
public void mouseDown(MouseEvent e) {
- if( e.count == 2 ) {
- System.err.println("STARTING UP THE EDITOR");
- // Clean up any previous editor control
- Control oldEditor = editor.getEditor();
- if (oldEditor != null) oldEditor.dispose();
-
- // Identify the selected row
- TableItem item = table.getItem(new Point(e.x,e.y));
- if (item == null) return;
-
- // The control that will be the editor must be a child of the Table
- Text newEditor = new Text(table, SWT.NONE);
- newEditor.setText(item.getText(EDITABLECOLUMN));
- newEditor.addModifyListener(me -> {
- Text text = (Text)editor.getEditor();
- editor.getItem().setText(EDITABLECOLUMN,text.getText());
+ if( e.count == 2 ) {
+ System.err.println("STARTING UP THE EDITOR");
+ // Clean up any previous editor control
+ Control oldEditor = editor.getEditor();
+ if (oldEditor != null) oldEditor.dispose();
+
+ // Identify the selected row
+ TableItem item = table.getItem(new Point(e.x,e.y));
+ if (item == null) return;
+
+ // The control that will be the editor must be a child of the Table
+ Text newEditor = new Text(table, SWT.NONE);
+ newEditor.setText(item.getText(EDITABLECOLUMN));
+ newEditor.addModifyListener(me -> {
+ Text text = (Text)editor.getEditor();
+ editor.getItem().setText(EDITABLECOLUMN,text.getText());
});
- newEditor.selectAll();
- newEditor.setFocus();
- editor.setEditor(newEditor, item, EDITABLECOLUMN);
- newEditor.addFocusListener(new FocusAdapter() {
+ newEditor.selectAll();
+ newEditor.setFocus();
+ editor.setEditor(newEditor, item, EDITABLECOLUMN);
+ newEditor.addFocusListener(new FocusAdapter() {
- @Override
+ @Override
public void focusLost(FocusEvent e) {
- System.err.println("LOOSING FOCUS");
- Control oldEditor = editor.getEditor();
- if (oldEditor != null) oldEditor.dispose();
- }
+ System.err.println("LOOSING FOCUS");
+ Control oldEditor = editor.getEditor();
+ if (oldEditor != null) oldEditor.dispose();
+ }
- });
- }
- }
+ });
+ }
+ }
- @Override
+ @Override
public void mouseUp(MouseEvent e) {
- // TODO Auto-generated method stub
+ // TODO Auto-generated method stub
- }
+ }
- });
+ });
- shell.setSize(300, 300);
- shell.open();
+ shell.setSize(300, 300);
+ shell.open();
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch())
- display.sleep();
- }
- display.dispose();
+ while (!shell.isDisposed()) {
+ if (!display.readAndDispatch())
+ display.sleep();
+ }
+ display.dispose();
}
} \ No newline at end of file
diff --git a/tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug186268_TableItemSetTextBottom.java b/tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug186268_TableItemSetTextBottom.java
index 8923f29498..2d1be91cfc 100644
--- a/tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug186268_TableItemSetTextBottom.java
+++ b/tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug186268_TableItemSetTextBottom.java
@@ -28,46 +28,46 @@ import org.eclipse.swt.widgets.TableItem;
public class Bug186268_TableItemSetTextBottom {
- static final int COUNT = 1000000;
+ static final int COUNT = 1000000;
- public static void main(String[] args) {
- Display display = new Display ();
- final Shell shell = new Shell (display);
- shell.setLayout (new RowLayout (SWT.VERTICAL));
- final Table table = new Table (shell, SWT.VIRTUAL | SWT.BORDER);
+ public static void main(String[] args) {
+ Display display = new Display ();
+ final Shell shell = new Shell (display);
+ shell.setLayout (new RowLayout (SWT.VERTICAL));
+ final Table table = new Table (shell, SWT.VIRTUAL | SWT.BORDER);
- table.addListener (SWT.SetData, new Listener () {
- @Override
+ table.addListener (SWT.SetData, new Listener () {
+ @Override
public void handleEvent (Event event) {
- TableItem item = (TableItem) event.item;
- int index = table.indexOf (item);
- long startTime = System.currentTimeMillis();
- item.setText ("Item " + index);
- long timeTaken = System.currentTimeMillis() - startTime;
- System.out.println ("row " + index + " took " + timeTaken +
+ TableItem item = (TableItem) event.item;
+ int index = table.indexOf (item);
+ long startTime = System.currentTimeMillis();
+ item.setText ("Item " + index);
+ long timeTaken = System.currentTimeMillis() - startTime;
+ System.out.println ("row " + index + " took " + timeTaken +
"ms");
- }
- });
- table.setLayoutData (new RowData (200, 200));
- Button button = new Button (shell, SWT.PUSH);
- button.setText ("Add Items");
- final Label label = new Label(shell, SWT.NONE);
- button.addListener (SWT.Selection, new Listener () {
- @Override
+ }
+ });
+ table.setLayoutData (new RowData (200, 200));
+ Button button = new Button (shell, SWT.PUSH);
+ button.setText ("Add Items");
+ final Label label = new Label(shell, SWT.NONE);
+ button.addListener (SWT.Selection, new Listener () {
+ @Override
public void handleEvent (Event event) {
- long t1 = System.currentTimeMillis ();
- table.setItemCount (COUNT);
- long t2 = System.currentTimeMillis ();
- label.setText ("Items: " + COUNT + ", Time: " + (t2 - t1) +
+ long t1 = System.currentTimeMillis ();
+ table.setItemCount (COUNT);
+ long t2 = System.currentTimeMillis ();
+ label.setText ("Items: " + COUNT + ", Time: " + (t2 - t1) +
" (ms)");
- shell.layout ();
- }
- });
- shell.pack ();
- shell.open ();
- while (!shell.isDisposed ()) {
- if (!display.readAndDispatch ()) display.sleep ();
- }
- display.dispose ();
- }
+ shell.layout ();
+ }
+ });
+ shell.pack ();
+ shell.open ();
+ while (!shell.isDisposed ()) {
+ if (!display.readAndDispatch ()) display.sleep ();
+ }
+ display.dispose ();
+ }
} \ No newline at end of file
diff --git a/tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug191137_ActiveSelectionLost.java b/tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug191137_ActiveSelectionLost.java
index ca2f148b0a..945842e181 100644
--- a/tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug191137_ActiveSelectionLost.java
+++ b/tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug191137_ActiveSelectionLost.java
@@ -26,10 +26,10 @@ import org.eclipse.swt.widgets.TableItem;
public class Bug191137_ActiveSelectionLost {
public static void main(String[] args) {
- Display display = new Display();
- Shell shell = new Shell(display);
- Table table = new Table(shell, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
-
+ Display display = new Display();
+ Shell shell = new Shell(display);
+ Table table = new Table(shell, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
+
TableItem item1 = new TableItem(table, SWT.NONE);
item1.setText("First select this Item (click me first)");
TableItem item2 = new TableItem(table, SWT.NONE);
@@ -41,25 +41,25 @@ public class Bug191137_ActiveSelectionLost {
dItem.setText("Second select this item (notice first selection is gray)");
Button button = new Button(dTable, SWT.NONE);
button.setText("Third click me to dispose this widget.table.");
- button.setBounds(10,40,350,60);
- button.addMouseListener( new MouseListener(){
+ button.setBounds(10,40,350,60);
+ button.addMouseListener( new MouseListener(){
@Override
public void mouseDoubleClick(MouseEvent arg0) {}
@Override
public void mouseDown(MouseEvent arg0) {
- dTable.dispose();
+ dTable.dispose();
}
@Override
public void mouseUp(MouseEvent arg0) {}
- });
+ });
- table.setBounds(0,0,400,200);
+ table.setBounds(0,0,400,200);
- shell.open();
- while (!shell.isDisposed()) {
- if (!display.readAndDispatch())
- display.sleep();
- }
- display.dispose();
+ shell.open();
+ while (!shell.isDisposed()) {
+ if (!display.readAndDispatch())
+ display.sleep();
+ }
+ display.dispose();
}
}
diff --git a/tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug197690_CVSWizard.java b/tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug197690_CVSWizard.java
index bf106ba246..bd363b0e3a 100644
--- a/tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug197690_CVSWizard.java
+++ b/tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug197690_CVSWizard.java
@@ -24,23 +24,23 @@ import org.eclipse.swt.widgets.Shell;
public class Bug197690_CVSWizard {
public static void main(String[] args) {
- final Display display = new Display();
- final Shell shell1 = new Shell(display);
- shell1.setLayout(new FillLayout());
- shell1.setBounds(10, 10, 300, 300);
- final DateTime dt = new DateTime(shell1, SWT.DATE);
- dt.addSelectionListener(new SelectionAdapter(){
- @Override
+ final Display display = new Display();
+ final Shell shell1 = new Shell(display);
+ shell1.setLayout(new FillLayout());
+ shell1.setBounds(10, 10, 300, 300);
+ final DateTime dt = new DateTime(shell1, SWT.DATE);
+ dt.addSelectionListener(new SelectionAdapter(){
+ @Override
public void widgetSelected(SelectionEven