in jelly-tags/swing/src/main/java/org/apache/commons/jelly/tags/swing/ComponentTag.java [354:413]
protected void setBeanProperties(Object bean, Map attributes) throws JellyTagException {
Component component = getComponent();
if (component != null) {
if (attributes.containsKey("location")) {
Object value = attributes.get("location");
Point p = null;
if (value instanceof Point) {
p = (Point) value;
}
else if (value != null) {
p =
(Point) ConvertUtils.convert(
value.toString(),
Point.class);
}
component.setLocation(p);
addIgnoreProperty("location");
}
if (attributes.containsKey("size")) {
Object value = attributes.get("size");
Dimension d = null;
if (value instanceof Dimension) {
d = (Dimension) value;
}
else if (value != null) {
d =
(Dimension) ConvertUtils.convert(
value.toString(),
Dimension.class);
}
component.setSize(d);
addIgnoreProperty("size");
}
if (attributes.containsKey("debugGraphicsOptions")) {
try {
Object o = debugGraphicsConverter.convert(attributes.get("debugGraphicsOptions"));
attributes.put("debugGraphicsOptions", o);
} catch (IllegalArgumentException e) {
throw new JellyTagException(e);
}
}
if (attributes.containsKey("debugGraphics")) {
try {
Object o = debugGraphicsConverter.convert(attributes.get("debugGraphics"));
attributes.put("debugGraphicsOptions", o);
} catch (IllegalArgumentException e) {
throw new JellyTagException(e);
}
addIgnoreProperty("debugGraphics");
}
super.setBeanProperties(bean, attributes);
}
}