diff options
12 files changed, 464 insertions, 76 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/GC.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/GC.java index e6f3c6ea4d..44195d82f7 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/GC.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/GC.java @@ -91,7 +91,7 @@ GC() { * into another graphics context</li> * </ul> * @exception SWTError <ul> - * <li>ERROR_NO_HANDLES if a handle could not be obtained for gc creation</li> + * <li>ERROR_NO_HANDLES if a handle could not be obtained for GC creation</li> * </ul> */ public GC(Drawable drawable) { @@ -119,7 +119,7 @@ public GC(Drawable drawable) { * into another graphics context</li> * </ul> * @exception SWTError <ul> - * <li>ERROR_NO_HANDLES if a handle could not be obtained for gc creation</li> + * <li>ERROR_NO_HANDLES if a handle could not be obtained for GC creation</li> * </ul> * * @since 2.1.2 @@ -1932,6 +1932,26 @@ public Pattern getForegroundPattern() { return data.foregroundPattern; } +/** + * Returns the GCData. + * <p> + * <b>IMPORTANT:</b> This method is <em>not</em> part of the public + * API for <code>GC</code>. It is marked public only so that it + * can be shared within the packages provided by SWT. It is not + * available on all platforms, and should never be called from + * application code. + * </p> + * + * @return the receiver's GCData + * + * @exception SWTException <ul> + * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> + * </ul> + * + * @see GCData + * + * @since 3.2 + */ public GCData getGCData() { if (handle == 0) SWT.error(SWT.ERROR_WIDGET_DISPOSED); return data; diff --git a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/Image.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/Image.java index b227d34d13..c9e66f3b8f 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/Image.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/Image.java @@ -67,6 +67,12 @@ public final class Image extends Resource implements Drawable { /** * specifies whether the receiver is a bitmap or an icon * (one of <code>SWT.BITMAP</code>, <code>SWT.ICON</code>) + * <p> + * <b>IMPORTANT:</b> This field is <em>not</em> part of the SWT + * public API. It is marked public only so that it can be shared + * within the packages provided by SWT. It is not available on all + * platforms and should never be accessed from application code. + * </p> */ public int type; @@ -192,9 +198,8 @@ public Image(Device device, int width, int height) { * <li>ERROR_INVALID_ARGUMENT - if the image has been disposed</li> * </ul> * @exception SWTException <ul> - * <li>ERROR_INVALID_IMAGE - if the image is not a bitmap or an icon, or - * is otherwise in an invalid state</li> - * <li>ERROR_UNSUPPORTED_DEPTH - if the depth of the Image is not supported</li> + * <li>ERROR_INVALID_IMAGE - if the image is not a bitmap or an icon, or is otherwise in an invalid state</li> + * <li>ERROR_UNSUPPORTED_DEPTH - if the depth of the image is not supported</li> * </ul> * @exception SWTError <ul> * <li>ERROR_NO_HANDLES if a handle could not be obtained for image creation</li> @@ -449,11 +454,11 @@ public Image(Device device, ImageData source, ImageData mask) { * <li>ERROR_NULL_ARGUMENT - if the stream is null</li> * </ul> * @exception SWTException <ul> - * <li>ERROR_INVALID_IMAGE - if the image file contains invalid data </li> - * <li>ERROR_IO - if an IO error occurs while reading data</li> - * <li>ERROR_UNSUPPORTED_DEPTH - if the InputStream describes an image with an unsupported depth</li> - * <li>ERROR_UNSUPPORTED_FORMAT - if the image file contains an unrecognized format</li> - * * </ul> + * <li>ERROR_IO - if an IO error occurs while reading from the stream</li> + * <li>ERROR_INVALID_IMAGE - if the image stream contains invalid data </li> + * <li>ERROR_UNSUPPORTED_DEPTH - if the image stream describes an image with an unsupported depth</li> + * <li>ERROR_UNSUPPORTED_FORMAT - if the image stream contains an unrecognized format</li> + * </ul> * @exception SWTError <ul> * <li>ERROR_NO_HANDLES if a handle could not be obtained for image creation</li> * </ul> @@ -482,9 +487,9 @@ public Image(Device device, InputStream stream) { * <li>ERROR_NULL_ARGUMENT - if the file name is null</li> * </ul> * @exception SWTException <ul> + * <li>ERROR_IO - if an IO error occurs while reading from the file</li> * <li>ERROR_INVALID_IMAGE - if the image file contains invalid data </li> - * <li>ERROR_IO - if an IO error occurs while reading data</li> - * <li>ERROR_UNSUPPORTED_DEPTH - if the image file has an unsupported depth</li> + * <li>ERROR_UNSUPPORTED_DEPTH - if the image file describes an image with an unsupported depth</li> * <li>ERROR_UNSUPPORTED_FORMAT - if the image file contains an unrecognized format</li> * </ul> * @exception SWTError <ul> diff --git a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/TextLayout.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/TextLayout.java index 31f6a2c093..830e238c0e 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/TextLayout.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/TextLayout.java @@ -17,13 +17,11 @@ import org.eclipse.swt.*; /** * <code>TextLayout</code> is a graphic object that represents * styled text. - *<p> + * <p> * Instances of this class provide support for drawing, cursor * navigation, hit testing, text wrapping, alignment, tab expansion * line breaking, etc. These are aspects required for rendering internationalized text. - * </p> - * - * <p> + * </p><p> * 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. @@ -689,11 +687,33 @@ public Font getFont () { return font; } +/** +* 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 () { checkLayout(); return indent; } +/** +* 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 () { checkLayout(); int[] buffer = new int[1]; @@ -1069,6 +1089,20 @@ public int getPreviousOffset (int index, int movement) { return _getOffset(index, movement, false); } +/** + * 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. + * + * @exception SWTException <ul> + * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> + * </ul> + * + * @see #getStyles() + * + * @since 3.2 + */ public int[] getRanges () { checkLayout(); int[] result = new int[styles.length * 2]; @@ -1141,6 +1175,19 @@ public TextStyle getStyle (int offset) { return null; } +/** + * Gets all styles of the receiver. + * + * @return the styles + * + * @exception SWTException <ul> + * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> + * </ul> + * + * @see #getRanges() + * + * @since 3.2 + */ public TextStyle[] getStyles () { checkLayout(); TextStyle[] result = new TextStyle[styles.length]; @@ -1211,6 +1258,7 @@ public int getWidth () { * This method gets the dispose state for the text layout. * When a text layout has been disposed, it is an error to * invoke any other method using the text layout. + * </p> * * @return <code>true</code> when the text layout is disposed and <code>false</code> otherwise */ @@ -1226,7 +1274,7 @@ public boolean isDisposed () { * The default alignment is <code>SWT.LEFT</code>. Note that the receiver's * width must be set in order to use <code>SWT.RIGHT</code> or <code>SWT.CENTER</code> * alignment. - *</p> + * </p> * * @param alignment the new alignment * @@ -1348,6 +1396,18 @@ public void setFont (Font font) { this.font = font; } +/** + * Sets the indent of the receiver. This indent it applied of 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> + * + * @since 3.2 + */ public void setIndent (int indent) { checkLayout (); if (indent < 0) return; @@ -1356,6 +1416,18 @@ public void setIndent (int indent) { this.indent = indent; } +/** + * Sets the justification of the receiver. Note that the receiver's + * 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) { checkLayout (); if (justify == getJustify()) return; @@ -1366,7 +1438,6 @@ public void setJustify (boolean justify) { /** * Sets the orientation of the receiver, which must be one * of <code>SWT.LEFT_TO_RIGHT</code> or <code>SWT.RIGHT_TO_LEFT</code>. - * <p> * * @param orientation new orientation style * @@ -1392,11 +1463,12 @@ public void setOrientation(int orientation) { * override the default behaviour of the bidirectional algorithm. * 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 * always be zero and the last one should always be equals to length of * the text. - * <p> + * </p> * * @param segments the text segments offset * diff --git a/bundles/org.eclipse.swt/Eclipse SWT/emulated/textlayout/org/eclipse/swt/graphics/TextLayout.java b/bundles/org.eclipse.swt/Eclipse SWT/emulated/textlayout/org/eclipse/swt/graphics/TextLayout.java index f9956851d9..910ebcda1f 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/emulated/textlayout/org/eclipse/swt/graphics/TextLayout.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/emulated/textlayout/org/eclipse/swt/graphics/TextLayout.java @@ -16,13 +16,11 @@ import org.eclipse.swt.*; /** * <code>TextLayout</code> is a graphic object that represents * styled text. - *<p> + * <p> * Instances of this class provide support for drawing, cursor * navigation, hit testing, text wrapping, alignment, tab expansion * line breaking, etc. These are aspects required for rendering internationalized text. - * </p> - * - * <p> + * </p><p> * 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. @@ -559,11 +557,33 @@ 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 () { checkLayout(); return indent; } +/** +* 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 () { checkLayout(); return justify; @@ -1040,6 +1060,20 @@ public int getPreviousOffset (int offset, int movement) { return offset; } +/** + * 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. + * + * @exception SWTException <ul> + * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> + * </ul> + * + * @see #getStyles() + * + * @since 3.2 + */ public int[] getRanges () { checkLayout(); int[] result = new int[styles.length * 2]; @@ -1112,6 +1146,19 @@ public TextStyle getStyle (int offset) { return null; } +/** + * Gets all styles of the receiver. + * + * @return the styles + * + * @exception SWTException <ul> + * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> + * </ul> + * + * @see #getRanges() + * + * @since 3.2 + */ public TextStyle[] getStyles () { checkLayout(); TextStyle[] result = new TextStyle[styles.length]; @@ -1179,6 +1226,7 @@ public int getWidth () { * This method gets the dispose state for the text layout. * When a text layout has been disposed, it is an error to * invoke any other method using the text layout. + * </p> * * @return <code>true</code> when the text layout is disposed and <code>false</code> otherwise */ @@ -1289,7 +1337,7 @@ void place (GC gc, StyleItem run) { * The default alignment is <code>SWT.LEFT</code>. Note that the receiver's * width must be set in order to use <code>SWT.RIGHT</code> or <code>SWT.CENTER</code> * alignment. - *</p> + * </p> * * @param alignment the new alignment * @@ -1387,6 +1435,18 @@ public void setFont (Font font) { this.font = font; } +/** + * Sets the indent of the receiver. This indent it applied of 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> + * + * @since 3.2 + */ public void setIndent (int indent) { checkLayout(); if (indent < 0) return; @@ -1395,6 +1455,18 @@ public void setIndent (int indent) { this.indent = indent; } +/** + * Sets the justification of the receiver. Note that the receiver's + * 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) { checkLayout(); if (this.justify == justify) return; @@ -1405,7 +1477,6 @@ public void setJustify (boolean justify) { /** * Sets the orientation of the receiver, which must be one * of <code>SWT.LEFT_TO_RIGHT</code> or <code>SWT.RIGHT_TO_LEFT</code>. - * <p> * * @param orientation new orientation style * @@ -1448,11 +1519,12 @@ public void setSpacing (int spacing) { * override the default behaviour of the bidirectional algorithm. * 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 * always be zero and the last one should always be equals to length of * the text. - * <p> + * </p> * * @param segments the text segments offset * 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 3d19a1306d..1d097d0571 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 @@ -91,7 +91,7 @@ GC() { * into another graphics context</li> * </ul> * @exception SWTError <ul> - * <li>ERROR_NO_HANDLES if a handle could not be obtained for gc creation</li> + * <li>ERROR_NO_HANDLES if a handle could not be obtained for GC creation</li> * </ul> */ public GC(Drawable drawable) { @@ -119,7 +119,7 @@ public GC(Drawable drawable) { * into another graphics context</li> * </ul> * @exception SWTError <ul> - * <li>ERROR_NO_HANDLES if a handle could not be obtained for gc creation</li> + * <li>ERROR_NO_HANDLES if a handle could not be obtained for GC creation</li> * </ul> * * @since 2.1.2 @@ -2128,6 +2128,26 @@ public Pattern getForegroundPattern() { return data.foregroundPattern; } +/** + * Returns the GCData. + * <p> + * <b>IMPORTANT:</b> This method is <em>not</em> part of the public + * API for <code>GC</code>. It is marked public only so that it + * can be shared within the packages provided by SWT. It is not + * available on all platforms, and should never be called from + * application code. + * </p> + * + * @return the receiver's GCData + * + * @exception SWTException <ul> + * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> + * </ul> + * + * @see GCData + * + * @since 3.2 + */ public GCData getGCData() { if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); return data; 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 28aee9cba1..a19f5faecb 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 @@ -70,6 +70,12 @@ public final class Image extends Resource implements Drawable { /** * specifies whether the receiver is a bitmap or an icon * (one of <code>SWT.BITMAP</code>, <code>SWT.ICON</code>) + * <p> + * <b>IMPORTANT:</b> This field is <em>not</em> part of the SWT + * public API. It is marked public only so that it can be shared + * within the packages provided by SWT. It is not available on all + * platforms and should never be accessed from application code. + * </p> */ public int type; @@ -198,9 +204,8 @@ public Image(Device device, int width, int height) { * <li>ERROR_INVALID_ARGUMENT - if the image has been disposed</li> * </ul> * @exception SWTException <ul> - * <li>ERROR_INVALID_IMAGE - if the image is not a bitmap or an icon, or - * is otherwise in an invalid state</li> - * <li>ERROR_UNSUPPORTED_DEPTH - if the depth of the Image is not supported</li> + * <li>ERROR_INVALID_IMAGE - if the image is not a bitmap or an icon, or is otherwise in an invalid state</li> + * <li>ERROR_UNSUPPORTED_DEPTH - if the depth of the image is not supported</li> * </ul> * @exception SWTError <ul> * <li>ERROR_NO_HANDLES if a handle could not be obtained for image creation</li> @@ -485,11 +490,11 @@ public Image(Device device, ImageData source, ImageData mask) { * <li>ERROR_NULL_ARGUMENT - if the stream is null</li> * </ul> * @exception SWTException <ul> - * <li>ERROR_INVALID_IMAGE - if the image file contains invalid data </li> - * <li>ERROR_IO - if an IO error occurs while reading data</li> - * <li>ERROR_UNSUPPORTED_DEPTH - if the InputStream describes an image with an unsupported depth</li> - * <li>ERROR_UNSUPPORTED_FORMAT - if the image file contains an unrecognized format</li> - * * </ul> + * <li>ERROR_IO - if an IO error occurs while reading from the stream</li> + * <li>ERROR_INVALID_IMAGE - if the image stream contains invalid data </li> + * <li>ERROR_UNSUPPORTED_DEPTH - if the image stream describes an image with an unsupported depth</li> + * <li>ERROR_UNSUPPORTED_FORMAT - if the image stream contains an unrecognized format</li> + * </ul> * @exception SWTError <ul> * <li>ERROR_NO_HANDLES if a handle could not be obtained for image creation</li> * </ul> @@ -519,9 +524,9 @@ public Image(Device device, InputStream stream) { * <li>ERROR_NULL_ARGUMENT - if the file name is null</li> * </ul> * @exception SWTException <ul> + * <li>ERROR_IO - if an IO error occurs while reading from the file</li> * <li>ERROR_INVALID_IMAGE - if the image file contains invalid data </li> - * <li>ERROR_IO - if an IO error occurs while reading data</li> - * <li>ERROR_UNSUPPORTED_DEPTH - if the image file has an unsupported depth</li> + * <li>ERROR_UNSUPPORTED_DEPTH - if the image file describes an image with an unsupported depth</li> * <li>ERROR_UNSUPPORTED_FORMAT - if the image file contains an unrecognized format</li> * </ul> * @exception SWTError <ul> 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 b573b3401c..8d041289ae 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 @@ -17,13 +17,11 @@ import org.eclipse.swt.*; /** * <code>TextLayout</code> is a graphic object that represents * styled text. - *<p> + * <p> * Instances of this class provide support for drawing, cursor * navigation, hit testing, text wrapping, alignment, tab expansion * line breaking, etc. These are aspects required for rendering internationalized text. - * </p> - * - * <p> + * </p><p> * 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. @@ -523,11 +521,33 @@ public Font getFont () { return font; } +/** +* 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 () { checkLayout(); return OS.PANGO_PIXELS(OS.pango_layout_get_indent(layout)); } +/** +* 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 () { checkLayout(); return OS.pango_layout_get_justify(layout); @@ -943,6 +963,20 @@ public int getPreviousOffset (int index, int movement) { return _getOffset(index, movement, false); } +/** + * 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. + * + * @exception SWTException <ul> + * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> + * </ul> + * + * @see #getStyles() + * + * @since 3.2 + */ public int[] getRanges () { checkLayout(); int[] result = new int[styles.length * 2]; @@ -1043,6 +1077,19 @@ public TextStyle getStyle (int offset) { return null; } +/** + * Gets all styles of the receiver. + * + * @return the styles + * + * @exception SWTException <ul> + * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> + * </ul> + * + * @see #getRanges() + * + * @since 3.2 + */ public TextStyle[] getStyles () { checkLayout(); TextStyle[] result = new TextStyle[styles.length]; @@ -1111,6 +1158,7 @@ public int getWidth () { * This method gets the dispose state for the text layout. * When a text layout has been disposed, it is an error to * invoke any other method using the text layout. + * </p> * * @return <code>true</code> when the text layout is disposed and <code>false</code> otherwise */ @@ -1126,7 +1174,7 @@ public boolean isDisposed () { * The default alignment is <code>SWT.LEFT</code>. Note that the receiver's * width must be set in order to use <code>SWT.RIGHT</code> or <code>SWT.CENTER</code> * alignment. - *</p> + * </p> * * @param alignment the new alignment * @@ -1229,12 +1277,36 @@ public void setFont (Font font) { } +/** + * Sets the indent of the receiver. This indent it applied of 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> + * + * @since 3.2 + */ public void setIndent (int indent) { checkLayout(); if (indent < 0) return; OS.pango_layout_set_indent(layout, indent * OS.PANGO_SCALE); } +/** + * Sets the justification of the receiver. Note that the receiver's + * 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) { checkLayout(); OS.pango_layout_set_justify(layout, justify); @@ -1243,7 +1315,6 @@ public void setJustify (boolean justify) { /** * Sets the orientation of the receiver, which must be one * of <code>SWT.LEFT_TO_RIGHT</code> or <code>SWT.RIGHT_TO_LEFT</code>. - * <p> * * @param orientation new orientation style * @@ -1287,11 +1358,12 @@ public void setSpacing (int spacing) { * override the default behaviour of the bidirectional algorithm. * 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 * always be zero and the last one should always be equals to length of * the text. - * <p> + * </p> * * @param segments the text segments offset * diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/GC.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/GC.java index e10949394a..058c20c44e 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/GC.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/GC.java @@ -90,7 +90,7 @@ GC() { * into another graphics context</li> * </ul> * @exception SWTError <ul> - * <li>ERROR_NO_HANDLES if a handle could not be obtained for gc creation</li> + * <li>ERROR_NO_HANDLES if a handle could not be obtained for GC creation</li> * </ul> */ public GC(Drawable drawable) { @@ -117,7 +117,7 @@ public GC(Drawable drawable) { * into another graphics context</li> * </ul> * @exception SWTError <ul> - * <li>ERROR_NO_HANDLES if a handle could not be obtained for gc creation</li> + * <li>ERROR_NO_HANDLES if a handle could not be obtained for GC creation</li> * </ul> * * @since 2.1.2 @@ -2803,6 +2803,26 @@ public Pattern getForegroundPattern() { if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); return data.foregroundPattern; } +/** + * Returns the GCData. + * <p> + * <b>IMPORTANT:</b> This method is <em>not</em> part of the public + * API for <code>GC</code>. It is marked public only so that it + * can be shared within the packages provided by SWT. It is not + * available on all platforms, and should never be called from + * application code. + * </p> + * + * @return the receiver's GCData + * + * @exception SWTException <ul> + * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> + * </ul> + * + * @see GCData + * + * @since 3.2 + */ public GCData getGCData() { if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); return data; diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/Image.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/Image.java index 77a31d04d4..54b41c8a63 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/Image.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/Image.java @@ -67,6 +67,12 @@ public final class Image extends Resource implements Drawable { /** * specifies whether the receiver is a bitmap or an icon * (one of <code>SWT.BITMAP</code>, <code>SWT.ICON</code>) + * <p> + * <b>IMPORTANT:</b> This field is <em>not</em> part of the SWT + * public API. It is marked public only so that it can be shared + * within the packages provided by SWT. It is not available on all + * platforms and should never be accessed from application code. + * </p> */ public int type; @@ -193,9 +199,8 @@ public Image(Device device, int width, int height) { * <li>ERROR_INVALID_ARGUMENT - if the image has been disposed</li> * </ul> * @exception SWTException <ul> - * <li>ERROR_INVALID_IMAGE - if the image is not a bitmap or an icon, or - * is otherwise in an invalid state</li> - * <li>ERROR_UNSUPPORTED_DEPTH - if the depth of the Image is not supported</li> + * <li>ERROR_INVALID_IMAGE - if the image is not a bitmap or an icon, or is otherwise in an invalid state</li> + * <li>ERROR_UNSUPPORTED_DEPTH - if the depth of the image is not supported</li> * </ul> * @exception SWTError <ul> * <li>ERROR_NO_HANDLES if a handle could not be obtained for image creation</li> @@ -631,11 +636,11 @@ public Image(Device device, ImageData source, ImageData mask) { * <li>ERROR_NULL_ARGUMENT - if the stream is null</li> * </ul> * @exception SWTException <ul> - * <li>ERROR_INVALID_IMAGE - if the image file contains invalid data </li> - * <li>ERROR_IO - if an IO error occurs while reading data</li> - * <li>ERROR_UNSUPPORTED_DEPTH - if the InputStream describes an image with an unsupported depth</li> - * <li>ERROR_UNSUPPORTED_FORMAT - if the image file contains an unrecognized format</li> - * * </ul> + * <li>ERROR_IO - if an IO error occurs while reading from the stream</li> + * <li>ERROR_INVALID_IMAGE - if the image stream contains invalid data </li> + * <li>ERROR_UNSUPPORTED_DEPTH - if the image stream describes an image with an unsupported depth</li> + * <li>ERROR_UNSUPPORTED_FORMAT - if the image stream contains an unrecognized format</li> + * </ul> * @exception SWTError <ul> * <li>ERROR_NO_HANDLES if a handle could not be obtained for image creation</li> * </ul> @@ -664,9 +669,9 @@ public Image(Device device, InputStream stream) { * <li>ERROR_NULL_ARGUMENT - if the file name is null</li> * </ul> * @exception SWTException <ul> + * <li>ERROR_IO - if an IO error occurs while reading from the file</li> * <li>ERROR_INVALID_IMAGE - if the image file contains invalid data </li> - * <li>ERROR_IO - if an IO error occurs while reading data</li> - * <li>ERROR_UNSUPPORTED_DEPTH - if the image file has an unsupported depth</li> + * <li>ERROR_UNSUPPORTED_DEPTH - if the image file describes an image with an unsupported depth</li> * <li>ERROR_UNSUPPORTED_FORMAT - if the image file contains an unrecognized format</li> * </ul> * @exception SWTError <ul> diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/TextLayout.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/TextLayout.java index 60aaaff105..13e6807da6 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/TextLayout.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/graphics/TextLayout.java @@ -17,13 +17,11 @@ import org.eclipse.swt.*; /** * <code>TextLayout</code> is a graphic object that represents * styled text. - *<p> + * <p> * Instances of this class provide support for drawing, cursor * navigation, hit testing, text wrapping, alignment, tab expansion * line breaking, etc. These are aspects required for rendering internationalized text. - * </p> - * - * <p> + * </p><p> * 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. @@ -606,11 +604,33 @@ XFontStruct getFontHeigth(Font font) { return fontStruct; } +/** +* 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 () { checkLayout(); return indent; } +/** +* 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 () { checkLayout(); return justify; @@ -1082,6 +1102,20 @@ public int getPreviousOffset (int offset, int movement) { return offset; } +/** + * 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. + * + * @exception SWTException <ul> + * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> + * </ul> + * + * @see #getStyles() + * + * @since 3.2 + */ public int[] getRanges () { checkLayout(); int[] result = new int[styles.length * 2]; @@ -1154,6 +1188,19 @@ public TextStyle getStyle (int offset) { return null; } +/** + * Gets all styles of the receiver. + * + * @return the styles + * + * @exception SWTException <ul> + * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> + * </ul> + * + * @see #getRanges() + * + * @since 3.2 + */ public TextStyle[] getStyles () { checkLayout(); TextStyle[] result = new TextStyle[styles.length]; @@ -1221,6 +1268,7 @@ public int getWidth () { * This method gets the dispose state for the text layout. * When a text layout has been disposed, it is an error to * invoke any other method using the text layout. + * </p> * * @return <code>true</code> when the text layout is disposed and <code>false</code> otherwise */ @@ -1333,7 +1381,7 @@ void place (StyleItem run) { * The default alignment is <code>SWT.LEFT</code>. Note that the receiver's * width must be set in order to use <code>SWT.RIGHT</code> or <code>SWT.CENTER</code> * alignment. - *</p> + * </p> * * @param alignment the new alignment * @@ -1434,6 +1482,18 @@ public void setFont (Font font) { defaultDescent = fontStruct.descent; } +/** + * Sets the indent of the receiver. This indent it applied of 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> + * + * @since 3.2 + */ public void setIndent (int indent) { checkLayout(); if (indent < 0) return; @@ -1442,6 +1502,18 @@ public void setIndent (int indent) { this.indent = indent; } +/** + * Sets the justification of the receiver. Note that the receiver's + * 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) { checkLayout(); if (this.justify == justify) return; @@ -1452,7 +1524,6 @@ public void setJustify (boolean justify) { /** * Sets the orientation of the receiver, which must be one * of <code>SWT.LEFT_TO_RIGHT</code> or <code>SWT.RIGHT_TO_LEFT</code>. - * <p> * * @param orientation new orientation style * @@ -1495,11 +1566,12 @@ public void setSpacing (int spacing) { * override the default behaviour of the bidirectional algorithm. * 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 * always be zero and the last one should always be equals to length of * the text. - * <p> + * </p> * * @param segments the text segments offset * diff --git a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics/GC.java b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics/GC.java index be437bc1e8..0eb0177d02 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics/GC.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics/GC.java @@ -105,7 +105,7 @@ GC() { * into another graphics context</li> * </ul> * @exception SWTError <ul> - * <li>ERROR_NO_HANDLES if a handle could not be obtained for gc creation</li> + * <li>ERROR_NO_HANDLES if a handle could not be obtained for GC creation</li> * </ul> */ public GC(Drawable drawable) { @@ -133,7 +133,7 @@ public GC(Drawable drawable) { * into another graphics context</li> * </ul> * @exception SWTError <ul> - * <li>ERROR_NO_HANDLES if a handle could not be obtained for gc creation</li> + * <li>ERROR_NO_HANDLES if a handle could not be obtained for GC creation</li> * </ul> * * @since 2.1.2 @@ -2196,6 +2196,26 @@ public Pattern getForegroundPattern() { return null; } +/** + * Returns the GCData. + * <p> + * <b>IMPORTANT:</b> This method is <em>not</em> part of the public + * API for <code>GC</code>. It is marked public only so that it + * can be shared within the packages provided by SWT. It is not + * available on all platforms, and should never be called from + * application code. + * </p> + * + * @return the receiver's GCData + * + * @exception SWTException <ul> + * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> + * </ul> + * + * @see GCData + * + * @since 3.2 + */ public GCData getGCData() { if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); return data; diff --git a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics/Image.java b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics/Image.java index d3c02ff231..1fd0d6d183 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics/Image.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/graphics/Image.java @@ -67,6 +67,12 @@ public final class Image extends Resource implements Drawable { /** * specifies whether the receiver is a bitmap or an icon * (one of <code>SWT.BITMAP</code>, <code>SWT.ICON</code>) + * <p> + * <b>IMPORTANT:</b> This field is <em>not</em> part of the SWT + * public API. It is marked public only so that it can be shared + * within the packages provided by SWT. It is not available on all + * platforms and should never be accessed from application code. + * </p> */ public int type; @@ -161,9 +167,8 @@ public Image(Device device, int width, int height) { * <li>ERROR_INVALID_ARGUMENT - if the image has been disposed</li> * </ul> * @exception SWTException <ul> - * <li>ERROR_INVALID_IMAGE - if the image is not a bitmap or an icon, or - * is otherwise in an invalid state</li> - * <li>ERROR_UNSUPPORTED_DEPTH - if the depth of the Image is not supported</li> + * <li>ERROR_INVALID_IMAGE - if the image is not a bitmap or an icon, or is otherwise in an invalid state</li> + * <li>ERROR_UNSUPPORTED_DEPTH - if the depth of the image is not supported</li> * </ul> * @exception SWTError <ul> * <li>ERROR_NO_HANDLES if a handle could not be obtained for image creation</li> @@ -440,11 +445,11 @@ public Image(Device device, ImageData source, ImageData mask) { * <li>ERROR_NULL_ARGUMENT - if the stream is null</li> * </ul> * @exception SWTException <ul> - * <li>ERROR_INVALID_IMAGE - if the image file contains invalid data </li> - * <li>ERROR_IO - if an IO error occurs while reading data</li> - * <li>ERROR_UNSUPPORTED_DEPTH - if the InputStream describes an image with an unsupported depth</li> - * <li>ERROR_UNSUPPORTED_FORMAT - if the image file contains an unrecognized format</li> - * * </ul> + * <li>ERROR_IO - if an IO error occurs while reading from the stream</li> + * <li>ERROR_INVALID_IMAGE - if the image stream contains invalid data </li> + * <li>ERROR_UNSUPPORTED_DEPTH - if the image stream describes an image with an unsupported depth</li> + * <li>ERROR_UNSUPPORTED_FORMAT - if the image stream contains an unrecognized format</li> + * </ul> * @exception SWTError <ul> * <li>ERROR_NO_HANDLES if a handle could not be obtained for image creation</li> * </ul> @@ -474,9 +479,9 @@ public Image (Device device, InputStream stream) { * <li>ERROR_NULL_ARGUMENT - if the file name is null</li> * </ul> * @exception SWTException <ul> + * <li>ERROR_IO - if an IO error occurs while reading from the file</li> * <li>ERROR_INVALID_IMAGE - if the image file contains invalid data </li> - * <li>ERROR_IO - if an IO error occurs while reading data</li> - * <li>ERROR_UNSUPPORTED_DEPTH - if the image file has an unsupported depth</li> + * <li>ERROR_UNSUPPORTED_DEPTH - if the image file describes an image with an unsupported depth</li> * <li>ERROR_UNSUPPORTED_FORMAT - if the image file contains an unrecognized format</li> * </ul> * @exception SWTError <ul> |