You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pivot.apache.org by gb...@apache.org on 2010/05/11 20:02:06 UTC

svn commit: r943210 - in /pivot/trunk: tutorials/src/org/apache/pivot/tutorials/kitchen_sink.wtkx wtk/src/org/apache/pivot/wtk/skin/TextAreaSkin.java

Author: gbrown
Date: Tue May 11 18:02:05 2010
New Revision: 943210

URL: http://svn.apache.org/viewvc?rev=943210&view=rev
Log:
Minor updates.

Modified:
    pivot/trunk/tutorials/src/org/apache/pivot/tutorials/kitchen_sink.wtkx
    pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextAreaSkin.java

Modified: pivot/trunk/tutorials/src/org/apache/pivot/tutorials/kitchen_sink.wtkx
URL: http://svn.apache.org/viewvc/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/kitchen_sink.wtkx?rev=943210&r1=943209&r2=943210&view=diff
==============================================================================
--- pivot/trunk/tutorials/src/org/apache/pivot/tutorials/kitchen_sink.wtkx (original)
+++ pivot/trunk/tutorials/src/org/apache/pivot/tutorials/kitchen_sink.wtkx Tue May 11 18:02:05 2010
@@ -16,7 +16,7 @@ See the License for the specific languag
 limitations under the License.
 -->
 
-<Window title="Pivot Demo" maximized="true"
+<Window title="Pivot &quot;Kitchen Sink&quot; Demo" maximized="true"
     xmlns:wtkx="http://pivot.apache.org/wtkx"
     xmlns:effects="org.apache.pivot.wtk.effects"
     xmlns="org.apache.pivot.wtk">

Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextAreaSkin.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextAreaSkin.java?rev=943210&r1=943209&r2=943210&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextAreaSkin.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextAreaSkin.java Tue May 11 18:02:05 2010
@@ -999,21 +999,25 @@ public class TextAreaSkin extends Compon
                 }
 
                 int end;
-                if (textNode.getCharacterCount() == 0) {
-                    end = start;
-                } else {
-                    if (lineWidth < breakWidth) {
-                        end = ci.getEndIndex();
+                if (wrapText) {
+                    if (textNode.getCharacterCount() == 0) {
+                        end = start;
                     } else {
-                        if (lastWhitespaceIndex == -1) {
-                            end = ci.getIndex() - 1;
-                            if (end <= start) {
-                                end = start + 1;
-                            }
+                        if (lineWidth < breakWidth) {
+                            end = ci.getEndIndex();
                         } else {
-                            end = lastWhitespaceIndex + 1;
+                            if (lastWhitespaceIndex == -1) {
+                                end = ci.getIndex() - 1;
+                                if (end <= start) {
+                                    end = start + 1;
+                                }
+                            } else {
+                                end = lastWhitespaceIndex + 1;
+                            }
                         }
                     }
+                } else {
+                    end = ci.getEndIndex();
                 }
 
                 glyphVector = font.createGlyphVector(fontRenderContext,