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/09/30 20:56:05 UTC

svn commit: r1003205 - in /pivot/trunk/wtk/src/org/apache/pivot/wtk/content: ButtonDataRenderer.java ListViewItemRenderer.java TreeViewNodeRenderer.java

Author: gbrown
Date: Thu Sep 30 18:56:05 2010
New Revision: 1003205

URL: http://svn.apache.org/viewvc?rev=1003205&view=rev
Log:
Add icon width/height properties to ButtonDataRenderer; add fillIcon property to ButtonDataRender, ListViewItemRenderer, and TreeViewNodeRenderer.

Modified:
    pivot/trunk/wtk/src/org/apache/pivot/wtk/content/ButtonDataRenderer.java
    pivot/trunk/wtk/src/org/apache/pivot/wtk/content/ListViewItemRenderer.java
    pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TreeViewNodeRenderer.java

Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/content/ButtonDataRenderer.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/ButtonDataRenderer.java?rev=1003205&r1=1003204&r2=1003205&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/content/ButtonDataRenderer.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/content/ButtonDataRenderer.java Thu Sep 30 18:56:05 2010
@@ -103,6 +103,38 @@ public class ButtonDataRenderer extends 
         }
     }
 
+    public int getIconWidth() {
+        return imageView.getPreferredWidth(-1);
+    }
+
+    public void setIconWidth(int iconWidth) {
+        imageView.setPreferredWidth(iconWidth);
+    }
+
+    public int getIconHeight() {
+        return imageView.getPreferredHeight(-1);
+    }
+
+    public void setIconHeight(int iconHeight) {
+        imageView.setPreferredHeight(iconHeight);
+    }
+
+    public boolean getShowIcon() {
+        return imageView.isVisible();
+    }
+
+    public void setShowIcon(boolean showIcon) {
+        imageView.setVisible(showIcon);
+    }
+
+    public boolean getFillIcon() {
+        return (Boolean)imageView.getStyles().get("fill");
+    }
+
+    public void setFillIcon(boolean fillIcon) {
+        imageView.getStyles().put("fill", fillIcon);
+    }
+
     @Override
     public String toString(Object data) {
         String string = null;

Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/content/ListViewItemRenderer.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/ListViewItemRenderer.java?rev=1003205&r1=1003204&r2=1003205&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/content/ListViewItemRenderer.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/content/ListViewItemRenderer.java Thu Sep 30 18:56:05 2010
@@ -150,6 +150,14 @@ public class ListViewItemRenderer extend
         imageView.setVisible(showIcon);
     }
 
+    public boolean getFillIcon() {
+        return (Boolean)imageView.getStyles().get("fill");
+    }
+
+    public void setFillIcon(boolean fillIcon) {
+        imageView.getStyles().put("fill", fillIcon);
+    }
+
     /**
      * Gets the bounds of the text that is rendered by this renderer.
      *

Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TreeViewNodeRenderer.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TreeViewNodeRenderer.java?rev=1003205&r1=1003204&r2=1003205&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TreeViewNodeRenderer.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/content/TreeViewNodeRenderer.java Thu Sep 30 18:56:05 2010
@@ -177,6 +177,14 @@ public class TreeViewNodeRenderer extend
         imageView.setVisible(showIcon);
     }
 
+    public boolean getFillIcon() {
+        return (Boolean)imageView.getStyles().get("fill");
+    }
+
+    public void setFillIcon(boolean fillIcon) {
+        imageView.getStyles().put("fill", fillIcon);
+    }
+
     /**
      * Gets the bounds of the text that is rendered by this renderer.
      *