You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by di...@apache.org on 2004/09/05 17:19:26 UTC
cvs commit: jakarta-commons/jelly/jelly-tags/swt/src/java/org/apache/commons/jelly/tags/swt WidgetTag.java
dion 2004/09/05 08:19:26
Modified: jelly/jelly-tags/swt/src/java/org/apache/commons/jelly/tags/swt
WidgetTag.java
Log:
Apply Jelly-124
Revision Changes Path
1.13 +7 -3 jakarta-commons/jelly/jelly-tags/swt/src/java/org/apache/commons/jelly/tags/swt/WidgetTag.java
Index: WidgetTag.java
===================================================================
RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/swt/src/java/org/apache/commons/jelly/tags/swt/WidgetTag.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- WidgetTag.java 25 Feb 2004 01:31:55 -0000 1.12
+++ WidgetTag.java 5 Sep 2004 15:19:26 -0000 1.13
@@ -141,18 +141,22 @@
Control control = (Control) bean;
// Special handling of size property as the Control object breaks the
- // JavaBean naming conventions by overloading the setSize() method
+ // JavaBean naming conventions by overloading the setSize() method
Object size = attributes.remove("size");
setSize(control, size);
// Special handling of color property as the Control object breaks the
// JavaBean naming conventions by overloading the setBackground() or setForeground() method
Object colorValue = attributes.remove("background");
- Color background = getColor(control, colorValue);
+ Color background =
+ (colorValue instanceof Color)
+ ? (Color) colorValue : getColor(control, colorValue);
control.setBackground(background);
colorValue = attributes.remove("foreground");
- Color foreground = getColor(control, colorValue);
+ Color foreground =
+ (colorValue instanceof Color)
+ ? (Color) colorValue : getColor(control, colorValue);
control.setForeground(foreground);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org