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/09/18 22:01:44 UTC
svn commit: r816765 - in
/incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk: Component.java
skin/terra/command_button.json
Author: tvolkert
Date: Fri Sep 18 20:01:44 2009
New Revision: 816765
URL: http://svn.apache.org/viewvc?rev=816765&view=rev
Log:
Changed Component.setStyles() to support a resource name, added disabled command button styles to command_button.json
Modified:
incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/Component.java
incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/terra/command_button.json
Modified: incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/Component.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/Component.java?rev=816765&r1=816764&r2=816765&view=diff
==============================================================================
--- incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/Component.java (original)
+++ incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/Component.java Fri Sep 18 20:01:44 2009
@@ -36,6 +36,7 @@
import org.apache.pivot.serialization.SerializationException;
import org.apache.pivot.util.ImmutableIterator;
import org.apache.pivot.util.ListenerList;
+import org.apache.pivot.util.ThreadUtilities;
import org.apache.pivot.wtk.effects.Decorator;
@@ -2503,7 +2504,13 @@
}
try {
- setStyles(JSONSerializer.parseMap(styles));
+ if (styles.charAt(0) == '{') {
+ setStyles(JSONSerializer.parseMap(styles));
+ } else {
+ setStyles(ThreadUtilities.getClassLoader().getResource(styles));
+ }
+ } catch (IOException exception) {
+ throw new IllegalArgumentException(exception);
} catch (SerializationException exception) {
throw new IllegalArgumentException(exception);
}
Modified: incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/terra/command_button.json
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/terra/command_button.json?rev=816765&r1=816764&r2=816765&view=diff
==============================================================================
--- incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/terra/command_button.json (original)
+++ incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/terra/command_button.json Fri Sep 18 20:01:44 2009
@@ -1,7 +1,9 @@
{
color: "#ffffff",
- backgroundColor: "#336699",
+ backgroundColor: "#3c77b2",
borderColor: "#2b5580",
+ disabledBackgroundColor: "#dddcd5",
+ disabledBorderColor: "#999999",
padding: {top:3, left:4, bottom:3, right:4},
minimumAspectRatio: 3
}