Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNiraj Modi2018-10-30 09:03:21 +0000
committerNiraj Modi2018-10-30 09:03:21 +0000
commit62d2b8df4b34008e4944c364dc84435d09cd94fe (patch)
tree8cc8aed84ce9d0d9c5dbeab8c54b73733b19e5e9
parentf9be22ea7b334e068bca91197b59df1f47f64612 (diff)
downloadeclipse.platform.swt-62d2b8df4b34008e4944c364dc84435d09cd94fe.tar.gz
eclipse.platform.swt-62d2b8df4b34008e4944c364dc84435d09cd94fe.tar.xz
eclipse.platform.swt-62d2b8df4b34008e4944c364dc84435d09cd94fe.zip
Bug 494453 Part2 - [HiDPI] Update Javadocs that talk about pixels to
points Change-Id: Idb3837811be3eefef137c6ebcd55d82e37fc1db2 Signed-off-by: Niraj Modi <niraj.modi@in.ibm.com>
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java56
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/events/GestureEvent.java10
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/FormAttachment.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/widgets/TouchSource.java8
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/emulated/expand/org/eclipse/swt/widgets/ExpandBar.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/GC.java12
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Image.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Text.java12
8 files changed, 55 insertions, 55 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java
index 0def5ac022..050b6c27af 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java
@@ -3455,7 +3455,7 @@ public Color getBackground() {
return background;
}
/**
- * Returns the baseline, in pixels.
+ * Returns the baseline, in points.
*
* Note: this API should not be used if a StyleRange attribute causes lines to
* have different heights (i.e. different fonts, rise, etc).
@@ -3474,7 +3474,7 @@ public int getBaseline() {
return renderer.getBaseline();
}
/**
- * Returns the baseline at the given offset, in pixels.
+ * Returns the baseline at the given offset, in points.
*
* @param offset the offset
*
@@ -3814,7 +3814,7 @@ public int getHorizontalIndex() {
* Returns the horizontal scroll offset relative to the start of the line.
*
* @return the horizontal scroll offset relative to the start of the line,
- * measured in pixel starting at 0, if > 0 the content is scrolled.
+ * measured in SWT logical point starting at 0, if > 0 the content is scrolled.
* @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>
@@ -4079,7 +4079,7 @@ public String getLineDelimiter() {
* have different heights (i.e. different fonts, rise, etc).
* </p>
*
- * @return line height in pixel.
+ * @return line height in points.
* @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>
@@ -4095,7 +4095,7 @@ public int getLineHeight() {
*
* @param offset the offset
*
- * @return line height in pixels
+ * @return line height in points
*
* @exception SWTException <ul>
* <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
@@ -4210,14 +4210,14 @@ StyledTextEvent getLineStyleData(int lineOffset, String line) {
return sendLineEvent(ST.LineGetStyle, lineOffset, line);
}
/**
- * Returns the top pixel, relative to the client area, of a given line.
+ * Returns the top SWT logical point, relative to the client area, of a given line.
* Clamps out of ranges index.
*
* @param lineIndex the line index, the max value is lineCount. If
- * lineIndex == lineCount it returns the bottom pixel of the last line.
- * It means this function can be used to retrieve the bottom pixel of any line.
+ * lineIndex == lineCount it returns the bottom SWT logical point of the last line.
+ * It means this function can be used to retrieve the bottom SWT logical point of any line.
*
- * @return the top pixel of a given line index
+ * @return the top SWT logical point of a given line index
*
* @since 3.2
*/
@@ -4246,9 +4246,9 @@ public int getLinePixel(int lineIndex) {
* Returns the line index for a y, relative to the client area.
* The line index returned is always in the range 0..lineCount - 1.
*
- * @param y the y-coordinate pixel
+ * @param y the y-coordinate point
*
- * @return the line index for a given y-coordinate pixel
+ * @return the line index for a given y-coordinate point
*
* @since 3.2
*/
@@ -5315,16 +5315,16 @@ public int getTopMargin() {
return topMargin;
}
/**
- * Gets the top pixel.
+ * Gets the top SWT logical point.
* <p>
- * The top pixel is the pixel position of the line that is
- * currently at the top of the widget. The text widget can be scrolled by pixels
+ * The top point is the SWT logical point position of the line that is
+ * currently at the top of the widget. The text widget can be scrolled by points
* by dragging the scroll thumb so that a partial line may be displayed at the top
- * the widget. The top pixel changes when the widget is scrolled. The top pixel
+ * the widget. The top point changes when the widget is scrolled. The top point
* does not include the widget trimming.
* </p>
*
- * @return pixel position of the top line
+ * @return SWT logical point position of the top line
* @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>
@@ -8064,7 +8064,7 @@ public void scroll(int destX, int destY, int x, int y, int width, int height, bo
/**
* Scrolls the widget horizontally.
*
- * @param pixels number of pixels to scroll, > 0 = scroll left,
+ * @param pixels number of SWT logical points to scroll, > 0 = scroll left,
* < 0 scroll right
* @param adjustScrollBar
* true= the scroll thumb will be moved to reflect the new scroll offset.
@@ -8949,14 +8949,14 @@ public void setHorizontalIndex(int offset) {
scrollHorizontal(offset - horizontalScrollOffset, true);
}
/**
- * Sets the horizontal pixel offset relative to the start of the line.
+ * Sets the horizontal SWT logical point offset relative to the start of the line.
* Do nothing if there is no text set.
* <p>
- * <b>NOTE:</b> The horizontal pixel offset is reset to 0 when new text
+ * <b>NOTE:</b> The horizontal SWT logical point offset is reset to 0 when new text
* is set in the widget.
* </p>
*
- * @param pixel horizontal pixel offset relative to the start
+ * @param pixel horizontal SWT logical point offset relative to the start
* of the line.
* @exception SWTException <ul>
* <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
@@ -8990,7 +8990,7 @@ public void setHorizontalPixel(int pixel) {
/**
* Sets the line indentation of the widget.
* <p>
- * It is the amount of blank space, in pixels, at the beginning of each line.
+ * It is the amount of blank space, in points, at the beginning of each line.
* When a line wraps in several lines only the first one is indented.
* </p>
*
@@ -10284,7 +10284,7 @@ public void setTabs(int tabs) {
/**
* Sets the receiver's tab list. Each value in the tab list specifies
- * the space in pixels from the origin of the document to the respective
+ * the space in points from the origin of the document to the respective
* tab stop. The last tab stop width is repeated continuously.
*
* @param tabs the new tab list (or null)
@@ -10482,15 +10482,15 @@ public void setTopMargin (int topMargin) {
setMargins(getLeftMargin(), topMargin, rightMargin, bottomMargin);
}
/**
- * Sets the top pixel offset. Do nothing if there is no text set.
+ * Sets the top SWT logical point offset. Do nothing if there is no text set.
* <p>
- * The top pixel offset is the vertical pixel offset of the widget. The
- * widget is scrolled so that the given pixel position is at the top.
+ * The top point offset is the vertical SWT logical point offset of the widget. The
+ * widget is scrolled so that the given SWT logical point position is at the top.
* The top index is adjusted to the corresponding top line.
- * Note: The top pixel is reset to 0 when new text is set in the widget.
+ * Note: The top point is reset to 0 when new text is set in the widget.
* </p>
*
- * @param pixel new top pixel offset. Must be between 0 and
+ * @param pixel new top point offset. Must be between 0 and
* (getLineCount() - visible lines per page) / getLineHeight()). An out
* of range offset will be adjusted accordingly.
* @exception SWTException <ul>
@@ -10549,7 +10549,7 @@ public void setWordWrap(boolean wrap) {
/**
* Sets the wrap line indentation of the widget.
* <p>
- * It is the amount of blank space, in pixels, at the beginning of each wrapped line.
+ * It is the amount of blank space, in points, at the beginning of each wrapped line.
* When a line wraps in several lines all the lines but the first one is indented
* by this amount.
* </p>
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/events/GestureEvent.java b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/events/GestureEvent.java
index 5a93dc0c34..d644324f9b 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/events/GestureEvent.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/events/GestureEvent.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 IBM Corporation and others.
+ * Copyright (c) 2010, 2018 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -84,8 +84,8 @@ public class GestureEvent extends TypedEvent {
* to the right and a negative value indicates a swipe to the left.
*
* If <code>detail</code> is <code>GESTURE_PAN</code> then a positive value indicates a pan to
- * the right by this field's count of pixels and a negative value indicates a pan to the left
- * by this field's count of pixels.
+ * the right by this field's count of points and a negative value indicates a pan to the left
+ * by this field's count of points.
*/
public int xDirection;
@@ -99,8 +99,8 @@ public class GestureEvent extends TypedEvent {
* swipe and a negative value indicates an upward swipe.
*
* If <code>detail</code> is <code>GESTURE_PAN</code> then a positive value indicates a downward
- * pan by this field's count of pixels and a negative value indicates an upward pan by this
- * field's count of pixels.
+ * pan by this field's count of points and a negative value indicates an upward pan by this
+ * field's count of points.
*/
public int yDirection;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/FormAttachment.java b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/FormAttachment.java
index f3a9a079f9..36f8ad2a5e 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/FormAttachment.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/FormAttachment.java
@@ -39,12 +39,12 @@ import org.eclipse.swt.widgets.*;
* (from the top). It can be defined using a numerator and denominator,
* or just a percentage value. If a percentage is used, the denominator
* is set to 100. The "b" term in the equation represents an offset, in
- * pixels, from the attachment position. For example:
+ * points, from the attachment position. For example:
* <pre>
* FormAttachment attach = new FormAttachment (20, -5);
* </pre>
* specifies that the side to which the <code>FormAttachment</code>
- * object belongs will lie at 20% of the parent composite, minus 5 pixels.
+ * object belongs will lie at 20% of the parent composite, minus 5 points.
* </p>
* <p>
* Control sides can also be attached to another control.
@@ -54,7 +54,7 @@ import org.eclipse.swt.widgets.*;
* </pre>
* specifies that the side to which the <code>FormAttachment</code>
* object belongs will lie in the same position as the adjacent side of
- * the <code>button</code> control, plus 10 pixels. The control side can
+ * the <code>button</code> control, plus 10 points. The control side can
* also be attached to the opposite side of the specified control.
* For example:
* <pre>
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/widgets/TouchSource.java b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/widgets/TouchSource.java
index 3081abeab9..21b945e854 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/widgets/TouchSource.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/widgets/TouchSource.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2012 IBM Corporation and others.
+ * Copyright (c) 2010, 2018 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -49,8 +49,8 @@ public final class TouchSource {
* Constructs a new touch source from the given inputs.
*
* @param direct Is the touch source direct or indirect?
- * @param height height of the source in pixels.
- * @param width width of the source in pixels.
+ * @param height height of the source in points.
+ * @param width width of the source in points.
*/
TouchSource (long /*int*/ handle, boolean direct, Rectangle bounds) {
this.handle = handle;
@@ -69,7 +69,7 @@ public boolean isDirect () {
/**
* Returns the bounding rectangle of the device. For a direct source, this corresponds to the bounds of
- * the display device in pixels. For an indirect source, this contains the size of the device in pixels.
+ * the display device in pixels. For an indirect source, this contains the size of the device in points.
* <p>
* Note that the x and y values may not necessarily be 0 if the TouchSource is a direct source.
*
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/emulated/expand/org/eclipse/swt/widgets/ExpandBar.java b/bundles/org.eclipse.swt/Eclipse SWT/emulated/expand/org/eclipse/swt/widgets/ExpandBar.java
index d9459d0eef..08aae3a189 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/emulated/expand/org/eclipse/swt/widgets/ExpandBar.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/emulated/expand/org/eclipse/swt/widgets/ExpandBar.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2016 IBM Corporation and others.
+ * Copyright (c) 2000, 2018 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -427,7 +427,7 @@ 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 points allocated around
* each item.
*
* @param spacing the spacing around each item
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/GC.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/GC.java
index b09346f9f6..089f7b36de 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/GC.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/GC.java
@@ -690,8 +690,8 @@ void disposeGdip() {
* 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.
+ * The resulting arc covers an area <code>width + 1</code> points wide
+ * by <code>height + 1</code> points tall.
* </p>
*
* @param x the x coordinate of the upper-left corner of the arc to be drawn
@@ -1660,7 +1660,7 @@ void drawLineInPixels (int x1, int y1, int x2, int y2) {
* <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.
+ * points wide and <code>height + 1</code> points tall.
* </p>
*
* @param x the x coordinate of the upper left corner of the oval to be drawn
@@ -1732,7 +1732,7 @@ public void drawPath (Path path) {
}
/**
- * Draws a pixel, using the foreground color, at the specified
+ * Draws an SWT logical point, using the foreground color, at the specified
* point (<code>x</code>, <code>y</code>).
* <p>
* Note that the receiver's line attributes do not affect this
@@ -2617,8 +2617,8 @@ public boolean equals (Object object) {
* 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.
+ * The resulting arc covers an area <code>width + 1</code> points wide
+ * by <code>height + 1</code> points tall.
* </p>
*
* @param x the x coordinate of the upper-left corner of the arc to be filled
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Image.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Image.java
index 0696b67a9f..6faf7184a5 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Image.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Image.java
@@ -1355,7 +1355,7 @@ public ImageData getImageData() {
*
* @param zoom
* The zoom level in % of the standard resolution (which is 1
- * physical monitor pixel == 1 SWT logical pixel). Typically 100,
+ * physical monitor pixel == 1 SWT logical point). Typically 100,
* 150, or 200.
* @return an <code>ImageData</code> containing the image's data and
* attributes at the given zoom level
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Text.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Text.java
index 2d642ea862..6b1cffd8fb 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Text.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Text.java
@@ -1443,19 +1443,19 @@ public int getTopIndex () {
}
/**
- * Returns the top pixel.
+ * Returns the top SWT logical point.
* <p>
- * The top pixel is the pixel position of the line
+ * The top point is the SWT logical point position of the line
* that is currently at the top of the widget. On
* some platforms, a text widget can be scrolled by
- * pixels instead of lines so that a partial line
+ * points instead of lines so that a partial line
* is displayed at the top of the widget.
* </p><p>
- * The top pixel changes when the widget is scrolled.
- * The top pixel does not include the widget trimming.
+ * The top SWT logical point changes when the widget is scrolled.
+ * The top SWT logical point does not include the widget trimming.
* </p>
*
- * @return the pixel position of the top line
+ * @return the SWT logical point position of the top line
*
* @exception SWTException <ul>
* <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>

Back to the top