Author: estherbin
Date: 2008-07-25 09:48:59 -0400 (Fri, 25 Jul 2008)
New Revision: 9336
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesComboBoxTemplate.java
Log:
Done resizement for the
https://jira.jboss.org/jira/browse/JBIDE-2430
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesComboBoxTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesComboBoxTemplate.java 2008-07-25
13:34:45 UTC (rev 9335)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesComboBoxTemplate.java 2008-07-25
13:48:59 UTC (rev 9336)
@@ -235,7 +235,12 @@
if (this.sourceButtonStyle != null) {
thirdInput.setAttribute(HTML.ATTR_STYLE, sourceButtonStyle);
}
+
+// if (ComponentUtil.isNotBlank(this.sourceButtonIcon) &&
(this.sourceButtonIcon != IMAGE_NAME_DOWN)) {
+// thirdInput.setAttribute(HTML.ATTR_STYLE,
thirdInput.getAttribute(HTML.ATTR_STYLE) + " ; background-image: url("
+// + this.sourceButtonIcon + ")");
+// }
final nsIDOMElement forthEmptyDiv =
visualDocument.createElement(HtmlComponentUtil.HTML_TAG_DIV);
forthEmptyDiv.setAttribute(HTML.ATTR_CLASS,
styleClasess.get("forthEmptyDiv"));
forthEmptyDiv.setAttribute(HTML.ATTR_STYLE, VpeStyleUtil.PARAMETER_WIDTH +
VpeStyleUtil.COLON_STRING
@@ -420,8 +425,6 @@
nsIDOMElement imageDownElement = visualDocument.createElement(HTML.TAG_INPUT);
- ComponentUtil.setImg(imageDownElement, IMAGE_NAME_DOWN);
-
imageDownElement.setAttribute(HTML.ATTR_BORDER, ZERO_STRING);
imageDownElement.setAttribute(HTML.ATTR_TYPE, HTML.VALUE_IMAGE_TYPE);
imageDownElement.setAttribute(HTML.ATTR_CLASS, RICH_COMBOBOX_IMAGE_STYLE_CLASS);
@@ -599,11 +602,23 @@
this.sourceWidth = source.getAttribute("width");
+
if (ComponentUtil.isBlank(this.sourceWidth)) {
this.sourceWidth = DEFAULT_LIST_WIDTH;
}else if(ComponentUtil.isNotBlank(this.sourceWidth) &&
(this.sourceListWidth == DEFAULT_LIST_WIDTH)){
this.sourceListWidth = this.sourceWidth;
}
+
+ if (ComponentUtil.isNotBlank(this.sourceWidth) && (this.sourceWidth !=
DEFAULT_LIST_WIDTH)) {
+ if(!this.sourceWidth.endsWith("px")){
+ try {
+ int intValue = Integer.parseInt(this.sourceWidth);
+ this.sourceWidth = String.valueOf(intValue)+"px";
+ } catch (Exception e) {
+
+ }
+ }
+ }
this.sourceDefaultLabel = ComponentUtil.getAttribute(source,
"defaultLabel");
this.sourceValue = ComponentUtil.getAttribute(source, "value");
@@ -624,6 +639,10 @@
this.sourceItemClass = ComponentUtil.getAttribute(source,
"itemClass");
this.sourceButtonIcon = ComponentUtil.getAttribute(source,
"buttonIcon");
+
+ if(ComponentUtil.isBlank(this.sourceButtonIcon)){
+ this.sourceButtonIcon = IMAGE_NAME_DOWN;
+ }
}