You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pivot.apache.org by tv...@apache.org on 2009/08/03 14:10:11 UTC

svn commit: r800328 - /incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TableViewNumberCellRenderer.java

Author: tvolkert
Date: Mon Aug  3 12:10:10 2009
New Revision: 800328

URL: http://svn.apache.org/viewvc?rev=800328&view=rev
Log:
Reverted previous change to TableViewNumberCellRenderer, and added comment as to why the padding is set up that way in this renderer

Modified:
    incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TableViewNumberCellRenderer.java

Modified: incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TableViewNumberCellRenderer.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TableViewNumberCellRenderer.java?rev=800328&r1=800327&r2=800328&view=diff
==============================================================================
--- incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TableViewNumberCellRenderer.java (original)
+++ incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TableViewNumberCellRenderer.java Mon Aug  3 12:10:10 2009
@@ -22,6 +22,7 @@
 import org.apache.pivot.beans.BeanDictionary;
 import org.apache.pivot.collections.Dictionary;
 import org.apache.pivot.wtk.HorizontalAlignment;
+import org.apache.pivot.wtk.Insets;
 import org.apache.pivot.wtk.TableView;
 
 
@@ -38,6 +39,10 @@
 
     public TableViewNumberCellRenderer() {
         getStyles().put("horizontalAlignment", HorizontalAlignment.RIGHT);
+
+        // Apply more padding on the right so the right-aligned cells don't
+        // appear to run into left-aligned cells in the next column
+        getStyles().put("padding", new Insets(2, 2, 2, 6));
     }
 
     public NumberFormat getNumberFormat() {