diff options
author | Leo Ufimtsev | 2015-01-08 16:06:35 +0000 |
---|---|---|
committer | Alexander Kurtakov | 2015-01-09 11:04:24 +0000 |
commit | 674b6a278ef1bc0b2c0ab77c4beeddde4c8e5187 (patch) | |
tree | e9d25ebb9174f52e6d07d6848cb51834fead3456 /bundles/org.eclipse.swt/Eclipse SWT | |
parent | 7f498f5e56b7c0fade96b51d0436413dc870fa9b (diff) | |
download | eclipse.platform.swt-674b6a278ef1bc0b2c0ab77c4beeddde4c8e5187.tar.gz eclipse.platform.swt-674b6a278ef1bc0b2c0ab77c4beeddde4c8e5187.tar.xz eclipse.platform.swt-674b6a278ef1bc0b2c0ab77c4beeddde4c8e5187.zip |
Bug 457041 - [GTK] Trailing whitespace removal for GTK codebase
I traversed SWT's GTK-related code to remove trailing whitespace.
I ran the junit tests (gkt2/gtk3) to ensure everything still works as
before. (that said there are 3 Junit test erros if ran with GTK3, but
that is not related to this whitespace fix).
ControlExample and other common test widgets work as usual.
Change-Id: I49aaeba65ed693c26c580d31014f78ec57068ea8
Signed-off-by: Leo Ufimtsev <lufimtse@redhat.com>
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT')
53 files changed, 2089 insertions, 2089 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Color.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Color.java index b68ed436ab..d7aeab8397 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Color.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Color.java @@ -17,10 +17,10 @@ import org.eclipse.swt.*; /** * Instances of this class manage the operating system resources that * implement SWT's RGB color model. To create a color you can either - * specify the individual color components as integers in the range - * 0 to 255 or provide an instance of an <code>RGB</code>. + * specify the individual color components as integers in the range + * 0 to 255 or provide an instance of an <code>RGB</code>. * <p> - * Application code must explicitly invoke the <code>Color.dispose()</code> + * Application code must explicitly invoke the <code>Color.dispose()</code> * method to release the operating system resources managed by each instance * when those instances are no longer required. * </p> @@ -33,7 +33,7 @@ import org.eclipse.swt.*; */ public final class Color extends Resource { /** - * the handle to the OS color resource + * the handle to the OS color resource * (Warning: This field is platform dependent) * <p> * <b>IMPORTANT:</b> This field is <em>not</em> part of the SWT @@ -41,7 +41,7 @@ public final class Color extends Resource { * within the packages provided by SWT. It is not available on all * platforms and should never be accessed from application code. * </p> - * + * * @noreference This field is not intended to be referenced by clients. */ public GdkColor handle; @@ -50,16 +50,16 @@ Color(Device device) { super(device); } -/** +/** * Constructs a new instance of this class given a device and the * desired red, green and blue values expressed as ints in the range * 0 to 255 (where 0 is black and 255 is full brightness). On limited * color devices, the color instance created by this call may not have * the same RGB values as the ones specified by the arguments. The - * RGB values on the returned instance will be the color values of + * RGB values on the returned instance will be the color values of * the operating system color. * <p> - * You must dispose the color when it is no longer required. + * You must dispose the color when it is no longer required. * </p> * * @param device the device on which to allocate the color @@ -80,7 +80,7 @@ public Color(Device device, int red, int green, int blue) { init(); } -/** +/** * Constructs a new instance of this class given a device and an * <code>RGB</code> describing the desired red, green and blue values. * On limited color devices, the color instance created by this call @@ -88,7 +88,7 @@ public Color(Device device, int red, int green, int blue) { * argument. The RGB values on the returned instance will be the color * values of the operating system color. * <p> - * You must dispose the color when it is no longer required. + * You must dispose the color when it is no longer required. * </p> * * @param device the device on which to allocate the color @@ -189,8 +189,8 @@ public int getRed() { } /** - * Returns an integer hash code for the receiver. Any two - * objects that return <code>true</code> when passed to + * Returns an integer hash code for the receiver. Any two + * objects that return <code>true</code> when passed to * <code>equals</code> must return the same value for this * method. * @@ -218,7 +218,7 @@ public RGB getRGB () { return new RGB(getRed(), getGreen(), getBlue()); } -/** +/** * Invokes platform specific functionality to allocate a new color. * <p> * <b>IMPORTANT:</b> This method is <em>not</em> part of the public @@ -230,7 +230,7 @@ public RGB getRGB () { * * @param device the device on which to allocate the color * @param gdkColor the handle for the color - * + * * @noreference This method is not intended to be referenced by clients. */ public static Color gtk_new(Device device, GdkColor gdkColor) { diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Cursor.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Cursor.java index 373d51bf52..7dec05b741 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Cursor.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Cursor.java @@ -21,7 +21,7 @@ import org.eclipse.swt.internal.gtk.*; * describing one of the standard operating system provided cursors * or the image and mask data for the desired appearance. * <p> - * Application code must explicitly invoke the <code>Cursor.dispose()</code> + * Application code must explicitly invoke the <code>Cursor.dispose()</code> * method to release the operating system resources managed by each instance * when those instances are no longer required. * </p> @@ -51,7 +51,7 @@ public final class Cursor extends Resource { * within the packages provided by SWT. It is not available on all * platforms and should never be accessed from application code. * </p> - * + * * @noreference This field is not intended to be referenced by clients. */ public long /*int*/ handle; @@ -86,20 +86,20 @@ Cursor (Device device) { super(device); } -/** +/** * Constructs a new cursor given a device and a style * constant describing the desired cursor appearance. * <p> - * You must dispose the cursor when it is no longer required. + * You must dispose the cursor when it is no longer required. * </p> * NOTE: * It is recommended to use {@link org.eclipse.swt.widgets.Display#getSystemCursor(int)} - * instead of using this constructor. This way you can avoid the + * instead of using this constructor. This way you can avoid the * overhead of disposing the Cursor resource. * * @param device the device on which to allocate the cursor * @param style the style of cursor to allocate - * + * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if device is null and there is no current device</li> * <li>ERROR_INVALID_ARGUMENT - when an unknown style is specified</li> @@ -173,7 +173,7 @@ public Cursor(Device device, int style) { init(); } -/** +/** * Constructs a new cursor given a device, image and mask * data describing the desired cursor appearance, and the x * and y coordinates of the <em>hotspot</em> (that is, the point @@ -184,7 +184,7 @@ public Cursor(Device device, int style) { * must be an ImageData representing an icon that specifies both * color data and mask data. * <p> - * You must dispose the cursor when it is no longer required. + * You must dispose the cursor when it is no longer required. * </p> * * @param device the device on which to allocate the cursor @@ -197,7 +197,7 @@ public Cursor(Device device, int style) { * <li>ERROR_NULL_ARGUMENT - if device is null and there is no current device</li> * <li>ERROR_NULL_ARGUMENT - if the source is null</li> * <li>ERROR_NULL_ARGUMENT - if the mask is null and the source does not have a mask</li> - * <li>ERROR_INVALID_ARGUMENT - if the source and the mask are not the same + * <li>ERROR_INVALID_ARGUMENT - if the source and the mask are not the same * size, or if the hotspot is outside the bounds of the image</li> * </ul> * @exception SWTError <ul> @@ -260,14 +260,14 @@ public Cursor(Device device, ImageData source, ImageData mask, int hotspotX, int init(); } -/** +/** * Constructs a new cursor given a device, image data describing * the desired cursor appearance, and the x and y coordinates of * the <em>hotspot</em> (that is, the point within the area * covered by the cursor which is considered to be where the * on-screen pointer is "pointing"). * <p> - * You must dispose the cursor when it is no longer required. + * You must dispose the cursor when it is no longer required. * </p> * * @param device the device on which to allocate the cursor @@ -284,7 +284,7 @@ public Cursor(Device device, ImageData source, ImageData mask, int hotspotX, int * @exception SWTError <ul> * <li>ERROR_NO_HANDLES - if a handle could not be obtained for cursor creation</li> * </ul> - * + * * @since 3.0 */ public Cursor(Device device, ImageData source, int hotspotX, int hotspotY) { @@ -298,7 +298,7 @@ public Cursor(Device device, ImageData source, int hotspotX, int hotspotY) { if (OS.gdk_display_supports_cursor_color(display = OS.gdk_display_get_default ())) { int width = source.width; int height = source.height; - PaletteData palette = source.palette; + PaletteData palette = source.palette; long /*int*/ pixbuf = OS.gdk_pixbuf_new(OS.GDK_COLORSPACE_RGB, true, 8, width, height); if (pixbuf == 0) SWT.error(SWT.ERROR_NO_HANDLES); int stride = OS.gdk_pixbuf_get_rowstride(pixbuf); @@ -309,7 +309,7 @@ public Cursor(Device device, ImageData source, int hotspotX, int hotspotY) { if (palette.isDirect) { ImageData.blit(ImageData.BLIT_SRC, source.data, source.depth, source.bytesPerLine, source.getByteOrder(), 0, 0, source.width, source.height, palette.redMask, palette.greenMask, palette.blueMask, - ImageData.ALPHA_OPAQUE, null, 0, 0, 0, + ImageData.ALPHA_OPAQUE, null, 0, 0, 0, buffer, 32, source.width * 4, ImageData.MSB_FIRST, 0, 0, source.width, source.height, 0xFF000000, 0xFF0000, 0xFF00, false, false); } else { @@ -346,7 +346,7 @@ public Cursor(Device device, ImageData source, int hotspotX, int hotspotY) { } else if (source.alpha != -1) { byte alpha = (byte)source.alpha; for (int i=3; i<buffer.length; i+=4) { - buffer[i] = alpha; + buffer[i] = alpha; } } else if (source.alphaData != null) { byte[] alphaData = source.alphaData; @@ -359,18 +359,18 @@ public Cursor(Device device, ImageData source, int hotspotX, int hotspotY) { handle = OS.gdk_cursor_new_from_pixbuf(display, pixbuf, hotspotX, hotspotY); OS.g_object_unref(pixbuf); } else { - + ImageData mask = source.getTransparencyMask(); - + /* Ensure depth is equal to 1 */ if (source.depth > 1) { /* Create a destination image with no data */ ImageData newSource = new ImageData( source.width, source.height, 1, ImageData.bwPalette(), 1, null, 0, null, null, -1, -1, 0, 0, 0, 0, 0); - + byte[] newReds = new byte[]{0, (byte)255}, newGreens = newReds, newBlues = newReds; - + /* Convert the source to a black and white image of depth 1 */ PaletteData palette = source.palette; if (palette.isDirect) { @@ -400,7 +400,7 @@ public Cursor(Device device, ImageData source, int hotspotX, int hotspotY) { } source = newSource; } - + /* Swap the bits in each byte and convert to appropriate scanline pad */ byte[] sourceData = new byte[source.data.length]; byte[] maskData = new byte[mask.data.length]; @@ -504,7 +504,7 @@ long /*int*/ createCursor(byte[] sourceData, byte[] maskData, int width, int hei GdkColor background = new GdkColor(); if (reverse) background.red = background.green = background.blue = (short)0xFFFF; cursor = OS.gdk_cursor_new_from_pixmap (sourcePixmap, maskPixmap, foreground, background, hotspotX, hotspotY); - } + } if (sourcePixmap != 0) OS.g_object_unref (sourcePixmap); if (maskPixmap != 0) OS.g_object_unref (maskPixmap); return cursor; @@ -534,7 +534,7 @@ public boolean equals(Object object) { return device == cursor.device && handle == cursor.handle; } -/** +/** * Invokes platform specific functionality to allocate a new cursor. * <p> * <b>IMPORTANT:</b> This method is <em>not</em> part of the public @@ -546,7 +546,7 @@ public boolean equals(Object object) { * * @param device the device on which to allocate the color * @param handle the handle for the cursor - * + * * @noreference This method is not intended to be referenced by clients. */ public static Cursor gtk_new(Device device, long /*int*/ handle) { @@ -556,8 +556,8 @@ public static Cursor gtk_new(Device device, long /*int*/ handle) { } /** - * Returns an integer hash code for the receiver. Any two - * objects that return <code>true</code> when passed to + * Returns an integer hash code for the receiver. Any two + * objects that return <code>true</code> when passed to * <code>equals</code> must return the same value for this * method. * 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 cd64f84e85..efe22aa13c 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 @@ -34,7 +34,7 @@ public abstract class Device implements Drawable { * within the packages provided by SWT. It is not available on all * platforms and should never be accessed from application code. * </p> - * + * * @noreference This field is not intended to be referenced by clients. */ protected long /*int*/ xDisplay; @@ -47,14 +47,14 @@ public abstract class Device implements Drawable { Error [] errors; Object [] objects; Object trackingLock; - + /* Colormap and reference count */ GdkColor [] gdkColors; int [] colorRefCount; - + /* Disposed flag */ boolean disposed; - + /* Warning and Error Handlers */ long /*int*/ logProc; Callback logCallback; @@ -62,7 +62,7 @@ public abstract class Device implements Drawable { String [] log_domains = {"", "GLib-GObject", "GLib", "GObject", "Pango", "ATK", "GdkPixbuf", "Gdk", "Gtk", "GnomeVFS", "GIO"}; int [] handler_ids = new int [log_domains.length]; int warningLevel; - + /* X Warning and Error Handlers */ static Callback XErrorCallback, XIOErrorCallback; static long /*int*/ XErrorProc, XIOErrorProc, XNullErrorProc, XNullIOErrorProc; @@ -79,10 +79,10 @@ public abstract class Device implements Drawable { /* System Font */ Font systemFont; - + /* Device dpi */ Point dpi; - + long /*int*/ emptyTab; boolean useXRender; @@ -104,7 +104,7 @@ public abstract class Device implements Drawable { try { Class.forName ("org.eclipse.swt.widgets.Display"); } catch (ClassNotFoundException e) {} - } + } /* * TEMPORARY CODE. @@ -119,12 +119,12 @@ static synchronized Device getDevice () { /** * Constructs a new instance of this class. * <p> - * You must dispose the device when it is no longer required. + * You must dispose the device when it is no longer required. * </p> * * @see #create * @see #init - * + * * @since 3.1 */ public Device() { @@ -134,7 +134,7 @@ public Device() { /** * Constructs a new instance of this class. * <p> - * You must dispose the device when it is no longer required. + * You must dispose the device when it is no longer required. * </p> * * @param data the DeviceData which describes the receiver @@ -365,7 +365,7 @@ public DeviceData getDeviceData () { /** * Returns a rectangle which describes the area of the * receiver which is capable of displaying data. - * + * * @return the client area * * @exception SWTException <ul> @@ -382,7 +382,7 @@ public Rectangle getClientArea () { /** * Returns the bit depth of the screen, which is the number of * bits it takes to represent the number of unique colors that - * the screen is currently capable of displaying. This number + * the screen is currently capable of displaying. This number * will typically be one of 1, 8, 15, 16, 24 or 32. * * @return the depth of the screen @@ -574,12 +574,12 @@ public boolean getWarnings () { * If subclasses reimplement this method, they must * call the <code>super</code> implementation. * </p> - * + * * @see #create */ protected void init () { this.dpi = getDPI(); - + if (xDisplay != 0 && !OS.USE_CAIRO) { int[] event_basep = new int[1], error_basep = new int [1]; if (OS.XRenderQueryExtension (xDisplay, event_basep, error_basep)) { @@ -591,7 +591,7 @@ protected void init () { //TODO: Remove; temporary code only boolean fixAIX = OS.IsAIX && OS.PTR_SIZEOF == 8; - + if (debug || fixAIX) { if (xDisplay != 0) { /* Create the warning and error callbacks */ @@ -616,13 +616,13 @@ protected void init () { if (debug) OS.XSynchronize (xDisplay, true); } } - + /* Create GTK warnings and error callbacks */ if (xDisplay != 0) { logCallback = new Callback (this, "logProc", 4); logProc = logCallback.getAddress (); if (logProc == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS); - + /* Set GTK warning and error handlers */ if (debug) { int flags = OS.G_LOG_LEVEL_MASK | OS.G_LOG_FLAG_FATAL | OS.G_LOG_FLAG_RECURSION; @@ -632,7 +632,7 @@ protected void init () { } } } - + /* Create the standard colors */ COLOR_BLACK = new Color (this, 0,0,0); COLOR_DARK_RED = new Color (this, 0x80,0,0); @@ -662,12 +662,12 @@ protected void init () { /* Initialize the system font slot */ long /*int*/ defaultFont; if (OS.GTK3) { - long /*int*/ context = OS.gtk_widget_get_style_context (shellHandle); + long /*int*/ context = OS.gtk_widget_get_style_context (shellHandle); defaultFont = OS.gtk_style_context_get_font (context, OS.GTK_STATE_FLAG_NORMAL); } else { - long /*int*/ style = OS.gtk_widget_get_style (shellHandle); + long /*int*/ style = OS.gtk_widget_get_style (shellHandle); defaultFont = OS.gtk_style_get_font_desc (style); - } + } defaultFont = OS.pango_font_description_copy (defaultFont); Point dpi = getDPI(), screenDPI = getScreenDPI(); if (dpi.y != screenDPI.y) { @@ -677,7 +677,7 @@ protected void init () { systemFont = Font.gtk_new (this, defaultFont); } -/** +/** * Invokes platform specific functionality to allocate a new GC handle. * <p> * <b>IMPORTANT:</b> This method is <em>not</em> part of the public @@ -687,14 +687,14 @@ protected void init () { * application code. * </p> * - * @param data the platform specific GC data + * @param data the platform specific GC data * @return the platform specific GC handle - * + * * @noreference This method is not intended to be referenced by clients. */ public abstract long /*int*/ internal_new_GC (GCData data); -/** +/** * Invokes platform specific functionality to dispose a GC handle. * <p> * <b>IMPORTANT:</b> This method is <em>not</em> part of the public @@ -705,8 +705,8 @@ public abstract long /*int*/ internal_new_GC (GCData data); * </p> * * @param hDC the platform specific GC handle - * @param data the platform specific GC data - * + * @param data the platform specific GC data + * * @noreference This method is not intended to be referenced by clients. */ public abstract void internal_dispose_GC (long /*int*/ hDC, GCData data); @@ -740,7 +740,7 @@ public boolean isDisposed () { * </ul> * * @see Font - * + * * @since 3.3 */ public boolean loadFont (String path) { @@ -822,7 +822,7 @@ static synchronized void register (Device device) { protected void release () { if (shellHandle != 0) OS.gtk_widget_destroy(shellHandle); shellHandle = 0; - + /* Dispose the default font */ if (systemFont != null) systemFont.dispose (); systemFont = null; @@ -863,7 +863,7 @@ protected void release () { COLOR_BLACK = COLOR_DARK_RED = COLOR_DARK_GREEN = COLOR_DARK_YELLOW = COLOR_DARK_BLUE = COLOR_DARK_MAGENTA = COLOR_DARK_CYAN = COLOR_GRAY = COLOR_DARK_GRAY = COLOR_RED = COLOR_GREEN = COLOR_YELLOW = COLOR_BLUE = COLOR_MAGENTA = COLOR_CYAN = COLOR_WHITE = null; - + if (emptyTab != 0) OS.pango_tab_array_free(emptyTab); emptyTab = 0; diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/DeviceData.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/DeviceData.java index f212af02bb..f61fdbe08e 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/DeviceData.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/DeviceData.java @@ -20,7 +20,7 @@ public class DeviceData { * within the packages provided by SWT. It is not available on all * platforms and should never be accessed from application code. * </p> - * + * * @noreference This field is not intended to be referenced by clients. */ public String display_name; @@ -33,7 +33,7 @@ public class DeviceData { * within the packages provided by SWT. It is not available on all * platforms and should never be accessed from application code. * </p> - * + * * @noreference This field is not intended to be referenced by clients. */ public String application_name; @@ -46,7 +46,7 @@ public class DeviceData { * within the packages provided by SWT. It is not available on all * platforms and should never be accessed from application code. * </p> - * + * * @noreference This field is not intended to be referenced by clients. */ public String application_class; diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Font.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Font.java index ee266c6205..001fcd8c55 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Font.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Font.java @@ -21,7 +21,7 @@ import org.eclipse.swt.internal.gtk.*; * by providing a device and either name, size and style information * or a <code>FontData</code> object which encapsulates this data. * <p> - * Application code must explicitly invoke the <code>Font.dispose()</code> + * Application code must explicitly invoke the <code>Font.dispose()</code> * method to release the operating system resources managed by each instance * when those instances are no longer required. * </p> @@ -41,25 +41,25 @@ public final class Font extends Resource { * within the packages provided by SWT. It is not available on all * platforms and should never be accessed from application code. * </p> - * + * * @noreference This field is not intended to be referenced by clients. */ public long /*int*/ handle; - + Font(Device device) { super(device); } -/** +/** * Constructs a new font given a device and font data * which describes the desired font's appearance. * <p> - * You must dispose the font when it is no longer required. + * You must dispose the font when it is no longer required. * </p> * * @param device the device to create the font on * @param fd the FontData that describes the desired font (must not be null) - * + * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if device is null and there is no current device</li> * <li>ERROR_NULL_ARGUMENT - if the fd argument is null</li> @@ -75,17 +75,17 @@ public Font(Device device, FontData fd) { init(); } -/** +/** * Constructs a new font given a device and an array * of font data which describes the desired font's * appearance. * <p> - * You must dispose the font when it is no longer required. + * You must dispose the font when it is no longer required. * </p> * * @param device the device to create the font on * @param fds the array of FontData that describes the desired font (must not be null) - * + * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if device is null and there is no current device</li> * <li>ERROR_NULL_ARGUMENT - if the fds argument is null</li> @@ -95,7 +95,7 @@ public Font(Device device, FontData fd) { * @exception SWTError <ul> * <li>ERROR_NO_HANDLES - if a font could not be created from the given font data</li> * </ul> - * + * * @since 2.1 */ public Font(Device device, FontData[] fds) { @@ -110,19 +110,19 @@ public Font(Device device, FontData[] fds) { init(); } -/** +/** * Constructs a new font given a device, a font name, * the height of the desired font in points, and a font * style. * <p> - * You must dispose the font when it is no longer required. + * You must dispose the font when it is no longer required. * </p> * * @param device the device to create the font on * @param name the name of the font (must not be null) * @param height the font height in points * @param style a bit or combination of NORMAL, BOLD, ITALIC - * + * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if device is null and there is no current device</li> * <li>ERROR_NULL_ARGUMENT - if the name argument is null</li> @@ -169,8 +169,8 @@ public boolean equals(Object object) { /** * Returns an array of <code>FontData</code>s representing the receiver. - * On Windows, only one FontData will be returned per font. On X however, - * a <code>Font</code> object <em>may</em> be composed of multiple X + * On Windows, only one FontData will be returned per font. On X however, + * a <code>Font</code> object <em>may</em> be composed of multiple X * fonts. To support this case, we return an array of font data objects. * * @return an array of font data objects describing the receiver @@ -199,14 +199,14 @@ public FontData[] getFontData() { long /*int*/ fontString = OS.pango_font_description_to_string (handle); length = OS.strlen (fontString); buffer = new byte [length + 1]; - OS.memmove (buffer, fontString, length); + OS.memmove (buffer, fontString, length); OS.g_free (fontString); FontData data = new FontData(name, size, style); data.string = buffer; return new FontData[]{data}; } -/** +/** * Invokes platform specific functionality to allocate a new font. * <p> * <b>IMPORTANT:</b> This method is <em>not</em> part of the public @@ -218,7 +218,7 @@ public FontData[] getFontData() { * * @param device the device on which to allocate the color * @param handle the handle for the font - * + * * @noreference This method is not intended to be referenced by clients. */ public static Font gtk_new(Device device, long /*int*/ handle) { @@ -228,8 +228,8 @@ public static Font gtk_new(Device device, long /*int*/ handle) { } /** - * Returns an integer hash code for the receiver. Any two - * objects that return <code>true</code> when passed to + * Returns an integer hash code for the receiver. Any two + * objects that return <code>true</code> when passed to * <code>equals</code> must return the same value for this * method. * diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/FontData.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/FontData.java index 6e1c1c0a47..49cf817605 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/FontData.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/FontData.java @@ -48,7 +48,7 @@ public final class FontData { * within the packages provided by SWT. It is not available on all * platforms and should never be accessed from application code. * </p> - * + * * @noreference This field is not intended to be referenced by clients. */ public String name; @@ -62,7 +62,7 @@ public final class FontData { * within the packages provided by SWT. It is not available on all * platforms and should never be accessed from application code. * </p> - * + * * @noreference This field is not intended to be referenced by clients. */ public float height; @@ -76,13 +76,13 @@ public final class FontData { * within the packages provided by SWT. It is not available on all * platforms and should never be accessed from application code. * </p> - * + * * @noreference This field is not intended to be referenced by clients. */ public int style; - + /** - * the Pango string + * the Pango string * (Warning: This field is platform dependent) * <p> * <b>IMPORTANT:</b> This field is <em>not</em> part of the SWT @@ -90,7 +90,7 @@ public final class FontData { * within the packages provided by SWT. It is not available on all * platforms and should never be accessed from application code. * </p> - * + * * @noreference This field is not intended to be referenced by clients. */ public byte[] string; @@ -99,8 +99,8 @@ public final class FontData { * The locales of the font */ String lang, country, variant; - -/** + +/** * Constructs a new uninitialized font data. */ public FontData () { @@ -113,7 +113,7 @@ public FontData () { * method. * <p> * Note that the representation varies between platforms, - * and a FontData can only be created from a string that was + * and a FontData can only be created from a string that was * generated on the same platform. * </p> * @@ -137,12 +137,12 @@ public FontData(String string) { } catch (NumberFormatException e) { SWT.error(SWT.ERROR_INVALID_ARGUMENT); } - + start = end + 1; end = string.indexOf('|', start); if (end == -1) SWT.error(SWT.ERROR_INVALID_ARGUMENT); String name = string.substring(start, end); - + start = end + 1; end = string.indexOf('|', start); if (end == -1) SWT.error(SWT.ERROR_INVALID_ARGUMENT); @@ -152,7 +152,7 @@ public FontData(String string) { } catch (NumberFormatException e) { SWT.error(SWT.ERROR_INVALID_ARGUMENT); } - + start = end + 1; end = string.indexOf('|', start); if (end == -1) SWT.error(SWT.ERROR_INVALID_ARGUMENT); @@ -181,9 +181,9 @@ public FontData(String string) { } } -/** +/** * Constructs a new font data given a font name, - * the height of the desired font in points, + * the height of the desired font in points, * and a font style. * * @param name the name of the font (must not be null) @@ -253,7 +253,7 @@ public int getHeight() { * given language/country locale, the variant portion of the * locale will determine the character set. * </p> - * + * * @return the <code>String</code> representing a Locale object * @since 3.0 */ @@ -271,14 +271,14 @@ public String getLocale () { if (variant != null) { buffer.append (variant); } - + String result = buffer.toString (); int length = result.length (); if (length > 0) { if (result.charAt (length - 1) == sep) { result = result.substring (0, length - 1); } - } + } return result; } @@ -296,12 +296,12 @@ public String getName() { } /** - * Returns the style of the receiver which is a bitwise OR of + * Returns the style of the receiver which is a bitwise OR of * one or more of the <code>SWT</code> constants NORMAL, BOLD * and ITALIC. * * @return the style of this <code>FontData</code> - * + * * @see #setStyle */ public int getStyle() { @@ -309,8 +309,8 @@ public int getStyle() { } /** - * Returns an integer hash code for the receiver. Any two - * objects that return <code>true</code> when passed to + * Returns an integer hash code for the receiver. Any two + * objects that return <code>true</code> when passed to * <code>equals</code> must return the same value for this * method. * @@ -333,7 +333,7 @@ public int hashCode () { * @exception IllegalArgumentException <ul> * <li>ERROR_INVALID_ARGUMENT - if the height is negative</li> * </ul> - * + * * @see #getHeight */ public void setHeight(int height) { @@ -361,7 +361,7 @@ public void setHeight(int height) { * given language/country locale, the variant portion of the * locale will determine the character set. * </p> - * + * * @param locale the <code>String</code> representing a Locale object * @see java.util.Locale#toString */ @@ -371,7 +371,7 @@ public void setLocale(String locale) { char sep = '_'; int length = locale.length(); int firstSep, secondSep; - + firstSep = locale.indexOf(sep); if (firstSep == -1) { firstSep = secondSep = length; @@ -382,7 +382,7 @@ public void setLocale(String locale) { if (firstSep > 0) lang = locale.substring(0, firstSep); if (secondSep > firstSep + 1) country = locale.substring(firstSep + 1, secondSep); if (length > secondSep + 1) variant = locale.substring(secondSep + 1); - } + } } /** @@ -399,7 +399,7 @@ public void setLocale(String locale) { * </p> * <p> * On platforms that do not support font foundries, only the face name - * (for example, "courier") is used in <code>setName()</code> and + * (for example, "courier") is used in <code>setName()</code> and * <code>getName()</code>. * </p> * @@ -418,7 +418,7 @@ public void setName(String name) { /** * Sets the style of the receiver to the argument which must - * be a bitwise OR of one or more of the <code>SWT</code> + * be a bitwise OR of one or more of the <code>SWT</code> * constants NORMAL, BOLD and ITALIC. All other style bits are * ignored. * @@ -433,7 +433,7 @@ public void setStyle(int style) { /** * Returns a string representation of the receiver which is suitable - * for constructing an equivalent instance using the + * for constructing an equivalent instance using the * <code>FontData(String)</code> constructor. * * @return a string representation of the FontData @@ -450,7 +450,7 @@ public String toString() { buffer.append("|"); buffer.append(getStyle()); buffer.append("|"); - buffer.append("GTK|1|"); + buffer.append("GTK|1|"); return buffer.toString(); } diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/FontMetrics.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/FontMetrics.java index 002597678d..555eebc983 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/FontMetrics.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/FontMetrics.java @@ -49,7 +49,7 @@ public boolean equals (Object object) { /** * Returns the ascent of the font described by the receiver. A - * font's <em>ascent</em> is the distance from the baseline to the + * font's <em>ascent</em> is the distance from the baseline to the * top of actual characters, not including any of the leading area, * measured in pixels. * @@ -82,7 +82,7 @@ public int getDescent() { } /** - * Returns the height of the font described by the receiver, + * Returns the height of the font described by the receiver, * measured in pixels. A font's <em>height</em> is the sum of * its ascent, descent and leading area. * @@ -118,8 +118,8 @@ public static FontMetrics gtk_new(int ascent, int descent, int averageCharWidth, } /** - * Returns an integer hash code for the receiver. Any two - * objects that return <code>true</code> when passed to + * Returns an integer hash code for the receiver. Any two + * objects that return <code>true</code> when passed to * <code>equals</code> must return the same value for this * method. * 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 3a58669054..277cfeb237 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 @@ -17,20 +17,20 @@ import org.eclipse.swt.internal.*; import org.eclipse.swt.*; /** - * Class <code>GC</code> is where all of the drawing capabilities that are - * supported by SWT are located. Instances are used to draw on either an + * Class <code>GC</code> is where all of the drawing capabilities that are + * supported by SWT are located. Instances are used to draw on either an * <code>Image</code>, a <code>Control</code>, or directly on a <code>Display</code>. * <dl> * <dt><b>Styles:</b></dt> * <dd>LEFT_TO_RIGHT, RIGHT_TO_LEFT</dd> * </dl> - * + * * <p> * The SWT drawing coordinate system is the two-dimensional space with the origin * (0,0) at the top left corner of the drawing area and with (x,y) values increasing * to the right and downward respectively. * </p> - * + * * <p> * The result of drawing on an image that was created with an indexed * palette using a color that is not in the palette is platform specific. @@ -38,15 +38,15 @@ import org.eclipse.swt.*; * the color itself. This happens because the allocated image might use * a direct palette on platforms that do not support indexed palette. * </p> - * + * * <p> - * Application code must explicitly invoke the <code>GC.dispose()</code> + * Application code must explicitly invoke the <code>GC.dispose()</code> * method to release the operating system resources managed by each instance * when those instances are no longer required. This is <em>particularly</em> * important on Windows95 and Windows98 where the operating system has a limited * number of device contexts available. * </p> - * + * * <p> * Note: Only one of LEFT_TO_RIGHT and RIGHT_TO_LEFT may be specified. * </p> @@ -66,11 +66,11 @@ public final class GC extends Resource { * within the packages provided by SWT. It is not available on all * platforms and should never be accessed from application code. * </p> - * + * * @noreference This field is not intended to be referenced by clients. */ public long /*int*/ handle; - + Drawable drawable; GCData data; @@ -83,7 +83,7 @@ public final class GC extends Resource { final static int LINE_WIDTH = 1 << 6; final static int LINE_MITERLIMIT = 1 << 7; final static int BACKGROUND_BG = 1 << 8; - final static int DRAW_OFFSET = 1 << 9; + final static int DRAW_OFFSET = 1 << 9; final static int DRAW = FOREGROUND | LINE_WIDTH | LINE_STYLE | LINE_CAP | LINE_JOIN | LINE_MITERLIMIT | DRAW_OFFSET; final static int FILL = BACKGROUND; @@ -99,13 +99,13 @@ public final class GC extends Resource { GC() { } -/** +/** * Constructs a new instance of this class which has been * configured to draw on the specified drawable. Sets the * foreground color, background color and font in the GC * to match those in the drawable. * <p> - * You must dispose the graphics context when it is no longer required. + * You must dispose the graphics context when it is no longer required. * </p> * @param drawable the drawable to draw on * @exception IllegalArgumentException <ul> @@ -125,18 +125,18 @@ public GC(Drawable drawable) { this(drawable, 0); } -/** +/** * Constructs a new instance of this class which has been * configured to draw on the specified drawable. Sets the * foreground color, background color and font in the GC * to match those in the drawable. * <p> - * You must dispose the graphics context when it is no longer required. + * You must dispose the graphics context when it is no longer required. * </p> - * + * * @param drawable the drawable to draw on * @param style the style of GC to construct - * + * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the drawable is null</li> * <li>ERROR_NULL_ARGUMENT - if there is no current device</li> @@ -149,7 +149,7 @@ public GC(Drawable drawable) { * <li>ERROR_NO_HANDLES if a handle could not be obtained for GC creation</li> * <li>ERROR_THREAD_INVALID_ACCESS if not called from the thread that created the drawable</li> * </ul> - * + * * @since 2.1.2 */ public GC(Drawable drawable, int style) { @@ -185,7 +185,7 @@ static int checkStyle (int style) { return style & (SWT.LEFT_TO_RIGHT | SWT.RIGHT_TO_LEFT); } -/** +/** * Invokes platform specific functionality to wrap a graphics context. * <p> * <b>IMPORTANT:</b> This method is <em>not</em> part of the public @@ -199,7 +199,7 @@ static int checkStyle (int style) { * @param data the data for the receiver. * * @return a new <code>GC</code> - * + * * @noreference This method is not intended to be referenced by clients. */ public static GC gtk_new(long /*int*/ handle, GCData data) { @@ -209,7 +209,7 @@ public static GC gtk_new(long /*int*/ handle, GCData data) { return gc; } -/** +/** * Invokes platform specific functionality to allocate a new graphics context. * <p> * <b>IMPORTANT:</b> This method is <em>not</em> part of the public @@ -223,7 +223,7 @@ public static GC gtk_new(long /*int*/ handle, GCData data) { * @param data the data for the receiver. * * @return a new <code>GC</code> - * + * * @noreference This method is not intended to be referenced by clients. */ public static GC gtk_new(Drawable drawable, GCData data) { @@ -237,7 +237,7 @@ public static GC gtk_new(Drawable drawable, GCData data) { void checkGC (int mask) { int state = data.state; if ((state & mask) == mask) return; - state = (state ^ mask) & mask; + state = (state ^ mask) & mask; data.state |= mask; long /*int*/ cairo = data.cairo; if (cairo != 0) { @@ -464,7 +464,7 @@ long /*int*/ convertRgn(long /*int*/ rgn, double[] matrix) { * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the image is null</li> - * <li>ERROR_INVALID_ARGUMENT - if the image is not a bitmap or has been disposed</li> + * <li>ERROR_INVALID_ARGUMENT - if the image is not a bitmap or has been disposed</li> * </ul> * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> @@ -546,8 +546,8 @@ public void copyArea(int srcX, int srcY, int width, int height, int destX, int d * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> - * - * @since 3.1 + * + * @since 3.1 */ public void copyArea(int srcX, int srcY, int width, int height, int destX, int destY, boolean paint) { if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); @@ -589,7 +589,7 @@ public void copyArea(int srcX, int srcY, int width, int height, int destX, int d srcRect.height = height; long /*int*/ copyRegion = OS.gdk_region_rectangle (srcRect); OS.gdk_region_intersect(copyRegion, visibleRegion); - long /*int*/ invalidateRegion = OS.gdk_region_rectangle (srcRect); + long /*int*/ invalidateRegion = OS.gdk_region_rectangle (srcRect); OS.gdk_region_subtract (invalidateRegion, visibleRegion); OS.gdk_region_offset (invalidateRegion, deltaX, deltaY); OS.gdk_window_invalidate_region(drawable, invalidateRegion, false); @@ -673,7 +673,7 @@ void destroy() { image.memGC = null; if (image.transparentPixel != -1) image.createMask(); } - + disposeLayout(); /* Dispose the GC */ @@ -689,18 +689,18 @@ void destroy() { } /** - * Draws the outline of a circular or elliptical arc + * Draws the outline of a circular or elliptical arc * within the specified rectangular area. * <p> - * The resulting arc begins at <code>startAngle</code> and extends + * The resulting arc begins at <code>startAngle</code> and extends * for <code>arcAngle</code> degrees, using the current color. * Angles are interpreted such that 0 degrees is at the 3 o'clock * position. A positive value indicates a counter-clockwise rotation * while a negative value indicates a clockwise rotation. * </p><p> - * The center of the arc is the center of the rectangle whose origin - * is (<code>x</code>, <code>y</code>) and whose size is specified by the - * <code>width</code> and <code>height</code> arguments. + * The center of the arc is the center of the rectangle whose origin + * is (<code>x</code>, <code>y</code>) and whose size is specified by the + * <code>width</code> and <code>height</code> arguments. * </p><p> * The resulting arc covers an area <code>width + 1</code> pixels wide * by <code>height + 1</code> pixels tall. @@ -735,7 +735,7 @@ public void drawArc(int x, int y, int width, int height, int startAngle, int arc if (width == height) { if (arcAngle >= 0) { Cairo.cairo_arc_negative(cairo, x + xOffset + width / 2f, y + yOffset + height / 2f, width / 2f, -startAngle * (float)Compatibility.PI / 180, -(startAngle + arcAngle) * (float)Compatibility.PI / 180); - } else { + } else { Cairo.cairo_arc(cairo, x + xOffset + width / 2f, y + yOffset + height / 2f, width / 2f, -startAngle * (float)Compatibility.PI / 180, -(startAngle + arcAngle) * (float)Compatibility.PI / 180); } } else { @@ -755,7 +755,7 @@ public void drawArc(int x, int y, int width, int height, int startAngle, int arc OS.gdk_draw_arc(data.drawable, handle, 0, x, y, width, height, startAngle * 64, arcAngle * 64); } -/** +/** * Draws a rectangle, based on the specified arguments, which has * the appearance of the platform's <em>focus rectangle</em> if the * platform supports such a notion, and otherwise draws a simple @@ -783,7 +783,7 @@ public void drawFocus(int x, int y, int width, int height) { } else { int[] lineWidth = new int[1]; OS.gtk_widget_style_get(data.device.shellHandle, OS.focus_line_width, lineWidth, 0); - Cairo.cairo_save(cairo); + Cairo.cairo_save(cairo); Cairo.cairo_set_line_width(cairo, lineWidth[0]); double[] dashes = new double[]{1, 1}; double dash_offset = -lineWidth[0] / 2f; @@ -796,7 +796,7 @@ public void drawFocus(int x, int y, int width, int height) { return; } /* - * Feature in GTK. The function gtk_widget_get_default_style() + * Feature in GTK. The function gtk_widget_get_default_style() * can't be used here because gtk_paint_focus() uses GCs, which * are not valid in the default style. The fix is to use a style * from a widget. @@ -941,10 +941,10 @@ void drawImage(Image srcImage, int srcX, int srcY, int srcWidth, int srcHeight, * by creating an image that is 3 times bigger than the original, drawing * the original image in every quadrant (with an appropriate transform) and * use this image as the pattern. - * + * * NOTE: For some reason, it is necessary to use CAIRO_EXTEND_PAD with * the image that was created or the edges are still faded. - * + * * NOTE: Cairo.CAIRO_EXTEND_PAD works on Cairo 1.8.x and greater. */ int version = Cairo.cairo_version (); @@ -979,7 +979,7 @@ void drawImage(Image srcImage, int srcX, int srcY, int srcWidth, int srcHeight, Cairo.cairo_pattern_destroy(pattern); pattern = newPattern; Cairo.cairo_pattern_set_extend(pattern, Cairo.CAIRO_EXTEND_PAD); - double[] matrix = new double[6]; + double[] matrix = new double[6]; Cairo.cairo_matrix_init_translate(matrix, imgWidth, imgHeight); Cairo.cairo_pattern_set_matrix(pattern, matrix); } else if (version >= Cairo.CAIRO_VERSION_ENCODE(1, 8, 0)) { @@ -1111,7 +1111,7 @@ void drawImageMask(Image srcImage, int srcX, int srcY, int srcWidth, int srcHeig srcWidth = destWidth; srcHeight = destHeight; } - + /* Merge clipping with mask if necessary */ if (data.clipRgn != 0) { int newWidth = srcX + srcWidth; @@ -1135,7 +1135,7 @@ void drawImageMask(Image srcImage, int srcX, int srcY, int srcWidth, int srcHeig maskPixmap = mask; } } - + /* Blit cliping the mask */ GdkGCValues values = new GdkGCValues(); OS.gdk_gc_get_values(handle, values); @@ -1232,8 +1232,8 @@ long /*int*/ scale(long /*int*/ src, int srcX, int srcY, int srcWidth, int srcHe return scaledPixbuf; } -/** - * Draws a line, using the foreground color, between the points +/** + * Draws a line, using the foreground color, between the points * (<code>x1</code>, <code>y1</code>) and (<code>x2</code>, <code>y2</code>). * * @param x1 the first point's x coordinate @@ -1259,15 +1259,15 @@ public void drawLine(int x1, int y1, int x2, int y2) { OS.gdk_draw_line (data.drawable, handle, x1, y1, x2, y2); } -/** +/** * Draws the outline of an oval, using the foreground color, * within the specified rectangular area. * <p> - * The result is a circle or ellipse that fits within the - * rectangle specified by the <code>x</code>, <code>y</code>, - * <code>width</code>, and <code>height</code> arguments. - * </p><p> - * The oval covers an area that is <code>width + 1</code> + * The result is a circle or ellipse that fits within the + * rectangle specified by the <code>x</code>, <code>y</code>, + * <code>width</code>, and <code>height</code> arguments. + * </p><p> + * The oval covers an area that is <code>width + 1</code> * pixels wide and <code>height + 1</code> pixels tall. * </p> * @@ -1309,14 +1309,14 @@ public void drawOval(int x, int y, int width, int height) { OS.gdk_draw_arc(data.drawable, handle, 0, x, y, width, height, 0, 23040); } -/** +/** * Draws the path described by the parameter. * <p> * This operation requires the operating system's advanced * graphics subsystem which may not be available on some * platforms. * </p> - * + * * @param path the path to draw * * @exception IllegalArgumentException <ul> @@ -1327,9 +1327,9 @@ public void drawOval(int x, int y, int width, int height) { * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li> * </ul> - * + * * @see Path - * + * * @since 3.1 */ public void drawPath(Path path) { @@ -1350,7 +1350,7 @@ public void drawPath(Path path) { Cairo.cairo_restore(cairo); } -/** +/** * Draws a pixel, using the foreground color, at the specified * point (<code>x</code>, <code>y</code>). * <p> @@ -1364,7 +1364,7 @@ public void drawPath(Path path) { * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> - * + * * @since 3.0 */ public void drawPoint (int x, int y) { @@ -1379,9 +1379,9 @@ public void drawPoint (int x, int y) { OS.gdk_draw_point(data.drawable, handle, x, y); } -/** +/** * Draws the closed polygon which is defined by the specified array - * of integer coordinates, using the receiver's foreground color. The array + * of integer coordinates, using the receiver's foreground color. The array * contains alternating x and y values which are considered to represent * points which are the vertices of the polygon. Lines are drawn between * each consecutive pair, and between the first pair and last pair in the @@ -1391,7 +1391,7 @@ public void drawPoint (int x, int y) { * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT if pointArray is null</li> - * </ul> + * </ul> * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> @@ -1409,9 +1409,9 @@ public void drawPolygon(int[] pointArray) { OS.gdk_draw_polygon(data.drawable, handle, 0, pointArray, pointArray.length / 2); } -/** +/** * Draws the polyline which is defined by the specified array - * of integer coordinates, using the receiver's foreground color. The array + * of integer coordinates, using the receiver's foreground color. The array * contains alternating x and y values which are considered to represent * points which are the corners of the polyline. Lines are drawn between * each consecutive pair, but not between the first pair and last pair in @@ -1421,7 +1421,7 @@ public void drawPolygon(int[] pointArray) { * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the point array is null</li> - * </ul> + * </ul> * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> @@ -1450,11 +1450,11 @@ void drawPolyline(long /*int*/ cairo, int[] pointArray, boolean close) { if (close) Cairo.cairo_close_path(cairo); } -/** +/** * Draws the outline of the rectangle specified by the arguments, * using the receiver's foreground color. The left and right edges - * of the rectangle are at <code>x</code> and <code>x + width</code>. - * The top and bottom edges are at <code>y</code> and <code>y + height</code>. + * of the rectangle are at <code>x</code> and <code>x + width</code>. + * The top and bottom edges are at <code>y</code> and <code>y + height</code>. * * @param x the x coordinate of the rectangle to be drawn * @param y the y coordinate of the rectangle to be drawn @@ -1486,18 +1486,18 @@ public void drawRectangle(int x, int y, int width, int height) { OS.gdk_draw_rectangle(data.drawable, handle, 0, x, y, width, height); } -/** +/** * Draws the outline of the specified rectangle, using the receiver's * foreground color. The left and right edges of the rectangle are at - * <code>rect.x</code> and <code>rect.x + rect.width</code>. The top - * and bottom edges are at <code>rect.y</code> and - * <code>rect.y + rect.height</code>. + * <code>rect.x</code> and <code>rect.x + rect.width</code>. The top + * and bottom edges are at <code>rect.y</code> and + * <code>rect.y + rect.height</code>. * * @param rect the rectangle to draw * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the rectangle is null</li> - * </ul> + * </ul> * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> @@ -1506,12 +1506,12 @@ public void drawRectangle(Rectangle rect) { if (rect == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); drawRectangle (rect.x, rect.y, rect.width, rect.height); } -/** - * Draws the outline of the round-cornered rectangle specified by +/** + * Draws the outline of the round-cornered rectangle specified by * the arguments, using the receiver's foreground color. The left and - * right edges of the rectangle are at <code>x</code> and <code>x + width</code>. + * right edges of the rectangle are at <code>x</code> and <code>x + width</code>. * The top and bottom edges are at <code>y</code> and <code>y + height</code>. - * The <em>roundness</em> of the corners is specified by the + * The <em>roundness</em> of the corners is specified by the * <code>arcWidth</code> and <code>arcHeight</code> arguments, which * are respectively the width and height of the ellipse used to draw * the corners. @@ -1601,7 +1601,7 @@ public void drawRoundRectangle(int x, int y, int width, int height, int arcWidth } } -/** +/** * Draws the given string, using the receiver's current font and * foreground color. No tab expansion or carriage return processing * will be performed. The background of the rectangular area where @@ -1614,7 +1614,7 @@ public void drawRoundRectangle(int x, int y, int width, int height, int arcWidth * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the string is null</li> - * </ul> + * </ul> * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> @@ -1622,7 +1622,7 @@ public void drawRoundRectangle(int x, int y, int width, int height, int arcWidth public void drawString (String string, int x, int y) { drawString(string, x, y, false); } -/** +/** * Draws the given string, using the receiver's current font and * foreground color. No tab expansion or carriage return processing * will be performed. If <code>isTransparent</code> is <code>true</code>, @@ -1637,7 +1637,7 @@ public void drawString (String string, int x, int y) { * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the string is null</li> - * </ul> + * </ul> * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> @@ -1646,7 +1646,7 @@ public void drawString(String string, int x, int y, boolean isTransparent) { drawText(string, x, y, isTransparent ? SWT.DRAW_TRANSPARENT : 0); } -/** +/** * Draws the given string, using the receiver's current font and * foreground color. Tab expansion and carriage return processing * are performed. The background of the rectangular area where @@ -1659,7 +1659,7 @@ public void drawString(String string, int x, int y, boolean isTransparent) { * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the string is null</li> - * </ul> + * </ul> * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> @@ -1668,7 +1668,7 @@ public void drawText(String string, int x, int y) { drawText(string, x, y, SWT.DRAW_DELIMITER | SWT.DRAW_TAB); } -/** +/** * Draws the given string, using the receiver's current font and * foreground color. Tab expansion and carriage return processing * are performed. If <code>isTransparent</code> is <code>true</code>, @@ -1683,7 +1683,7 @@ public void drawText(String string, int x, int y) { * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the string is null</li> - * </ul> + * </ul> * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> @@ -1694,7 +1694,7 @@ public void drawText(String string, int x, int y, boolean isTransparent) { drawText(string, x, y, flags); } -/** +/** * Draws the given string, using the receiver's current font and * foreground color. Tab expansion, line delimiter and mnemonic * processing are performed according to the specified flags. If @@ -1723,7 +1723,7 @@ public void drawText(String string, int x, int y, boolean isTransparent) { * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the string is null</li> - * </ul> + * </ul> * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> @@ -1808,15 +1808,15 @@ public boolean equals(Object object) { * the specified rectangular area, with the receiver's background * color. * <p> - * The resulting arc begins at <code>startAngle</code> and extends + * The resulting arc begins at <code>startAngle</code> and extends * for <code>arcAngle</code> degrees, using the current color. * Angles are interpreted such that 0 degrees is at the 3 o'clock * position. A positive value indicates a counter-clockwise rotation * while a negative value indicates a clockwise rotation. * </p><p> - * The center of the arc is the center of the rectangle whose origin - * is (<code>x</code>, <code>y</code>) and whose size is specified by the - * <code>width</code> and <code>height</code> arguments. + * The center of the arc is the center of the rectangle whose origin + * is (<code>x</code>, <code>y</code>) and whose size is specified by the + * <code>width</code> and <code>height</code> arguments. * </p><p> * The resulting arc covers an area <code>width + 1</code> pixels wide * by <code>height + 1</code> pixels tall. @@ -1885,7 +1885,7 @@ public void fillArc(int x, int y, int width, int height, int startAngle, int arc * (inverts direction of gradient if horizontal) * @param height the height of the rectangle to be filled, may be negative * (inverts direction of gradient if vertical) - * @param vertical if true sweeps from top to bottom, else + * @param vertical if true sweeps from top to bottom, else * sweeps from left to right * * @exception SWTException <ul> @@ -1897,9 +1897,9 @@ public void fillArc(int x, int y, int width, int height, int startAngle, int arc public void fillGradientRectangle(int x, int y, int width, int height, boolean vertical) { if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); if ((width == 0) || (height == 0)) return; - + /* Rewrite this to use GdkPixbuf */ - + RGB backgroundRGB, foregroundRGB; backgroundRGB = getBackground().getRGB(); foregroundRGB = getForeground().getRGB(); @@ -1949,7 +1949,7 @@ public void fillGradientRectangle(int x, int y, int width, int height, boolean v 8, 8, 8); } -/** +/** * Fills the interior of an oval, within the specified * rectangular area, with the receiver's background * color. @@ -1993,7 +1993,7 @@ public void fillOval(int x, int y, int width, int height) { OS.gdk_draw_arc(data.drawable, handle, 1, x, y, width, height, 0, 23040); } -/** +/** * Fills the path described by the parameter. * <p> * This operation requires the operating system's advanced @@ -2011,9 +2011,9 @@ public void fillOval(int x, int y, int width, int height) { * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li> * </ul> - * + * * @see Path - * + * * @since 3.1 */ public void fillPath (Path path) { @@ -2030,7 +2030,7 @@ public void fillPath (Path path) { Cairo.cairo_fill(cairo); } -/** +/** * Fills the interior of the closed polygon which is defined by the * specified array of integer coordinates, using the receiver's * background color. The array contains alternating x and y values @@ -2047,7 +2047,7 @@ public void fillPath (Path path) { * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> * - * @see #drawPolygon + * @see #drawPolygon */ public void fillPolygon(int[] pointArray) { if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); @@ -2062,9 +2062,9 @@ public void fillPolygon(int[] pointArray) { OS.gdk_draw_polygon(data.drawable, handle, 1, pointArray, pointArray.length / 2); } -/** +/** * Fills the interior of the rectangle specified by the arguments, - * using the receiver's background color. + * using the receiver's background color. * * @param x the x coordinate of the rectangle to be filled * @param y the y coordinate of the rectangle to be filled @@ -2088,7 +2088,7 @@ public void fillRectangle(int x, int y, int width, int height) { y = y + height; height = -height; } - long /*int*/ cairo = data.cairo; + long /*int*/ cairo = data.cairo; if (cairo != 0) { Cairo.cairo_rectangle(cairo, x, y, width, height); Cairo.cairo_fill(cairo); @@ -2097,9 +2097,9 @@ public void fillRectangle(int x, int y, int width, int height) { OS.gdk_draw_rectangle(data.drawable, handle, 1, x, y, width, height); } -/** +/** * Fills the interior of the specified rectangle, using the receiver's - * background color. + * background color. * * @param rect the rectangle to be filled * @@ -2118,9 +2118,9 @@ public void fillRectangle(Rectangle rect) { fillRectangle(rect.x, rect.y, rect.width, rect.height); } -/** - * Fills the interior of the round-cornered rectangle specified by - * the arguments, using the receiver's background color. +/** + * Fills the interior of the round-cornered rectangle specified by + * the arguments, using the receiver's background color. * * @param x the x coordinate of the rectangle to be filled * @param y the y coordinate of the rectangle to be filled @@ -2170,7 +2170,7 @@ public void fillRoundRectangle(int x, int y, int width, int height, int arcWidth Cairo.cairo_arc(cairo, fw - 1, 1, 1, Compatibility.PI + Compatibility.PI/2.0, Compatibility.PI*2.0); Cairo.cairo_arc(cairo, fw - 1, fh - 1, 1, 0, Compatibility.PI/2.0); Cairo.cairo_arc(cairo, 1, fh - 1, 1, Compatibility.PI/2, Compatibility.PI); - Cairo.cairo_arc(cairo, 1, 1, 1, Compatibility.PI, 270.0*Compatibility.PI/180.0); + Cairo.cairo_arc(cairo, 1, 1, 1, Compatibility.PI, 270.0*Compatibility.PI/180.0); Cairo.cairo_close_path(cairo); Cairo.cairo_restore(cairo); } @@ -2235,7 +2235,7 @@ int fixMnemonic (char [] buffer) { * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> */ -public int getAdvanceWidth(char ch) { +public int getAdvanceWidth(char ch) { if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); //BOGUS return stringExtent(new String(new char[]{ch})).x; @@ -2261,9 +2261,9 @@ public int getAdvanceWidth(char ch) { * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> - * + * * @see #setAdvanced - * + * * @since 3.1 */ public boolean getAdvanced() { @@ -2280,7 +2280,7 @@ public boolean getAdvanced() { * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> - * + * * @since 3.1 */ public int getAlpha() { @@ -2299,9 +2299,9 @@ public int getAlpha() { * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> - * + * * @see #getTextAntialias - * + * * @since 3.1 */ public int getAntialias() { @@ -2317,7 +2317,7 @@ public int getAntialias() { return SWT.DEFAULT; } -/** +/** * Returns the background color. * * @return the receiver's background color @@ -2331,7 +2331,7 @@ public Color getBackground() { return Color.gtk_new(data.device, data.background); } -/** +/** * Returns the background pattern. The default value is * <code>null</code>. * @@ -2340,9 +2340,9 @@ public Color getBackground() { * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> - * + * * @see Pattern - * + * * @since 3.1 */ public Pattern getBackgroundPattern() { @@ -2352,7 +2352,7 @@ public Pattern getBackgroundPattern() { /** * Returns the width of the specified character in the font - * selected into the receiver. + * selected into the receiver. * <p> * The width is defined as the space taken up by the actual * character, not including the leading and tailing whitespace @@ -2372,7 +2372,7 @@ public int getCharWidth(char ch) { return stringExtent(new String(new char[]{ch})).x; } -/** +/** * Returns the bounding rectangle of the receiver's clipping * region. If no clipping region is set, the return value * will be a rectangle which covers the entire bounds of the @@ -2435,7 +2435,7 @@ public Rectangle getClipping() { return new Rectangle(x, y, width, height); } -/** +/** * Sets the region managed by the argument to the current * clipping region of the receiver. * @@ -2444,12 +2444,12 @@ public Rectangle getClipping() { * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the region is null</li> * <li>ERROR_INVALID_ARGUMENT - if the region is disposed</li> - * </ul> + * </ul> * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> */ -public void getClipping(Region region) { +public void getClipping(Region region) { if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); if (region == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); if (region.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT); @@ -2489,7 +2489,7 @@ public void getClipping(Region region) { } } -/** +/** * Returns the receiver's fill rule, which will be one of * <code>SWT.FILL_EVEN_ODD</code> or <code>SWT.FILL_WINDING</code>. * @@ -2498,7 +2498,7 @@ public void getClipping(Region region) { * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> - * + * * @since 3.1 */ public int getFillRule() { @@ -2508,7 +2508,7 @@ public int getFillRule() { return Cairo.cairo_get_fill_rule(cairo) == Cairo.CAIRO_FILL_RULE_WINDING ? SWT.FILL_WINDING : SWT.FILL_EVEN_ODD; } -/** +/** * Returns the font currently being used by the receiver * to draw and measure text. * @@ -2551,7 +2551,7 @@ public FontMetrics getFontMetrics() { return fm; } -/** +/** * Returns the receiver's foreground color. * * @return the color used for drawing foreground things @@ -2560,12 +2560,12 @@ public FontMetrics getFontMetrics() { * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> */ -public Color getForeground() { +public Color getForeground() { if (handle == 0) SWT.error(SWT.ERROR_WIDGET_DISPOSED); return Color.gtk_new(data.device, data.foreground); } -/** +/** * Returns the foreground pattern. The default value is * <code>null</code>. * @@ -2574,9 +2574,9 @@ public Color getForeground() { * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> - * + * * @see Pattern - * + * * @since 3.1 */ public Pattern getForegroundPattern() { @@ -2584,7 +2584,7 @@ public Pattern getForegroundPattern() { return data.foregroundPattern; } -/** +/** * Returns the GCData. * <p> * <b>IMPORTANT:</b> This method is <em>not</em> part of the public @@ -2599,11 +2599,11 @@ public Pattern getForegroundPattern() { * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> - * + * * @see GCData - * + * * @noreference This method is not intended to be referenced by clients. - * + * * @since 3.2 */ public GCData getGCData() { @@ -2611,9 +2611,9 @@ public GCData getGCData() { return data; } -/** +/** * Returns the receiver's interpolation setting, which will be one of - * <code>SWT.DEFAULT</code>, <code>SWT.NONE</code>, + * <code>SWT.DEFAULT</code>, <code>SWT.NONE</code>, * <code>SWT.LOW</code> or <code>SWT.HIGH</code>. * * @return the receiver's interpolation setting @@ -2621,7 +2621,7 @@ public GCData getGCData() { * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> - * + * * @since 3.1 */ public int getInterpolation() { @@ -2629,7 +2629,7 @@ public int getInterpolation() { return data.interpolation; } -/** +/** * Returns the receiver's line attributes. * * @return the line attributes used for drawing lines @@ -2637,8 +2637,8 @@ public int getInterpolation() { * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> - * - * @since 3.3 + * + * @since 3.3 */ public LineAttributes getLineAttributes() { if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); @@ -2650,7 +2650,7 @@ public LineAttributes getLineAttributes() { return new LineAttributes(data.lineWidth, data.lineCap, data.lineJoin, data.lineStyle, dashes, data.lineDashesOffset, data.lineMiterLimit); } -/** +/** * Returns the receiver's line cap style, which will be one * of the constants <code>SWT.CAP_FLAT</code>, <code>SWT.CAP_ROUND</code>, * or <code>SWT.CAP_SQUARE</code>. @@ -2660,15 +2660,15 @@ public LineAttributes getLineAttributes() { * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> - * - * @since 3.1 + * + * @since 3.1 */ public int getLineCap() { if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); return data.lineCap; } -/** +/** * Returns the receiver's line dash style. The default value is * <code>null</code>. * @@ -2677,8 +2677,8 @@ public int getLineCap() { * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> - * - * @since 3.1 + * + * @since 3.1 */ public int[] getLineDash() { if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); @@ -2690,7 +2690,7 @@ public int[] getLineDash() { return lineDashes; } -/** +/** * Returns the receiver's line join style, which will be one * of the constants <code>SWT.JOIN_MITER</code>, <code>SWT.JOIN_ROUND</code>, * or <code>SWT.JOIN_BEVEL</code>. @@ -2700,15 +2700,15 @@ public int[] getLineDash() { * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> - * - * @since 3.1 + * + * @since 3.1 */ public int getLineJoin() { if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); return data.lineJoin; } -/** +/** * Returns the receiver's line style, which will be one * of the constants <code>SWT.LINE_SOLID</code>, <code>SWT.LINE_DASH</code>, * <code>SWT.LINE_DOT</code>, <code>SWT.LINE_DASHDOT</code> or @@ -2725,13 +2725,13 @@ public int getLineStyle() { return data.lineStyle; } -/** +/** * Returns the width that will be used when drawing lines * for all of the figure drawing operations (that is, - * <code>drawLine</code>, <code>drawRectangle</code>, + * <code>drawLine</code>, <code>drawRectangle</code>, * <code>drawPolyline</code>, and so forth. * - * @return the receiver's line width + * @return the receiver's line width * * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> @@ -2749,15 +2749,15 @@ public int getLineWidth() { * not match</em> the value which was provided to the constructor * when the receiver was created. This can occur when the underlying * operating system does not support a particular combination of - * requested styles. + * requested styles. * </p> * * @return the style bits - * + * * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> - * + * * @since 2.1.2 */ public int getStyle () { @@ -2787,7 +2787,7 @@ void getSize(int[] width, int[] height) { width[0] = Cairo.cairo_image_surface_get_width(surface); height[0] = Cairo.cairo_image_surface_get_height(surface); break; - case Cairo.CAIRO_SURFACE_TYPE_XLIB: + case Cairo.CAIRO_SURFACE_TYPE_XLIB: width[0] = Cairo.cairo_xlib_surface_get_width(surface); height[0] = Cairo.cairo_xlib_surface_get_height(surface); break; @@ -2806,9 +2806,9 @@ void getSize(int[] width, int[] height) { * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> - * + * * @see #getAntialias - * + * * @since 3.1 */ public int getTextAntialias() { @@ -2828,12 +2828,12 @@ public int getTextAntialias() { return SWT.DEFAULT; } -/** +/** * Sets the parameter to the transform that is currently being * used by the receiver. * * @param transform the destination to copy the transform into - * + * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the parameter is null</li> * <li>ERROR_INVALID_ARGUMENT - if the parameter has been disposed</li> @@ -2841,9 +2841,9 @@ public int getTextAntialias() { * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> - * + * * @see Transform - * + * * @since 3.1 */ public void getTransform(Transform transform) { @@ -2861,7 +2861,7 @@ public void getTransform(Transform transform) { } } -/** +/** * Returns <code>true</code> if this GC is drawing in the mode * where the resulting color in the destination is the * <em>exclusive or</em> of the color values in the source @@ -2881,8 +2881,8 @@ public boolean getXORMode() { } /** - * Returns an integer hash code for the receiver. Any two - * objects that return <code>true</code> when passed to + * Returns an integer hash code for the receiver. Any two + * objects that return <code>true</code> when passed to * <code>equals</code> must return the same value for this * method. * @@ -3006,7 +3006,7 @@ void computeStringSize() { * Returns <code>true</code> if the receiver has a clipping * region set into it, and <code>false</code> otherwise. * If this method returns false, the receiver will draw on all - * available space in the destination. If it returns true, + * available space in the destination. If it returns true, * it will draw only in the area that is covered by the region * that can be accessed with <code>getClipping(region)</code>. * @@ -3044,7 +3044,7 @@ boolean isIdentity(double[] matrix) { /** * Sets the receiver to always use the operating system's advanced graphics * subsystem for all graphics operations if the argument is <code>true</code>. - * If the argument is <code>false</code>, the advanced graphics subsystem is + * If the argument is <code>false</code>, the advanced graphics subsystem is * no longer used, advanced graphics state is cleared and the normal graphics * subsystem is used from now on. * <p> @@ -3069,7 +3069,7 @@ boolean isIdentity(double[] matrix) { * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> - * + * * @see #setAlpha * @see #setAntialias * @see #setBackgroundPattern @@ -3080,7 +3080,7 @@ boolean isIdentity(double[] matrix) { * @see #setTextAntialias * @see #setTransform * @see #getAdvanced - * + * * @since 3.1 */ public void setAdvanced(boolean advanced) { @@ -3130,10 +3130,10 @@ public void setAdvanced(boolean advanced) { * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li> * </ul> - * + * * @see #getAdvanced * @see #setAdvanced - * + * * @since 3.1 */ public void setAlpha(int alpha) { @@ -3145,7 +3145,7 @@ public void setAlpha(int alpha) { } /** - * Sets the receiver's anti-aliasing value to the parameter, + * Sets the receiver's anti-aliasing value to the parameter, * which must be one of <code>SWT.DEFAULT</code>, <code>SWT.OFF</code> * or <code>SWT.ON</code>. Note that this controls anti-aliasing for all * <em>non-text drawing</em> operations. @@ -3165,11 +3165,11 @@ public void setAlpha(int alpha) { * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li> * </ul> - * + * * @see #getAdvanced * @see #setAdvanced * @see #setTextAntialias - * + * * @since 3.1 */ public void setAntialias(int antialias) { @@ -3213,14 +3213,14 @@ public void setBackground(Color color) { data.state &= ~(BACKGROUND | BACKGROUND_BG); } -/** +/** * Sets the background pattern. The default value is <code>null</code>. * <p> * This operation requires the operating system's advanced * graphics subsystem which may not be available on some * platforms. * </p> - * + * * @param pattern the new background pattern * * @exception IllegalArgumentException <ul> @@ -3230,11 +3230,11 @@ public void setBackground(Color color) { * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li> * </ul> - * + * * @see Pattern * @see #getAdvanced * @see #setAdvanced - * + * * @since 3.1 */ public void setBackgroundPattern(Pattern pattern) { @@ -3379,27 +3379,27 @@ public void setClipping(int x, int y, int width, int height) { /** * Sets the area of the receiver which can be changed * by drawing operations to the path specified - * by the argument. + * by the argument. * <p> * This operation requires the operating system's advanced * graphics subsystem which may not be available on some * platforms. * </p> - * + * * @param path the clipping path. - * + * * @exception IllegalArgumentException <ul> * <li>ERROR_INVALID_ARGUMENT - if the path has been disposed</li> - * </ul> + * </ul> * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li> * </ul> - * + * * @see Path * @see #getAdvanced * @see #setAdvanced - * + * * @since 3.1 */ public void setClipping(Path path) { @@ -3446,10 +3446,10 @@ public void setClipping(Rectangle rect) { * original value. * * @param region the clipping region or <code>null</code> - * + * * @exception IllegalArgumentException <ul> * <li>ERROR_INVALID_ARGUMENT - if the region has been disposed</li> - * </ul> + * </ul> * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> @@ -3460,7 +3460,7 @@ public void setClipping(Region region) { setClipping(region != null ? region.handle : 0); } -/** +/** * Sets the font which will be used by the receiver * to draw and measure text to the argument. If the * argument is null, then a default font appropriate @@ -3483,7 +3483,7 @@ public void setFont(Font font) { data.stringWidth = data.stringHeight = -1; } -/** +/** * Sets the receiver's fill rule to the parameter, which must be one of * <code>SWT.FILL_EVEN_ODD</code> or <code>SWT.FILL_WINDING</code>. * @@ -3492,11 +3492,11 @@ public void setFont(Font font) { * @exception IllegalArgumentException <ul> * <li>ERROR_INVALID_ARGUMENT - if the rule is not one of <code>SWT.FILL_EVEN_ODD</code> * or <code>SWT.FILL_WINDING</code></li> - * </ul> + * </ul> * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> - * + * * @since 3.1 */ public void setFillRule(int rule) { @@ -3532,7 +3532,7 @@ public void setFillRule(int rule) { * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> */ -public void setForeground(Color color) { +public void setForeground(Color color) { if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); if (color == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); if (color.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT); @@ -3541,7 +3541,7 @@ public void setForeground(Color color) { data.state &= ~FOREGROUND; } -/** +/** * Sets the foreground pattern. The default value is <code>null</code>. * <p> * This operation requires the operating system's advanced @@ -3557,11 +3557,11 @@ public void setForeground(Color color) { * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li> * </ul> - * + * * @see Pattern * @see #getAdvanced * @see #setAdvanced - * + * * @since 3.1 */ public void setForegroundPattern(Pattern pattern) { @@ -3574,30 +3574,30 @@ public void setForegroundPattern(Pattern pattern) { data.state &= ~FOREGROUND; } -/** +/** * Sets the receiver's interpolation setting to the parameter, which - * must be one of <code>SWT.DEFAULT</code>, <code>SWT.NONE</code>, + * must be one of <code>SWT.DEFAULT</code>, <code>SWT.NONE</code>, * <code>SWT.LOW</code> or <code>SWT.HIGH</code>. * <p> * This operation requires the operating system's advanced * graphics subsystem which may not be available on some * platforms. * </p> - * + * * @param interpolation the new interpolation setting * * @exception IllegalArgumentException <ul> - * <li>ERROR_INVALID_ARGUMENT - if the rule is not one of <code>SWT.DEFAULT</code>, + * <li>ERROR_INVALID_ARGUMENT - if the rule is not one of <code>SWT.DEFAULT</code>, * <code>SWT.NONE</code>, <code>SWT.LOW</code> or <code>SWT.HIGH</code> - * </ul> + * </ul> * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li> * </ul> - * + * * @see #getAdvanced * @see #setAdvanced - * + * * @since 3.1 */ public void setInterpolation(int interpolation) { @@ -3633,11 +3633,11 @@ public void setInterpolation(int interpolation) { * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li> * </ul> - * + * * @see LineAttributes * @see #getAdvanced * @see #setAdvanced - * + * * @since 3.3 */ public void setLineAttributes(LineAttributes attributes) { @@ -3715,11 +3715,11 @@ public void setLineAttributes(LineAttributes attributes) { } float dashOffset = attributes.dashOffset; if (dashOffset != data.lineDashesOffset) { - mask |= LINE_STYLE; + mask |= LINE_STYLE; } float miterLimit = attributes.miterLimit; if (miterLimit != data.lineMiterLimit) { - mask |= LINE_MITERLIMIT; + mask |= LINE_MITERLIMIT; } initCairo(); if (mask == 0) return; @@ -3733,21 +3733,21 @@ public void setLineAttributes(LineAttributes attributes) { data.state &= ~mask; } -/** +/** * Sets the receiver's line cap style to the argument, which must be one * of the constants <code>SWT.CAP_FLAT</code>, <code>SWT.CAP_ROUND</code>, * or <code>SWT.CAP_SQUARE</code>. * * @param cap the cap style to be used for drawing lines - * + * * @exception IllegalArgumentException <ul> * <li>ERROR_INVALID_ARGUMENT - if the style is not valid</li> - * </ul> + * </ul> * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> - * - * @since 3.1 + * + * @since 3.1 */ public void setLineCap(int cap) { if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); @@ -3764,22 +3764,22 @@ public void setLineCap(int cap) { data.state &= ~LINE_CAP; } -/** +/** * Sets the receiver's line dash style to the argument. The default * value is <code>null</code>. If the argument is not <code>null</code>, * the receiver's line style is set to <code>SWT.LINE_CUSTOM</code>, otherwise * it is set to <code>SWT.LINE_SOLID</code>. * * @param dashes the dash style to be used for drawing lines - * + * * @exception IllegalArgumentException <ul> * <li>ERROR_INVALID_ARGUMENT - if any of the values in the array is less than or equal 0</li> - * </ul> + * </ul> * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> - * - * @since 3.1 + * + * @since 3.1 */ public void setLineDash(int[] dashes) { if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); @@ -3805,7 +3805,7 @@ public void setLineDash(int[] dashes) { data.state &= ~LINE_STYLE; } -/** +/** * Sets the receiver's line join style to the argument, which must be one * of the constants <code>SWT.JOIN_MITER</code>, <code>SWT.JOIN_ROUND</code>, * or <code>SWT.JOIN_BEVEL</code>. @@ -3818,8 +3818,8 @@ public void setLineDash(int[] dashes) { * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> - * - * @since 3.1 + * + * @since 3.1 */ public void setLineJoin(int join) { if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); @@ -3836,7 +3836,7 @@ public void setLineJoin(int join) { data.state &= ~LINE_JOIN; } -/** +/** * Sets the receiver's line style to the argument, which must be one * of the constants <code>SWT.LINE_SOLID</code>, <code>SWT.LINE_DASH</code>, * <code>SWT.LINE_DOT</code>, <code>SWT.LINE_DASHDOT</code> or @@ -3871,10 +3871,10 @@ public void setLineStyle(int lineStyle) { data.state &= ~LINE_STYLE; } -/** +/** * Sets the width that will be used when drawing lines * for all of the figure drawing operations (that is, - * <code>drawLine</code>, <code>drawRectangle</code>, + * <code>drawLine</code>, <code>drawRectangle</code>, * <code>drawPolyline</code>, and so forth. * <p> * Note that line width of zero is used as a hint to @@ -3905,7 +3905,7 @@ void setString(String string, int flags) { int mnemonic, length = string.length (); long /*int*/ layout = data.layout; char[] text = new char[length]; - string.getChars(0, length, text, 0); + string.getChars(0, length, text, 0); if ((flags & SWT.DRAW_MNEMONIC) != 0 && (mnemonic = fixMnemonic(text)) != -1) { char[] text1 = new char[mnemonic - 1]; System.arraycopy(text, 0, text1, 0, text1.length); @@ -3939,7 +3939,7 @@ void setString(String string, int flags) { } /** - * Sets the receiver's text anti-aliasing value to the parameter, + * Sets the receiver's text anti-aliasing value to the parameter, * which must be one of <code>SWT.DEFAULT</code>, <code>SWT.OFF</code> * or <code>SWT.ON</code>. Note that this controls anti-aliasing only * for all <em>text drawing</em> operations. @@ -3948,7 +3948,7 @@ void setString(String string, int flags) { * graphics subsystem which may not be available on some * platforms. * </p> - * + * * @param antialias the anti-aliasing setting * * @exception IllegalArgumentException <ul> @@ -3959,11 +3959,11 @@ void setString(String string, int flags) { * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li> * </ul> - * + * * @see #getAdvanced * @see #setAdvanced * @see #setAntialias - * + * * @since 3.1 */ public void setTextAntialias(int antialias) { @@ -3995,9 +3995,9 @@ public void setTextAntialias(int antialias) { * graphics subsystem which may not be available on some * platforms. * </p> - * + * * @param transform the transform to set - * + * * @exception IllegalArgumentException <ul> * <li>ERROR_INVALID_ARGUMENT - if the parameter has been disposed</li> * </ul> @@ -4005,11 +4005,11 @@ public void setTextAntialias(int antialias) { * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available</li> * </ul> - * + * * @see Transform * @see #getAdvanced * @see #setAdvanced - * + * * @since 3.1 */ public void setTransform(Transform transform) { @@ -4021,12 +4021,12 @@ public void setTransform(Transform transform) { double[] identity = identity(); if (transform != null) { Cairo.cairo_matrix_multiply(identity, transform.handle, identity); - } + } Cairo.cairo_set_matrix(cairo, identity); data.state &= ~DRAW_OFFSET; } -/** +/** * If the argument is <code>true</code>, puts the receiver * in a drawing mode where the resulting color in the destination * is the <em>exclusive or</em> of the color values in the source @@ -4044,7 +4044,7 @@ public void setTransform(Transform transform) { * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> - * + * * @deprecated this functionality is not supported on some platforms */ @Deprecated @@ -4081,7 +4081,7 @@ public void setXORMode(boolean xor) { * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> */ -public Point stringExtent(String string) { +public Point stringExtent(String string) { return textExtent(string, 0); } 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 33f203b07c..223f9f2c28 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 @@ -10,14 +10,14 @@ *******************************************************************************/ package org.eclipse.swt.graphics; - + import org.eclipse.swt.internal.*; import org.eclipse.swt.internal.cairo.*; import org.eclipse.swt.internal.gtk.*; import org.eclipse.swt.*; import java.io.*; - + /** * Instances of this class are graphics which have been prepared * for display on a specific device. That is, they are ready @@ -29,7 +29,7 @@ import java.io.*; * pixels are specified as being transparent when drawn. Examples * of file formats that support transparency are GIF and PNG. * </p><p> - * There are two primary ways to use <code>Images</code>. + * There are two primary ways to use <code>Images</code>. * The first is to load a graphic file from disk and create an * <code>Image</code> from it. This is done using an <code>Image</code> * constructor, for example: @@ -42,8 +42,8 @@ import java.io.*; * SWT. It is possible to get more control over the mapping of * colors as the image is being created, using code of the form: * <pre> - * ImageData data = new ImageData("C:\\graphic.bmp"); - * RGB[] rgbs = data.getRGBs(); + * ImageData data = new ImageData("C:\\graphic.bmp"); + * RGB[] rgbs = data.getRGBs(); * // At this point, rgbs contains specifications of all * // the colors contained within this image. You may * // allocate as many of these colors as you wish by @@ -56,7 +56,7 @@ import java.io.*; * loading process should use the support provided in class * <code>ImageLoader</code>. * </p><p> - * Application code must explicitly invoke the <code>Image.dispose()</code> + * Application code must explicitly invoke the <code>Image.dispose()</code> * method to release the operating system resources managed by each instance * when those instances are no longer required. * </p> @@ -79,11 +79,11 @@ public final class Image extends Resource implements Drawable { * within the packages provided by SWT. It is not available on all * platforms and should never be accessed from application code. * </p> - * + * * @noreference This field is not intended to be referenced by clients. */ public int type; - + /** * The handle to the OS pixmap resource. * (Warning: This field is platform dependent) @@ -93,11 +93,11 @@ public final class Image extends Resource implements Drawable { * within the packages provided by SWT. It is not available on all * platforms and should never be accessed from application code. * </p> - * + * * @noreference This field is not intended to be referenced by clients. */ public long /*int*/ pixmap; - + /** * The handle to the OS mask resource. * (Warning: This field is platform dependent) @@ -107,7 +107,7 @@ public final class Image extends Resource implements Drawable { * within the packages provided by SWT. It is not available on all * platforms and should never be accessed from application code. * </p> - * + * * @noreference This field is not intended to be referenced by clients. */ public long /*int*/ mask; @@ -121,16 +121,16 @@ public final class Image extends Resource implements Drawable { * within the packages provided by SWT. It is not available on all * platforms and should never be accessed from application code. * </p> - * + * * @noreference This field is not intended to be referenced by clients. */ public long /*int*/ surface; - + /** * specifies the transparent pixel */ int transparentPixel = -1; - + /** * The GC the image is currently selected in. */ @@ -140,22 +140,22 @@ public final class Image extends Resource implements Drawable { * The alpha data of the image. */ byte[] alphaData; - + /** * The global alpha value to be used for every pixel. */ int alpha = -1; - + /** * The width of the image. */ int width = -1; - + /** * The height of the image. */ int height = -1; - + /** * Specifies the default scanline padding. */ @@ -246,7 +246,7 @@ public Image(Device device, Image srcImage, int flag) { } device = this.device; this.type = srcImage.type; - + if (OS.USE_CAIRO) { if (flag != SWT.IMAGE_DISABLE) transparentPixel = srcImage.transparentPixel; alpha = srcImage.alpha; @@ -254,7 +254,7 @@ public Image(Device device, Image srcImage, int flag) { alphaData = new byte[srcImage.alphaData.length]; System.arraycopy(srcImage.alphaData, 0, alphaData, 0, alphaData.length); } - + long /*int*/ imageSurface = srcImage.surface; int width = this.width = srcImage.width; int height = this.height = srcImage.height; @@ -329,7 +329,7 @@ public Image(Device device, Image srcImage, int flag) { } break; } - case SWT.IMAGE_GRAY: { + case SWT.IMAGE_GRAY: { byte[] line = new byte[stride]; for (int y=0; y<height; y++) { OS.memmove(line, data + (y * stride), stride); @@ -370,7 +370,7 @@ public Image(Device device, Image srcImage, int flag) { } int width = w[0]; int height = h[0]; - + /* Copy the mask */ if ((srcImage.type == SWT.ICON && srcImage.mask != 0) || srcImage.transparentPixel != -1) { /* Generate the mask if necessary. */ @@ -401,12 +401,12 @@ public Image(Device device, Image srcImage, int flag) { long /*int*/ gdkGC = OS.gdk_gc_new(pixmap); if (gdkGC == 0) SWT.error(SWT.ERROR_NO_HANDLES); this.pixmap = pixmap; - + if (flag == SWT.IMAGE_COPY) { OS.gdk_draw_drawable(pixmap, gdkGC, srcImage.pixmap, 0, 0, 0, 0, width, height); OS.g_object_unref(gdkGC); } else { - + /* Retrieve the source pixmap data */ long /*int*/ pixbuf = OS.gdk_pixbuf_new(OS.GDK_COLORSPACE_RGB, false, 8, width, height); if (pixbuf == 0) SWT.error(SWT.ERROR_NO_HANDLES); @@ -414,7 +414,7 @@ public Image(Device device, Image srcImage, int flag) { OS.gdk_pixbuf_get_from_drawable(pixbuf, srcImage.pixmap, colormap, 0, 0, 0, 0, width, height); int stride = OS.gdk_pixbuf_get_rowstride(pixbuf); long /*int*/ pixels = OS.gdk_pixbuf_get_pixels(pixbuf); - + /* Apply transformation */ switch (flag) { case SWT.IMAGE_DISABLE: { @@ -451,7 +451,7 @@ public Image(Device device, Image srcImage, int flag) { } break; } - case SWT.IMAGE_GRAY: { + case SWT.IMAGE_GRAY: { byte[] line = new byte[stride]; for (int y=0; y<height; y++) { OS.memmove(line, pixels + (y * stride), stride); @@ -468,10 +468,10 @@ public Image(Device device, Image srcImage, int flag) { break; } } - + /* Copy data back to destination pixmap */ OS.gdk_pixbuf_render_to_drawable(pixbuf, pixmap, gdkGC, 0, 0, 0, 0, width, height, OS.GDK_RGB_DITHER_NORMAL, 0, 0); - + /* Free resources */ OS.g_object_unref(pixbuf); OS.g_object_unref(gdkGC); @@ -541,7 +541,7 @@ public Image(Device device, ImageData data) { } /** - * Constructs an instance of this class, whose type is + * Constructs an instance of this class, whose type is * <code>SWT.ICON</code>, from the two given <code>ImageData</code> * objects. The two images must be the same size. Pixel transparency * in either image will be ignored. @@ -589,7 +589,7 @@ public Image(Device device, ImageData source, ImageData mask) { * <p> * This constructor is provided for convenience when loading a single * image only. If the stream contains multiple images, only the first - * one will be loaded. To load multiple images, use + * one will be loaded. To load multiple images, use * <code>ImageLoader.load()</code>. * </p><p> * This constructor may be used to load a resource as follows: @@ -712,7 +712,7 @@ void createAlphaMask (int width, int height) { } OS.gdk_draw_image(mask, gc, imagePtr, 0, 0, 0, 0, width, height); OS.g_object_unref(imagePtr); - } + } OS.g_object_unref(gc); } } @@ -779,8 +779,8 @@ void createFromPixbuf(int type, long /*int*/ pixbuf) { * Bug in GTK. Depending on the image (seems to affect images that have * some degree of transparency all over the image), gdk_pixbuff_render_pixmap_and_mask() * will return a corrupt pixmap. To avoid this, read in and store the alpha channel data - * for the image and then set it to 0xFF to prevent any possible corruption from - * gdk_pixbuff_render_pixmap_and_mask(). + * for the image and then set it to 0xFF to prevent any possible corruption from + * gdk_pixbuff_render_pixmap_and_mask(). */ int width = OS.gdk_pixbuf_get_width(pixbuf); int height = OS.gdk_pixbuf_get_height(pixbuf); @@ -889,7 +889,7 @@ void createSurface() { long /*int*/ colormap = OS.gdk_colormap_get_system(); OS.gdk_pixbuf_get_from_drawable(pixbuf, pixmap, colormap, 0, 0, 0, 0, width, height); int stride = OS.gdk_pixbuf_get_rowstride(pixbuf); - long /*int*/ pixels = OS.gdk_pixbuf_get_pixels(pixbuf); + long /*int*/ pixels = OS.gdk_pixbuf_get_pixels(pixbuf); byte[] line = new byte[stride]; int oa, or, og, ob; if (OS.BIG_ENDIAN) { @@ -1165,7 +1165,7 @@ public ImageData getImageData() { } else { OS.gdk_drawable_get_size(pixmap, w, h); } - int width = w[0], height = h[0]; + int width = w[0], height = h[0]; long /*int*/ pixbuf = OS.gdk_pixbuf_new(OS.GDK_COLORSPACE_RGB, false, 8, width, height); if (pixbuf == 0) SWT.error(SWT.ERROR_NO_HANDLES); long /*int*/ colormap = OS.gdk_colormap_get_system(); @@ -1201,8 +1201,8 @@ public ImageData getImageData() { if (gdkImage.byte_order == OS.GDK_LSB_FIRST) { for (int i = 0; i < maskData.length; i++) { byte b = maskData[i]; - maskData[i] = (byte)(((b & 0x01) << 7) | ((b & 0x02) << 5) | - ((b & 0x04) << 3) | ((b & 0x08) << 1) | ((b & 0x10) >> 1) | + maskData[i] = (byte)(((b & 0x01) << 7) | ((b & 0x02) << 5) | + ((b & 0x04) << 3) | ((b & 0x08) << 1) | ((b & 0x10) >> 1) | ((b & 0x20) >> 3) | ((b & 0x40) >> 5) | ((b & 0x80) >> 7)); } } @@ -1217,7 +1217,7 @@ public ImageData getImageData() { return data; } -/** +/** * Invokes platform specific functionality to allocate a new image. * <p> * <b>IMPORTANT:</b> This method is <em>not</em> part of the public @@ -1247,7 +1247,7 @@ public static Image gtk_new(Device device, int type, long /*int*/ imageHandle, l return image; } -/** +/** * Invokes platform specific functionality to allocate a new image. * <p> * <b>IMPORTANT:</b> This method is <em>not</em> part of the public @@ -1271,8 +1271,8 @@ public static Image gtk_new_from_pixbuf(Device device, int type, long /*int*/ pi } /** - * Returns an integer hash code for the receiver. Any two - * objects that return <code>true</code> when passed to + * Returns an integer hash code for the receiver. Any two + * objects that return <code>true</code> when passed to * <code>equals</code> must return the same value for this * method. * @@ -1371,7 +1371,7 @@ void init(ImageData image) { if (palette.isDirect) { ImageData.blit(ImageData.BLIT_SRC, image.data, image.depth, image.bytesPerLine, image.getByteOrder(), 0, 0, width, height, palette.redMask, palette.greenMask, palette.blueMask, - ImageData.ALPHA_OPAQUE, null, 0, 0, 0, + ImageData.ALPHA_OPAQUE, null, 0, 0, 0, buffer, destDepth, stride, destOrder, 0, 0, width, height, redMask, greenMask, blueMask, false, false); } else { @@ -1484,7 +1484,7 @@ void init(ImageData image) { if (palette.isDirect) { ImageData.blit(ImageData.BLIT_SRC, image.data, image.depth, image.bytesPerLine, image.getByteOrder(), 0, 0, width, height, palette.redMask, palette.greenMask, palette.blueMask, - ImageData.ALPHA_OPAQUE, null, 0, 0, 0, + ImageData.ALPHA_OPAQUE, null, 0, 0, 0, buffer, 24, stride, ImageData.MSB_FIRST, 0, 0, width, height, 0xFF0000, 0xFF00, 0xFF, false, false); } else { @@ -1515,7 +1515,7 @@ void init(ImageData image) { OS.gdk_pixbuf_render_to_drawable(pixbuf, pixmap, gdkGC, 0, 0, 0, 0, width, height, OS.GDK_RGB_DITHER_NORMAL, 0, 0); OS.g_object_unref(gdkGC); OS.g_object_unref(pixbuf); - + boolean isIcon = image.getTransparencyType() == SWT.TRANSPARENCY_MASK; if (isIcon || image.transparentPixel != -1) { if (image.transparentPixel != -1) { @@ -1552,7 +1552,7 @@ void init(ImageData image) { this.pixmap = pixmap; } -/** +/** * Invokes platform specific functionality to allocate a new GC handle. * <p> * <b>IMPORTANT:</b> This method is <em>not</em> part of the public @@ -1562,9 +1562,9 @@ void init(ImageData image) { * application code. * </p> * - * @param data the platform specific GC data + * @param data the platform specific GC data * @return the platform specific GC handle - * + * * @noreference This method is not intended to be referenced by clients. */ public long /*int*/ internal_new_GC (GCData data) { @@ -1597,7 +1597,7 @@ public long /*int*/ internal_new_GC (GCData data) { return gc; } -/** +/** * Invokes platform specific functionality to dispose a GC handle. * <p> * <b>IMPORTANT:</b> This method is <em>not</em> part of the public @@ -1609,7 +1609,7 @@ public long /*int*/ internal_new_GC (GCData data) { * * @param hDC the platform specific GC handle * @param data the platform specific GC data - * + * * @noreference This method is not intended to be referenced by clients. */ public void internal_dispose_GC (long /*int*/ hDC, GCData data) { diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Region.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Region.java index db3c6f20ce..2288eda509 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Region.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Region.java @@ -20,11 +20,11 @@ import org.eclipse.swt.*; * system that are aggregates of the areas covered by a number * of polygons. * <p> - * Application code must explicitly invoke the <code>Region.dispose()</code> + * Application code must explicitly invoke the <code>Region.dispose()</code> * method to release the operating system resources managed by each instance * when those instances are no longer required. * </p> - * + * * @see <a href="http://www.eclipse.org/swt/examples.php">SWT Example: GraphicsExample</a> * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a> */ @@ -38,14 +38,14 @@ public final class Region extends Resource { * within the packages provided by SWT. It is not available on all * platforms and should never be accessed from application code. * </p> - * + * * @noreference This field is not intended to be referenced by clients. */ public long /*int*/ handle; /** * Constructs a new empty region. - * + * * @exception SWTError <ul> * <li>ERROR_NO_HANDLES if a handle could not be obtained for region creation</li> * </ul> @@ -57,7 +57,7 @@ public Region() { /** * Constructs a new empty region. * <p> - * You must dispose the region when it is no longer required. + * You must dispose the region when it is no longer required. * </p> * * @param device the device on which to allocate the region @@ -70,7 +70,7 @@ public Region() { * </ul> * * @see #dispose - * + * * @since 3.0 */ public Region(Device device) { @@ -157,7 +157,7 @@ public void add (int[] pointArray) { if (pointArray == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); /* * Bug in GTK. If gdk_region_polygon() is called with one point, - * it segment faults. The fix is to make sure that it is called + * it segment faults. The fix is to make sure that it is called * with enough points for a polygon. */ if (pointArray.length < 6) return; @@ -201,7 +201,7 @@ public void add(Rectangle rect) { * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> - * + * * @since 3.1 */ public void add(int x, int y, int width, int height) { @@ -319,7 +319,7 @@ public Rectangle getBounds() { return new Rectangle(gdkRect.x, gdkRect.y, gdkRect.width, gdkRect.height); } -/** +/** * Invokes platform specific functionality to allocate a new region. * <p> * <b>IMPORTANT:</b> This method is <em>not</em> part of the public @@ -332,7 +332,7 @@ public Rectangle getBounds() { * @param device the device on which to allocate the region * @param handle the handle for the region * @return a new region object containing the specified device and handle - * + * * @noreference This method is not intended to be referenced by clients. */ public static Region gtk_new(Device device, long /*int*/ handle) { @@ -340,8 +340,8 @@ public static Region gtk_new(Device device, long /*int*/ handle) { } /** - * Returns an integer hash code for the receiver. Any two - * objects that return <code>true</code> when passed to + * Returns an integer hash code for the receiver. Any two + * objects that return <code>true</code> when passed to * <code>equals</code> must return the same value for this * method. * @@ -367,7 +367,7 @@ public int hashCode() { * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> - * + * * @since 3.0 */ public void intersect(Rectangle rect) { @@ -391,7 +391,7 @@ public void intersect(Rectangle rect) { * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> - * + * * @since 3.1 */ public void intersect(int x, int y, int width, int height) { @@ -421,7 +421,7 @@ public void intersect(int x, int y, int width, int height) { * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> - * + * * @since 3.0 */ public void intersect(Region region) { @@ -522,7 +522,7 @@ public boolean isEmpty() { * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> - * + * * @since 3.0 */ public void subtract (int[] pointArray) { @@ -530,7 +530,7 @@ public void subtract (int[] pointArray) { if (pointArray == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); /* * Bug in GTK. If gdk_region_polygon() is called with one point, - * it segment faults. The fix is to make sure that it is called + * it segment faults. The fix is to make sure that it is called * with enough points for a polygon. */ if (pointArray.length < 6) return; @@ -552,7 +552,7 @@ public void subtract (int[] pointArray) { * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> - * + * * @since 3.0 */ public void subtract(Rectangle rect) { @@ -576,7 +576,7 @@ public void subtract(Rectangle rect) { * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> - * + * * @since 3.1 */ public void subtract(int x, int y, int width, int height) { @@ -606,7 +606,7 @@ public void subtract(int x, int y, int width, int height) { * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> - * + * * @since 3.0 */ public void subtract(Region region) { @@ -626,7 +626,7 @@ public void subtract(Region region) { * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> - * + * * @since 3.1 */ public void translate (int x, int y) { @@ -646,7 +646,7 @@ public void translate (int x, int y) { * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> - * + * * @since 3.1 */ public void translate (Point pt) { 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 17046ff867..2c11cb88fb 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 @@ -23,19 +23,19 @@ import org.eclipse.swt.*; * navigation, hit testing, text wrapping, alignment, tab expansion * line breaking, etc. These are aspects required for rendering internationalized text. * </p><p> - * Application code must explicitly invoke the <code>TextLayout#dispose()</code> + * Application code must explicitly invoke the <code>TextLayout#dispose()</code> * method to release the operating system resources managed by each instance * when those instances are no longer required. * </p> - * + * * @see <a href="http://www.eclipse.org/swt/snippets/#textlayout">TextLayout, TextStyle snippets</a> * @see <a href="http://www.eclipse.org/swt/examples.php">SWT Example: CustomControlExample, StyledText tab</a> * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a> - * + * * @since 3.0 */ public final class TextLayout extends Resource { - + static class StyleItem { TextStyle style; int start; @@ -59,18 +59,18 @@ public final class TextLayout extends Resource { int[] invalidOffsets; static final char LTR_MARK = '\u200E', RTL_MARK = '\u200F', ZWS = '\u200B', ZWNBS = '\uFEFF'; -/** +/** * Constructs a new instance of this class on the given device. * <p> - * You must dispose the text layout when it is no longer required. + * You must dispose the text layout when it is no longer required. * </p> - * + * * @param device the device on which to allocate the text layout - * + * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if device is null and there is no current device</li> * </ul> - * + * * @see #dispose() */ public TextLayout (Device device) { @@ -106,14 +106,14 @@ void computeRuns () { OS.pango_layout_set_text (layout, buffer, buffer.length); if (stylesCount == 2 && styles[0].style == null && ascent == -1 && descent == -1 && segments == null) return; long /*int*/ ptr = OS.pango_layout_get_text(layout); - attrList = OS.pango_attr_list_new(); + attrList = OS.pango_attr_list_new(); selAttrList = OS.pango_attr_list_new(); PangoAttribute attribute = new PangoAttribute(); char[] chars = null; int segementsLength = segmentsText.length(); int nSegments = segementsLength - text.length(); int offsetCount = nSegments; - int[] lineOffsets = null; + int[] lineOffsets = null; if ((ascent != -1 || descent != -1) && segementsLength > 0) { PangoRectangle rect = new PangoRectangle(); if (ascent != -1) rect.y = -(ascent * OS.PANGO_SCALE); @@ -141,13 +141,13 @@ void computeRuns () { attribute.start_index = bytePos + offset + 3; attribute.end_index = bytePos + offset + 6; OS.memmove (attr, attribute, PangoAttribute.sizeof); - OS.pango_attr_list_insert(attrList, attr); + OS.pango_attr_list_insert(attrList, attr); OS.pango_attr_list_insert(selAttrList, OS.pango_attribute_copy(attr)); int pos = (int)/*64*/OS.g_utf16_pointer_to_offset(ptr, ptr + bytePos); chars[pos + lineIndex * 2] = ZWS; chars[pos + lineIndex * 2 + 1] = ZWNBS; segmentsText.getChars(oldPos, pos, chars, oldPos + lineIndex * 2); - lineOffsets[lineIndex] = pos + lineIndex * 2; + lineOffsets[lineIndex] = pos + lineIndex * 2; oldPos = pos; lineIndex++; } @@ -181,7 +181,7 @@ void computeRuns () { Font defaultFont = font != null ? font : device.systemFont; for (int i = 0; i < stylesCount - 1; i++) { StyleItem styleItem = styles[i]; - TextStyle style = styleItem.style; + TextStyle style = styleItem.style; if (style == null) continue; int start = translateOffset(styleItem.start); int end = translateOffset(styles[i+1].start - 1); @@ -203,10 +203,10 @@ void computeRuns () { int underlineStyle = OS.PANGO_UNDERLINE_NONE; switch (style.underlineStyle) { case SWT.UNDERLINE_SINGLE: - underlineStyle = OS.PANGO_UNDERLINE_SINGLE; + underlineStyle = OS.PANGO_UNDERLINE_SINGLE; break; case SWT.UNDERLINE_DOUBLE: - underlineStyle = OS.PANGO_UNDERLINE_DOUBLE; + underlineStyle = OS.PANGO_UNDERLINE_DOUBLE; break; case SWT.UNDERLINE_SQUIGGLE: case SWT.UNDERLINE_ERROR: @@ -220,7 +220,7 @@ void computeRuns () { attribute.end_index = byteEnd; OS.memmove (attr, attribute, PangoAttribute.sizeof); OS.pango_attr_list_insert(attrList, attr); - } + } underlineStyle = OS.PANGO_UNDERLINE_SINGLE; break; } @@ -323,7 +323,7 @@ int[] computePolyline(int left, int top, int right, int bottom) { } int length = ((2 * peaks) + 1) * 2; if (length < 0) return new int[0]; - + int[] coordinates = new int[length]; for (int i = 0; i < peaks; i++) { int index = 4 * i; @@ -354,7 +354,7 @@ void destroy() { /** * Draws the receiver's text using the specified GC at the specified * point. - * + * * @param gc the GC to draw * @param x the x coordinate of the top left corner of the rectangular area where the text is to be drawn * @param y the y coordinate of the top left corner of the rectangular area where the text is to be drawn @@ -373,7 +373,7 @@ public void draw(GC gc, int x, int y) { /** * Draws the receiver's text using the specified GC at the specified * point. - * + * * @param gc the GC to draw * @param x the x coordinate of the top left corner of the rectangular area where the text is to be drawn * @param y the y coordinate of the top left corner of the rectangular area where the text is to be drawn @@ -417,10 +417,10 @@ public void draw(GC gc, int x, int y, int selectionStart, int selectionEnd, Colo * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the gc is null</li> * </ul> - * + * * @since 3.3 */ -public void draw(GC gc, int x, int y, int selectionStart, int selectionEnd, Color selectionForeground, Color selectionBackground, int flags) { +public void draw(GC gc, int x, int y, int selectionStart, int selectionEnd, Color selectionForeground, Color selectionBackground, int flags) { checkLayout (); computeRuns(); if (gc == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); @@ -493,7 +493,7 @@ public void draw(GC gc, int x, int y, int selectionStart, int selectionEnd, Colo OS.pango_layout_iter_free(iter); if (attrs[0] != 0) OS.g_free(attrs[0]); if (cairo != 0) { - Cairo.cairo_restore(cairo); + Cairo.cairo_restore(cairo); } else { OS.gdk_gc_set_foreground(gc.handle, data.foreground); } @@ -620,7 +620,7 @@ void drawBorder(GC gc, int x, int y, GdkColor selectionColor) { for (int i = 0; i < stylesCount - 1; i++) { TextStyle style = styles[i].style; if (style == null) continue; - + boolean drawBorder = style.borderStyle != SWT.NONE; if (drawBorder && !style.isAdherentBorder(styles[i+1].style)) { int start = styles[i].start; @@ -719,7 +719,7 @@ void freeRuns() { invalidOffsets = null; } -/** +/** * Returns the receiver's horizontal text alignment, which will be one * of <code>SWT.LEFT</code>, <code>SWT.CENTER</code> or * <code>SWT.RIGHT</code>. @@ -749,7 +749,7 @@ public int getAlignment() { * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> - * + * * @see #getDescent() * @see #setDescent(int) * @see #setAscent(int) @@ -764,13 +764,13 @@ public int getAscent () { * Returns the bounds of the receiver. The width returned is either the * width of the longest line or the width set using {@link TextLayout#setWidth(int)}. * To obtain the text bounds of a line use {@link TextLayout#getLineBounds(int)}. - * + * * @return the bounds of the receiver - * + * * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> - * + * * @see #setWidth(int) * @see #getLineBounds(int) */ @@ -786,7 +786,7 @@ public Rectangle getBounds() { if (ascent != -1 && descent != -1) { height = Math.max (height, ascent + descent); } - height += OS.PANGO_PIXELS(OS.pango_layout_get_spacing(layout)); + height += OS.PANGO_PIXELS(OS.pango_layout_get_spacing(layout)); return new Rectangle(0, 0, width, height); } @@ -795,11 +795,11 @@ public Rectangle getBounds() { * bounds is the smallest rectangle that encompasses all characters * in the range. The start and end offsets are inclusive and will be * clamped if out of range. - * + * * @param start the start offset * @param end the end offset * @return the bounds of the character range - * + * * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> @@ -824,8 +824,8 @@ public Rectangle getBounds(int start, int end) { long /*int*/ clipRegion = OS.gdk_pango_layout_get_clip_region(layout, 0, 0, ranges, 1); if (clipRegion == 0) return new Rectangle(0, 0, 0, 0); GdkRectangle rect = new GdkRectangle(); - - /* + + /* * Bug in Pango. The region returned by gdk_pango_layout_get_clip_region() * includes areas from lines outside of the requested range. The fix * is to subtract these areas from the clip region. @@ -853,7 +853,7 @@ public Rectangle getBounds(int start, int end) { OS.gdk_region_intersect(clipRegion, linesRegion); OS.gdk_region_destroy(linesRegion); OS.pango_layout_iter_free(iter); - + OS.gdk_region_get_clipbox(clipRegion, rect); OS.gdk_region_destroy(clipRegion); if (OS.pango_context_get_base_dir(context) == OS.PANGO_DIRECTION_RTL) { @@ -871,7 +871,7 @@ public Rectangle getBounds(int start, int end) { * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> - * + * * @see #getAscent() * @see #setAscent(int) * @see #setDescent(int) @@ -882,7 +882,7 @@ public int getDescent () { return descent; } -/** +/** * Returns the default font currently being used by the receiver * to draw and measure text. * @@ -901,11 +901,11 @@ public Font getFont () { * Returns the receiver's indent. * * @return the receiver's indent -* +* * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> -* +* * @since 3.2 */ public int getIndent () { @@ -917,11 +917,11 @@ public int getIndent () { * Returns the receiver's justification. * * @return the receiver's justification -* +* * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> -* +* * @since 3.2 */ public boolean getJustify () { @@ -933,10 +933,10 @@ public boolean getJustify () { * Returns the embedding level for the specified character offset. The * embedding level is usually used to determine the directionality of a * character in bidirectional text. - * + * * @param offset the character offset * @return the embedding level - * + * * @exception IllegalArgumentException <ul> * <li>ERROR_INVALID_ARGUMENT - if the character offset is out of range</li> * </ul> @@ -975,10 +975,10 @@ public int getLevel(int offset) { /** * Returns the bounds of the line for the specified line index. - * + * * @param lineIndex the line index - * @return the line bounds - * + * @return the line bounds + * * @exception IllegalArgumentException <ul> * <li>ERROR_INVALID_ARGUMENT - if the line index is out of range</li> * </ul> @@ -1016,7 +1016,7 @@ public Rectangle getLineBounds(int lineIndex) { * by wrapping. * * @return the line count - * + * * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> @@ -1030,10 +1030,10 @@ public int getLineCount() { /** * Returns the index of the line that contains the specified * character offset. - * + * * @param offset the character offset * @return the line index - * + * * @exception IllegalArgumentException <ul> * <li>ERROR_INVALID_ARGUMENT - if the character offset is out of range</li> * </ul> @@ -1064,10 +1064,10 @@ public int getLineIndex(int offset) { /** * Returns the font metrics for the specified line index. - * + * * @param lineIndex the line index - * @return the font metrics - * + * @return the font metrics + * * @exception IllegalArgumentException <ul> * <li>ERROR_INVALID_ARGUMENT - if the line index is out of range</li> * </ul> @@ -1105,9 +1105,9 @@ public FontMetrics getLineMetrics (int lineIndex) { * Returns the line offsets. Each value in the array is the * offset for the first character in a line except for the last * value, which contains the length of the text. - * + * * @return the line offsets - * + * * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> @@ -1133,15 +1133,15 @@ public int[] getLineOffsets() { * Returns the location for the specified character offset. The * <code>trailing</code> argument indicates whether the offset * corresponds to the leading or trailing edge of the cluster. - * + * * @param offset the character offset * @param trailing the trailing flag * @return the location of the character offset - * + * * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> - * + * * @see #getOffset(Point, int[]) * @see #getOffset(int, int, int[]) */ @@ -1169,12 +1169,12 @@ public Point getLocation(int offset, boolean trailing) { /** * Returns the next offset for the specified offset and movement - * type. The movement is one of <code>SWT.MOVEMENT_CHAR</code>, + * type. The movement is one of <code>SWT.MOVEMENT_CHAR</code>, * <code>SWT.MOVEMENT_CLUSTER</code>, <code>SWT.MOVEMENT_WORD</code>, * <code>SWT.MOVEMENT_WORD_END</code> or <code>SWT.MOVEMENT_WORD_START</code>. - * + * * @param offset the start offset - * @param movement the movement type + * @param movement the movement type * @return the next offset * * @exception IllegalArgumentException <ul> @@ -1183,7 +1183,7 @@ public Point getLocation(int offset, boolean trailing) { * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> - * + * * @see #getPreviousOffset(int, int) */ public int getNextOffset (int offset, int movement) { @@ -1206,7 +1206,7 @@ int _getOffset (int offset, int movement, boolean forward) { int[] nAttrs = new int[1]; OS.pango_layout_get_log_attrs(layout, attrs, nAttrs); if (attrs[0] == 0) return offset + step; - + long /*int*/ ptr = OS.pango_layout_get_text(layout); int utf8Offset = (int)/*64*/OS.g_utf16_offset_to_utf8_offset (ptr, translateOffset(offset)); int utf8Length = (int)/*64*/OS.g_utf8_strlen(ptr, -1); @@ -1215,7 +1215,7 @@ int _getOffset (int offset, int movement, boolean forward) { while (0 <= utf8Offset && utf8Offset <= utf8Length) { OS.memmove(logAttr, attrs[0] + utf8Offset * PangoLogAttr.sizeof, PangoLogAttr.sizeof); boolean found = false, limit = false; - if (((movement & SWT.MOVEMENT_CLUSTER) != 0) && logAttr.is_cursor_position) found = true; + if (((movement & SWT.MOVEMENT_CLUSTER) != 0) && logAttr.is_cursor_position) found = true; if ((movement & SWT.MOVEMENT_WORD) != 0) { if (forward) { if (logAttr.is_word_end) found = true; @@ -1237,7 +1237,7 @@ int _getOffset (int offset, int movement, boolean forward) { if (utf8Offset == 0) limit = true; } if (found || limit) { - int testOffset = (int)/*64*/OS.g_utf8_offset_to_utf16_offset (ptr, utf8Offset); + int testOffset = (int)/*64*/OS.g_utf8_offset_to_utf16_offset (ptr, utf8Offset); if (found && invalidOffsets != null) { for (int i = 0; i < invalidOffsets.length; i++) { if (testOffset == invalidOffsets[i]) { @@ -1258,18 +1258,18 @@ int _getOffset (int offset, int movement, boolean forward) { } /** - * Returns the character offset for the specified point. - * For a typical character, the trailing argument will be filled in to + * Returns the character offset for the specified point. + * For a typical character, the trailing argument will be filled in to * indicate whether the point is closer to the leading edge (0) or - * the trailing edge (1). When the point is over a cluster composed - * of multiple characters, the trailing argument will be filled with the + * the trailing edge (1). When the point is over a cluster composed + * of multiple characters, the trailing argument will be filled with the * position of the character in the cluster that is closest to * the point. - * + * * @param point the point * @param trailing the trailing buffer * @return the character offset - * + * * @exception IllegalArgumentException <ul> * <li>ERROR_INVALID_ARGUMENT - if the trailing length is less than <code>1</code></li> * <li>ERROR_NULL_ARGUMENT - if the point is null</li> @@ -1277,7 +1277,7 @@ int _getOffset (int offset, int movement, boolean forward) { * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> - * + * * @see #getLocation(int, boolean) */ public int getOffset(Point point, int[] trailing) { @@ -1287,26 +1287,26 @@ public int getOffset(Point point, int[] trailing) { } /** - * Returns the character offset for the specified point. - * For a typical character, the trailing argument will be filled in to + * Returns the character offset for the specified point. + * For a typical character, the trailing argument will be filled in to * indicate whether the point is closer to the leading edge (0) or - * the trailing edge (1). When the point is over a cluster composed - * of multiple characters, the trailing argument will be filled with the + * the trailing edge (1). When the point is over a cluster composed + * of multiple characters, the trailing argument will be filled with the * position of the character in the cluster that is closest to * the point. - * + * * @param x the x coordinate of the point * @param y the y coordinate of the point * @param trailing the trailing buffer * @return the character offset - * + * * @exception IllegalArgumentException <ul> * <li>ERROR_INVALID_ARGUMENT - if the trailing length is less than <code>1</code></li> * </ul> * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> - * + * * @see #getLocation(int, boolean) */ public int getOffset(int x, int y, int[] trailing) { @@ -1317,12 +1317,12 @@ public int getOffset(int x, int y, int[] trailing) { if (OS.pango_context_get_base_dir(context) == OS.PANGO_DIRECTION_RTL) { x = width() - x; } - + /* - * Feature in GTK. pango_layout_xy_to_index() returns the - * logical end/start offset of a line when the coordinates are outside - * the line bounds. In SWT the correct behavior is to return the closest - * visual offset. The fix is to clamp the coordinates inside the + * Feature in GTK. pango_layout_xy_to_index() returns the + * logical end/start offset of a line when the coordinates are outside + * the line bounds. In SWT the correct behavior is to return the closest + * visual offset. The fix is to clamp the coordinates inside the * line bounds. */ long /*int*/ iter = OS.pango_layout_get_iter(layout); @@ -1341,7 +1341,7 @@ public int getOffset(int x, int y, int[] trailing) { } } while (OS.pango_layout_iter_next_line(iter)); OS.pango_layout_iter_free(iter); - + int[] index = new int[1]; int[] piTrailing = new int[1]; OS.pango_layout_xy_to_index(layout, x * OS.PANGO_SCALE, y * OS.PANGO_SCALE, index, piTrailing); @@ -1360,7 +1360,7 @@ public int getOffset(int x, int y, int[] trailing) { * Returns the orientation of the receiver. * * @return the orientation style - * + * * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> @@ -1373,12 +1373,12 @@ public int getOrientation() { /** * Returns the previous offset for the specified offset and movement - * type. The movement is one of <code>SWT.MOVEMENT_CHAR</code>, + * type. The movement is one of <code>SWT.MOVEMENT_CHAR</code>, * <code>SWT.MOVEMENT_CLUSTER</code> or <code>SWT.MOVEMENT_WORD</code>, * <code>SWT.MOVEMENT_WORD_END</code> or <code>SWT.MOVEMENT_WORD_START</code>. - * + * * @param offset the start offset - * @param movement the movement type + * @param movement the movement type * @return the previous offset * * @exception IllegalArgumentException <ul> @@ -1387,7 +1387,7 @@ public int getOrientation() { * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> - * + * * @see #getNextOffset(int, int) */ public int getPreviousOffset (int offset, int movement) { @@ -1398,14 +1398,14 @@ public int getPreviousOffset (int offset, int movement) { * Gets the ranges of text that are associated with a <code>TextStyle</code>. * * @return the ranges, an array of offsets representing the start and end of each - * text style. + * text style. * * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> - * + * * @see #getStyles() - * + * * @since 3.2 */ public int[] getRanges () { @@ -1448,7 +1448,7 @@ public int[] getSegments() { * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> - * + * * @since 3.6 */ public char[] getSegmentsChars () { @@ -1499,7 +1499,7 @@ String getSegmentsText() { * </ul> */ public int getSpacing () { - checkLayout(); + checkLayout(); return OS.PANGO_PIXELS(OS.pango_layout_get_spacing(layout)); } @@ -1537,9 +1537,9 @@ public TextStyle getStyle (int offset) { * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> - * + * * @see #getRanges() - * + * * @since 3.2 */ public TextStyle[] getStyles () { @@ -1592,7 +1592,7 @@ public String getText () { * Returns the text direction of the receiver. * * @return the text direction value - * + * * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> @@ -1620,11 +1620,11 @@ public int getWidth () { * Returns the receiver's wrap indent. * * @return the receiver's wrap indent -* +* * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> -* +* * @since 3.6 */ public int getWrapIndent () { @@ -1658,12 +1658,12 @@ public boolean isDisposed () { * alignment. * </p> * - * @param alignment the new alignment + * @param alignment the new alignment * * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> - * + * * @see #setWidth(int) */ public void setAlignment (int alignment) { @@ -1671,16 +1671,16 @@ public void setAlignment (int alignment) { int mask = SWT.LEFT | SWT.CENTER | SWT.RIGHT; alignment &= mask; if (alignment == 0) return; - if ((alignment & SWT.LEFT) != 0) alignment = SWT.LEFT; + if ((alignment & SWT.LEFT) != 0) alignment = SWT.LEFT; if ((alignment & SWT.RIGHT) != 0) alignment = SWT.RIGHT; boolean rtl = OS.pango_context_get_base_dir(context) == OS.PANGO_DIRECTION_RTL; int align = OS.PANGO_ALIGN_CENTER; switch (alignment) { - case SWT.LEFT: - align = rtl ? OS.PANGO_ALIGN_RIGHT : OS.PANGO_ALIGN_LEFT; + case SWT.LEFT: + align = rtl ? OS.PANGO_ALIGN_RIGHT : OS.PANGO_ALIGN_LEFT; break; - case SWT.RIGHT: - align = rtl ? OS.PANGO_ALIGN_LEFT : OS.PANGO_ALIGN_RIGHT; + case SWT.RIGHT: + align = rtl ? OS.PANGO_ALIGN_LEFT : OS.PANGO_ALIGN_RIGHT; break; } OS.pango_layout_set_alignment(layout, align); @@ -1700,7 +1700,7 @@ public void setAlignment (int alignment) { * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> - * + * * @see #setDescent(int) * @see #getLineMetrics(int) */ @@ -1726,7 +1726,7 @@ public void setAscent (int ascent) { * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> - * + * * @see #setAscent(int) * @see #getLineMetrics(int) */ @@ -1738,7 +1738,7 @@ public void setDescent (int descent) { this.descent = descent; } -/** +/** * Sets the default font which will be used by the receiver * to draw and measure text. If the * argument is null, then a default font appropriate @@ -1766,17 +1766,17 @@ public void setFont (Font font) { } /** - * Sets the indent of the receiver. This indent is applied to the first line of - * each paragraph. + * Sets the indent of the receiver. This indent is applied to the first line of + * each paragraph. * * @param indent new indent - * + * * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> - * + * * @see #setWrapIndent(int) - * + * * @since 3.2 */ public void setIndent (int indent) { @@ -1790,14 +1790,14 @@ public void setIndent (int indent) { /** * Sets the justification of the receiver. Note that the receiver's - * width must be set in order to use justification. + * width must be set in order to use justification. * * @param justify new justify - * + * * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> - * + * * @since 3.2 */ public void setJustify (boolean justify) { @@ -1810,7 +1810,7 @@ public void setJustify (boolean justify) { * of <code>SWT.LEFT_TO_RIGHT</code> or <code>SWT.RIGHT_TO_LEFT</code>. * * @param orientation new orientation style - * + * * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> @@ -1837,7 +1837,7 @@ public void setOrientation(int orientation) { * Sets the line spacing of the receiver. The line spacing * is the space left between lines. * - * @param spacing the new line spacing + * @param spacing the new line spacing * * @exception IllegalArgumentException <ul> * <li>ERROR_INVALID_ARGUMENT - if the spacing is negative</li> @@ -1855,25 +1855,25 @@ public void setSpacing (int spacing) { /** * Sets the offsets of the receiver's text segments. Text segments are used to * override the default behavior of the bidirectional algorithm. - * Bidirectional reordering can happen within a text segment but not + * Bidirectional reordering can happen within a text segment but not * between two adjacent segments. * <p> - * Each text segment is determined by two consecutive offsets in the - * <code>segments</code> arrays. The first element of the array should + * Each text segment is determined by two consecutive offsets in the + * <code>segments</code> arrays. The first element of the array should * always be zero and the last one should always be equals to length of * the text. * </p> * <p> * When segments characters are set, the segments are the offsets where * the characters are inserted in the text. - * <p> - * + * <p> + * * @param segments the text segments offset - * + * * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> - * + * * @see #setSegmentsChars(char[]) */ public void setSegments(int[] segments) { @@ -1893,20 +1893,20 @@ public void setSegments(int[] segments) { } /** - * Sets the characters to be used in the segments boundaries. The segments + * Sets the characters to be used in the segments boundaries. The segments * are set by calling <code>setSegments(int[])</code>. The application can * use this API to insert Unicode Control Characters in the text to control - * the display of the text and bidi reordering. The characters are not + * the display of the text and bidi reordering. The characters are not * accessible by any other API in <code>TextLayout</code>. - * - * @param segmentsChars the segments characters + * + * @param segmentsChars the segments characters * * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> - * + * * @see #setSegments(int[]) - * + * * @since 3.6 */ public void setSegmentsChars(char[] segmentsChars) { @@ -1929,11 +1929,11 @@ public void setSegmentsChars(char[] segmentsChars) { * Sets the style of the receiver for the specified range. Styles previously * set for that range will be overwritten. The start and end offsets are * inclusive and will be clamped if out of range. - * + * * @param style the style * @param start the start offset * @param end the end offset - * + * * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> @@ -1945,13 +1945,13 @@ public void setStyle (TextStyle style, int start, int end) { if (start > end) return; start = Math.min(Math.max(0, start), length - 1); end = Math.min(Math.max(0, end), length - 1); - + /* * Bug in Pango. Pango 1.2.2 will cause a segmentation fault if a style * is not applied for a whole ligature. The fix is to applied the * style for the whole ligature. - * - * NOTE that fix only LamAlef ligatures. + * + * NOTE that fix only LamAlef ligatures. */ if (start > 0 && isAlef(text.charAt(start)) && isLam(text.charAt(start - 1))) { start--; @@ -1988,14 +1988,14 @@ public void setStyle (TextStyle style, int start, int end) { modifyEnd++; } if (modifyStart == modifyEnd) { - int styleStart = styles[modifyStart].start; + int styleStart = styles[modifyStart].start; int styleEnd = styles[modifyEnd + 1].start - 1; if (styleStart == start && styleEnd == end) { styles[modifyStart].style = style; return; } if (styleStart != start && styleEnd != end) { - int newLength = stylesCount + 2; + int newLength = stylesCount + 2; if (newLength > styles.length) { int newSize = Math.min(newLength + 1024, Math.max(64, newLength * 2)); StyleItem[] newStyles = new StyleItem[newSize]; @@ -2006,7 +2006,7 @@ public void setStyle (TextStyle style, int start, int end) { StyleItem item = new StyleItem(); item.start = start; item.style = style; - styles[modifyStart + 1] = item; + styles[modifyStart + 1] = item; item = new StyleItem(); item.start = end + 1; item.style = styles[modifyStart].style; @@ -2037,9 +2037,9 @@ public void setStyle (TextStyle style, int start, int end) { * Sets the receiver's tab list. Each value in the tab list specifies * the space in pixels from the origin of the text layout to the respective * tab stop. The last tab stop width is repeated continuously. - * + * * @param tabs the new tab list - * + * * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> @@ -2067,11 +2067,11 @@ public void setTabs(int[] tabs) { } OS.pango_layout_set_tabs(layout, tabArray); OS.pango_tab_array_free(tabArray); - } + } } /* * Bug in Pango. A change in the tab stop array is not automatically reflected in the - * pango layout object because the call pango_layout_set_tabs() does not free the + * pango layout object because the call pango_layout_set_tabs() does not free the * lines cache. The fix to use pango_layout_context_changed() to free the lines cache. */ OS.pango_layout_context_changed(layout); @@ -2080,11 +2080,11 @@ public void setTabs(int[] tabs) { /** * Sets the receiver's text. *<p> - * Note: Setting the text also clears all the styles. This method - * returns without doing anything if the new text is the same as + * Note: Setting the text also clears all the styles. This method + * returns without doing anything if the new text is the same as * the current text. * </p> - * + * * @param text the new text * * @exception IllegalArgumentException <ul> @@ -2117,7 +2117,7 @@ public void setText (String text) { * </p> * * @param textDirection the new text direction - * + * * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> @@ -2132,7 +2132,7 @@ public void setTextDirection (int textDirection) { * text should be wrapped and aligned. The default value is * <code>-1</code> which means wrapping is disabled. * - * @param width the new width + * @param width the new width * * @exception IllegalArgumentException <ul> * <li>ERROR_INVALID_ARGUMENT - if the width is <code>0</code> or less than <code>-1</code></li> @@ -2140,7 +2140,7 @@ public void setTextDirection (int textDirection) { * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> - * + * * @see #setAlignment(int) */ public void setWidth (int width) { @@ -2165,16 +2165,16 @@ void setWidth () { /** * Sets the wrap indent of the receiver. This indent is applied to all lines - * in the paragraph except the first line. + * in the paragraph except the first line. * * @param wrapIndent new wrap indent - * + * * @exception SWTException <ul> * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> - * + * * @see #setIndent(int) - * + * * @since 3.6 */ public void setWrapIndent (int wrapIndent) { @@ -2227,7 +2227,7 @@ int translateOffset(int offset) { if (length == 0) return offset; if (invalidOffsets == null) return offset; for (int i = 0; i < invalidOffsets.length; i++) { - if (offset < invalidOffsets[i]) break; + if (offset < invalidOffsets[i]) break; offset++; } return offset; @@ -2249,10 +2249,10 @@ int untranslateOffset(int offset) { int width () { int wrapWidth = OS.pango_layout_get_width(layout); - if (wrapWidth != -1) return OS.PANGO_PIXELS(wrapWidth); + if (wrapWidth != -1) return OS.PANGO_PIXELS(wrapWidth); int[] w = new int[1], h = new int[1]; OS.pango_layout_get_pixel_size(layout, w, h); return w[0]; } -} +} diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/internal/Converter.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/internal/Converter.java index 4b8c089370..97c458c6c7 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/internal/Converter.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/internal/Converter.java @@ -57,7 +57,7 @@ public static byte [] wcsToMbcs (String codePage, String string, boolean termina public static byte [] wcsToMbcs (String codePage, char [] buffer, boolean terminate) { long /*int*/ [] items_read = new long /*int*/ [1], items_written = new long /*int*/ [1]; /* - * Note that g_utf16_to_utf8() stops converting + * Note that g_utf16_to_utf8() stops converting * when it finds the first NULL. */ long /*int*/ ptr = OS.g_utf16_to_utf8 (buffer, buffer.length, items_read, items_written, null); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/internal/ImageList.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/internal/ImageList.java index 39d0c33ae9..60c30d1bc3 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/internal/ImageList.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/internal/ImageList.java @@ -20,7 +20,7 @@ public class ImageList { long /*int*/ [] pixbufs; int width = -1, height = -1; Image [] images; - + public ImageList() { images = new Image [4]; pixbufs = new long /*int*/ [4]; @@ -228,7 +228,7 @@ public void put (int index, Image image) { if (image != null) { set (index, image); } else { - images [index] = null; + images [index] = null; if (pixbufs [index] != 0) OS.g_object_unref (pixbufs [index]); pixbufs [index] = 0; } @@ -269,7 +269,7 @@ void set (int index, Image image) { } } pixbufs [index] = pixbuf; - images [index] = image; + images [index] = image; } public int size () { 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 ae6de415d3..48e8e78417 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 @@ -50,7 +50,7 @@ Canvas () {} * <p> * The style value is either one of the style constants defined in * class <code>SWT</code> which is applicable to instances of this - * class, or must be built by <em>bitwise OR</em>'ing together + * class, or must be built by <em>bitwise OR</em>'ing together * (that is, using the <code>int</code> "|" operator) two or more * of those <code>SWT</code> style constants. The class description * lists the style constants that are applicable to the class. @@ -74,9 +74,9 @@ public Canvas (Composite parent, int style) { super (parent, checkStyle (style)); } -/** +/** * Fills the interior of the rectangle specified by the arguments, - * with the receiver's background. + * with the receiver's background. * * @param gc the gc where the rectangle is to be filled * @param x the x coordinate of the rectangle to be filled @@ -92,7 +92,7 @@ public Canvas (Composite parent, int style) { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 3.2 */ public void drawBackground (GC gc, int x, int y, int width, int height) { @@ -137,7 +137,7 @@ Point getIMCaretPos () { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 3.4 */ public IME getIME () { @@ -235,7 +235,7 @@ void reskinChildren (int flags) { } /** - * Scrolls a rectangular area of the receiver by first copying + * Scrolls a rectangular area of the receiver by first copying * the source area to the destination and then causing the area * of the source which is not covered by the destination to * be repainted. Children that intersect the rectangle are @@ -283,7 +283,7 @@ public void scroll (int destX, int destY, int x, int y, int width, int height, b srcRect.height = height; long /*int*/ copyRegion = OS.gdk_region_rectangle (srcRect); OS.gdk_region_intersect(copyRegion, visibleRegion); - long /*int*/ invalidateRegion = OS.gdk_region_rectangle (srcRect); + long /*int*/ invalidateRegion = OS.gdk_region_rectangle (srcRect); OS.gdk_region_subtract (invalidateRegion, visibleRegion); OS.gdk_region_offset (invalidateRegion, deltaX, deltaY); GdkRectangle copyRect = new GdkRectangle(); @@ -347,7 +347,7 @@ public void scroll (int destX, int destY, int x, int y, int width, int height, b rect.height = Math.abs(deltaY); OS.gdk_region_union_with_rect (invalidateRegion, rect); } - } + } OS.gdk_window_invalidate_region(window, invalidateRegion, all); } OS.gdk_region_destroy (visibleRegion); @@ -358,12 +358,12 @@ public void scroll (int destX, int destY, int x, int y, int width, int height, b for (int i=0; i<children.length; i++) { Control child = children [i]; Rectangle rect = child.getBounds (); - if (Math.min(x + width, rect.x + rect.width) >= Math.max (x, rect.x) && + if (Math.min(x + width, rect.x + rect.width) >= Math.max (x, rect.x) && Math.min(y + height, rect.y + rect.height) >= Math.max (y, rect.y)) { - child.setLocation (rect.x + deltaX, rect.y + deltaY); + child.setLocation (rect.x + deltaX, rect.y + deltaY); } } - } + } if (isFocus) caret.setFocus (); } @@ -419,7 +419,7 @@ public void setFont (Font font) { /** * Sets the receiver's IME. - * + * * @param ime the new IME for the receiver, may be null * * @exception IllegalArgumentException <ul> @@ -429,7 +429,7 @@ public void setFont (Font font) { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 3.4 */ public void setIME (IME ime) { @@ -437,7 +437,7 @@ public void setIME (IME ime) { if (ime != null && ime.isDisposed()) error(SWT.ERROR_INVALID_ARGUMENT); this.ime = ime; } - + void updateCaret () { long /*int*/ imHandle = imHandle (); if (imHandle == 0) return; diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Caret.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Caret.java index 2ff902c3ab..aca785f36a 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Caret.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Caret.java @@ -28,7 +28,7 @@ import org.eclipse.swt.graphics.*; * <p> * IMPORTANT: This class is <em>not</em> intended to be subclassed. * </p> - * + * * @see <a href="http://www.eclipse.org/swt/snippets/#caret">Caret snippets</a> * @see <a href="http://www.eclipse.org/swt/examples.php">SWT Example: ControlExample, Canvas tab</a> * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a> @@ -41,7 +41,7 @@ public class Caret extends Widget { int blinkRate; Image image; Font font; - + static final int DEFAULT_WIDTH = 1; /** @@ -50,7 +50,7 @@ public class Caret extends Widget { * <p> * The style value is either one of the style constants defined in * class <code>SWT</code> which is applicable to instances of this - * class, or must be built by <em>bitwise OR</em>'ing together + * class, or must be built by <em>bitwise OR</em>'ing together * (that is, using the <code>int</code> "|" operator) two or more * of those <code>SWT</code> style constants. The class description * lists the style constants that are applicable to the class. @@ -111,13 +111,13 @@ boolean drawCaret () { case Cairo.CAIRO_SURFACE_TYPE_IMAGE: nWidth = Cairo.cairo_image_surface_get_width(surface); break; - case Cairo.CAIRO_SURFACE_TYPE_XLIB: + case Cairo.CAIRO_SURFACE_TYPE_XLIB: nWidth = Cairo.cairo_xlib_surface_get_width(surface); break; } int nX = x; if ((parent.style & SWT.MIRRORED) != 0) nX = parent.getClientWidth () - nWidth - nX; - Cairo.cairo_translate(cairo, nX, y); + Cairo.cairo_translate(cairo, nX, y); Cairo.cairo_set_source_surface(cairo, image.surface, 0, 0); Cairo.cairo_paint(cairo); } else { @@ -343,7 +343,7 @@ void releaseWidget () { /** * Sets the receiver's size and location to the rectangular - * area specified by the arguments. The <code>x</code> and + * area specified by the arguments. The <code>x</code> and * <code>y</code> arguments are relative to the receiver's * parent (or its display if its parent is null). * @@ -370,7 +370,7 @@ public void setBounds (int x, int y, int width, int height) { /** * Sets the receiver's size and location to the rectangular - * area specified by the argument. The <code>x</code> and + * area specified by the argument. The <code>x</code> and * <code>y</code> fields of the rectangle are relative to * the receiver's parent (or its display if its parent is null). * @@ -402,7 +402,7 @@ void setFocus () { * * @exception IllegalArgumentException <ul> * <li>ERROR_INVALID_ARGUMENT - if the font has been disposed</li> - * </ul> + * </ul> * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> @@ -425,7 +425,7 @@ public void setFont (Font font) { * * @exception IllegalArgumentException <ul> * <li>ERROR_INVALID_ARGUMENT - if the image has been disposed</li> - * </ul> + * </ul> * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> @@ -515,7 +515,7 @@ public void setSize (Point size) { /** * Marks the receiver as visible if the argument is <code>true</code>, - * and marks it invisible otherwise. + * and marks it invisible otherwise. * <p> * If one of the receiver's ancestors is not visible or some * other condition makes the receiver not visible, marking 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 e93f163836..2a33189d8d 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 @@ -28,7 +28,7 @@ import org.eclipse.swt.graphics.*; * <p> * IMPORTANT: This class is <em>not</em> intended to be subclassed. * </p> - * + * * @see <a href="http://www.eclipse.org/swt/examples.php">SWT Example: ControlExample, Dialog tab</a> * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a> * @noextend This class is not intended to be subclassed by clients. @@ -62,7 +62,7 @@ public ColorDialog (Shell parent) { * <p> * The style value is either one of the style constants defined in * class <code>SWT</code> which is applicable to instances of this - * class, or must be built by <em>bitwise OR</em>'ing together + * class, or must be built by <em>bitwise OR</em>'ing together * (that is, using the <code>int</code> "|" operator) two or more * of those <code>SWT</code> style constants. The class description * lists the style constants that are applicable to the class. @@ -105,7 +105,7 @@ public RGB getRGB () { * if no custom colors were selected. * * @return the array of RGBs, which may be null - * + * * @since 3.8 */ public RGB[] getRGBs() { @@ -173,7 +173,7 @@ public RGB open () { OS.gtk_color_chooser_set_use_alpha (handle, false); OS.gtk_color_chooser_set_rgba (handle, rgba); } - + if (rgbs != null) { long /*int*/ colors = OS.g_malloc(GdkColor.sizeof * rgbs.length); for (int i=0; i<rgbs.length; i++) { @@ -216,7 +216,7 @@ public RGB open () { * This call to gdk_threads_leave() is a temporary work around * to avoid deadlocks when gdk_threads_init() is called by native * code outside of SWT (i.e AWT, etc). It ensures that the current - * thread leaves the GTK lock acquired by the function above. + * thread leaves the GTK lock acquired by the function above. */ OS.gdk_threads_leave(); display.sendPostExternalEventDispatchEvent (); @@ -226,7 +226,7 @@ public RGB open () { if (OS.gtk_window_get_modal (handle)) { display.setModalDialog (oldModal); } - boolean success = response == OS.GTK_RESPONSE_OK; + boolean success = response == OS.GTK_RESPONSE_OK; if (success) { int red = 0; int green = 0; @@ -297,7 +297,7 @@ public void setRGB (RGB rgb) { * @exception IllegalArgumentException <ul> * <li>ERROR_INVALID_ARGUMENT - if an RGB in the rgbs array is null</li> * </ul> - * + * * @since 3.8 */ public void setRGBs(RGB[] rgbs) { 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 56021160f1..29cee5bf25 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 @@ -19,7 +19,7 @@ import org.eclipse.swt.events.*; /** * Instances of this class are controls that allow the user - * to choose an item from a list of items, or optionally + * to choose an item from a list of items, or optionally * enter a new value by typing it into an editable text * field. Often, <code>Combo</code>s are used in the same place * where a single selection <code>List</code> widget could @@ -32,7 +32,7 @@ import org.eclipse.swt.events.*; * which access one versus the other (compare for example, * <code>clearSelection()</code> and <code>deselectAll()</code>). * The API documentation is careful to indicate either "the - * receiver's list" or the "the receiver's text field" to + * receiver's list" or the "the receiver's text field" to * distinguish between the two cases. * </p><p> * Note that although this class is a subclass of <code>Composite</code>, @@ -70,7 +70,7 @@ public class Combo extends Composite { * that the text field in an instance of this class can hold */ public final static int LIMIT; - + /* * These values can be different on different platforms. * Therefore they are not initialized in the declaration @@ -86,7 +86,7 @@ public class Combo extends Composite { * <p> * The style value is either one of the style constants defined in * class <code>SWT</code> which is applicable to instances of this - * class, or must be built by <em>bitwise OR</em>'ing together + * class, or must be built by <em>bitwise OR</em>'ing together * (that is, using the <code>int</code> "|" operator) two or more * of those <code>SWT</code> style constants. The class description * lists the style constants that are applicable to the class. @@ -176,7 +176,7 @@ public void add (String string, int index) { OS.gtk_combo_box_insert_text (handle, index, buffer); } if ((style & SWT.RIGHT_TO_LEFT) != 0 && popupHandle != 0) { - OS.gtk_container_forall (popupHandle, display.setDirectionProc, OS.GTK_TEXT_DIR_RTL); + OS.gtk_container_forall (popupHandle, display.setDirectionProc, OS.GTK_TEXT_DIR_RTL); } } @@ -210,11 +210,11 @@ public void addModifyListener (ModifyListener listener) { * Adds a segment listener. * <p> * A <code>SegmentEvent</code> is sent whenever text content is being modified or - * a segment listener is added or removed. You can + * a segment listener is added or removed. You can * customize the appearance of text by indicating certain characters to be inserted * at certain text offsets. This may be used for bidi purposes, e.g. when * adjacent segments of right-to-left text should not be reordered relative to - * each other. + * each other. * E.g., multiple Java string literals in a right-to-left language * should generally remain in logical order to each other, that is, the * way they are stored. @@ -296,7 +296,7 @@ public void addSelectionListener(SelectionListener listener) { * * @see VerifyListener * @see #removeVerifyListener - * + * * @since 3.1 */ public void addVerifyListener (VerifyListener listener) { @@ -320,7 +320,7 @@ static int checkStyle (int style) { * all platforms. */ style &= ~SWT.BORDER; - + /* * Even though it is legal to create this widget * with scroll bars, they serve no useful purpose @@ -345,7 +345,7 @@ protected void checkSubclass () { * text field is editable, this has the effect of placing the * i-beam at the start of the text. * <p> - * Note: To clear the selected items in the receiver's list, + * Note: To clear the selected items in the receiver's list, * use <code>deselectAll()</code>. * </p> * @@ -431,7 +431,7 @@ public Point computeSize (int wHint, int hHint, boolean changed) { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 2.1 */ public void copy () { @@ -445,7 +445,7 @@ void createHandle (int index) { fixedHandle = OS.g_object_new (display.gtk_fixed_get_type (), 0); if (fixedHandle == 0) error (SWT.ERROR_NO_HANDLES); gtk_widget_set_has_window (fixedHandle, true); - long /*int*/ oldList = OS.gtk_window_list_toplevels (); + long /*int*/ oldList = OS.gtk_window_list_toplevels (); if ((style & SWT.READ_ONLY) != 0) { if (OS.GTK3) { handle = OS.gtk_combo_box_text_new (); @@ -470,13 +470,13 @@ void createHandle (int index) { imContext = OS.imContextLast(); } } - popupHandle = findPopupHandle (oldList); + popupHandle = findPopupHandle (oldList); OS.gtk_container_add (fixedHandle, handle); textRenderer = OS.gtk_cell_renderer_text_new (); if (textRenderer == 0) error (SWT.ERROR_NO_HANDLES); /* * Feature in GTK. In order to make a read only combo box the same - * height as an editable combo box the ypad must be set to 0. In + * height as an editable combo box the ypad must be set to 0. In * versions 2.4.x of GTK, a pad of 0 will clip some letters. The * fix is to set the pad to 1. */ @@ -494,24 +494,24 @@ void createHandle (int index) { OS.gtk_cell_layout_pack_start (handle, textRenderer, true); OS.gtk_cell_layout_set_attributes (handle, textRenderer, OS.text, 0, 0); /* - * Feature in GTK. Toggle button creation differs between GTK versions. The - * fix is to call size_request() to force the creation of the button - * for those versions of GTK that defer the creation. + * Feature in GTK. Toggle button creation differs between GTK versions. The + * fix is to call size_request() to force the creation of the button + * for those versions of GTK that defer the creation. */ menuHandle = findMenuHandle (); if (menuHandle != 0) OS.g_object_ref (menuHandle); buttonHandle = findButtonHandle (); if (buttonHandle != 0) OS.g_object_ref (buttonHandle); /* - * Feature in GTK. By default, read only combo boxes - * process the RETURN key rather than allowing the + * Feature in GTK. By default, read only combo boxes + * process the RETURN key rather than allowing the * default button to process the key. The fix is to * clear the GTK_RECEIVES_DEFAULT flag. */ if ((style & SWT.READ_ONLY) != 0 && buttonHandle != 0) { gtk_widget_set_receives_default (buttonHandle, false); } - // In GTK 3 font description is inherited from parent widget which is not how SWT has always worked, + // In GTK 3 font description is inherited from parent widget which is not how SWT has always worked, // reset to default font to get the usual behavior if (OS.GTK3) { setFontDescription(defaultFont().handle); @@ -529,7 +529,7 @@ void createHandle (int index) { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 2.1 */ public void cut () { @@ -596,7 +596,7 @@ long /*int*/ findButtonHandle() { * Feature in GTK. There is no API to query the button * handle from a combo box although it is possible to get the * text field. The button handle is needed to hook events. The - * fix is to walk the combo tree and find the first child that is + * fix is to walk the combo tree and find the first child that is * an instance of button. */ long /*int*/ result = 0; @@ -635,7 +635,7 @@ long /*int*/ findMenuHandle() { } return result; } - + @Override void fixModal (long /*int*/ group, long /*int*/ modalGroup) { if (popupHandle != 0) { @@ -653,11 +653,11 @@ void fixIM () { /* * The IM filter has to be called one time for each key press event. * When the IM is open the key events are duplicated. The first event - * is filtered by SWT and the second event is filtered by GTK. In some - * cases the GTK handler does not run (the widget is destroyed, the + * is filtered by SWT and the second event is filtered by GTK. In some + * cases the GTK handler does not run (the widget is destroyed, the * application code consumes the event, etc), for these cases the IM * filter has to be called by SWT. - */ + */ if (gdkEventKey != 0 && gdkEventKey != -1) { long /*int*/ imContext = imContext (); if (imContext != 0) { @@ -745,12 +745,12 @@ void hookEvents(long /*int*/ [] handles) { } long /*int*/ imContext () { - if (imContext != 0) return imContext; + if (imContext != 0) return imContext; return entryHandle != 0 ? OS.GTK_ENTRY_IM_CONTEXT (entryHandle) : 0; } /** - * Deselects the item at the given zero-relative index in the receiver's + * Deselects the item at the given zero-relative index in the receiver's * list. If the item at the index was already deselected, it remains * deselected. Indices that are out of range are ignored. * @@ -836,7 +836,7 @@ GdkColor getBackgroundColor () { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 3.8 */ public Point getCaretLocation () { @@ -868,7 +868,7 @@ public Point getCaretLocation () { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 3.8 */ public int getCaretPosition () { @@ -942,11 +942,11 @@ public int getItemHeight () { /** * Returns a (possibly empty) array of <code>String</code>s which are - * the items in the receiver's list. + * the items in the receiver's list. * <p> * Note: This is not the actual structure used by the receiver * to maintain its list of items, so modifying the array will - * not affect the receiver. + * not affect the receiver. * </p> * * @return the items in the receiver's list @@ -979,12 +979,12 @@ public String [] getItems () { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 3.4 */ public boolean getListVisible () { checkWidget (); - return popupHandle != 0 && gtk_widget_get_visible (popupHandle); + return popupHandle != 0 && gtk_widget_get_visible (popupHandle); } @Override @@ -996,12 +996,12 @@ String getNameText () { * Returns the orientation of the receiver. * * @return the orientation style - * + * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 2.1.2 */ @Override @@ -1085,7 +1085,7 @@ public String getText () { OS.memmove (buffer, str, length); return new String (Converter.mbcsToWcs (null, buffer)); } else { - int index = OS.gtk_combo_box_get_active (handle); + int index = OS.gtk_combo_box_get_active (handle); return index != -1 ? getItem (index) : ""; } } @@ -1125,9 +1125,9 @@ public int getTextHeight () { * text field is capable of holding. If this has not been changed * by <code>setTextLimit()</code>, it will be the constant * <code>Combo.LIMIT</code>. - * + * * @return the text limit - * + * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> @@ -1155,7 +1155,7 @@ public int getTextLimit () { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 3.0 */ public int getVisibleItemCount () { @@ -1172,7 +1172,7 @@ long /*int*/ gtk_activate (long /*int*/ widget) { @Override long /*int*/ gtk_button_press_event (long /*int*/ widget, long /*int*/ event) { /* - * Feature in GTK. Depending on where the user clicks, GTK prevents + * Feature in GTK. Depending on where the user clicks, GTK prevents * the left mouse button event from being propagated. The fix is to * send the mouse event from the event_after handler. */ @@ -1197,8 +1197,8 @@ long /*int*/ gtk_changed (long /*int*/ widget) { * by selecting an item in the list, but the event should * only be sent when the list is selected. The fix is to * only send out a selection event when there is a selected - * item. - * + * item. + * * NOTE: This code relies on GTK clearing the selected * item and not matching the item as the user types. */ @@ -1302,16 +1302,16 @@ long /*int*/ gtk_delete_text (long /*int*/ widget, long /*int*/ start_pos, long @Override long /*int*/ gtk_event_after (long /*int*/ widget, long /*int*/ gdkEvent) { /* - * Feature in GTK. Depending on where the user clicks, GTK prevents + * Feature in GTK. Depending on where the user clicks, GTK prevents * the left mouse button event from being propagated. The fix is to * send the mouse event from the event_after handler. - * - * Feature in GTK. When the user clicks anywhere in an editable - * combo box, a single focus event should be issued, despite the + * + * Feature in GTK. When the user clicks anywhere in an editable + * combo box, a single focus event should be issued, despite the * fact that focus might switch between the drop down button and * the text field. The fix is to use gtk_combo_box_set_focus_on_click () - * to eat all focus events while focus is in the combo box. When the - * user clicks on the drop down button focus is assigned to the text + * to eat all focus events while focus is in the combo box. When the + * user clicks on the drop down button focus is assigned to the text * field. */ GdkEvent event = new GdkEvent (); @@ -1354,7 +1354,7 @@ long /*int*/ gtk_focus_out_event (long /*int*/ widget, long /*int*/ event) { @Override long /*int*/ gtk_insert_text (long /*int*/ widget, long /*int*/ new_text, long /*int*/ new_text_length, long /*int*/ position) { - if (!hooks (SWT.Verify) && !filters (SWT.Verify)) return 0; + if (!hooks (SWT.Verify) && !filters (SWT.Verify)) return 0; if (new_text == 0 || new_text_length == 0) return 0; byte [] buffer = new byte [(int)/*64*/new_text_length]; OS.memmove (buffer, new_text, buffer.length); @@ -1411,13 +1411,13 @@ long /*int*/ gtk_key_press_event (long /*int*/ widget, long /*int*/ event) { int key = keyEvent.keyval; switch (key) { case OS.GDK_Down: - case OS.GDK_KP_Down: + case OS.GDK_KP_Down: if (oldIndex != (items.length - 1)) { newIndex = oldIndex + 1; } break; case OS.GDK_Up: - case OS.GDK_KP_Up: + case OS.GDK_KP_Up: if (oldIndex != -1 && oldIndex != 0) { newIndex = oldIndex - 1; } @@ -1435,7 +1435,7 @@ long /*int*/ gtk_key_press_event (long /*int*/ widget, long /*int*/ event) { case OS.GDK_Page_Down: case OS.GDK_KP_Page_Down: newIndex = items.length - 1; - break; + break; } if (newIndex != oldIndex) { OS.gtk_combo_box_set_active (handle, newIndex); @@ -1475,7 +1475,7 @@ long /*int*/ gtk_style_set (long /*int*/ widget, long /*int*/ previousStyle) { /** * Searches the receiver's list starting at the first item - * (index 0) until an item is found that is equal to the + * (index 0) until an item is found that is equal to the * argument, and returns the index of that item. If no item * is found, returns -1. * @@ -1496,7 +1496,7 @@ public int indexOf (String string) { } /** - * Searches the receiver's list starting at the given, + * Searches the receiver's list starting at the given, * zero-relative index until an item is found that is equal * to the argument, and returns the index of that item. If * no item is found or the starting index is out of range, @@ -1533,7 +1533,7 @@ boolean isFocusHandle(long /*int*/ widget) { @Override long /*int*/ paintWindow () { - long /*int*/ childHandle = entryHandle != 0 ? entryHandle : handle; + long /*int*/ childHandle = entryHandle != 0 ? entryHandle : handle; OS.gtk_widget_realize (childHandle); long /*int*/ window = gtk_widget_get_window (childHandle); if ((style & SWT.READ_ONLY) != 0) return window; @@ -1554,7 +1554,7 @@ long /*int*/ paintWindow () { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 2.1 */ public void paste () { @@ -1631,7 +1631,7 @@ public void remove (int index) { /** * Removes the items from the receiver's list which are - * between the given zero-relative start and end + * between the given zero-relative start and end * indices (inclusive). * * @param start the start of the range @@ -1669,7 +1669,7 @@ public void remove (int start, int end) { /** * Searches the receiver's list starting at the first item - * until an item is found that is equal to the argument, + * until an item is found that is equal to the argument, * and removes that item from the list. * * @param string the item to remove @@ -1735,7 +1735,7 @@ public void removeModifyListener (ModifyListener listener) { checkWidget(); if (listener == null) error (SWT.ERROR_NULL_ARGUMENT); if (eventTable == null) return; - eventTable.unhook (SWT.Modify, listener); + eventTable.unhook (SWT.Modify, listener); } /** @@ -1755,7 +1755,7 @@ public void removeModifyListener (ModifyListener listener) { * @see SegmentEvent * @see SegmentListener * @see #addSegmentListener - * + * * @since 3.103 */ public void removeSegmentListener (SegmentListener listener) { @@ -1786,7 +1786,7 @@ public void removeSelectionListener (SelectionListener listener) { if (listener == null) error (SWT.ERROR_NULL_ARGUMENT); if (eventTable == null) return; eventTable.unhook (SWT.Selection, listener); - eventTable.unhook (SWT.DefaultSelection,listener); + eventTable.unhook (SWT.DefaultSelection,listener); } /** @@ -1805,18 +1805,18 @@ public void removeSelectionListener (SelectionListener listener) { * * @see VerifyListener * @see #addVerifyListener - * + * * @since 3.1 */ public void removeVerifyListener (VerifyListener listener) { checkWidget (); if (listener == null) error (SWT.ERROR_NULL_ARGUMENT); if (eventTable == null) return; - eventTable.unhook (SWT.Verify, listener); + eventTable.unhook (SWT.Verify, listener); } /** - * Selects the item at the given zero-relative index in the receiver's + * Selects the item at the given zero-relative index in the receiver's * list. If the item at the index was already selected, it remains * selected. Indices that are out of range are ignored. * @@ -1836,8 +1836,8 @@ public void select (int index) { OS.g_signal_handlers_unblock_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, CHANGED); if ((style & SWT.READ_ONLY) != 0 && selected != index) { /* - * Feature in GTK. Read Only combo boxes do not get a chance to send out a - * Modify event in the gtk_changed callback. The fix is to send a Modify event + * Feature in GTK. Read Only combo boxes do not get a chance to send out a + * Modify event in the gtk_changed callback. The fix is to send a Modify event * here. */ sendEvent (SWT.Modify); @@ -1956,7 +1956,7 @@ public void setItem (int index, String string) { OS.gtk_combo_box_insert_text (handle, index, buffer); } if ((style & SWT.RIGHT_TO_LEFT) != 0 && popupHandle != 0) { - OS.gtk_container_forall (popupHandle, display.setDirectionProc, OS.GTK_TEXT_DIR_RTL); + OS.gtk_container_forall (popupHandle, display.setDirectionProc, OS.GTK_TEXT_DIR_RTL); } } @@ -2000,7 +2000,7 @@ public void setItems (String [] items) { OS.gtk_combo_box_insert_text (handle, i, buffer); } if ((style & SWT.RIGHT_TO_LEFT) != 0 && popupHandle != 0) { - OS.gtk_container_forall (popupHandle, display.setDirectionProc, OS.GTK_TEXT_DIR_RTL); + OS.gtk_container_forall (popupHandle, display.setDirectionProc, OS.GTK_TEXT_DIR_RTL); } } } @@ -2020,7 +2020,7 @@ public void setItems (String [] items) { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 3.4 */ public void setListVisible (boolean visible) { @@ -2051,12 +2051,12 @@ void setOrientation (boolean create) { * <p> * * @param orientation new orientation style - * + * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 2.1.2 */ @Override @@ -2068,7 +2068,7 @@ public void setOrientation (int orientation) { * Sets the selection in the receiver's text field to the * range specified by the argument whose x coordinate is the * start of the selection and whose y coordinate is the end - * of the selection. + * of the selection. * * @param selection a point representing the new selection start and end * @@ -2097,14 +2097,14 @@ public void setSelection (Point selection) { * Sets the contents of the receiver's text field to the * given string. * <p> - * This call is ignored when the receiver is read only and + * This call is ignored when the receiver is read only and * the given string is not in the receiver's list. * </p> * <p> * Note: The text field in a <code>Combo</code> is typically * only capable of displaying a single line of text. Thus, * setting the text to a string containing line breaks or - * other special characters will probably cause it to + * other special characters will probably cause it to * display incorrectly. * </p> * @@ -2128,9 +2128,9 @@ public void setText (String string) { return; } /* - * Feature in gtk. When text is set in gtk, separate events are fired for the deletion and + * Feature in gtk. When text is set in gtk, separate events are fired for the deletion and * insertion of the text. This is not wrong, but is inconsistent with other platforms. The - * fix is to block the firing of these events and fire them ourselves in a consistent manner. + * fix is to block the firing of these events and fire them ourselves in a consistent manner. */ if (hooks (SWT.Verify) || filters (SWT.Verify)) { long /*int*/ ptr = OS.gtk_entry_get_text (entryHandle); @@ -2167,7 +2167,7 @@ public void setText (String string) { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @see #LIMIT */ public void setTextLimit (int limit) { @@ -2196,7 +2196,7 @@ void setToolTipText (Shell shell, String newString) { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 3.0 */ public void setVisibleItemCount (int count) { @@ -2216,7 +2216,7 @@ boolean translateTraversal (GdkEventKey keyEvent) { switch (key) { case OS.GDK_KP_Enter: case OS.GDK_Return: { - long /*int*/ imContext = imContext (); + long /*int*/ imContext = imContext (); if (imContext != 0) { long /*int*/ [] preeditString = new long /*int*/ [1]; OS.gtk_im_context_get_preedit_string (imContext, preeditString, null, null); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Composite.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Composite.java index ec34d3be86..2762d5b933 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Composite.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Composite.java @@ -48,7 +48,7 @@ import org.eclipse.swt.graphics.*; */ public class Composite extends Scrollable { /** - * the handle to the OS resource + * the handle to the OS resource * (Warning: This field is platform dependent) * <p> * <b>IMPORTANT:</b> This field is <em>not</em> part of the SWT @@ -56,7 +56,7 @@ public class Composite extends Scrollable { * within the packages provided by SWT. It is not available on all * platforms and should never be accessed from application code. * </p> - * + * * @noreference This field is not intended to be referenced by clients. */ public long /*int*/ embeddedHandle; @@ -77,7 +77,7 @@ Composite () { * <p> * The style value is either one of the style constants defined in * class <code>SWT</code> which is applicable to instances of this - * class, or must be built by <em>bitwise OR</em>'ing together + * class, or must be built by <em>bitwise OR</em>'ing together * (that is, using the <code>int</code> "|" operator) two or more * of those <code>SWT</code> style constants. The class description * lists the style constants that are applicable to the class. @@ -161,14 +161,14 @@ Control [] _getTabList () { } /** - * Clears any data that has been cached by a Layout for all widgets that - * are in the parent hierarchy of the changed control up to and including the + * Clears any data that has been cached by a Layout for all widgets that + * are in the parent hierarchy of the changed control up to and including the * receiver. If an ancestor does not have a layout, it is skipped. - * + * * @param changed an array of controls that changed state and require a recalculation of size - * + * * @exception IllegalArgumentException <ul> - * <li>ERROR_INVALID_ARGUMENT - if the changed array is null any of its controls are null or have been disposed</li> + * <li>ERROR_INVALID_ARGUMENT - if the changed array is null any of its controls are null or have been disposed</li> * <li>ERROR_INVALID_PARENT - if any control in changed is not in the widget tree of the receiver</li> * </ul> * @exception SWTException <ul> @@ -316,7 +316,7 @@ void createHandle (int index, boolean fixed, boolean scrolled) { display.setWarnings (false); OS.gtk_container_add (scrolledHandle, handle); display.setWarnings (warnings); - + int hsp = (style & SWT.H_SCROLL) != 0 ? OS.GTK_POLICY_ALWAYS : OS.GTK_POLICY_NEVER; int vsp = (style & SWT.V_SCROLL) != 0 ? OS.GTK_POLICY_ALWAYS : OS.GTK_POLICY_NEVER; OS.gtk_scrolled_window_set_policy (scrolledHandle, hsp, vsp); @@ -352,20 +352,20 @@ void deregister () { if (socketHandle != 0) display.removeWidget (socketHandle); } -/** +/** * Fills the interior of the rectangle specified by the arguments, - * with the receiver's background. + * with the receiver's background. * * <p>The <code>offsetX</code> and <code>offsetY</code> are used to map from * the <code>gc</code> origin to the origin of the parent image background. This is useful * to ensure proper alignment of the image background.</p> - * + * * @param gc the gc where the rectangle is to be filled * @param x the x coordinate of the rectangle to be filled * @param y the y coordinate of the rectangle to be filled * @param width the width of the rectangle to be filled * @param height the height of the rectangle to be filled - * @param offsetX the image background x offset + * @param offsetX the image background x offset * @param offsetY the image background y offset * * @exception IllegalArgumentException <ul> @@ -376,7 +376,7 @@ void deregister () { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 3.6 */ public void drawBackground (GC gc, int x, int y, int width, int height, int offsetX, int offsetY) { @@ -402,7 +402,7 @@ public void drawBackground (GC gc, int x, int y, int width, int height, int offs if (OS.GDK_WINDOWING_X11 () && !OS.GDK_WINDOWING_WAYLAND ()) { long /*int*/ xDisplay = OS.gdk_x11_display_get_xdisplay(OS.gdk_display_get_default()); long /*int*/ xVisual = OS.gdk_x11_visual_get_xvisual (OS.gdk_visual_get_system()); - long /*int*/ xDrawable = OS.GDK_PIXMAP_XID (drawable); + long /*int*/ xDrawable = OS.GDK_PIXMAP_XID (drawable); surface = Cairo.cairo_xlib_surface_create (xDisplay, xDrawable, xVisual, w [0], h [0]); } else { surface = Cairo.cairo_image_surface_create(Cairo.CAIRO_FORMAT_ARGB32, w [0], h [0]); @@ -424,7 +424,7 @@ public void drawBackground (GC gc, int x, int y, int width, int height, int offs } else { GdkColor color = control.getBackgroundColor (); Cairo.cairo_set_source_rgba (cairo, (color.red & 0xFFFF) / (float)0xFFFF, (color.green & 0xFFFF) / (float)0xFFFF, (color.blue & 0xFFFF) / (float)0xFFFF, data.alpha / (float)0xFF); - } + } Cairo.cairo_rectangle (cairo, x, y, width, height); Cairo.cairo_fill (cairo); Cairo.cairo_restore (cairo); @@ -581,7 +581,7 @@ boolean forceFocus (long /*int*/ focusHandle) { * </ul> * * @see SWT - * + * * @since 3.2 */ public int getBackgroundMode () { @@ -597,11 +597,11 @@ public int getBackgroundMode () { * <p> * Note: This is not the actual structure used by the receiver * to maintain its list of children, so modifying the array will - * not affect the receiver. + * not affect the receiver. * </p> * * @return an array of children - * + * * @see Control#moveAbove * @see Control#moveBelow * @@ -671,7 +671,7 @@ public Layout getLayout () { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @see #setLayoutDeferred(boolean) * @see #isLayoutDeferred() * @@ -691,7 +691,7 @@ public boolean getLayoutDeferred () { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @see #setTabList */ public Control [] getTabList () { @@ -763,7 +763,7 @@ long /*int*/ gtk_expose_event (long /*int*/ widget, long /*int*/ eventPtr) { gc.dispose (); OS.gdk_region_destroy (damageRgn); event.gc = null; - } + } OS.g_free (rectangles [0]); return 0; } @@ -811,7 +811,7 @@ long /*int*/ gtk_focus_out_event (long /*int*/ widget, long /*int*/ event) { @Override long /*int*/ gtk_map (long /*int*/ widget) { fixZOrder (); - return 0; + return 0; } @Override @@ -869,7 +869,7 @@ long /*int*/ imHandle () { } /** - * Returns <code>true</code> if the receiver or any ancestor + * Returns <code>true</code> if the receiver or any ancestor * up to and including the receiver's nearest ancestor shell * has deferred the performing of layouts. Otherwise, <code>false</code> * is returned. @@ -880,10 +880,10 @@ long /*int*/ imHandle () { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @see #setLayoutDeferred(boolean) * @see #getLayoutDeferred() - * + * * @since 3.1 */ public boolean isLayoutDeferred () { @@ -899,7 +899,7 @@ boolean isTabGroup() { /** * If the receiver has a layout, asks the layout to <em>lay out</em> - * (that is, set the size and location of) the receiver's children. + * (that is, set the size and location of) the receiver's children. * If the receiver does not have a layout, do nothing. * <p> * This is equivalent to calling <code>layout(true)</code>. @@ -910,7 +910,7 @@ boolean isTabGroup() { * exposed, then the parent will paint. If no child is * affected, the parent will not paint. * </p> - * + * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> @@ -923,19 +923,19 @@ public void layout () { /** * If the receiver has a layout, asks the layout to <em>lay out</em> - * (that is, set the size and location of) the receiver's children. + * (that is, set the size and location of) the receiver's children. * If the argument is <code>true</code> the layout must not rely * on any information it has cached about the immediate children. If it * is <code>false</code> the layout may (potentially) optimize the - * work it is doing by assuming that none of the receiver's + * work it is doing by assuming that none of the receiver's * children has changed state since the last layout. * If the receiver does not have a layout, do nothing. * <p> - * If a child is resized as a result of a call to layout, the + * If a child is resized as a result of a call to layout, the * resize event will invoke the layout of the child. The layout - * will cascade down through all child widgets in the receiver's widget - * tree until a child is encountered that does not resize. Note that - * a layout due to a resize will not flush any cached information + * will cascade down through all child widgets in the receiver's widget + * tree until a child is encountered that does not resize. Note that + * a layout due to a resize will not flush any cached information * (same as <code>layout(false)</code>). * </p> * <p> @@ -960,20 +960,20 @@ public void layout (boolean changed) { /** * If the receiver has a layout, asks the layout to <em>lay out</em> - * (that is, set the size and location of) the receiver's children. + * (that is, set the size and location of) the receiver's children. * If the changed argument is <code>true</code> the layout must not rely * on any information it has cached about its children. If it * is <code>false</code> the layout may (potentially) optimize the - * work it is doing by assuming that none of the receiver's + * work it is doing by assuming that none of the receiver's * children has changed state since the last layout. * If the all argument is <code>true</code> the layout will cascade down * through all child widgets in the receiver's widget tree, regardless of - * whether the child has changed size. The changed argument is applied to + * whether the child has changed size. The changed argument is applied to * all layouts. If the all argument is <code>false</code>, the layout will - * <em>not</em> cascade down through all child widgets in the receiver's widget - * tree. However, if a child is resized as a result of a call to layout, the - * resize event will invoke the layout of the child. Note that - * a layout due to a resize will not flush any cached information + * <em>not</em> cascade down through all child widgets in the receiver's widget + * tree. However, if a child is resized as a result of a call to layout, the + * resize event will invoke the layout of the child. Note that + * a layout due to a resize will not flush any cached information * (same as <code>layout(false)</code>). * </p> * <p> @@ -1001,11 +1001,11 @@ public void layout (boolean changed, boolean all) { } /** - * Forces a lay out (that is, sets the size and location) of all widgets that - * are in the parent hierarchy of the changed control up to and including the - * receiver. The layouts in the hierarchy must not rely on any information - * cached about the changed control or any of its ancestors. The layout may - * (potentially) optimize the work it is doing by assuming that none of the + * Forces a lay out (that is, sets the size and location) of all widgets that + * are in the parent hierarchy of the changed control up to and including the + * receiver. The layouts in the hierarchy must not rely on any information + * cached about the changed control or any of its ancestors. The layout may + * (potentially) optimize the work it is doing by assuming that none of the * peers of the changed control have changed state since the last layout. * If an ancestor does not have a layout, skip it. * <p> @@ -1014,11 +1014,11 @@ public void layout (boolean changed, boolean all) { * exposed, then the parent will paint. If no child is * affected, the parent will not paint. * </p> - * + * * @param changed a control that has had a state change which requires a recalculation of its size - * + * * @exception IllegalArgumentException <ul> - * <li>ERROR_INVALID_ARGUMENT - if the changed array is null any of its controls are null or have been disposed</li> + * <li>ERROR_INVALID_ARGUMENT - if the changed array is null any of its controls are null or have been disposed</li> * <li>ERROR_INVALID_PARENT - if any control in changed is not in the widget tree of the receiver</li> * </ul> * @exception SWTException <ul> @@ -1035,9 +1035,9 @@ public void layout (Control [] changed) { } /** - * Forces a lay out (that is, sets the size and location) of all widgets that - * are in the parent hierarchy of the changed control up to and including the - * receiver. + * Forces a lay out (that is, sets the size and location) of all widgets that + * are in the parent hierarchy of the changed control up to and including the + * receiver. * <p> * The parameter <code>flags</code> may be a combination of: * <dl> @@ -1051,7 +1051,7 @@ public void layout (Control [] changed) { * </p> * <p> * When the <code>changed</code> array is specified, the flags <code>SWT.ALL</code> - * and <code>SWT.CHANGED</code> have no effect. In this case, the layouts in the + * and <code>SWT.CHANGED</code> have no effect. In this case, the layouts in the * hierarchy must not rely on any information cached about the changed control or * any of its ancestors. The layout may (potentially) optimize the * work it is doing by assuming that none of the peers of the changed @@ -1062,7 +1062,7 @@ public void layout (Control [] changed) { * When the <code>changed</code> array is not specified, the flag <code>SWT.ALL</code> * indicates that the whole widget tree should be laid out. And the flag * <code>SWT.CHANGED</code> indicates that the layouts should flush any cached - * information for all controls that are laid out. + * information for all controls that are laid out. * </p> * <p> * The <code>SWT.DEFER</code> flag always causes the layout to be deferred by @@ -1077,12 +1077,12 @@ public void layout (Control [] changed) { * exposed, then the parent will paint. If no child is * affected, the parent will not paint. * </p> - * + * * @param changed a control that has had a state change which requires a recalculation of its size * @param flags the flags specifying how the layout should happen - * + * * @exception IllegalArgumentException <ul> - * <li>ERROR_INVALID_ARGUMENT - if any of the controls in changed is null or has been disposed</li> + * <li>ERROR_INVALID_ARGUMENT - if any of the controls in changed is null or has been disposed</li> * <li>ERROR_INVALID_PARENT - if any control in changed is not in the widget tree of the receiver</li> * </ul> * @exception SWTException <ul> @@ -1258,7 +1258,7 @@ void moveChildren(int oldWidth) { int x = allocation.x; int y = allocation.y; int controlWidth = (child.state & ZERO_WIDTH) != 0 ? 0 : allocation.width; - if (oldWidth > 0) x = oldWidth - controlWidth - x; + if (oldWidth > 0) x = oldWidth - controlWidth - x; int clientWidth = getClientWidth (); x = clientWidth - controlWidth - x; if (child.enableWindow != 0) { @@ -1414,7 +1414,7 @@ void resizeHandle (int width, int height) { * </ul> * * @see SWT - * + * * @since 3.2 */ public void setBackgroundMode (int mode) { @@ -1469,7 +1469,7 @@ public void setLayout (Layout layout) { * No layout of any kind can occur in the receiver or any of its * children until the flag is set to false. * Layout operations that occurred while the flag was - * <code>true</code> are remembered and when the flag is set to + * <code>true</code> are remembered and when the flag is set to * <code>false</code>, the layout operations are performed in an * optimized manner. Nested calls to this method are stacked. * @@ -1479,7 +1479,7 @@ public void setLayout (Layout layout) { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @see #layout(boolean) * @see #layout(Control[]) * @@ -1503,7 +1503,7 @@ void setOrientation (boolean create) { super.setOrientation (create); if (!create) { int flags = SWT.RIGHT_TO_LEFT | SWT.LEFT_TO_RIGHT; - int orientation = style & flags; + int orientation = style & flags; Control [] children = _getChildren (); for (int i=0; i<children.length; i++) { children[i].setOrientation (orientation); @@ -1558,7 +1558,7 @@ boolean setTabItemFocus (boolean next) { * @param tabList the ordered list of controls representing the tab order or null * * @exception IllegalArgumentException <ul> - * <li>ERROR_INVALID_ARGUMENT - if a widget in the tabList is null or has been disposed</li> + * <li>ERROR_INVALID_ARGUMENT - if a widget in the tabList is null or has been disposed</li> * <li>ERROR_INVALID_PARENT - if widget in the tabList is not in the same widget tree</li> * </ul> * @exception SWTException <ul> @@ -1578,7 +1578,7 @@ public void setTabList (Control [] tabList) { Control [] newList = new Control [tabList.length]; System.arraycopy (tabList, 0, newList, 0, tabList.length); tabList = newList; - } + } this.tabList = tabList; } 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 da203291f6..66cb8d5c9d 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 @@ -37,7 +37,7 @@ import org.eclipse.swt.internal.gtk.*; * IMPORTANT: This class is intended to be subclassed <em>only</em> * within the SWT implementation. * </p> - * + * * @see <a href="http://www.eclipse.org/swt/snippets/#control">Control snippets</a> * @see <a href="http://www.eclipse.org/swt/examples.php">SWT Example: ControlExample</a> * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a> @@ -67,7 +67,7 @@ Control () { * <p> * The style value is either one of the style constants defined in * class <code>SWT</code> which is applicable to instances of this - * class, or must be built by <em>bitwise OR</em>'ing together + * class, or must be built by <em>bitwise OR</em>'ing together * (that is, using the <code>int</code> "|" operator) two or more * of those <code>SWT</code> style constants. The class description * lists the style constants that are applicable to the class. @@ -227,7 +227,7 @@ void fixStyle (long /*int*/ handle) { * have their own GtkFixed. The fix is to look up the correct style * for a child of a GtkNotebook and apply its background to any GtkFixed * widgets that are direct children of an SWT TabFolder. - * + * * Note that this has to be when the theme settings changes and that it * should not override the application background. */ @@ -256,12 +256,12 @@ long /*int*/ fontHandle () { * constants <code>SWT.LEFT_TO_RIGHT</code> or <code>SWT.RIGHT_TO_LEFT</code>. * * @return the orientation style - * + * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 3.7 */ public int getOrientation () { @@ -274,12 +274,12 @@ public int getOrientation () { * constants <code>SWT.LEFT_TO_RIGHT</code> or <code>SWT.RIGHT_TO_LEFT</code>. * * @return the text direction style - * + * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 3.102 */ public int getTextDirection() { @@ -314,7 +314,7 @@ void hookEvents () { OS.g_signal_connect_closure_by_id (eventHandle, display.signalIds [BUTTON_RELEASE_EVENT], 0, display.getClosure (BUTTON_RELEASE_EVENT), false); OS.g_signal_connect_closure_by_id (eventHandle, display.signalIds [MOTION_NOTIFY_EVENT], 0, display.getClosure (MOTION_NOTIFY_EVENT), false); OS.g_signal_connect_closure_by_id (eventHandle, display.signalIds [SCROLL_EVENT], 0, display.getClosure (SCROLL_EVENT), false); - + /* Connect enter/exit signals */ long /*int*/ enterExitHandle = enterExitHandle (); int enterExitMask = OS.GDK_ENTER_NOTIFY_MASK | OS.GDK_LEAVE_NOTIFY_MASK; @@ -328,7 +328,7 @@ void hookEvents () { * correct GTK behavior but not correct for SWT. The fix is to * hook a signal after and stop the propagation using a negative * event number to distinguish this case. - * + * * The signal is hooked to the fixedHandle to catch events sent to * lightweight widgets. */ @@ -342,7 +342,7 @@ void hookEvents () { if (focusHandle != eventHandle) { OS.g_signal_connect_closure_by_id (focusHandle, display.signalIds [EVENT_AFTER], 0, display.getClosure (EVENT_AFTER), false); } - + /* Connect the paint signal */ long /*int*/ paintHandle = paintHandle (); int paintMask = OS.GDK_EXPOSURE_MASK | OS.GDK_VISIBILITY_NOTIFY_MASK; @@ -351,7 +351,7 @@ void hookEvents () { OS.g_signal_connect_closure_by_id (paintHandle, display.signalIds [EXPOSE_EVENT], 0, display.getClosure (EXPOSE_EVENT_INVERSE), false); /* - * As of GTK 2.17.11, obscured controls no longer send expose + * As of GTK 2.17.11, obscured controls no longer send expose * events. It is no longer necessary to track visiblity notify * events. */ @@ -368,9 +368,9 @@ void hookEvents () { OS.g_signal_connect_closure (imHandle, OS.commit, display.getClosure (COMMIT), false); OS.g_signal_connect_closure (imHandle, OS.preedit_changed, display.getClosure (PREEDIT_CHANGED), false); } - + OS.g_signal_connect_closure_by_id (paintHandle, display.signalIds [STYLE_SET], 0, display.getClosure (STYLE_SET), false); - + long /*int*/ topHandle = topHandle (); OS.g_signal_connect_closure_by_id (topHandle, display.signalIds [MAP], 0, display.getClosure (MAP), true); } @@ -413,7 +413,7 @@ long /*int*/ paintWindow () { /** * Prints the receiver and all children. - * + * * @param gc the gc where the drawing occurs * @return <code>true</code> if the operation was successful and <code>false</code> otherwise * @@ -425,7 +425,7 @@ long /*int*/ paintWindow () { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 3.4 */ public boolean print (GC gc) { @@ -466,7 +466,7 @@ void printWindow (boolean first, Control control, GC gc, long /*int*/ drawable, OS.gdk_window_begin_paint_rect (window, rect); long /*int*/ [] real_drawable = new long /*int*/ [1]; int [] x_offset = new int [1], y_offset = new int [1]; - OS.gdk_window_get_internal_paint_info (window, real_drawable, x_offset, y_offset); + OS.gdk_window_get_internal_paint_info (window, real_drawable, x_offset, y_offset); long /*int*/ [] userData = new long /*int*/ [1]; OS.gdk_window_get_user_data (window, userData); if (userData [0] != 0) { @@ -554,8 +554,8 @@ void printWindow (boolean first, Control control, GC gc, long /*int*/ drawable, * best be displayed at. The width hint and height hint arguments * allow the caller to ask a control questions such as "Given a particular * width, how high does the control need to be to show all of the contents?" - * To indicate that the caller does not wish to constrain a particular - * dimension, the constant <code>SWT.DEFAULT</code> is passed for the hint. + * To indicate that the caller does not wish to constrain a particular + * dimension, the constant <code>SWT.DEFAULT</code> is passed for the hint. * </p> * * @param wHint the width hint (can be <code>SWT.DEFAULT</code>) @@ -631,7 +631,7 @@ void checkBackground () { state |= PARENT_BACKGROUND; return; } - if (composite == shell) break; + if (composite == shell) break; composite = composite.parent; } while (true); } @@ -683,14 +683,14 @@ void createWidget (int index) { * best be displayed at. The width hint and height hint arguments * allow the caller to ask a control questions such as "Given a particular * width, how high does the control need to be to show all of the contents?" - * To indicate that the caller does not wish to constrain a particular - * dimension, the constant <code>SWT.DEFAULT</code> is passed for the hint. + * To indicate that the caller does not wish to constrain a particular + * dimension, the constant <code>SWT.DEFAULT</code> is passed for the hint. * </p><p> * If the changed flag is <code>true</code>, it indicates that the receiver's * <em>contents</em> have changed, therefore any caches that a layout manager * containing the control may have been keeping need to be flushed. When the * control is resized, the changed flag will be <code>false</code>, so layout - * manager caches can be retained. + * manager caches can be retained. * </p> * * @param wHint the width hint (can be <code>SWT.DEFAULT</code>) @@ -714,7 +714,7 @@ public Point computeSize (int wHint, int hHint, boolean changed) { checkWidget(); if (wHint != SWT.DEFAULT && wHint < 0) wHint = 0; if (hHint != SWT.DEFAULT && hHint < 0) hHint = 0; - return computeNativeSize (handle, wHint, hHint, changed); + return computeNativeSize (handle, wHint, hHint, changed); } Point computeNativeSize (long /*int*/ h, int wHint, int hHint, boolean changed) { @@ -783,10 +783,10 @@ void forceResize () { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @see Accessible#addAccessibleListener * @see Accessible#addAccessibleControlListener - * + * * @since 2.0 */ public Accessible getAccessible () { @@ -829,7 +829,7 @@ public Rectangle getBounds () { /** * Sets the receiver's size and location to the rectangular - * area specified by the argument. The <code>x</code> and + * area specified by the argument. The <code>x</code> and * <code>y</code> fields of the rectangle are relative to * the receiver's parent (or its display if its parent is null). * <p> @@ -853,9 +853,9 @@ public void setBounds (Rectangle rect) { /** * Sets the receiver's size and location to the rectangular - * area specified by the arguments. The <code>x</code> and + * area specified by the arguments. The <code>x</code> and * <code>y</code> arguments are relative to the receiver's - * parent (or its display if its parent is null), unless + * parent (or its display if its parent is null), unless * the receiver is a shell. In this case, the <code>x</code> * and <code>y</code> arguments are relative to the display. * <p> @@ -887,8 +887,8 @@ void markLayout (boolean changed, boolean all) { void modifyStyle (long /*int*/ handle, long /*int*/ style) { super.modifyStyle(handle, style); /* - * Bug in GTK. When changing the style of a control that - * has had a region set on it, the region is lost. The + * Bug in GTK. When changing the style of a control that + * has had a region set on it, the region is lost. The * fix is to set the region again. */ if (region != null) OS.gdk_window_shape_combine_region (gtk_widget_get_window (topHandle ()), region.handle, 0, 0); @@ -904,10 +904,10 @@ void moveHandle (int x, int y) { * Feature in GTK. Calling gtk_fixed_move() to move a child causes * the whole parent to redraw. This is a performance problem. The * fix is temporarily mark the parent not visible during the move. - * + * * NOTE: Because every widget in SWT has an X window, the new and * old bounds of the child are correctly redrawn. - * + * * NOTE: There is no API in GTK 3 to only set the GTK_VISIBLE bit. */ boolean reset = gtk_widget_get_visible (parentHandle); @@ -1048,8 +1048,8 @@ int setBounds (int x, int y, int width, int height, boolean move, boolean resize /** * Returns a point describing the receiver's location relative * to its parent (or its display if its parent is null), unless - * the receiver is a shell. In this case, the point is - * relative to the display. + * the receiver is a shell. In this case, the point is + * relative to the display. * * @return the receiver's location * @@ -1075,9 +1075,9 @@ public Point getLocation () { /** * Sets the receiver's location to the point specified by * the arguments which are relative to the receiver's - * parent (or its display if its parent is null), unless - * the receiver is a shell. In this case, the point is - * relative to the display. + * parent (or its display if its parent is null), unless + * the receiver is a shell. In this case, the point is + * relative to the display. * * @param location the new location for the receiver * @@ -1095,9 +1095,9 @@ public void setLocation (Point location) { /** * Sets the receiver's location to the point specified by * the arguments which are relative to the receiver's - * parent (or its display if its parent is null), unless - * the receiver is a shell. In this case, the point is - * relative to the display. + * parent (or its display if its parent is null), unless + * the receiver is a shell. In this case, the point is + * relative to the display. * * @param x the new x coordinate for the receiver * @param y the new y coordinate for the receiver @@ -1168,7 +1168,7 @@ public void setSize (Point size) { * * @exception IllegalArgumentException <ul> * <li>ERROR_INVALID_ARGUMENT - if the region has been disposed</li> - * </ul> + * </ul> * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> @@ -1245,7 +1245,7 @@ boolean isDescribedByLabel () { } boolean isFocusHandle (long /*int*/ widget) { - return widget == focusHandle (); + return widget == focusHandle (); } /** @@ -1258,13 +1258,13 @@ boolean isFocusHandle (long /*int*/ widget) { * @param control the sibling control (or null) * * @exception IllegalArgumentException <ul> - * <li>ERROR_INVALID_ARGUMENT - if the control has been disposed</li> + * <li>ERROR_INVALID_ARGUMENT - if the control has been disposed</li> * </ul> * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @see Control#moveBelow * @see Composite#getChildren */ @@ -1288,13 +1288,13 @@ public void moveAbove (Control control) { * @param control the sibling control (or null) * * @exception IllegalArgumentException <ul> - * <li>ERROR_INVALID_ARGUMENT - if the control has been disposed</li> + * <li>ERROR_INVALID_ARGUMENT - if the control has been disposed</li> * </ul> * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @see Control#moveAbove * @see Composite#getChildren */ @@ -1336,11 +1336,11 @@ public void pack () { * <em>contents</em> have changed, therefore any caches that a layout manager * containing the control may have been keeping need to be flushed. When the * control is resized, the changed flag will be <code>false</code>, so layout - * manager caches can be retained. + * manager caches can be retained. * </p> * * @param changed whether or not the receiver's contents have changed - * + * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> @@ -1354,9 +1354,9 @@ public void pack (boolean changed) { /** * Sets the layout data associated with the receiver to the argument. - * + * * @param layoutData the new layout data for the receiver. - * + * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> @@ -1380,7 +1380,7 @@ public void setLayoutData (Object layoutData) { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 2.1 */ public Point toControl (int x, int y) { @@ -1429,7 +1429,7 @@ public Point toControl (Point point) { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 2.1 */ public Point toDisplay (int x, int y) { @@ -1464,7 +1464,7 @@ public Point toDisplay (Point point) { if (point == null) error (SWT.ERROR_NULL_ARGUMENT); return toDisplay (point.x, point.y); } - + /** * Adds the listener to the collection of listeners who will * be notified when the control is moved or resized, by sending @@ -1510,7 +1510,7 @@ public void addControlListener(ControlListener listener) { * * @see DragDetectListener * @see #removeDragDetectListener - * + * * @since 3.3 */ public void addDragDetectListener (DragDetectListener listener) { @@ -1558,7 +1558,7 @@ public void addFocusListener(FocusListener listener) { * must be invoked on it to specify that gesture events should be * sent instead of touch events. * </p> - * + * * @param listener the listener which should be notified * * @exception IllegalArgumentException <ul> @@ -1572,7 +1572,7 @@ public void addFocusListener(FocusListener listener) { * @see GestureListener * @see #removeGestureListener * @see #setTouchEnabled - * + * * @since 3.7 */ public void addGestureListener (GestureListener listener) { @@ -1819,11 +1819,11 @@ void addRelation (Control control) { * one of the messages defined in the <code>TouchListener</code> * interface. * <p> - * NOTE: You must also call <code>setTouchEnabled(true)</code> to + * NOTE: You must also call <code>setTouchEnabled(true)</code> to * specify that touch events should be sent, which will cause gesture * events to not be sent. * </p> - * + * * @param listener the listener which should be notified * * @exception IllegalArgumentException <ul> @@ -1837,7 +1837,7 @@ void addRelation (Control control) { * @see TouchListener * @see #removeTouchListener * @see #setTouchEnabled - * + * * @since 3.7 */ public void addTouchListener (TouchListener listener) { @@ -1914,7 +1914,7 @@ public void removeControlListener (ControlListener listener) { * * @see DragDetectListener * @see #addDragDetectListener - * + * * @since 3.3 */ public void removeDragDetectListener(DragDetectListener listener) { @@ -1964,7 +1964,7 @@ public void removeFocusListener(FocusListener listener) { * * @see GestureListener * @see #addGestureListener - * + * * @since 3.7 */ public void removeGestureListener (GestureListener listener) { @@ -2198,7 +2198,7 @@ void removeRelation () { * * @see TouchListener * @see #addTouchListener - * + * * @since 3.7 */ public void removeTouchListener(TouchListener listener) { @@ -2236,7 +2236,7 @@ public void removeTraverseListener(TraverseListener listener) { * Detects a drag and drop gesture. This method is used * to detect a drag gesture when called from within a mouse * down listener. - * + * * <p>By default, a drag is detected when the gesture * occurs anywhere within the client area of a control. * Some controls, such as tables and trees, override this @@ -2249,7 +2249,7 @@ public void removeTraverseListener(TraverseListener listener) { * </p> * * @param event the mouse down event - * + * * @return <code>true</code> if the gesture occurred, and <code>false</code> otherwise. * * @exception IllegalArgumentException <ul> @@ -2259,13 +2259,13 @@ public void removeTraverseListener(TraverseListener listener) { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @see DragDetectListener * @see #addDragDetectListener - * + * * @see #getDragDetect * @see #setDragDetect - * + * * @since 3.3 */ public boolean dragDetect (Event event) { @@ -2278,7 +2278,7 @@ public boolean dragDetect (Event event) { * Detects a drag and drop gesture. This method is used * to detect a drag gesture when called from within a mouse * down listener. - * + * * <p>By default, a drag is detected when the gesture * occurs anywhere within the client area of a control. * Some controls, such as tables and trees, override this @@ -2291,7 +2291,7 @@ public boolean dragDetect (Event event) { * </p> * * @param event the mouse down event - * + * * @return <code>true</code> if the gesture occurred, and <code>false</code> otherwise. * * @exception IllegalArgumentException <ul> @@ -2301,13 +2301,13 @@ public boolean dragDetect (Event event) { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @see DragDetectListener * @see #addDragDetectListener - * + * * @see #getDragDetect * @see #setDragDetect - * + * * @since 3.3 */ public boolean dragDetect (MouseEvent event) { @@ -2341,7 +2341,7 @@ boolean dragDetect (int x, int y, boolean filter, boolean dragOnTimeout, boolean /* * There should be an event on the queue already, but * in cases where there isn't one, stop trying after - * half a second. + * half a second. */ long timeout = System.currentTimeMillis() + 500; display.sendPreExternalEventDispatchEvent(); @@ -2356,7 +2356,7 @@ boolean dragDetect (int x, int y, boolean filter, boolean dragOnTimeout, boolean startPos.x, startPos.y, currPos.x, currPos.y); if (dragging) break; } else { - try {Thread.sleep(50);} + try {Thread.sleep(50);} catch (Exception ex) {} } } @@ -2447,7 +2447,7 @@ long /*int*/ fixedMapProc (long /*int*/ widget) { return 0; } -void fixModal(long /*int*/ group, long /*int*/ modalGroup) { +void fixModal(long /*int*/ group, long /*int*/ modalGroup) { } /** @@ -2532,7 +2532,7 @@ GdkColor getBackgroundColor () { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 3.2 */ public Image getBackgroundImage () { @@ -2631,7 +2631,7 @@ int getClientWidth () { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 3.3 */ public Cursor getCursor () { @@ -2641,15 +2641,15 @@ public Cursor getCursor () { /** * Returns <code>true</code> if the receiver is detecting - * drag gestures, and <code>false</code> otherwise. + * drag gestures, and <code>false</code> otherwise. * * @return the receiver's drag detect state - * + * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 3.3 */ public boolean getDragDetect () { @@ -2669,7 +2669,7 @@ public boolean getDragDetect () { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @see #isEnabled */ public boolean getEnabled () { @@ -2691,11 +2691,11 @@ public Font getFont () { checkWidget(); return font != null ? font : defaultFont (); } - + long /*int*/ getFontDescription () { long /*int*/ fontHandle = fontHandle (); if (OS.GTK3) { - long /*int*/ context = OS.gtk_widget_get_style_context (fontHandle); + long /*int*/ context = OS.gtk_widget_get_style_context (fontHandle); return OS.gtk_style_context_get_font(context, OS.GTK_STATE_FLAG_NORMAL); } OS.gtk_widget_realize (fontHandle); @@ -2788,14 +2788,14 @@ public Menu getMenu () { /** * Returns the receiver's monitor. - * + * * @return the receiver's monitor - * + * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 3.0 */ public Monitor getMonitor () { @@ -2865,12 +2865,12 @@ Control [] getPath () { return result; } -/** +/** * Returns the region that defines the shape of the control, * or null if the control has the default shape. * * @return the region that defines the shape of the shell (or null) - * + * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> @@ -2937,7 +2937,7 @@ public String getToolTipText () { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @see #setTouchEnabled * @see Display#getTouchEnabled * @@ -2999,7 +2999,7 @@ long /*int*/ gtk_button_press_event (long /*int*/ widget, long /*int*/ event, bo GdkEventButton gdkEvent = new GdkEventButton (); OS.memmove (gdkEvent, event, GdkEventButton.sizeof); if (gdkEvent.type == OS.GDK_3BUTTON_PRESS) return 0; - + /* * When a shell is created with SWT.ON_TOP and SWT.NO_FOCUS, * do not activate the shell when the user clicks on the @@ -3086,10 +3086,10 @@ long /*int*/ gtk_enter_notify_event (long /*int*/ widget, long /*int*/ event) { * Feature in GTK. Children of a shell will inherit and display the shell's * tooltip if they do not have a tooltip of their own. The fix is to use the * new tooltip API in GTK 2.12 to null the shell's tooltip when the control - * being entered does not have any tooltip text set. + * being entered does not have any tooltip text set. */ byte [] buffer = null; - if (toolTipText != null && toolTipText.length() != 0) { + if (toolTipText != null && toolTipText.length() != 0) { char [] chars = fixMnemonic (toolTipText, false); buffer = Converter.wcsToMbcs (null, chars, true); } @@ -3100,9 +3100,9 @@ long /*int*/ gtk_enter_notify_event (long /*int*/ widget, long /*int*/ event) { GdkEventCrossing gdkEvent = new GdkEventCrossing (); OS.memmove (gdkEvent, event, GdkEventCrossing.sizeof); /* - * It is possible to send out too many enter/exit events if entering a - * control through a subwindow. The fix is to return without sending any - * events if the GdkEventCrossing subwindow field is set and the control + * It is possible to send out too many enter/exit events if entering a + * control through a subwindow. The fix is to return without sending any + * events if the GdkEventCrossing subwindow field is set and the control * requests to check the field. */ if (gdkEvent.subwindow != 0 && checkSubwindow ()) return 0; @@ -3155,12 +3155,12 @@ long /*int*/ gtk_event_after (long /*int*/ widget, long /*int*/ gdkEvent) { * box to lose focus when focus is received for the menu. The * fix is to check the current grab handle and see if it is a GTK_MENU * and ignore the focus event when the menu is both shown and hidden. - * + * * NOTE: This code runs for all menus. */ Display display = this.display; if (gdkEventFocus.in != 0) { - if (display.ignoreFocus) { + if (display.ignoreFocus) { display.ignoreFocus = false; break; } @@ -3289,14 +3289,14 @@ long /*int*/ gtk_key_press_event (long /*int*/ widget, long /*int*/ event) { } GdkEventKey gdkEvent = new GdkEventKey (); OS.memmove (gdkEvent, event, GdkEventKey.sizeof); - + if (translateMnemonic (gdkEvent.keyval, gdkEvent)) return 1; // widget could be disposed at this point if (isDisposed ()) return 0; - + if (filterKey (gdkEvent.keyval, event)) return 1; // widget could be disposed at this point - if (isDisposed ()) return 0; + if (isDisposed ()) return 0; if (translateTraversal (gdkEvent)) return 1; // widget could be disposed at this point @@ -3457,13 +3457,13 @@ long /*int*/ gtk_style_set (long /*int*/ widget, long /*int*/ previousStyle) { long /*int*/ gtk_unrealize (long /*int*/ widget) { long /*int*/ imHandle = imHandle (); if (imHandle != 0) OS.gtk_im_context_set_client_window (imHandle, 0); - return 0; + return 0; } @Override long /*int*/ gtk_visibility_notify_event (long /*int*/ widget, long /*int*/ event) { /* - * As of GTK 2.17.11, obscured controls no longer send expose + * As of GTK 2.17.11, obscured controls no longer send expose * events. It is no longer necessary to track visiblity notify * events. */ @@ -3476,7 +3476,7 @@ long /*int*/ gtk_visibility_notify_event (long /*int*/ widget, long /*int*/ even if (gdkEvent.state == OS.GDK_VISIBILITY_FULLY_OBSCURED) { state |= OBSCURED; } else { - if ((state & OBSCURED) != 0) { + if ((state & OBSCURED) != 0) { int [] width = new int [1], height = new int [1]; gdk_window_get_size (window, width, height); GdkRectangle rect = new GdkRectangle (); @@ -3502,7 +3502,7 @@ void gtk_widget_size_request (long /*int*/ widget, GtkRequisition requisition) { gtk_widget_get_preferred_size (widget, requisition); } -/** +/** * Invokes platform specific functionality to allocate a new GC handle. * <p> * <b>IMPORTANT:</b> This method is <em>not</em> part of the public @@ -3512,9 +3512,9 @@ void gtk_widget_size_request (long /*int*/ widget, GtkRequisition requisition) { * application code. * </p> * - * @param data the platform specific GC data + * @param data the platform specific GC data * @return the platform specific GC handle - * + * * @noreference This method is not intended to be referenced by clients. */ public long /*int*/ internal_new_GC (GCData data) { @@ -3531,7 +3531,7 @@ public long /*int*/ internal_new_GC (GCData data) { gc = OS.gdk_gc_new (window); } } - if (gc == 0) error (SWT.ERROR_NO_HANDLES); + if (gc == 0) error (SWT.ERROR_NO_HANDLES); if (data != null) { int mask = SWT.LEFT_TO_RIGHT | SWT.RIGHT_TO_LEFT; if ((data.style & mask) == 0) { @@ -3547,8 +3547,8 @@ public long /*int*/ internal_new_GC (GCData data) { Control control = findBackgroundControl (); if (control == null) control = this; data.background = control.getBackgroundColor (); - data.font = font != null ? font : defaultFont (); - } + data.font = font != null ? font : defaultFont (); + } return gc; } @@ -3556,7 +3556,7 @@ long /*int*/ imHandle () { return 0; } -/** +/** * Invokes platform specific functionality to dispose a GC handle. * <p> * <b>IMPORTANT:</b> This method is <em>not</em> part of the public @@ -3567,8 +3567,8 @@ long /*int*/ imHandle () { * </p> * * @param hDC the platform specific GC handle - * @param data the platform specific GC data - * + * @param data the platform specific GC data + * * @noreference This method is not intended to be referenced by clients. */ public void internal_dispose_GC (long /*int*/ hDC, GCData data) { @@ -3647,7 +3647,7 @@ boolean isTabItem () { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @see #getEnabled */ public boolean isEnabled () { @@ -3753,7 +3753,7 @@ void redraw (boolean all) { /** * Causes the rectangular area of the receiver specified by - * the arguments to be marked as needing to be redrawn. + * the arguments to be marked as needing to be redrawn. * The next time a paint request is processed, that area of * the receiver will be painted, including the background. * If the <code>all</code> flag is <code>true</code>, any @@ -3892,7 +3892,7 @@ void restackWindow (long /*int*/ window, long /*int*/ sibling, boolean above) { long /*int*/ xDisplay = OS.gdk_x11_drawable_get_xdisplay (window); long /*int*/ xWindow = OS.gdk_x11_drawable_get_xid (window); int xScreen = OS.XDefaultScreen (xDisplay); - int flags = OS.CWStackMode | OS.CWSibling; + int flags = OS.CWStackMode | OS.CWSibling; XWindowChanges changes = new XWindowChanges (); changes.sibling = OS.gdk_x11_drawable_get_xid (sibling); changes.stack_mode = above ? OS.Above : OS.Below; @@ -3932,7 +3932,7 @@ void sendFocusEvent (int type) { */ if (!shell.isDisposed ()) { switch (type) { - case SWT.FocusIn: + case SWT.FocusIn: shell.setActiveControl (this); break; case SWT.FocusOut: @@ -4014,7 +4014,7 @@ void setBackground () { * @param color the new color (or null) * * @exception IllegalArgumentException <ul> - * <li>ERROR_INVALID_ARGUMENT - if the argument has been disposed</li> + * <li>ERROR_INVALID_ARGUMENT - if the argument has been disposed</li> * </ul> * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> @@ -4104,7 +4104,7 @@ void setBackgroundColor (long /*int*/ handle, GdkColor color) { long /*int*/ ptr = OS.gtk_rc_style_get_bg_pixmap_name (style, index); if (ptr != 0) OS.g_free (ptr); ptr = 0; - + String pixmapName = null; int flags = OS.gtk_rc_style_get_color_flags (style, index); if (color != null) { @@ -4121,7 +4121,7 @@ void setBackgroundColor (long /*int*/ handle, GdkColor color) { ptr = OS.g_malloc (buffer.length); OS.memmove (ptr, buffer, buffer.length); } - + OS.gtk_rc_style_set_bg_pixmap_name (style, index, ptr); OS.gtk_rc_style_set_bg (style, index, color); OS.gtk_rc_style_set_color_flags (style, index, flags); @@ -4144,14 +4144,14 @@ void setBackgroundColor (GdkColor color) { * @param image the new image (or null) * * @exception IllegalArgumentException <ul> - * <li>ERROR_INVALID_ARGUMENT - if the argument has been disposed</li> - * <li>ERROR_INVALID_ARGUMENT - if the argument is not a bitmap</li> + * <li>ERROR_INVALID_ARGUMENT - if the argument has been disposed</li> + * <li>ERROR_INVALID_ARGUMENT - if the argument is not a bitmap</li> * </ul> * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 3.2 */ public void setBackgroundImage (Image image) { @@ -4185,7 +4185,7 @@ void setBackgroundPixmap (Image image) { * TODO This code code is commented because it does not work since the pixmap * created with gdk_pixmap_foreign_new() does not have colormap. Another option * would be to create a pixmap on the fly from the surface. - * + * * For now draw background in windowProc(). */ // long /*int*/ surface = image.surface; @@ -4237,7 +4237,7 @@ public void setCapture (boolean capture) { * @param cursor the new cursor (or null) * * @exception IllegalArgumentException <ul> - * <li>ERROR_INVALID_ARGUMENT - if the argument has been disposed</li> + * <li>ERROR_INVALID_ARGUMENT - if the argument has been disposed</li> * </ul> * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> @@ -4275,7 +4275,7 @@ void setCursor (long /*int*/ cursor) { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 3.3 */ public void setDragDetect (boolean dragDetect) { @@ -4354,7 +4354,7 @@ public void setEnabled (boolean enabled) { } /** - * Causes the receiver to have the <em>keyboard focus</em>, + * Causes the receiver to have the <em>keyboard focus</em>, * such that all keyboard events will be delivered to it. Focus * reassignment will respect applicable platform constraints. * @@ -4381,7 +4381,7 @@ public boolean setFocus () { * @param font the new font (or null) * * @exception IllegalArgumentException <ul> - * <li>ERROR_INVALID_ARGUMENT - if the argument has been disposed</li> + * <li>ERROR_INVALID_ARGUMENT - if the argument has been disposed</li> * </ul> * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> @@ -4406,7 +4406,7 @@ public void setFont (Font font) { } setFontDescription (fontDesc); } - + void setFontDescription (long /*int*/ font) { setFontDescription (handle, font); } @@ -4421,7 +4421,7 @@ void setFontDescription (long /*int*/ font) { * @param color the new color (or null) * * @exception IllegalArgumentException <ul> - * <li>ERROR_INVALID_ARGUMENT - if the argument has been disposed</li> + * <li>ERROR_INVALID_ARGUMENT - if the argument has been disposed</li> * </ul> * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> @@ -4518,7 +4518,7 @@ void setInitialBounds () { * @exception IllegalArgumentException <ul> * <li>ERROR_MENU_NOT_POP_UP - the menu is not a pop up menu</li> * <li>ERROR_INVALID_PARENT - if the menu is not in the same widget tree</li> - * <li>ERROR_INVALID_ARGUMENT - if the menu has been disposed</li> + * <li>ERROR_INVALID_ARGUMENT - if the menu has been disposed</li> * </ul> * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> @@ -4553,12 +4553,12 @@ void setOrientation (boolean create) { * <p> * * @param orientation new orientation style - * + * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 3.7 */ public void setOrientation (int orientation) { @@ -4582,7 +4582,7 @@ public void setOrientation (int orientation) { * * @exception IllegalArgumentException <ul> * <li>ERROR_INVALID_ARGUMENT - if the argument has been disposed</li> - * <li>ERROR_NULL_ARGUMENT - if the parent is <code>null</code></li> + * <li>ERROR_NULL_ARGUMENT - if the parent is <code>null</code></li> * </ul> * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> @@ -4678,7 +4678,7 @@ boolean setRadioSelection (boolean value) { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @see #redraw(int, int, int, int, boolean) * @see #update() */ @@ -4710,7 +4710,7 @@ public void setRedraw (boolean redraw) { int mouseMask = OS.GDK_BUTTON_PRESS_MASK | OS.GDK_BUTTON_RELEASE_MASK | OS.GDK_ENTER_NOTIFY_MASK | OS.GDK_LEAVE_NOTIFY_MASK | OS.GDK_POINTER_MOTION_MASK | OS.GDK_POINTER_MOTION_HINT_MASK | - OS.GDK_BUTTON_MOTION_MASK | OS.GDK_BUTTON1_MOTION_MASK | + OS.GDK_BUTTON_MOTION_MASK | OS.GDK_BUTTON1_MOTION_MASK | OS.GDK_BUTTON2_MOTION_MASK | OS.GDK_BUTTON3_MOTION_MASK; OS.gdk_window_set_events (window, OS.gdk_window_get_events (window) & ~mouseMask); OS.gdk_window_set_back_pixmap (redrawWindow, 0, false); @@ -4741,14 +4741,14 @@ boolean setTabItemFocus (boolean next) { * </p> * * @param textDirection the base text direction style - * + * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @see SWT#FLIP_TEXT_DIRECTION - * + * * @since 3.102 */ public void setTextDirection(int textDirection) { @@ -4757,17 +4757,17 @@ public void setTextDirection(int textDirection) { /** * Sets the receiver's tool tip text to the argument, which - * may be null indicating that the default tool tip for the + * may be null indicating that the default tool tip for the * control will be shown. For a control that has a default * tool tip, such as the Tree control on Windows, setting * the tool tip text to an empty string replaces the default, * causing no tool tip text to be shown. * <p> * The mnemonic indicator (character '&') is not displayed in a tool tip. - * To display a single '&' in the tool tip, the character '&' can be + * To display a single '&' in the tool tip, the character '&' can be * escaped by doubling it in the string. * </p> - * + * * @param string the new tool tip text (or null) * * @exception SWTException <ul> @@ -4789,9 +4789,9 @@ void setToolTipText (Shell shell, String newString) { * a set on a shell only. In order to force the shell tooltip * to update when a new tip string is set, the existing string * in the tooltip is set to null, followed by running a query. - * The real tip text can then be set. - * - * Note that this will only run if the control for which the + * The real tip text can then be set. + * + * Note that this will only run if the control for which the * tooltip is being set is the current control (i.e. the control * under the pointer). */ @@ -4808,9 +4808,9 @@ void setToolTipText (Shell shell, String newString) { * Setting this to <code>false</code> causes the receiver to send gesture events * instead. No exception is thrown if a touch-based input device is not * detected (this can be determined with <code>Display#getTouchEnabled()</code>). - * + * * @param enabled the new touch-enabled state - * + * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> @@ -4825,7 +4825,7 @@ public void setTouchEnabled(boolean enabled) { /** * Marks the receiver as visible if the argument is <code>true</code>, - * and marks it invisible otherwise. + * and marks it invisible otherwise. * <p> * If one of the receiver's ancestors is not visible or some * other condition makes the receiver not visible, marking @@ -4862,10 +4862,10 @@ public void setVisible (boolean visible) { * focus causes a focus_out_event to be sent. If the client disposes * the widget inside the event, GTK GP's. The fix is to reassign focus * before hiding the widget. - * + * * NOTE: In order to stop the same widget from taking focus, * temporarily clear and set the GTK_VISIBLE flag. - */ + */ Control control = null; boolean fixFocus = false; if (display.focusEvent != SWT.FocusOut) { @@ -5072,8 +5072,8 @@ void sort (int [] items) { /** * Based on the argument, perform one of the expected platform * traversal action. The argument should be one of the constants: - * <code>SWT.TRAVERSE_ESCAPE</code>, <code>SWT.TRAVERSE_RETURN</code>, - * <code>SWT.TRAVERSE_TAB_NEXT</code>, <code>SWT.TRAVERSE_TAB_PREVIOUS</code>, + * <code>SWT.TRAVERSE_ESCAPE</code>, <code>SWT.TRAVERSE_RETURN</code>, + * <code>SWT.TRAVERSE_TAB_NEXT</code>, <code>SWT.TRAVERSE_TAB_PREVIOUS</code>, * <code>SWT.TRAVERSE_ARROW_NEXT</code>, <code>SWT.TRAVERSE_ARROW_PREVIOUS</code>, * <code>SWT.TRAVERSE_PAGE_NEXT</code> and <code>SWT.TRAVERSE_PAGE_PREVIOUS</code>. * @@ -5095,24 +5095,24 @@ public boolean traverse (int traversal) { /** * Performs a platform traversal action corresponding to a <code>KeyDown</code> event. - * + * * <p>Valid traversal values are * <code>SWT.TRAVERSE_NONE</code>, <code>SWT.TRAVERSE_MNEMONIC</code>, * <code>SWT.TRAVERSE_ESCAPE</code>, <code>SWT.TRAVERSE_RETURN</code>, - * <code>SWT.TRAVERSE_TAB_NEXT</code>, <code>SWT.TRAVERSE_TAB_PREVIOUS</code>, + * <code>SWT.TRAVERSE_TAB_NEXT</code>, <code>SWT.TRAVERSE_TAB_PREVIOUS</code>, * <code>SWT.TRAVERSE_ARROW_NEXT</code>, <code>SWT.TRAVERSE_ARROW_PREVIOUS</code>, * <code>SWT.TRAVERSE_PAGE_NEXT</code> and <code>SWT.TRAVERSE_PAGE_PREVIOUS</code>. * If <code>traversal</code> is <code>SWT.TRAVERSE_NONE</code> then the Traverse * event is created with standard values based on the KeyDown event. If * <code>traversal</code> is one of the other traversal constants then the Traverse * event is created with this detail, and its <code>doit</code> is taken from the - * KeyDown event. + * KeyDown event. * </p> * * @param traversal the type of traversal, or <code>SWT.TRAVERSE_NONE</code> to compute * this from <code>event</code> * @param event the KeyDown event - * + * * @return <code>true</code> if the traversal succeeded * * @exception IllegalArgumentException <ul> @@ -5133,24 +5133,24 @@ public boolean traverse (int traversal, Event event) { /** * Performs a platform traversal action corresponding to a <code>KeyDown</code> event. - * + * * <p>Valid traversal values are * <code>SWT.TRAVERSE_NONE</code>, <code>SWT.TRAVERSE_MNEMONIC</code>, * <code>SWT.TRAVERSE_ESCAPE</code>, <code>SWT.TRAVERSE_RETURN</code>, - * <code>SWT.TRAVERSE_TAB_NEXT</code>, <code>SWT.TRAVERSE_TAB_PREVIOUS</code>, + * <code>SWT.TRAVERSE_TAB_NEXT</code>, <code>SWT.TRAVERSE_TAB_PREVIOUS</code>, * <code>SWT.TRAVERSE_ARROW_NEXT</code>, <code>SWT.TRAVERSE_ARROW_PREVIOUS</code>, * <code>SWT.TRAVERSE_PAGE_NEXT</code> and <code>SWT.TRAVERSE_PAGE_PREVIOUS</code>. * If <code>traversal</code> is <code>SWT.TRAVERSE_NONE</code> then the Traverse * event is created with standard values based on the KeyDown event. If * <code>traversal</code> is one of the other traversal constants then the Traverse * event is created with this detail, and its <code>doit</code> is taken from the - * KeyDown event. + * KeyDown event. * </p> * * @param traversal the type of traversal, or <code>SWT.TRAVERSE_NONE</code> to compute * this from <code>event</code> * @param event the KeyDown event - * + * * @return <code>true</code> if the traversal succeeded * * @exception IllegalArgumentException <ul> @@ -5313,14 +5313,14 @@ boolean translateTraversal (GdkEventKey keyEvent) { detail = SWT.TRAVERSE_RETURN; break; } - case OS.GDK_ISO_Left_Tab: + case OS.GDK_ISO_Left_Tab: case OS.GDK_Tab: { boolean next = (keyEvent.state & OS.GDK_SHIFT_MASK) == 0; detail = next ? SWT.TRAVERSE_TAB_NEXT : SWT.TRAVERSE_TAB_PREVIOUS; break; } case OS.GDK_Up: - case OS.GDK_Left: + case OS.GDK_Left: case OS.GDK_Down: case OS.GDK_Right: { boolean next = key == OS.GDK_Down || key == OS.GDK_Right; @@ -5369,7 +5369,7 @@ boolean traverse (Event event) { * code could have disposed the widget in the traverse * event. If this happens, return true to stop further * event processing. - */ + */ sendEvent (SWT.Traverse, event); if (isDisposed ()) return true; if (!event.doit) return false; @@ -5381,7 +5381,7 @@ boolean traverse (Event event) { case SWT.TRAVERSE_TAB_PREVIOUS: return traverseGroup (false); case SWT.TRAVERSE_ARROW_NEXT: return traverseItem (true); case SWT.TRAVERSE_ARROW_PREVIOUS: return traverseItem (false); - case SWT.TRAVERSE_MNEMONIC: return traverseMnemonic (event.character); + case SWT.TRAVERSE_MNEMONIC: return traverseMnemonic (event.character); case SWT.TRAVERSE_PAGE_NEXT: return traversePage (true); case SWT.TRAVERSE_PAGE_PREVIOUS: return traversePage (false); } @@ -5483,7 +5483,7 @@ public void update () { void update (boolean all, boolean flush) { // checkWidget(); - if (!gtk_widget_get_visible (topHandle ())) return; + if (!gtk_widget_get_visible (topHandle ())) return; if (!gtk_widget_get_realized (handle)) return; long /*int*/ window = paintWindow (); if (flush) display.flushExposes (window, all); 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 ab768cb25d..9e57ec1a4e 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 @@ -27,14 +27,14 @@ import org.eclipse.swt.graphics.*; * Instead, the class <code>Shell</code> should be used. * </p> * <p> - * Instances are always displayed in one of the maximized, + * Instances are always displayed in one of the maximized, * minimized or normal states: * <ul> * <li> * When an instance is marked as <em>maximized</em>, the * window manager will typically resize it to fill the * entire visible area of the display, and the instance - * is usually put in a state where it can not be resized + * is usually put in a state where it can not be resized * (even if it has style <code>RESIZE</code>) until it is * no longer maximized. * </li><li> @@ -72,13 +72,13 @@ import org.eclipse.swt.graphics.*; * <dt><code>SHELL_TRIM</code></dt> * <dd> * the result of combining the constants which are required - * to produce a typical application top level shell: (that + * to produce a typical application top level shell: (that * is, <code>CLOSE | TITLE | MIN | MAX | RESIZE</code>) * </dd> * <dt><code>DIALOG_TRIM</code></dt> * <dd> * the result of combining the constants which are required - * to produce a typical application dialog shell: (that + * to produce a typical application dialog shell: (that * is, <code>TITLE | CLOSE | BORDER</code>) * </dd> * </dl> @@ -104,7 +104,7 @@ public class Decorations extends Canvas { Control savedFocus; Button defaultButton, saveDefault; long /*int*/ accelGroup, vboxHandle; - + Decorations () { /* Do nothing */ } @@ -115,7 +115,7 @@ Decorations () { * <p> * The style value is either one of the style constants defined in * class <code>SWT</code> which is applicable to instances of this - * class, or must be built by <em>bitwise OR</em>'ing together + * class, or must be built by <em>bitwise OR</em>'ing together * (that is, using the <code>int</code> "|" operator) two or more * of those <code>SWT</code> style constants. The class description * lists the style constants that are applicable to the class. @@ -178,7 +178,7 @@ void _setImages (Image [] images) { for (int i = 0; i < images.length; i++) { Image image = images [i]; long /*int*/ pixbuf = ImageList.createPixbuf (image); - pixbufs = OS.g_list_append (pixbufs, pixbuf); + pixbufs = OS.g_list_append (pixbufs, pixbuf); } } OS.gtk_window_set_icon_list (topHandle (), pixbufs); @@ -303,7 +303,7 @@ public Button getDefaultButton () { } /** - * Returns the receiver's image if it had previously been + * Returns the receiver's image if it had previously been * set using <code>setImage()</code>. The image is typically * displayed by the window manager when the instance is * marked as iconified, and may also be displayed somewhere @@ -315,7 +315,7 @@ public Button getDefaultButton () { * access to a window manager provided, "default" image * even if one exists. * </p> - * + * * @return the image * * @exception SWTException <ul> @@ -329,7 +329,7 @@ public Image getImage () { } /** - * Returns the receiver's images if they had previously been + * Returns the receiver's images if they had previously been * set using <code>setImages()</code>. Images are typically * displayed by the window manager when the instance is * marked as iconified, and may also be displayed somewhere @@ -338,21 +338,21 @@ public Image getImage () { * chooses the icon with the "best" attributes. It is expected * that the array will contain the same icon rendered at different * sizes, with different depth and transparency attributes. - * + * * <p> * Note: This method will return an empty array if called before * <code>setImages()</code> is called. It does not provide * access to a window manager provided, "default" image * even if one exists. * </p> - * + * * @return the images * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 3.0 */ public Image [] getImages () { @@ -365,7 +365,7 @@ public Image [] getImages () { /** * Returns <code>true</code> if the receiver is currently - * maximized, and false otherwise. + * maximized, and false otherwise. * <p> * * @return the maximized state @@ -400,7 +400,7 @@ public Menu getMenuBar () { /** * Returns <code>true</code> if the receiver is currently - * minimized, and false otherwise. + * minimized, and false otherwise. * <p> * * @return the minimized state @@ -425,7 +425,7 @@ String getNameText () { /** * Returns the receiver's text, which is the string that the * window manager will typically display as the receiver's - * <em>title</em>. If the text has not previously been set, + * <em>title</em>. If the text has not previously been set, * returns an empty string. * * @return the text @@ -537,7 +537,7 @@ boolean restoreFocus () { * If the argument is not null, sets the receiver's default * button to the argument, and if the argument is null, sets * the receiver's default button to the first button which - * was set as the receiver's default button (called the + * was set as the receiver's default button (called the * <em>saved default button</em>). If no default button had * previously been set, or the saved default button was * disposed, the receiver's default button will be set to @@ -550,7 +550,7 @@ boolean restoreFocus () { * @param button the new default button * * @exception IllegalArgumentException <ul> - * <li>ERROR_INVALID_ARGUMENT - if the button has been disposed</li> + * <li>ERROR_INVALID_ARGUMENT - if the button has been disposed</li> * <li>ERROR_INVALID_PARENT - if the control is not in the same widget tree</li> * </ul> * @exception SWTException <ul> @@ -576,11 +576,11 @@ public void setDefaultButton (Button button) { * manager when the instance is marked as iconified, and * may also be displayed somewhere in the trim when the * instance is in normal or maximized states. - * + * * @param image the new image (or null) * * @exception IllegalArgumentException <ul> - * <li>ERROR_INVALID_ARGUMENT - if the image has been disposed</li> + * <li>ERROR_INVALID_ARGUMENT - if the image has been disposed</li> * </ul> * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> @@ -603,7 +603,7 @@ public void setImage (Image image) { * the "best" attributes. It is expected that the array will * contain the same icon rendered at different sizes, with * different depth and transparency attributes. - * + * * @param images the new image array * * @exception IllegalArgumentException <ul> @@ -614,7 +614,7 @@ public void setImage (Image image) { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 3.0 */ public void setImages (Image [] images) { @@ -662,7 +662,7 @@ public void setMaximized (boolean maximized) { * @param menu the new menu bar * * @exception IllegalArgumentException <ul> - * <li>ERROR_INVALID_ARGUMENT - if the menu has been disposed</li> + * <li>ERROR_INVALID_ARGUMENT - if the menu has been disposed</li> * <li>ERROR_INVALID_PARENT - if the menu is not in the same widget tree</li> * </ul> * @exception SWTException <ul> @@ -724,7 +724,7 @@ void setSavedFocus (Control control) { /** * Sets the receiver's text, which is the string that the * window manager will typically display as the receiver's - * <em>title</em>, to the argument, which must not be null. + * <em>title</em>, to the argument, which must not be null. * * @param string the new text * @@ -745,7 +745,7 @@ public void setText (String string) { void sort (Image [] images) { /* Shell Sort from K&R, pg 108 */ int length = images.length; - if (length <= 1) return; + if (length <= 1) return; ImageData [] datas = new ImageData [length]; for (int i = 0; i < length; i++) { datas [i] = images [i].getImageData (); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DirectoryDialog.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DirectoryDialog.java index 1ae834fa6e..663951523e 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DirectoryDialog.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DirectoryDialog.java @@ -27,7 +27,7 @@ import org.eclipse.swt.internal.gtk.*; * <p> * IMPORTANT: This class is <em>not</em> intended to be subclassed. * </p> - * + * * @see <a href="http://www.eclipse.org/swt/snippets/#directorydialog">DirectoryDialog snippets</a> * @see <a href="http://www.eclipse.org/swt/examples.php">SWT Example: ControlExample, Dialog tab</a> * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a> @@ -60,7 +60,7 @@ public DirectoryDialog (Shell parent) { * <p> * The style value is either one of the style constants defined in * class <code>SWT</code> which is applicable to instances of this - * class, or must be built by <em>bitwise OR</em>'ing together + * class, or must be built by <em>bitwise OR</em>'ing together * (that is, using the <code>int</code> "|" operator) two or more * of those <code>SWT</code> style constants. The class description * lists the style constants that are applicable to the class. @@ -87,7 +87,7 @@ public DirectoryDialog (Shell parent, int style) { * the directories it shows. * * @return the filter path - * + * * @see #setFilterPath */ public String getFilterPath () { @@ -147,7 +147,7 @@ String openChooserDialog () { byte [] buffer = Converter.wcsToMbcs (null, stringBuffer.toString (), true); /* * in GTK version 2.10, gtk_file_chooser_set_current_folder requires path - * to be true canonical path. So using realpath to convert the path to + * to be true canonical path. So using realpath to convert the path to * true canonical path. */ if (OS.IsAIX) { @@ -197,14 +197,14 @@ String openChooserDialog () { if ((style & SWT.RIGHT_TO_LEFT) != 0) { signalId = OS.g_signal_lookup (OS.map, OS.GTK_TYPE_WIDGET()); hookId = OS.g_signal_add_emission_hook (signalId, 0, display.emissionProc, handle, 0); - } + } display.sendPreExternalEventDispatchEvent (); int response = OS.gtk_dialog_run (handle); /* * This call to gdk_threads_leave() is a temporary work around * to avoid deadlocks when gdk_threads_init() is called by native * code outside of SWT (i.e AWT, etc). It ensures that the current - * thread leaves the GTK lock acquired by the function above. + * thread leaves the GTK lock acquired by the function above. */ OS.gdk_threads_leave(); display.sendPostExternalEventDispatchEvent (); @@ -261,7 +261,7 @@ public void setFilterPath (String string) { * visible on the dialog while it is open. * * @param string the message - * + * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the string is null</li> * </ul> 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 9abb1c8522..a76fea94f2 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 @@ -48,12 +48,12 @@ import org.eclipse.swt.graphics.*; * <code>Widget</code> and its subclasses), may only be called * from the thread. (To support multi-threaded user-interface * applications, class <code>Display</code> provides inter-thread - * communication methods which allow threads other than the + * communication methods which allow threads other than the * user-interface thread to request that it perform operations * on their behalf.) * </li> * <li> - * The thread is not allowed to construct other + * The thread is not allowed to construct other * <code>Display</code>s until that display has been disposed. * (Note that, this is in addition to the restriction mentioned * above concerning platform support for multiple displays. Thus, @@ -62,8 +62,8 @@ import org.eclipse.swt.graphics.*; * </li> * </ul> * Enforcing these attributes allows SWT to be implemented directly - * on the underlying operating system's event model. This has - * numerous benefits including smaller footprint, better use of + * on the underlying operating system's event model. This has + * numerous benefits including smaller footprint, better use of * resources, safer memory management, clearer program logic, * better performance, and fewer overall operating system threads * required. The down side however, is that care must be taken @@ -152,7 +152,7 @@ public class Display extends Device { Shell activeShell; boolean activePending; boolean ignoreActivate, ignoreFocus; - + Tracker tracker; /* Input method resources */ @@ -165,7 +165,7 @@ public class Display extends Device { /* Display Shutdown */ Runnable [] disposeList; - + /* Deferred Layout list */ Composite[] layoutDeferred; int layoutDeferredCount; @@ -173,7 +173,7 @@ public class Display extends Device { /* System Tray */ Tray tray; TrayItem currentTrayItem; - + /* Timers */ int [] timerIds; Runnable [] timerList; @@ -181,13 +181,13 @@ public class Display extends Device { long /*int*/ timerProc; Callback windowTimerCallback; long /*int*/ windowTimerProc; - + /* Caret */ Caret currentCaret; Callback caretCallback; int caretId; long /*int*/ caretProc; - + /* Mnemonics */ Control mnemonicControl; @@ -195,7 +195,7 @@ public class Display extends Device { int mouseHoverId; long /*int*/ mouseHoverHandle, mouseHoverProc; Callback mouseHoverCallback; - + /* Menu position callback */ long /*int*/ menuPositionProc; Callback menuPositionCallback; @@ -209,7 +209,7 @@ public class Display extends Device { /* Shell map callback */ long /*int*/ shellMapProc; Callback shellMapCallback; - + /* Idle proc callback */ long /*int*/ idleProc; int idleHandle; @@ -218,21 +218,21 @@ public class Display extends Device { static final String REMOVE_IDLE_PROC_KEY = "org.eclipse.swt.internal.gtk.removeIdleProc"; //$NON-NLS-1$ Object idleLock = new Object(); boolean idleNeeded; - + /* GtkTreeView callbacks */ long /*int*/ cellDataProc; Callback cellDataCallback; - + /* Set direction callback */ long /*int*/ setDirectionProc; Callback setDirectionCallback; static final String GET_DIRECTION_PROC_KEY = "org.eclipse.swt.internal.gtk.getDirectionProc"; //$NON-NLS-1$ - + /* Set emissionProc callback */ long /*int*/ emissionProc; Callback emissionProcCallback; static final String GET_EMISSION_PROC_KEY = "org.eclipse.swt.internal.gtk.getEmissionProc"; //$NON-NLS-1$ - + /* Get all children callback */ long /*int*/ allChildrenProc, allChildren; Callback allChildrenCallback; @@ -244,13 +244,13 @@ public class Display extends Device { boolean settingsChanged, runSettings; static final int STYLE_SET = 1; static final int PROPERTY_NOTIFY = 2; - + /* Entry focus behaviour */ boolean entrySelectOnFocus; - + /* Enter/Exit events */ Control currentControl; - + /* Flush exposes */ long /*int*/ checkIfEventProc; Callback checkIfEventCallback; @@ -278,32 +278,32 @@ public class Display extends Device { /* Popup Menus */ Menu [] popups; - + /* Click count*/ int clickCount = 1; - + /* Entry inner border */ static final int INNER_BORDER = 2; - + /* Timestamp of the Last Received Events */ int lastEventTime, lastUserEventTime; - + /* Pango layout constructor */ long /*int*/ pangoLayoutNewProc; long /*int*/ pangoFontFamilyNewProc; long /*int*/ pangoFontFaceNewProc; - + /* IM Context constructor */ long /*int*/ imContextNewProc; - + /* GtkPrinterOptionWidget constructor */ long /*int*/ printerOptionWidgetNewProc; - + /* Custom Resize */ double resizeLocationX, resizeLocationY; int resizeBoundsX, resizeBoundsY, resizeBoundsWidth, resizeBoundsHeight; int resizeMode; - + /* Fixed Subclass */ static long /*int*/ fixed_type; static long /*int*/ fixed_info_ptr; @@ -320,7 +320,7 @@ public class Display extends Device { /* Key Mappings */ static final int [] [] KeyTable = { - + /* Keyboard and Mouse Masks */ {OS.GDK_Alt_L, SWT.ALT}, {OS.GDK_Alt_R, SWT.ALT}, @@ -332,7 +332,7 @@ public class Display extends Device { {OS.GDK_Control_R, SWT.CONTROL}, // {OS.GDK_????, SWT.COMMAND}, // {OS.GDK_????, SWT.COMMAND}, - + /* Non-Numeric Keypad Keys */ {OS.GDK_Up, SWT.ARROW_UP}, {OS.GDK_KP_Up, SWT.ARROW_UP}, @@ -352,7 +352,7 @@ public class Display extends Device { {OS.GDK_KP_End, SWT.END}, {OS.GDK_Insert, SWT.INSERT}, {OS.GDK_KP_Insert, SWT.INSERT}, - + /* Virtual and Ascii Keys */ {OS.GDK_BackSpace, SWT.BS}, {OS.GDK_Return, SWT.CR}, @@ -362,7 +362,7 @@ public class Display extends Device { {OS.GDK_Linefeed, SWT.LF}, {OS.GDK_Tab, SWT.TAB}, {OS.GDK_ISO_Left_Tab, SWT.TAB}, - + /* Functions Keys */ {OS.GDK_F1, SWT.F1}, {OS.GDK_F2, SWT.F2}, @@ -384,7 +384,7 @@ public class Display extends Device { {OS.GDK_F18, SWT.F18}, {OS.GDK_F19, SWT.F19}, {OS.GDK_F20, SWT.F20}, - + /* Numeric Keypad Keys */ {OS.GDK_KP_Multiply, SWT.KEYPAD_MULTIPLY}, {OS.GDK_KP_Add, SWT.KEYPAD_ADD}, @@ -412,7 +412,7 @@ public class Display extends Device { {OS.GDK_Break, SWT.BREAK}, {OS.GDK_Print, SWT.PRINT_SCREEN}, {OS.GDK_Help, SWT.HELP}, - + }; /* Multiple Displays. */ @@ -422,7 +422,7 @@ public class Display extends Device { /* Skinning support */ Widget [] skinList = new Widget [GROW_SIZE]; int skinCount; - + /* Package name */ static final String PACKAGE_PREFIX = "org.eclipse.swt.widgets."; //$NON-NLS-1$ /* This code is intentionally commented. @@ -446,7 +446,7 @@ public class Display extends Device { Object data; String [] keys; Object [] values; - + /* Initial Guesses for Shell Trimmings. */ int borderTrimWidth = 4, borderTrimHeight = 4; int resizeTrimWidth = 6, resizeTrimHeight = 6; @@ -486,7 +486,7 @@ static void setDevice (Device device) { * Constructs a new instance of this class. * <p> * Note: The resulting display is marked as the <em>current</em> - * display. If this is the first display which has been + * display. If this is the first display which has been * constructed since the application started, it is also * marked as the <em>default</em> display. * </p> @@ -507,7 +507,7 @@ public Display () { /** * Constructs a new instance of this class using the parameter. - * + * * @param data the device data */ public Display (DeviceData data) { @@ -531,7 +531,7 @@ public Display (DeviceData data) { * powerful and dangerous. They should generally be avoided for * performance, debugging and code maintenance reasons. * </p> - * + * * @param eventType the type of event to listen for * @param listener the listener which should be notified when the event occurs * @@ -547,8 +547,8 @@ public Display (DeviceData data) { * @see SWT * @see #removeFilter * @see #removeListener - * - * @since 3.0 + * + * @since 3.0 */ public void addFilter (int eventType, Listener listener) { checkDevice (); @@ -625,8 +625,8 @@ void addIdleProc() { * @see Listener * @see SWT * @see #removeListener - * - * @since 2.0 + * + * @since 2.0 */ public void addListener (int eventType, Listener listener) { checkDevice (); @@ -702,13 +702,13 @@ void addWidget (long /*int*/ handle, Widget widget) { /** * Causes the <code>run()</code> method of the runnable to - * be invoked by the user-interface thread at the next - * reasonable opportunity. The caller of this method continues + * be invoked by the user-interface thread at the next + * reasonable opportunity. The caller of this method continues * to run in parallel, and is not notified when the * runnable has completed. Specifying <code>null</code> as the * runnable simply wakes the user-interface thread when run. * <p> - * Note that at the time the runnable is invoked, widgets + * Note that at the time the runnable is invoked, widgets * that have the receiver as their display may have been * disposed. Therefore, it is necessary to check for this * case inside the runnable before accessing the widget. @@ -719,7 +719,7 @@ void addWidget (long /*int*/ handle, Widget widget) { * @exception SWTException <ul> * <li>ERROR_DEVICE_DISPOSED - if the receiver has been disposed</li> * </ul> - * + * * @see #syncExec */ public void asyncExec (Runnable runnable) { @@ -738,7 +738,7 @@ public void asyncExec (Runnable runnable) { /** * Causes the system hardware to emit a short sound * (if it supports this capability). - * + * * @exception SWTException <ul> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * <li>ERROR_DEVICE_DISPOSED - if the receiver has been disposed</li> @@ -784,7 +784,7 @@ long /*int*/ checkIfEventProc (long /*int*/ display, long /*int*/ xEvent, long / switch (type) { case OS.VisibilityNotify: /* - * As of GTK 2.17.11, obscured controls no longer send expose + * As of GTK 2.17.11, obscured controls no longer send expose * events. It is no longer necessary to track visiblity notify * events. */ @@ -889,7 +889,7 @@ void clearModal (Shell shell) { * </ul> * * @see Device#dispose - * + * * @since 2.0 */ public void close () { @@ -1019,7 +1019,7 @@ void createDisplay (DeviceData data) { OS.memmove (pixbuf_renderer_info_ptr, renderer_info, GTypeInfo.sizeof); byte [] type_name = Converter.wcsToMbcs (null, "SwtPixbufRenderer", true); //$NON-NLS-1$ pixbuf_renderer_type = OS.g_type_register_static (OS.GTK_TYPE_CELL_RENDERER_PIXBUF (), type_name, pixbuf_renderer_info_ptr, 0); - } + } if (toggle_renderer_type == 0) { GTypeInfo renderer_info = new GTypeInfo (); renderer_info.class_size = (short) OS.GtkCellRendererToggleClass_sizeof (); @@ -1030,7 +1030,7 @@ void createDisplay (DeviceData data) { byte [] type_name = Converter.wcsToMbcs (null, "SwtToggleRenderer", true); //$NON-NLS-1$ toggle_renderer_type = OS.g_type_register_static (OS.GTK_TYPE_CELL_RENDERER_TOGGLE (), type_name, toggle_renderer_info_ptr, 0); } - + OS.gtk_widget_set_default_direction (OS.GTK_TEXT_DIR_LTR); byte [] buffer = Converter.wcsToMbcs (null, APP_NAME, true); OS.g_set_prgname (buffer); @@ -1157,7 +1157,7 @@ long /*int*/ emissionProc (long /*int*/ ihint, long /*int*/ n_param_values, long * user-interface thread for, or null if the given thread * is not a user-interface thread for any display. Specifying * <code>null</code> as the thread will return <code>null</code> - * for the display. + * for the display. * * @param thread the user-interface thread * @return the display for the given thread @@ -1181,7 +1181,7 @@ public static Display findDisplay (Thread thread) { * is ignored. * * @param runnable code to run at dispose time. - * + * * @exception SWTException <ul> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * <li>ERROR_DEVICE_DISPOSED - if the receiver has been disposed</li> @@ -1272,7 +1272,7 @@ long /*int*/ eventProc (long /*int*/ event, long /*int*/ data) { * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * <li>ERROR_DEVICE_DISPOSED - if the receiver has been disposed</li> * </ul> - * + * * @noreference This method is not intended to be referenced by clients. */ public Widget findWidget (long /*int*/ handle) { @@ -1299,9 +1299,9 @@ public Widget findWidget (long /*int*/ handle) { * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * <li>ERROR_DEVICE_DISPOSED - if the receiver has been disposed</li> * </ul> - * + * * @noreference This method is not intended to be referenced by clients. - * + * * @since 3.1 */ public Widget findWidget (long /*int*/ handle, long /*int*/ id) { @@ -1323,9 +1323,9 @@ public Widget findWidget (long /*int*/ handle, long /*int*/ id) { * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * <li>ERROR_DEVICE_DISPOSED - if the receiver has been disposed</li> * </ul> - * + * * @noreference This method is not intended to be referenced by clients. - * + * * @since 3.3 */ public Widget findWidget (Widget widget, long /*int*/ id) { @@ -1508,7 +1508,7 @@ public Control getCursorControl () { handle = user_data [0]; } else { /* - * Feature in GTK. gdk_window_at_pointer() will not return a window + * Feature in GTK. gdk_window_at_pointer() will not return a window * if the pointer is over a foreign embedded window. The fix is to use * XQueryPointer to find the containing GDK window. */ @@ -1532,7 +1532,7 @@ public Control getCursorControl () { } if (gdkWindow != 0) { OS.gdk_window_get_user_data (gdkWindow, user_data); - if (user_data[0] != 0) handle = user_data[0]; + if (user_data[0] != 0) handle = user_data[0]; } } } while (xWindow != 0); @@ -1613,12 +1613,12 @@ public Point getCursorLocation () { * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * <li>ERROR_DEVICE_DISPOSED - if the receiver has been disposed</li> * </ul> - * + * * @since 3.0 */ public Point [] getCursorSizes () { checkDevice (); - return new Point [] {new Point (16, 16), new Point (32, 32)}; + return new Point [] {new Point (16, 16), new Point (32, 32)}; } /** @@ -1672,7 +1672,7 @@ public Object getData (String key) { * Returns the application defined, display specific data * associated with the receiver, or null if it has not been * set. The <em>display specific data</em> is a single, - * unnamed field that is stored with every display. + * unnamed field that is stored with every display. * <p> * Applications may put arbitrary objects in this field. If * the object stored in the display specific data needs to @@ -1737,7 +1737,7 @@ static boolean isValidClass (Class clazz) { * <code>null</code> if there is no application menu bar for the platform. * * @return the application menu bar, or <code>null</code> - * + * * @exception SWTException <ul> * <li>ERROR_DEVICE_DISPOSED - if the receiver has been disposed</li> * </ul> @@ -1763,7 +1763,7 @@ public Menu getMenuBar () { * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * <li>ERROR_DEVICE_DISPOSED - if the receiver has been disposed</li> * </ul> - * + * * @since 2.1 */ public int getDismissalAlignment () { @@ -1840,7 +1840,7 @@ public Control getFocusControl () { * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * <li>ERROR_DEVICE_DISPOSED - if the receiver has been disposed</li> * </ul> - * + * * @since 3.0 */ public boolean getHighContrast () { @@ -1870,7 +1870,7 @@ public int getDepth () { * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * <li>ERROR_DEVICE_DISPOSED - if the receiver has been disposed</li> * </ul> - * + * * @see Device#getDepth */ public int getIconDepth () { @@ -1887,14 +1887,14 @@ public int getIconDepth () { * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * <li>ERROR_DEVICE_DISPOSED - if the receiver has been disposed</li> * </ul> - * + * * @see Decorations#setImages(Image[]) - * + * * @since 3.0 */ public Point [] getIconSizes () { checkDevice (); - return new Point [] {new Point (16, 16), new Point (32, 32)}; + return new Point [] {new Point (16, 16), new Point (32, 32)}; } int getLastEventTime () { @@ -1934,7 +1934,7 @@ Rectangle getWorkArea() { } else if (actualLength [0] == 32) { long values [] = new long [4]; OS.memmove (values, data[0], 32); - result = new Rectangle ((int)values [0],(int)values [1],(int)values [2],(int)values [3]); + result = new Rectangle ((int)values [0],(int)values [1],(int)values [2],(int)values [3]); } OS.g_free (data [0]); } @@ -1943,9 +1943,9 @@ Rectangle getWorkArea() { /** * Returns an array of monitors attached to the device. - * + * * @return the array of monitors - * + * * @since 3.0 */ public Monitor [] getMonitors () { @@ -2000,16 +2000,16 @@ public Monitor [] getMonitors () { monitor.clientWidth = monitor.width; monitor.clientHeight = monitor.height; } - monitors = new Monitor [] { monitor }; + monitors = new Monitor [] { monitor }; } return monitors; } /** * Returns the primary monitor for that device. - * + * * @return the primary monitor - * + * * @since 3.0 */ public Monitor getPrimaryMonitor () { @@ -2061,7 +2061,7 @@ public Shell [] getShells () { System.arraycopy (result, 0, newResult, 0, index); result = newResult; } - result [index++] = (Shell) widget; + result [index++] = (Shell) widget; } } } @@ -2075,12 +2075,12 @@ public Shell [] getShells () { * Gets the synchronizer used by the display. * * @return the receiver's synchronizer - * + * * @exception SWTException <ul> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * <li>ERROR_DEVICE_DISPOSED - if the receiver has been disposed</li> * </ul> - * + * * @since 3.4 */ public Synchronizer getSynchronizer () { @@ -2098,7 +2098,7 @@ public Synchronizer getSynchronizer () { * </p> * * @return the receiver's sync-interface thread - * + * * @exception SWTException <ul> * <li>ERROR_DEVICE_DISPOSED - if the receiver has been disposed</li> * </ul> @@ -2155,7 +2155,7 @@ public Color getSystemColor (int id) { case SWT.COLOR_LIST_SELECTION: gdkColor = COLOR_LIST_SELECTION; break; case SWT.COLOR_LIST_SELECTION_TEXT: gdkColor = COLOR_LIST_SELECTION_TEXT; break; default: - return super.getSystemColor (id); + return super.getSystemColor (id); } if (gdkColor == null) return super.getSystemColor (SWT.COLOR_BLACK); return Color.gtk_new (this, gdkColor); @@ -2168,7 +2168,7 @@ public Color getSystemColor (int id) { * not be free'd because it was allocated by the system, * not the application. A value of <code>null</code> will * be returned if the supplied constant is not an SWT cursor - * constant. + * constant. * * @param id the SWT cursor constant * @return the corresponding cursor or <code>null</code> @@ -2200,7 +2200,7 @@ public Color getSystemColor (int id) { * @see SWT#CURSOR_IBEAM * @see SWT#CURSOR_NO * @see SWT#CURSOR_HAND - * + * * @since 3.0 */ public Cursor getSystemCursor (int id) { @@ -2220,7 +2220,7 @@ public Cursor getSystemCursor (int id) { * not the application. A value of <code>null</code> will * be returned either if the supplied constant is not an * SWT icon constant or if the platform does not define an - * image that corresponds to the constant. + * image that corresponds to the constant. * * @param id the SWT icon constant * @return the corresponding image or <code>null</code> @@ -2235,7 +2235,7 @@ public Cursor getSystemCursor (int id) { * @see SWT#ICON_QUESTION * @see SWT#ICON_WARNING * @see SWT#ICON_WORKING - * + * * @since 3.0 */ public Image getSystemImage (int id) { @@ -2271,7 +2271,7 @@ public Image getSystemImage (int id) { * <code>null</code> on platforms where no menu is provided for the application. * * @return the system menu, or <code>null</code> - * + * * @exception SWTException <ul> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * <li>ERROR_DEVICE_DISPOSED - if the receiver has been disposed</li> @@ -2318,7 +2318,7 @@ GdkColor toGdkColor (GdkRGBA rgba, double m) { void getBackgroundColor (long /*int*/ context, int state, GdkRGBA rgba) { /* * Draw the context background to an offset screen surface and get the color - * in the middle of the surface. + * in the middle of the surface. */ OS.gtk_style_context_save (context); OS.gtk_style_context_set_state (context, state); @@ -2344,7 +2344,7 @@ void initializeSystemColors () { byte[] gtk_tooltip = Converter.wcsToMbcs (null, OS.GTK3 ? "gtk-tooltip" : "gtk-tooltips", true); //$NON-NLS-1$ OS.gtk_widget_set_name (tooltipShellHandle, gtk_tooltip); OS.gtk_widget_realize (tooltipShellHandle); - + /* Initialize link foreground */ long /*int*/ linkWidget = OS.gtk_label_new (new byte[1]); if (linkWidget == 0) error (SWT.ERROR_NO_HANDLES); @@ -2373,21 +2373,21 @@ void initializeSystemColors () { COLOR_INFO_FOREGROUND = toGdkColor (rgba); getBackgroundColor (context, OS.GTK_STATE_FLAG_NORMAL, rgba); COLOR_INFO_BACKGROUND = toGdkColor (rgba); - OS.gtk_widget_destroy (tooltipShellHandle); + OS.gtk_widget_destroy (tooltipShellHandle); context = OS.gtk_widget_get_style_context (shellHandle); - + COLOR_WIDGET_DARK_SHADOW = toGdkColor (new GdkRGBA()); OS.gtk_style_context_get_background_color (context, OS.GTK_STATE_FLAG_NORMAL, rgba); COLOR_WIDGET_LIGHT_SHADOW = toGdkColor (rgba); COLOR_WIDGET_NORMAL_SHADOW = toGdkColor (rgba, 0.7); COLOR_WIDGET_HIGHLIGHT_SHADOW = toGdkColor (rgba, 1.3); - + OS.gtk_style_context_get_color (context, OS.GTK_STATE_FLAG_NORMAL, rgba); COLOR_WIDGET_FOREGROUND = toGdkColor (rgba); OS.gtk_style_context_get_background_color (context, OS.GTK_STATE_FLAG_NORMAL, rgba); COLOR_WIDGET_BACKGROUND = toGdkColor (rgba); - + OS.gtk_style_context_save (context); OS.gtk_style_context_add_class(context, OS.GTK_STYLE_CLASS_VIEW); OS.gtk_style_context_add_class(context, OS.GTK_STYLE_CLASS_CELL); @@ -2405,12 +2405,12 @@ void initializeSystemColors () { COLOR_LIST_SELECTION_TEXT_INACTIVE = toGdkColor (rgba); OS.gtk_style_context_get_background_color (context, OS.GTK_STATE_FLAG_ACTIVE, rgba); COLOR_LIST_SELECTION_INACTIVE = toGdkColor (rgba); - + COLOR_TITLE_FOREGROUND = COLOR_LIST_SELECTION_TEXT; COLOR_TITLE_BACKGROUND = COLOR_LIST_SELECTION; OS.gtk_style_context_get_background_color (context, OS.GTK_STATE_FLAG_SELECTED, rgba); COLOR_TITLE_BACKGROUND_GRADIENT = toGdkColor (rgba, 1.3); - + OS.gtk_style_context_get_color (context, OS.GTK_STATE_FLAG_INSENSITIVE, rgba); COLOR_TITLE_INACTIVE_FOREGROUND = toGdkColor (rgba); OS.gtk_style_context_get_background_color (context, OS.GTK_STATE_FLAG_INSENSITIVE, rgba); @@ -2427,10 +2427,10 @@ void initializeSystemColors () { gdkColor = new GdkColor(); OS.gtk_style_get_bg (tooltipStyle, OS.GTK_STATE_NORMAL, gdkColor); COLOR_INFO_BACKGROUND = gdkColor; - OS.gtk_widget_destroy (tooltipShellHandle); + OS.gtk_widget_destroy (tooltipShellHandle); /* Get Shell resources */ - long /*int*/ style = OS.gtk_widget_get_style (shellHandle); + long /*int*/ style = OS.gtk_widget_get_style (shellHandle); gdkColor = new GdkColor(); OS.gtk_style_get_black (style, gdkColor); COLOR_WIDGET_DARK_SHADOW = gdkColor; @@ -2498,7 +2498,7 @@ void initializeSystemColors () { * when there is no system taskBar available for the platform. * * @return the system taskBar or <code>null</code> - * + * * @exception SWTException <ul> * <li>ERROR_DEVICE_DISPOSED - if the receiver has been disposed</li> * </ul> @@ -2515,7 +2515,7 @@ public TaskBar getSystemTaskBar () { * when there is no system tray available for the platform. * * @return the system tray or <code>null</code> - * + * * @exception SWTException <ul> * <li>ERROR_DEVICE_DISPOSED - if the receiver has been disposed</li> * </ul> @@ -2532,7 +2532,7 @@ public Tray getSystemTray () { * Returns the user-interface thread for the receiver. * * @return the receiver's user-interface thread - * + * * @exception SWTException <ul> * <li>ERROR_DEVICE_DISPOSED - if the receiver has been disposed</li> * </ul> @@ -2544,7 +2544,7 @@ public Thread getThread () { } } -/** +/** * Returns a boolean indicating whether a touch-aware input device is * attached to the system and is ready for use. * @@ -2554,7 +2554,7 @@ public Thread getThread () { * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * <li>ERROR_DEVICE_DISPOSED - if the receiver has been disposed</li> * </ul> - * + * * @since 3.7 */ public boolean getTouchEnabled() { @@ -2570,7 +2570,7 @@ Widget getWidget (long /*int*/ handle) { lastHandle = handle; return lastWidget = widgetTable [(int)/*64*/index]; } - return null; + return null; } long /*int*/ idleProc (long /*int*/ data) { @@ -2589,7 +2589,7 @@ long /*int*/ idleProc (long /*int*/ data) { * <p> * This method is called after <code>create</code>. * </p> - * + * * @see #create */ @Override @@ -2680,7 +2680,7 @@ void initializeCallbacks () { windowCallback3 = new Callback (this, "windowProc", 3); //$NON-NLS-1$ windowProc3 = windowCallback3.getAddress (); - if (windowProc3 == 0) error (SWT.ERROR_NO_MORE_CALLBACKS); + if (windowProc3 == 0) error (SWT.ERROR_NO_MORE_CALLBACKS); closuresProc [Widget.BUTTON_PRESS_EVENT] = windowProc3; closuresProc [Widget.BUTTON_PRESS_EVENT_INVERSE] = windowProc3; @@ -2711,7 +2711,7 @@ void initializeCallbacks () { closuresProc [Widget.SHOW_HELP] = windowProc3; closuresProc [Widget.SIZE_ALLOCATE] = windowProc3; closuresProc [Widget.STYLE_SET] = windowProc3; - closuresProc [Widget.TOGGLED] = windowProc3; + closuresProc [Widget.TOGGLED] = windowProc3; closuresProc [Widget.UNMAP_EVENT] = windowProc3; closuresProc [Widget.VISIBILITY_NOTIFY_EVENT] = windowProc3; closuresProc [Widget.WINDOW_STATE_EVENT] = windowProc3; @@ -2720,7 +2720,7 @@ void initializeCallbacks () { windowCallback4 = new Callback (this, "windowProc", 4); //$NON-NLS-1$ windowProc4 = windowCallback4.getAddress (); - if (windowProc4 == 0) error (SWT.ERROR_NO_MORE_CALLBACKS); + if (windowProc4 == 0) error (SWT.ERROR_NO_MORE_CALLBACKS); closuresProc [Widget.DELETE_RANGE] = windowProc4; closuresProc [Widget.DELETE_TEXT] = windowProc4; @@ -2764,7 +2764,7 @@ void initializeCallbacks () { windowTimerCallback = new Callback (this, "windowTimerProc", 1); //$NON-NLS-1$ windowTimerProc = windowTimerCallback.getAddress (); if (windowTimerProc == 0) error (SWT.ERROR_NO_MORE_CALLBACKS); - + mouseHoverCallback = new Callback (this, "mouseHoverProc", 1); //$NON-NLS-1$ mouseHoverProc = mouseHoverCallback.getAddress (); if (mouseHoverProc == 0) error (SWT.ERROR_NO_MORE_CALLBACKS); @@ -2776,22 +2776,22 @@ void initializeCallbacks () { menuPositionCallback = new Callback(this, "menuPositionProc", 5); //$NON-NLS-1$ menuPositionProc = menuPositionCallback.getAddress(); if (menuPositionProc == 0) error (SWT.ERROR_NO_MORE_CALLBACKS); - + sizeAllocateCallback = new Callback(this, "sizeAllocateProc", 3); //$NON-NLS-1$ sizeAllocateProc = sizeAllocateCallback.getAddress(); if (sizeAllocateProc == 0) error (SWT.ERROR_NO_MORE_CALLBACKS); - + sizeRequestCallback = new Callback(this, "sizeRequestProc", 3); //$NON-NLS-1$ sizeRequestProc = sizeRequestCallback.getAddress(); if (sizeRequestProc == 0) error (SWT.ERROR_NO_MORE_CALLBACKS); - + shellMapCallback = new Callback(this, "shellMapProc", 3); //$NON-NLS-1$ shellMapProc = shellMapCallback.getAddress(); if (shellMapProc == 0) error (SWT.ERROR_NO_MORE_CALLBACKS); shellMapProcClosure = OS.g_cclosure_new (shellMapProc, 0, 0); OS.g_closure_ref (shellMapProcClosure); - + cellDataCallback = new Callback (this, "cellDataProc", 5); //$NON-NLS-1$ cellDataProc = cellDataCallback.getAddress (); if (cellDataProc == 0) error (SWT.ERROR_NO_MORE_CALLBACKS); @@ -2799,7 +2799,7 @@ void initializeCallbacks () { setDirectionCallback = new Callback (this, "setDirectionProc", 2); //$NON-NLS-1$ setDirectionProc = setDirectionCallback.getAddress (); if (setDirectionProc == 0) error (SWT.ERROR_NO_MORE_CALLBACKS); - + emissionProcCallback = new Callback (this, "emissionProc", 4); //$NON-NLS-1$ emissionProc = emissionProcCallback.getAddress (); if (emissionProc == 0) error (SWT.ERROR_NO_MORE_CALLBACKS); @@ -2830,19 +2830,19 @@ void initializeSubclasses () { imContextNewProc = OS.G_OBJECT_CLASS_CONSTRUCTOR (imContextClass); OS.G_OBJECT_CLASS_SET_CONSTRUCTOR (imContextClass, OS.imContextNewProc_CALLBACK(imContextNewProc)); OS.g_type_class_unref (imContextClass); - + long /*int*/ pangoFontFamilyType = OS.PANGO_TYPE_FONT_FAMILY (); long /*int*/ pangoFontFamilyClass = OS.g_type_class_ref (pangoFontFamilyType); pangoFontFamilyNewProc = OS.G_OBJECT_CLASS_CONSTRUCTOR (pangoFontFamilyClass); OS.G_OBJECT_CLASS_SET_CONSTRUCTOR (pangoFontFamilyClass, OS.pangoFontFamilyNewProc_CALLBACK(pangoFontFamilyNewProc)); OS.g_type_class_unref (pangoFontFamilyClass); - + long /*int*/ pangoFontFaceType = OS.PANGO_TYPE_FONT_FACE (); long /*int*/ pangoFontFaceClass = OS.g_type_class_ref (pangoFontFaceType); pangoFontFaceNewProc = OS.G_OBJECT_CLASS_CONSTRUCTOR (pangoFontFaceClass); OS.G_OBJECT_CLASS_SET_CONSTRUCTOR (pangoFontFaceClass, OS.pangoFontFaceNewProc_CALLBACK(pangoFontFaceNewProc)); OS.g_type_class_unref (pangoFontFaceClass); - + long /*int*/ printerOptionWidgetType = OS.gtk_printer_option_widget_get_type(); long /*int*/ printerOptionWidgetClass = OS.g_type_class_ref (printerOptionWidgetType); printerOptionWidgetNewProc = OS.G_OBJECT_CLASS_CONSTRUCTOR (printerOptionWidgetClass); @@ -2853,7 +2853,7 @@ void initializeSubclasses () { void initializeSystemSettings () { OS.g_signal_connect (shellHandle, OS.style_set, signalProc, STYLE_SET); - + /* * Feature in GTK. Despite the fact that the * gtk-entry-select-on-focus property is a global @@ -2897,7 +2897,7 @@ void initializeWindowManager () { } } -/** +/** * Invokes platform specific functionality to dispose a GC handle. * <p> * <b>IMPORTANT:</b> This method is <em>not</em> part of the public @@ -2908,8 +2908,8 @@ void initializeWindowManager () { * </p> * * @param hDC the platform specific GC handle - * @param data the platform specific GC data - * + * @param data the platform specific GC data + * * @noreference This method is not intended to be referenced by clients. */ @Override @@ -2922,7 +2922,7 @@ public void internal_dispose_GC (long /*int*/ hDC, GCData data) { } } -/** +/** * Invokes platform specific functionality to allocate a new GC handle. * <p> * <b>IMPORTANT:</b> This method is <em>not</em> part of the public @@ -2932,16 +2932,16 @@ public void internal_dispose_GC (long /*int*/ hDC, GCData data) { * application code. * </p> * - * @param data the platform specific GC data + * @param data the platform specific GC data * @return the platform specific GC handle - * + * * @exception SWTException <ul> * <li>ERROR_DEVICE_DISPOSED - if the receiver has been disposed</li> * </ul> * @exception SWTError <ul> * <li>ERROR_NO_HANDLES if a handle could not be obtained for gc creation</li> * </ul> - * + * * @noreference This method is not intended to be referenced by clients. */ @Override @@ -2985,7 +2985,7 @@ boolean isValidThread () { * systems are mirrored, special care needs to be taken * when mapping coordinates from one control to another * to ensure the result is correctly mirrored. - * + * * Mapping a point that is the origin of a rectangle and * then adding the width and height is not equivalent to * mapping the rectangle. When one control is mirrored @@ -2995,26 +2995,26 @@ boolean isValidThread () { * instead of just one point causes both the origin and * the corner of the rectangle to be mapped. * </p> - * + * * @param from the source <code>Control</code> or <code>null</code> * @param to the destination <code>Control</code> or <code>null</code> - * @param point to be mapped - * @return point with mapped coordinates - * + * @param point to be mapped + * @return point with mapped coordinates + * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the point is null</li> - * <li>ERROR_INVALID_ARGUMENT - if the Control from or the Control to have been disposed</li> + * <li>ERROR_INVALID_ARGUMENT - if the Control from or the Control to have been disposed</li> * </ul> * @exception SWTException <ul> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * <li>ERROR_DEVICE_DISPOSED - if the receiver has been disposed</li> * </ul> - * + * * @since 2.1.2 */ public Point map (Control from, Control to, Point point) { checkDevice (); - if (point == null) error (SWT.ERROR_NULL_ARGUMENT); + if (point == null) error (SWT.ERROR_NULL_ARGUMENT); return map (from, to, point.x, point.y); } @@ -3027,7 +3027,7 @@ public Point map (Control from, Control to, Point point) { * systems are mirrored, special care needs to be taken * when mapping coordinates from one control to another * to ensure the result is correctly mirrored. - * + * * Mapping a point that is the origin of a rectangle and * then adding the width and height is not equivalent to * mapping the rectangle. When one control is mirrored @@ -3037,21 +3037,21 @@ public Point map (Control from, Control to, Point point) { * instead of just one point causes both the origin and * the corner of the rectangle to be mapped. * </p> - * + * * @param from the source <code>Control</code> or <code>null</code> * @param to the destination <code>Control</code> or <code>null</code> * @param x coordinates to be mapped * @param y coordinates to be mapped * @return point with mapped coordinates - * + * * @exception IllegalArgumentException <ul> - * <li>ERROR_INVALID_ARGUMENT - if the Control from or the Control to have been disposed</li> + * <li>ERROR_INVALID_ARGUMENT - if the Control from or the Control to have been disposed</li> * </ul> * @exception SWTException <ul> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * <li>ERROR_DEVICE_DISPOSED - if the receiver has been disposed</li> * </ul> - * + * * @since 2.1.2 */ public Point map (Control from, Control to, int x, int y) { @@ -3084,7 +3084,7 @@ public Point map (Control from, Control to, int x, int y) { * systems are mirrored, special care needs to be taken * when mapping coordinates from one control to another * to ensure the result is correctly mirrored. - * + * * Mapping a point that is the origin of a rectangle and * then adding the width and height is not equivalent to * mapping the rectangle. When one control is mirrored @@ -3094,21 +3094,21 @@ public Point map (Control from, Control to, int x, int y) { * instead of just one point causes both the origin and * the corner of the rectangle to be mapped. * </p> - * + * * @param from the source <code>Control</code> or <code>null</code> * @param to the destination <code>Control</code> or <code>null</code> * @param rectangle to be mapped * @return rectangle with mapped coordinates - * + * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the rectangle is null</li> - * <li>ERROR_INVALID_ARGUMENT - if the Control from or the Control to have been disposed</li> + * <li>ERROR_INVALID_ARGUMENT - if the Control from or the Control to have been disposed</li> * </ul> * @exception SWTException <ul> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * <li>ERROR_DEVICE_DISPOSED - if the receiver has been disposed</li> * </ul> - * + * * @since 2.1.2 */ public Rectangle map (Control from, Control to, Rectangle rectangle) { @@ -3137,7 +3137,7 @@ static char mbcsToWcs (char ch) { long /*int*/ menuPositionProc (long /*int*/ menu, long /*int*/ x, long /*int*/ y, long /*int*/ push_in, long /*int*/ user_data) { Widget widget = getWidget (menu); if (widget == null) return 0; - return widget.menuPositionProc (menu, x, y, push_in, user_data); + return widget.menuPositionProc (menu, x, y, push_in, user_data); } /** @@ -3149,7 +3149,7 @@ long /*int*/ menuPositionProc (long /*int*/ menu, long /*int*/ x, long /*int*/ y * systems are mirrored, special care needs to be taken * when mapping coordinates from one control to another * to ensure the result is correctly mirrored. - * + * * Mapping a point that is the origin of a rectangle and * then adding the width and height is not equivalent to * mapping the rectangle. When one control is mirrored @@ -3159,7 +3159,7 @@ long /*int*/ menuPositionProc (long /*int*/ menu, long /*int*/ x, long /*int*/ y * instead of just one point causes both the origin and * the corner of the rectangle to be mapped. * </p> - * + * * @param from the source <code>Control</code> or <code>null</code> * @param to the destination <code>Control</code> or <code>null</code> * @param x coordinates to be mapped @@ -3167,15 +3167,15 @@ long /*int*/ menuPositionProc (long /*int*/ menu, long /*int*/ x, long /*int*/ y * @param width coordinates to be mapped * @param height coordinates to be mapped * @return rectangle with mapped coordinates - * + * * @exception IllegalArgumentException <ul> - * <li>ERROR_INVALID_ARGUMENT - if the Control from or the Control to have been disposed</li> + * <li>ERROR_INVALID_ARGUMENT - if the Control from or the Control to have been disposed</li> * </ul> * @exception SWTException <ul> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * <li>ERROR_DEVICE_DISPOSED - if the receiver has been disposed</li> * </ul> - * + * * @since 2.1.2 */ public Rectangle map (Control from, Control to, int x, int y, int width, int height) { @@ -3197,7 +3197,7 @@ public Rectangle map (Control from, Control to, int x, int y, int width, int hei rect.y -= origin.y; if (toRTL = (to.style & SWT.MIRRORED) != 0) rect.x = to.getClientWidth () - rect.x; } - + if (fromRTL != toRTL) rect.x -= rect.width; return rect; } @@ -3210,7 +3210,7 @@ long /*int*/ mouseHoverProc (long /*int*/ handle) { /** * Generate a low level system event. - * + * * <code>post</code> is used to generate low level keyboard * and mouse events. The intent is to enable automated UI * testing by simulating the input from the user. Most @@ -3253,11 +3253,11 @@ long /*int*/ mouseHoverProc (long /*int*/ handle) { * <li>(in) count the number of lines or pages to scroll * </ul> * </dl> - * + * * @param event the event to be generated - * + * * @return true if the event was generated or false otherwise - * + * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the event is null</li> * </ul> @@ -3266,7 +3266,7 @@ long /*int*/ mouseHoverProc (long /*int*/ handle) { * </ul> * * @since 3.0 - * + * */ public boolean post (Event event) { /* @@ -3311,7 +3311,7 @@ public boolean post (Event event) { return true; } case SWT.MouseDown: - case SWT.MouseMove: + case SWT.MouseMove: case SWT.MouseUp: { if (type == SWT.MouseMove) { OS.XTestFakeMotionEvent (xDisplay, -1, event.x, event.y, 0); @@ -3337,7 +3337,7 @@ public boolean post (Event event) { // case SWT.MouseWheel: { // if (event.count == 0) return false; // int button = event.count < 0 ? 5 : 4; -// OS.XTestFakeButtonEvent (xDisplay, button, type == SWT.MouseWheel, 0); +// OS.XTestFakeButtonEvent (xDisplay, button, type == SWT.MouseWheel, 0); // } } return false; @@ -3420,7 +3420,7 @@ public boolean readAndDispatch () { * This call to gdk_threads_leave() is a temporary work around * to avoid deadlocks when gdk_threads_init() is called by native * code outside of SWT (i.e AWT, etc). It ensures that the current - * thread leaves the GTK lock before calling the function below. + * thread leaves the GTK lock before calling the function below. */ OS.gdk_threads_leave(); events |= OS.g_main_context_iteration (0, false); @@ -3450,7 +3450,7 @@ static void register (Display display) { * Releases any internal resources back to the operating * system and clears all fields except the device handle. * <p> - * Disposes all shells which are currently open on the display. + * Disposes all shells which are currently open on the display. * After this method has been invoked, all related related shells * will answer <code>true</code> when sent the message * <code>isDisposed()</code>. @@ -3466,7 +3466,7 @@ static void register (Display display) { * The handle is needed by <code>destroy</code>. * </p> * This method is called before <code>destroy</code>. - * + * * @see Device#dispose * @see #destroy */ @@ -3499,7 +3499,7 @@ void releaseDisplay () { windowCallback4.dispose (); windowCallback4 = null; windowCallback5.dispose (); windowCallback5 = null; windowProc2 = windowProc3 = windowProc4 = windowProc5 = 0; - + /* Dispose xfilter callback */ if (filterProc != 0) { OS.gdk_window_remove_filter(0, filterProc, 0); @@ -3510,7 +3510,7 @@ void releaseDisplay () { /* Dispose checkIfEvent callback */ checkIfEventCallback.dispose(); checkIfEventCallback = null; checkIfEventProc = 0; - + /* Dispose preedit window */ if (preeditWindow != 0) OS.gtk_widget_destroy (preeditWindow); imControl = null; @@ -3524,25 +3524,25 @@ void releaseDisplay () { sizeAllocateProc = 0; sizeRequestCallback.dispose (); sizeRequestCallback = null; sizeRequestProc = 0; - + /* Dispose the shell map callback */ shellMapCallback.dispose (); shellMapCallback = null; shellMapProc = 0; - + /* Dispose the run async messages callback */ idleCallback.dispose (); idleCallback = null; idleProc = 0; if (idleHandle != 0) OS.g_source_remove (idleHandle); idleHandle = 0; - + /* Dispose GtkTreeView callbacks */ cellDataCallback.dispose (); cellDataCallback = null; cellDataProc = 0; - + /* Dispose the set direction callback */ setDirectionCallback.dispose (); setDirectionCallback = null; setDirectionProc = 0; - + /* Dispose the emission proc callback */ emissionProcCallback.dispose (); emissionProcCallback = null; emissionProc = 0; @@ -3557,7 +3557,7 @@ void releaseDisplay () { caretProc = 0; caretCallback.dispose (); caretCallback = null; - + /* Release closures */ for (int i = 0; i < Widget.LAST_SIGNAL; i++) { if (closures [i] != 0) OS.g_closure_unref (closures [i]); @@ -3578,21 +3578,21 @@ void releaseDisplay () { windowTimerProc = 0; windowTimerCallback.dispose (); windowTimerCallback = null; - + /* Dispose mouse hover callback */ if (mouseHoverId != 0) OS.g_source_remove (mouseHoverId); mouseHoverId = 0; mouseHoverHandle = mouseHoverProc = 0; mouseHoverCallback.dispose (); mouseHoverCallback = null; - + /* Dispose the System Images */ if (errorImage != null) errorImage.dispose(); if (infoImage != null) infoImage.dispose(); if (questionImage != null) questionImage.dispose(); if (warningImage != null) warningImage.dispose(); errorImage = infoImage = questionImage = warningImage = null; - + /* Release the System Cursors */ for (int i = 0; i < cursors.length; i++) { if (cursors [i] != null) cursors [i].dispose (); @@ -3619,11 +3619,11 @@ void releaseDisplay () { /* Dispose the event callback */ OS.gdk_event_handler_set (0, 0, 0); eventCallback.dispose (); eventCallback = null; - + /* Dispose the hidden shell */ if (shellHandle != 0) OS.gtk_widget_destroy (shellHandle); shellHandle = 0; - + /* Dispose the settings callback */ signalCallback.dispose(); signalCallback = null; signalProc = 0; @@ -3651,7 +3651,7 @@ void releaseDisplay () { OS.g_type_class_unref (pangoFontFaceClass); pangoFontFaceNewProc = 0; } - + /* Release the sleep resources */ max_priority = timeout = null; if (fds != 0) OS.g_free (fds); @@ -3695,7 +3695,7 @@ void releaseDisplay () { * @see SWT * @see #addFilter * @see #addListener - * + * * @since 3.0 */ public void removeFilter (int eventType, Listener listener) { @@ -3747,8 +3747,8 @@ void removeIdleProc () { * @see Listener * @see SWT * @see #addListener - * - * @since 2.0 + * + * @since 2.0 */ public void removeListener (int eventType, Listener listener) { checkDevice (); @@ -3786,7 +3786,7 @@ Widget removeWidget (long /*int*/ handle) { freeSlot = index; OS.g_object_set_qdata (handle, SWT_OBJECT_INDEX, 0); } - return widget; + return widget; } boolean runAsyncMessages (boolean all) { @@ -3801,7 +3801,7 @@ boolean runDeferredEvents () { * be re-enterant but need not be synchronized. */ while (eventQueue != null) { - + /* Take an event off the queue */ Event event = eventQueue [0]; if (event == null) break; @@ -3843,7 +3843,7 @@ boolean runDeferredLayouts () { } update (); return true; - } + } return false; } @@ -3884,8 +3884,8 @@ boolean runSettings () { boolean runSkin () { if (skinCount > 0) { - Widget [] oldSkinWidgets = skinList; - int count = skinCount; + Widget [] oldSkinWidgets = skinList; + int count = skinCount; skinList = new Widget[GROW_SIZE]; skinCount = 0; if (eventTable != null && eventTable.hooks(SWT.Skin)) { @@ -3901,7 +3901,7 @@ boolean runSkin () { } } return true; - } + } return false; } @@ -3909,22 +3909,22 @@ boolean runSkin () { * Returns the application name. * * @return the application name - * + * * @see #setAppName(String) - * + * * @since 3.6 */ public static String getAppName () { return APP_NAME; } - + /** * Returns the application version. * * @return the application version - * + * * @see #setAppVersion(String) - * + * * @since 3.6 */ public static String getAppVersion () { @@ -3937,9 +3937,9 @@ public static String getAppVersion () { * The application name can be used in several ways, * depending on the platform and tools being used. * Accessibility tools could ask for the application - * name. On Windows, if the application name is set + * name. On Windows, if the application name is set * to any value other than "SWT" (case insensitive), - * it is used to set the application user model ID + * it is used to set the application user model ID * which is used by the OS for taskbar grouping. * @see <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/dd378459%28v=vs.85%29.aspx#HOW">AppUserModelID (Windows)</a> * </p><p> @@ -3956,7 +3956,7 @@ public static void setAppName (String name) { * Sets the application version to the argument. * * @param version the new app version - * + * * @since 3.6 */ public static void setAppVersion (String version) { @@ -3970,12 +3970,12 @@ public static void setAppVersion (String version) { * * @param x the new x coordinate for the cursor * @param y the new y coordinate for the cursor - * + * * @exception SWTException <ul> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * <li>ERROR_DEVICE_DISPOSED - if the receiver has been disposed</li> * </ul> - * + * * @since 2.1 */ public void setCursorLocation (int x, int y) { @@ -3989,7 +3989,7 @@ public void setCursorLocation (int x, int y) { long /*int*/ gdkDeviceManager = OS.gdk_display_get_device_manager(gdkDisplay); long /*int*/ gdkScreen = OS.gdk_screen_get_default(); long /*int*/ gdkPointer = OS.gdk_device_manager_get_client_pointer(gdkDeviceManager); - OS.gdk_device_warp(gdkPointer,gdkScreen,x,y); + OS.gdk_device_warp(gdkPointer,gdkScreen,x,y); } } @@ -3999,13 +3999,13 @@ public void setCursorLocation (int x, int y) { * program to move the on-screen pointer location.</b> * * @param point new position - * + * * @exception SWTException <ul> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * <li>ERROR_NULL_ARGUMENT - if the point is null * <li>ERROR_DEVICE_DISPOSED - if the receiver has been disposed</li> * </ul> - * + * * @since 2.0 */ public void setCursorLocation (Point point) { @@ -4064,7 +4064,7 @@ public void setData (String key, Object value) { removeWidget (handle); } } - if (key.equals (ADD_IDLE_PROC_KEY)) { + if (key.equals (ADD_IDLE_PROC_KEY)) { addIdleProc (); return; } @@ -4094,7 +4094,7 @@ public void setData (String key, Object value) { } return; } - + /* Add the key/value pair */ if (keys == null) { keys = new String [] {key}; @@ -4121,7 +4121,7 @@ public void setData (String key, Object value) { * Sets the application defined, display specific data * associated with the receiver, to the argument. * The <em>display specific data</em> is a single, - * unnamed field that is stored with every display. + * unnamed field that is stored with every display. * <p> * Applications may put arbitrary objects in this field. If * the object stored in the display specific data needs to @@ -4215,7 +4215,7 @@ public void setSynchronizer (Synchronizer synchronizer) { void showIMWindow (Control control) { imControl = control; - if (preeditWindow == 0) { + if (preeditWindow == 0) { preeditWindow = OS.gtk_window_new (OS.GTK_WINDOW_POPUP); if (preeditWindow == 0) error (SWT.ERROR_NO_HANDLES); preeditLabel = OS.gtk_label_new (null); @@ -4241,7 +4241,7 @@ void showIMWindow (Control control) { if (pangoAttrs [0] != 0) OS.gtk_label_set_attributes (preeditLabel, pangoAttrs[0]); OS.gtk_label_set_text (preeditLabel, preeditString [0]); Point point = control.toDisplay (control.getIMCaretPos ()); - OS.gtk_window_move (preeditWindow, point.x, point.y); + OS.gtk_window_move (preeditWindow, point.x, point.y); GtkRequisition requisition = new GtkRequisition (); if (OS.GTK3) { OS.gtk_widget_get_preferred_size (preeditLabel, requisition, null); @@ -4252,9 +4252,9 @@ void showIMWindow (Control control) { OS.gtk_widget_show (preeditWindow); } else { OS.gtk_widget_hide (preeditWindow); - } + } if (preeditString [0] != 0) OS.g_free (preeditString [0]); - if (pangoAttrs [0] != 0) OS.pango_attr_list_unref (pangoAttrs [0]); + if (pangoAttrs [0] != 0) OS.pango_attr_list_unref (pangoAttrs [0]); } /** @@ -4304,12 +4304,12 @@ public boolean sleep () { if (poll != 0) { if (nfds > 0 || timeout [0] != 0) { /* - * Bug in GTK. For some reason, g_main_context_wakeup() may + * Bug in GTK. For some reason, g_main_context_wakeup() may * fail to wake up the UI thread from the polling function. * The fix is to sleep for a maximum of 50 milliseconds. */ if (timeout [0] < 0) timeout [0] = 50; - + /* Exit the OS lock to allow other threads to enter GTK */ Lock lock = OS.lock; int count = lock.lock (); @@ -4338,7 +4338,7 @@ public boolean sleep () { * number of milliseconds have elapsed. If milliseconds is less * than zero, the runnable is not executed. * <p> - * Note that at the time the runnable is invoked, widgets + * Note that at the time the runnable is invoked, widgets * that have the receiver as their display may have been * disposed. Therefore, it is necessary to check for this * case inside the runnable before accessing the widget. @@ -4361,7 +4361,7 @@ public void timerExec (int milliseconds, Runnable runnable) { checkDevice (); if (runnable == null) error (SWT.ERROR_NULL_ARGUMENT); if (timerList == null) timerList = new Runnable [4]; - if (timerIds == null) timerIds = new int [4]; + if (timerIds == null) timerIds = new int [4]; int index = 0; while (index < timerList.length) { if (timerList [index] == runnable) break; @@ -4535,7 +4535,7 @@ void setCurrentCaret (Caret caret) { currentCaret = caret; if (caret == null) return; int blinkRate = currentCaret.blinkRate; - caretId = OS.g_timeout_add (blinkRate, caretProc, 0); + caretId = OS.g_timeout_add (blinkRate, caretProc, 0); } long /*int*/ shellMapProc (long /*int*/ handle, long /*int*/ arg0, long /*int*/ user_data) { @@ -4556,7 +4556,7 @@ long /*int*/ signalProc (long /*int*/ gobject, long /*int*/ arg1, long /*int*/ u byte[] name = Converter.wcsToMbcs (null, "org.eclipse.swt.filePath.message", true); //$NON-NLS-1$ long /*int*/ atom = OS.gdk_x11_atom_to_xatom (OS.gdk_atom_intern (name, true)); if (atom == OS.gdk_x11_atom_to_xatom (gdkEvent.atom)) { - long /*int*/ xWindow; + long /*int*/ xWindow; if (OS.GTK3) { xWindow = OS.gdk_x11_window_get_xid (OS.gtk_widget_get_window (shellHandle)); } else if (OS.GTK_VERSION >= OS.VERSION(2, 14, 0)){ @@ -4571,14 +4571,14 @@ long /*int*/ signalProc (long /*int*/ gobject, long /*int*/ arg1, long /*int*/ u long /*int*/ [] data = new long /*int*/ [1]; OS.XGetWindowProperty (OS.gdk_x11_display_get_xdisplay(OS.gdk_display_get_default()), xWindow, atom, 0, -1, true, OS.AnyPropertyType, type, format, nitems, bytes_after, data); - + if (nitems [0] > 0) { byte [] buffer = new byte [nitems [0]]; OS.memmove(buffer, data [0], buffer.length); OS.XFree (data [0]); char[] chars = Converter.mbcsToWcs(null, buffer); String string = new String (chars); - + int lastIndex = 0; int index = string.indexOf (':'); while (index != -1) { @@ -4599,17 +4599,17 @@ long /*int*/ signalProc (long /*int*/ gobject, long /*int*/ arg1, long /*int*/ u /** * Causes the <code>run()</code> method of the runnable to - * be invoked by the user-interface thread at the next + * be invoked by the user-interface thread at the next * reasonable opportunity. The thread which calls this method * is suspended until the runnable completes. Specifying <code>null</code> * as the runnable simply wakes the user-interface thread. * <p> - * Note that at the time the runnable is invoked, widgets + * Note that at the time the runnable is invoked, widgets * that have the receiver as their display may have been * disposed. Therefore, it is necessary to check for this * case inside the runnable before accessing the widget. * </p> - * + * * @param runnable code to run on the user-interface thread or <code>null</code> * * @exception SWTException <ul> @@ -4656,7 +4656,7 @@ static int untranslateKey (int key) { * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * <li>ERROR_DEVICE_DISPOSED - if the receiver has been disposed</li> * </ul> - * + * * @see Control#update() */ public void update () { @@ -4666,14 +4666,14 @@ public void update () { } /** - * If the receiver's user-interface thread was <code>sleep</code>ing, + * If the receiver's user-interface thread was <code>sleep</code>ing, * causes it to be awakened and start running again. Note that this * method may be called from any thread. - * + * * @exception SWTException <ul> * <li>ERROR_DEVICE_DISPOSED - if the receiver has been disposed</li> * </ul> - * + * * @see #sleep */ public void wake () { diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ExpandBar.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ExpandBar.java index 68e4f02ea6..db463d0a6b 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ExpandBar.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ExpandBar.java @@ -31,7 +31,7 @@ import org.eclipse.swt.graphics.*; * </p><p> * IMPORTANT: This class is <em>not</em> intended to be subclassed. * </p> - * + * * @see ExpandItem * @see ExpandEvent * @see ExpandListener @@ -39,7 +39,7 @@ import org.eclipse.swt.graphics.*; * @see <a href="http://www.eclipse.org/swt/snippets/#expandbar">ExpandBar snippets</a> * @see <a href="http://www.eclipse.org/swt/examples.php">SWT Example: ControlExample</a> * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a> - * + * * @since 3.2 * @noextend This class is not intended to be subclassed by clients. */ @@ -56,7 +56,7 @@ public class ExpandBar extends Composite { * <p> * The style value is either one of the style constants defined in * class <code>SWT</code> which is applicable to instances of this - * class, or must be built by <em>bitwise OR</em>'ing together + * class, or must be built by <em>bitwise OR</em>'ing together * (that is, using the <code>int</code> "|" operator) two or more * of those <code>SWT</code> style constants. The class description * lists the style constants that are applicable to the class. @@ -175,7 +175,7 @@ void createItem (ExpandItem item, int style, int index) { @Override void createWidget (int index) { super.createWidget (index); - items = new ExpandItem [4]; + items = new ExpandItem [4]; } void destroyItem (ExpandItem item) { @@ -269,11 +269,11 @@ public int getItemCount () { /** * Returns an array of <code>ExpandItem</code>s which are the items - * in the receiver. + * in the receiver. * <p> * Note: This is not the actual structure used by the receiver * to maintain its list of items, so modifying the array will - * not affect the receiver. + * not affect the receiver. * </p> * * @return the items in the receiver @@ -321,7 +321,7 @@ long /*int*/ gtk_key_press_event (long /*int*/ widget, long /*int*/ event) { switch (gdkEvent.keyval) { case OS.GDK_Up: case OS.GDK_Left: next = false; break; - case OS.GDK_Down: + case OS.GDK_Down: case OS.GDK_Right: next = true; break; default: return result; } @@ -335,7 +335,7 @@ long /*int*/ gtk_key_press_event (long /*int*/ widget, long /*int*/ event) { /** * Searches the receiver's list starting at the first item - * (index 0) until an item is found that is equal to the + * (index 0) until an item is found that is equal to the * argument, and returns the index of that item. If no item * is found, returns -1. * @@ -470,7 +470,7 @@ void setScrollbar () { yCurrentScroll = Math.max (0, yCurrentScroll + maxHeight - height); layoutItems (0, false); } - maxHeight += yCurrentScroll; + maxHeight += yCurrentScroll; adjustment.value = Math.min (yCurrentScroll, maxHeight); adjustment.upper = maxHeight; adjustment.page_size = height; @@ -495,9 +495,9 @@ void setScrollbar () { } /** - * Sets the receiver's spacing. Spacing specifies the number of pixels allocated around + * Sets the receiver's spacing. Spacing specifies the number of pixels allocated around * each item. - * + * * @param spacing the spacing around each item * * @exception SWTException <ul> diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ExpandItem.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ExpandItem.java index ab81d0534f..71afc0081f 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ExpandItem.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ExpandItem.java @@ -28,10 +28,10 @@ import org.eclipse.swt.graphics.*; * </p><p> * IMPORTANT: This class is <em>not</em> intended to be subclassed. * </p> - * + * * @see ExpandBar * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a> - * + * * @since 3.2 * @noextend This class is not intended to be subclassed by clients. */ @@ -53,7 +53,7 @@ public class ExpandItem extends Item { * <p> * The style value is either one of the style constants defined in * class <code>SWT</code> which is applicable to instances of this - * class, or must be built by <em>bitwise OR</em>'ing together + * class, or must be built by <em>bitwise OR</em>'ing together * (that is, using the <code>int</code> "|" operator) two or more * of those <code>SWT</code> style constants. The class description * lists the style constants that are applicable to the class. @@ -87,7 +87,7 @@ public ExpandItem (ExpandBar parent, int style) { * <p> * The style value is either one of the style constants defined in * class <code>SWT</code> which is applicable to instances of this - * class, or must be built by <em>bitwise OR</em>'ing together + * class, or must be built by <em>bitwise OR</em>'ing together * (that is, using the <code>int</code> "|" operator) two or more * of those <code>SWT</code> style constants. The class description * lists the style constants that are applicable to the class. @@ -128,7 +128,7 @@ void createHandle (int index) { if (handle == 0) error (SWT.ERROR_NO_HANDLES); clientHandle = OS.g_object_new (display.gtk_fixed_get_type (), 0); if (clientHandle == 0) error (SWT.ERROR_NO_HANDLES); - OS.gtk_container_add (handle, clientHandle); + OS.gtk_container_add (handle, clientHandle); boxHandle = gtk_box_new (OS.GTK_ORIENTATION_HORIZONTAL, false, 4); if (boxHandle == 0) error (SWT.ERROR_NO_HANDLES); labelHandle = OS.gtk_label_new (null); @@ -259,9 +259,9 @@ public boolean getExpanded () { } /** - * Returns the height of the receiver's header + * Returns the height of the receiver's header * - * @return the height of the header + * @return the height of the header * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> @@ -403,17 +403,17 @@ void resizeControl (int yScroll) { int y = allocation.y; if (x != -1 && y != -1) { int width = allocation.width; - int height = allocation.height; + int height = allocation.height; int [] property = new int [1]; - OS.gtk_widget_style_get (handle, OS.focus_line_width, property, 0); + OS.gtk_widget_style_get (handle, OS.focus_line_width, property, 0); y += property [0] * 2; height -= property [0] * 2; - + /* * Feature in GTK. When the ExpandBar is resize too small the control - * shows up on top of the vertical scrollbar. This happen because the + * shows up on top of the vertical scrollbar. This happen because the * GtkExpander does not set the size of child smaller than the request - * size of its parent and because the control is not parented in the + * size of its parent and because the control is not parented in the * hierarchy of the GtkScrolledWindow. * The fix is calculate the width ourselves when the scrollbar is visible. */ @@ -421,7 +421,7 @@ void resizeControl (int yScroll) { if (vBar != null) { if (gtk_widget_get_visible (vBar.handle)) { gtk_widget_get_allocation (parent.scrolledHandle, allocation); - width = allocation.width - parent.vScrollBarWidth () - 2 * parent.spacing; + width = allocation.width - parent.vScrollBarWidth () - 2 * parent.spacing; } } control.setBounds (x, y - yScroll, width, Math.max (0, height), true, true); @@ -459,7 +459,7 @@ void setBounds (int x, int y, int width, int height, boolean move, boolean size) * @param control the new control (or null) * * @exception IllegalArgumentException <ul> - * <li>ERROR_INVALID_ARGUMENT - if the control has been disposed</li> + * <li>ERROR_INVALID_ARGUMENT - if the control has been disposed</li> * <li>ERROR_INVALID_PARENT - if the control is not in the same widget tree</li> * </ul> * @exception SWTException <ul> @@ -522,7 +522,7 @@ void setForegroundColor (GdkColor color) { } /** - * Sets the height of the receiver. This is height of the item when it is expanded, + * Sets the height of the receiver. This is height of the item when it is expanded, * excluding the height of the header. * * @param height the new height @@ -569,7 +569,7 @@ void setOrientation (boolean create) { OS.gtk_container_forall (handle, display.setDirectionProc, dir); } } - + @Override public void setText (String string) { super.setText (string); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/FileDialog.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/FileDialog.java index 3a8c190418..fec04abeb3 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/FileDialog.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/FileDialog.java @@ -29,7 +29,7 @@ import org.eclipse.swt.internal.gtk.*; * </p><p> * IMPORTANT: This class is <em>not</em> intended to be subclassed. * </p> - * + * * @see <a href="http://www.eclipse.org/swt/snippets/#filedialog">FileDialog snippets</a> * @see <a href="http://www.eclipse.org/swt/examples.php">SWT Example: ControlExample, Dialog tab</a> * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a> @@ -50,7 +50,7 @@ public class FileDialog extends Dialog { static final char EXTENSION_SEPARATOR = ';'; static final char FILE_EXTENSION_SEPARATOR = '.'; private static final int PATH_MAX = 1024; - + /** * Constructs a new instance of this class given only its parent. * @@ -73,7 +73,7 @@ public FileDialog (Shell parent) { * <p> * The style value is either one of the style constants defined in * class <code>SWT</code> which is applicable to instances of this - * class, or must be built by <em>bitwise OR</em>'ing together + * class, or must be built by <em>bitwise OR</em>'ing together * (that is, using the <code>int</code> "|" operator) two or more * of those <code>SWT</code> style constants. The class description * lists the style constants that are applicable to the class. @@ -90,7 +90,7 @@ public FileDialog (Shell parent) { * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the parent</li> * <li>ERROR_INVALID_SUBCLASS - if this class is not an allowed subclass</li> * </ul> - * + * * @see SWT#SAVE * @see SWT#OPEN * @see SWT#MULTI @@ -208,7 +208,7 @@ String computeResultChooserDialog () { * Returns the path of the first file that was * selected in the dialog relative to the filter path, or an * empty string if no such file has been selected. - * + * * @return the relative path of the file */ public String getFileName () { @@ -217,7 +217,7 @@ public String getFileName () { /** * Returns a (possibly empty) array with the paths of all files * that were selected in the dialog relative to the filter path. - * + * * @return the relative paths of the files */ public String [] getFileNames () { @@ -242,10 +242,10 @@ public String [] getFilterExtensions () { * </p> * * @return index the file extension filter index - * + * * @see #getFilterExtensions * @see #getFilterNames - * + * * @since 3.4 */ public int getFilterIndex () { @@ -266,7 +266,7 @@ public String [] getFilterNames () { * in the dialog, filtered according to the filter extensions. * * @return the directory path string - * + * * @see #setFilterExtensions */ public String getFilterPath () { @@ -278,7 +278,7 @@ public String getFilterPath () { * overwrite if the selected file already exists. * * @return true if the dialog will prompt for file overwrite, false otherwise - * + * * @since 3.4 */ public boolean getOverwrite () { @@ -336,14 +336,14 @@ String openChooserDialog () { if ((style & SWT.RIGHT_TO_LEFT) != 0) { signalId = OS.g_signal_lookup (OS.map, OS.GTK_TYPE_WIDGET()); hookId = OS.g_signal_add_emission_hook (signalId, 0, display.emissionProc, handle, 0); - } + } display.sendPreExternalEventDispatchEvent (); int response = OS.gtk_dialog_run (handle); /* * This call to gdk_threads_leave() is a temporary work around * to avoid deadlocks when gdk_threads_init() is called by native * code outside of SWT (i.e AWT, etc). It ensures that the current - * thread leaves the GTK lock acquired by the function above. + * thread leaves the GTK lock acquired by the function above. */ OS.gdk_threads_leave(); display.sendPostExternalEventDispatchEvent (); @@ -361,7 +361,7 @@ String openChooserDialog () { return answer; } void presetChooserDialog () { - /* MULTI is only valid if the native dialog's action is Open */ + /* MULTI is only valid if the native dialog's action is Open */ if ((style & (SWT.SAVE | SWT.MULTI)) == SWT.MULTI) { OS.gtk_file_chooser_set_select_multiple (handle, true); } @@ -380,7 +380,7 @@ void presetChooserDialog () { byte [] buffer = Converter.wcsToMbcs (null, SEPARATOR + filterPath, true); /* * in GTK version 2.10, gtk_file_chooser_set_current_folder requires path - * to be true canonical path. So using realpath to convert the path to + * to be true canonical path. So using realpath to convert the path to * true canonical path. */ if (OS.IsAIX) { @@ -449,7 +449,7 @@ void presetChooserDialog () { } else { /* * in GTK version 2.10, gtk_file_chooser_set_current_folder requires path - * to be true canonical path. So using realpath to convert the path to + * to be true canonical path. So using realpath to convert the path to * true canonical path. */ if (OS.IsAIX) { @@ -478,7 +478,7 @@ void presetChooserDialog () { } } } - + /* Set overwrite mode */ if ((style & SWT.SAVE) != 0) { OS.gtk_file_chooser_set_do_overwrite_confirmation (handle, overwrite); @@ -528,9 +528,9 @@ void presetChooserDialog () { * *.jp* corresponds to all the files with extension starting with jp like jpg,jpeg etc * *.jp? corresponds to 3 letter extension starting with jp with any 3rd letter * *.[pq]ng this corresponds to *.png and *.qng - * + * * @param extension file extension as a string - * + * * @returns true if the extension contains any of the glob pattern wildcards */ private boolean isGlobPattern (String extension) { @@ -546,7 +546,7 @@ private boolean isGlobPattern (String extension) { * select by default when opened to the argument, * which may be null. The name will be prefixed with * the filter path when one is supplied. - * + * * @param string the file name */ public void setFileName (String string) { @@ -565,7 +565,7 @@ public void setFileName (String string) { * </p> * * @param extensions the file extension filter - * + * * @see #setFilterNames to specify the user-friendly * names corresponding to the extensions */ @@ -582,10 +582,10 @@ public void setFilterExtensions (String [] extensions) { * </p> * * @param index the file extension filter index - * + * * @see #setFilterExtensions * @see #setFilterNames - * + * * @since 3.4 */ public void setFilterIndex (int index) { @@ -602,7 +602,7 @@ public void setFilterIndex (int index) { * </p> * * @param names the list of filter names, or null for no filter names - * + * * @see #setFilterExtensions */ public void setFilterNames (String [] names) { @@ -622,7 +622,7 @@ public void setFilterNames (String [] names) { * </p> * * @param string the directory path - * + * * @see #setFilterExtensions */ public void setFilterPath (String string) { @@ -635,18 +635,18 @@ public void setFilterPath (String string) { * overwrite if the selected file already exists. * * @param overwrite true if the dialog will prompt for file overwrite, false otherwise - * + * * @since 3.4 */ public void setOverwrite (boolean overwrite) { this.overwrite = overwrite; } /* Sets URI Mode. - * + * * When the FileDialog is in URI mode it returns * a URI (instead of a file name) for the following * methods: open() and getFilterPath(). - * The input argment for setFilterPath() should also + * The input argment for setFilterPath() should also * be a URI. */ /*public*/ void setURIMode (boolean uriMode) { diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/FontDialog.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/FontDialog.java index 18b4117ea2..5818db8607 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/FontDialog.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/FontDialog.java @@ -28,7 +28,7 @@ import org.eclipse.swt.graphics.*; * <p> * IMPORTANT: This class is <em>not</em> intended to be subclassed. * </p> - * + * * @see <a href="http://www.eclipse.org/swt/examples.php">SWT Example: ControlExample, Dialog tab</a> * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a> * @noextend This class is not intended to be subclassed by clients. @@ -58,7 +58,7 @@ public FontDialog (Shell parent) { * <p> * The style value is either one of the style constants defined in * class <code>SWT</code> which is applicable to instances of this - * class, or must be built by <em>bitwise OR</em>'ing together + * class, or must be built by <em>bitwise OR</em>'ing together * (that is, using the <code>int</code> "|" operator) two or more * of those <code>SWT</code> style constants. The class description * lists the style constants that are applicable to the class. @@ -87,11 +87,11 @@ public FontDialog (Shell parent, int style) { * <p> * If the platform's font dialog does not have any effects selection controls, * then this method always returns false. - * </p> + * </p> * * @return <code>true</code> if the dialog's effects selection controls * are visible and <code>false</code> otherwise - * + * * @since 3.8 */ public boolean getEffectsVisible () { @@ -102,7 +102,7 @@ public boolean getEffectsVisible () { /** * Returns a FontData object describing the font that was * selected in the dialog, or null if none is available. - * + * * @return the FontData for the selected font, or null * @deprecated use #getFontList () */ @@ -114,7 +114,7 @@ public FontData getFontData () { /** * Returns a FontData set describing the font that was * selected in the dialog, or null if none is available. - * + * * @return the FontData for the selected font, or null * @since 2.1.1 */ @@ -132,7 +132,7 @@ public FontData [] getFontList () { * @return the RGB value for the selected color, or null * * @see PaletteData#getRGBs - * + * * @since 2.1 */ public RGB getRGB () { @@ -190,14 +190,14 @@ public FontData open () { if ((style & SWT.RIGHT_TO_LEFT) != 0) { signalId = OS.g_signal_lookup (OS.map, OS.GTK_TYPE_WIDGET()); hookId = OS.g_signal_add_emission_hook (signalId, 0, display.emissionProc, handle, 0); - } + } display.sendPreExternalEventDispatchEvent (); int response = OS.gtk_dialog_run (handle); /* * This call to gdk_threads_leave() is a temporary work around * to avoid deadlocks when gdk_threads_init() is called by native * code outside of SWT (i.e AWT, etc). It ensures that the current - * thread leaves the GTK lock acquired by the function above. + * thread leaves the GTK lock acquired by the function above. */ OS.gdk_threads_leave(); display.sendPostExternalEventDispatchEvent (); @@ -207,7 +207,7 @@ public FontData open () { if (OS.gtk_window_get_modal (handle)) { display.setModalDialog (oldModal); } - boolean success = response == OS.GTK_RESPONSE_OK; + boolean success = response == OS.GTK_RESPONSE_OK; if (success) { long /*int*/ fontName = gtk_font_chooser_get_font (handle); int length = OS.strlen (fontName); @@ -217,7 +217,7 @@ public FontData open () { long /*int*/ fontDesc = OS.pango_font_description_from_string (buffer); Font font = Font.gtk_new (display, fontDesc); fontData = font.getFontData () [0]; - OS.pango_font_description_free (fontDesc); + OS.pango_font_description_free (fontDesc); } display.removeIdleProc (); OS.gtk_widget_destroy(handle); @@ -233,7 +233,7 @@ public FontData open () { * </p> * * @param visible whether or not the dialog will show the effects selection controls - * + * * @since 3.8 */ public void setEffectsVisible(boolean visible) { @@ -244,7 +244,7 @@ public void setEffectsVisible(boolean visible) { * Sets a FontData object describing the font to be * selected by default in the dialog, or null to let * the platform choose one. - * + * * @param fontData the FontData to use initially, or null * @deprecated use #setFontList (FontData []) */ @@ -257,12 +257,12 @@ public void setFontData (FontData fontData) { * Sets the set of FontData objects describing the font to * be selected by default in the dialog, or null to let * the platform choose one. - * + * * @param fontData the set of FontData objects to use initially, or null * to let the platform select a default when open() is called * * @see Font#getFontData - * + * * @since 2.1.1 */ public void setFontList (FontData [] fontData) { @@ -280,7 +280,7 @@ public void setFontList (FontData [] fontData) { * the platform select a default when open() is called * * @see PaletteData#getRGBs - * + * * @since 2.1 */ public void setRGB (RGB rgb) { diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Group.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Group.java index ad1e6ca4fc..3d2086a285 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Group.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Group.java @@ -35,7 +35,7 @@ import org.eclipse.swt.graphics.*; * </p><p> * IMPORTANT: This class is <em>not</em> intended to be subclassed. * </p> - * + * * @see <a href="http://www.eclipse.org/swt/examples.php">SWT Example: ControlExample</a> * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a> * @noextend This class is not intended to be subclassed by clients. @@ -50,7 +50,7 @@ public class Group extends Composite { * <p> * The style value is either one of the style constants defined in * class <code>SWT</code> which is applicable to instances of this - * class, or must be built by <em>bitwise OR</em>'ing together + * class, or must be built by <em>bitwise OR</em>'ing together * (that is, using the <code>int</code> "|" operator) two or more * of those <code>SWT</code> style constants. The class description * lists the style constants that are applicable to the class. @@ -129,15 +129,15 @@ public Rectangle getClientArea () { Rectangle clientRectangle = super.getClientArea (); /* * Bug 453827 Child position fix. - * SWT's calls to gtk_widget_size_allocate and gtk_widget_set_allocation + * SWT's calls to gtk_widget_size_allocate and gtk_widget_set_allocation * causes GTK+ to move the clientHandle's SwtFixed down by the size of the label. * These calls can come up from 'shell' and group has no control over these calls. - * + * * This is an undesired side-effect. Client handle's x & y positions should never * be incremented as this is an internal sub-container. - * + * * Note: 0 by 0 was chosen as 1 by 1 shifts controls beyond their original pos. - * The long term fix would be to not use widget_*_allocation from higher containers + * The long term fix would be to not use widget_*_allocation from higher containers * like shell and to not use gtkframe in non-group widgets (e.g used in label atm). */ clientRectangle.x = 0; @@ -165,8 +165,8 @@ void createHandle(int index) { clientHandle = OS.g_object_new (display.gtk_fixed_get_type (), 0); if (clientHandle == 0) error (SWT.ERROR_NO_HANDLES); /* - * Bug 453827 - clientHandle now has it's own window so that - * it can listen to events (clicking/tooltip etc.) and so that + * Bug 453827 - clientHandle now has it's own window so that + * it can listen to events (clicking/tooltip etc.) and so that * background can be drawn on it. */ gtk_widget_set_has_window (clientHandle, true); @@ -350,7 +350,7 @@ public void setText (String string) { if (string.length () != 0) { if (OS.gtk_frame_get_label_widget (handle) == 0) { OS.gtk_frame_set_label_widget (handle, labelHandle); - } + } } else { OS.gtk_frame_set_label_widget (handle, 0); } diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/IME.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/IME.java index 64f0853e4e..be16a261d9 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/IME.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/IME.java @@ -22,7 +22,7 @@ import org.eclipse.swt.internal.gtk.*; * These are typically in-line pre-edit text areas that allow * the user to compose characters from Far Eastern languages * such as Japanese, Chinese or Korean. - * + * * <dl> * <dt><b>Styles:</b></dt> * <dd>(none)</dd> @@ -32,9 +32,9 @@ import org.eclipse.swt.internal.gtk.*; * <p> * IMPORTANT: This class is <em>not</em> intended to be subclassed. * </p> - * + * * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a> - * + * * @since 3.4 * @noextend This class is not intended to be subclassed by clients. */ @@ -60,7 +60,7 @@ IME () { * <p> * The style value is either one of the style constants defined in * class <code>SWT</code> which is applicable to instances of this - * class, or must be built by <em>bitwise OR</em>'ing together + * class, or must be built by <em>bitwise OR</em>'ing together * (that is, using the <code>int</code> "|" operator) two or more * of those <code>SWT</code> style constants. The class description * lists the style constants that are applicable to the class. @@ -116,14 +116,14 @@ public int getCaretOffset () { * number of characters that have been composed. When the * commit count is equal to the length of the composition * text, then the in-line edit operation is complete. - * + * * @return the commit count * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @see IME#getText */ public int getCommitCount () { @@ -164,7 +164,7 @@ public int getCompositionOffset () { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @see IME#getStyles */ public int [] getRanges () { @@ -172,7 +172,7 @@ public int [] getRanges () { if (ranges == null) return new int [0]; int [] result = new int [ranges.length]; for (int i = 0; i < result.length; i++) { - result [i] = ranges [i] + startOffset; + result [i] = ranges [i] + startOffset; } return result; } @@ -185,14 +185,14 @@ public int [] getRanges () { * that starts at ranges[n] and ends at ranges[n+1] uses the style * at styles[n/2]. * </p> - * + * * @return the ranges for the styles * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @see IME#getRanges */ public TextStyle [] getStyles () { @@ -229,7 +229,7 @@ public String getText () { * <code>false</code> otherwise. In some languages, for example * Korean, the caret is typically widened to the width of the * current character in the in-line edit session. - * + * * @return the wide caret state * * @exception SWTException <ul> @@ -239,7 +239,7 @@ public String getText () { */ public boolean getWideCaret () { checkWidget (); - return false; + return false; } @Override @@ -361,7 +361,7 @@ long /*int*/ gtk_preedit_changed (long /*int*/ imcontext) { OS.pango_attr_iterator_next (iterator); } OS.pango_attr_iterator_destroy (iterator); - OS.pango_attr_list_unref (pangoAttrs [0]); + OS.pango_attr_list_unref (pangoAttrs [0]); } OS.g_free (preeditString [0]); } @@ -370,11 +370,11 @@ long /*int*/ gtk_preedit_changed (long /*int*/ imcontext) { /* * Bug in GTK. In Solaris, the IME sends multiple * preedit_changed signals with an empty text. - * This behavior is not correct for SWT and can + * This behavior is not correct for SWT and can * cause the editor to replace its current selection - * with an empty string. The fix is to ignore any + * with an empty string. The fix is to ignore any * preedit_changed signals with an empty text when - * the preedit buffer is already empty. + * the preedit buffer is already empty. */ if (chars.length == 0) return 0; startOffset = -1; diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Label.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Label.java index ebca631c6a..c8fa4d9d04 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Label.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Label.java @@ -61,7 +61,7 @@ public class Label extends Control { * <p> * The style value is either one of the style constants defined in * class <code>SWT</code> which is applicable to instances of this - * class, or must be built by <em>bitwise OR</em>'ing together + * class, or must be built by <em>bitwise OR</em>'ing together * (that is, using the <code>int</code> "|" operator) two or more * of those <code>SWT</code> style constants. The class description * lists the style constants that are applicable to the class. @@ -101,7 +101,7 @@ static int checkStyle (int style) { if ((style & SWT.SEPARATOR) != 0) { style = checkBits (style, SWT.VERTICAL, SWT.HORIZONTAL, 0, 0, 0, 0); return checkBits (style, SWT.SHADOW_OUT, SWT.SHADOW_IN, SWT.SHADOW_NONE, 0, 0, 0); - } + } return checkBits (style, SWT.LEFT, SWT.CENTER, SWT.RIGHT, 0, 0, 0); } @@ -125,10 +125,10 @@ public Point computeSize (int wHint, int hHint, boolean changed) { if (hHint == SWT.DEFAULT) hHint = DEFAULT_HEIGHT; } } - Point size; - /* - * Feature in GTK. GTK has a predetermined maximum width for wrapping text. - * The fix is to use pango layout directly instead of the label size request + Point size; + /* + * Feature in GTK. GTK has a predetermined maximum width for wrapping text. + * The fix is to use pango layout directly instead of the label size request * to calculate its preferred size. */ boolean fixWrap = labelHandle != 0 && (style & SWT.WRAP) != 0 && gtk_widget_get_visible (labelHandle); @@ -152,7 +152,7 @@ public Point computeSize (int wHint, int hHint, boolean changed) { OS.gtk_widget_set_size_request (labelHandle, labelWidth [0], labelHeight [0]); size.x = size.x - 1; size.y = size.y - 1; - } else { + } else { size = new Point (0,0); } size.x += wHint == SWT.DEFAULT ? w [0] : wHint; @@ -173,7 +173,7 @@ public Point computeSize (int wHint, int hHint, boolean changed) { * the preferred height of the widget, GTK uses the text metrics. * The fix is to ensure that the preferred height is at least as * tall as the font height. - * + * * NOTE: This work around does not fix the case when there are * muliple lines of text. */ @@ -238,7 +238,7 @@ void createHandle (int index) { OS.gtk_label_set_line_wrap (labelHandle, true); OS.gtk_label_set_line_wrap_mode (labelHandle, OS.PANGO_WRAP_WORD_CHAR); } - // In GTK 3 font description is inherited from parent widget which is not how SWT has always worked, + // In GTK 3 font description is inherited from parent widget which is not how SWT has always worked, // reset to default font to get the usual behavior if (OS.GTK3) { setFontDescription(defaultFont ().handle); @@ -269,10 +269,10 @@ long /*int*/ eventHandle () { * Returns a value which describes the position of the * text or image in the receiver. The value will be one of * <code>LEFT</code>, <code>RIGHT</code> or <code>CENTER</code> - * unless the receiver is a <code>SEPARATOR</code> label, in + * unless the receiver is a <code>SEPARATOR</code> label, in * which case, <code>NONE</code> is returned. * - * @return the alignment + * @return the alignment * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> @@ -419,7 +419,7 @@ void resizeHandle (int width, int height) { * or <code>CENTER</code>. If the receiver is a <code>SEPARATOR</code> * label, the argument is ignored and the alignment is not changed. * - * @param alignment the new alignment + * @param alignment the new alignment * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> @@ -473,7 +473,7 @@ int setBounds (int x, int y, int width, int height, boolean move, boolean resize * determine the size that will wrap the label * and expilictly set that size to force the label * to wrap. - * + * * This part of the fix causes the label to be * resized to the preferred size but it still * won't draw properly. @@ -488,7 +488,7 @@ int setBounds (int x, int y, int width, int height, boolean move, boolean resize * determine the size that will wrap the label * and expilictly set that size to force the label * to wrap. - * + * * This part of the fix forces the label to be * resized so that it will draw wrapped. */ @@ -500,7 +500,7 @@ int setBounds (int x, int y, int width, int height, boolean move, boolean resize OS.gtk_widget_set_size_request (labelHandle, labelWidth, labelHeight); /* * Bug in GTK. Setting the size request should invalidate the label's - * layout, but it does not. The fix is to resize the label directly. + * layout, but it does not. The fix is to resize the label directly. */ GtkRequisition requisition = new GtkRequisition (); gtk_widget_get_preferred_size (labelHandle, requisition); @@ -531,7 +531,7 @@ void setForegroundColor (GdkColor color) { void setOrientation (boolean create) { super.setOrientation (create); if ((style & SWT.RIGHT_TO_LEFT) != 0 || !create) { - int dir = (style & SWT.RIGHT_TO_LEFT) != 0 ? OS.GTK_TEXT_DIR_RTL : OS.GTK_TEXT_DIR_LTR; + int dir = (style & SWT.RIGHT_TO_LEFT) != 0 ? OS.GTK_TEXT_DIR_RTL : OS.GTK_TEXT_DIR_LTR; if (labelHandle != 0) OS.gtk_widget_set_direction (labelHandle, dir); if (imageHandle != 0) OS.gtk_widget_set_direction (imageHandle, dir); } @@ -544,7 +544,7 @@ void setOrientation (boolean create) { * @param image the image to display on the receiver (may be null) * * @exception IllegalArgumentException <ul> - * <li>ERROR_INVALID_ARGUMENT - if the image has been disposed</li> + * <li>ERROR_INVALID_ARGUMENT - if the image has been disposed</li> * </ul> * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> @@ -587,7 +587,7 @@ public void setImage (Image image) { * '&' can be escaped by doubling it in the string, causing * a single '&' to be displayed. * </p> - * + * * @param string the new text * * @exception IllegalArgumentException <ul> 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 c6782f9e57..e2096055c1 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 @@ -18,7 +18,7 @@ import org.eclipse.swt.accessibility.*; /** * Instances of this class represent a selectable - * user interface object that displays a text with + * user interface object that displays a text with * links. * <p> * <dl> @@ -34,7 +34,7 @@ import org.eclipse.swt.accessibility.*; * @see <a href="http://www.eclipse.org/swt/snippets/#link">Link snippets</a> * @see <a href="http://www.eclipse.org/swt/examples.php">SWT Example: ControlExample</a> * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a> - * + * * @since 3.1 * @noextend This class is not intended to be subclassed by clients. */ @@ -47,16 +47,16 @@ public class Link extends Control { String [] ids; int [] mnemonics; int focusIndex; - + static final RGB LINK_DISABLED_FOREGROUND = new RGB (172, 168, 153); - + /** * Constructs a new instance of this class given its parent * and a style value describing its behavior and appearance. * <p> * The style value is either one of the style constants defined in * class <code>SWT</code> which is applicable to instances of this - * class, or must be built by <em>bitwise OR</em>'ing together + * class, or must be built by <em>bitwise OR</em>'ing together * (that is, using the <code>int</code> "|" operator) two or more * of those <code>SWT</code> style constants. The class description * lists the style constants that are applicable to the class. @@ -182,7 +182,7 @@ void drawWidget(GC gc) { Rectangle [] rects = getRectangles (focusIndex); for (int i = 0; i < rects.length; i++) { Rectangle rect = rects [i]; - gc.drawFocus (rect.x, rect.y, rect.width, rect.height); + gc.drawFocus (rect.x, rect.y, rect.width, rect.height); } } } @@ -213,13 +213,13 @@ void initAccessible () { e.result = parse (text); } }); - + accessible.addAccessibleControlListener (new AccessibleControlAdapter () { @Override public void getChildAtPoint (AccessibleControlEvent e) { e.childID = ACC.CHILDID_SELF; } - + @Override public void getLocation (AccessibleControlEvent e) { Rectangle rect = display.map (getParent (), null, getBounds ()); @@ -228,33 +228,33 @@ void initAccessible () { e.width = rect.width; e.height = rect.height; } - + @Override public void getChildCount (AccessibleControlEvent e) { e.detail = 0; } - + @Override public void getRole (AccessibleControlEvent e) { e.detail = ACC.ROLE_LINK; } - + @Override public void getState (AccessibleControlEvent e) { e.detail = ACC.STATE_FOCUSABLE; if (hasFocus ()) e.detail |= ACC.STATE_FOCUSED; } - + @Override public void getDefaultAction (AccessibleControlEvent e) { e.result = SWT.getMessage ("SWT_Press"); //$NON-NLS-1$ } - + @Override public void getSelection (AccessibleControlEvent e) { if (hasFocus ()) e.childID = ACC.CHILDID_SELF; } - + @Override public void getFocus (AccessibleControlEvent e) { if (hasFocus ()) e.childID = ACC.CHILDID_SELF; @@ -278,7 +278,7 @@ Rectangle [] getRectangles (int linkIndex) { while (point.y > lineOffsets [lineEnd]) lineEnd++; int index = 0; if (lineStart == lineEnd) { - rects [index++] = layout.getBounds (point.x, point.y); + rects [index++] = layout.getBounds (point.x, point.y); } else { rects [index++] = layout.getBounds (point.x, lineOffsets [lineStart]-1); rects [index++] = layout.getBounds (lineOffsets [lineEnd-1], point.y); @@ -292,7 +292,7 @@ Rectangle [] getRectangles (int linkIndex) { Rectangle [] tmp = new Rectangle [index]; System.arraycopy (rects, 0, tmp, 0, index); rects = tmp; - } + } return rects; } @@ -314,7 +314,7 @@ public String getText () { @Override long /*int*/ gtk_button_press_event (long /*int*/ widget, long /*int*/ event) { - long /*int*/ result = super.gtk_button_press_event (widget, event); + long /*int*/ result = super.gtk_button_press_event (widget, event); if (result != 0) return result; GdkEventButton gdkEvent = new GdkEventButton (); OS.memmove (gdkEvent, event, GdkEventButton.sizeof); @@ -342,7 +342,7 @@ long /*int*/ gtk_button_press_event (long /*int*/ widget, long /*int*/ event) { for (int i = 0; i < rects.length; i++) { Rectangle rect = rects [i]; if (rect.contains (x, y)) { - focusIndex = j; + focusIndex = j; redraw (); return result; } @@ -428,7 +428,7 @@ long /*int*/ gtk_motion_notify_event (long /*int*/ widget, long /*int*/ event) { GdkEventMotion gdkEvent = new GdkEventMotion (); OS.memmove (gdkEvent, event, GdkEventMotion.sizeof); int x = (int) gdkEvent.x; - int y = (int) gdkEvent.y; + int y = (int) gdkEvent.y; if ((style & SWT.MIRRORED) != 0) x = getClientWidth () - x; if ((gdkEvent.state & OS.GDK_BUTTON1_MASK) != 0) { int oldSelection = selection.y; @@ -489,7 +489,7 @@ boolean mnemonicMatch (char key) { for (int i = 0; i < mnemonics.length - 1; i++) { if (mnemonics[i] != -1) { char mnemonic = parsedText.charAt(mnemonics[i]); - if (uckey == Character.toUpperCase (mnemonic)) { + if (uckey == Character.toUpperCase (mnemonic)) { return true; } } @@ -534,7 +534,7 @@ public void removeSelectionListener (SelectionListener listener) { if (listener == null) error (SWT.ERROR_NULL_ARGUMENT); if (eventTable == null) return; eventTable.unhook (SWT.Selection, listener); - eventTable.unhook (SWT.DefaultSelection, listener); + eventTable.unhook (SWT.DefaultSelection, listener); } String parse (String string) { @@ -550,7 +550,7 @@ String parse (String string) { while (index < length) { char c = Character.toLowerCase (buffer [index]); switch (state) { - case 0: + case 0: if (c == '<') { tagStart = index; state++; @@ -663,7 +663,7 @@ String parse (String string) { ids = newIDs; int [] newMnemonics = new int [linkIndex + 1]; System.arraycopy (mnemonics, 0, newMnemonics, 0, linkIndex + 1); - mnemonics = newMnemonics; + mnemonics = newMnemonics; } return result.toString (); } @@ -689,7 +689,7 @@ int parseMnemonics (char[] buffer, int start, int end, StringBuffer result) { @Override int setBounds(int x, int y, int width, int height, boolean move, boolean resize) { int result = super.setBounds (x, y, width,height, move, resize); - if ((result & RESIZED) != 0) { + if ((result & RESIZED) != 0) { layout.setWidth (width > 0 ? width : -1); redraw (); } @@ -724,7 +724,7 @@ void setOrientation (boolean create) { * </p> * <p> * Mnemonics are indicated by an '&' that causes the next - * character to be the mnemonic. The receiver can have a + * character to be the mnemonic. The receiver can have a * mnemonic in the text preceding each link. When the user presses a * key sequence that matches the mnemonic, focus is assigned * to the link that follows the text. Mnemonics in links and in @@ -733,8 +733,8 @@ void setOrientation (boolean create) { * platform specific manner. The mnemonic indicator character * '&' can be escaped by doubling it in the string, causing * a single '&' to be displayed. - * </p> - * + * </p> + * * @param string the new text * * @exception IllegalArgumentException <ul> 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 275737b1ee..92c7e1ea62 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 @@ -81,7 +81,7 @@ public Menu (Control parent) { * <p> * The style value is either one of the style constants defined in * class <code>SWT</code> which is applicable to instances of this - * class, or must be built by <em>bitwise OR</em>'ing together + * class, or must be built by <em>bitwise OR</em>'ing together * (that is, using the <code>int</code> "|" operator) two or more * of those <code>SWT</code> style constants. The class description * lists the style constants that are applicable to the class. @@ -198,7 +198,7 @@ void _setVisible (boolean visible) { sendEvent (SWT.Show); if (getItemCount () != 0) { /* - * Feature in GTK. ON_TOP shells will send out + * Feature in GTK. ON_TOP shells will send out * SWT.Deactivate whenever a context menu is shown. * The fix is to prevent the menu from taking focus * when it is being shown in an ON_TOP shell. @@ -210,11 +210,11 @@ void _setVisible (boolean visible) { hasLocation = false; long /*int*/ data = 0; /* - * Popup-menu to the status icon should be aligned to - * Tray rather than to cursor position. There is a - * possibility (unlikely) that TrayItem might have - * been disposed in the listener, for which case - * the menu should be shown in the cursor position. + * Popup-menu to the status icon should be aligned to + * Tray rather than to cursor position. There is a + * possibility (unlikely) that TrayItem might have + * been disposed in the listener, for which case + * the menu should be shown in the cursor position. */ TrayItem item = display.currentTrayItem; if (item != null && !item.isDisposed()) { @@ -334,7 +334,7 @@ void createIMMenu (long /*int*/ imHandle) { } if (this.imHandle == imHandle) return; this.imHandle = imHandle; - + if (imSeparator == 0) { imSeparator = OS.gtk_separator_menu_item_new (); OS.gtk_widget_show (imSeparator); @@ -414,7 +414,7 @@ public MenuItem getDefaultItem () { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @see #isEnabled */ public boolean getEnabled () { @@ -474,11 +474,11 @@ public int getItemCount () { /** * Returns a (possibly empty) array of <code>MenuItem</code>s which - * are the items in the receiver. + * are the items in the receiver. * <p> * Note: This is not the actual structure used by the receiver * to maintain its list of items, so modifying the array will - * not affect the receiver. + * not affect the receiver. * </p> * * @return the items in the receiver @@ -532,12 +532,12 @@ String getNameText () { * constants <code>SWT.LEFT_TO_RIGHT</code> or <code>SWT.RIGHT_TO_LEFT</code>. * * @return the orientation style - * + * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 3.7 */ public int getOrientation () { @@ -672,7 +672,7 @@ long /*int*/ gtk_show (long /*int*/ widget) { display.activeShell.ignoreFocusOut = true; } return 0; - } + } sendEvent (SWT.Show); if (OS.ubuntu_menu_proxy_get() != 0) { MenuItem[] items = getItems(); @@ -704,7 +704,7 @@ void hookEvents () { /** * Searches the receiver's list starting at the first item - * (index 0) until an item is found that is equal to the + * (index 0) until an item is found that is equal to the * argument, and returns the index of that item. If no item * is found, returns -1. * @@ -741,7 +741,7 @@ public int indexOf (MenuItem item) { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @see #getEnabled */ public boolean isEnabled () { @@ -780,7 +780,7 @@ long /*int*/ menuPositionProc (long /*int*/ menu, long /*int*/ x, long /*int*/ y * add a scroll arrow at the bottom and position the first menu entry at * the specified position. The fix is to flip the menu location to be * completely inside the screen. - * + * * NOTE: This code doesn't work for multiple monitors. */ GtkRequisition requisition = new GtkRequisition (); @@ -789,7 +789,7 @@ long /*int*/ menuPositionProc (long /*int*/ menu, long /*int*/ x, long /*int*/ y int reqy = this.y; if (reqy + requisition.height > screenHeight) { reqy = Math.max (0, reqy - requisition.height); - } + } int screenWidth = OS.gdk_screen_width (); int reqx = this.x; if ((style & SWT.RIGHT_TO_LEFT) != 0) { @@ -831,7 +831,7 @@ void releaseParent () { @Override void releaseWidget () { super.releaseWidget (); - if (parent != null) parent.removeMenu (this); + if (parent != null) parent.removeMenu (this); parent = null; cascade = null; imItem = imSeparator = imHandle = 0; @@ -923,11 +923,11 @@ boolean sendHelpEvent (long /*int*/ helpType) { /** * Sets the default menu item to the argument or removes * the default emphasis when the argument is <code>null</code>. - * + * * @param item the default menu item or null * * @exception IllegalArgumentException <ul> - * <li>ERROR_INVALID_ARGUMENT - if the menu item has been disposed</li> + * <li>ERROR_INVALID_ARGUMENT - if the menu item has been disposed</li> * </ul> * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> @@ -981,7 +981,7 @@ public void setLocation (int x, int y) { if ((style & (SWT.BAR | SWT.DROP_DOWN)) != 0) return; this.x = x; this.y = y; - hasLocation = true; + hasLocation = true; } /** @@ -1005,7 +1005,7 @@ public void setLocation (int x, int y) { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 2.1 */ public void setLocation (Point location) { @@ -1020,16 +1020,16 @@ public void setLocation (Point location) { * <p> * * @param orientation new orientation style - * + * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * - * @since 3.7 + * + * @since 3.7 */ public void setOrientation (int orientation) { - checkWidget (); + checkWidget (); if ((style & (SWT.BAR | SWT.DROP_DOWN)) != 0) return; _setOrientation (orientation); } @@ -1056,7 +1056,7 @@ void setOrientation (boolean create) { /** * Marks the receiver as visible if the argument is <code>true</code>, - * and marks it invisible otherwise. + * and marks it invisible otherwise. * <p> * If one of the receiver's ancestors is not visible or some * other condition makes the receiver not visible, marking 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 eb36db8340..d51d971079 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 @@ -19,7 +19,7 @@ import org.eclipse.swt.events.*; /** * Instances of this class represent a selectable user interface object - * that issues notification when pressed and released. + * that issues notification when pressed and released. * <dl> * <dt><b>Styles:</b></dt> * <dd>CHECK, CASCADE, PUSH, RADIO, SEPARATOR</dd> @@ -41,7 +41,7 @@ public class MenuItem extends Item { long /*int*/ groupHandle; int accelerator, userId; String toolTipText; - + /** * Constructs a new instance of this class given its parent * (which must be a <code>Menu</code>) and a style value @@ -50,7 +50,7 @@ public class MenuItem extends Item { * <p> * The style value is either one of the style constants defined in * class <code>SWT</code> which is applicable to instances of this - * class, or must be built by <em>bitwise OR</em>'ing together + * class, or must be built by <em>bitwise OR</em>'ing together * (that is, using the <code>int</code> "|" operator) two or more * of those <code>SWT</code> style constants. The class description * lists the style constants that are applicable to the class. @@ -90,7 +90,7 @@ public MenuItem (Menu parent, int style) { * <p> * The style value is either one of the style constants defined in * class <code>SWT</code> which is applicable to instances of this - * class, or must be built by <em>bitwise OR</em>'ing together + * class, or must be built by <em>bitwise OR</em>'ing together * (that is, using the <code>int</code> "|" operator) two or more * of those <code>SWT</code> style constants. The class description * lists the style constants that are applicable to the class. @@ -200,11 +200,11 @@ public void addHelpListener (HelpListener listener) { * </p> * <p> * When the <code>SWT.RADIO</code> style bit is set, the <code>widgetSelected</code> method is - * also called when the receiver loses selection because another item in the same radio group + * also called when the receiver loses selection because another item in the same radio group * was selected by the user. During <code>widgetSelected</code> the application can use * <code>getSelection()</code> to determine the current selected state of the receiver. * </p> - * + * * @param listener the listener which should be notified when the menu item is selected by the user * * @exception IllegalArgumentException <ul> @@ -346,7 +346,7 @@ long /*int*/ getAccelGroup () { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @see #isEnabled */ public boolean getEnabled () { @@ -363,7 +363,7 @@ public boolean getEnabled () { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 3.7 */ public int getID () { @@ -374,7 +374,7 @@ public int getID () { /** * Returns the receiver's cascade menu if it has one or null * if it does not. Only <code>CASCADE</code> menu items can have - * a pull down menu. The sequence of key strokes, button presses + * a pull down menu. The sequence of key strokes, button presses * and/or button releases that are used to request a pull down * menu is platform specific. * @@ -510,7 +510,7 @@ void hookEvents () { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @see #getEnabled */ public boolean isEnabled () { @@ -626,7 +626,7 @@ public void removeSelectionListener (SelectionListener listener) { if (listener == null) error (SWT.ERROR_NULL_ARGUMENT); if (eventTable == null) return; eventTable.unhook (SWT.Selection, listener); - eventTable.unhook (SWT.DefaultSelection,listener); + eventTable.unhook (SWT.DefaultSelection,listener); } @Override void reskinChildren (int flags) { @@ -702,7 +702,7 @@ public void setEnabled (boolean enabled) { * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * <li>ERROR_INVALID_ARGUMENT - if called with an negative-valued argument.</li> * </ul> - * + * * @since 3.7 */ public void setID (int id) { @@ -884,7 +884,7 @@ public void setSelection (boolean selected) { * accelerator key sequence. The accelerator key sequence * is installed using #setAccelerator. * </p> - * + * * @param string the new text * * @exception IllegalArgumentException <ul> @@ -894,7 +894,7 @@ public void setSelection (boolean selected) { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @see #setAccelerator */ @Override @@ -955,7 +955,7 @@ private void setAccelLabel(long /*int*/ label, String accelString) { * causing no tool tip text to be shown. * <p> * The mnemonic indicator (character '&') is not displayed in a tool tip. - * To display a single '&' in the tool tip, the character '&' can be + * To display a single '&' in the tool tip, the character '&' can be * escaped by doubling it in the string. * </p> * <p> diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MessageBox.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MessageBox.java index e5b03ee321..0a3ffb957d 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MessageBox.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MessageBox.java @@ -65,7 +65,7 @@ public MessageBox (Shell parent) { * <p> * The style value is either one of the style constants defined in * class <code>SWT</code> which is applicable to instances of this - * class, or must be built by <em>bitwise OR</em>'ing together + * class, or must be built by <em>bitwise OR</em>'ing together * (that is, using the <code>int</code> "|" operator) two or more * of those <code>SWT</code> style constants. The class description * lists the style constants that are applicable to the class. @@ -81,7 +81,7 @@ public MessageBox (Shell parent) { * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the parent</li> * <li>ERROR_INVALID_SUBCLASS - if this class is not an allowed subclass</li> * </ul> - * + * * @see SWT#ICON_ERROR * @see SWT#ICON_INFORMATION * @see SWT#ICON_QUESTION @@ -117,7 +117,7 @@ public String getMessage () { * visible on the dialog while it is open. * * @param string the message - * + * * @exception IllegalArgumentException <ul> * <li>ERROR_NULL_ARGUMENT - if the string is null</li> * </ul> @@ -149,7 +149,7 @@ public int open () { if ((style & (SWT.ICON_WARNING)) != 0) messageType = OS.GTK_MESSAGE_WARNING; if ((style & (SWT.ICON_QUESTION)) != 0) messageType = OS.GTK_MESSAGE_QUESTION; if ((style & (SWT.ICON_ERROR)) != 0) messageType = OS.GTK_MESSAGE_ERROR; - + byte [] buffer = Converter.wcsToMbcs (null, fixPercent (message), true); handle = OS.gtk_message_dialog_new(parentHandle, dialogFlags, messageType, 0, buffer); if (handle == 0) error(SWT.ERROR_NO_HANDLES); @@ -168,12 +168,12 @@ public int open () { Dialog oldModal = null; /* * In order to allow the dialog to be modal of it's - * parent shells, it is required to assign the + * parent shells, it is required to assign the * dialog to the same window group as of the shells. */ long /*int*/ group = OS.gtk_window_get_group(0); OS.gtk_window_group_add_window (group, handle); - + if (OS.gtk_window_get_modal (handle)) { oldModal = display.getModalDialog (); display.setModalDialog (this); @@ -183,14 +183,14 @@ public int open () { if ((style & SWT.RIGHT_TO_LEFT) != 0) { signalId = OS.g_signal_lookup (OS.map, OS.GTK_TYPE_WIDGET()); hookId = OS.g_signal_add_emission_hook (signalId, 0, display.emissionProc, handle, 0); - } + } display.sendPreExternalEventDispatchEvent (); int response = OS.gtk_dialog_run (handle); /* * This call to gdk_threads_leave() is a temporary work around * to avoid deadlocks when gdk_threads_init() is called by native * code outside of SWT (i.e AWT, etc). It ensures that the current - * thread leaves the GTK lock acquired by the function above. + * thread leaves the GTK lock acquired by the function above. */ OS.gdk_threads_leave(); display.sendPostExternalEventDispatchEvent (); @@ -199,7 +199,7 @@ public int open () { } if (OS.gtk_window_get_modal (handle)) { display.setModalDialog (oldModal); - } + } display.removeIdleProc (); OS.gtk_widget_destroy (handle); return response; @@ -214,7 +214,7 @@ private void createButtons (int alignment) { if ((style & SWT.NO) != 0) OS.gtk_dialog_add_button(handle, Converter.wcsToMbcs (null, "gtk-no", true), SWT.NO); if ((style & SWT.IGNORE) != 0) OS.gtk_dialog_add_button(handle, Converter.wcsToMbcs (null, SWT.getMessage("SWT_Ignore"), true), SWT.IGNORE); if ((style & SWT.CANCEL) != 0) OS.gtk_dialog_add_button(handle, Converter.wcsToMbcs (null, "gtk-cancel", true), SWT.CANCEL); - } else { + } else { if ((style & SWT.CANCEL) != 0) OS.gtk_dialog_add_button(handle, Converter.wcsToMbcs (null, "gtk-cancel", true), SWT.CANCEL); if ((style & SWT.OK) != 0) OS.gtk_dialog_add_button(handle, Converter.wcsToMbcs (null, "gtk-ok", true), SWT.OK); if ((style & SWT.NO) != 0) OS.gtk_dialog_add_button(handle, Converter.wcsToMbcs (null, "gtk-no", true), SWT.NO); @@ -249,6 +249,6 @@ char[] fixPercent (String string) { } result [j++] = text [i++]; } - return result; + return result; } } diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ProgressBar.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ProgressBar.java index 14404c96d8..2cdae1dad5 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ProgressBar.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ProgressBar.java @@ -45,7 +45,7 @@ public class ProgressBar extends Control { * <p> * The style value is either one of the style constants defined in * class <code>SWT</code> which is applicable to instances of this - * class, or must be built by <em>bitwise OR</em>'ing together + * class, or must be built by <em>bitwise OR</em>'ing together * (that is, using the <code>int</code> "|" operator) two or more * of those <code>SWT</code> style constants. The class description * lists the style constants that are applicable to the class. @@ -153,13 +153,13 @@ public int getSelection () { * <li>{@link SWT#PAUSED}</li> * </ul> * - * @return the state + * @return the state * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 3.4 */ public int getState () { @@ -194,7 +194,7 @@ void setParentBackground () { * Bug in GTK. For some reason, some theme managers will crash * when the progress bar is inheriting the background from a parent. * The fix is to stop inheriting the background. This is acceptable - * since progress bars do not use the inherited background. + * since progress bars do not use the inherited background. */ } @@ -269,14 +269,14 @@ public void setSelection (int value) { * Note: This operation is a hint and is not supported on * platforms that do not have this concept. * </p> - * + * * @param state the new state * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 3.4 */ public void setState (int state) { diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Sash.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Sash.java index a540c1cbf5..8deecc298d 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Sash.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Sash.java @@ -51,7 +51,7 @@ public class Sash extends Control { * <p> * The style value is either one of the style constants defined in * class <code>SWT</code> which is applicable to instances of this - * class, or must be built by <em>bitwise OR</em>'ing together + * class, or must be built by <em>bitwise OR</em>'ing together * (that is, using the <code>int</code> "|" operator) two or more * of those <code>SWT</code> style constants. The class description * lists the style constants that are applicable to the class. @@ -157,12 +157,12 @@ void drawBand (int x, int y, int width, int height) { long /*int*/ colormap = OS.gdk_colormap_get_system(); GdkColor color = new GdkColor (); OS.gdk_color_white (colormap, color); - OS.gdk_gc_set_foreground (gc, color); + OS.gdk_gc_set_foreground (gc, color); OS.gdk_gc_set_stipple (gc, stipplePixmap); OS.gdk_gc_set_subwindow (gc, OS.GDK_INCLUDE_INFERIORS); OS.gdk_gc_set_fill (gc, OS.GDK_STIPPLED); OS.gdk_gc_set_function (gc, OS.GDK_XOR); - OS.gdk_draw_rectangle (window, gc, 1, x, y, width, height); + OS.gdk_draw_rectangle (window, gc, 1, x, y, width, height); OS.g_object_unref (stipplePixmap); OS.g_object_unref (gc); } @@ -188,7 +188,7 @@ long /*int*/ gtk_button_press_event (long /*int*/ widget, long /*int*/ eventPtr) int y = allocation.y; int width = allocation.width; int height = allocation.height; - lastX = x; + lastX = x; lastY = y; Event event = new Event (); event.time = gdkEvent.time; @@ -214,7 +214,7 @@ long /*int*/ gtk_button_press_event (long /*int*/ widget, long /*int*/ eventPtr) // widget could be disposed at this point } } - return result; + return result; } @Override @@ -259,7 +259,7 @@ long /*int*/ gtk_focus_in_event (long /*int*/ widget, long /*int*/ event) { GtkAllocation allocation = new GtkAllocation (); gtk_widget_get_allocation (handle, allocation); lastX = allocation.x; - lastY = allocation.y; + lastY = allocation.y; } return 0; } @@ -301,7 +301,7 @@ long /*int*/ gtk_key_press_event (long /*int*/ widget, long /*int*/ eventPtr) { newY = Math.min (Math.max (0, lastY + yChange - parentBorder - startY), parentHeight - height); } if (newX == lastX && newY == lastY) return result; - + /* Ensure that the pointer image does not change */ long /*int*/ window = gtk_widget_get_window (handle); int grabMask = OS.GDK_POINTER_MOTION_MASK | OS.GDK_BUTTON_RELEASE_MASK; @@ -319,7 +319,7 @@ long /*int*/ gtk_key_press_event (long /*int*/ widget, long /*int*/ eventPtr) { sendSelectionEvent (SWT.Selection, event, true); if (ptrGrabResult == OS.GDK_GRAB_SUCCESS) gdk_pointer_ungrab (window, OS.GDK_CURRENT_TIME); if (isDisposed ()) break; - + if (event.doit) { lastX = event.x; lastY = event.y; @@ -358,7 +358,7 @@ long /*int*/ gtk_motion_notify_event (long /*int*/ widget, long /*int*/ eventPtr eventState = mask [0]; } else { int [] origin_x = new int [1], origin_y = new int [1]; - OS.gdk_window_get_origin (gdkEvent.window, origin_x, origin_y); + OS.gdk_window_get_origin (gdkEvent.window, origin_x, origin_y); eventX = (int) (gdkEvent.x_root - origin_x [0]); eventY = (int) (gdkEvent.y_root - origin_y [0]); eventState = gdkEvent.state; @@ -382,7 +382,7 @@ long /*int*/ gtk_motion_notify_event (long /*int*/ widget, long /*int*/ eventPtr } if (newX == lastX && newY == lastY) return 0; drawBand (lastX, lastY, width, height); - + Event event = new Event (); event.time = gdkEvent.time; event.x = newX; @@ -450,7 +450,7 @@ public void removeSelectionListener(SelectionListener listener) { if (listener == null) error (SWT.ERROR_NULL_ARGUMENT); if (eventTable == null) return; eventTable.unhook (SWT.Selection, listener); - eventTable.unhook (SWT.DefaultSelection,listener); + eventTable.unhook (SWT.DefaultSelection,listener); } @Override diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Scale.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Scale.java index eb086dc40d..36e02f2b7f 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Scale.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Scale.java @@ -46,7 +46,7 @@ public class Scale extends Control { * <p> * The style value is either one of the style constants defined in * class <code>SWT</code> which is applicable to instances of this - * class, or must be built by <em>bitwise OR</em>'ing together + * class, or must be built by <em>bitwise OR</em>'ing together * (that is, using the <code>int</code> "|" operator) two or more * of those <code>SWT</code> style constants. The class description * lists the style constants that are applicable to the class. @@ -129,7 +129,7 @@ void createHandle (int index) { if (fixedHandle == 0) error (SWT.ERROR_NO_HANDLES); gtk_widget_set_has_window (fixedHandle, true); long /*int*/ hAdjustment = OS.gtk_adjustment_new (0, 0, 100, 1, 10, 0); - if (hAdjustment == 0) error (SWT.ERROR_NO_HANDLES); + if (hAdjustment == 0) error (SWT.ERROR_NO_HANDLES); if ((style & SWT.HORIZONTAL) != 0) { handle = gtk_scale_new (OS.GTK_ORIENTATION_HORIZONTAL, hAdjustment); } else { @@ -137,7 +137,7 @@ void createHandle (int index) { } if (handle == 0) error (SWT.ERROR_NO_HANDLES); OS.gtk_container_add (fixedHandle, handle); - OS.gtk_scale_set_digits (handle, 0); + OS.gtk_scale_set_digits (handle, 0); OS.gtk_scale_set_draw_value (handle, false); } @@ -259,13 +259,13 @@ public void removeSelectionListener (SelectionListener listener) { if (listener == null) error (SWT.ERROR_NULL_ARGUMENT); if (eventTable == null) return; eventTable.unhook (SWT.Selection, listener); - eventTable.unhook (SWT.DefaultSelection,listener); + eventTable.unhook (SWT.DefaultSelection,listener); } /** * Sets the amount that the receiver's value will be * modified by when the up/down (or right/left) arrows - * are pressed to the argument, which must be at least + * are pressed to the argument, which must be at least * one. * * @param increment the new increment (must be greater than zero) diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ScrollBar.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ScrollBar.java index dcb322b407..20f651f7bc 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ScrollBar.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ScrollBar.java @@ -26,9 +26,9 @@ import org.eclipse.swt.internal.gtk.OS; /** * Instances of this class are selectable user interface - * objects that represent a range of positive, numeric values. + * objects that represent a range of positive, numeric values. * <p> - * At any given moment, a given scroll bar will have a + * At any given moment, a given scroll bar will have a * single 'selection' that is considered to be its * value, which is constrained to be within the range of * values the scroll bar represents (that is, between its @@ -68,7 +68,7 @@ import org.eclipse.swt.internal.gtk.OS; * have no operating system resources and are not children of the control. * For this reason, scroll bars are treated specially. To create a control * that looks like a scroll bar but has operating system resources, use - * <code>Slider</code>. + * <code>Slider</code>. * </p> * <dl> * <dt><b>Styles:</b></dt> @@ -95,7 +95,7 @@ public class ScrollBar extends Widget { long /*int*/ adjustmentHandle; int detail; boolean dragSent; - + ScrollBar () { } @@ -181,7 +181,7 @@ void destroyWidget () { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @see #isEnabled */ public boolean getEnabled () { @@ -325,14 +325,14 @@ public int getThumb () { /** * Returns a rectangle describing the size and location of the * receiver's thumb relative to its parent. - * + * * @return the thumb bounds, relative to the {@link #getParent() parent} * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 3.6 */ public Rectangle getThumbBounds () { @@ -370,14 +370,14 @@ public Rectangle getThumbBounds () { * Returns a rectangle describing the size and location of the * receiver's thumb track relative to its parent. This rectangle * comprises the areas 2, 3, and 4 as described in {@link ScrollBar}. - * + * * @return the thumb track bounds, relative to the {@link #getParent() parent} * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 3.6 */ public Rectangle getThumbTrackBounds () { @@ -400,7 +400,7 @@ public Rectangle getThumbTrackBounds () { if (hasB) y += stepperSize; if (hasF2) y += stepperSize; width = allocation.width; - height = allocation.height - y; + height = allocation.height - y; if (hasB2) height -= stepperSize; if (hasF) height -= stepperSize; if (height < 0) { @@ -472,7 +472,7 @@ long /*int*/ gtk_button_press_event (long /*int*/ widget, long /*int*/ eventPtr) long /*int*/ result = super.gtk_button_press_event (widget, eventPtr); if (result != 0) return result; detail = OS.GTK_SCROLL_NONE; - dragSent = false; + dragSent = false; return result; } @@ -549,7 +549,7 @@ void hookEvents () { OS.g_signal_connect_closure (handle, OS.change_value, display.getClosure (CHANGE_VALUE), false); OS.g_signal_connect_closure (adjustmentHandle, OS.value_changed, display.getClosure (VALUE_CHANGED), false); OS.g_signal_connect_closure_by_id (handle, display.signalIds [EVENT_AFTER], 0, display.getClosure (EVENT_AFTER), false); - OS.g_signal_connect_closure_by_id (handle, display.signalIds [BUTTON_PRESS_EVENT], 0, display.getClosure (BUTTON_PRESS_EVENT), false); + OS.g_signal_connect_closure_by_id (handle, display.signalIds [BUTTON_PRESS_EVENT], 0, display.getClosure (BUTTON_PRESS_EVENT), false); } /** @@ -564,7 +564,7 @@ void hookEvents () { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @see #getEnabled */ public boolean isEnabled () { @@ -632,7 +632,7 @@ public void removeSelectionListener (SelectionListener listener) { if (listener == null) error (SWT.ERROR_NULL_ARGUMENT); if (eventTable == null) return; eventTable.unhook (SWT.Selection, listener); - eventTable.unhook (SWT.DefaultSelection,listener); + eventTable.unhook (SWT.DefaultSelection,listener); } /** @@ -656,7 +656,7 @@ public void setEnabled (boolean enabled) { /** * Sets the amount that the receiver's value will be * modified by when the up/down (or right/left) arrows - * are pressed to the argument, which must be at least + * are pressed to the argument, which must be at least * one. * * @param value the new increment (must be greater than zero) @@ -708,7 +708,7 @@ public void setMaximum (int value) { gtk_adjustment_configure (adjustmentHandle, adjustment); OS.g_signal_handlers_unblock_matched (adjustmentHandle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, VALUE_CHANGED); } - + /** * Sets the minimum value. If this value is negative or greater * than or equal to the maximum, the value is ignored. If necessary, @@ -799,11 +799,11 @@ public void setSelection (int selection) { } /** - * Sets the thumb value. The thumb value should be used to represent + * Sets the thumb value. The thumb value should be used to represent * the size of the visual portion of the current range. This value is * usually the same as the page increment value. * <p> - * This new value will be ignored if it is less than one, and will be + * This new value will be ignored if it is less than one, and will be * clamped if it exceeds the receiver's current range. * </p> * @@ -820,7 +820,7 @@ public void setThumb (int value) { if (value < 1) return; GtkAdjustment adjustment = new GtkAdjustment (); gtk_adjustment_get (adjustmentHandle, adjustment); - value = (int) Math.min (value, (int)(adjustment.upper - adjustment.lower)); + value = (int) Math.min (value, (int)(adjustment.upper - adjustment.lower)); adjustment.page_size = (double) value; adjustment.value = Math.min ((int)adjustment.value, (int)(adjustment.upper - value)); OS.g_signal_handlers_block_matched (adjustmentHandle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, VALUE_CHANGED); @@ -833,7 +833,7 @@ public void setThumb (int value) { * value, thumb, increment and page increment all at once. * <p> * Note: This is similar to setting the values individually - * using the appropriate methods, but may be implemented in a + * using the appropriate methods, but may be implemented in a * more efficient fashion on some platforms. * </p> * @@ -872,7 +872,7 @@ public void setValues (int selection, int minimum, int maximum, int thumb, int i /** * Marks the receiver as visible if the argument is <code>true</code>, - * and marks it invisible otherwise. + * and marks it invisible otherwise. * <p> * If one of the receiver's ancestors is not visible or some * other condition makes the receiver not visible, marking diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Scrollable.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Scrollable.java index 1506dee206..ed6cc63246 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Scrollable.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Scrollable.java @@ -47,7 +47,7 @@ Scrollable () {} * <p> * The style value is either one of the style constants defined in * class <code>SWT</code> which is applicable to instances of this - * class, or must be built by <em>bitwise OR</em>'ing together + * class, or must be built by <em>bitwise OR</em>'ing together * (that is, using the <code>int</code> "|" operator) two or more * of those <code>SWT</code> style constants. The class description * lists the style constants that are applicable to the class. @@ -91,7 +91,7 @@ long /*int*/ clientHandle () { * rectangle described by the arguments (relative to the * receiver's parent). * </p> - * + * * @param x the desired x coordinate of the client area * @param y the desired y coordinate of the client area * @param width the desired width of the client area @@ -185,7 +185,7 @@ public int getBorderWidth () { * Returns a rectangle which describes the area of the * receiver which is capable of displaying data (that is, * not covered by the "trimmings"). - * + * * @return the client area * * @exception SWTException <ul> @@ -229,18 +229,18 @@ public ScrollBar getHorizontalBar () { * <li><code>SWT.SCROLLBAR_OVERLAY</code> - if receiver * uses overlay scrollbars</li> * <li><code>SWT.NONE</code> - otherwise</li> - * + * * @return the mode of scrollbars - * + * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been * disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the * thread that created the receiver</li> * </ul> - * + * * @see SWT#SCROLLBAR_OVERLAY - * + * * @since 3.8 */ public int getScrollbarsMode () { @@ -266,7 +266,7 @@ public ScrollBar getVerticalBar () { @Override long /*int*/ gtk_scroll_event (long /*int*/ widget, long /*int*/ eventPtr) { long /*int*/ result = super.gtk_scroll_event (widget, eventPtr); - + /* * Feature in GTK. Scrolled windows do not scroll if the scrollbars * are hidden. This is not a bug, but is inconsistent with other platforms. @@ -360,7 +360,7 @@ void setOrientation (boolean create) { } } if (horizontalBar != null) horizontalBar.setOrientation (create); - if (verticalBar != null) verticalBar.setOrientation (create); + if (verticalBar != null) verticalBar.setOrientation (create); } boolean setScrollBarVisible (ScrollBar bar, boolean visible) { diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java index 6381aa8acc..412bade70e 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java @@ -22,20 +22,20 @@ import org.eclipse.swt.internal.gtk.*; * Instances of this class represent the "windows" * which the desktop or "window manager" is managing. * Instances that do not have a parent (that is, they - * are built using the constructor, which takes a + * are built using the constructor, which takes a * <code>Display</code> as the argument) are described * as <em>top level</em> shells. Instances that do have * a parent are described as <em>secondary</em> or * <em>dialog</em> shells. * <p> - * Instances are always displayed in one of the maximized, + * Instances are always displayed in one of the maximized, * minimized or normal states: * <ul> * <li> * When an instance is marked as <em>maximized</em>, the * window manager will typically resize it to fill the * entire visible area of the display, and the instance - * is usually put in a state where it can not be resized + * is usually put in a state where it can not be resized * (even if it has style <code>RESIZE</code>) until it is * no longer maximized. * </li><li> @@ -93,19 +93,19 @@ import org.eclipse.swt.internal.gtk.*; * <dt><code>SHELL_TRIM</code></dt> * <dd> * the result of combining the constants which are required - * to produce a typical application top level shell: (that + * to produce a typical application top level shell: (that * is, <code>CLOSE | TITLE | MIN | MAX | RESIZE</code>) * </dd> * <dt><code>DIALOG_TRIM</code></dt> * <dd> * the result of combining the constants which are required - * to produce a typical application dialog shell: (that + * to produce a typical application dialog shell: (that * is, <code>TITLE | CLOSE | BORDER</code>) * </dd> * </dl> * </p> * <p> - * Note: Only one of the styles APPLICATION_MODAL, MODELESS, + * Note: Only one of the styles APPLICATION_MODAL, MODELESS, * PRIMARY_MODAL and SYSTEM_MODAL may be specified. * </p><p> * IMPORTANT: This class is <em>not</em> intended to be subclassed. @@ -150,7 +150,7 @@ public Shell () { * <p> * The style value is either one of the style constants defined in * class <code>SWT</code> which is applicable to instances of this - * class, or must be built by <em>bitwise OR</em>'ing together + * class, or must be built by <em>bitwise OR</em>'ing together * (that is, using the <code>int</code> "|" operator) two or more * of those <code>SWT</code> style constants. The class description * lists the style constants that are applicable to the class. @@ -163,7 +163,7 @@ public Shell () { * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the parent</li> * <li>ERROR_INVALID_SUBCLASS - if this class is not an allowed subclass</li> * </ul> - * + * * @see SWT#BORDER * @see SWT#CLOSE * @see SWT#MIN @@ -191,7 +191,7 @@ public Shell (int style) { * <p> * Note: Currently, null can be passed in for the display argument. * This has the effect of creating the shell on the currently active - * display if there is one. If there is no current display, the + * display if there is one. If there is no current display, the * shell is created on a "default" display. <b>Passing in null as * the display argument is not considered to be good coding style, * and may not be supported in a future release of SWT.</b> @@ -214,7 +214,7 @@ public Shell (Display display) { * <p> * The style value is either one of the style constants defined in * class <code>SWT</code> which is applicable to instances of this - * class, or must be built by <em>bitwise OR</em>'ing together + * class, or must be built by <em>bitwise OR</em>'ing together * (that is, using the <code>int</code> "|" operator) two or more * of those <code>SWT</code> style constants. The class description * lists the style constants that are applicable to the class. @@ -222,7 +222,7 @@ public Shell (Display display) { * </p><p> * Note: Currently, null can be passed in for the display argument. * This has the effect of creating the shell on the currently active - * display if there is one. If there is no current display, the + * display if there is one. If there is no current display, the * shell is created on a "default" display. <b>Passing in null as * the display argument is not considered to be good coding style, * and may not be supported in a future release of SWT.</b> @@ -235,7 +235,7 @@ public Shell (Display display) { * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the parent</li> * <li>ERROR_INVALID_SUBCLASS - if this class is not an allowed subclass</li> * </ul> - * + * * @see SWT#BORDER * @see SWT#CLOSE * @see SWT#MIN @@ -266,7 +266,7 @@ Shell (Display display, Shell parent, int style, long /*int*/ handle, boolean em error (SWT.ERROR_THREAD_INVALID_ACCESS); } if (parent != null && parent.isDisposed ()) { - error (SWT.ERROR_INVALID_ARGUMENT); + error (SWT.ERROR_INVALID_ARGUMENT); } this.center = parent != null && (style & SWT.SHEET) != 0; this.style = checkStyle (parent, style); @@ -290,7 +290,7 @@ Shell (Display display, Shell parent, int style, long /*int*/ handle, boolean em * <p> * Note: Currently, null can be passed in for the parent. * This has the effect of creating the shell on the currently active - * display if there is one. If there is no current display, the + * display if there is one. If there is no current display, the * shell is created on a "default" display. <b>Passing in null as * the parent is not considered to be good coding style, * and may not be supported in a future release of SWT.</b> @@ -299,7 +299,7 @@ Shell (Display display, Shell parent, int style, long /*int*/ handle, boolean em * @param parent a shell which will be the parent of the new instance * * @exception IllegalArgumentException <ul> - * <li>ERROR_INVALID_ARGUMENT - if the parent is disposed</li> + * <li>ERROR_INVALID_ARGUMENT - if the parent is disposed</li> * </ul> * @exception SWTException <ul> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the parent</li> @@ -316,7 +316,7 @@ public Shell (Shell parent) { * <p> * The style value is either one of the style constants defined in * class <code>SWT</code> which is applicable to instances of this - * class, or must be built by <em>bitwise OR</em>'ing together + * class, or must be built by <em>bitwise OR</em>'ing together * (that is, using the <code>int</code> "|" operator) two or more * of those <code>SWT</code> style constants. The class description * lists the style constants that are applicable to the class. @@ -324,7 +324,7 @@ public Shell (Shell parent) { * </p><p> * Note: Currently, null can be passed in for the parent. * This has the effect of creating the shell on the currently active - * display if there is one. If there is no current display, the + * display if there is one. If there is no current display, the * shell is created on a "default" display. <b>Passing in null as * the parent is not considered to be good coding style, * and may not be supported in a future release of SWT.</b> @@ -334,13 +334,13 @@ public Shell (Shell parent) { * @param style the style of control to construct * * @exception IllegalArgumentException <ul> - * <li>ERROR_INVALID_ARGUMENT - if the parent is disposed</li> + * <li>ERROR_INVALID_ARGUMENT - if the parent is disposed</li> * </ul> * @exception SWTException <ul> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the parent</li> * <li>ERROR_INVALID_SUBCLASS - if this class is not an allowed subclass</li> * </ul> - * + * * @see SWT#BORDER * @see SWT#CLOSE * @see SWT#MIN @@ -362,7 +362,7 @@ public Shell (Shell parent, int style) { this (parent != null ? parent.display : null, parent, style, 0, false); } -/** +/** * Invokes platform specific functionality to allocate a new shell * that is embedded. * <p> @@ -376,14 +376,14 @@ public Shell (Shell parent, int style) { * @param display the display for the shell * @param handle the handle for the shell * @return a new shell object containing the specified display and handle - * + * * @noreference This method is not intended to be referenced by clients. */ public static Shell gtk_new (Display display, long /*int*/ handle) { return new Shell (display, null, SWT.NO_TRIM, handle, true); } -/** +/** * Invokes platform specific functionality to allocate a new shell * that is not embedded. * <p> @@ -397,9 +397,9 @@ public static Shell gtk_new (Display display, long /*int*/ handle) { * @param display the display for the shell * @param handle the handle for the shell * @return a new shell object containing the specified display and handle - * + * * @noreference This method is not intended to be referenced by clients. - * + * * @since 3.3 */ public static Shell internal_new (Display display, long /*int*/ handle) { @@ -541,7 +541,7 @@ void bringToTop (boolean force) { * the shell is hidden or disposed. The fix is to use XSetInputFocus() * to assign focus when ever the active shell has not managed by * the window manager. - * + * * NOTE: This bug is fixed in GTK+ 2.6.8 and above. */ boolean xFocus = false; @@ -578,7 +578,7 @@ void bringToTop (boolean force) { * Bug in metacity. Calling gdk_window_focus() with a timestamp more * recent than the last user interaction time can cause windows not * to come forward in versions > 2.10.0. The fix is to use the last - * user event time. + * user event time. */ if (display.windowManager.toLowerCase ().equals ("metacity")) { OS.gdk_window_focus (window, display.lastUserEventTime); @@ -722,7 +722,7 @@ void createHandle (int index) { } if (isCustomResize ()) { OS.gtk_container_set_border_width (shellHandle, BORDER); - } + } } vboxHandle = gtk_box_new (OS.GTK_ORIENTATION_VERTICAL, false, 0); if (vboxHandle == 0) error (SWT.ERROR_NO_HANDLES); @@ -747,7 +747,7 @@ long /*int*/ filterProc (long /*int*/ xEvent, long /*int*/ gdkEvent, long /*int* XFocusChangeEvent xFocusEvent = new XFocusChangeEvent(); OS.memmove (xFocusEvent, xEvent, XFocusChangeEvent.sizeof); switch (eventType) { - case OS.FocusIn: + case OS.FocusIn: if (xFocusEvent.mode == OS.NotifyNormal || xFocusEvent.mode == OS.NotifyWhileGrabbed) { switch (xFocusEvent.detail) { case OS.NotifyNonlinear: @@ -765,7 +765,7 @@ long /*int*/ filterProc (long /*int*/ xEvent, long /*int*/ gdkEvent, long /*int* } break; } - } + } break; case OS.FocusOut: if (xFocusEvent.mode == OS.NotifyNormal || xFocusEvent.mode == OS.NotifyWhileGrabbed) { @@ -784,7 +784,7 @@ long /*int*/ filterProc (long /*int*/ xEvent, long /*int*/ gdkEvent, long /*int* display.activePending = false; } if (isDisposed ()) return 0; - if (isCustomResize ()) { + if (isCustomResize ()) { OS.gdk_window_invalidate_rect (gtk_widget_get_window (shellHandle), null, false); } break; @@ -808,17 +808,17 @@ Composite findDeferredControl () { /** * Returns a ToolBar object representing the tool bar that can be shown in the receiver's * trim. This will return <code>null</code> if the platform does not support tool bars that - * are not part of the content area of the shell, or if the Shell's style does not support - * having a tool bar. + * are not part of the content area of the shell, or if the Shell's style does not support + * having a tool bar. * <p> - * + * * @return a ToolBar object representing the Shell's tool bar, or <ocde>null</code>. * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 3.7 */ public ToolBar getToolBar() { @@ -973,7 +973,7 @@ void forceResize (int width, int height) { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 3.4 */ public int getAlpha () { @@ -983,7 +983,7 @@ public int getAlpha () { return (int) (OS.gtk_window_get_opacity (shellHandle) * 255); } } - return 255; + return 255; } int getResizeMode (double x, double y) { @@ -1015,7 +1015,7 @@ int getResizeMode (double x, double y) { /** * Returns <code>true</code> if the receiver is currently - * in fullscreen state, and false otherwise. + * in fullscreen state, and false otherwise. * <p> * * @return the fullscreen state @@ -1058,7 +1058,7 @@ public boolean getMaximized () { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 3.1 */ public Point getMinimumSize () { @@ -1100,12 +1100,12 @@ Shell getModalShell () { * Gets the receiver's modified state. * * @return <code>true</code> if the receiver is marked as modified, or <code>false</code> otherwise - * + * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 3.5 */ public boolean getModified () { @@ -1130,15 +1130,15 @@ public Point getSize () { @Override public boolean getVisible () { checkWidget(); - return gtk_widget_get_visible (shellHandle); + return gtk_widget_get_visible (shellHandle); } -/** +/** * Returns the region that defines the shape of the shell, * or <code>null</code> if the shell has the default shape. * * @return the region that defines the shape of the shell, or <code>null</code> - * + * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> @@ -1160,7 +1160,7 @@ public Region getRegion () { * will be the result of bitwise OR'ing together one or * more of the following constants defined in class * <code>SWT</code>: - * <code>NONE</code>, <code>ROMAN</code>, <code>DBCS</code>, + * <code>NONE</code>, <code>ROMAN</code>, <code>DBCS</code>, * <code>PHONETIC</code>, <code>NATIVE</code>, <code>ALPHA</code>. * * @return the IME mode @@ -1182,7 +1182,7 @@ Shell _getShell () { return this; } /** - * Returns an array containing all shells which are + * Returns an array containing all shells which are * descendants of the receiver. * <p> * @return the dialog shells @@ -1478,7 +1478,7 @@ long /*int*/ gtk_key_press_event (long /*int*/ widget, long /*int*/ event) { if (widget == shellHandle) { /* Stop menu mnemonics when the shell is disabled */ if ((state & DISABLED) != 0) return 1; - + if (menuBar != null && !menuBar.isDisposed ()) { Control focusControl = display.getFocusControl (); if (focusControl != null && (focusControl.hooks (SWT.KeyDown) || focusControl.filters (SWT.KeyDown))) { @@ -1659,11 +1659,11 @@ void reskinChildren (int flags) { } /** - * If the receiver is visible, moves it to the top of the - * drawing order for the display on which it was created - * (so that all other shells on that display, which are not - * the receiver's children will be drawn behind it) and asks - * the window manager to make the shell active + * If the receiver is visible, moves it to the top of the + * drawing order for the display on which it was created + * (so that all other shells on that display, which are not + * the receiver's children will be drawn behind it) and asks + * the window manager to make the shell active * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> @@ -1692,7 +1692,7 @@ void setActiveControl (Control control, int type) { if (control != null && control.isDisposed ()) control = null; if (lastActive != null && lastActive.isDisposed ()) lastActive = null; if (lastActive == control) return; - + /* * Compute the list of controls to be activated and * deactivated by finding the first common parent @@ -1706,7 +1706,7 @@ void setActiveControl (Control control, int type) { if (activate [index] != deactivate [index]) break; index++; } - + /* * It is possible (but unlikely), that application * code could have destroyed some of the widgets. If @@ -1741,7 +1741,7 @@ void setActiveControl (Control control, int type) { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 3.4 */ public void setAlpha (int alpha) { @@ -1909,12 +1909,12 @@ public void setEnabled (boolean enabled) { * into full screen state, causes the receiver to switch back * to either the maximized or normal states. * <p> - * Note: The result of intermixing calls to <code>setFullScreen(true)</code>, - * <code>setMaximized(true)</code> and <code>setMinimized(true)</code> will - * vary by platform. Typically, the behavior will match the platform user's + * Note: The result of intermixing calls to <code>setFullScreen(true)</code>, + * <code>setMaximized(true)</code> and <code>setMinimized(true)</code> will + * vary by platform. Typically, the behavior will match the platform user's * expectations, but not always. This should be avoided if possible. * </p> - * + * * @param fullScreen the new fullscreen state * * @exception SWTException <ul> @@ -1938,10 +1938,10 @@ public void setFullScreen (boolean fullScreen) { } /** - * Sets the input method editor mode to the argument which + * Sets the input method editor mode to the argument which * should be the result of bitwise OR'ing together one or more * of the following constants defined in class <code>SWT</code>: - * <code>NONE</code>, <code>ROMAN</code>, <code>DBCS</code>, + * <code>NONE</code>, <code>ROMAN</code>, <code>DBCS</code>, * <code>PHONETIC</code>, <code>NATIVE</code>, <code>ALPHA</code>. * * @param mode the new IME mode @@ -2049,7 +2049,7 @@ public void setMinimized (boolean minimized) { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 3.1 */ public void setMinimumSize (int width, int height) { @@ -2074,7 +2074,7 @@ public void setMinimumSize (int width, int height) { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 3.1 */ public void setMinimumSize (Point size) { @@ -2093,7 +2093,7 @@ public void setMinimumSize (Point size) { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 3.5 */ public void setModified (boolean modified) { @@ -2112,7 +2112,7 @@ public void setModified (boolean modified) { * * @exception IllegalArgumentException <ul> * <li>ERROR_INVALID_ARGUMENT - if the region has been disposed</li> - * </ul> + * </ul> * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> @@ -2125,7 +2125,7 @@ public void setModified (boolean modified) { public void setRegion (Region region) { checkWidget (); if ((style & SWT.NO_TRIM) == 0) return; - + if (region != null) { Rectangle bounds = region.getBounds (); setSize (bounds.x + bounds.width, bounds.y + bounds.height); @@ -2158,7 +2158,7 @@ static void gdk_region_get_rectangles(long /*int*/ region, long /*int*/[] rectan static Region mirrorRegion (Region region) { if (region == null) return null; - + Region mirrored = new Region (region.getDevice ()); long /*int*/ rgn = region.handle; @@ -2187,7 +2187,7 @@ void setRelations() { public void setText (String string) { super.setText (string); - /* + /* * GTK bug 82013. For some reason, if the title string * is less than 7 bytes long and is not terminated by * a space, some window managers occasionally draw @@ -2232,7 +2232,7 @@ public void setVisible (boolean visible) { * and fully painted, dispatch events such as * GDK_MAP and GDK_CONFIGURE, until the GDK_MAP * event for the shell is received. - * + * * Note that if the parent is minimized or withdrawn * from the desktop, this should not be done since * the shell not will be mapped until the parent is @@ -2251,7 +2251,7 @@ public void setVisible (boolean visible) { OS.GDK_UNMAP, OS.GDK_NO_EXPOSE, OS.GDK_VISIBILITY_NOTIFY, - OS.GDK_WINDOW_STATE + OS.GDK_WINDOW_STATE }; Display display = this.display; display.putGdkEvents(); @@ -2262,7 +2262,7 @@ public void setVisible (boolean visible) { * This call to gdk_threads_leave() is a temporary work around * to avoid deadlocks when gdk_threads_init() is called by native * code outside of SWT (i.e AWT, etc). It ensures that the current - * thread leaves the GTK lock before calling the function below. + * thread leaves the GTK lock before calling the function below. */ OS.gdk_threads_leave(); OS.g_main_context_iteration (0, false); @@ -2334,7 +2334,7 @@ long /*int*/ shellMapProc (long /*int*/ handle, long /*int*/ arg0, long /*int*/ void showWidget () { if ((state & FOREIGN_HANDLE) != 0) { /* - * In case of foreign handles, activeShell might not be initialised as + * In case of foreign handles, activeShell might not be initialised as * no focusIn events are generated on the window until the window loses * and gain focus. */ @@ -2376,7 +2376,7 @@ long /*int*/ sizeAllocateProc (long /*int*/ handle, long /*int*/ arg0, long /*in if (y[0] + height > dest.y + dest.height) { y[0] = (dest.y + dest.height) - height; } - } + } OS.gtk_window_move (handle, x [0], y [0]); return 0; } @@ -2442,7 +2442,7 @@ void updateModal () { /* * Feature in GTK. If a modal shell is reassigned to * a different group, then it's modal state is not. - * persisted against the new group. + * persisted against the new group. * The fix is to reset the modality before it is changed * into a different group and then, set back after it * assigned into new group. @@ -2463,16 +2463,16 @@ void updateModal () { shell = shell.parent; } /* - * If a modal shell doesn't have any parent (or modal shell as it's parent), - * then we incorrectly add the modal shell to the default group, due to which - * children of that modal shell are not interactive. The fix is to ensure + * If a modal shell doesn't have any parent (or modal shell as it's parent), + * then we incorrectly add the modal shell to the default group, due to which + * children of that modal shell are not interactive. The fix is to ensure * that whenever there is a modal shell in the hierarchy, then we always * add the modal shell's group to that modal shell and it's modelless children * in a different group. */ if (group == 0 && topModalShell != null) group = topModalShell.getShell ().group; } - if (group == 0) { + if (group == 0) { /* * Feature in GTK. Starting with GTK version 2.10, GTK * doesn't assign windows to a default group. The fix is to @@ -2536,10 +2536,10 @@ public void dispose () { } /** - * If the receiver is visible, moves it to the top of the - * drawing order for the display on which it was created - * (so that all other shells on that display, which are not - * the receiver's children will be drawn behind it) and forces + * If the receiver is visible, moves it to the top of the + * drawing order for the display on which it was created + * (so that all other shells on that display, which are not + * the receiver's children will be drawn behind it) and forces * the window manager to make the shell active. * * @exception SWTException <ul> @@ -2646,16 +2646,16 @@ void setToolTipText (long /*int*/ rootWidget, long /*int*/ tipWidget, String str } if (oldTooltip != 0) OS.g_free(oldTooltip); if (same) return; - + long /*int*/ eventPtr = 0; if (OS.GTK_VERSION < OS.VERSION (2, 18, 0)) { OS.gtk_widget_set_tooltip_text (rootWidget, null); /* * Bug in GTK. In GTK 2.12, due to a miscalculation of window * coordinates, using gtk_tooltip_trigger_tooltip_query () - * to update an existing a toboltip will result in the tooltip - * being displayed at a wrong position. The fix is to send out - * 2 fake GDK_MOTION_NOTIFY events (to mimic the GTK call) which + * to update an existing a toboltip will result in the tooltip + * being displayed at a wrong position. The fix is to send out + * 2 fake GDK_MOTION_NOTIFY events (to mimic the GTK call) which * contain the proper x and y coordinates. */ long /*int*/ tipWindow = gtk_widget_get_window (rootWidget); @@ -2707,7 +2707,7 @@ void setToolTipText (long /*int*/ rootWidget, long /*int*/ tipWidget, String str OS.g_object_ref (tooltipsHandle); OS.g_object_ref_sink (tooltipsHandle); } - + /* * Feature in GTK. There is no API to position a tooltip. * The fix is to connect to the size_allocate signal for @@ -2725,7 +2725,7 @@ void setToolTipText (long /*int*/ rootWidget, long /*int*/ tipWidget, String str OS.g_signal_connect (tipWindow, OS.size_allocate, display.sizeAllocateProc, shellHandle); tooltipWindow = tipWindow; } - + /* * Bug in GTK. If the cursor is inside the window when a new * tooltip is set and the old tooltip is hidden, the new tooltip @@ -2741,12 +2741,12 @@ void setToolTipText (long /*int*/ rootWidget, long /*int*/ tipWidget, String str long /*int*/ [] user_data = new long /*int*/ [1]; OS.gdk_window_get_user_data (window, user_data); if (tipWidget == user_data [0]) { - /* + /* * Feature in GTK. Calling gtk_tooltips_set_tip() positions and * shows the tooltip. If the tooltip is already visible, moving * it to a new location in the size_allocate signal causes flashing. * The fix is to hide the tip window in the size_request signal - * and before the new tooltip is forced to be active. + * and before the new tooltip is forced to be active. */ set = false; int handler_id = OS.g_signal_connect (tipWindow, OS.size_request, display.sizeRequestProc, shellHandle); @@ -2762,7 +2762,7 @@ void setToolTipText (long /*int*/ rootWidget, long /*int*/ tipWidget, String str } if (set) OS.gtk_tooltips_set_tip (tooltipsHandle, tipWidget, buffer, null); } - + } @Override Point getWindowOrigin () { @@ -2770,7 +2770,7 @@ Point getWindowOrigin () { /* * Special case: The handle attributes are not initialized until the * shell is made visible, so gdk_window_get_origin () always returns {0, 0}. - * + * * Once the shell is realized, gtk_window_get_position () includes * window trims etc. from the window manager. That's why getLocation () * is not safe to use for coordinate mappings after the shell has been made visible. diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Slider.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Slider.java index 66951019a4..9bd54d5ad2 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Slider.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Slider.java @@ -18,9 +18,9 @@ import org.eclipse.swt.events.*; /** * Instances of this class are selectable user interface - * objects that represent a range of positive, numeric values. + * objects that represent a range of positive, numeric values. * <p> - * At any given moment, a given slider will have a + * At any given moment, a given slider will have a * single 'selection' that is considered to be its * value, which is constrained to be within the range of * values the slider represents (that is, between its @@ -77,7 +77,7 @@ public class Slider extends Control { * <p> * The style value is either one of the style constants defined in * class <code>SWT</code> which is applicable to instances of this - * class, or must be built by <em>bitwise OR</em>'ing together + * class, or must be built by <em>bitwise OR</em>'ing together * (that is, using the <code>int</code> "|" operator) two or more * of those <code>SWT</code> style constants. The class description * lists the style constants that are applicable to the class. @@ -168,7 +168,7 @@ void createHandle (int index) { * when the GTK_CAN_FOCUS flag is set. The fix is not to set * the flag for horizontal bars in all versions of 2.10. Note * that a bug has been logged with GTK about this issue. - * (http://bugzilla.gnome.org/show_bug.cgi?id=475909) + * (http://bugzilla.gnome.org/show_bug.cgi?id=475909) */ if ((style & SWT.VERTICAL) != 0) { gtk_widget_set_can_focus (handle, true); @@ -400,13 +400,13 @@ public void removeSelectionListener (SelectionListener listener) { if (listener == null) error (SWT.ERROR_NULL_ARGUMENT); if (eventTable == null) return; eventTable.unhook (SWT.Selection, listener); - eventTable.unhook (SWT.DefaultSelection,listener); + eventTable.unhook (SWT.DefaultSelection,listener); } /** * Sets the amount that the receiver's value will be * modified by when the up/down (or right/left) arrows - * are pressed to the argument, which must be at least + * are pressed to the argument, which must be at least * one. * * @param value the new increment (must be greater than zero) @@ -532,11 +532,11 @@ public void setSelection (int value) { } /** - * Sets the thumb value. The thumb value should be used to represent + * Sets the thumb value. The thumb value should be used to represent * the size of the visual portion of the current range. This value is * usually the same as the page increment value. * <p> - * This new value will be ignored if it is less than one, and will be + * This new value will be ignored if it is less than one, and will be * clamped if it exceeds the receiver's current range. * </p> * @@ -567,7 +567,7 @@ public void setThumb (int value) { * value, thumb, increment and page increment all at once. * <p> * Note: This is similar to setting the values individually - * using the appropriate methods, but may be implemented in a + * using the appropriate methods, but may be implemented in a * more efficient fashion on some platforms. * </p> * diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Spinner.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Spinner.java index 62c1f469ab..b64c17596f 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Spinner.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Spinner.java @@ -38,7 +38,7 @@ import org.eclipse.swt.events.*; * @see <a href="http://www.eclipse.org/swt/snippets/#spinner">Spinner snippets</a> * @see <a href="http://www.eclipse.org/swt/examples.php">SWT Example: ControlExample</a> * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a> - * + * * @since 3.1 * @noextend This class is not intended to be subclassed by clients. */ @@ -49,11 +49,11 @@ public class Spinner extends Composite { long /*int*/ gdkEventKey = 0; int fixStart = -1, fixEnd = -1; double climbRate = 1; - + /** * the operating system limit for the number of characters * that the text field in an instance of this class can hold - * + * * @since 3.4 */ public final static int LIMIT; @@ -65,14 +65,14 @@ public class Spinner extends Composite { static { LIMIT = 0x7FFFFFFF; } - + /** * Constructs a new instance of this class given its parent * and a style value describing its behavior and appearance. * <p> * The style value is either one of the style constants defined in * class <code>SWT</code> which is applicable to instances of this - * class, or must be built by <em>bitwise OR</em>'ing together + * class, or must be built by <em>bitwise OR</em>'ing together * (that is, using the <code>int</code> "|" operator) two or more * of those <code>SWT</code> style constants. The class description * lists the style constants that are applicable to the class. @@ -210,7 +210,7 @@ public Point computeSize (int wHint, int hHint, boolean changed) { long /*int*/ hAdjustment = OS.gtk_spin_button_get_adjustment (handle); double upper = gtk_adjustment_get_upper (hAdjustment); int digits = OS.gtk_spin_button_get_digits (handle); - for (int i = 0; i < digits; i++) upper *= 10; + for (int i = 0; i < digits; i++) upper *= 10; String string = String.valueOf ((int) upper); if (digits > 0) { StringBuffer buffer = new StringBuffer (); @@ -227,7 +227,7 @@ public Point computeSize (int wHint, int hHint, boolean changed) { long /*int*/ ptr = OS.pango_layout_get_text (layout); int length = OS.strlen (ptr); byte [] buffer2 = new byte [length]; - OS.memmove (buffer2, ptr, length); + OS.memmove (buffer2, ptr, length); OS.pango_layout_set_text (layout, buffer1, buffer1.length); OS.pango_layout_set_text (layout, buffer2, buffer2.length); int width, height = 0 ; @@ -237,7 +237,7 @@ public Point computeSize (int wHint, int hHint, boolean changed) { GtkRequisition requisition = new GtkRequisition (); OS.gtk_widget_get_preferred_size (handle, requisition, null); width = wHint == SWT.DEFAULT ? requisition.width : wHint; - height = hHint == SWT.DEFAULT ? requisition.height : hHint; + height = hHint == SWT.DEFAULT ? requisition.height : hHint; } else { OS.pango_layout_get_pixel_size (layout, w, h); width = wHint == SWT.DEFAULT ? w [0] : wHint; @@ -272,7 +272,7 @@ public Rectangle computeTrim (int x, int y, int width, int height) { long /*int*/ fontDesc = getFontDescription (); int fontSize = OS.pango_font_description_get_size (fontDesc); int arrowSize = Math.max (OS.PANGO_PIXELS (fontSize), MIN_ARROW_WIDTH); - arrowSize = arrowSize - arrowSize % 2; + arrowSize = arrowSize - arrowSize % 2; trim.width += arrowSize + (2 * thickness.x); } int [] property = new int [1]; @@ -386,11 +386,11 @@ void fixIM () { /* * The IM filter has to be called one time for each key press event. * When the IM is open the key events are duplicated. The first event - * is filtered by SWT and the second event is filtered by GTK. In some - * cases the GTK handler does not run (the widget is destroyed, the + * is filtered by SWT and the second event is filtered by GTK. In some + * cases the GTK handler does not run (the widget is destroyed, the * application code consumes the event, etc), for these cases the IM * filter has to be called by SWT. - */ + */ if (gdkEventKey != 0 && gdkEventKey != -1) { long /*int*/ imContext = imContext (); if (imContext != 0) { @@ -502,7 +502,7 @@ public int getPageIncrement () { /** * Returns the <em>selection</em>, which is the receiver's position. * - * @return the selection + * @return the selection * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> @@ -510,7 +510,7 @@ public int getPageIncrement () { * </ul> */ public int getSelection () { - checkWidget (); + checkWidget (); long /*int*/ hAdjustment = OS.gtk_spin_button_get_adjustment (handle); int digits = OS.gtk_spin_button_get_digits (handle); double value = gtk_adjustment_get_value(hAdjustment); @@ -529,7 +529,7 @@ public int getSelection () { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 3.4 */ public String getText () { @@ -547,16 +547,16 @@ public String getText () { * text field is capable of holding. If this has not been changed * by <code>setTextLimit()</code>, it will be the constant * <code>Spinner.LIMIT</code>. - * + * * @return the text limit - * + * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> * * @see #LIMIT - * + * * @since 3.4 */ public int getTextLimit () { @@ -584,7 +584,7 @@ String getDecimalSeparator () { long /*int*/ ptr = OS.localeconv_decimal_point (); int length = OS.strlen (ptr); byte [] buffer = new byte [length]; - OS.memmove (buffer, ptr, length); + OS.memmove (buffer, ptr, length); return new String (Converter.mbcsToWcs (null, buffer)); } @@ -610,7 +610,7 @@ long /*int*/ gtk_changed (long /*int*/ widget) { } } } - + /* * Feature in GTK. When the user types, GTK positions * the caret after sending the changed signal. This @@ -799,7 +799,7 @@ void hookEvents () { } long /*int*/ imContext () { - if (imContext != 0) return imContext; + if (imContext != 0) return imContext; return OS.GTK_ENTRY_IM_CONTEXT (handle); } @@ -863,7 +863,7 @@ public void removeModifyListener (ModifyListener listener) { checkWidget (); if (listener == null) error (SWT.ERROR_NULL_ARGUMENT); if (eventTable == null) return; - eventTable.unhook (SWT.Modify, listener); + eventTable.unhook (SWT.Modify, listener); } /** @@ -888,7 +888,7 @@ public void removeSelectionListener(SelectionListener listener) { if (listener == null) error (SWT.ERROR_NULL_ARGUMENT); if (eventTable == null) return; eventTable.unhook(SWT.Selection, listener); - eventTable.unhook(SWT.DefaultSelection,listener); + eventTable.unhook(SWT.DefaultSelection,listener); } /** @@ -912,7 +912,7 @@ void removeVerifyListener (VerifyListener listener) { checkWidget (); if (listener == null) error (SWT.ERROR_NULL_ARGUMENT); if (eventTable == null) return; - eventTable.unhook (SWT.Verify, listener); + eventTable.unhook (SWT.Verify, listener); } @Override @@ -1083,9 +1083,9 @@ public void setSelection (int value) { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @see #LIMIT - * + * * @since 3.4 */ public void setTextLimit (int limit) { @@ -1098,17 +1098,17 @@ public void setTextLimit (int limit) { * Sets the number of decimal places used by the receiver. * <p> * The digit setting is used to allow for floating point values in the receiver. - * For example, to set the selection to a floating point value of 1.37 call setDigits() with + * For example, to set the selection to a floating point value of 1.37 call setDigits() with * a value of 2 and setSelection() with a value of 137. Similarly, if getDigits() has a value * of 2 and getSelection() returns 137 this should be interpreted as 1.37. This applies to all - * numeric APIs. + * numeric APIs. * </p> - * + * * @param value the new digits (must be greater than or equal to zero) - * + * * @exception IllegalArgumentException <ul> * <li>ERROR_INVALID_ARGUMENT - if the value is less than zero</li> - * </ul> + * </ul> * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> @@ -1151,7 +1151,7 @@ public void setDigits (int value) { * value, digits, increment and page increment all at once. * <p> * Note: This is similar to setting the values individually - * using the appropriate methods, but may be implemented in a + * using the appropriate methods, but may be implemented in a * more efficient fashion on some platforms. * </p> * @@ -1166,7 +1166,7 @@ public void setDigits (int value) { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 3.2 */ public void setValues (int selection, int minimum, int maximum, int digits, int increment, int pageIncrement) { @@ -1177,15 +1177,15 @@ public void setValues (int selection, int minimum, int maximum, int digits, int if (pageIncrement < 1) return; selection = Math.min (Math.max (minimum, selection), maximum); double factor = 1; - for (int i = 0; i < digits; i++) factor *= 10; + for (int i = 0; i < digits; i++) factor *= 10; OS.g_signal_handlers_block_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, VALUE_CHANGED); OS.gtk_spin_button_set_range (handle, minimum / factor, maximum / factor); OS.gtk_spin_button_set_increments (handle, increment / factor, pageIncrement / factor); OS.gtk_spin_button_set_value (handle, selection / factor); /* - * The value of climb-rate indicates the acceleration rate - * to spin the value when the button is pressed and hold - * on the arrow button. This value should be varied + * The value of climb-rate indicates the acceleration rate + * to spin the value when the button is pressed and hold + * on the arrow button. This value should be varied * depending upon the value of digits. */ climbRate = 1.0 / factor; diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TableColumn.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TableColumn.java index e2b6bdb809..6f1830ff86 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TableColumn.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TableColumn.java @@ -50,7 +50,7 @@ public class TableColumn extends Item { * <p> * The style value is either one of the style constants defined in * class <code>SWT</code> which is applicable to instances of this - * class, or must be built by <em>bitwise OR</em>'ing together + * class, or must be built by <em>bitwise OR</em>'ing together * (that is, using the <code>int</code> "|" operator) two or more * of those <code>SWT</code> style constants. The class description * lists the style constants that are applicable to the class. @@ -88,7 +88,7 @@ public TableColumn (Table parent, int style) { * <p> * The style value is either one of the style constants defined in * class <code>SWT</code> which is applicable to instances of this - * class, or must be built by <em>bitwise OR</em>'ing together + * class, or must be built by <em>bitwise OR</em>'ing together * (that is, using the <code>int</code> "|" operator) two or more * of those <code>SWT</code> style constants. The class description * lists the style constants that are applicable to the class. @@ -219,7 +219,7 @@ void destroyWidget () { * text or image in the receiver. The value will be one of * <code>LEFT</code>, <code>RIGHT</code> or <code>CENTER</code>. * - * @return the alignment + * @return the alignment * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> @@ -236,8 +236,8 @@ public int getAlignment () { /** * Gets the moveable attribute. A column that is - * not moveable cannot be reordered by the user - * by dragging the header but may be reordered + * not moveable cannot be reordered by the user + * by dragging the header but may be reordered * by the programmer. * * @return the moveable attribute @@ -246,12 +246,12 @@ public int getAlignment () { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @see Table#getColumnOrder() * @see Table#setColumnOrder(int[]) * @see TableColumn#setMoveable(boolean) * @see SWT#Move - * + * * @since 3.1 */ public boolean getMoveable() { @@ -301,7 +301,7 @@ public boolean getResizable () { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 3.2 */ public String getToolTipText () { @@ -462,7 +462,7 @@ void register () { void releaseHandle () { super.releaseHandle (); handle = buttonHandle = labelHandle = imageHandle = 0; - modelIndex = -1; + modelIndex = -1; parent = null; } @@ -521,7 +521,7 @@ public void removeSelectionListener(SelectionListener listener) { if (listener == null) error (SWT.ERROR_NULL_ARGUMENT); if (eventTable == null) return; eventTable.unhook (SWT.Selection, listener); - eventTable.unhook (SWT.DefaultSelection,listener); + eventTable.unhook (SWT.DefaultSelection,listener); } /** @@ -532,7 +532,7 @@ public void removeSelectionListener(SelectionListener listener) { * Note that due to a restriction on some platforms, the first column * is always left aligned. * </p> - * @param alignment the new alignment + * @param alignment the new alignment * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> @@ -577,8 +577,8 @@ public void setImage (Image image) { /** * Sets the resizable attribute. A column that is * resizable can be resized by the user dragging the - * edge of the header. A column that is not resizable - * cannot be dragged by the user but may be resized + * edge of the header. A column that is not resizable + * cannot be dragged by the user but may be resized * by the programmer. * * @param resizable the resize attribute @@ -596,8 +596,8 @@ public void setResizable (boolean resizable) { /** * Sets the moveable attribute. A column that is * moveable can be reordered by the user by dragging - * the header. A column that is not moveable cannot be - * dragged by the user but may be reordered + * the header. A column that is not moveable cannot be + * dragged by the user but may be reordered * by the programmer. * * @param moveable the moveable attribute @@ -606,12 +606,12 @@ public void setResizable (boolean resizable) { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @see Table#setColumnOrder(int[]) * @see Table#getColumnOrder() * @see TableColumn#getMoveable() * @see SWT#Move - * + * * @since 3.1 */ public void setMoveable (boolean moveable) { @@ -647,24 +647,24 @@ public void setText (String string) { /** * Sets the receiver's tool tip text to the argument, which - * may be null indicating that the default tool tip for the + * may be null indicating that the default tool tip for the * control will be shown. For a control that has a default * tool tip, such as the Tree control on Windows, setting * the tool tip text to an empty string replaces the default, * causing no tool tip text to be shown. * <p> * The mnemonic indicator (character '&') is not displayed in a tool tip. - * To display a single '&' in the tool tip, the character '&' can be + * To display a single '&' in the tool tip, the character '&' can be * escaped by doubling it in the string. * </p> - * + * * @param string the new tool tip text (or null) * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 3.2 */ public void setToolTipText (String string) { @@ -706,10 +706,10 @@ public void setWidth (int width) { lastWidth = width; /* * Bug in GTK. When the column is made visible the event window of column - * header is raised above the gripper window of the previous column. In + * header is raised above the gripper window of the previous column. In * some cases, this can cause the previous column to be not resizable by * the mouse. The fix is to find the event window and lower it to bottom to - * the z-order stack. + * the z-order stack. */ if (width != 0) { if (buttonHandle != 0) { diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TableItem.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TableItem.java index 2f436bd865..468730659d 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TableItem.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TableItem.java @@ -38,7 +38,7 @@ public class TableItem extends Item { Font font; Font[] cellFont; boolean cached, grayed; - + /** * Constructs a new instance of this class given its parent * (which must be a <code>Table</code>), a style value @@ -47,7 +47,7 @@ public class TableItem extends Item { * <p> * The style value is either one of the style constants defined in * class <code>SWT</code> which is applicable to instances of this - * class, or must be built by <em>bitwise OR</em>'ing together + * class, or must be built by <em>bitwise OR</em>'ing together * (that is, using the <code>int</code> "|" operator) two or more * of those <code>SWT</code> style constants. The class description * lists the style constants that are applicable to the class. @@ -83,7 +83,7 @@ public TableItem (Table parent, int style, int index) { * <p> * The style value is either one of the style constants defined in * class <code>SWT</code> which is applicable to instances of this - * class, or must be built by <em>bitwise OR</em>'ing together + * class, or must be built by <em>bitwise OR</em>'ing together * (that is, using the <code>int</code> "|" operator) two or more * of those <code>SWT</code> style constants. The class description * lists the style constants that are applicable to the class. @@ -243,7 +243,7 @@ void destroyWidget () { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 2.0 */ public Color getBackground () { @@ -262,7 +262,7 @@ public Color getBackground () { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 3.2 */ public Rectangle getBounds () { @@ -279,11 +279,11 @@ public Rectangle getBounds () { long /*int*/ path = OS.gtk_tree_model_get_path (parent.modelHandle, handle); OS.gtk_widget_realize (parentHandle); - + boolean isExpander = OS.gtk_tree_model_iter_n_children (parent.modelHandle, handle) > 0; boolean isExpanded = OS.gtk_tree_view_row_expanded (parentHandle, path); OS.gtk_tree_view_column_cell_set_cell_data (column, parent.modelHandle, handle, isExpander, isExpanded); - + GdkRectangle rect = new GdkRectangle (); OS.gtk_tree_view_get_cell_area (parentHandle, path, column, rect); OS.gtk_tree_path_free (path); @@ -303,10 +303,10 @@ public Rectangle getBounds () { OS.gtk_widget_style_get (parentHandle, OS.horizontal_separator, buffer, 0); int horizontalSeparator = buffer[0]; rect.x += horizontalSeparator; - + OS.gtk_tree_view_column_cell_get_position (column, textRenderer, x, null); rect.x += x [0]; - + if (parent.columnCount > 0) { if (rect.x + rect.width > right) { rect.width = Math.max (0, right - rect.x); @@ -326,7 +326,7 @@ public Rectangle getBounds () { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 3.0 */ public Color getBackground (int index) { @@ -364,7 +364,7 @@ public Rectangle getBounds (int index) { OS.gtk_tree_view_get_cell_area (parentHandle, path, column, rect); OS.gtk_tree_path_free (path); if ((parent.getStyle () & SWT.MIRRORED) != 0) rect.x = parent.getClientWidth () - rect.width - rect.x; - + if (index == 0 && (parent.style & SWT.CHECK) != 0) { int [] x = new int [1], w = new int [1]; OS.gtk_tree_view_column_cell_get_position (column, parent.checkRenderer, x, w); @@ -444,7 +444,7 @@ public Font getFont (int index) { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 2.0 */ public Color getForeground () { @@ -454,7 +454,7 @@ public Color getForeground () { } /** - * + * * Returns the foreground color at the given column index in the receiver. * * @param index the column index @@ -464,7 +464,7 @@ public Color getForeground () { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 3.0 */ public Color getForeground (int index) { @@ -636,7 +636,7 @@ public String getText (int index) { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 3.3 */ public Rectangle getTextBounds (int index) { @@ -660,11 +660,11 @@ public Rectangle getTextBounds (int index) { long /*int*/ path = OS.gtk_tree_model_get_path (parent.modelHandle, handle); OS.gtk_widget_realize (parentHandle); - + boolean isExpander = OS.gtk_tree_model_iter_n_children (parent.modelHandle, handle) > 0; boolean isExpanded = OS.gtk_tree_view_row_expanded (parentHandle, path); OS.gtk_tree_view_column_cell_set_cell_data (column, parent.modelHandle, handle, isExpander, isExpanded); - + GdkRectangle rect = new GdkRectangle (); OS.gtk_tree_view_get_cell_area (parentHandle, path, column, rect); OS.gtk_tree_path_free (path); @@ -683,7 +683,7 @@ public Rectangle getTextBounds (int index) { OS.gtk_widget_style_get (parentHandle, OS.horizontal_separator, buffer, 0); int horizontalSeparator = buffer[0]; rect.x += horizontalSeparator; - + OS.gtk_tree_view_column_cell_get_position (column, textRenderer, x, null); rect.x += x [0]; if (parent.columnCount > 0) { @@ -718,13 +718,13 @@ void releaseWidget () { * @param color the new color (or null) * * @exception IllegalArgumentException <ul> - * <li>ERROR_INVALID_ARGUMENT - if the argument has been disposed</li> + * <li>ERROR_INVALID_ARGUMENT - if the argument has been disposed</li> * </ul> * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 2.0 */ public void setBackground (Color color) { @@ -739,7 +739,7 @@ public void setBackground (Color color) { } /** - * Sets the background color at the given column index in the receiver + * Sets the background color at the given column index in the receiver * to the color specified by the argument, or to the default system color for the item * if the argument is null. * @@ -747,13 +747,13 @@ public void setBackground (Color color) { * @param color the new color (or null) * * @exception IllegalArgumentException <ul> - * <li>ERROR_INVALID_ARGUMENT - if the argument has been disposed</li> + * <li>ERROR_INVALID_ARGUMENT - if the argument has been disposed</li> * </ul> * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 3.0 */ public void setBackground (int index, Color color) { @@ -768,7 +768,7 @@ public void setBackground (int index, Color color) { GdkColor gdkColor = color != null ? color.handle : null; OS.gtk_list_store_set (parent.modelHandle, handle, modelIndex + Table.CELL_BACKGROUND, gdkColor, -1); cached = true; - + if (color != null) { boolean customDraw = (parent.columnCount == 0) ? parent.firstCustomDraw : parent.columns [index].customDraw; if (!customDraw) { @@ -796,7 +796,7 @@ public void setBackground (int index, Color color) { } /** - * Sets the checked state of the checkbox for this item. This state change + * Sets the checked state of the checkbox for this item. This state change * only applies if the Table was created with the SWT.CHECK style. * * @param checked the new checked state of the checkbox @@ -814,7 +814,7 @@ public void setChecked (boolean checked) { /* * GTK+'s "inconsistent" state does not match SWT's concept of grayed. To * show checked+grayed differently from unchecked+grayed, we must toggle the - * grayed state on check and uncheck. + * grayed state on check and uncheck. */ OS.gtk_list_store_set (parent.modelHandle, handle, Table.GRAYED_COLUMN, !checked ? false : grayed, -1); cached = true; @@ -828,13 +828,13 @@ public void setChecked (boolean checked) { * @param font the new font (or null) * * @exception IllegalArgumentException <ul> - * <li>ERROR_INVALID_ARGUMENT - if the argument has been disposed</li> + * <li>ERROR_INVALID_ARGUMENT - if the argument has been disposed</li> * </ul> * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 3.0 */ public void setFont (Font font){ @@ -853,21 +853,21 @@ public void setFont (Font font){ /** * Sets the font that the receiver will use to paint textual information - * for the specified cell in this item to the font specified by the - * argument, or to the default font for that kind of control if the + * for the specified cell in this item to the font specified by the + * argument, or to the default font for that kind of control if the * argument is null. * * @param index the column index * @param font the new font (or null) * * @exception IllegalArgumentException <ul> - * <li>ERROR_INVALID_ARGUMENT - if the argument has been disposed</li> + * <li>ERROR_INVALID_ARGUMENT - if the argument has been disposed</li> * </ul> * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 3.0 */ public void setFont (int index, Font font) { @@ -889,8 +889,8 @@ public void setFont (int index, Font font) { int modelIndex = parent.columnCount == 0 ? Table.FIRST_COLUMN : parent.columns [index].modelIndex; long /*int*/ fontHandle = font != null ? font.handle : 0; OS.gtk_list_store_set (parent.modelHandle, handle, modelIndex + Table.CELL_FONT, fontHandle, -1); - cached = true; - + cached = true; + if (font != null) { boolean customDraw = (parent.columnCount == 0) ? parent.firstCustomDraw : parent.columns [index].customDraw; if (!customDraw) { @@ -925,13 +925,13 @@ public void setFont (int index, Font font) { * @param color the new color (or null) * * @exception IllegalArgumentException <ul> - * <li>ERROR_INVALID_ARGUMENT - if the argument has been disposed</li> + * <li>ERROR_INVALID_ARGUMENT - if the argument has been disposed</li> * </ul> * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 2.0 */ public void setForeground (Color color){ @@ -946,7 +946,7 @@ public void setForeground (Color color){ } /** - * Sets the foreground color at the given column index in the receiver + * Sets the foreground color at the given column index in the receiver * to the color specified by the argument, or to the default system color for the item * if the argument is null. * @@ -954,13 +954,13 @@ public void setForeground (Color color){ * @param color the new color (or null) * * @exception IllegalArgumentException <ul> - * <li>ERROR_INVALID_ARGUMENT - if the argument has been disposed</li> + * <li>ERROR_INVALID_ARGUMENT - if the argument has been disposed</li> * </ul> * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 3.0 */ public void setForeground (int index, Color color){ @@ -975,7 +975,7 @@ public void setForeground (int index, Color color){ GdkColor gdkColor = color != null ? color.handle : null; OS.gtk_list_store_set (parent.modelHandle, handle, modelIndex + Table.CELL_FOREGROUND, gdkColor, -1); cached = true; - + if (color != null) { boolean customDraw = (parent.columnCount == 0) ? parent.firstCustomDraw : parent.columns [index].customDraw; if (!customDraw) { @@ -1003,10 +1003,10 @@ public void setForeground (int index, Color color){ } /** - * Sets the grayed state of the checkbox for this item. This state change + * Sets the grayed state of the checkbox for this item. This state change * only applies if the Table was created with the SWT.CHECK style. * - * @param grayed the new grayed state of the checkbox; + * @param grayed the new grayed state of the checkbox; * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> @@ -1085,7 +1085,7 @@ public void setImage (int index, Image image) { parent.modifyStyle (parentHandle, style); } } - } + } } cached = true; } @@ -1097,8 +1097,8 @@ public void setImage (Image image) { } /** - * Sets the image for multiple columns in the table. - * + * Sets the image for multiple columns in the table. + * * @param images the array of new images * * @exception IllegalArgumentException <ul> @@ -1128,7 +1128,7 @@ public void setImage (Image [] images) { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @deprecated this functionality is not supported on most platforms */ @Deprecated @@ -1172,8 +1172,8 @@ public void setText (String string) { } /** - * Sets the text for multiple columns in the table. - * + * Sets the text for multiple columns in the table. + * * @param strings the array of new strings * * @exception IllegalArgumentException <ul> 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 cee228562a..f8868abb98 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 @@ -66,14 +66,14 @@ public class Text extends Scrollable { int fixStart = -1, fixEnd = -1; boolean doubleClick; String message = ""; - + static final char LTR_MARK = '\u200e'; static final char RTL_MARK = '\u200f'; int[] segments; static final int ITER_SIZEOF = OS.GtkTextIter_sizeof(); static final int SPACE_FOR_CURSOR = 1; - + /** * The maximum number of characters that can be entered * into a text widget. @@ -105,7 +105,7 @@ public class Text extends Scrollable { * <p> * The style value is either one of the style constants defined in * class <code>SWT</code> which is applicable to instances of this - * class, or must be built by <em>bitwise OR</em>'ing together + * class, or must be built by <em>bitwise OR</em>'ing together * (that is, using the <code>int</code> "|" operator) two or more * of those <code>SWT</code> style constants. The class description * lists the style constants that are applicable to the class. @@ -166,10 +166,10 @@ static int checkStyle (int style) { if ((style & SWT.SEARCH) != 0) { style |= SWT.SINGLE | SWT.BORDER; style &= ~SWT.PASSWORD; - /* + /* * NOTE: ICON_CANCEL has the same value as H_SCROLL and * ICON_SEARCH has the same value as V_SCROLL so they are - * cleared because SWT.SINGLE is set. + * cleared because SWT.SINGLE is set. */ } if ((style & SWT.SINGLE) != 0 && (style & SWT.MULTI) != 0) { @@ -229,7 +229,7 @@ void createHandle (int index) { OS.gtk_scrolled_window_set_shadow_type (scrolledHandle, OS.GTK_SHADOW_ETCHED_IN); } int just = OS.GTK_JUSTIFY_LEFT; - if ((style & SWT.CENTER) != 0) just = OS.GTK_JUSTIFY_CENTER; + if ((style & SWT.CENTER) != 0) just = OS.GTK_JUSTIFY_CENTER; if ((style & SWT.RIGHT) != 0) just = OS.GTK_JUSTIFY_RIGHT; OS.gtk_text_view_set_justification (handle, just); } @@ -238,7 +238,7 @@ void createHandle (int index) { if ((style & SWT.SINGLE) != 0) { OS.gtk_entry_set_width_chars(handle, 6); } - // In GTK 3 font description is inherited from parent widget which is not how SWT has always worked, + // In GTK 3 font description is inherited from parent widget which is not how SWT has always worked, // reset to default font to get the usual behavior setFontDescription(defaultFont().handle); } @@ -280,11 +280,11 @@ public void addModifyListener (ModifyListener listener) { * Adds a segment listener. * <p> * A <code>SegmentEvent</code> is sent whenever text content is being modified or - * a segment listener is added or removed. You can + * a segment listener is added or removed. You can * customize the appearance of text by indicating certain characters to be inserted * at certain text offsets. This may be used for bidi purposes, e.g. when * adjacent segments of right-to-left text should not be reordered relative to - * each other. + * each other. * E.g., multiple Java string literals in a right-to-left language * should generally remain in logical order to each other, that is, the * way they are stored. @@ -307,7 +307,7 @@ public void addModifyListener (ModifyListener listener) { * @see SegmentEvent * @see SegmentListener * @see #removeSegmentListener - * + * * @since 3.8 */ public void addSegmentListener (SegmentListener listener) { @@ -328,7 +328,7 @@ public void addSegmentListener (SegmentListener listener) { * <code>widgetDefaultSelected</code> is typically called when ENTER is pressed in a single-line text, * or when ENTER is pressed in a search text. If the receiver has the <code>SWT.SEARCH | SWT.ICON_CANCEL</code> style * and the user cancels the search, the event object detail field contains the value <code>SWT.ICON_CANCEL</code>. - * Likewise, if the receiver has the <code>SWT.ICON_SEARCH</code> style and the icon search is selected, the + * Likewise, if the receiver has the <code>SWT.ICON_SEARCH</code> style and the icon search is selected, the * event object detail field contains the value <code>SWT.ICON_SEARCH</code>. * </p> * @@ -619,7 +619,7 @@ public Rectangle computeTrim (int x, int y, int width, int height) { trim.height += innerBorder.top + innerBorder.bottom; } } else { - int borderWidth = OS.gtk_container_get_border_width (handle); + int borderWidth = OS.gtk_container_get_border_width (handle); xborder += borderWidth; yborder += borderWidth; } @@ -791,8 +791,8 @@ void fixIM () { /* * The IM filter has to be called one time for each key press event. * When the IM is open the key events are duplicated. The first event - * is filtered by SWT and the second event is filtered by GTK. In some - * cases the GTK handler does not run (the widget is destroyed, the + * is filtered by SWT and the second event is filtered by GTK. In some + * cases the GTK handler does not run (the widget is destroyed, the * application code consumes the event, etc), for these cases the IM * filter has to be called by SWT. */ @@ -946,7 +946,7 @@ public int getCharCount () { * default action of the text widget when the user * double clicks. * </p> - * + * * @return whether or not double click is enabled * * @exception SWTException <ul> @@ -966,14 +966,14 @@ public boolean getDoubleClickEnabled () { * displayed when the user enters text or the * text is changed by the programmer. * </p> - * + * * @return the echo character * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @see #setEchoChar */ public char getEchoChar () { @@ -990,7 +990,7 @@ public char getEchoChar () { * Returns the editable state. * * @return whether or not the receiver is editable - * + * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> @@ -1034,7 +1034,7 @@ public int getLineCount () { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @see #DELIMITER */ public String getLineDelimiter () { @@ -1063,14 +1063,14 @@ public int getLineHeight () { * <p> * Typically this is used in conjunction with <code>SWT.SEARCH</code>. * </p> - * + * * @return the widget message * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 3.3 */ public String getMessage () { @@ -1083,12 +1083,12 @@ public String getMessage () { * constants <code>SWT.LEFT_TO_RIGHT</code> or <code>SWT.RIGHT_TO_LEFT</code>. * * @return the orientation style - * + * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 2.1.2 */ @Override @@ -1185,7 +1185,7 @@ public int getSelectionCount () { * Gets the selected text, or an empty string if there is no current selection. * * @return the selected text - * + * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> @@ -1292,7 +1292,7 @@ public String getText (int start, int end) { * However, the text can't be protected if an {@link SWT#Segments} or * {@link SWT#Verify} listener has been added to the widget. * </p> - * + * * @return a character array that contains the widget's text * * @exception SWTException <ul> @@ -1325,24 +1325,24 @@ public char [] getTextChars () { Arrays.fill (buffer, (byte) 0); if (segments != null) { result = deprocessText (result, 0, -1); - } + } return result; } /** - * Returns the maximum number of characters that the receiver is capable of holding. + * Returns the maximum number of characters that the receiver is capable of holding. * <p> * If this has not been changed by <code>setTextLimit()</code>, * it will be the constant <code>Text.LIMIT</code>. * </p> - * + * * @return the text limit - * + * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @see #LIMIT */ public int getTextLimit () { @@ -1500,7 +1500,7 @@ long /*int*/ gtk_commit (long /*int*/ imContext, long /*int*/ text) { } OS.g_signal_handlers_unblock_matched (imContext, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, COMMIT); OS.g_signal_handlers_block_matched (imContext, mask, id, 0, 0, 0, handle); - if ((style & SWT.SINGLE) != 0) { + if ((style & SWT.SINGLE) != 0) { if (fixStart != -1 && fixEnd != -1) { OS.gtk_editable_set_position (handle, fixStart); OS.gtk_editable_select_region (handle, fixStart, fixEnd); @@ -1669,7 +1669,7 @@ void drawMessage (long /*int*/ cr) { x += thickness.x; y += thickness.y; } else { - long /*int*/ style = OS.gtk_widget_get_style (handle); + long /*int*/ style = OS.gtk_widget_get_style (handle); OS.gtk_style_get_text (style, OS.GTK_STATE_INSENSITIVE, textColor); OS.gtk_style_get_base (style, OS.GTK_STATE_NORMAL, baseColor); } @@ -1901,10 +1901,10 @@ void hookEvents () { } long /*int*/ imContext () { - if (imContext != 0) return imContext; + if (imContext != 0) return imContext; if ((style & SWT.SINGLE) != 0) { return OS.GTK_ENTRY_IM_CONTEXT (handle); - } + } return OS.GTK_TEXTVIEW_IM_CONTEXT (handle); } @@ -1957,9 +1957,9 @@ long /*int*/ paintWindow () { if (children != 0) { /* * When search or cancel icons are added to Text, those - * icon window(s) are added to the beginning of the list. + * icon window(s) are added to the beginning of the list. * In order to always return the correct window for Text, - * browse to the end of the list. + * browse to the end of the list. */ do { window = OS.g_list_data (children); @@ -2007,7 +2007,7 @@ void register () { @Override void releaseWidget () { super.releaseWidget (); - fixIM (); + fixIM (); message = null; } @@ -2032,7 +2032,7 @@ public void removeModifyListener (ModifyListener listener) { checkWidget (); if (listener == null) error (SWT.ERROR_NULL_ARGUMENT); if (eventTable == null) return; - eventTable.unhook (SWT.Modify, listener); + eventTable.unhook (SWT.Modify, listener); } /** @@ -2052,7 +2052,7 @@ public void removeModifyListener (ModifyListener listener) { * @see SegmentEvent * @see SegmentListener * @see #addSegmentListener - * + * * @since 3.8 */ public void removeSegmentListener (SegmentListener listener) { @@ -2085,7 +2085,7 @@ public void removeSelectionListener(SelectionListener listener) { if (listener == null) error (SWT.ERROR_NULL_ARGUMENT); if (eventTable == null) return; eventTable.unhook(SWT.Selection, listener); - eventTable.unhook(SWT.DefaultSelection,listener); + eventTable.unhook(SWT.DefaultSelection,listener); } /** @@ -2109,7 +2109,7 @@ public void removeVerifyListener (VerifyListener listener) { checkWidget (); if (listener == null) error (SWT.ERROR_NULL_ARGUMENT); if (eventTable == null) return; - eventTable.unhook (SWT.Verify, listener); + eventTable.unhook (SWT.Verify, listener); } /** @@ -2168,7 +2168,7 @@ void setCursor (long /*int*/ cursor) { * Note: This operation is a hint and is not supported on * platforms that do not have this concept. * </p> - * + * * @param doubleClick the new double click flag * * @exception SWTException <ul> @@ -2248,7 +2248,7 @@ void setForegroundColor (GdkColor color) { * <p> * Typically this is used in conjunction with <code>SWT.SEARCH</code>. * </p> - * + * * @param message the new message * * @exception IllegalArgumentException <ul> @@ -2258,7 +2258,7 @@ void setForegroundColor (GdkColor color) { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 3.3 */ public void setMessage (String message) { @@ -2284,12 +2284,12 @@ public void setMessage (String message) { * </p> * * @param orientation new orientation style - * + * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 2.1.2 */ @Override @@ -2446,7 +2446,7 @@ public void setTabs (int tabs) { if (tabs < 0) return; setTabStops (this.tabs = tabs); } - + void setTabStops (int tabs) { if ((style & SWT.SINGLE) != 0) return; int tabWidth = getTabWidth (tabs); @@ -2475,9 +2475,9 @@ public void setText (String string) { checkWidget (); if (string == null) error (SWT.ERROR_NULL_ARGUMENT); /* - * Feature in gtk. When text is set in gtk, separate events are fired for the deletion and + * Feature in gtk. When text is set in gtk, separate events are fired for the deletion and * insertion of the text. This is not wrong, but is inconsistent with other platforms. The - * fix is to block the firing of these events and fire them ourselves in a consistent manner. + * fix is to block the firing of these events and fire them ourselves in a consistent manner. */ if (hooks (SWT.Verify) || filters (SWT.Verify)) { string = verifyText (string, 0, getCharCount ()); @@ -2518,9 +2518,9 @@ public void setTextChars (char [] text) { checkWidget (); if (text == null) error (SWT.ERROR_NULL_ARGUMENT); /* - * Feature in gtk. When text is set in gtk, separate events are fired for the deletion and + * Feature in gtk. When text is set in gtk, separate events are fired for the deletion and * insertion of the text. This is not wrong, but is inconsistent with other platforms. The - * fix is to block the firing of these events and fire them ourselves in a consistent manner. + * fix is to block the firing of these events and fire them ourselves in a consistent manner. */ if (hooks (SWT.Verify) || filters (SWT.Verify)) { String string = verifyText (new String(text), 0, getCharCount ()); @@ -2589,7 +2589,7 @@ void setText (char [] text) { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @see #LIMIT */ public void setTextLimit (int limit) { @@ -2627,7 +2627,7 @@ public void setTopIndex (int index) { * in the receiver, this method simply returns. Otherwise, * lines are scrolled until the selection is visible. * </p> - * + * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> @@ -2646,7 +2646,7 @@ int translateOffset (int offset) { if (segments == null) return offset; for (int i = 0, nSegments = segments.length; i < nSegments && offset - i >= segments[i]; i++) { offset++; - } + } return offset; } 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 e215d6e63b..f3abeed129 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 @@ -54,14 +54,14 @@ public class ToolBar extends Composite { menuItemSelectedFunc = new Callback(ToolBar.class, "MenuItemSelectedProc", 2); if (menuItemSelectedFunc.getAddress() == 0) SWT.error(SWT.ERROR_NO_MORE_CALLBACKS); } - + /** * Constructs a new instance of this class given its parent * and a style value describing its behavior and appearance. * <p> * The style value is either one of the style constants defined in * class <code>SWT</code> which is applicable to instances of this - * class, or must be built by <em>bitwise OR</em>'ing together + * class, or must be built by <em>bitwise OR</em>'ing together * (that is, using the <code>int</code> "|" operator) two or more * of those <code>SWT</code> style constants. The class description * lists the style constants that are applicable to the class. @@ -145,20 +145,20 @@ void createHandle (int index) { * Bug in GTK. For some reason, the toolbar style context does not read * the CSS style sheet until the window containing the toolbar is shown. * The fix is to call gtk_style_context_invalidate() which it seems to - * force the style sheet to be read. + * force the style sheet to be read. */ - if (OS.GTK3) { + if (OS.GTK3) { long /*int*/ context = OS.gtk_widget_get_style_context (handle); OS.gtk_style_context_invalidate (context); } - + /* * Bug in GTK. GTK will segment fault if gtk_widget_reparent() is called * on a tool bar or on a widget hierarchy containing a tool bar when the icon * size is not GTK_ICON_SIZE_LARGE_TOOLBAR. The fix is to set the icon * size to GTK_ICON_SIZE_LARGE_TOOLBAR. - * - * Note that the segmentation fault does not happen on GTK 3, but the + * + * Note that the segmentation fault does not happen on GTK 3, but the * tool bar preferred size is too big with GTK_ICON_SIZE_LARGE_TOOLBAR * when the tool bar item has no image or text. */ @@ -194,7 +194,7 @@ Widget computeTabGroup () { if (tabItemList == null) { int i = 0; while (i < items.length && items [i].control == null) i++; - if (i == items.length) return super.computeTabGroup (); + if (i == items.length) return super.computeTabGroup (); } int index = indexOf(currentFocusItem); if (index == -1) index = items.length - 1; @@ -212,7 +212,7 @@ Widget [] computeTabList () { if (tabItemList == null) { int i = 0; while (i < items.length && items [i].control == null) i++; - if (i == items.length) return super.computeTabList (); + if (i == items.length) return super.computeTabList (); } Widget result [] = {}; if (!isTabGroup () || !isEnabled () || !isVisible ()) return result; @@ -227,7 +227,7 @@ Widget [] computeTabList () { result = newResult; } } - if (result.length == 0) result = new Widget [] {this}; + if (result.length == 0) result = new Widget [] {this}; return result; } @@ -338,11 +338,11 @@ public int getItemCount () { /** * Returns an array of <code>ToolItem</code>s which are the items - * in the receiver. + * in the receiver. * <p> * Note: This is not the actual structure used by the receiver * to maintain its list of items, so modifying the array will - * not affect the receiver. + * not affect the receiver. * </p> * * @return the items in the receiver @@ -436,7 +436,7 @@ boolean hasFocus () { /** * Searches the receiver's list starting at the first item - * (index 0) until an item is found that is equal to the + * (index 0) until an item is found that is equal to the * argument, and returns the index of that item. If no item * is found, returns -1. * @@ -476,11 +476,11 @@ long /*int*/ menuItemSelected (long /*int*/ widget, ToolItem item) { switch (item.style) { case SWT.DROP_DOWN : /* - * Feature in GTK. The DROP_DOWN item does not + * Feature in GTK. The DROP_DOWN item does not * contain arrow button in the overflow menu. So, it * is impossible to select the menu of that item. - * The fix is to consider the item selection - * as Arrow click, in order to popup the drop-down. + * The fix is to consider the item selection + * as Arrow click, in order to popup the drop-down. */ event.detail = SWT.ARROW; GtkAllocation allocation = new GtkAllocation (); @@ -533,7 +533,7 @@ void relayout () { } int type = OS.GTK_TOOLBAR_ICONS; if (hasText && hasImage) { - if ((style & SWT.RIGHT) != 0) { + if ((style & SWT.RIGHT) != 0) { type = OS.GTK_TOOLBAR_BOTH_HORIZ; } else { type = OS.GTK_TOOLBAR_BOTH; @@ -636,7 +636,7 @@ void setOrientation (boolean create) { ToolItem [] newList = new ToolItem [tabList.length]; System.arraycopy (tabList, 0, newList, 0, tabList.length); tabList = newList; - } + } this.tabItemList = tabList; } 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 9e6ef8316b..1908a06576 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 @@ -27,7 +27,7 @@ import org.eclipse.swt.events.*; * <dd>Selection</dd> * </dl> * <p> - * Note: Only one of the styles CHECK, PUSH, RADIO, SEPARATOR and DROP_DOWN + * Note: Only one of the styles CHECK, PUSH, RADIO, SEPARATOR and DROP_DOWN * may be specified. * </p><p> * IMPORTANT: This class is <em>not</em> intended to be subclassed. @@ -54,7 +54,7 @@ public class ToolItem extends Item { * <p> * The style value is either one of the style constants defined in * class <code>SWT</code> which is applicable to instances of this - * class, or must be built by <em>bitwise OR</em>'ing together + * class, or must be built by <em>bitwise OR</em>'ing together * (that is, using the <code>int</code> "|" operator) two or more * of those <code>SWT</code> style constants. The class description * lists the style constants that are applicable to the class. @@ -94,7 +94,7 @@ public ToolItem (ToolBar parent, int style) { * <p> * The style value is either one of the style constants defined in * class <code>SWT</code> which is applicable to instances of this - * class, or must be built by <em>bitwise OR</em>'ing together + * class, or must be built by <em>bitwise OR</em>'ing together * (that is, using the <code>int</code> "|" operator) two or more * of those <code>SWT</code> style constants. The class description * lists the style constants that are applicable to the class. @@ -144,7 +144,7 @@ public ToolItem (ToolBar parent, int style, int index) { * </p> * <p> * When the <code>SWT.RADIO</code> style bit is set, the <code>widgetSelected</code> method is - * also called when the receiver loses selection because another item in the same radio group + * also called when the receiver loses selection because another item in the same radio group * was selected by the user. During <code>widgetSelected</code> the application can use * <code>getSelection()</code> to determine the current selected state of the receiver. * </p> @@ -200,7 +200,7 @@ void createHandle (int index) { handle = OS.gtk_menu_tool_button_new (0, null); if (handle == 0) error (SWT.ERROR_NO_HANDLES); /* - * Feature in GTK. The arrow button of DropDown tool-item is + * Feature in GTK. The arrow button of DropDown tool-item is * disabled when it does not contain menu. The fix is to * find the arrow button handle and enable it. */ @@ -229,7 +229,7 @@ void createHandle (int index) { break; case SWT.RADIO: /* - * Because GTK enforces radio behavior in a button group + * Because GTK enforces radio behavior in a button group * a radio group is not created for each set of contiguous * buttons, each radio button will not draw unpressed. * The fix is to use toggle buttons instead. @@ -257,8 +257,8 @@ void createHandle (int index) { setFontDescription (parent.getFontDescription()); } /* - * Feature in GTK. GtkToolButton class uses this property to - * determine whether to show or hide its label when the toolbar + * Feature in GTK. GtkToolButton class uses this property to + * determine whether to show or hide its label when the toolbar * style is GTK_TOOLBAR_BOTH_HORIZ (or SWT.RIGHT). */ if ((parent.style & SWT.RIGHT) != 0) OS.gtk_tool_item_set_is_important (handle, true); @@ -373,7 +373,7 @@ public Image getDisabledImage () { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @see #isEnabled */ public boolean getEnabled () { @@ -518,7 +518,7 @@ long /*int*/ gtk_clicked (long /*int*/ widget) { switch (gdkEvent.type) { case OS.GDK_KEY_RELEASE: //Fall Through.. case OS.GDK_BUTTON_PRESS: - case OS.GDK_2BUTTON_PRESS: + case OS.GDK_2BUTTON_PRESS: case OS.GDK_BUTTON_RELEASE: { boolean isArrow = false; if (widget == arrowHandle) { @@ -558,8 +558,8 @@ long /*int*/ gtk_clicked (long /*int*/ widget) { @Override long /*int*/ gtk_create_menu_proxy (long /*int*/ widget) { /* - * Feature in GTK. If the item is a radio/check button - * with only image, then that image does not appear in + * Feature in GTK. If the item is a radio/check button + * with only image, then that image does not appear in * the overflow menu. * The fix is to create and use the proxy menu for the * items appearing in the overflow menu. @@ -567,14 +567,14 @@ long /*int*/ gtk_create_menu_proxy (long /*int*/ widget) { byte [] buffer = Converter.wcsToMbcs (null, "menu-id", true); //$NON-NLS-1$ if (proxyMenuItem != 0) { /* - * The menuItem to appear in the overflow menu is cached - * for the tool-item. If the text/image of the item changes, + * The menuItem to appear in the overflow menu is cached + * for the tool-item. If the text/image of the item changes, * then the proxyMenu is reset. */ OS.gtk_tool_item_set_proxy_menu_item (widget, buffer, proxyMenuItem); return 1; } - + if (image != null) { ImageList imageList = parent.imageList; if (imageList != null) { @@ -588,13 +588,13 @@ long /*int*/ gtk_create_menu_proxy (long /*int*/ widget) { long /*int*/ property = OS.g_object_class_find_property(OS.G_OBJECT_GET_CLASS(settings), OS.gtk_menu_images); if (property != 0) OS.g_object_get (settings, OS.gtk_menu_images, showImages, 0); } - - /* - * GTK tool items with only image appear as blank items + + /* + * GTK tool items with only image appear as blank items * in overflow menu when the system property "gtk-menu-images" * is set to false. To avoid that, display the tooltip text - * if available, in the overflow menu. - * Feature in GTK. When the menuItem is initialised only + * if available, in the overflow menu. + * Feature in GTK. When the menuItem is initialised only * with the image, the overflow menu appears very sloppy. * The fix is to initialise menu item with empty string. */ @@ -606,15 +606,15 @@ long /*int*/ gtk_create_menu_proxy (long /*int*/ widget) { } else { label = Converter.wcsToMbcs(null, text, true); - } + } long /*int*/ menuItem = OS.gtk_image_menu_item_new_with_label (label); long /*int*/ menuImage = OS.gtk_image_new_from_pixbuf (pixbuf); OS.gtk_image_menu_item_set_image (menuItem, menuImage); OS.gtk_tool_item_set_proxy_menu_item (widget, buffer, menuItem); /* * Since the arrow button does not appear in the drop_down - * item, we request the menu-item and then, hook the - * activate signal to send the Arrow selection signal. + * item, we request the menu-item and then, hook the + * activate signal to send the Arrow selection signal. */ proxyMenuItem = OS.gtk_tool_item_get_proxy_menu_item (widget, buffer); OS.g_signal_connect(menuItem, OS.activate, ToolBar.menuItemSelectedFunc.getAddress(), handle); @@ -655,7 +655,7 @@ long /*int*/ gtk_event_after (long /*int*/ widget, long /*int*/ gdkEvent) { } break; } - } + } return 0; } @@ -686,7 +686,7 @@ long /*int*/ gtk_leave_notify_event (long /*int*/ widget, long /*int*/ event) { gtk_image_set_from_pixbuf(imageHandle, pixbuf); } } - } + } } return 0; } @@ -708,8 +708,8 @@ void hookEvents () { if ((style & SWT.SEPARATOR) != 0) return; OS.g_signal_connect_closure (handle, OS.clicked, display.getClosure (CLICKED), false); /* - * Feature in GTK. GtkToolItem does not respond to basic listeners - * such as button-press, enter-notify to it. The fix is to assign + * Feature in GTK. GtkToolItem does not respond to basic listeners + * such as button-press, enter-notify to it. The fix is to assign * the listener to child (GtkButton) of the tool-item. */ eventHandle = OS.gtk_bin_get_child(handle); @@ -719,7 +719,7 @@ void hookEvents () { if (arrowHandle != 0) OS.g_signal_connect_closure (arrowHandle, OS.clicked, display.getClosure (CLICKED), false); } OS.g_signal_connect_closure (handle, OS.create_menu_proxy, display.getClosure (CREATE_MENU_PROXY), false); - + OS.g_signal_connect_closure_by_id (eventHandle, display.signalIds [ENTER_NOTIFY_EVENT], 0, display.getClosure (ENTER_NOTIFY_EVENT), false); OS.g_signal_connect_closure_by_id (eventHandle, display.signalIds [LEAVE_NOTIFY_EVENT], 0, display.getClosure (LEAVE_NOTIFY_EVENT), false); OS.g_signal_connect_closure_by_id (eventHandle, display.signalIds [FOCUS_IN_EVENT], 0, display.getClosure (FOCUS_IN_EVENT), false); @@ -734,8 +734,8 @@ void hookEvents () { */ int mask = OS.GDK_EXPOSURE_MASK | OS.GDK_POINTER_MOTION_MASK | - OS.GDK_BUTTON_PRESS_MASK | OS.GDK_BUTTON_RELEASE_MASK | - OS.GDK_ENTER_NOTIFY_MASK | OS.GDK_LEAVE_NOTIFY_MASK | + OS.GDK_BUTTON_PRESS_MASK | OS.GDK_BUTTON_RELEASE_MASK | + OS.GDK_ENTER_NOTIFY_MASK | OS.GDK_LEAVE_NOTIFY_MASK | OS.GDK_KEY_PRESS_MASK | OS.GDK_KEY_RELEASE_MASK | OS.GDK_FOCUS_CHANGE_MASK; OS.gtk_widget_add_events (eventHandle, mask); @@ -759,7 +759,7 @@ void hookEvents () { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @see #getEnabled */ public boolean isEnabled () { @@ -826,7 +826,7 @@ public void removeSelectionListener(SelectionListener listener) { if (listener == null) error (SWT.ERROR_NULL_ARGUMENT); if (eventTable == null) return; eventTable.unhook (SWT.Selection, listener); - eventTable.unhook (SWT.DefaultSelection,listener); + eventTable.unhook (SWT.DefaultSelection,listener); } void resizeControl () { @@ -883,7 +883,7 @@ void selectRadio () { * @param control the new control * * @exception IllegalArgumentException <ul> - * <li>ERROR_INVALID_ARGUMENT - if the control has been disposed</li> + * <li>ERROR_INVALID_ARGUMENT - if the control has been disposed</li> * <li>ERROR_INVALID_PARENT - if the control is not in the same widget tree</li> * </ul> * @exception SWTException <ul> @@ -913,7 +913,7 @@ public void setControl (Control control) { * @param image the disabled image to display on the receiver (may be null) * * @exception IllegalArgumentException <ul> - * <li>ERROR_INVALID_ARGUMENT - if the image has been disposed</li> + * <li>ERROR_INVALID_ARGUMENT - if the image has been disposed</li> * </ul> * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> @@ -999,7 +999,7 @@ void setForegroundColor (GdkColor color) { * @param image the hot image to display on the receiver (may be null) * * @exception IllegalArgumentException <ul> - * <li>ERROR_INVALID_ARGUMENT - if the image has been disposed</li> + * <li>ERROR_INVALID_ARGUMENT - if the image has been disposed</li> * </ul> * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> @@ -1042,8 +1042,8 @@ public void setImage (Image image) { gtk_image_set_from_pixbuf(imageHandle, 0); } /* - * If Text/Image of a tool-item changes, then it is - * required to reset the proxy menu. Otherwise, the + * If Text/Image of a tool-item changes, then it is + * required to reset the proxy menu. Otherwise, the * old menuItem appears in the overflow menu. */ if ((style & SWT.DROP_DOWN) != 0) { @@ -1113,7 +1113,7 @@ boolean setTabItemFocus (boolean next) { * escaped by doubling it in the string, causing a single * '&' to be displayed. * </p> - * + * * @param string the new text * * @exception IllegalArgumentException <ul> @@ -1136,8 +1136,8 @@ public void setText (String string) { byte [] buffer = Converter.wcsToMbcs (null, chars, true); OS.gtk_label_set_text_with_mnemonic (labelHandle, buffer); /* - * If Text/Image of a tool-item changes, then it is - * required to reset the proxy menu. Otherwise, the + * If Text/Image of a tool-item changes, then it is + * required to reset the proxy menu. Otherwise, the * old menuItem appears in the overflow menu. */ if ((style & SWT.DROP_DOWN) != 0) { @@ -1150,17 +1150,17 @@ public void setText (String string) { /** * Sets the receiver's tool tip text to the argument, which - * may be null indicating that the default tool tip for the + * may be null indicating that the default tool tip for the * control will be shown. For a control that has a default * tool tip, such as the Tree control on Windows, setting * the tool tip text to an empty string replaces the default, * causing no tool tip text to be shown. * <p> * The mnemonic indicator (character '&') is not displayed in a tool tip. - * To display a single '&' in the tool tip, the character '&' can be + * To display a single '&' in the tool tip, the character '&' can be * escaped by doubling it in the string. * </p> - * + * * @param string the new tool tip text (or null) * * @exception SWTException <ul> @@ -1177,10 +1177,10 @@ public void setToolTipText (String string) { } toolTipText = string; /* - * Since tooltip text of a tool-item is used in overflow - * menu when images are not shown, it is required to + * Since tooltip text of a tool-item is used in overflow + * menu when images are not shown, it is required to * reset the proxy menu when the tooltip text changes. - * Otherwise, the old menuItem appears in the overflow + * Otherwise, the old menuItem appears in the overflow * menu as a blank item. */ if ((style & SWT.DROP_DOWN) != 0) { @@ -1206,11 +1206,11 @@ void setToolTipText (Shell shell, String newString) { * @param width the new width. If the new value is <code>SWT.DEFAULT</code>, * the width is a fixed-width area whose amount is determined by the platform. * If the new value is 0 a vertical or horizontal line will be drawn, depending - * on the setting of the corresponding style bit (<code>SWT.VERTICAL</code> or + * on the setting of the corresponding style bit (<code>SWT.VERTICAL</code> or * <code>SWT.HORIZONTAL</code>). If the new value is <code>SWT.SEPARATOR_FILL</code> * a variable-width space is inserted that acts as a spring between the two adjoining * items which will push them out to the extent of the containing ToolBar. - * + * * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolTip.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolTip.java index 4ed6e0c240..35e4ff54e6 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolTip.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolTip.java @@ -38,7 +38,7 @@ import org.eclipse.swt.internal.cairo.Cairo; * @see <a href="http://www.eclipse.org/swt/snippets/#tooltips">Tool Tips snippets</a> * @see <a href="http://www.eclipse.org/swt/examples.php">SWT Example: ControlExample</a> * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a> - * + * * @since 3.2 * @noextend This class is not intended to be subclassed by clients. */ @@ -50,7 +50,7 @@ public class ToolTip extends Widget { long /*int*/ layoutText = 0, layoutMessage = 0; int [] borderPolygon; boolean spikeAbove, autohide; - + static final int BORDER = 5; static final int PADDING = 5; static final int INSET = 4; @@ -64,7 +64,7 @@ public class ToolTip extends Widget { * <p> * The style value is either one of the style constants defined in * class <code>SWT</code> which is applicable to instances of this - * class, or must be built by <em>bitwise OR</em>'ing together + * class, or must be built by <em>bitwise OR</em>'ing together * (that is, using the <code>int</code> "|" operator) two or more * of those <code>SWT</code> style constants. The class description * lists the style constants that are applicable to the class. @@ -153,42 +153,42 @@ void configure () { if (dest.height >= y + h + TIP_HEIGHT) { int t = TIP_HEIGHT; polyline = new int[] { - 0, 5+t, 1, 5+t, 1, 3+t, 3, 1+t, 5, 1+t, 5, t, + 0, 5+t, 1, 5+t, 1, 3+t, 3, 1+t, 5, 1+t, 5, t, 16, t, 16, 0, 35, t, w-5, t, w-5, 1+t, w-3, 1+t, w-1, 3+t, w-1, 5+t, w, 5+t, w, h-5+t, w-1, h-5+t, w-1, h-3+t, w-2, h-3+t, w-2, h-2+t, w-3, h-2+t, w-3, h-1+t, w-5, h-1+t, w-5, h+t, - 5, h+t, 5, h-1+t, 3, h-1+t, 3, h-2+t, 2, h-2+t, 2, h-3+t, 1, h-3+t, 1, h-5+t, 0, h-5+t, + 5, h+t, 5, h-1+t, 3, h-1+t, 3, h-2+t, 2, h-2+t, 2, h-3+t, 1, h-3+t, 1, h-5+t, 0, h-5+t, 0, 5+t}; borderPolygon = new int[] { - 0, 5+t, 1, 4+t, 1, 3+t, 3, 1+t, 4, 1+t, 5, t, + 0, 5+t, 1, 4+t, 1, 3+t, 3, 1+t, 4, 1+t, 5, t, 16, t, 16, 1, 35, t, w-6, 0+t, w-5, 1+t, w-4, 1+t, w-2, 3+t, w-2, 4+t, w-1, 5+t, w-1, h-6+t, w-2, h-5+t, w-2, h-4+t, w-4, h-2+t, w-5, h-2+t, w-6, h-1+t, - 5, h-1+t, 4, h-2+t, 3, h-2+t, 1, h-4+t, 1, h-5+t, 0, h-6+t, + 5, h-1+t, 4, h-2+t, 3, h-2+t, 1, h-4+t, 1, h-5+t, 0, h-6+t, 0, 5+t}; if ((parent.style & SWT.MIRRORED) != 0) { x -= w - 36; - polyline[12] = w-36; - polyline[14] = w-16; - polyline[16] = w-15; + polyline[12] = w-36; + polyline[14] = w-16; + polyline[16] = w-15; borderPolygon[12] = w-35; borderPolygon[14] = borderPolygon[16] = w-16; } OS.gtk_window_move (handle, Math.max(0, x - 17), y); } else { polyline = new int[] { - 0, 5, 1, 5, 1, 3, 3, 1, 5, 1, 5, 0, + 0, 5, 1, 5, 1, 3, 3, 1, 5, 1, 5, 0, w-5, 0, w-5, 1, w-3, 1, w-1, 3, w-1, 5, w, 5, w, h-5, w-1, h-5, w-1, h-3, w-2, h-3, w-2, h-2, w-3, h-2, w-3, h-1, w-5, h-1, w-5, h, 35, h, 16, h+TIP_HEIGHT, 16, h, - 5, h, 5, h-1, 3, h-1, 3, h-2, 2, h-2, 2, h-3, 1, h-3, 1, h-5, 0, h-5, + 5, h, 5, h-1, 3, h-1, 3, h-2, 2, h-2, 2, h-3, 1, h-3, 1, h-5, 0, h-5, 0, 5}; borderPolygon = new int[] { - 0, 5, 1, 4, 1, 3, 3, 1, 4, 1, 5, 0, + 0, 5, 1, 4, 1, 3, 3, 1, 4, 1, 5, 0, w-6, 0, w-5, 1, w-4, 1, w-2, 3, w-2, 4, w-1, 5, w-1, h-6, w-2, h-5, w-2, h-4, w-4, h-2, w-5, h-2, w-6, h-1, 35, h-1, 17, h+TIP_HEIGHT-2, 17, h-1, - 5, h-1, 4, h-2, 3, h-2, 1, h-4, 1, h-5, 0, h-6, + 5, h-1, 4, h-2, 3, h-2, 1, h-4, 1, h-5, 0, h-6, 0, 5}; if ((parent.style & SWT.MIRRORED) != 0) { x -= w - 36; @@ -203,18 +203,18 @@ void configure () { if (dest.height >= y + h + TIP_HEIGHT) { int t = TIP_HEIGHT; polyline = new int[] { - 0, 5+t, 1, 5+t, 1, 3+t, 3, 1+t, 5, 1+t, 5, t, + 0, 5+t, 1, 5+t, 1, 3+t, 3, 1+t, 5, 1+t, 5, t, w-35, t, w-16, 0, w-16, t, w-5, t, w-5, 1+t, w-3, 1+t, w-1, 3+t, w-1, 5+t, w, 5+t, w, h-5+t, w-1, h-5+t, w-1, h-3+t, w-2, h-3+t, w-2, h-2+t, w-3, h-2+t, w-3, h-1+t, w-5, h-1+t, w-5, h+t, - 5, h+t, 5, h-1+t, 3, h-1+t, 3, h-2+t, 2, h-2+t, 2, h-3+t, 1, h-3+t, 1, h-5+t, 0, h-5+t, + 5, h+t, 5, h-1+t, 3, h-1+t, 3, h-2+t, 2, h-2+t, 2, h-3+t, 1, h-3+t, 1, h-5+t, 0, h-5+t, 0, 5+t}; borderPolygon = new int[] { - 0, 5+t, 1, 4+t, 1, 3+t, 3, 1+t, 4, 1+t, 5, t, + 0, 5+t, 1, 4+t, 1, 3+t, 3, 1+t, 4, 1+t, 5, t, w-35, t, w-17, 2, w-17, t, w-6, t, w-5, 1+t, w-4, 1+t, w-2, 3+t, w-2, 4+t, w-1, 5+t, w-1, h-6+t, w-2, h-5+t, w-2, h-4+t, w-4, h-2+t, w-5, h-2+t, w-6, h-1+t, - 5, h-1+t, 4, h-2+t, 3, h-2+t, 1, h-4+t, 1, h-5+t, 0, h-6+t, + 5, h-1+t, 4, h-2+t, 3, h-2+t, 1, h-4+t, 1, h-5+t, 0, h-6+t, 0, 5+t}; if ((parent.style & SWT.MIRRORED) != 0) { x += w - 35; @@ -226,18 +226,18 @@ void configure () { OS.gtk_window_move (handle, Math.min(dest.width - w, x - w + 17), y); } else { polyline = new int[] { - 0, 5, 1, 5, 1, 3, 3, 1, 5, 1, 5, 0, + 0, 5, 1, 5, 1, 3, 3, 1, 5, 1, 5, 0, w-5, 0, w-5, 1, w-3, 1, w-1, 3, w-1, 5, w, 5, w, h-5, w-1, h-5, w-1, h-3, w-2, h-3, w-2, h-2, w-3, h-2, w-3, h-1, w-5, h-1, w-5, h, w-16, h, w-16, h+TIP_HEIGHT, w-35, h, - 5, h, 5, h-1, 3, h-1, 3, h-2, 2, h-2, 2, h-3, 1, h-3, 1, h-5, 0, h-5, + 5, h, 5, h-1, 3, h-1, 3, h-2, 2, h-2, 2, h-3, 1, h-3, 1, h-5, 0, h-5, 0, 5}; borderPolygon = new int[] { - 0, 5, 1, 4, 1, 3, 3, 1, 4, 1, 5, 0, + 0, 5, 1, 4, 1, 3, 3, 1, 4, 1, 5, 0, w-6, 0, w-5, 1, w-4, 1, w-2, 3, w-2, 4, w-1, 5, w-1, h-6, w-2, h-5, w-2, h-4, w-4, h-2, w-5, h-2, w-6, h-1, w-17, h-1, w-17, h+TIP_HEIGHT-2, w-36, h-1, - 5, h-1, 4, h-2, 3, h-2, 1, h-4, 1, h-5, 0, h-6, + 5, h-1, 4, h-2, 3, h-2, 1, h-4, 1, h-5, 0, h-6, 0, 5}; if ((parent.style & SWT.MIRRORED) != 0) { x += w - 35; @@ -336,7 +336,7 @@ void destroyWidget () { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * */ public boolean getAutoHide () { checkWidget (); @@ -347,7 +347,7 @@ Point getLocation () { int x = this.x; int y = this.y; if (item != null) { - long /*int*/ itemHandle = item.handle; + long /*int*/ itemHandle = item.handle; GdkRectangle area = new GdkRectangle (); OS.gtk_status_icon_get_geometry (itemHandle, 0, area, 0); x = area.x + area.width / 2; @@ -413,7 +413,7 @@ Point getSize (int maxWidth) { } int messageTrim = 2 * INSET + 2 * BORDER + 2 * PADDING; boolean hasImage = layoutText != 0 && (style & (SWT.ICON_ERROR | SWT.ICON_INFORMATION | SWT.ICON_WARNING)) != 0; - int textTrim = messageTrim + (hasImage ? IMAGE_SIZE : 0); + int textTrim = messageTrim + (hasImage ? IMAGE_SIZE : 0); int width = Math.min (maxWidth, Math.max (textWidth + textTrim, messageWidth + messageTrim)); int textHeight = 0, messageHeight = 0; if (layoutText != 0) { @@ -503,7 +503,7 @@ void drawTooltip (long /*int*/ cr) { byte[] buffer = null; int id = style & (SWT.ICON_ERROR | SWT.ICON_INFORMATION | SWT.ICON_WARNING); switch (id) { - case SWT.ICON_ERROR: buffer = Converter.wcsToMbcs (null, "gtk-dialog-error", true); break; + case SWT.ICON_ERROR: buffer = Converter.wcsToMbcs (null, "gtk-dialog-error", true); break; case SWT.ICON_INFORMATION: buffer = Converter.wcsToMbcs (null, "gtk-dialog-info", true); break; case SWT.ICON_WARNING: buffer = Converter.wcsToMbcs (null, "gtk-dialog-warning", true); break; } @@ -546,19 +546,19 @@ void drawTooltip (long /*int*/ cr) { byte[] buffer = null; int id = style & (SWT.ICON_ERROR | SWT.ICON_INFORMATION | SWT.ICON_WARNING); switch (id) { - case SWT.ICON_ERROR: buffer = Converter.wcsToMbcs (null, "gtk-dialog-error", true); break; + case SWT.ICON_ERROR: buffer = Converter.wcsToMbcs (null, "gtk-dialog-error", true); break; case SWT.ICON_INFORMATION: buffer = Converter.wcsToMbcs (null, "gtk-dialog-info", true); break; case SWT.ICON_WARNING: buffer = Converter.wcsToMbcs (null, "gtk-dialog-warning", true); break; } if (buffer != null) { long /*int*/ style = OS.gtk_widget_get_default_style (); long /*int*/ pixbuf = OS.gtk_icon_set_render_icon ( - OS.gtk_icon_factory_lookup_default (buffer), + OS.gtk_icon_factory_lookup_default (buffer), style, - OS.GTK_TEXT_DIR_NONE, - OS.GTK_STATE_NORMAL, + OS.GTK_TEXT_DIR_NONE, + OS.GTK_STATE_NORMAL, OS.GTK_ICON_SIZE_MENU, - 0, + 0, 0); OS.gdk_draw_pixbuf (window, gdkGC, pixbuf, 0, 0, x, y, IMAGE_SIZE, IMAGE_SIZE, OS.GDK_RGB_DITHER_NORMAL, 0, 0); OS.g_object_unref (pixbuf); @@ -597,7 +597,7 @@ long /*int*/ gtk_expose_event (long /*int*/ widget, long /*int*/ eventPtr) { @Override long /*int*/ gtk_size_allocate (long /*int*/ widget, long /*int*/ allocation) { - Point point = getLocation (); + Point point = getLocation (); int x = point.x; int y = point.y; long /*int*/ screen = OS.gdk_screen_get_default (); @@ -713,7 +713,7 @@ public void removeSelectionListener (SelectionListener listener) { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @see #getVisible * @see #setVisible */ @@ -854,7 +854,7 @@ public void setText (String string) { /** * Marks the receiver as visible if the argument is <code>true</code>, - * and marks it invisible otherwise. + * and marks it invisible otherwise. * <p> * If one of the receiver's ancestors is not visible or some * other condition makes the receiver not visible, marking @@ -890,7 +890,7 @@ public void setVisible (boolean visible) { OS.GTK_TOOLTIPS_SET_ACTIVE (handle, data); OS.gtk_tooltips_set_tip (handle, vboxHandle, buffer, null); } - } + } if (autohide) timerId = OS.g_timeout_add (DELAY, display.windowTimerProc, handle); } else { if ((style & SWT.BALLOON) != 0) { diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tracker.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tracker.java index 17f6ccc45f..ddbef7dbb9 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tracker.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tracker.java @@ -22,7 +22,7 @@ import org.eclipse.swt.events.*; * These rectangles can be specified to respond to mouse and key events * by either moving or resizing themselves accordingly. Trackers are * typically used to represent window geometries in a lightweight manner. - * + * * <dl> * <dt><b>Styles:</b></dt> * <dd>LEFT, RIGHT, UP, DOWN, RESIZE</dd> @@ -58,7 +58,7 @@ public class Tracker extends Widget { * <p> * The style value is either one of the style constants defined in * class <code>SWT</code> which is applicable to instances of this - * class, or must be built by <em>bitwise OR</em>'ing together + * class, or must be built by <em>bitwise OR</em>'ing together * (that is, using the <code>int</code> "|" operator) two or more * of those <code>SWT</code> style constants. The class description * lists the style constants that are applicable to the class. @@ -96,7 +96,7 @@ public Tracker (Composite parent, int style) { * <p> * The style value is either one of the style constants defined in * class <code>SWT</code> which is applicable to instances of this - * class, or must be built by <em>bitwise OR</em>'ing together + * class, or must be built by <em>bitwise OR</em>'ing together * (that is, using the <code>int</code> "|" operator) two or more * of those <code>SWT</code> style constants. The class description * lists the style constants that are applicable to the class. @@ -104,7 +104,7 @@ public Tracker (Composite parent, int style) { * </p><p> * Note: Currently, null can be passed in for the display argument. * This has the effect of creating the tracker on the currently active - * display if there is one. If there is no current display, the + * display if there is one. If there is no current display, the * tracker is created on a "default" display. <b>Passing in null as * the display argument is not considered to be good coding style, * and may not be supported in a future release of SWT.</b> @@ -117,7 +117,7 @@ public Tracker (Composite parent, int style) { * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the parent</li> * <li>ERROR_INVALID_SUBCLASS - if this class is not an allowed subclass</li> * </ul> - * + * * @see SWT#LEFT * @see SWT#RIGHT * @see SWT#UP @@ -189,14 +189,14 @@ public void addKeyListener(KeyListener listener) { addListener(SWT.KeyDown,typedListener); } -Point adjustMoveCursor () { +Point adjustMoveCursor () { if (bounds == null) return null; int newX = bounds.x + bounds.width / 2; int newY = bounds.y; - + Point point = display.map (parent, null, newX, newY); display.setCursorLocation (point); - + /* * The call to XWarpPointer does not always place the pointer on the * exact location that is specified, so do a query (below) to get the @@ -218,7 +218,7 @@ Point adjustResizeCursor () { } else { newX = bounds.x + bounds.width / 2; } - + if ((cursorOrientation & SWT.UP) != 0) { newY = bounds.y; } else if ((cursorOrientation & SWT.DOWN) != 0) { @@ -229,7 +229,7 @@ Point adjustResizeCursor () { Point point = display.map (parent, null, newX, newY); display.setCursorLocation (point); - + /* * The call to XWarpPointer does not always place the pointer on the * exact location that is specified, so do a query (below) to get the @@ -268,16 +268,16 @@ Rectangle computeBounds () { int yMin = rectangles [0].y; int xMax = rectangles [0].x + rectangles [0].width; int yMax = rectangles [0].y + rectangles [0].height; - + for (int i = 1; i < rectangles.length; i++) { if (rectangles [i].x < xMin) xMin = rectangles [i].x; if (rectangles [i].y < yMin) yMin = rectangles [i].y; int rectRight = rectangles [i].x + rectangles [i].width; - if (rectRight > xMax) xMax = rectRight; + if (rectRight > xMax) xMax = rectRight; int rectBottom = rectangles [i].y + rectangles [i].height; if (rectBottom > yMax) yMax = rectBottom; } - + return new Rectangle (xMin, yMin, xMax - xMin, yMax - yMin); } @@ -299,7 +299,7 @@ Rectangle [] computeProportions (Rectangle [] rects) { } else { height = 100; } - result [i] = new Rectangle (x, y, width, height); + result [i] = new Rectangle (x, y, width, height); } } return result; @@ -309,7 +309,7 @@ void drawRectangles (Rectangle [] rects) { long /*int*/ window = OS.gdk_get_default_root_window(); if (parent != null) { window = gtk_widget_get_window (parent.paintHandle()); - } + } if (window == 0) return; if (OS.GTK3) { if (overlay == 0) return; @@ -364,7 +364,7 @@ void drawRectangles (Rectangle [] rects) { * coordinates. * * @return the bounds of the Rectangles being drawn - * + * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> @@ -413,9 +413,9 @@ long /*int*/ gtk_key_press_event (long /*int*/ widget, long /*int*/ eventPtr) { GdkEventKey keyEvent = new GdkEventKey (); OS.memmove (keyEvent, eventPtr, GdkEventKey.sizeof); int stepSize = ((keyEvent.state & OS.GDK_CONTROL_MASK) != 0) ? STEPSIZE_SMALL : STEPSIZE_LARGE; - int xChange = 0, yChange = 0; + int xChange = 0, yChange = 0; switch (keyEvent.keyval) { - case OS.GDK_Escape: + case OS.GDK_Escape: cancelled = true; // fallthrough case OS.GDK_Return: @@ -690,9 +690,9 @@ void moveRectangles (int xChange, int yChange) { * Displays the Tracker rectangles for manipulation by the user. Returns when * the user has either finished manipulating the rectangles or has cancelled the * Tracker. - * + * * @return <code>true</code> if the user did not cancel the Tracker, <code>false</code> otherwise - * + * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> @@ -703,7 +703,7 @@ public boolean open () { window = OS.gdk_get_default_root_window(); if (parent != null) { window = gtk_widget_get_window (parent.paintHandle()); - } + } if (window == 0) return false; cancelled = false; tracking = true; @@ -727,7 +727,7 @@ public boolean open () { cursorOrientation |= hStyle; } - int mask = OS.GDK_BUTTON1_MASK | OS.GDK_BUTTON2_MASK | OS.GDK_BUTTON3_MASK; + int mask = OS.GDK_BUTTON1_MASK | OS.GDK_BUTTON2_MASK | OS.GDK_BUTTON3_MASK; boolean mouseDown = (state [0] & mask) != 0; if (!mouseDown) { Point cursorPos = null; @@ -743,10 +743,10 @@ public boolean open () { } this.oldX = oldX [0]; this.oldY = oldY [0]; - + grabbed = grab (); lastCursor = this.cursor != null ? this.cursor.handle : 0; - + if (OS.GTK3) { overlay = OS.gtk_window_new (OS.GTK_WINDOW_POPUP); OS.gtk_window_set_skip_taskbar_hint (overlay, true); @@ -779,7 +779,7 @@ public boolean open () { * This call to gdk_threads_leave() is a temporary work around * to avoid deadlocks when gdk_threads_init() is called by native * code outside of SWT (i.e AWT, etc). It ensures that the current - * thread leaves the GTK lock before calling the function below. + * thread leaves the GTK lock before calling the function below. */ OS.gdk_threads_leave(); OS.g_main_context_iteration (0, true); @@ -909,12 +909,12 @@ void resizeRectangles (int xChange, int yChange) { if (yChange > 0 && ((style & SWT.DOWN) != 0) && ((cursorOrientation & SWT.UP) == 0)) { cursorOrientation |= SWT.DOWN; } - + /* * If the bounds will flip about the x or y axis then apply the adjustment * up to the axis (ie.- where bounds width/height becomes 0), change the * cursor's orientation accordingly, and flip each Rectangle's origin (only - * necessary for > 1 Rectangles) + * necessary for > 1 Rectangles) */ if ((cursorOrientation & SWT.LEFT) != 0) { if (xChange > bounds.width) { @@ -976,7 +976,7 @@ void resizeRectangles (int xChange, int yChange) { } } } - + // apply the bounds adjustment if ((cursorOrientation & SWT.LEFT) != 0) { bounds.x += xChange; @@ -990,7 +990,7 @@ void resizeRectangles (int xChange, int yChange) { } else if ((cursorOrientation & SWT.DOWN) != 0) { bounds.height += yChange; } - + Rectangle [] newRects = new Rectangle [rectangles.length]; for (int i = 0; i < rectangles.length; i++) { Rectangle proportion = proportions[i]; @@ -1000,7 +1000,7 @@ void resizeRectangles (int xChange, int yChange) { proportion.width * bounds.width / 100, proportion.height * bounds.height / 100); } - rectangles = newRects; + rectangles = newRects; } /** @@ -1008,7 +1008,7 @@ void resizeRectangles (int xChange, int yChange) { * then the cursor reverts to the default. * * @param newCursor the new <code>Cursor</code> to display - * + * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TrayItem.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TrayItem.java index db1efb5ccc..6cd88550cd 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TrayItem.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TrayItem.java @@ -32,7 +32,7 @@ import org.eclipse.swt.internal.gtk.*; * * @see <a href="http://www.eclipse.org/swt/snippets/#tray">Tray, TrayItem snippets</a> * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a> - * + * * @since 3.0 * @noextend This class is not intended to be subclassed by clients. */ @@ -53,7 +53,7 @@ public class TrayItem extends Item { * <p> * The style value is either one of the style constants defined in * class <code>SWT</code> which is applicable to instances of this - * class, or must be built by <em>bitwise OR</em>'ing together + * class, or must be built by <em>bitwise OR</em>'ing together * (that is, using the <code>int</code> "|" operator) two or more * of those <code>SWT</code> style constants. The class description * lists the style constants that are applicable to the class. @@ -182,7 +182,7 @@ void destroyWidget () { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 3.2 */ public Tray getParent () { @@ -200,7 +200,7 @@ public Tray getParent () { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 3.8 */ public Image getHighlightImage () { @@ -218,7 +218,7 @@ public Image getHighlightImage () { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 3.2 */ public ToolTip getToolTip () { @@ -246,8 +246,8 @@ public String getToolTipText () { long /*int*/ gtk_activate (long /*int*/ widget) { sendSelectionEvent (SWT.Selection); /* - * Feature in GTK. GTK will generate a single-click event before sending - * a double-click event. To know when to send a DefaultSelection, look for + * Feature in GTK. GTK will generate a single-click event before sending + * a double-click event. To know when to send a DefaultSelection, look for * the single-click as the current event and for the double-click in the * event queue. */ @@ -342,7 +342,7 @@ void hookEvents () { } /** - * Returns <code>true</code> if the receiver is visible and + * Returns <code>true</code> if the receiver is visible and * <code>false</code> otherwise. * * @return the receiver's visibility @@ -448,7 +448,7 @@ public void removeSelectionListener (SelectionListener listener) { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 3.8 */ public void setHighlightImage (Image image) { @@ -503,7 +503,7 @@ public void setImage (Image image) { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 3.2 */ public void setToolTip (ToolTip toolTip) { @@ -516,17 +516,17 @@ public void setToolTip (ToolTip toolTip) { /** * Sets the receiver's tool tip text to the argument, which - * may be null indicating that the default tool tip for the + * may be null indicating that the default tool tip for the * control will be shown. For a control that has a default * tool tip, such as the Tree control on Windows, setting * the tool tip text to an empty string replaces the default, * causing no tool tip text to be shown. * <p> * The mnemonic indicator (character '&') is not displayed in a tool tip. - * To display a single '&' in the tool tip, the character '&' can be + * To display a single '&' in the tool tip, the character '&' can be * escaped by doubling it in the string. * </p> - * + * * @param string the new tool tip text (or null) * * @exception SWTException <ul> @@ -546,7 +546,7 @@ public void setToolTipText (String string) { /** * Makes the receiver visible if the argument is <code>true</code>, - * and makes it invisible otherwise. + * and makes it invisible otherwise. * * @param visible the new visibility state * @@ -557,7 +557,7 @@ public void setToolTipText (String string) { */ public void setVisible (boolean visible) { checkWidget (); - if(OS.gtk_status_icon_get_visible (handle) == visible) return; + if(OS.gtk_status_icon_get_visible (handle) == visible) return; if (visible) { /* * It is possible (but unlikely), that application 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 dcb17c19c7..3c1d8c5ca8 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 @@ -90,7 +90,7 @@ public class Tree extends Composite { int drawState, drawFlags; GdkColor drawForeground; boolean ownerDraw, ignoreSize, ignoreAccessibility; - + static final int ID_COLUMN = 0; static final int CHECKED_COLUMN = 1; static final int GRAYED_COLUMN = 2; @@ -111,7 +111,7 @@ public class Tree extends Composite { * <p> * The style value is either one of the style constants defined in * class <code>SWT</code> which is applicable to instances of this - * class, or must be built by <em>bitwise OR</em>'ing together + * class, or must be built by <em>bitwise OR</em>'ing together * (that is, using the <code>int</code> "|" operator) two or more * of those <code>SWT</code> style constants. The class description * lists the style constants that are applicable to the class. @@ -209,7 +209,7 @@ static int checkStyle (int style) { * WS_VSCROLL is not specified, Windows creates * trees and tables with scroll bars. The fix * is to set H_SCROLL and V_SCROLL. - * + * * NOTE: This code appears on all platforms so that * applications have consistent scroll bar behavior. */ @@ -261,7 +261,7 @@ long /*int*/ cellDataProc (long /*int*/ tree_column, long /*int*/ cell, long /*i if (ptr [0] != 0) OS.g_object_unref (ptr [0]); } else { ptr [0] = 0; - OS.gtk_tree_model_get (tree_model, iter, modelIndex + CELL_TEXT, ptr, -1); + OS.gtk_tree_model_get (tree_model, iter, modelIndex + CELL_TEXT, ptr, -1); if (ptr [0] != 0) { OS.g_object_set (cell, OS.text, ptr[0], 0); OS.g_free (ptr[0]); @@ -400,7 +400,7 @@ int calculateWidth (long /*int*/ column, long /*int*/ iter, boolean recurse) { //int [] width = new int [1]; //OS.gtk_tree_view_column_cell_get_size (column, null, null, null, width, null); //return width [0]; - + int width = 0; int [] w = new int [1]; long /*int*/ path = 0; @@ -475,10 +475,10 @@ int calculateWidth (long /*int*/ column, long /*int*/ iter, boolean recurse) { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @see SWT#VIRTUAL * @see SWT#SetData - * + * * @since 3.2 */ public void clear(int index, boolean all) { @@ -504,7 +504,7 @@ void clear (long /*int*/ parentIter, int index, boolean all) { * attributes of the items are set to their default values. If the * tree was created with the <code>SWT.VIRTUAL</code> style, these * attributes are requested again as needed. - * + * * @param all <code>true</code> if all child items should be cleared * recursively, and <code>false</code> otherwise * @@ -512,10 +512,10 @@ void clear (long /*int*/ parentIter, int index, boolean all) { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @see SWT#VIRTUAL * @see SWT#SetData - * + * * @since 3.2 */ public void clearAll (boolean all) { @@ -579,7 +579,7 @@ void copyModel (long /*int*/ oldModel, int oldStart, long /*int*/ newModel, int int [] ptr1 = new int [1]; do { long /*int*/ newItem = OS.g_malloc (OS.GtkTreeIter_sizeof ()); - if (newItem == 0) error (SWT.ERROR_NO_HANDLES); + if (newItem == 0) error (SWT.ERROR_NO_HANDLES); OS.gtk_tree_store_append (newModel, newItem, newParent); OS.gtk_tree_model_get (oldModel, iter, ID_COLUMN, ptr1, -1); int index = ptr1[0]; @@ -631,7 +631,7 @@ void copyModel (long /*int*/ oldModel, int oldStart, long /*int*/ newModel, int } // recurse through children copyModel(oldModel, oldStart, newModel, newStart, types, iter, newItem, modelLength); - + if (item!= null) { item.handle = newItem; } else { @@ -651,12 +651,12 @@ void copyModel (long /*int*/ oldModel, int oldStart, long /*int*/ newModel, int void createColumn (TreeColumn column, int index) { /* -* Bug in ATK. For some reason, ATK segments fault if +* Bug in ATK. For some reason, ATK segments fault if * the GtkTreeView has a column and does not have items. -* The fix is to insert the column only when an item is +* The fix is to insert the column only when an item is * created. */ - + int modelIndex = FIRST_COLUMN; if (columnCount != 0) { int modelLength = OS.gtk_tree_model_get_n_columns (modelHandle); @@ -699,7 +699,7 @@ void createColumn (TreeColumn column, int index) { OS.gtk_tree_view_insert_column (handle, columnHandle, index); /* * Bug in GTK3. The column header has the wrong CSS styling if it is hidden - * when inserting to the tree widget. The fix is to hide the column only + * when inserting to the tree widget. The fix is to hide the column only * after it is inserted. */ if (columnCount != 0) OS.gtk_tree_view_column_set_visible (columnHandle, false); @@ -708,7 +708,7 @@ void createColumn (TreeColumn column, int index) { column.modelIndex = modelIndex; } if (!searchEnabled ()) { - OS.gtk_tree_view_set_search_column (handle, -1); + OS.gtk_tree_view_set_search_column (handle, -1); } else { /* Set the search column whenever the model changes */ int firstColumn = columnCount == 0 ? FIRST_COLUMN : columns [0].modelIndex; @@ -741,7 +741,7 @@ void createHandle (int index) { int mode = (style & SWT.MULTI) != 0 ? OS.GTK_SELECTION_MULTIPLE : OS.GTK_SELECTION_BROWSE; long /*int*/ selectionHandle = OS.gtk_tree_view_get_selection (handle); OS.gtk_tree_selection_set_mode (selectionHandle, mode); - OS.gtk_tree_view_set_headers_visible (handle, false); + OS.gtk_tree_view_set_headers_visible (handle, false); int hsp = (style & SWT.H_SCROLL) != 0 ? OS.GTK_POLICY_AUTOMATIC : OS.GTK_POLICY_NEVER; int vsp = (style & SWT.V_SCROLL) != 0 ? OS.GTK_POLICY_AUTOMATIC : OS.GTK_POLICY_NEVER; OS.gtk_scrolled_window_set_policy (scrolledHandle, hsp, vsp); @@ -750,7 +750,7 @@ void createHandle (int index) { OS.g_object_set (handle, OS.fixed_height_mode, true, 0); } if (!searchEnabled ()) { - OS.gtk_tree_view_set_search_column (handle, -1); + OS.gtk_tree_view_set_search_column (handle, -1); } } @@ -783,7 +783,7 @@ void createItem (TreeColumn column, int index) { OS.gtk_widget_show (boxHandle); OS.gtk_widget_show (labelHandle); column.labelHandle = labelHandle; - column.imageHandle = imageHandle; + column.imageHandle = imageHandle; OS.gtk_tree_view_column_set_widget (column.handle, boxHandle); if (OS.GTK3) { column.buttonHandle = OS.gtk_tree_view_column_get_button(column.handle); @@ -831,7 +831,7 @@ void createItem (TreeItem item, long /*int*/ parentIter, int index) { if (item.handle == 0) error(SWT.ERROR_NO_HANDLES); /* * Feature in GTK. It is much faster to append to a tree store - * than to insert at the end using gtk_tree_store_insert(). + * than to insert at the end using gtk_tree_store_insert(). */ if (index == count) { OS.gtk_tree_store_append (modelHandle, item.handle, parentIter); @@ -866,7 +866,7 @@ void createRenderers (long /*int*/ columnHandle, int modelIndex, boolean check, } long /*int*/ textRenderer = ownerDraw ? OS.g_object_new (display.gtk_cell_renderer_text_get_type (), 0) : OS.gtk_cell_renderer_text_new (); if (textRenderer == 0) error (SWT.ERROR_NO_HANDLES); - + if (ownerDraw) { OS.g_object_set_qdata (pixbufRenderer, Display.SWT_OBJECT_INDEX1, columnHandle); OS.g_object_set_qdata (textRenderer, Display.SWT_OBJECT_INDEX1, columnHandle); @@ -908,7 +908,7 @@ void createRenderers (long /*int*/ columnHandle, int modelIndex, boolean check, OS.gtk_tree_view_column_add_attribute (columnHandle, textRenderer, OS.text, modelIndex + CELL_TEXT); OS.gtk_tree_view_column_add_attribute (columnHandle, textRenderer, OS.foreground_gdk, FOREGROUND_COLUMN); OS.gtk_tree_view_column_add_attribute (columnHandle, textRenderer, OS.font_desc, FONT_COLUMN); - + boolean customDraw = firstCustomDraw; if (columnCount != 0) { for (int i=0; i<columnCount; i++) { @@ -1034,7 +1034,7 @@ void destroyItem (TreeColumn column) { OS.gtk_tree_store_set (modelHandle, iter, modelIndex + CELL_FOREGROUND, (long /*int*/)0, -1); OS.gtk_tree_store_set (modelHandle, iter, modelIndex + CELL_BACKGROUND, (long /*int*/)0, -1); OS.gtk_tree_store_set (modelHandle, iter, modelIndex + CELL_FONT, (long /*int*/)0, -1); - + Font [] cellFont = item.cellFont; if (cellFont != null) { if (columnCount == 0) { @@ -1057,7 +1057,7 @@ void destroyItem (TreeColumn column) { } } if (!searchEnabled ()) { - OS.gtk_tree_view_set_search_column (handle, -1); + OS.gtk_tree_view_set_search_column (handle, -1); } else { /* Set the search column whenever the model changes */ int firstColumn = columnCount == 0 ? FIRST_COLUMN : columns [0].modelIndex; @@ -1107,9 +1107,9 @@ boolean fixAccessibility () { * the rows that are not visible. The the fix is to block the accessible object * from receiving row_added and row_removed signals and, at the end, send only * a notify signal with the "model" detail. - * - * Note: The test bellow has to be updated when the real problem is fixed in - * the accessible object. + * + * Note: The test bellow has to be updated when the real problem is fixed in + * the accessible object. */ return OS.GTK_VERSION >= OS.VERSION (2, 12, 0); } @@ -1178,13 +1178,13 @@ int getClientWidth () { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @see Tree#getColumnOrder() * @see Tree#setColumnOrder(int[]) * @see TreeColumn#getMoveable() * @see TreeColumn#setMoveable(boolean) * @see SWT#Move - * + * * @since 3.1 */ public TreeColumn getColumn (int index) { @@ -1206,7 +1206,7 @@ public TreeColumn getColumn (int index) { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 3.1 */ public int getColumnCount () { @@ -1225,7 +1225,7 @@ public int getColumnCount () { * </p><p> * Note: This is not the actual structure used by the receiver * to maintain its list of items, so modifying the array will - * not affect the receiver. + * not affect the receiver. * </p> * * @return the current visual order of the receiver's items @@ -1234,12 +1234,12 @@ public int getColumnCount () { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @see Tree#setColumnOrder(int[]) * @see TreeColumn#getMoveable() * @see TreeColumn#setMoveable(boolean) * @see SWT#Move - * + * * @since 3.2 */ public int [] getColumnOrder () { @@ -1270,7 +1270,7 @@ long /*int*/[] getColumnTypes (int columnCount) { long /*int*/[] types = new long /*int*/ [FIRST_COLUMN + (columnCount * CELL_TYPES)]; // per row data types [ID_COLUMN] = OS.G_TYPE_INT (); - types [CHECKED_COLUMN] = OS.G_TYPE_BOOLEAN (); + types [CHECKED_COLUMN] = OS.G_TYPE_BOOLEAN (); types [GRAYED_COLUMN] = OS.G_TYPE_BOOLEAN (); types [FOREGROUND_COLUMN] = OS.GDK_TYPE_COLOR (); types [BACKGROUND_COLUMN] = OS.GDK_TYPE_COLOR (); @@ -1297,7 +1297,7 @@ long /*int*/[] getColumnTypes (int columnCount) { * <p> * Note: This is not the actual structure used by the receiver * to maintain its list of items, so modifying the array will - * not affect the receiver. + * not affect the receiver. * </p> * * @return the items in the receiver @@ -1306,13 +1306,13 @@ long /*int*/[] getColumnTypes (int columnCount) { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @see Tree#getColumnOrder() * @see Tree#setColumnOrder(int[]) * @see TreeColumn#getMoveable() * @see TreeColumn#setMoveable(boolean) * @see SWT#Move - * + * * @since 3.1 */ public TreeColumn [] getColumns () { @@ -1335,8 +1335,8 @@ TreeItem getFocusItem () { } OS.g_free (iter); OS.gtk_tree_path_free (path [0]); - return item; -} + return item; +} @Override GdkColor getForegroundColor () { @@ -1347,12 +1347,12 @@ GdkColor getForegroundColor () { * Returns the width in pixels of a grid line. * * @return the width of a grid line in pixels - * + * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 3.1 */ public int getGridLineWidth () { @@ -1361,7 +1361,7 @@ public int getGridLineWidth () { } /** - * Returns the height of the receiver's header + * Returns the height of the receiver's header * * @return the height of the header or zero if the header is not visible * @@ -1369,8 +1369,8 @@ public int getGridLineWidth () { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * - * @since 3.1 + * + * @since 3.1 */ public int getHeaderHeight () { checkWidget (); @@ -1413,7 +1413,7 @@ public int getHeaderHeight () { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 3.1 */ public boolean getHeaderVisible () { @@ -1435,7 +1435,7 @@ public boolean getHeaderVisible () { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 3.1 */ public TreeItem getItem (int index) { @@ -1452,8 +1452,8 @@ public TreeItem getItem (int index) { * coordinate system of the receiver. * <p> * The item that is returned represents an item that could be selected by the user. - * For example, if selection only occurs in items in the first column, then null is - * returned if the point is outside of the item. + * For example, if selection only occurs in items in the first column, then null is + * returned if the point is outside of the item. * Note that the SWT.FULL_SELECTION style hint, which specifies the selection policy, * determines the extent of the selection. * </p> @@ -1571,7 +1571,7 @@ public int getItemHeight () { * <p> * Note: This is not the actual structure used by the receiver * to maintain its list of items, so modifying the array will - * not affect the receiver. + * not affect the receiver. * </p> * * @return the items @@ -1611,7 +1611,7 @@ TreeItem [] getItems (long /*int*/ parent) { /** * Returns <code>true</code> if the receiver's lines are visible, - * and <code>false</code> otherwise. Note that some platforms draw + * and <code>false</code> otherwise. Note that some platforms draw * grid lines while others may draw alternating row colors. * <p> * If one of the receiver's ancestors is not visible or some @@ -1626,7 +1626,7 @@ TreeItem [] getItems (long /*int*/ parent) { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 3.1 */ public boolean getLinesVisible() { @@ -1676,11 +1676,11 @@ long /*int*/ getPixbufRenderer (long /*int*/ column) { /** * Returns an array of <code>TreeItem</code>s that are currently * selected in the receiver. The order of the items is unspecified. - * An empty array indicates that no items are selected. + * An empty array indicates that no items are selected. * <p> * Note: This is not the actual structure used by the receiver * to maintain its selection, so modifying the array will - * not affect the receiver. + * not affect the receiver. * </p> * @return an array representing the selection * @@ -1719,7 +1719,7 @@ public TreeItem[] getSelection () { } return new TreeItem [0]; } - + /** * Returns the number of selected items contained in the receiver. * @@ -1741,15 +1741,15 @@ public int getSelectionCount () { * the receiver. The value may be null if no column shows * the sort indicator. * - * @return the sort indicator + * @return the sort indicator * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @see #setSortColumn(TreeColumn) - * + * * @since 3.2 */ public TreeColumn getSortColumn () { @@ -1758,8 +1758,8 @@ public TreeColumn getSortColumn () { } /** - * Returns the direction of the sort indicator for the receiver. - * The value will be one of <code>UP</code>, <code>DOWN</code> + * Returns the direction of the sort indicator for the receiver. + * The value will be one of <code>UP</code>, <code>DOWN</code> * or <code>NONE</code>. * * @return the sort direction @@ -1768,9 +1768,9 @@ public TreeColumn getSortColumn () { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @see #setSortDirection(int) - * + * * @since 3.2 */ public int getSortDirection () { @@ -1805,13 +1805,13 @@ long /*int*/ getTextRenderer (long /*int*/ column) { * This item can change when items are expanded, collapsed, scrolled * or new items are added or removed. * - * @return the item at the top of the receiver - * + * @return the item at the top of the receiver + * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 2.1 */ public TreeItem getTopItem () { @@ -1839,7 +1839,7 @@ long /*int*/ gtk_button_press_event (long /*int*/ widget, long /*int*/ event) { if (result != 0) return result; /* * Feature in GTK. In a multi-select tree view, when multiple items are already - * selected, the selection state of the item is toggled and the previous selection + * selected, the selection state of the item is toggled and the previous selection * is cleared. This is not the desired behaviour when bringing up a popup menu. * Also, when an item is reselected with the right button, the tree view issues * an unwanted selection event. The workaround is to detect that case and not @@ -1856,7 +1856,7 @@ long /*int*/ gtk_button_press_event (long /*int*/ widget, long /*int*/ event) { } } } - + /* * Feature in GTK. When the user clicks in a single selection GtkTreeView * and there are no selected items, the first item is selected automatically @@ -1911,8 +1911,8 @@ long /*int*/ gtk_event_after (long /*int*/ widget, long /*int*/ gdkEvent) { switch (OS.GDK_EVENT_TYPE (gdkEvent)) { case OS.GDK_EXPOSE: { /* - * Bug in GTK. SWT connects the expose-event 'after' the default - * handler of the signal. If the tree has no children, then GTK + * Bug in GTK. SWT connects the expose-event 'after' the default + * handler of the signal. If the tree has no children, then GTK * sends expose signal only 'before' the default signal handler. * The fix is to detect this case in 'event_after' and send the * expose event. @@ -1957,7 +1957,7 @@ void drawInheritedBackground (long /*int*/ eventPtr, long /*int*/ cairo) { itemCount = OS.gtk_tree_model_iter_n_children (modelHandle, iter); long /*int*/ path = OS.gtk_tree_model_get_path (modelHandle, iter); OS.gtk_tree_view_get_cell_area (handle, path, 0, rect); - expanded = OS.gtk_tree_view_row_expanded (handle, path); + expanded = OS.gtk_tree_view_row_expanded (handle, path); OS.gtk_tree_path_free (path); if (parent != 0) OS.g_free (parent); parent = iter; @@ -2051,7 +2051,7 @@ long /*int*/ gtk_row_inserted (long /*int*/ model, long /*int*/ path, long /*int @Override long /*int*/ gtk_start_interactive_search(long /*int*/ widget) { if (!searchEnabled()) { - OS.g_signal_stop_emission_by_name(widget, OS.start_interactive_search); + OS.g_signal_stop_emission_by_name(widget, OS.start_interactive_search); return 1; } return 0; @@ -2084,7 +2084,7 @@ long /*int*/ gtk_test_collapse_row (long /*int*/ tree, long /*int*/ iter, long / * the model can cause expansion to fail when using the multiple * expansion keys (such as *). The fix is to stop the expansion * if there are model changes. - * + * * Note: This callback must return 0 for the collapsing * animation to occur. */ @@ -2124,11 +2124,11 @@ long /*int*/ gtk_test_expand_row (long /*int*/ tree, long /*int*/ iter, long /*i * the model can cause expansion to fail when using the multiple * expansion keys (such as *). The fix is to stop the expansion * if there are model changes. - * + * * Bug in GTK. test-expand-row does not get called for each row * in an expand all operation. The fix is to block the initial * expansion and only expand a single level. - * + * * Note: This callback must return 0 for the collapsing * animation to occur. */ @@ -2168,7 +2168,7 @@ void gtk_widget_size_request (long /*int*/ widget, GtkRequisition requisition) { * Bug in GTK. For some reason, gtk_widget_size_request() fails * to include the height of the tree view items when there are * no columns visible. The fix is to temporarily make one column - * visible. + * visible. */ if (columnCount == 0) { super.gtk_widget_size_request (widget, requisition); @@ -2198,9 +2198,9 @@ void gtk_widget_size_request (long /*int*/ widget, GtkRequisition requisition) { void hideFirstColumn () { long /*int*/ firstColumn = OS.gtk_tree_view_get_column (handle, 0); - OS.gtk_tree_view_column_set_visible (firstColumn, false); + OS.gtk_tree_view_column_set_visible (firstColumn, false); } - + @Override void hookEvents () { super.hookEvents (); @@ -2223,7 +2223,7 @@ void hookEvents () { /** * Searches the receiver's list starting at the first column - * (index 0) until a column is found that is equal to the + * (index 0) until a column is found that is equal to the * argument, and returns the index of that column. If no column * is found, returns -1. * @@ -2237,7 +2237,7 @@ void hookEvents () { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 3.1 */ public int indexOf (TreeColumn column) { @@ -2251,7 +2251,7 @@ public int indexOf (TreeColumn column) { /** * Searches the receiver's list starting at the first item - * (index 0) until an item is found that is equal to the + * (index 0) until an item is found that is equal to the * argument, and returns the index of that item. If no item * is found, returns -1. * @@ -2266,7 +2266,7 @@ public int indexOf (TreeColumn column) { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 3.1 */ public int indexOf (TreeItem item) { @@ -2278,7 +2278,7 @@ public int indexOf (TreeItem item) { int depth = OS.gtk_tree_path_get_depth (path); if (depth == 1) { long /*int*/ indices = OS.gtk_tree_path_get_indices (path); - if (indices != 0) { + if (indices != 0) { int[] temp = new int[1]; OS.memmove (temp, indices, 4); index = temp[0]; @@ -2444,7 +2444,7 @@ void remove (long /*int*/ parentIter, int start, int end) { /** * Removes all of the items from the receiver. - * + * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> @@ -2475,9 +2475,9 @@ public void removeAll () { OS.g_object_notify (handle, OS.model); } OS.g_signal_handlers_unblock_matched (selection, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, CHANGED); - + if (!searchEnabled ()) { - OS.gtk_tree_view_set_search_column (handle, -1); + OS.gtk_tree_view_set_search_column (handle, -1); } else { /* Set the search column whenever the model changes */ int firstColumn = columnCount == 0 ? FIRST_COLUMN : columns [0].modelIndex; @@ -2506,7 +2506,7 @@ public void removeSelectionListener (SelectionListener listener) { checkWidget (); if (listener == null) error (SWT.ERROR_NULL_ARGUMENT); eventTable.unhook (SWT.Selection, listener); - eventTable.unhook (SWT.DefaultSelection, listener); + eventTable.unhook (SWT.DefaultSelection, listener); } /** @@ -2547,7 +2547,7 @@ void sendMeasureEvent (long /*int*/ cell, long /*int*/ width, long /*int*/ heigh if (columns [i].handle == columnHandle) { columnIndex = i; break; - } + } } } int [] contentWidth = new int [1], contentHeight = new int [1]; @@ -2583,7 +2583,7 @@ void sendMeasureEvent (long /*int*/ cell, long /*int*/ width, long /*int*/ heigh if (contentHeight [0] < event.height) contentHeight [0] = event.height; if (width != 0) OS.memmove (width, contentWidth, 4); if (height != 0) OS.memmove (height, contentHeight, 4); - if (OS.GTK3) { + if (OS.GTK3) { OS.gtk_cell_renderer_set_fixed_size (cell, contentWidth [0], contentHeight [0]); } } @@ -2633,7 +2633,7 @@ void rendererRender (long /*int*/ cell, long /*int*/ cr, long /*int*/ window, lo if (columns [i].handle == columnHandle) { columnIndex = i; break; - } + } } } if (item != null) { @@ -2654,12 +2654,12 @@ void rendererRender (long /*int*/ cell, long /*int*/ cr, long /*int*/ window, lo if (!OS.GTK3 || (flags & OS.GTK_CELL_RENDERER_SELECTED) == 0) { if ((flags & OS.GTK_CELL_RENDERER_FOCUSED) != 0) drawState |= SWT.FOCUSED; } - + GdkRectangle rect = new GdkRectangle (); long /*int*/ path = OS.gtk_tree_model_get_path (modelHandle, iter); OS.gtk_tree_view_get_background_area (handle, path, columnHandle, rect); OS.gtk_tree_path_free (path); - + if ((drawState & SWT.SELECTED) == 0) { if ((state & PARENT_BACKGROUND) != 0 || backgroundImage != null) { Control control = findBackgroundControl (); @@ -2681,7 +2681,7 @@ void rendererRender (long /*int*/ cell, long /*int*/ cr, long /*int*/ window, lo //send out measure before erase long /*int*/ textRenderer = getTextRenderer (columnHandle); if (textRenderer != 0) gtk_cell_renderer_get_preferred_size (textRenderer, handle, null, null); - + if (hooks (SWT.EraseItem)) { boolean wasSelected = (drawState & SWT.SELECTED) != 0; if (wasSelected) { @@ -2741,7 +2741,7 @@ void rendererRender (long /*int*/ cell, long /*int*/ cr, long /*int*/ window, lo if ((drawState & SWT.FOCUSED) != 0) drawFlags |= OS.GTK_CELL_RENDERER_FOCUSED; if ((drawState & SWT.SELECTED) != 0) { if (!OS.GTK3) { - long /*int*/ style = OS.gtk_widget_get_style (widget); + long /*int*/ style = OS.gtk_widget_get_style (widget); //TODO - parity and sorted byte[] detail = Converter.wcsToMbcs (null, "cell_odd", true); OS.gtk_paint_flat_box (style, window, OS.GTK_STATE_SELECTED, OS.GTK_SHADOW_NONE, rect, widget, detail, rect.x, rect.y, rect.width, rect.height); @@ -2901,11 +2901,11 @@ boolean searchEnabled () { } /** * Display a mark indicating the point at which an item will be inserted. - * The drop insert item has a visual hint to show where a dragged item + * The drop insert item has a visual hint to show where a dragged item * will be inserted when dropped on the tree. - * + * * @param item the insert item. Null will clear the insertion mark. - * @param before true places the insert mark above 'item'. false places + * @param before true places the insert mark above 'item'. false places * the insert mark below 'item'. * * @exception IllegalArgumentException <ul> @@ -3074,7 +3074,7 @@ int setBounds (int x, int y, int width, int height, boolean move, boolean resize } /** - * Sets the order that the items in the receiver should + * Sets the order that the items in the receiver should * be displayed in to the given argument which is described * in terms of the zero-relative ordering of when the items * were added. @@ -3089,12 +3089,12 @@ int setBounds (int x, int y, int width, int height, boolean move, boolean resize * <li>ERROR_NULL_ARGUMENT - if the item order is null</li> * <li>ERROR_INVALID_ARGUMENT - if the item order is not the same length as the number of items</li> * </ul> - * + * * @see Tree#getColumnOrder() * @see TreeColumn#getMoveable() * @see TreeColumn#setMoveable(boolean) * @see SWT#Move - * + * * @since 3.2 */ public void setColumnOrder (int [] order) { @@ -3138,7 +3138,7 @@ void setForegroundColor (GdkColor color) { /** * Marks the receiver's header as visible if the argument is <code>true</code>, - * and marks it invisible otherwise. + * and marks it invisible otherwise. * <p> * If one of the receiver's ancestors is not visible or some * other condition makes the receiver not visible, marking @@ -3151,7 +3151,7 @@ void setForegroundColor (GdkColor color) { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 3.1 */ public void setHeaderVisible (boolean show) { @@ -3161,7 +3161,7 @@ public void setHeaderVisible (boolean show) { /** * Marks the receiver's lines as visible if the argument is <code>true</code>, - * and marks it invisible otherwise. Note that some platforms draw + * and marks it invisible otherwise. Note that some platforms draw * grid lines while others may draw alternating row colors. * <p> * If one of the receiver's ancestors is not visible or some @@ -3175,7 +3175,7 @@ public void setHeaderVisible (boolean show) { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 3.1 */ public void setLinesVisible (boolean show) { @@ -3251,7 +3251,7 @@ void setScrollWidth (long /*int*/ column, TreeItem item) { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 3.2 */ public void setSelection (TreeItem item) { @@ -3313,19 +3313,19 @@ public void setSelection (TreeItem [] items) { /** * Sets the column used by the sort indicator for the receiver. A null - * value will clear the sort indicator. The current sort column is cleared + * value will clear the sort indicator. The current sort column is cleared * before the new column is set. * * @param column the column used by the sort indicator or <code>null</code> - * + * * @exception IllegalArgumentException <ul> - * <li>ERROR_INVALID_ARGUMENT - if the column is disposed</li> + * <li>ERROR_INVALID_ARGUMENT - if the column is disposed</li> * </ul> * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 3.2 */ public void setSortColumn (TreeColumn column) { @@ -3342,16 +3342,16 @@ public void setSortColumn (TreeColumn column) { } /** - * Sets the direction of the sort indicator for the receiver. The value + * Sets the direction of the sort indicator for the receiver. The value * can be one of <code>UP</code>, <code>DOWN</code> or <code>NONE</code>. * - * @param direction the direction of the sort indicator + * @param direction the direction of the sort indicator * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 3.2 */ public void setSortDirection (int direction) { @@ -3384,7 +3384,7 @@ public void setSortDirection (int direction) { * </ul> * * @see Tree#getTopItem() - * + * * @since 2.1 */ public void setTopItem (TreeItem item) { @@ -3442,10 +3442,10 @@ public void showColumn (TreeColumn column) { } } -boolean showFirstColumn () { +boolean showFirstColumn () { /* * Bug in GTK. If no columns are visible, changing the selection - * will fail. The fix is to temporarily make a column visible. + * will fail. The fix is to temporarily make a column visible. */ int columnCount = Math.max (1, this.columnCount); for (int i=0; i<columnCount; i++) { @@ -3486,7 +3486,7 @@ void showItem (long /*int*/ path, boolean scroll) { OS.gtk_tree_path_append_index (tempPath, indices [i]); OS.gtk_tree_view_expand_row (handle, tempPath, false); } - OS.gtk_tree_path_free (tempPath); + OS.gtk_tree_path_free (tempPath); } if (scroll) { OS.gtk_widget_realize (handle); @@ -3504,7 +3504,7 @@ void showItem (long /*int*/ path, boolean scroll) { if (!isHidden) { if (ty[0] < visibleRect.y || ty[0] + cellRect.height > visibleRect.y + visibleRect.height) { isHidden = true; - } + } } if (isHidden) { /* @@ -3514,7 +3514,7 @@ void showItem (long /*int*/ path, boolean scroll) { * However, what actually happens is the cell is scrolled to the top. * The fix is to determine the new location and use gtk_tree_view_scroll_to_point. * If the widget is a pinhead, calling gtk_tree_view_scroll_to_point - * will have no effect. Therefore, it is still neccessary to + * will have no effect. Therefore, it is still neccessary to * call gtk_tree_view_scroll_to_cell. */ // OS.gtk_tree_view_scroll_to_cell (handle, path, 0, depth != 1, 0.5f, 0.0f); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeColumn.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeColumn.java index 84fb716614..f2fe630d3e 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeColumn.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeColumn.java @@ -33,7 +33,7 @@ import org.eclipse.swt.events.*; * * @see <a href="http://www.eclipse.org/swt/snippets/#tree">Tree, TreeItem, TreeColumn snippets</a> * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a> - * + * * @since 3.1 * @noextend This class is not intended to be subclassed by clients. */ @@ -52,7 +52,7 @@ public class TreeColumn extends Item { * <p> * The style value is either one of the style constants defined in * class <code>SWT</code> which is applicable to instances of this - * class, or must be built by <em>bitwise OR</em>'ing together + * class, or must be built by <em>bitwise OR</em>'ing together * (that is, using the <code>int</code> "|" operator) two or more * of those <code>SWT</code> style constants. The class description * lists the style constants that are applicable to the class. @@ -90,7 +90,7 @@ public TreeColumn (Tree parent, int style) { * <p> * The style value is either one of the style constants defined in * class <code>SWT</code> which is applicable to instances of this - * class, or must be built by <em>bitwise OR</em>'ing together + * class, or must be built by <em>bitwise OR</em>'ing together * (that is, using the <code>int</code> "|" operator) two or more * of those <code>SWT</code> style constants. The class description * lists the style constants that are applicable to the class. @@ -221,7 +221,7 @@ void destroyWidget () { * text or image in the receiver. The value will be one of * <code>LEFT</code>, <code>RIGHT</code> or <code>CENTER</code>. * - * @return the alignment + * @return the alignment * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> @@ -238,8 +238,8 @@ public int getAlignment () { /** * Gets the moveable attribute. A column that is - * not moveable cannot be reordered by the user - * by dragging the header but may be reordered + * not moveable cannot be reordered by the user + * by dragging the header but may be reordered * by the programmer. * * @return the moveable attribute @@ -248,12 +248,12 @@ public int getAlignment () { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @see Tree#getColumnOrder() * @see Tree#setColumnOrder(int[]) * @see TreeColumn#setMoveable(boolean) * @see SWT#Move - * + * * @since 3.2 */ public boolean getMoveable() { @@ -303,7 +303,7 @@ public boolean getResizable () { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 3.2 */ public String getToolTipText () { @@ -523,7 +523,7 @@ public void removeSelectionListener(SelectionListener listener) { if (listener == null) error (SWT.ERROR_NULL_ARGUMENT); if (eventTable == null) return; eventTable.unhook (SWT.Selection, listener); - eventTable.unhook (SWT.DefaultSelection,listener); + eventTable.unhook (SWT.DefaultSelection,listener); } /** @@ -534,7 +534,7 @@ public void removeSelectionListener(SelectionListener listener) { * Note that due to a restriction on some platforms, the first column * is always left aligned. * </p> - * @param alignment the new alignment + * @param alignment the new alignment * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> @@ -579,8 +579,8 @@ public void setImage (Image image) { /** * Sets the moveable attribute. A column that is * moveable can be reordered by the user by dragging - * the header. A column that is not moveable cannot be - * dragged by the user but may be reordered + * the header. A column that is not moveable cannot be + * dragged by the user but may be reordered * by the programmer. * * @param moveable the moveable attribute @@ -589,12 +589,12 @@ public void setImage (Image image) { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @see Tree#setColumnOrder(int[]) * @see Tree#getColumnOrder() * @see TreeColumn#getMoveable() * @see SWT#Move - * + * * @since 3.2 */ public void setMoveable (boolean moveable) { @@ -647,24 +647,24 @@ public void setText (String string) { /** * Sets the receiver's tool tip text to the argument, which - * may be null indicating that the default tool tip for the + * may be null indicating that the default tool tip for the * control will be shown. For a control that has a default * tool tip, such as the Tree control on Windows, setting * the tool tip text to an empty string replaces the default, * causing no tool tip text to be shown. * <p> * The mnemonic indicator (character '&') is not displayed in a tool tip. - * To display a single '&' in the tool tip, the character '&' can be + * To display a single '&' in the tool tip, the character '&' can be * escaped by doubling it in the string. * </p> - * + * * @param string the new tool tip text (or null) * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 3.2 */ public void setToolTipText (String string) { @@ -706,10 +706,10 @@ public void setWidth (int width) { lastWidth = width; /* * Bug in GTK. When the column is made visible the event window of column - * header is raised above the gripper window of the previous column. In + * header is raised above the gripper window of the previous column. In * some cases, this can cause the previous column to be not resizable by * the mouse. The fix is to find the event window and lower it to bottom to - * the z-order stack. + * the z-order stack. */ if (width != 0) { if (buttonHandle != 0) { diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeItem.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeItem.java index 623a18fc5f..502d38a655 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeItem.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeItem.java @@ -19,7 +19,7 @@ import org.eclipse.swt.internal.gtk.*; /** * Instances of this class represent a selectable user interface object * that represents a hierarchy of tree items in a tree widget. - * + * * <dl> * <dt><b>Styles:</b></dt> * <dd>(none)</dd> @@ -49,7 +49,7 @@ public class TreeItem extends Item { * <p> * The style value is either one of the style constants defined in * class <code>SWT</code> which is applicable to instances of this - * class, or must be built by <em>bitwise OR</em>'ing together + * class, or must be built by <em>bitwise OR</em>'ing together * (that is, using the <code>int</code> "|" operator) two or more * of those <code>SWT</code> style constants. The class description * lists the style constants that are applicable to the class. @@ -83,7 +83,7 @@ public TreeItem (Tree parent, int style) { * <p> * The style value is either one of the style constants defined in * class <code>SWT</code> which is applicable to instances of this - * class, or must be built by <em>bitwise OR</em>'ing together + * class, or must be built by <em>bitwise OR</em>'ing together * (that is, using the <code>int</code> "|" operator) two or more * of those <code>SWT</code> style constants. The class description * lists the style constants that are applicable to the class. @@ -119,7 +119,7 @@ public TreeItem (Tree parent, int style, int index) { * <p> * The style value is either one of the style constants defined in * class <code>SWT</code> which is applicable to instances of this - * class, or must be built by <em>bitwise OR</em>'ing together + * class, or must be built by <em>bitwise OR</em>'ing together * (that is, using the <code>int</code> "|" operator) two or more * of those <code>SWT</code> style constants. The class description * lists the style constants that are applicable to the class. @@ -153,7 +153,7 @@ public TreeItem (TreeItem parentItem, int style) { * <p> * The style value is either one of the style constants defined in * class <code>SWT</code> which is applicable to instances of this - * class, or must be built by <em>bitwise OR</em>'ing together + * class, or must be built by <em>bitwise OR</em>'ing together * (that is, using the <code>int</code> "|" operator) two or more * of those <code>SWT</code> style constants. The class description * lists the style constants that are applicable to the class. @@ -326,10 +326,10 @@ void clear () { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @see SWT#VIRTUAL * @see SWT#SetData - * + * * @since 3.2 */ public void clear (int index, boolean all) { @@ -342,7 +342,7 @@ public void clear (int index, boolean all) { * attributes of the items are set to their default values. If the * tree was created with the <code>SWT.VIRTUAL</code> style, these * attributes are requested again as needed. - * + * * @param all <code>true</code> if all child items should be cleared * recursively, and <code>false</code> otherwise * @@ -350,10 +350,10 @@ public void clear (int index, boolean all) { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @see SWT#VIRTUAL * @see SWT#SetData - * + * * @since 3.2 */ public void clearAll (boolean all) { @@ -372,14 +372,14 @@ void destroyWidget () { * Returns the receiver's background color. * * @return the background color - * + * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 2.0 - * + * */ public Color getBackground () { checkWidget (); @@ -397,7 +397,7 @@ public Color getBackground () { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 3.1 */ public Color getBackground (int index) { @@ -417,7 +417,7 @@ public Color getBackground (int index) { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 3.1 */ public Rectangle getBounds (int index) { @@ -437,9 +437,9 @@ public Rectangle getBounds (int index) { GdkRectangle rect = new GdkRectangle (); OS.gtk_tree_view_get_cell_area (parentHandle, path, column, rect); if ((parent.getStyle () & SWT.MIRRORED) != 0) rect.x = parent.getClientWidth () - rect.width - rect.x; - + OS.gtk_tree_path_free (path); - + if (index == 0 && (parent.style & SWT.CHECK) != 0) { int [] x = new int [1], w = new int [1]; OS.gtk_tree_view_column_cell_get_position (column, parent.checkRenderer, x, w); @@ -475,11 +475,11 @@ public Rectangle getBounds () { long /*int*/ path = OS.gtk_tree_model_get_path (parent.modelHandle, handle); OS.gtk_widget_realize (parentHandle); - + boolean isExpander = OS.gtk_tree_model_iter_n_children (parent.modelHandle, handle) > 0; boolean isExpanded = OS.gtk_tree_view_row_expanded (parentHandle, path); OS.gtk_tree_view_column_cell_set_cell_data (column, parent.modelHandle, handle, isExpander, isExpanded); - + GdkRectangle rect = new GdkRectangle (); OS.gtk_tree_view_get_cell_area (parentHandle, path, column, rect); if ((parent.getStyle () & SWT.MIRRORED) != 0) rect.x = parent.getClientWidth () - rect.width - rect.x; @@ -492,11 +492,11 @@ public Rectangle getBounds () { rect.width = w [0]; int [] buffer = new int [1]; OS.gtk_tree_path_free (path); - + OS.gtk_widget_style_get (parentHandle, OS.horizontal_separator, buffer, 0); int horizontalSeparator = buffer[0]; rect.x += horizontalSeparator; - + OS.gtk_tree_view_column_cell_get_position (column, textRenderer, x, null); rect.x += x [0]; if (parent.columnCount > 0) { @@ -599,9 +599,9 @@ public Font getFont (int index) { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 2.0 - * + * */ public Color getForeground () { checkWidget (); @@ -610,7 +610,7 @@ public Color getForeground () { } /** - * + * * Returns the foreground color at the given column index in the receiver. * * @param index the column index @@ -620,7 +620,7 @@ public Color getForeground () { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 3.1 */ public Color getForeground (int index) { @@ -667,7 +667,7 @@ public Image getImage () { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 3.1 */ public Image getImage (int index) { @@ -688,7 +688,7 @@ public Image getImage (int index) { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 3.1 */ public Rectangle getImageBounds (int index) { @@ -711,7 +711,7 @@ public Rectangle getImageBounds (int index) { OS.gtk_tree_view_get_cell_area (parentHandle, path, column, rect); if ((parent.getStyle () & SWT.MIRRORED) != 0) rect.x = parent.getClientWidth () - rect.width - rect.x; OS.gtk_tree_path_free (path); - + int [] x = new int [1], w = new int[1]; OS.gtk_tree_view_column_cell_get_position (column, pixbufRenderer, x, w); rect.x += x [0]; @@ -751,7 +751,7 @@ public int getItemCount () { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 3.1 */ public TreeItem getItem (int index) { @@ -769,7 +769,7 @@ public TreeItem getItem (int index) { * <p> * Note: This is not the actual structure used by the receiver * to maintain its list of items, so modifying the array will - * not affect the receiver. + * not affect the receiver. * </p> * * @return the receiver's items @@ -824,7 +824,7 @@ public TreeItem getParentItem () { checkWidget(); long /*int*/ path = OS.gtk_tree_model_get_path (parent.modelHandle, handle); TreeItem item = null; - int depth = OS.gtk_tree_path_get_depth (path); + int depth = OS.gtk_tree_path_get_depth (path); if (depth > 1) { OS.gtk_tree_path_up (path); long /*int*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ()); @@ -855,7 +855,7 @@ public String getText () { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 3.1 */ public String getText (int index) { @@ -876,7 +876,7 @@ public String getText (int index) { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 3.3 */ public Rectangle getTextBounds (int index) { @@ -900,11 +900,11 @@ public Rectangle getTextBounds (int index) { long /*int*/ path = OS.gtk_tree_model_get_path (parent.modelHandle, handle); OS.gtk_widget_realize (parentHandle); - + boolean isExpander = OS.gtk_tree_model_iter_n_children (parent.modelHandle, handle) > 0; boolean isExpanded = OS.gtk_tree_view_row_expanded (parentHandle, path); OS.gtk_tree_view_column_cell_set_cell_data (column, parent.modelHandle, handle, isExpander, isExpanded); - + GdkRectangle rect = new GdkRectangle (); OS.gtk_tree_view_get_cell_area (parentHandle, path, column, rect); if ((parent.getStyle () & SWT.MIRRORED) != 0) rect.x = parent.getClientWidth () - rect.width - rect.x; @@ -916,7 +916,7 @@ public Rectangle getTextBounds (int index) { parent.ignoreSize = false; int [] buffer = new int [1]; OS.gtk_tree_path_free (path); - + OS.gtk_widget_style_get (parentHandle, OS.horizontal_separator, buffer, 0); int horizontalSeparator = buffer[0]; rect.x += horizontalSeparator; @@ -933,7 +933,7 @@ public Rectangle getTextBounds (int index) { /** * Searches the receiver's list starting at the first item - * (index 0) until an item is found that is equal to the + * (index 0) until an item is found that is equal to the * argument, and returns the index of that item. If no item * is found, returns -1. * @@ -948,7 +948,7 @@ public Rectangle getTextBounds (int index) { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 3.1 */ public int indexOf (TreeItem item) { @@ -969,7 +969,7 @@ public int indexOf (TreeItem item) { long /*int*/ path = OS.gtk_tree_model_get_path (parent.modelHandle, item.handle); if (depth > 1) { long /*int*/ indices = OS.gtk_tree_path_get_indices (path); - if (indices != 0) { + if (indices != 0) { int[] temp = new int[depth]; OS.memmove (temp, indices, 4 * temp.length); index = temp[temp.length - 1]; @@ -1048,17 +1048,17 @@ public void removeAll () { * if the argument is null. * * @param color the new color (or null) - * + * * @exception IllegalArgumentException <ul> - * <li>ERROR_INVALID_ARGUMENT - if the argument has been disposed</li> + * <li>ERROR_INVALID_ARGUMENT - if the argument has been disposed</li> * </ul> * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 2.0 - * + * */ public void setBackground (Color color) { checkWidget (); @@ -1072,7 +1072,7 @@ public void setBackground (Color color) { } /** - * Sets the background color at the given column index in the receiver + * Sets the background color at the given column index in the receiver * to the color specified by the argument, or to the default system color for the item * if the argument is null. * @@ -1080,15 +1080,15 @@ public void setBackground (Color color) { * @param color the new color (or null) * * @exception IllegalArgumentException <ul> - * <li>ERROR_INVALID_ARGUMENT - if the argument has been disposed</li> + * <li>ERROR_INVALID_ARGUMENT - if the argument has been disposed</li> * </ul> * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 3.1 - * + * */ public void setBackground (int index, Color color) { checkWidget (); @@ -1102,7 +1102,7 @@ public void setBackground (int index, Color color) { GdkColor gdkColor = color != null ? color.handle : null; OS.gtk_tree_store_set (parent.modelHandle, handle, modelIndex + Tree.CELL_BACKGROUND, gdkColor, -1); cached = true; - + if (color != null) { boolean customDraw = (parent.columnCount == 0) ? parent.firstCustomDraw : parent.columns [index].customDraw; if (!customDraw) { @@ -1148,7 +1148,7 @@ public void setChecked (boolean checked) { /* * GTK+'s "inconsistent" state does not match SWT's concept of grayed. To * show checked+grayed differently from unchecked+grayed, we must toggle the - * grayed state on check and uncheck. + * grayed state on check and uncheck. */ OS.gtk_tree_store_set (parent.modelHandle, handle, Tree.GRAYED_COLUMN, !checked ? false : grayed, -1); cached = true; @@ -1193,13 +1193,13 @@ public void setExpanded (boolean expanded) { * @param font the new font (or null) * * @exception IllegalArgumentException <ul> - * <li>ERROR_INVALID_ARGUMENT - if the argument has been disposed</li> + * <li>ERROR_INVALID_ARGUMENT - if the argument has been disposed</li> * </ul> * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 3.0 */ public void setFont (Font font){ @@ -1218,21 +1218,21 @@ public void setFont (Font font){ /** * Sets the font that the receiver will use to paint textual information - * for the specified cell in this item to the font specified by the - * argument, or to the default font for that kind of control if the + * for the specified cell in this item to the font specified by the + * argument, or to the default font for that kind of control if the * argument is null. * * @param index the column index * @param font the new font (or null) * * @exception IllegalArgumentException <ul> - * <li>ERROR_INVALID_ARGUMENT - if the argument has been disposed</li> + * <li>ERROR_INVALID_ARGUMENT - if the argument has been disposed</li> * </ul> * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 3.1 */ public void setFont (int index, Font font) { @@ -1250,12 +1250,12 @@ public void setFont (int index, Font font) { if (oldFont == font) return; cellFont [index] = font; if (oldFont != null && oldFont.equals (font)) return; - + int modelIndex = parent.columnCount == 0 ? Tree.FIRST_COLUMN : parent.columns [index].modelIndex; long /*int*/ fontHandle = font != null ? font.handle : 0; OS.gtk_tree_store_set (parent.modelHandle, handle, modelIndex + Tree.CELL_FONT, fontHandle, -1); cached = true; - + if (font != null) { boolean customDraw = (parent.columnCount == 0) ? parent.firstCustomDraw : parent.columns [index].customDraw; if (!customDraw) { @@ -1290,15 +1290,15 @@ public void setFont (int index, Font font) { * @param color the new color (or null) * * @exception IllegalArgumentException <ul> - * <li>ERROR_INVALID_ARGUMENT - if the argument has been disposed</li> + * <li>ERROR_INVALID_ARGUMENT - if the argument has been disposed</li> * </ul> * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 2.0 - * + * */ public void setForeground (Color color){ checkWidget (); @@ -1312,7 +1312,7 @@ public void setForeground (Color color){ } /** - * Sets the foreground color at the given column index in the receiver + * Sets the foreground color at the given column index in the receiver * to the color specified by the argument, or to the default system color for the item * if the argument is null. * @@ -1320,15 +1320,15 @@ public void setForeground (Color color){ * @param color the new color (or null) * * @exception IllegalArgumentException <ul> - * <li>ERROR_INVALID_ARGUMENT - if the argument has been disposed</li> + * <li>ERROR_INVALID_ARGUMENT - if the argument has been disposed</li> * </ul> * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 3.1 - * + * */ public void setForeground (int index, Color color){ checkWidget (); @@ -1342,7 +1342,7 @@ public void setForeground (int index, Color color){ GdkColor gdkColor = color != null ? color.handle : null; OS.gtk_tree_store_set (parent.modelHandle, handle, modelIndex + Tree.CELL_FOREGROUND, gdkColor, -1); cached = true; - + if (color != null) { boolean customDraw = (parent.columnCount == 0) ? parent.firstCustomDraw : parent.columns [index].customDraw; if (!customDraw) { @@ -1370,7 +1370,7 @@ public void setForeground (int index, Color color){ } /** - * Sets the grayed state of the checkbox for this item. This state change + * Sets the grayed state of the checkbox for this item. This state change * only applies if the Tree was created with the SWT.CHECK style. * * @param grayed the new grayed state of the checkbox @@ -1408,7 +1408,7 @@ public void setGrayed (boolean grayed) { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 3.1 */ public void setImage (int index, Image image) { @@ -1454,7 +1454,7 @@ public void setImage (int index, Image image) { parent.modifyStyle (parentHandle, style); } } - } + } } cached = true; } @@ -1466,8 +1466,8 @@ public void setImage (Image image) { } /** - * Sets the image for multiple columns in the tree. - * + * Sets the image for multiple columns in the tree. + * * @param images the array of new images * * @exception IllegalArgumentException <ul> @@ -1478,7 +1478,7 @@ public void setImage (Image image) { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 3.1 */ public void setImage (Image [] images) { @@ -1520,7 +1520,7 @@ public void setItemCount (int count) { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 3.1 */ public void setText (int index, String string) { @@ -1542,8 +1542,8 @@ public void setText (String string) { } /** - * Sets the text for multiple columns in the tree. - * + * Sets the text for multiple columns in the tree. + * * @param strings the array of new strings * * @exception IllegalArgumentException <ul> @@ -1553,7 +1553,7 @@ public void setText (String string) { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @since 3.1 */ public void setText (String [] strings) { diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Widget.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Widget.java index 214b51353c..0af84bd0ee 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Widget.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Widget.java @@ -17,7 +17,7 @@ import org.eclipse.swt.internal.gtk.*; import org.eclipse.swt.events.*; /** - * This class is the abstract superclass of all user interface objects. + * This class is the abstract superclass of all user interface objects. * Widgets are created, disposed and issue notification to listeners * when events occur which affect them. * <dl> @@ -45,7 +45,7 @@ import org.eclipse.swt.events.*; */ public abstract class Widget { /** - * the handle to the OS resource + * the handle to the OS resource * (Warning: This field is platform dependent) * <p> * <b>IMPORTANT:</b> This field is <em>not</em> part of the SWT @@ -53,7 +53,7 @@ public abstract class Widget { * within the packages provided by SWT. It is not available on all * platforms and should never be accessed from application code. * </p> - * + * * @noreference This field is not intended to be referenced by clients. */ public long /*int*/ handle; @@ -61,7 +61,7 @@ public abstract class Widget { Display display; EventTable eventTable; Object data; - + /* Global state flags */ static final int DISPOSED = 1<<0; static final int CANVAS = 1<<1; @@ -80,13 +80,13 @@ public abstract class Widget { static final int FONT = 1<<14; static final int PARENT_BACKGROUND = 1<<15; static final int THEME_BACKGROUND = 1<<16; - + /* A layout was requested on this widget */ static final int LAYOUT_NEEDED = 1<<17; - + /* The preferred size of a child has changed */ static final int LAYOUT_CHANGED = 1<<18; - + /* A layout was requested in this widget hierachy */ static final int LAYOUT_CHILD = 1<<19; @@ -95,7 +95,7 @@ public abstract class Widget { static final int DISPOSE_SENT = 1<<21; static final int FOREIGN_HANDLE = 1<<22; static final int DRAG_DETECT = 1<<23; - + /* Notify of the opportunity to skin this widget */ static final int SKIN_NEEDED = 1<<24; @@ -105,7 +105,7 @@ public abstract class Widget { /* Default size for widgets */ static final int DEFAULT_WIDTH = 64; static final int DEFAULT_HEIGHT = 64; - + /* GTK signals data */ static final int ACTIVATE = 1; static final int BUTTON_PRESS_EVENT = 2; @@ -193,7 +193,7 @@ public abstract class Widget { static final int CREATE_MENU_PROXY = 83; static final int ROW_HAS_CHILD_TOGGLED = 84; static final int LAST_SIGNAL = 85; - + static final String IS_ACTIVE = "org.eclipse.swt.internal.control.isactive"; //$NON-NLS-1$ static final String KEY_CHECK_SUBWINDOW = "org.eclipse.swt.internal.control.checksubwindow"; //$NON-NLS-1$ @@ -208,7 +208,7 @@ Widget () {} * <p> * The style value is either one of the style constants defined in * class <code>SWT</code> which is applicable to instances of this - * class, or must be built by <em>bitwise OR</em>'ing together + * class, or must be built by <em>bitwise OR</em>'ing together * (that is, using the <code>int</code> "|" operator) two or more * of those <code>SWT</code> style constants. The class description * lists the style constants that are applicable to the class. @@ -357,14 +357,14 @@ void checkParent (Widget parent) { /** * Checks that this class can be subclassed. * <p> - * The SWT class library is intended to be subclassed - * only at specific, controlled points (most notably, + * The SWT class library is intended to be subclassed + * only at specific, controlled points (most notably, * <code>Composite</code> and <code>Canvas</code> when * implementing new widgets). This method enforces this * rule unless it is overridden. * </p><p> * <em>IMPORTANT:</em> By providing an implementation of this - * method that allows a subclass of a class which does not + * method that allows a subclass of a class which does not * normally allow subclassing to be created, the implementer * agrees to be fully responsible for the fact that any such * subclass will likely fail between SWT releases and will be @@ -395,7 +395,7 @@ protected void checkSubclass () { * widget implementors to enforce the standard SWT invariants. * <p> * Currently, it is an error to invoke any method (other than - * <code>isDisposed()</code>) on a widget that has had its + * <code>isDisposed()</code>) on a widget that has had its * <code>dispose()</code> method called. It is also an error * to call widget methods from any thread that is different * from the thread that created the widget. @@ -481,7 +481,7 @@ void error (int code) { * Returns the application defined widget data associated * with the receiver, or null if it has not been set. The * <em>widget data</em> is a single, unnamed field that is - * stored with every widget. + * stored with every widget. * <p> * Applications may put arbitrary objects in this field. If * the object stored in the widget data needs to be notified @@ -565,8 +565,8 @@ public Display getDisplay () { } /** - * Returns an array of listeners who will be notified when an event - * of the given type occurs. The event type is one of the event constants + * Returns an array of listeners who will be notified when an event + * of the given type occurs. The event type is one of the event constants * defined in class <code>SWT</code>. * * @param eventType the type of event to listen for @@ -582,7 +582,7 @@ public Display getDisplay () { * @see #addListener(int, Listener) * @see #removeListener(int, Listener) * @see #notifyListeners - * + * * @since 3.4 */ public Listener[] getListeners (int eventType) { @@ -594,7 +594,7 @@ public Listener[] getListeners (int eventType) { String getName () { // String string = getClass ().getName (); // int index = string.lastIndexOf ('.'); -// if (index == -1) return string; +// if (index == -1) return string; String string = getClass ().getName (); int index = string.length (); while ((--index > 0) && (string.charAt (index) != '.')) {} @@ -909,7 +909,7 @@ long /*int*/ gtk_select (long /*int*/ item) { long /*int*/ gtk_selection_done (long /*int*/ menushell) { return 0; -} +} long /*int*/ gtk_show (long /*int*/ widget) { return 0; @@ -1153,7 +1153,7 @@ boolean mnemonicHit (long /*int*/ mnemonicHandle, char key) { boolean mnemonicMatch (long /*int*/ mnemonicHandle, char key) { int keyval1 = OS.gdk_keyval_to_lower (OS.gdk_unicode_to_keyval (key)); - int keyval2 = OS.gdk_keyval_to_lower (OS.gtk_label_get_mnemonic_keyval (mnemonicHandle)); + int keyval2 = OS.gdk_keyval_to_lower (OS.gtk_label_get_mnemonic_keyval (mnemonicHandle)); return keyval1 == keyval2; } @@ -1175,7 +1175,7 @@ void modifyStyle (long /*int*/ handle, long /*int*/ style) { * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> - * + * * @see SWT * @see #addListener * @see #getListeners(int) @@ -1292,7 +1292,7 @@ public void removeListener (int eventType, Listener listener) { * * @see Listener * @see #addListener - * + * * @noreference This method is not intended to be referenced by clients. * @nooverride This method is not intended to be re-implemented or extended by clients. */ @@ -1320,14 +1320,14 @@ long /*int*/ rendererRenderProc (long /*int*/ cell, long /*int*/ window, long /* } /** - * Marks the widget to be skinned. + * Marks the widget to be skinned. * <p> * The skin event is sent to the receiver's display when appropriate (usually before the next event * is handled). Widgets are automatically marked for skinning upon creation as well as when its skin - * id or class changes. The skin id and/or class can be changed by calling <code>Display.setData(String, Object)</code> - * with the keys SWT.SKIN_ID and/or SWT.SKIN_CLASS. Once the skin event is sent to a widget, it - * will not be sent again unless <code>reskin(int)</code> is called on the widget or on an ancestor - * while specifying the <code>SWT.ALL</code> flag. + * id or class changes. The skin id and/or class can be changed by calling <code>Display.setData(String, Object)</code> + * with the keys SWT.SKIN_ID and/or SWT.SKIN_CLASS. Once the skin event is sent to a widget, it + * will not be sent again unless <code>reskin(int)</code> is called on the widget or on an ancestor + * while specifying the <code>SWT.ALL</code> flag. * </p> * <p> * The parameter <code>flags</code> may be either: @@ -1339,8 +1339,8 @@ long /*int*/ rendererRenderProc (long /*int*/ cell, long /*int*/ window, long /* * </dl> * </p> * @param flags the flags specifying how to reskin - * - * @exception SWTException + * + * @exception SWTException * <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> @@ -1353,7 +1353,7 @@ public void reskin (int flags) { if ((flags & SWT.ALL) != 0) reskinChildren (flags); } -void reskinChildren (int flags) { +void reskinChildren (int flags) { } void reskinWidget() { @@ -1428,7 +1428,7 @@ boolean sendKeyEvent (int type, GdkEventKey keyEvent) { if (!setKeyState (event, keyEvent)) return true; sendEvent (type, event); // widget could be disposed at this point - + /* * It is possible (but unlikely), that application * code could have disposed the widget in the key @@ -1477,7 +1477,7 @@ char [] sendIMKeyEvent (int type, GdkEventKey keyEvent, char [] chars) { } event.character = chars [index]; sendEvent (type, event); - + /* * It is possible (but unlikely), that application * code could have disposed the widget in the key @@ -1516,9 +1516,9 @@ void sendSelectionEvent (int eventType, Event event, boolean send) { OS.memmove (gdkEvent, ptr, GdkEvent.sizeof); switch (gdkEvent.type) { case OS.GDK_KEY_PRESS: - case OS.GDK_KEY_RELEASE: + case OS.GDK_KEY_RELEASE: case OS.GDK_BUTTON_PRESS: - case OS.GDK_2BUTTON_PRESS: + case OS.GDK_2BUTTON_PRESS: case OS.GDK_BUTTON_RELEASE: { int [] state = new int [1]; OS.gdk_event_get_state (ptr, state); @@ -1535,7 +1535,7 @@ void sendSelectionEvent (int eventType, Event event, boolean send) { * Sets the application defined widget data associated * with the receiver to be the argument. The <em>widget * data</em> is a single, unnamed field that is stored - * with every widget. + * with every widget. * <p> * Applications may put arbitrary objects in this field. If * the object stored in the widget data needs to be notified @@ -1550,7 +1550,7 @@ void sendSelectionEvent (int eventType, Event event, boolean send) { * <li>ERROR_WIDGET_DISPOSED - when the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - when called from the wrong thread</li> * </ul> - * + * * @see #getData() */ public void setData (Object data) { @@ -1673,7 +1673,7 @@ void setForegroundColor (long /*int*/ handle, GdkColor color, boolean setStateAc OS.gtk_style_context_invalidate (context); return; } - + /* * Feature in GTK. When the widget doesn't have focus, then * gtk_default_draw_flat_box () changes the background color state_type @@ -1703,15 +1703,15 @@ void setForegroundColor (long /*int*/ handle, GdkColor color, boolean setStateAc flags = OS.gtk_rc_style_get_color_flags (style, OS.GTK_STATE_NORMAL); flags = (color == null) ? flags & ~OS.GTK_RC_TEXT: flags | OS.GTK_RC_TEXT; OS.gtk_rc_style_set_color_flags (style, OS.GTK_STATE_NORMAL, flags); - flags = OS.gtk_rc_style_get_color_flags (style, OS.GTK_STATE_PRELIGHT); + flags = OS.gtk_rc_style_get_color_flags (style, OS.GTK_STATE_PRELIGHT); flags = (color == null) ? flags & ~OS.GTK_RC_TEXT: flags | OS.GTK_RC_TEXT; - OS.gtk_rc_style_set_color_flags (style, OS.GTK_STATE_PRELIGHT, flags); + OS.gtk_rc_style_set_color_flags (style, OS.GTK_STATE_PRELIGHT, flags); if (setStateActive) { flags = OS.gtk_rc_style_get_color_flags (style, OS.GTK_STATE_ACTIVE); flags = (color == null) ? flags & ~OS.GTK_RC_TEXT: flags | OS.GTK_RC_TEXT; OS.gtk_rc_style_set_color_flags (style, OS.GTK_STATE_ACTIVE, flags); } - modifyStyle (handle, style); + modifyStyle (handle, style); } boolean setInputState (Event event, int state) { @@ -1932,7 +1932,7 @@ void gtk_widget_set_visible (long /*int*/ widget, boolean visible) { void gtk_widget_set_receives_default (long /*int*/ widget, boolean receives_default) { if (OS.GTK_VERSION >= OS.VERSION (2, 18, 0)) { - OS.gtk_widget_set_receives_default (widget, receives_default); + OS.gtk_widget_set_receives_default (widget, receives_default); } else { if (receives_default) { OS.GTK_WIDGET_SET_FLAGS (widget, OS.GTK_RECEIVES_DEFAULT); @@ -2063,7 +2063,7 @@ long /*int*/ windowProc (long /*int*/ handle, long /*int*/ arg0, long /*int*/ us if (OS.GTK3) { if (OS.GTK_VERSION >= OS.VERSION (3, 9, 0) && OS.GTK_IS_CONTAINER (handle)) { return gtk_draw (handle, arg0); - } + } } else { GdkEventExpose gdkEvent = new GdkEventExpose (); OS.memmove (gdkEvent, arg0, GdkEventExpose.sizeof); |