Author: akazakov
Date: 2007-11-02 07:13:03 -0400 (Fri, 02 Nov 2007)
New Revision: 4655
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/inputNumberSlider/inputNumberSlider.css
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/inputNumberSlider/pos.gif
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesInputNumberSliderTemplate.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1249
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/inputNumberSlider/inputNumberSlider.css
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/inputNumberSlider/inputNumberSlider.css 2007-11-02
10:03:26 UTC (rev 4654)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/inputNumberSlider/inputNumberSlider.css 2007-11-02
11:13:03 UTC (rev 4655)
@@ -75,8 +75,8 @@
width:100%;
}
.cell-with-picture {
- border-color: #ffffff;
- border: 1px solid white;
+ background-color : transparent;
+ border: 1px solid transparent;
align: left;
height: 4px;
width: 7px;
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/inputNumberSlider/pos.gif
===================================================================
(Binary files differ)
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesInputNumberSliderTemplate.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesInputNumberSliderTemplate.java 2007-11-02
10:03:26 UTC (rev 4654)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesInputNumberSliderTemplate.java 2007-11-02
11:13:03 UTC (rev 4655)
@@ -29,7 +29,8 @@
import org.w3c.dom.Node;
/**
- * Template for input number slider control
+ * Template for input number slider control
+ * // TODO We should refactor this class. There is a lot of reflection and a lot of
direct work with mozzila.
*/
public class RichFacesInputNumberSliderTemplate extends
AbstractRichFacesInputNumberTemplate {
@@ -198,7 +199,8 @@
table1Tr1Td3input.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
INPUT_STYLE_CLASS);
table1Tr1Td3input.setAttribute(HtmlComponentUtil.HTML_SIZE_ATTR, "3");
- table1Tr1Td3input.setAttribute(HtmlComponentUtil.HTML_VALUE_ATTR, "50");
+ table1Tr1Td3input.setAttribute(HtmlComponentUtil.HTML_VALUE_ATTR, "50");
+ table1Tr1Td3input.setAttribute("style",
ComponentUtil.getHeaderBackgoundImgStyle());
table1Tr2 = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_TR);
table1Tr2Td1 = visualDocument
@@ -224,22 +226,30 @@
.createElement(HtmlComponentUtil.HTML_TAG_TD);
table1Tr2Td1Table2Tr1Td1.setAttribute(
HtmlComponentUtil.HTML_CLASS_ATTR, "empty-cell-style");
+
+ table1Tr2Td1Table2Tr1Td1.setAttribute("style",
ComponentUtil.getHeaderBackgoundImgStyle());
+
table1Tr2Td1Table2Tr1Td1.setAttribute(
HtmlComponentUtil.HTML_WIDTH_ATTR, "50%");
table1Tr2Td1Table2Tr1Td2 = visualDocument
.createElement(HtmlComponentUtil.HTML_TAG_TD);
table1Tr2Td1Table2Tr1Td2.setAttribute(
- HtmlComponentUtil.HTML_CLASS_ATTR, "cell-with-picture");
+ HtmlComponentUtil.HTML_CLASS_ATTR, "cell-with-picture");
+
+ table1Tr2Td1Table2Tr1Td2.setAttribute("style",
ComponentUtil.getHeaderBackgoundImgStyle());
table1Tr2Td1Table2Tr1Td2Img = visualDocument
.createElement(HtmlComponentUtil.HTML_TAG_IMG);
ComponentUtil.setImg(table1Tr2Td1Table2Tr1Td2Img, IMAGE_SLIDER);
-
+
table1Tr2Td1Table2Tr1Td3 = visualDocument
.createElement(HtmlComponentUtil.HTML_TAG_TD);
table1Tr2Td1Table2Tr1Td3.setAttribute(
HtmlComponentUtil.HTML_CLASS_ATTR, "empty-cell-style");
+
+ table1Tr2Td1Table2Tr1Td3.setAttribute("style",
ComponentUtil.getHeaderBackgoundImgStyle());
+
table1Tr2Td1Table2Tr1Td3.setAttribute(
HtmlComponentUtil.HTML_WIDTH_ATTR, "50%");
@@ -273,11 +283,11 @@
try {
function.invoke(this, inPatams);
} catch (IllegalArgumentException e1) {
- RichFacesTemplatesActivator.getPluginLog().logWarning("IllegalArgumentException:
" + e.getKey() + ":" + e1.getMessage() );
+ RichFacesTemplatesActivator.getPluginLog().logWarning("IllegalArgumentException:
" + e.getKey() + ":" + e1.getMessage(), e1);
} catch (IllegalAccessException e2) {
- RichFacesTemplatesActivator.getPluginLog().logWarning("IllegalAccessException:
" + e.getKey() + ":" + e2.getMessage() );
+ RichFacesTemplatesActivator.getPluginLog().logWarning("IllegalAccessException:
" + e.getKey() + ":" + e2.getMessage(), e2);
} catch (InvocationTargetException e3) {
- RichFacesTemplatesActivator.getPluginLog().logWarning("InvocationTargetException:
" + e3.getMessage() );
+// RichFacesTemplatesActivator.getPluginLog().logWarning("InvocationTargetException:
" + e3.getMessage(), e3);
}
}
}
@@ -308,7 +318,7 @@
} catch (IllegalAccessException e2) {
RichFacesTemplatesActivator.getPluginLog().logWarning("IllegalAccessException:
" + name + ":" + e2.getMessage() );
} catch (InvocationTargetException e3) {
- RichFacesTemplatesActivator.getPluginLog().logWarning("InvocationTargetException:
" + name + ":"+ e3.getMessage() );
+// RichFacesTemplatesActivator.getPluginLog().logWarning("InvocationTargetException:
" + name + ":"+ e3.getMessage() );
}
}
@@ -389,7 +399,12 @@
nsIDOMNode td1 = trList.item(0);
nsIDOMNodeList td1List = td1.getChildNodes();
nsIDOMNode minValue = td1List.item(0);
- nsIDOMElement minValueElement = (nsIDOMElement)
minValue.queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
+ nsIDOMElement minValueElement = null;
+ try {
+ minValueElement = (nsIDOMElement)
minValue.queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
+ } catch (org.mozilla.xpcom.XPCOMException e) {
+ return null; // It could happen if source code doesn't have such element.
+ }
return minValueElement;
}