pivot-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From noelgran...@apache.org
Subject svn commit: r1186041 - in /pivot/trunk: wtk-terra/src/org/apache/pivot/wtk/skin/terra/ wtk/src/org/apache/pivot/wtk/skin/
Date Wed, 19 Oct 2011 09:08:24 GMT
Author: noelgrandin
Date: Wed Oct 19 09:08:24 2011
New Revision: 1186041

URL: http://svn.apache.org/viewvc?rev=1186041&view=rev
Log:
PIVOT-804 Why can't I set a TabPane's buttonPadding to a dictionary?
add necessary setters so that all padding styles can take dictionary style stuff in BXML files

Modified:
    pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraAccordionSkin.java
    pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraListViewSkin.java
    pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraPanoramaSkin.java
    pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraTabPaneSkin.java
    pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/GridPaneSkin.java
    pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TablePaneSkin.java

Modified: pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraAccordionSkin.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraAccordionSkin.java?rev=1186041&r1=1186040&r2=1186041&view=diff
==============================================================================
--- pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraAccordionSkin.java (original)
+++ pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraAccordionSkin.java Wed
Oct 19 09:08:24 2011
@@ -38,11 +38,11 @@ import org.apache.pivot.wtk.Dimensions;
 import org.apache.pivot.wtk.GraphicsUtilities;
 import org.apache.pivot.wtk.Insets;
 import org.apache.pivot.wtk.Keyboard;
+import org.apache.pivot.wtk.Keyboard.KeyCode;
+import org.apache.pivot.wtk.Keyboard.Modifier;
 import org.apache.pivot.wtk.Mouse;
 import org.apache.pivot.wtk.Platform;
 import org.apache.pivot.wtk.Theme;
-import org.apache.pivot.wtk.Keyboard.KeyCode;
-import org.apache.pivot.wtk.Keyboard.Modifier;
 import org.apache.pivot.wtk.effects.ClipDecorator;
 import org.apache.pivot.wtk.effects.Transition;
 import org.apache.pivot.wtk.effects.TransitionListener;
@@ -730,10 +730,34 @@ public class TerraAccordionSkin extends 
         invalidateComponent();
     }
 
+    public final void setButtonPadding(Dictionary<String, ?> buttonPadding) {
+        if (buttonPadding == null) {
+            throw new IllegalArgumentException("buttonPadding is null.");
+        }
+
+        setButtonPadding(new Insets(buttonPadding));
+    }
+
     public final void setButtonPadding(int buttonPadding) {
         setButtonPadding(new Insets(buttonPadding));
     }
 
+    public final void setButtonPadding(Number padding) {
+        if (padding == null) {
+            throw new IllegalArgumentException("buttonPadding is null.");
+        }
+
+        setButtonPadding(padding.intValue());
+    }
+
+    public final void setButtonPadding(String padding) {
+        if (padding == null) {
+            throw new IllegalArgumentException("buttonPadding is null.");
+        }
+
+        setButtonPadding(Insets.decode(padding));
+    }
+
     public int getSelectionChangeDuration() {
         return selectionChangeDuration;
     }

Modified: pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraListViewSkin.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraListViewSkin.java?rev=1186041&r1=1186040&r2=1186041&view=diff
==============================================================================
--- pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraListViewSkin.java (original)
+++ pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraListViewSkin.java Wed Oct
19 09:08:24 2011
@@ -33,7 +33,10 @@ import org.apache.pivot.wtk.Component;
 import org.apache.pivot.wtk.GraphicsUtilities;
 import org.apache.pivot.wtk.Insets;
 import org.apache.pivot.wtk.Keyboard;
+import org.apache.pivot.wtk.Keyboard.KeyCode;
+import org.apache.pivot.wtk.Keyboard.Modifier;
 import org.apache.pivot.wtk.ListView;
+import org.apache.pivot.wtk.ListView.SelectMode;
 import org.apache.pivot.wtk.ListViewItemListener;
 import org.apache.pivot.wtk.ListViewItemStateListener;
 import org.apache.pivot.wtk.ListViewListener;
@@ -42,9 +45,6 @@ import org.apache.pivot.wtk.Mouse;
 import org.apache.pivot.wtk.Platform;
 import org.apache.pivot.wtk.Span;
 import org.apache.pivot.wtk.Theme;
