Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Pazderski2019-05-18 11:43:55 +0000
committerPaul Pazderski2019-05-19 13:23:41 +0000
commit15e8030feaca590954db1954c4d5f1f21d7d14db (patch)
tree7303f0b232b8fec0fe16f75eb9bfb17f73674f82 /bundles/org.eclipse.swt
parent3813245f0c061a9e05c57a0703282ea3394e84c4 (diff)
downloadeclipse.platform.swt-15e8030feaca590954db1954c4d5f1f21d7d14db.tar.gz
eclipse.platform.swt-15e8030feaca590954db1954c4d5f1f21d7d14db.tar.xz
eclipse.platform.swt-15e8030feaca590954db1954c4d5f1f21d7d14db.zip
Bug 547304 - [cleanup] Fix wrong line delimiters
This updates all Java files with wrong or mixed line delimiters to use Unix style delimiters. The change includes only whitespace formatting and no code changes. Change-Id: I4cf29fcedaaa5ee7efc0fb68e6b22aecb17812ce
Diffstat (limited to 'bundles/org.eclipse.swt')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/MouseNavigator.java588
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledTextLineSpacingProvider.java68
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/com/win32/FileDialogVtbl.java86
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/com/win32/ShellItemVtbl.java48
4 files changed, 395 insertions, 395 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/MouseNavigator.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/MouseNavigator.java
index 784b942612..1857d0f043 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/MouseNavigator.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/MouseNavigator.java
@@ -1,294 +1,294 @@
-/**
- * Copyright (c) 2019 Laurent CARON.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * Laurent CARON (laurent.caron at gmail dot com) - initial API and implementation (bug 542777)
- */
-package org.eclipse.swt.custom;
-
-import org.eclipse.swt.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.widgets.*;
-
-/**
- * This class add the following behaviour to <code>StyledText</code> widgets:<br/>
- * When the user clicks on the wheel, a circle with arrows appears. When the user moves the mouse,
- * the StyledText content is scrolled (on the right or on the left for horizontal movements, up or down for vertical movements).<br/>
- *
- * @since 3.110
- */
-class MouseNavigator {
- private final StyledText parent;
- boolean navigationActivated = false;
- private GC gc;
- private static final int CIRCLE_RADIUS = 15;
- private static final int CENTRAL_POINT_RADIUS = 2;
- private Point originalMouseLocation;
- private final Listener mouseDownListener, mouseUpListener, paintListener, mouseMoveListener, focusOutListener;
- private boolean hasHBar, hasVBar;
- private Cursor previousCursor;
-
- MouseNavigator(final StyledText styledText) {
- if (styledText == null) {
- SWT.error(SWT.ERROR_NULL_ARGUMENT);
- }
- if (styledText.isDisposed()) {
- SWT.error(SWT.ERROR_WIDGET_DISPOSED);
- }
- parent = styledText;
-
- mouseDownListener = (event) -> {
- onMouseDown(event);
- };
- parent.addListener(SWT.MouseDown, mouseDownListener);
-
- mouseUpListener = (event) -> {
- onMouseUp(event);
- };
- parent.addListener(SWT.MouseUp, mouseUpListener);
-
- paintListener = (event) -> {
- onPaint(event);
- };
- parent.addListener(SWT.Paint, paintListener);
-
- mouseMoveListener = (event) -> {
- onMouseMove(event);
- };
- parent.addListener(SWT.MouseMove, mouseMoveListener);
-
- focusOutListener = (event) -> {
- onFocusOut(event);
- };
- parent.addListener(SWT.FocusOut, focusOutListener);
- }
-
- void onMouseDown(Event e) {
- if ((e.button != 2) || navigationActivated) {
- return;
- }
-
- if (!parent.isVisible() || !parent.getEnabled() || parent.middleClickPressed) {
- return;
- }
-
- // Widget has no bar or bars are not enabled
- initBarState();
-
- if (!hasHBar && !hasVBar) {
- return;
- }
-
- navigationActivated = true;
- previousCursor = parent.getCursor();
- parent.setCursor(parent.getDisplay().getSystemCursor(SWT.CURSOR_ARROW));
- originalMouseLocation = getMouseLocation();
- parent.redraw();
- }
-
- private void initBarState() {
- hasHBar = computeHasHorizontalBar();
- hasVBar = computeHasVerticalBar();
- }
-
- private boolean computeHasHorizontalBar() {
- final ScrollBar horizontalBar = parent.getHorizontalBar();
- final boolean hasHorizontalBar = horizontalBar != null && horizontalBar.isVisible();
- final boolean exceedHorizontalSpace = parent.computeSize(SWT.DEFAULT, SWT.DEFAULT).x > parent.getSize().x;
- return hasHorizontalBar && exceedHorizontalSpace;
- }
-
- private boolean computeHasVerticalBar() {
- final ScrollBar verticalBar = parent.getVerticalBar();
- final boolean hasVerticalBar = verticalBar != null && verticalBar.isEnabled();
- final boolean exceedVerticalSpace = parent.computeSize(SWT.DEFAULT, SWT.DEFAULT).y > parent.getSize().y;
- return hasVerticalBar && exceedVerticalSpace;
- }
-
- private void onMouseUp(Event e) {
- if ((computeDist() < CIRCLE_RADIUS) && (computeDist() >= 0)) {
- return;
- }
- deactivate();
- }
-
- public int computeDist() {
- if (originalMouseLocation == null) {
- return -1;
- }
- final Point mouseLocation = getMouseLocation();
- final int deltaX = originalMouseLocation.x - mouseLocation.x;
- final int deltaY = originalMouseLocation.y - mouseLocation.y;
- final int dist = (int) Math.sqrt(deltaX * deltaX + deltaY * deltaY);
- return dist;
- }
-
- private void deactivate() {
- parent.setCursor(previousCursor);
- navigationActivated = false;
- originalMouseLocation = null;
- parent.redraw();
- }
-
- private void onFocusOut(Event e) {
- deactivate();
- }
-
- private void onMouseMove(Event e) {
- if (!navigationActivated) {
- return;
- }
-
- final Point mouseLocation = getMouseLocation();
- final int deltaX = originalMouseLocation.x - mouseLocation.x;
- final int deltaY = originalMouseLocation.y - mouseLocation.y;
- final int dist = (int) Math.sqrt(deltaX * deltaX + deltaY * deltaY);
- if (dist < CIRCLE_RADIUS) {
- return;
- }
-
- parent.setRedraw(false);
- if (hasHBar) {
- final ScrollBar bar = parent.getHorizontalBar();
- bar.setSelection((int) (bar.getSelection() - deltaX * .1));
- fireSelectionEvent(e, bar);
- }
-
- if (hasVBar) {
- final ScrollBar bar = parent.getVerticalBar();
- bar.setSelection((int) (bar.getSelection() - deltaY * .1));
- fireSelectionEvent(e, bar);
- }
- parent.setRedraw(true);
- parent.redraw();
- }
-
- private void fireSelectionEvent(final Event e, final ScrollBar bar) {
- final Event event = new Event();
- event.widget = bar;
- event.display = parent.getDisplay();
- event.type = SWT.Selection;
- event.time = e.time;
-
- for (final Listener selectionListener : bar.getListeners(SWT.Selection)) {
- selectionListener.handleEvent(event);
- }
- }
-
- private Point getMouseLocation() {
- final Point cursorLocation = Display.getCurrent().getCursorLocation();
- final Point relativeCursorLocation = parent.toControl(cursorLocation);
- return relativeCursorLocation;
- }
-
- private void onPaint(final Event e) {
- if (!navigationActivated) {
- return;
- }
-
- final Rectangle rect = parent.getClientArea();
- if (rect.width == 0 || rect.height == 0) {
- return;
- }
- gc = e.gc;
- gc.setAntialias(SWT.ON);
- gc.setAdvanced(true);
-
- final Color oldForegroundColor = gc.getForeground();
- final Color oldBackgroundColor = gc.getBackground();
- gc.setBackground(parent.getForeground());
-
- drawCircle();
- drawCentralPoint();
-
- drawArrows();
-
- gc.setForeground(oldForegroundColor);
- gc.setBackground(oldBackgroundColor);
- }
-
- private void drawCircle() {
- gc.setBackground(parent.getBackground());
- gc.setForeground(parent.getForeground());
- gc.setAlpha(200);
- gc.fillOval(originalMouseLocation.x - CIRCLE_RADIUS, originalMouseLocation.y - CIRCLE_RADIUS, CIRCLE_RADIUS * 2, CIRCLE_RADIUS * 2);
- gc.setBackground(parent.getForeground());
- gc.setAlpha(255);
- gc.drawOval(originalMouseLocation.x - CIRCLE_RADIUS, originalMouseLocation.y - CIRCLE_RADIUS, CIRCLE_RADIUS * 2, CIRCLE_RADIUS * 2);
- }
-
- private void drawCentralPoint() {
- gc.fillOval(originalMouseLocation.x - CENTRAL_POINT_RADIUS, originalMouseLocation.y - CENTRAL_POINT_RADIUS, CENTRAL_POINT_RADIUS * 2, CENTRAL_POINT_RADIUS * 2);
- }
-
- private void drawArrows() {
- gc.setLineWidth(2);
- if (hasHBar) {
- drawHorizontalArrows();
- }
- if (hasVBar) {
- drawVerticalArrows();
- }
- }
-
- private void drawHorizontalArrows() {
- final int[] points = new int[6];
- // Left
- points[0] = originalMouseLocation.x - 6;
- points[1] = originalMouseLocation.y + 3;
- points[2] = originalMouseLocation.x - 9;
- points[3] = originalMouseLocation.y;
- points[4] = originalMouseLocation.x - 6;
- points[5] = originalMouseLocation.y - 3;
- gc.drawPolyline(points);
-
- // Right
- points[0] = originalMouseLocation.x + 7;
- points[1] = originalMouseLocation.y + 3;
- points[2] = originalMouseLocation.x + 10;
- points[3] = originalMouseLocation.y;
- points[4] = originalMouseLocation.x + 7;
- points[5] = originalMouseLocation.y - 3;
- gc.drawPolyline(points);
- }
-
- private void drawVerticalArrows() {
- final int[] points = new int[6];
- // Upper
- points[0] = originalMouseLocation.x - 3;
- points[1] = originalMouseLocation.y - 6;
- points[2] = originalMouseLocation.x;
- points[3] = originalMouseLocation.y - 10;
- points[4] = originalMouseLocation.x + 3;
- points[5] = originalMouseLocation.y - 6;
- gc.drawPolyline(points);
-
- // Lower
- points[0] = originalMouseLocation.x - 3;
- points[1] = originalMouseLocation.y + 7;
- points[2] = originalMouseLocation.x;
- points[3] = originalMouseLocation.y + 11;
- points[4] = originalMouseLocation.x + 3;
- points[5] = originalMouseLocation.y + 7;
- gc.drawPolyline(points);
-
- }
-
- void dispose() {
- if (parent.isDisposed()) {
- return;
- }
- parent.removeListener(SWT.MouseDown, mouseDownListener);
- parent.removeListener(SWT.MouseUp, mouseUpListener);
- parent.removeListener(SWT.Paint, paintListener);
- parent.removeListener(SWT.MouseMove, mouseMoveListener);
- parent.removeListener(SWT.MouseExit, focusOutListener);
- }
-}
+/**
+ * Copyright (c) 2019 Laurent CARON.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Laurent CARON (laurent.caron at gmail dot com) - initial API and implementation (bug 542777)
+ */
+package org.eclipse.swt.custom;
+
+import org.eclipse.swt.*;
+import org.eclipse.swt.graphics.*;
+import org.eclipse.swt.widgets.*;
+
+/**
+ * This class add the following behaviour to <code>StyledText</code> widgets:<br/>
+ * When the user clicks on the wheel, a circle with arrows appears. When the user moves the mouse,
+ * the StyledText content is scrolled (on the right or on the left for horizontal movements, up or down for vertical movements).<br/>
+ *
+ * @since 3.110
+ */
+class MouseNavigator {
+ private final StyledText parent;
+ boolean navigationActivated = false;
+ private GC gc;
+ private static final int CIRCLE_RADIUS = 15;
+ private static final int CENTRAL_POINT_RADIUS = 2;
+ private Point originalMouseLocation;
+ private final Listener mouseDownListener, mouseUpListener, paintListener, mouseMoveListener, focusOutListener;
+ private boolean hasHBar, hasVBar;
+ private Cursor previousCursor;
+
+ MouseNavigator(final StyledText styledText) {
+ if (styledText == null) {
+ SWT.error(SWT.ERROR_NULL_ARGUMENT);
+ }
+ if (styledText.isDisposed()) {
+ SWT.error(SWT.ERROR_WIDGET_DISPOSED);
+ }
+ parent = styledText;
+
+ mouseDownListener = (event) -> {
+ onMouseDown(event);
+ };
+ parent.addListener(SWT.MouseDown, mouseDownListener);
+
+ mouseUpListener = (event) -> {
+ onMouseUp(event);
+ };
+ parent.addListener(SWT.MouseUp, mouseUpListener);
+
+ paintListener = (event) -> {
+ onPaint(event);
+ };
+ parent.addListener(SWT.Paint, paintListener);
+
+ mouseMoveListener = (event) -> {
+ onMouseMove(event);
+ };
+ parent.addListener(SWT.MouseMove, mouseMoveListener);
+
+ focusOutListener = (event) -> {
+ onFocusOut(event);
+ };
+ parent.addListener(SWT.FocusOut, focusOutListener);
+ }
+
+ void onMouseDown(Event e) {
+ if ((e.button != 2) || navigationActivated) {
+ return;
+ }
+
+ if (!parent.isVisible() || !parent.getEnabled() || parent.middleClickPressed) {
+ return;
+ }
+
+ // Widget has no bar or bars are not enabled
+ initBarState();
+
+ if (!hasHBar && !hasVBar) {
+ return;
+ }
+
+ navigationActivated = true;
+ previousCursor = parent.getCursor();
+ parent.setCursor(parent.getDisplay().getSystemCursor(SWT.CURSOR_ARROW));
+ originalMouseLocation = getMouseLocation();
+ parent.redraw();
+ }
+
+ private void initBarState() {
+ hasHBar = computeHasHorizontalBar();
+ hasVBar = computeHasVerticalBar();
+ }
+
+ private boolean computeHasHorizontalBar() {
+ final ScrollBar horizontalBar = parent.getHorizontalBar();
+ final boolean hasHorizontalBar = horizontalBar != null && horizontalBar.isVisible();
+ final boolean exceedHorizontalSpace = parent.computeSize(SWT.DEFAULT, SWT.DEFAULT).x > parent.getSize().x;
+ return hasHorizontalBar && exceedHorizontalSpace;
+ }
+
+ private boolean computeHasVerticalBar() {
+ final ScrollBar verticalBar = parent.getVerticalBar();
+ final boolean hasVerticalBar = verticalBar != null && verticalBar.isEnabled();
+ final boolean exceedVerticalSpace = parent.computeSize(SWT.DEFAULT, SWT.DEFAULT).y > parent.getSize().y;
+ return hasVerticalBar && exceedVerticalSpace;
+ }
+
+ private void onMouseUp(Event e) {
+ if ((computeDist() < CIRCLE_RADIUS) && (computeDist() >= 0)) {
+ return;
+ }
+ deactivate();
+ }
+
+ public int computeDist() {
+ if (originalMouseLocation == null) {
+ return -1;
+ }
+ final Point mouseLocation = getMouseLocation();
+ final int deltaX = originalMouseLocation.x - mouseLocation.x;
+ final int deltaY = originalMouseLocation.y - mouseLocation.y;
+ final int dist = (int) Math.sqrt(deltaX * deltaX + deltaY * deltaY);
+ return dist;
+ }
+
+ private void deactivate() {
+ parent.setCursor(previousCursor);
+ navigationActivated = false;
+ originalMouseLocation = null;
+ parent.redraw();
+ }
+
+ private void onFocusOut(Event e) {
+ deactivate();
+ }
+
+ private void onMouseMove(Event e) {
+ if (!navigationActivated) {
+ return;
+ }
+
+ final Point mouseLocation = getMouseLocation();
+ final int deltaX = originalMouseLocation.x - mouseLocation.x;
+ final int deltaY = originalMouseLocation.y - mouseLocation.y;
+ final int dist = (int) Math.sqrt(deltaX * deltaX + deltaY * deltaY);
+ if (dist < CIRCLE_RADIUS) {
+ return;
+ }
+
+ parent.setRedraw(false);
+ if (hasHBar) {
+ final ScrollBar bar = parent.getHorizontalBar();
+ bar.setSelection((int) (bar.getSelection() - deltaX * .1));
+ fireSelectionEvent(e, bar);
+ }
+
+ if (hasVBar) {
+ final ScrollBar bar = parent.getVerticalBar();
+ bar.setSelection((int) (bar.getSelection() - deltaY * .1));
+ fireSelectionEvent(e, bar);
+ }
+ parent.setRedraw(true);
+ parent.redraw();
+ }
+
+ private void fireSelectionEvent(final Event e, final ScrollBar bar) {
+ final Event event = new Event();
+ event.widget = bar;
+ event.display = parent.getDisplay();
+ event.type = SWT.Selection;
+ event.time = e.time;
+
+ for (final Listener selectionListener : bar.getListeners(SWT.Selection)) {
+ selectionListener.handleEvent(event);
+ }
+ }
+
+ private Point getMouseLocation() {
+ final Point cursorLocation = Display.getCurrent().getCursorLocation();
+ final Point relativeCursorLocation = parent.toControl(cursorLocation);
+ return relativeCursorLocation;
+ }
+
+ private void onPaint(final Event e) {
+ if (!navigationActivated) {
+ return;
+ }
+
+ final Rectangle rect = parent.getClientArea();
+ if (rect.width == 0 || rect.height == 0) {
+ return;
+ }
+ gc = e.gc;
+ gc.setAntialias(SWT.ON);
+ gc.setAdvanced(true);
+
+ final Color oldForegroundColor = gc.getForeground();
+ final Color oldBackgroundColor = gc.getBackground();
+ gc.setBackground(parent.getForeground());
+
+ drawCircle();
+ drawCentralPoint();
+
+ drawArrows();
+
+ gc.setForeground(oldForegroundColor);
+ gc.setBackground(oldBackgroundColor);
+ }
+
+ private void drawCircle() {
+ gc.setBackground(parent.getBackground());
+ gc.setForeground(parent.getForeground());
+ gc.setAlpha(200);
+ gc.fillOval(originalMouseLocation.x - CIRCLE_RADIUS, originalMouseLocation.y - CIRCLE_RADIUS, CIRCLE_RADIUS * 2, CIRCLE_RADIUS * 2);
+ gc.setBackground(parent.getForeground());
+ gc.setAlpha(255);
+ gc.drawOval(originalMouseLocation.x - CIRCLE_RADIUS, originalMouseLocation.y - CIRCLE_RADIUS, CIRCLE_RADIUS * 2, CIRCLE_RADIUS * 2);
+ }
+
+ private void drawCentralPoint() {
+ gc.fillOval(originalMouseLocation.x - CENTRAL_POINT_RADIUS, originalMouseLocation.y - CENTRAL_POINT_RADIUS, CENTRAL_POINT_RADIUS * 2, CENTRAL_POINT_RADIUS * 2);
+ }
+
+ private void drawArrows() {
+ gc.setLineWidth(2);
+ if (hasHBar) {
+ drawHorizontalArrows();
+ }
+ if (hasVBar) {
+ drawVerticalArrows();
+ }
+ }
+
+ private void drawHorizontalArrows() {
+ final int[] points = new int[6];
+ // Left
+ points[0] = originalMouseLocation.x - 6;
+ points[1] = originalMouseLocation.y + 3;
+ points[2] = originalMouseLocation.x - 9;
+ points[3] = originalMouseLocation.y;
+ points[4] = originalMouseLocation.x - 6;
+ points[5] = originalMouseLocation.y - 3;
+ gc.drawPolyline(points);
+
+ // Right
+ points[0] = originalMouseLocation.x + 7;
+ points[1] = originalMouseLocation.y + 3;
+ points[2] = originalMouseLocation.x + 10;
+ points[3] = originalMouseLocation.y;
+ points[4] = originalMouseLocation.x + 7;
+ points[5] = originalMouseLocation.y - 3;
+ gc.drawPolyline(points);
+ }
+
+ private void drawVerticalArrows() {
+ final int[] points = new int[6];
+ // Upper
+ points[0] = originalMouseLocation.x - 3;
+ points[1] = originalMouseLocation.y - 6;
+ points[2] = originalMouseLocation.x;
+ points[3] = originalMouseLocation.y - 10;
+ points[4] = originalMouseLocation.x + 3;
+ points[5] = originalMouseLocation.y - 6;
+ gc.drawPolyline(points);
+
+ // Lower
+ points[0] = originalMouseLocation.x - 3;
+ points[1] = originalMouseLocation.y + 7;
+ points[2] = originalMouseLocation.x;
+ points[3] = originalMouseLocation.y + 11;
+ points[4] = originalMouseLocation.x + 3;
+ points[5] = originalMouseLocation.y + 7;
+ gc.drawPolyline(points);
+
+ }
+
+ void dispose() {
+ if (parent.isDisposed()) {
+ return;
+ }
+ parent.removeListener(SWT.MouseDown, mouseDownListener);
+ parent.removeListener(SWT.MouseUp, mouseUpListener);
+ parent.removeListener(SWT.Paint, paintListener);
+ parent.removeListener(SWT.MouseMove, mouseMoveListener);
+ parent.removeListener(SWT.MouseExit, focusOutListener);
+ }
+}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledTextLineSpacingProvider.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledTextLineSpacingProvider.java
index 8d0474677b..430a77d6b4 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledTextLineSpacingProvider.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledTextLineSpacingProvider.java
@@ -1,37 +1,37 @@
-/**
- * Copyright (c) 2017 Angelo ZERR.
+/**
+ * Copyright (c) 2017 Angelo ZERR.
*
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * Angelo Zerr <angelo.zerr@gmail.com> - Customize different line spacing of StyledText - Bug 522020
- */
-package org.eclipse.swt.custom;
-
-/**
- * Line spacing provider used to customize different line spacing for some lines
- * of {@link StyledText}
- *
- * @since 3.107
- */
-@FunctionalInterface
-public interface StyledTextLineSpacingProvider {
-
- /**
- * Returns the line spacing of the given line index and null otherwise. In this
- * case, it will use the {@link StyledText#getLineSpacing()}.
- *
- * @param lineIndex
- * line index.
- * @return the line spacing of the given line index and null otherwise. In this
- * case, it will use the {@link StyledText#getLineSpacing()}.
- * @since 3.107
- */
- Integer getLineSpacing(int lineIndex);
-
-}
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Angelo Zerr <angelo.zerr@gmail.com> - Customize different line spacing of StyledText - Bug 522020
+ */
+package org.eclipse.swt.custom;
+
+/**
+ * Line spacing provider used to customize different line spacing for some lines
+ * of {@link StyledText}
+ *
+ * @since 3.107
+ */
+@FunctionalInterface
+public interface StyledTextLineSpacingProvider {
+
+ /**
+ * Returns the line spacing of the given line index and null otherwise. In this
+ * case, it will use the {@link StyledText#getLineSpacing()}.
+ *
+ * @param lineIndex
+ * line index.
+ * @return the line spacing of the given line index and null otherwise. In this
+ * case, it will use the {@link StyledText#getLineSpacing()}.
+ * @since 3.107
+ */
+ Integer getLineSpacing(int lineIndex);
+
+}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/com/win32/FileDialogVtbl.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/com/win32/FileDialogVtbl.java
index a9f8bdf8e2..bc69d3574d 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/com/win32/FileDialogVtbl.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/com/win32/FileDialogVtbl.java
@@ -1,47 +1,47 @@
-/*******************************************************************************
- * Copyright (c) 2017 Martin Karpisek and others.
+/*******************************************************************************
+ * Copyright (c) 2017 Martin Karpisek and others.
*
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * Martin Karpisek <martin.karpisek@gmail.com> - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.internal.com.win32;
-
-/**
- * Function number constants for IFileDialog COM interface
- */
-public class FileDialogVtbl{
- public static final int QUERY_INTERFACE = 0;
- public static final int ADD_REF = 1;
- public static final int RELEASE = 2;
- public static final int SHOW = 3;
- public static final int SET_FILE_TYPES = 4;
- public static final int SET_FILE_TYPE_INDEX = 5;
- public static final int GET_FILE_TYPE_INDEX = 6;
- public static final int ADVISE = 7;
- public static final int UNADVISE = 8;
- public static final int SET_OPTIONS = 9;
- public static final int GET_OPTIONS = 10;
- public static final int SET_DEFAULT_FOLDER = 11;
- public static final int SET_FOLDER = 12;
- public static final int GET_FOLDER = 13;
- public static final int GET_CURRENT_SELECTION = 14;
- public static final int SET_FILE_NAME = 15;
- public static final int GET_FILE_NAME = 16;
- public static final int SET_TITLE = 17;
- public static final int SET_OK_BUTTON_LABEL = 18;
- public static final int SET_FILE_NAME_LABEL = 19;
- public static final int GET_RESULT = 20;
- public static final int ADD_PLACE = 21;
- public static final int SET_DEFAULT_EXTENSION = 22;
- public static final int CLOSE = 23;
- public static final int SET_CLIENT_GUID = 24;
- public static final int CLEAR_CLIENT_DATA = 25;
- public static final int SET_FILTER = 26;
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Martin Karpisek <martin.karpisek@gmail.com> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt.internal.com.win32;
+
+/**
+ * Function number constants for IFileDialog COM interface
+ */
+public class FileDialogVtbl{
+ public static final int QUERY_INTERFACE = 0;
+ public static final int ADD_REF = 1;
+ public static final int RELEASE = 2;
+ public static final int SHOW = 3;
+ public static final int SET_FILE_TYPES = 4;
+ public static final int SET_FILE_TYPE_INDEX = 5;
+ public static final int GET_FILE_TYPE_INDEX = 6;
+ public static final int ADVISE = 7;
+ public static final int UNADVISE = 8;
+ public static final int SET_OPTIONS = 9;
+ public static final int GET_OPTIONS = 10;
+ public static final int SET_DEFAULT_FOLDER = 11;
+ public static final int SET_FOLDER = 12;
+ public static final int GET_FOLDER = 13;
+ public static final int GET_CURRENT_SELECTION = 14;
+ public static final int SET_FILE_NAME = 15;
+ public static final int GET_FILE_NAME = 16;
+ public static final int SET_TITLE = 17;
+ public static final int SET_OK_BUTTON_LABEL = 18;
+ public static final int SET_FILE_NAME_LABEL = 19;
+ public static final int GET_RESULT = 20;
+ public static final int ADD_PLACE = 21;
+ public static final int SET_DEFAULT_EXTENSION = 22;
+ public static final int CLOSE = 23;
+ public static final int SET_CLIENT_GUID = 24;
+ public static final int CLEAR_CLIENT_DATA = 25;
+ public static final int SET_FILTER = 26;
} \ No newline at end of file
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/com/win32/ShellItemVtbl.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/com/win32/ShellItemVtbl.java
index 4ab2c96ef5..44d16a2605 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/com/win32/ShellItemVtbl.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/com/win32/ShellItemVtbl.java
@@ -1,28 +1,28 @@
-/*******************************************************************************
- * Copyright (c) 2017 Martin Karpisek and others.
+/*******************************************************************************
+ * Copyright (c) 2017 Martin Karpisek and others.
*
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * Martin Karpisek <martin.karpisek@gmail.com> - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.internal.com.win32;
-
-/**
- * Function number constants for IShellItem COM interface
- */
-public class ShellItemVtbl{
- public static final int QUERY_INTERFACE = 0;
- public static final int ADD_REF = 1;
- public static final int RELEASE = 2;
- public static final int BIND_TO_HANDLER = 3;
- public static final int GET_PARENT = 4;
- public static final int GET_DISPLAY_NAME = 5;
- public static final int GET_ATTRIBUTES = 6;
- public static final int COMPARE = 7;
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Martin Karpisek <martin.karpisek@gmail.com> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.swt.internal.com.win32;
+
+/**
+ * Function number constants for IShellItem COM interface
+ */
+public class ShellItemVtbl{
+ public static final int QUERY_INTERFACE = 0;
+ public static final int ADD_REF = 1;
+ public static final int RELEASE = 2;
+ public static final int BIND_TO_HANDLER = 3;
+ public static final int GET_PARENT = 4;
+ public static final int GET_DISPLAY_NAME = 5;
+ public static final int GET_ATTRIBUTES = 6;
+ public static final int COMPARE = 7;
} \ No newline at end of file

Back to the top