You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pivot.apache.org by rw...@apache.org on 2016/06/08 11:32:35 UTC

svn commit: r1747378 - /pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextPaneSkinParagraphView.java

Author: rwhitcomb
Date: Wed Jun  8 11:32:35 2016
New Revision: 1747378

URL: http://svn.apache.org/viewvc?rev=1747378&view=rev
Log:
Code cleanup:  some time ago, the whole source in "trunk" was reformatted
automatically to wrap at a certain width.  Unfortunately this made some
code pretty ugly by making a bunch of short comment lines with the leftover
stuff.  So, correct some of that.

Modified:
    pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextPaneSkinParagraphView.java

Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextPaneSkinParagraphView.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextPaneSkinParagraphView.java?rev=1747378&r1=1747377&r2=1747378&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextPaneSkinParagraphView.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextPaneSkinParagraphView.java Wed Jun  8 11:32:35 2016
@@ -95,8 +95,7 @@ class TextPaneSkinParagraphView extends
             offset += nodeView.getCharacterCount();
             row.width += nodeViewWidth;
 
-            // If the view was split into multiple views, add them to
-            // their own rows
+            // If the view was split into multiple views, add them to their own rows
             nodeView = getNext(nodeView);
             while (nodeView != null) {
                 rows.add(row);
@@ -178,8 +177,7 @@ class TextPaneSkinParagraphView extends
             offset += nodeView.getCharacterCount();
             row.width += nodeViewWidth;
 
-            // If the view was split into multiple views, add them to
-            // their own rows
+            // If the view was split into multiple views, add them to their own rows
             nodeView = getNext(nodeView);
             while (nodeView != null) {
                 rowsLocal.add(row);
@@ -231,8 +229,7 @@ class TextPaneSkinParagraphView extends
     }
 
     private static TextPaneSkinNodeView getNext(TextPaneSkinNodeView child) {
-        // Using instanceof checks because there is no nice place in the
-        // hierarchy
+        // Using instanceof checks because there is no nice place in the hierarchy
         // to put an abstract method
         if (child instanceof TextPaneSkinSpanView) {
             return ((TextPaneSkinSpanView) child).getNext();
@@ -328,8 +325,7 @@ class TextPaneSkinParagraphView extends
 
     @Override
     public void paint(Graphics2D graphics) {
-        // The default paint() method paints the document children, but because
-        // of row-splitting,
+        // The default paint() method paints the document children, but because of row-splitting,
         // the children we want to paint are not the same.
 
         // Determine the paint bounds
@@ -434,8 +430,7 @@ class TextPaneSkinParagraphView extends
             }
 
             if (i >= 0 && i < n) {
-                // Find the node view that contains x and get the insertion
-                // point from it
+                // Find the node view that contains x and get the insertion point from it
                 Row row = rows.get(i);
 
                 for (RowSegment segment : row.rowSegments) {
@@ -448,8 +443,7 @@ class TextPaneSkinParagraphView extends
                 }
 
                 if (offset == -1) {
-                    // No node view contained the x position; move to the end of
-                    // the row
+                    // No node view contained the x position; move to the end of the row
                     RowSegment lastNodeSegment = row.rowSegments.get(row.rowSegments.getLength() - 1);
                     offset = lastNodeSegment.offset + lastNodeSegment.nodeView.getCharacterCount();