-import org.apache.pivot.wtk.Keyboard.KeyCode;
-import org.apache.pivot.wtk.Keyboard.Modifier;
-import org.apache.pivot.wtk.ListView.SelectMode;
 import org.apache.pivot.wtk.skin.ComponentSkin;
 
 /**
@@ -777,6 +777,14 @@ public class TerraListViewSkin extends C
         setCheckboxPadding(new Insets(checkboxPadding));
     }
 
+    public final void setCheckboxPadding(Number padding) {
+        if (padding == null) {
+            throw new IllegalArgumentException("checkboxPadding is null.");
+        }
+
+        setCheckboxPadding(padding.intValue());
+    }
+
     public final void setCheckboxPadding(String checkboxPadding) {
         if (checkboxPadding == null) {
             throw new IllegalArgumentException("checkboxPadding is null.");

Modified: pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraPanoramaSkin.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraPanoramaSkin.java?rev=1186041&r1=1186040&r2=1186041&view=diff
==============================================================================
--- pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraPanoramaSkin.java (original)
+++ pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraPanoramaSkin.java Wed Oct
19 09:08:24 2011
@@ -556,6 +556,14 @@ public class TerraPanoramaSkin extends C
         invalidateComponent();
     }
 
+    public final void setButtonPadding(Number padding) {
+        if (padding == null) {
+            throw new IllegalArgumentException("buttonPadding is null.");
+        }
+
+        setButtonPadding(padding.intValue());
+    }
+
     public boolean getAlwaysShowScrollButtons() {
         return alwaysShowScrollButtons;
     }

Modified: pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraTabPaneSkin.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraTabPaneSkin.java?rev=1186041&r1=1186040&r2=1186041&view=diff
==============================================================================
--- pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraTabPaneSkin.java (original)
+++ pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraTabPaneSkin.java Wed Oct
19 09:08:24 2011
@@ -1292,10 +1292,34 @@ public class TerraTabPaneSkin extends Co
         }
     }
 
+    public final void setButtonPadding(Dictionary<String, ?> padding) {
+        if (padding == null) {
+            throw new IllegalArgumentException("buttonPadding is null.");
+        }
+
+        setButtonPadding(new Insets(padding));
+    }
+
     public final void setButtonPadding(int buttonPadding) {
         setButtonPadding(new Insets(buttonPadding));
     }
 
+    public final void setButtonPadding(Number padding) {
+        if (padding == null) {
+            throw new IllegalArgumentException("buttonPadding is null.");
+        }
+
+        setButtonPadding(padding.intValue());
+    }
+
+    public final void setButtonPadding(String padding) {
+        if (padding == null) {
+            throw new IllegalArgumentException("buttonPadding is null.");
+        }
+
+        setButtonPadding(Insets.decode(padding));
+    }
+
     public int getButtonSpacing() {
         return (Integer)tabButtonBoxPane.getStyles().get("spacing");
     }

Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/GridPaneSkin.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/GridPaneSkin.java?rev=1186041&r1=1186040&r2=1186041&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/GridPaneSkin.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/GridPaneSkin.java Wed Oct 19 09:08:24 2011
@@ -477,6 +477,18 @@ public class GridPaneSkin extends Contai
      * Sets the padding that will be reserved around the grid pane during
      * layout.
      */
+    public final void setPadding(Number padding) {
+        if (padding == null) {
+            throw new IllegalArgumentException("padding is null.");
+        }
+
+        setPadding(padding.intValue());
+    }
+
+    /**
+     * Sets the padding that will be reserved around the grid pane during
+     * layout.
+     */
     public final void setPadding(String padding) {
         if (padding == null) {
             throw new IllegalArgumentException("padding is null.");

Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TablePaneSkin.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TablePaneSkin.java?rev=1186041&r1=1186040&r2=1186041&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TablePaneSkin.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TablePaneSkin.java Wed Oct 19 09:08:24 2011
@@ -802,6 +802,18 @@ public class TablePaneSkin extends Conta
      * Sets the padding that will be reserved around the table pane during
      * layout.
      */
+    public final void setPadding(Number padding) {
+        if (padding == null) {
+            throw new IllegalArgumentException("padding is null.");
+        }
+
+        setPadding(padding.intValue());
+    }
+
+    /**
+     * Sets the padding that will be reserved around the table pane during
+     * layout.
+     */
     public final void setPadding(String padding) {
         if (padding == null) {
             throw new IllegalArgumentException("padding is null.");



Mime
View raw message