changeset 1283:97b7b1b4a358

RT-21925: Canvas consistent handling of text alignment. When multiple lines of text. Doc only change.
author Thor johannesson <thor.johannesson@oracle.com>
date Mon, 11 Jun 2012 13:49:29 -0700
parents 62938da54121
children 9def6759a1f2
files javafx-ui-common/src/javafx/scene/canvas/GraphicsContext.java
diffstat 1 files changed, 18 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/javafx-ui-common/src/javafx/scene/canvas/GraphicsContext.java	Mon Jun 11 09:56:35 2012 +0200
+++ b/javafx-ui-common/src/javafx/scene/canvas/GraphicsContext.java	Mon Jun 11 13:49:29 2012 -0700
@@ -797,10 +797,25 @@
     }
 
     /**
-     * Sets the current TextAlignment attribute
+     * Defines horizontal text alignment, relative to the text {@code x} origin.
+     * <p>
+     * Let horizontal bounds represent the logical width of a single line of
+     * text. Where each line of text has a separate horizontal bounds.
+     * <p>
+     * Then TextAlignment is specified as:
+     * <ul>
+     * <li>Left: the left edge of the horizontal bounds will be at {@code x}.
+     * <li>Center: the center, halfway between left and right edge, of the 
+     * horizontal bounds will be at {@code x}.
+     * <li>Right: the right edge of the horizontal bounds will be at {@code x}.
+     * </ul>
+     * <p>
+     *
+     * Note: Canvas does not support line wrapping, therefore the text
+     * alignment Justify is identical to left aligned text.
+     * <p>
      * 
-     * @param align {@code TextAlignment} with values of Left, Center, Right, or
-     * Justify.
+     * @param align {@code TextAlignment} with values of Left, Center, Right.
      */
     public void setTextAlign(TextAlignment align) {
         if (curState.textalign != align) {